diff --git a/dist/_tests/demos/mapPopup.d.ts b/dist/_tests/demos/mapPopup.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/dist/_tests/demos/mapPopup.js b/dist/_tests/demos/mapPopup.js new file mode 100644 index 0000000000000000000000000000000000000000..c42e10a44c2cc0e17c4e218d1a3c377a09cbc323 --- /dev/null +++ b/dist/_tests/demos/mapPopup.js @@ -0,0 +1,86 @@ +/** + * Created by gavorhes on 12/18/2015. + */ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var quickMap_1 = require("../../olHelpers/quickMap"); +var LayerBaseVectorGeoJson_1 = require("../../layers/LayerBaseVectorGeoJson"); +var ol = require("custom-ol"); +var mapPopup_1 = require("../../olHelpers/mapPopup"); +var reg = { + "type": "FeatureCollection", + "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[[-91.4232, 43.9834], [-91.3246, 43.9834], [-91.3465, 44.0162], [-91.3082, 44.0655], [-91.2205, 44.0546], [-91.1767, 44.0874], [-91.1493, 44.0819], [-90.9741, 44.071], [-90.9741, 44.071], [-90.9796, 44.1312], [-90.9084, 44.1586], [-90.4921, 44.1586], [-90.3114, 44.1531], [-90.3114, 44.2463], [-90.0813, 44.2463], [-89.9006, 44.2517], [-89.928, 44.197], [-89.9061, 44.1805], [-89.928, 44.1531], [-89.9718, 44.1696], [-90.0266, 44.071], [-89.9608, 43.9779], [-89.9499, 43.9231], [-89.9828, 43.9122], [-89.9608, 43.8629], [-89.8513, 43.7698], [-89.7856, 43.6383], [-89.5994, 43.6438], [-89.2434, 43.6438], [-89.0079, 43.6328], [-88.8874, 43.6328], [-88.3999, 43.6328], [-88.3999, 43.5452], [-88.4163, 43.1947], [-88.5368, 43.1947], [-88.5423, 42.8442], [-88.5478, 42.8442], [-88.7778, 42.8442], [-88.7778, 42.4936], [-88.9421, 42.4936], [-89.3639, 42.4991], [-89.4022, 42.4991], [-89.8404, 42.5046], [-89.928, 42.5046], [-90.4264, 42.5046], [-90.64, 42.5101], [-90.7112, 42.636], [-90.8974, 42.6744], [-91.0672, 42.7511], [-91.1548, 42.9866], [-91.1767, 43.0797], [-91.1767, 43.1344], [-91.0562, 43.2549], [-91.1055, 43.3152], [-91.2041, 43.3535], [-91.2041, 43.4247], [-91.2315, 43.4576], [-91.2151, 43.5014], [-91.2698, 43.6164], [-91.2589, 43.7259], [-91.2424, 43.7752], [-91.2863, 43.8464]]] + } + } + ] +}; +var reg2 = { + "type": "FeatureCollection", + "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, + "features": [ + { + "type": "Feature", + "properties": {}, + "geometry": { + "type": "Polygon", + "coordinates": [[[-93.0, 45.0], [-94.0, 45.0], [-94.0, 46.0], [-93.0, 46.0], [-93.0, 45.0]]] + } + } + ] +}; +var map = quickMap_1.default({ addGeocode: true }); +var regionLayer = new LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson('', { + minZoom: 6, + maxZoom: 12, + name: 'WisDOT Regions', + style: new ol.style.Style({ + fill: new ol.style.Fill({ + color: 'blue' + }), + stroke: new ol.style.Stroke({ + color: 'yellow', + width: 5 + }) + }) +}); +var regionLayer2 = new LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson('', { + minZoom: 6, + maxZoom: 12, + name: 'WisDOT Regions', + style: new ol.style.Style({ + fill: new ol.style.Fill({ + color: 'red' + }), + stroke: new ol.style.Stroke({ + color: 'yellow', + width: 5 + }) + }) +}); +regionLayer.addFeatures(reg); +regionLayer2.addFeatures(reg2); +map.addLayer(regionLayer.olLayer); +map.addLayer(regionLayer2.olLayer); +mapPopup_1.mapPopup.addVectorPopup(regionLayer2, function (p) { return 'cats'; }); +window['map'] = map; +// +// let itsLayerCollection = new ItsLayerCollection(map); +// +// let layerArray = [ +// { +// groupName: 'ITS Inventory Layers', +// collapse: false, +// addCheck: true, +// items: itsLayerCollection.layers +// } +// ]; +// let legend = new LayerLegend(layerArray, 'legend-container', {}); +console.log('it works'); +//# sourceMappingURL=mapPopup.js.map \ No newline at end of file diff --git a/dist/_tests/demos/mapPopup.js.map b/dist/_tests/demos/mapPopup.js.map new file mode 100644 index 0000000000000000000000000000000000000000..ae32a95853952203faba64f792a405701e5f460a --- /dev/null +++ b/dist/_tests/demos/mapPopup.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mapPopup.js","sourceRoot":"","sources":["../../../src/_tests/demos/mapPopup.ts"],"names":[],"mappings":"AAAA;;GAEG;;;AAKH,qDAAgD;AAChD,8EAA2E;AAC3E,8BAAiC;AACjC,qDAAkD;AAIlD,IAAM,GAAG,GAAG;IACR,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,EAAC,MAAM,EAAE,+BAA+B,EAAC,EAAC;IAChF,UAAU,EAAE;QACR;YACI,MAAM,EAAE,SAAS;YACjB,YAAY,EAAE,EAAE;YAChB,UAAU,EAAE;gBACR,MAAM,EAAE,SAAS;gBACjB,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE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AAY,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;AAE/B,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AAClC,GAAG,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;AAEnC,mBAAQ,CAAC,cAAc,CAAC,YAAY,EAAE,UAAC,CAAC,IAAM,MAAM,CAAC,MAAM,CAAA,CAAA,CAAC,CAAC,CAAC;AAG9D,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;AACpB,EAAE;AACF,wDAAwD;AACxD,EAAE;AACF,qBAAqB;AACrB,QAAQ;AACR,6CAA6C;AAC7C,2BAA2B;AAC3B,0BAA0B;AAC1B,2CAA2C;AAC3C,QAAQ;AACR,KAAK;AAEL,oEAAoE;AAEpE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC","sourcesContent":["/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\n\r\nimport ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\nimport {LayerBaseVectorGeoJson} from '../../layers/LayerBaseVectorGeoJson';\r\nimport ol = require(\"custom-ol\");\r\nimport {mapPopup} from '../../olHelpers/mapPopup';\r\n\r\n\r\n\r\nconst reg = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": {\"type\": \"name\", \"properties\": {\"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\"}},\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-91.4232, 43.9834], [-91.3246, 43.9834], [-91.3465, 44.0162], [-91.3082, 44.0655], [-91.2205, 44.0546], [-91.1767, 44.0874], [-91.1493, 44.0819], [-90.9741, 44.071], [-90.9741, 44.071], [-90.9796, 44.1312], [-90.9084, 44.1586], [-90.4921, 44.1586], [-90.3114, 44.1531], [-90.3114, 44.2463], [-90.0813, 44.2463], [-89.9006, 44.2517], [-89.928, 44.197], [-89.9061, 44.1805], [-89.928, 44.1531], [-89.9718, 44.1696], [-90.0266, 44.071], [-89.9608, 43.9779], [-89.9499, 43.9231], [-89.9828, 43.9122], [-89.9608, 43.8629], [-89.8513, 43.7698], [-89.7856, 43.6383], [-89.5994, 43.6438], [-89.2434, 43.6438], [-89.0079, 43.6328], [-88.8874, 43.6328], [-88.3999, 43.6328], [-88.3999, 43.5452], [-88.4163, 43.1947], [-88.5368, 43.1947], [-88.5423, 42.8442], [-88.5478, 42.8442], [-88.7778, 42.8442], [-88.7778, 42.4936], [-88.9421, 42.4936], [-89.3639, 42.4991], [-89.4022, 42.4991], [-89.8404, 42.5046], [-89.928, 42.5046], [-90.4264, 42.5046], [-90.64, 42.5101], [-90.7112, 42.636], [-90.8974, 42.6744], [-91.0672, 42.7511], [-91.1548, 42.9866], [-91.1767, 43.0797], [-91.1767, 43.1344], [-91.0562, 43.2549], [-91.1055, 43.3152], [-91.2041, 43.3535], [-91.2041, 43.4247], [-91.2315, 43.4576], [-91.2151, 43.5014], [-91.2698, 43.6164], [-91.2589, 43.7259], [-91.2424, 43.7752], [-91.2863, 43.8464]]]\r\n }\r\n }\r\n ]\r\n};\r\n\r\nconst reg2 = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": {\"type\": \"name\", \"properties\": {\"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\"}},\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-93.0, 45.0], [-94.0, 45.0], [-94.0, 46.0], [-93.0, 46.0], [-93.0, 45.0]]]\r\n }\r\n }\r\n ]\r\n};\r\n\r\nlet map = quickMap({addGeocode: true});\r\n\r\n\r\n\r\n\r\n\r\nlet regionLayer = new LayerBaseVectorGeoJson(\r\n '',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'blue'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n });\r\n\r\nlet regionLayer2 = new LayerBaseVectorGeoJson(\r\n '',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'red'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n });\r\n\r\nregionLayer.addFeatures(reg);\r\nregionLayer2.addFeatures(reg2);\r\n\r\nmap.addLayer(regionLayer.olLayer);\r\nmap.addLayer(regionLayer2.olLayer);\r\n\r\nmapPopup.addVectorPopup(regionLayer2, (p) => {return 'cats'});\r\n\r\n\r\nwindow['map'] = map;\r\n//\r\n// let itsLayerCollection = new ItsLayerCollection(map);\r\n//\r\n// let layerArray = [\r\n// {\r\n// groupName: 'ITS Inventory Layers',\r\n// collapse: false,\r\n// addCheck: true,\r\n// items: itsLayerCollection.layers\r\n// }\r\n// ];\r\n\r\n// let legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\nconsole.log('it works');\r\n"]} \ No newline at end of file diff --git a/src/api/axios.ts b/src/api/axios.ts index 103902b65de61399ec361dbd10071bf11dba2d34..6c05af5da6d31d22b004ca199e6a53415d069829 100644 --- a/src/api/axios.ts +++ b/src/api/axios.ts @@ -110,7 +110,6 @@ export const delete_ = (endpoint: string, error: (d?: Object) => any = () => {}): any => { _axiosHelper(endpoint, callback, params, error, 'delete'); - }; /** diff --git a/src/olHelpers/mapPopupCls.ts b/src/olHelpers/mapPopupCls.ts index b8a513024193feea1a1323da0717dd22bc7b33b9..311f3b1b3c383cd7f3a19d26346d028694de8958 100644 --- a/src/olHelpers/mapPopupCls.ts +++ b/src/olHelpers/mapPopupCls.ts @@ -300,12 +300,13 @@ export class MapPopupCls extends MapInteractionBase { let hit = false; - this.map.forEachLayerAtPixel(pixel, (lyr) => { - if (hit){ + this.map.forEachFeatureAtPixel(pixel, (f, l) => { + if (hit) { return; } + for (let vLyr of this._arrPopupLayers){ - if (vLyr.olLayer == lyr){ + if (vLyr.olLayer == l){ hit = true; break; } diff --git a/test/serve/js/animate.js b/test/serve/js/animate.js index 2731352bc193edcac622d7ee3d6a6a7926fca90b..d859e59251a9d99a7b90c1765389986e417ea7b9 100644 --- a/test/serve/js/animate.js +++ b/test/serve/js/animate.js @@ -1,3600 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 69); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -module.exports = ol; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/8/2015. - */ -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers'); -/** - * base interaction - */ -var MapInteractionBase = (function () { - /** - * map interaction base - * @param subtype - the interaction subtype - */ - function MapInteractionBase(subtype) { - this._map = null; - this._initialized = false; - this._subtype = subtype; - } - /** - * base initializer, returns true for already initialized - * @param theMap - the ol Map - * @returns true for already initialized - */ - MapInteractionBase.prototype.init = function (theMap) { - if (!this._initialized) { - this._map = theMap; - this._initialized = true; - } - }; - Object.defineProperty(MapInteractionBase.prototype, "map", { - /** - * get reference to the ol map object - * @returns {ol.Map} the map object - */ - get: function () { - return this._map; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MapInteractionBase.prototype, "initialized", { - /** - * get if is initialized - * @returns {boolean} is initialized - */ - get: function () { - return this._initialized; - }, - enumerable: true, - configurable: true - }); - /** - * Check the initialization status and throw exception if not valid yet - * @protected - */ - MapInteractionBase.prototype._checkInit = function () { - if (!this.initialized) { - var msg = this._subtype + " object not initialized"; - alert(msg); - console.log(msg); - throw msg; - } - }; - /** - * Check the initialization status and throw exception if not valid yet - */ - MapInteractionBase.prototype.checkInit = function () { - this._checkInit(); - }; - return MapInteractionBase; -}()); -exports.MapInteractionBase = MapInteractionBase; -nm.MapInteractionBase = MapInteractionBase; -exports.default = MapInteractionBase; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMapBase_1 = __webpack_require__(14); -var provide_1 = __webpack_require__(0); -var mapMove_1 = __webpack_require__(6); -var mapPopup_1 = __webpack_require__(7); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param {object} [options={}] config options - * @param {string} [options.divId=map] map div id - * @param {object} [options.center={}] center config object - * @param {number} [options.center.x=-10018378] center x, web mercator x or lon - * @param {number} [options.center.y=5574910] center y, web mercator y or lat - * @param {number} [options.zoom=7] zoom level - * @param {number} [options.minZoom=undefined] min zoom - * @param {number} [options.maxZoom=undefined] max zoom - * @param {boolean} [options.baseSwitcher=true] if add base map switcher - * @param {boolean} [options.fullScreen=false] if add base map switcher - * @returns {ol.Map} the ol map - */ -function quickMap(options) { - if (options === void 0) { options = {}; } - var m = quickMapBase_1.quickMapBase(options); - mapMove_1.default.init(m); - mapPopup_1.default.init(m); - return m; -} -exports.quickMap = quickMap; -nm.quickMap = quickMap; -exports.default = quickMap; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapMoveCls_1 = __webpack_require__(12); -/** - * The single map move object catch is that it is common to multimap pages - * @type {MapMoveCls} - */ -exports.mapMove = new mapMoveCls_1.default(); -exports.default = exports.mapMove; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapPopupCls_1 = __webpack_require__(13); -/** - * The single popup object catch is that it is common to multimap pages - * @type {MapPopupCls} - */ -exports.mapPopup = new mapPopupCls_1.default(); -exports.default = exports.mapPopup; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 10/3/2016. - */ -var ol = __webpack_require__(2); -exports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' }); -exports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' }); -exports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' }); - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util.checkDefined'); -/** - * check if the input is undefined or null - * @param input - input pointer - * @returns true undefined or null - */ -function undefinedOrNull(input) { - "use strict"; - return (typeof input === 'undefined' || input === null); -} -exports.undefinedOrNull = undefinedOrNull; -nm.undefinedOrNull = undefinedOrNull; -/** - * check if the input is defined and not null - * @param input - input pointer - * @returns true defined and not null - */ -function definedAndNotNull(input) { - "use strict"; - return !(undefinedOrNull(input)); -} -exports.definedAndNotNull = definedAndNotNull; -nm.definedAndNotNull = definedAndNotNull; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var zoomResolutionConvert = __webpack_require__(17); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The base layer class - * @abstract - */ -var LayerBase = (function () { - /** - * The base layer for all others - * @param {string} url - url for source - * @param {object} options - config - * @param {string} [options.id=makeGuid()] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] - the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] - the z index for the layer - * @param {function} [options.loadCallback] - function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend - */ - function LayerBase(url, options) { - if (options === void 0) { options = {}; } - options = options || {}; - if (typeof url !== 'string') { - throw 'Invalid URL'; - } - this._url = url; - this._params = typeof options.params == 'object' ? options.params : {}; - this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false; - this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true; - this.id = options.id || makeGuid_1.default(); - this._name = options.name || 'Unnamed Layer'; - this.animate = false; - this._opacity = typeof options.opacity == 'number' ? options.opacity : 1; - if (this._opacity > 1) { - this._opacity = 1; - } - else if (this._opacity < 0) { - this._opacity = 0; - } - this._visible = typeof options.visible === 'boolean' ? options.visible : true; - this._source = undefined; - /** - * - * @protected - */ - this._olLayer = undefined; - this._loaded = false; - this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom); - if (typeof this._maxResolution !== 'undefined') { - this._maxResolution += 0.00001; - } - this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom); - this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined; - this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined; - this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0; - this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () { - }; - this._legendContent = ''; - if (this._legendCheckbox) { - this._legendContent += "<input type=\"checkbox\" " + (this.visible ? 'checked' : '') + " " + - ("class=\"legend-check\" id=\"" + this.id + "-legend-layer-check\"><span></span>"); - this._legendContent += "<label for=\"" + this.id + "-legend-layer-check\" class=\"legend-layer-name\">" + this.name + "</label>"; - } - else { - this._legendContent += "<label class=\"legend-layer-name\">" + this.name + "</label>"; - } - this._$legendDiv = null; - this._applyCollapseCalled = false; - this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined); - } - /** - * base load function, sets _loaded = true if it is not already - * @protected - * @returns {boolean} if already loaded - */ - LayerBase.prototype._load = function () { - if (this.loaded == true) { - return true; - } - else { - this._loaded = true; - return false; - } - }; - /** - * Get the legend html, be sure to only add to the DOM once - * @returns {string} html for layer wrapped in a div - */ - LayerBase.prototype.getLegendDiv = function () { - return "<div class=\"legend-layer-div\" id=\"" + this.id + "-legend-layer-div\">" + this._legendContent + "</div>"; - }; - /** - * - * @param additionalContent - additional content to add to legend - * @private - */ - LayerBase.prototype._addLegendContent = function (additionalContent) { - if (additionalContent === void 0) { additionalContent = ''; } - var addCollapse = additionalContent.indexOf('<ul>') > -1; - if (addCollapse) { - additionalContent = '<span class="legend-items-expander" title="Expand/Collapse">▼</span>' + additionalContent; - } - this._legendContent += additionalContent; - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - this._$legendDiv.append(additionalContent); - this.applyCollapse(); - } - }; - /** - * add additional content to the legend - * @param {string} [additionalContent=] - additonal content to add - */ - LayerBase.prototype.addLegendContent = function (additionalContent) { - this._addLegendContent(additionalContent); - }; - LayerBase.prototype.applyCollapse = function () { - if (this._applyCollapseCalled) { - console.log('collapse already applied'); - return undefined; - } - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - var $expander = this._$legendDiv.find('.legend-items-expander'); - if ($expander.length > 0) { - this._applyCollapseCalled = true; - $expander.click(function () { - var $this = $(this); - $this.siblings('ul').slideToggle(); - if ($this.hasClass('legend-layer-group-collapsed')) { - $this.removeClass('legend-layer-group-collapsed'); - $this.html('▼'); - } - else { - $this.addClass('legend-layer-group-collapsed'); - $this.html('▶'); - } - }); - if (this._legendCollapse) { - $expander.trigger('click'); - } - } - } - }; - /** - * trick to refresh the layer - */ - LayerBase.prototype.refresh = function () { - if (this.source) { - this.source.refresh(); - } - }; - Object.defineProperty(LayerBase.prototype, "id", { - get: function () { - return this._id; - }, - set: function (newId) { - this._id = newId; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "animate", { - get: function () { - return this._animate; - }, - set: function (animate) { - this._animate = animate; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "legendContent", { - /** - * get the legend content - * @type {string} - */ - get: function () { - return this._legendContent; - }, - /** - * set the legend content directly - * @param {string} newVal - new content - * @protected - */ - set: function (newVal) { - this._legendContent = newVal; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "params", { - /** - * get the map get params - * @type {object} - */ - get: function () { - return this._params; - }, - /** - * set the map get params - * @param {object} newParams - new get params - * @protected - */ - set: function (newParams) { - this._params = newParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minResolution", { - /** - * get the minimum resolution - * @type {number|*} - */ - get: function () { - return this._minResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxResolution", { - /** - * get the maximum resolution - * @type {number|*} - */ - get: function () { - return this._maxResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minZoom", { - /** - * get min zoom - * @type {number|*} - */ - get: function () { - return this._minZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxZoom", { - /** - * get max zoom - * @type {number|*} - */ - get: function () { - return this._maxZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "url", { - /** - * get the url - * @type {string} - */ - get: function () { - return this._url; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "visible", { - /** - * Get the layer visibility - * @type {boolean} - */ - get: function () { - return this._visible; - }, - /** - * set the visibility - * @param visibility - */ - set: function (visibility) { - this.setVisible(visibility); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setVisible = function (visibility) { - this._visible = visibility; - if (this.olLayer) { - this.olLayer.setVisible(this._visible); - if (visibility && !this._loaded) { - this._load(); - } - } - }; - Object.defineProperty(LayerBase.prototype, "opacity", { - /** - * Get the layer opacity - * @type {number} - */ - get: function () { - return this._opacity; - }, - /** - * Set the layer opacity - * @param {number} opacity - layer opacity - */ - set: function (opacity) { - this._opacity = opacity; - if (this.olLayer) { - this.olLayer.setOpacity(this._opacity); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "name", { - /** - * Get the layer name - * @type {string} - */ - get: function () { - return this._name; - }, - /** - * set the layer name - * @param {string} newName - the new name - */ - set: function (newName) { - this._name = newName; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "loaded", { - /** - * Check if the layer is loaded - * @type {boolean} - */ - get: function () { - return this._loaded; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "source", { - /** - * get the layer source - * @type {*} - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getSource = function () { - return this._source; - }; - Object.defineProperty(LayerBase.prototype, "zIndex", { - /** - * get the z index - */ - get: function () { - return this._zIndex; - }, - /** - * set the z index - */ - set: function (newZ) { - this._zIndex = newZ; - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setZIndex = function (newZ) { - }; - Object.defineProperty(LayerBase.prototype, "olLayer", { - /** - * the the ol layer - */ - get: function () { - return this.getOlLayer(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getOlLayer = function () { - return this._olLayer; - }; - return LayerBase; -}()); -exports.LayerBase = LayerBase; -nm.LayerBase = LayerBase; -exports.default = LayerBase; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var $ = __webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var ol = __webpack_require__(2); -var projections_1 = __webpack_require__(8); -var invalidClass = 'geocoder-invalid'; -var geocoderLoadingClass = 'geocoder-loading'; -// let testAddress = '65 7th Street, Prairie du Sac, WI'; -var Geocode = (function () { - function Geocode(mapDiv, map) { - var _this = this; - var inputGuid = makeGuid_1.makeGuid(); - var buttonGuid = makeGuid_1.makeGuid(); - this.map = map; - this.indicationLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: new ol.style.Style({ - image: new ol.style.Circle({ - radius: 12, - fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }), - stroke: new ol.style.Stroke({ color: 'red', width: 1 }) - }) - }) - }); - this.map.addLayer(this.indicationLayer); - $(mapDiv).append('<div class="geocoder-el">' + - ("<input type=\"text\" id=\"" + inputGuid + "\">") + - ("<button id=\"" + buttonGuid + "\">Search</button>") + - '</div>'); - this.theButton = document.getElementById(buttonGuid); - this.theInput = document.getElementById(inputGuid); - this.reset(); - var $theButton = $(this.theButton); - var $theInput = $(this.theInput); - $theButton.click(function (evt) { - evt.preventDefault(); - $theButton.addClass(geocoderLoadingClass); - _this.theButton.disabled = true; - _this.indicationLayer.getSource().clear(); - $.get("https://geocode.xyz/" + _this.theInput.value + "?geoit=json", {}, function (d) { - var lat = parseFloat(d['latt']); - var lon = parseFloat(d['longt']); - if ((lat == 0 && lon == 0) || d['error']) { - $theInput.addClass(invalidClass); - _this.theInput.title = 'Specified Location Invalid'; - _this.theButton.title = 'Specified Location Invalid'; - } - else { - var v = _this.map.getView(); - var p = new ol.geom.Point([lon, lat]); - var feat = new ol.Feature(p); - _this.indicationLayer.getSource().addFeature(feat); - p.transform(projections_1.proj4326, projections_1.proj3857); - v.setCenter(p.getCoordinates()); - v.setZoom(13); - } - $theButton.removeClass(geocoderLoadingClass); - _this.theButton.disabled = false; - }, 'json'); - }); - $(this.theInput).keyup(function (evt) { - evt.preventDefault(); - _this.theButton.disabled = _this.theInput.value.length == 0; - $theInput.removeClass(invalidClass); - _this.theInput.title = ''; - _this.theButton.title = ''; - if (!_this.theButton.disabled && evt.keyCode == 13) { - $theButton.click(); - } - }); - } - Geocode.prototype.reset = function () { - this.theButton.disabled = true; - this.theInput.value = ''; - }; - return Geocode; -}()); -exports.Geocode = Geocode; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var checkDefined = __webpack_require__(9); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -/** - * assists with map move interactions, trigger callback functions - * @augments MapInteractionBase - */ -var MapMoveCls = (function (_super) { - __extends(MapMoveCls, _super); - /** - * constructor called implicitly - */ - function MapMoveCls() { - var _this = _super.call(this, 'map move') || this; - _this._arrLyrRequest = []; - _this._arrLyrTimeout = []; - _this._arrLayer = []; - _this._lookupLayer = {}; - _this._mapMoveCallbacks = []; - _this._mapMoveCallbacksLookup = {}; - _this._mapMoveCallbackDelays = []; - _this._mapMoveCallbackContext = []; - _this._mapMoveCallbackTimeout = []; - _this._mapExtent = undefined; - _this._zoomLevel = undefined; - return _this; - } - /** - * initialize the map move object - * @param theMap - the ol map - */ - MapMoveCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - this.map.getView().on(['change:center', 'change:resolution'], function (e) { - _this._updateMapExtent(); - // trigger the layer updates - for (var i = 0; i < _this._arrLayer.length; i++) { - _this.triggerLyrLoad(_this._arrLayer[i], i, e.type); - } - // trigger the map callbacks - for (var i = 0; i < _this._mapMoveCallbacks.length; i++) { - _this.triggerMoveCallback(i, e.type); - } - }); - }; - MapMoveCls.prototype._updateMapExtent = function () { - var theView = this.map.getView(); - this._zoomLevel = theView.getZoom(); - var extentArray = theView.calculateExtent(this.map.getSize()); - this._mapExtent = { - minX: extentArray[0], - minY: extentArray[1], - maxX: extentArray[2], - maxY: extentArray[3] - }; - }; - Object.defineProperty(MapMoveCls.prototype, "mapExtent", { - /** - * return the map extent - */ - get: function () { - if (!this._mapExtent) { - this._updateMapExtent(); - } - return this._mapExtent; - }, - enumerable: true, - configurable: true - }); - /** - * Trigger the layer load - * @param lyr the layer being acted on - * @param index index of the layer - * @param eventType the event triggering the load, as 'change:center' or 'change:resolution' - */ - MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) { - if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) { - throw 'need to define lyr or index'; - } - else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) { - index = this._arrLayer.indexOf(lyr); - } - else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) { - lyr = this._arrLayer[index]; - } - // clear the timeout - if (this._arrLyrTimeout[index] != null) { - clearTimeout(this._arrLyrTimeout[index]); - this._arrLyrTimeout[index] = null; - } - // abort if necessary and clear the request - if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) { - this._arrLyrRequest[index].abort(); - this._arrLyrRequest[index] = null; - } - // dummy callback used if before load returns false - var callbackFunc = function () { }; - if (lyr.mapMoveBefore(this._zoomLevel, eventType)) { - lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel); - var __this_1 = this; - callbackFunc = function () { - function innerFunction(theLayer, theIndex) { - var _innerThis = this; - this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) { - /** - * @type {LayerBaseVector} - */ - theLayer.mapMoveCallback(d); - theLayer.loadCallback(); - }, 'json').fail(function (jqXHR) { - if (jqXHR.statusText != 'abort') { - console.log('failed'); - console.log(theLayer.url); - console.log(theLayer.mapMoveParams); - } - }).always(function () { - _innerThis._arrLyrTimeout[theIndex] = null; - _innerThis._arrLyrRequest[theIndex] = null; - }); - } - innerFunction.call(__this_1, lyr, index); - }; - } - else { - lyr.clear(); - } - this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay); - }; - /** - * trigger the map move call back at the given index - * @param ind - the index of the layer - * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution' - * @param functionId=undefined the function id used to reference the added callback function - */ - MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) { - if (typeof ind == 'undefined' && typeof functionId == 'undefined') { - throw 'either the function index or the id must be defined'; - } - if (typeof ind !== 'number') { - ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]); - } - if (ind < 0) { - console.log('function not found'); - return; - } - // clear the timeout - if (this._mapMoveCallbackTimeout[ind] != null) { - clearTimeout(this._mapMoveCallbackTimeout[ind]); - this._mapMoveCallbackTimeout[ind] = null; - } - var ctx = this._mapMoveCallbackContext[ind]; - var theFunc = this._mapMoveCallbacks[ind]; - var __this = this; - var f = function () { - if (ctx !== null) { - theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType); - } - else { - theFunc(__this._mapExtent, __this._zoomLevel, eventType); - } - }; - this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]); - }; - /** - * Add a layer to the interaction - * @param lyr - layer to add - * @param triggerOnAdd - if the layer should be loaded on add - */ - MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) { - if (triggerOnAdd === void 0) { triggerOnAdd = true; } - if (this._arrLayer.indexOf(lyr) > -1) { - console.log('already added ' + lyr.name + ' to map move'); - return; - } - this._checkInit(); - this._arrLyrRequest.push(null); - this._arrLyrTimeout.push(null); - this._arrLayer.push(lyr); - this._lookupLayer[lyr.id] = lyr; - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerLyrLoad(lyr, this._arrLayer.length - 1); - } - }; - /** - * add a callback to the map move event - * @param func - callback function - * @param context - the context to use for this function - * @param delay=50 the delay before call load - * @param triggerOnAdd if the layer should be loaded on add to mapMove - * @param functionId optional id to reference the function later for outside triggering - */ - MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) { - if (this._mapMoveCallbacks.indexOf(func) > -1) { - console.log('this function already added to map move'); - return; - } - this._checkInit(); - if (!functionId) { - functionId = makeGuid_1.default(); - } - this._mapMoveCallbacks.push(func); - this._mapMoveCallbacksLookup[functionId] = func; - this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50); - this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null); - this._mapMoveCallbackTimeout.push(null); - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerMoveCallback(this._mapMoveCallbacks.length - 1); - } - }; - return MapMoveCls; -}(mapInteractionBase_1.default)); -exports.MapMoveCls = MapMoveCls; -nm.MapMoveCls = MapMoveCls; -exports.default = MapMoveCls; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -var FeatureLayerProperties = (function () { - /** - * - * @param feature the feature - * @param layer - the layer in the popup - * @param layerIndex - index of the layer - * @param selectionLayer - the ol selection layer - * @param [esriLayerName=undefined] - esri layer name - */ - function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) { - this.feature = feature; - this.layer = layer; - this.layerIndex = layerIndex; - this.selectionLayer = selectionLayer; - this.popupContent = ''; - this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined; - } - Object.defineProperty(FeatureLayerProperties.prototype, "layerName", { - get: function () { - if (typeof this.esriLayerName == 'string') { - return this.esriLayerName; - } - else { - return this.layer.name; - } - }, - enumerable: true, - configurable: true - }); - return FeatureLayerProperties; -}()); -exports.FeatureLayerProperties = FeatureLayerProperties; -/** - * map popup class - * @augments MapInteractionBase - */ -var MapPopupCls = (function (_super) { - __extends(MapPopupCls, _super); - /** - * Definition for openlayers style function - * @callback olStyleFunction - * ¶m feature the openlayers vector feature - * $param - */ - /** - * map popup constructor - */ - function MapPopupCls() { - var _this = _super.call(this, 'map popup') || this; - _this._arrPopupLayerIds = []; - _this._arrPopupLayers = []; - // this._arrPopupOlLayers = []; - _this._arrPopupContentFunction = []; - _this._$popupContainer = undefined; - _this._$popupContent = undefined; - _this._$popupCloser = undefined; - _this._popupOverlay = undefined; - _this._selectionLayers = []; - _this._selectionLayerLookup = {}; - _this._mapClickFunctions = []; - //let a = function($jqueryContent){console.log($jqueryContent)}; - //this._popupChangedLookup = {'a': a}; - _this._popupChangedFunctions = []; - _this._esriMapServiceLayers = []; - _this._popupOpen = false; - _this._popupCoordinate = null; - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - _this._popupContentLength = 0; - return _this; - } - /** - * map popup initialization - * @param {ol.Map} theMap - the ol map - */ - MapPopupCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - var $map; - var target = this.map.getTarget(); - if (typeof target == 'string') { - $map = $('#' + target); - } - else { - $map = $(target); - } - $map.append('<div class="ol-popup">' + - '<span class="ol-popup-closer">X</span>' + - '<div class="popup-content"></div>' + - '</div>'); - this._$popupContainer = $map.find('.ol-popup'); - this._$popupContent = $map.find('.popup-content'); - this._$popupCloser = $map.find('.ol-popup-closer'); - var _ease = function (n) { - return ol.easing.inAndOut(n); - }; - this._popupOverlay = new ol.Overlay({ - element: this._$popupContainer[0], - autoPan: true, - autoPanAnimation: { - duration: 250, - source: theMap.getView().getCenter(), - easing: _ease - } - }); - this._map.addOverlay(this._popupOverlay); - this._$popupCloser.click(function (evt) { - _this.closePopup(); - }); - // display popup on click - this._map.on('singleclick', function (evt) { - _this.closePopup(); - _this._popupCoordinate = evt['coordinate']; - // esri map service layers - if (_this._esriMapServiceLayers.length > 0) { - var queryParams = { - geometry: evt['coordinate'].join(','), - geometryType: 'esriGeometryPoint', - layers: 'all', - sr: _this._map.getView().getProjection().getCode().split(':')[1], - mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','), - imageDisplay: _this._map.getSize().join(',') + ',96', - returnGeometry: true, - tolerance: 15, - f: 'pjson' - }; - for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) { - var l = _a[_i]; - l.getPopupInfo(queryParams); - } - } - var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']); - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - for (var i = 0; i < layerFeatureObjectArray.length; i++) { - var featObj = layerFeatureObjectArray[i]; - var props = featObj.feature.getProperties(); - var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent); - //skip if return was false - if (popupContentResponse === false) { - //continue; - } - else if (typeof popupContentResponse == 'string') { - featObj.popupContent = popupContentResponse; - _this._passThroughLayerFeatureArray.push(featObj); - } - else { - featObj.selectionLayer.getSource().addFeature(featObj.feature); - } - } - _this._popupContentLength = _this._passThroughLayerFeatureArray.length; - _this._currentPopupIndex = -1; - var popupHtml = '<div class="ol-popup-nav">'; - popupHtml += '<span class="previous-popup ol-popup-nav-arrow">◀</span>'; - popupHtml += '<span class="next-popup ol-popup-nav-arrow">▶</span>'; - popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>"; - popupHtml += "<span> of </span>"; - popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>"; - popupHtml += "<span> - </span>"; - popupHtml += "<span class=\"current-popup-layer-name\"></span>"; - popupHtml += '</div>'; - popupHtml += '<div class="ol-popup-inner">'; - popupHtml += '</div>'; - _this._$popupContent.html(popupHtml); - _this._$popupContent.find('.previous-popup').click(function () { - if (_this._popupContentLength == 1) { - return; - } - if (_this._currentPopupIndex == 0) { - _this._currentPopupIndex = _this._popupContentLength - 1; - } - else { - _this._currentPopupIndex--; - } - _this._triggerFeatSelect(); - }); - var nextPopup = _this._$popupContent.find('.next-popup'); - nextPopup.click(function () { - if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) { - return; - } - if (_this._currentPopupIndex == _this._popupContentLength - 1) { - _this._currentPopupIndex = 0; - } - else { - _this._currentPopupIndex++; - } - _this._triggerFeatSelect(); - }); - if (_this._popupContentLength > 0) { - nextPopup.trigger('click'); - _this._popupOverlay.setPosition(_this._popupCoordinate); - _this._$popupContent.scrollTop(0); - _this._popupOpen = true; - } - }); - //change mouse cursor when over marker - this._map.on('pointermove', function (evt) { - if (evt['dragging']) { - return; - } - var pixel = _this.map.getEventPixel(evt['originalEvent']); - var hit = false; - _this.map.forEachLayerAtPixel(pixel, function (lyr) { - if (hit) { - return; - } - for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) { - var vLyr = _a[_i]; - if (vLyr.olLayer == lyr) { - hit = true; - break; - } - } - }); - var mapElement = _this.map.getTargetElement(); - mapElement.style.cursor = hit ? 'pointer' : ''; - }); - }; - /** - * helper to select features - * @private - */ - MapPopupCls.prototype._triggerFeatSelect = function () { - var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number'); - var $innerPopup = this._$popupContent.find('.ol-popup-inner'); - var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name'); - this.clearSelection(); - var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex]; - $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed()); - $layerNameSpan.html(lyrFeatObj.layerName); - $innerPopup.html(lyrFeatObj.popupContent); - lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature); - for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(this._$popupContent); - } - }; - /** - * - * @param feature - the ol feature - * @param {LayerEsriMapServer} lyr - the map server layer - * @param {string} popupContent - popup content - * @param {string} esriName - esri layer name - */ - MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) { - var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName); - featLayerObject.popupContent = popupContent; - this._passThroughLayerFeatureArray.push(featLayerObject); - this._popupContentLength++; - $('.popup-content-length').html(this._popupContentLength.toFixed()); - if (!this._popupOpen) { - this._$popupContent.find('.next-popup').trigger('click'); - this._popupOverlay.setPosition(this._popupCoordinate); - this._$popupContent.scrollTop(0); - this._popupOpen = true; - } - }; - /** - * - * @param pixel - the ol pixel - * @returns feature layer properties - * @private - */ - MapPopupCls.prototype._featuresAtPixel = function (pixel) { - var _this = this; - var layerFeatureObjectArray = []; - this.map.forEachFeatureAtPixel(pixel, function (feature, layer) { - var hasLyr = false; - var j; - var lyr = null; - for (j = 0; j < _this._arrPopupLayers.length; j++) { - lyr = _this._arrPopupLayers[j]; - if (lyr.olLayer === layer) { - hasLyr = true; - break; - } - } - if (hasLyr) { - layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j])); - } - }); - return layerFeatureObjectArray; - }; - MapPopupCls.prototype.closePopup = function () { - this._checkInit(); - this._popupOpen = false; - this._popupOverlay.setPosition(undefined); - this._$popupCloser[0].blur(); - this.clearSelection(); - this._$popupContent.html(''); - return false; - }; - ; - /** - * - * @param chgFunction - popup change function - */ - MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) { - this._popupChangedFunctions.push(chgFunction); - }; - /** - * - * @param {LayerBase|*} lyr - the layer being acted on - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns the new selection layer - * @private - */ - MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) { - this._checkInit(); - selectionStyle = selectionStyle || {}; - selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)'; - selectionStyle.width = selectionStyle.width || 10; - var theStyle; - if (selectionStyle.olStyle) { - theStyle = selectionStyle.olStyle; - } - else { - theStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: selectionStyle.color, - width: selectionStyle.width - }), - image: new ol.style.Circle({ - radius: 7, - fill: new ol.style.Fill({ color: selectionStyle.color }), - stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 }) - }), - fill: new ol.style.Fill({ - color: selectionStyle.color - }) - }); - } - var selectionLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: theStyle - }); - selectionLayer.setZIndex(100); - this._selectionLayers.push(selectionLayer); - this._selectionLayerLookup[lyr.id] = selectionLayer; - this.map.addLayer(selectionLayer); - return selectionLayer; - }; - /** - * Add popup to the map - * @param {LayerBase|*} lyr The layer that the popup with act on - * @param {popupCallback} popupContentFunction - popup content function that makes popup info - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._arrPopupLayerIds.push(lyr.id); - this._arrPopupLayers.push(lyr); - // this._arrPopupOlLayers.push(lyr.olLayer); - this._arrPopupContentFunction.push(popupContentFunction); - return selectionLayer; - }; - ; - /** - * - * @param {LayerBase} lyr - layer - */ - MapPopupCls.prototype.removeVectorPopup = function (lyr) { - var idx = this._arrPopupLayerIds.indexOf(lyr.id); - if (idx > -1) { - this._arrPopupLayerIds.splice(idx, 1); - this._arrPopupLayers.splice(idx, 1); - // this._arrPopupOlLayers.splice(idx, 1); - this._arrPopupContentFunction.splice(idx, 1); - this._selectionLayers.splice(idx, 1); - delete this._selectionLayerLookup[lyr.id]; - } - }; - /** - * - * @param {LayerEsriMapServer} lyr - map server layer - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._esriMapServiceLayers.push(lyr); - return selectionLayer; - }; - MapPopupCls.prototype.clearSelection = function () { - this._checkInit(); - for (var i = 0; i < this._selectionLayers.length; i++) { - this._selectionLayers[i].getSource().clear(); - } - for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(); - } - }; - ; - /** - * Add a function to be called when the map is clicked but before any popups are implemented - * @param {function} func - the map click function - */ - MapPopupCls.prototype.addMapClickFunction = function (func) { - this._mapClickFunctions.push(func); - }; - return MapPopupCls; -}(mapInteractionBase_1.default)); -exports.MapPopupCls = MapPopupCls; -nm.MapPopupCls = MapPopupCls; -exports.default = MapPopupCls; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var geocode_1 = __webpack_require__(11); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param [options={}] config options - * @param [options.divId=map] map div id - * @param [options.center={}] center config object - * @param [options.center.x=-10018378] center x, web mercator x or lon - * @param [options.center.y=5574910] center y, web mercator y or lat - * @param [options.zoom=7] zoom level - * @param [options.minZoom=undefined] min zoom - * @param [options.maxZoom=undefined] max zoom - * @param [options.baseSwitcher=true] if add base map switcher - * @param [options.fullScreen=false] if add base map switcher - * @returns the ol map - */ -function quickMapBase(options) { - if (options === void 0) { options = {}; } - options.divId = options.divId || 'map'; - options.center = options.center || { x: -10018378, y: 5574910 }; - options.zoom = typeof options.zoom == 'number' ? options.zoom : 7; - options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true; - options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false; - options.addGeocode = options.addGeocode || false; - var $mapDiv = $('#' + options.divId); - $mapDiv.css('position', 'relative'); - var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); - // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})}); - var osmCss = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpul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TWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdR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4SvZizyDH+0reDHp92iO0BuX3bCfItl0PEwvYLqpwXG2MHlGsQ4S8pMJZv1JGmHiEoHQDdOjwmVlEP/nE9ADKjI8xLI0OOGITfy0SbeG/C2jKUDGSlDhM9I3IpK9iup6XnbRNC7yqueNsJCCIiXzdQhnaGN+46umnEdy5U5UbUJ48LFM9GkJo8BdDOiAZ7ZIQbKhYLMqvhU2wmNxjEAsS2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')"; - if (options.baseSwitcher) { - // let switcherContent = '<div class="base-map-switcher" title="Toggle Base Layer" style="'; - // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; '; - // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`; - // switcherContent += '"></div>'; - // $mapDiv.append(switcherContent); - // - // $mapDiv.find('.base-map-switcher').click(function() { - // "use strict"; - // osmLayer.setVisible(!osmLayer.getVisible()); - // satLayer.setVisible(!satLayer.getVisible()); - // - // if (osmLayer.getVisible()){ - // $(this).css('background', aerialCss); - // } else { - // $(this).css('background', osmCss); - // } - // }); - } - if (options.zoom < 0 || options.zoom > 28) { - throw 'zoom out of range'; - } - if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) { - var p = new ol.geom.Point([options.center.x, options.center.y]); - new ol.proj.Projection({ code: "EPSG:4326" }); - p.transform(new ol.proj.Projection({ code: "EPSG:4326" }), new ol.proj.Projection({ code: "EPSG:3857" })); - var coordinates = p.getCoordinates(); - options.center.x = coordinates[0]; - options.center.y = coordinates[1]; - } - var controls = ol.control.defaults({ - attributionOptions: { collapsible: false } - }); - var view = new ol.View({ - center: [options.center.x, options.center.y], - zoom: options.zoom, - minZoom: options.minZoom, - maxZoom: options.maxZoom - }); - var map = new ol.Map({ - layers: [osmLayer], - target: options.divId, - controls: controls, - view: view - }); - if (options.fullScreen) { - map.addControl(new ol.control.FullScreen({})); - } - if (options.addGeocode) { - new geocode_1.Geocode(document.getElementById(options.divId), map); - } - return map; -} -exports.quickMapBase = quickMapBase; -nm.quickMapBase = quickMapBase; -exports.default = quickMapBase; - - -/***/ }), -/* 15 */, -/* 16 */, -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/14/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers.zoomResolutionConvert'); -var _zoomResLookup = [ - 156543.03392804097, - 78271.51696402048, - 39135.75848201024, - 19567.87924100512, - 9783.93962050256, - 4891.96981025128, - 2445.98490512564, - 1222.99245256282, - 611.49622628141, - 305.748113140705, - 152.8740565703525, - 76.43702828517625, - 38.21851414258813, - 19.109257071294063, - 9.554628535647032, - 4.777314267823516, - 2.388657133911758, - 1.194328566955879, - 0.5971642834779395, - 0.29858214173896974, - 0.14929107086948487, - 0.07464553543474244, - 0.03732276771737122, - 0.01866138385868561, - 0.009330691929342804, - 0.004665345964671402, - 0.002332672982335701, - 0.0011663364911678506, - 0.0005831682455839253 //28 -]; -/** - * Get the resolution given the zoom level - * @param {number} zoomLevel - the zoom level - * @returns {number|*} the map resolution - */ -function zoomToResolution(zoomLevel) { - "use strict"; - if (typeof zoomLevel == 'number') { - if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) { - return _zoomResLookup[zoomLevel]; - } - else { - console.log("invalid zoom level provided: " + zoomLevel); - return undefined; - } - } - else { - return undefined; - } -} -exports.zoomToResolution = zoomToResolution; -nm.zoomToResolution = zoomToResolution; -/** - * Get resolution from the zoom level - * @param {number} resolution - the resolution - * @returns {number|*} the zoom level - */ -function resolutionToZoom(resolution) { - for (var i = 0; i < _zoomResLookup.length; i++) { - if (resolution >= _zoomResLookup[i]) { - return i; - } - } - return 0; -} -exports.resolutionToZoom = resolutionToZoom; -nm.resolutionToZoom = resolutionToZoom; - - -/***/ }), -/* 18 */, -/* 19 */, -/* 20 */, -/* 21 */, -/* 22 */, -/* 23 */, -/* 24 */, -/* 25 */, -/* 26 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/7/2015. - */ -var LayerBase_1 = __webpack_require__(10); -var esriToOl = __webpack_require__(28); -var mapPopup_1 = __webpack_require__(7); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * Helper to return the url to the service on the production server - * @param {string} folder - * @param {string} service - * @returns {string} - */ -function makeServiceUrl(folder, service) { - return "https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/" + folder + "/" + service + "/MapServer"; -} -exports.makeServiceUrl = makeServiceUrl; -function localCacheUrl(folder, service) { - var loc = window.location.href; - var url = "/mapserver/" + folder + "/" + service; - if (loc.indexOf('transportal.cee.wisc.edu') > -1) { - if (loc.toLowerCase().indexOf('webmapsstage') > -1) { - url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url; - } - else { - url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url; - } - } - return url; -} -exports.localCacheUrl = localCacheUrl; -/** - * esri mapserver layer - * @augments LayerBase - */ -var LayerEsriMapServer = (function (_super) { - __extends(LayerEsriMapServer, _super); - /** - * The base layer for all others - * @param {string} url - resource url - * @param {object} [options] - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * @param {boolean} [options.addPopup=false] if a popup should be added - * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added - */ - function LayerEsriMapServer(url, options) { - if (options === void 0) { options = {}; } - var _this = _super.call(this, url, options) || this; - _this._source = new ol.source.TileArcGISRest({ - url: _this.url == '' ? undefined : _this.url, - params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') } - }); - _this._showLayers = options.showLayers || []; - _this._olLayer = new ol.layer.Tile({ - source: _this._source, - visible: _this.visible, - opacity: _this.opacity, - minResolution: _this._minResolution, - maxResolution: _this._maxResolution - }); - _this._olLayer.setZIndex(_this._zIndex); - options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false; - _this._esriFormat = new ol.format.EsriJSON(); - _this._popupRequest = null; - options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true; - if (options.getLegend) { - _this.addLegendContent(); - } - if (options.addPopup) { - mapPopup_1.default.addMapServicePopup(_this); - } - return _this; - } - /** - * add additional content to the legend - * @param {string} [additionalContent=''] additional content for legend - */ - LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) { - var _this = this; - var urlCopy = this.url; - if (urlCopy[urlCopy.length - 1] !== '/') { - urlCopy += '/'; - } - urlCopy += 'legend?f=pjson&callback=?'; - $.get(urlCopy, {}, function (d) { - var newHtml = esriToOl.makeMapServiceLegend(d, _this._showLayers); - _super.prototype.addLegendContent.call(_this, newHtml); - }, 'json'); - }; - LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) { - if (!this.visible) { - return; - } - var urlCopy = this.url; - if (urlCopy[urlCopy.length - 1] != '/') { - urlCopy += '/'; - } - urlCopy += 'identify?callback=?'; - var __this = this; - if (this._popupRequest != null) { - this._popupRequest.abort(); - } - this._popupRequest = $.get(urlCopy, queryParams, function (d) { - for (var _i = 0, _a = d['results']; _i < _a.length; _i++) { - var r = _a[_i]; - var popupHtml = '<table class="esri-popup-table">'; - for (var a in r['attributes']) { - if (r['attributes'].hasOwnProperty(a)) { - var attrVal = r['attributes'][a]; - if (attrVal == null || attrVal.toString().toLowerCase() == 'null') { - continue; - } - var attr = a; - if (attr.length > 14) { - attr = attr.slice(0, 11) + '...'; - } - popupHtml += "<tr><td>" + attr + "</td><td>" + attrVal + "</td></tr>"; - } - } - popupHtml += '</table>'; - mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']); - } - }, 'json'); - this._popupRequest.always(function () { - __this._popupRequest = null; - }); - }; - Object.defineProperty(LayerEsriMapServer.prototype, "source", { - /** - * - * @returns {ol.source.TileArcGISRest} the vector source - */ - get: function () { - return _super.prototype.getSource.call(this); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerEsriMapServer.prototype, "olLayer", { - /** - * - * @returns the ol layer - */ - get: function () { - return _super.prototype.getOlLayer.call(this); - }, - enumerable: true, - configurable: true - }); - return LayerEsriMapServer; -}(LayerBase_1.LayerBase)); -exports.LayerEsriMapServer = LayerEsriMapServer; -nm.LayerEsriMapServer = LayerEsriMapServer; -exports.default = LayerEsriMapServer; - - -/***/ }), -/* 27 */, -/* 28 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 1/4/2016. - */ -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var nm = provide_1.default('olHelpers.esriToOlStyle'); -/** - * - * @param {Array<number>} colorArray - input color array - * @param {number} opacity - the opacity 0 to 1 - * @returns {string} rgba string - * @private - */ -function _colorArrayToRgba(colorArray, opacity) { - "use strict"; - return "rgba(" + colorArray[0] + "," + colorArray[1] + "," + colorArray[2] + "," + opacity + ")"; -} -/** - * escape html charcters - * @param {string} str - input string - * @returns {string} escaped string - */ -function htmlEscape(str) { - return String(str) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/</g, '<') - .replace(/>/g, '>'); -} -nm.htmlEscape = htmlEscape; -var CommonSymbol = (function () { - /** - * - * @param symbolObj - * @param {number} opacity - */ - function CommonSymbol(symbolObj, opacity) { - this.symbolObj = symbolObj; - this.opacity = opacity; - this.olStyle = undefined; - this.legendHtml = ''; - } - return CommonSymbol; -}()); -var PointSymbol = (function (_super) { - __extends(PointSymbol, _super); - function PointSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj.type) { - case 'esriSMS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity); - var outlineWidth = _this.symbolObj.outline.width; - var radius = _this.symbolObj.size; - _this.olStyle = new ol.style.Style({ - image: new ol.style.Circle({ - radius: radius, - fill: new ol.style.Fill({ - color: innerColor - }), - stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth }) - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" style=\"color: " + innerColor + "\">●</span>"; - break; - case 'esriPMS': - _this.olStyle = new ol.style.Style({ - image: new ol.style.Icon({ src: "data:image/png;base64," + _this.symbolObj['imageData'] }) - }); - _this.legendHtml = "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + _this.symbolObj['imageData'] + "\">"; - break; - default: - console.log(_this.symbolObj); - alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return PointSymbol; -}(CommonSymbol)); -var LineSymbol = (function (_super) { - __extends(LineSymbol, _super); - function LineSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj.type) { - case 'esriSLS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var lineWidth = _this.symbolObj.width; - _this.olStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: innerColor, - //lineDash: [4], - width: lineWidth - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" "; - _this.legendHtml += "style=\""; - _this.legendHtml += "background-color: " + innerColor + ";"; - _this.legendHtml += "width: 40px;"; - _this.legendHtml += "height: 4px;"; - _this.legendHtml += "position: relative;"; - _this.legendHtml += "display: inline-block;"; - _this.legendHtml += "top: -1px;"; - _this.legendHtml += "\"></span>"; - break; - default: - console.log(_this.symbolObj); - alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return LineSymbol; -}(CommonSymbol)); -var PolygonSymbol = (function (_super) { - __extends(PolygonSymbol, _super); - function PolygonSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj['type']) { - case 'esriSFS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity); - var outlineWidth = _this.symbolObj.outline.width; - _this.olStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: outerColor, - //lineDash: [4], - width: outlineWidth - }), - fill: new ol.style.Fill({ - color: innerColor - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" "; - _this.legendHtml += "style=\""; - _this.legendHtml += "background-color: " + innerColor + ";"; - _this.legendHtml += "border: solid " + outerColor + " 1px;"; - _this.legendHtml += "width: 40px;"; - _this.legendHtml += "height: 9px;"; - _this.legendHtml += "position: relative;"; - _this.legendHtml += "display: inline-block;"; - _this.legendHtml += "top: 2px;"; - _this.legendHtml += "\"></span>"; - break; - default: - console.log(_this.symbolObj); - alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return PolygonSymbol; -}(CommonSymbol)); -var SymbolGenerator = (function () { - function SymbolGenerator(esriResponse) { - this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100; - this.renderer = esriResponse.drawingInfo.renderer; - this.olStyle = undefined; - this.legendHtml = ''; - } - return SymbolGenerator; -}()); -var SingleSymbol = (function (_super) { - __extends(SingleSymbol, _super); - /** - * - * @param {object} esriResponse - layer info - * @param SymbolClass - the symbol class to use - */ - function SingleSymbol(esriResponse, SymbolClass) { - var _this = _super.call(this, esriResponse) || this; - _this.symbol = _this.renderer.symbol; - var symbolObj = new SymbolClass(_this.symbol, _this.opacity); - _this.olStyle = symbolObj.olStyle; - _this.legendHtml = symbolObj.legendHtml; - return _this; - } - return SingleSymbol; -}(SymbolGenerator)); -var UniqueValueSymbol = (function (_super) { - __extends(UniqueValueSymbol, _super); - /** - * - * @param {object} esriResponse - layer info - * @param SymbolClass - the Symbol class definition - */ - function UniqueValueSymbol(esriResponse, SymbolClass) { - var _this = _super.call(this, esriResponse) || this; - _this.uniqueValueInfos = _this.renderer.uniqueValueInfos; - _this.propertyName = _this.renderer.field1; - _this.defaultSymbol = _this.renderer.defaultSymbol; - if (_this.defaultSymbol) { - var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity); - _this.defaultStyle = symbolObj.olStyle; - _this.defaultLabelHtml = "<span class=\"legend-layer-subitem\">" + htmlEscape(_this.renderer['defaultLabel']) + "</span>" + symbolObj.legendHtml; - } - else { - _this.defaultStyle = undefined; - _this.defaultLabelHtml = 'other'; - } - _this.valueArray = []; - _this.labelArray = []; - _this.legendArray = []; - _this.propertyStyleLookup = {}; - for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) { - var uniqueVal = _a[_i]; - _this.labelArray.push(uniqueVal['label']); - _this.valueArray.push(uniqueVal['value']); - var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity); - _this.legendArray.push("<span class=\"legend-layer-subitem\">" + htmlEscape(uniqueVal['label']) + "</span>" + uniqueSym.legendHtml); - _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle; - } - _this.olStyle = function (feature) { - var checkProperties = feature.getProperties(); - var checkProperty = checkProperties[_this.propertyName]; - if (_this.propertyStyleLookup[checkProperty] !== undefined) { - return [_this.propertyStyleLookup[checkProperty]]; - } - else { - return [_this.defaultStyle]; - } - }; - if (_this.defaultLabelHtml !== null) { - _this.legendArray.push(_this.defaultLabelHtml); - } - _this.legendHtml = '<ul>'; - for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) { - var h = _c[_b]; - _this.legendHtml += "<li>" + h + "</li>"; - } - _this.legendHtml += '</ul>'; - return _this; - } - return UniqueValueSymbol; -}(SymbolGenerator)); -function makeFeatureServiceLegendAndSymbol(esriResponse) { - "use strict"; - var renderer = esriResponse.drawingInfo.renderer; - var symbolLegendOut = null; - switch (renderer.type) { - case 'simple': - switch (esriResponse.geometryType) { - case 'esriGeometryPoint': - symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol); - break; - case 'esriGeometryPolyline': - symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol); - break; - case 'esriGeometryPolygon': - symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol); - break; - default: - console.log(esriResponse); - alert(esriResponse.geometryType + ' not handled'); - } - break; - case 'uniqueValue': - switch (esriResponse.geometryType) { - case 'esriGeometryPoint': - symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol); - break; - case 'esriGeometryPolyline': - symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol); - break; - case 'esriGeometryPolygon': - symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol); - break; - default: - console.log(esriResponse); - alert(esriResponse['geometryType'] + ' not handled'); - } - break; - default: - alert('not handled renderer type: ' + renderer['type']); - } - if (symbolLegendOut == null) { - return { style: undefined, legend: '' }; - } - else { - return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml }; - } -} -exports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol; -nm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol; -/** - * - * @param {object} lyrObject - the layer as defined in the response - * @param {boolean} [skipLayerNameAndExpander=false] use only icons - * @returns {string} legend html - */ -function mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) { - if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; } - skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false; - var layerName = lyrObject['layerName']; - var legendItems = lyrObject['legend']; - var legendHtml = ''; - if (!skipLayerNameAndExpander) { - legendHtml += "<span class=\"legend-layer-subitem\">" + layerName + "</span>"; - } - if (legendItems.length == 1) { - legendHtml = "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + legendItems[0]['imageData'] + "\">"; - } - else { - if (!skipLayerNameAndExpander) { - legendHtml += '<span class="legend-items-expander" title="Expand/Collapse">▼</span>'; - } - legendHtml += '<ul>'; - for (var i = 0; i < legendItems.length; i++) { - legendHtml += "<li>"; - legendHtml += "<span class=\"legend-layer-subitem\">" + htmlEscape(legendItems[i]['label']) + "</span>"; - legendHtml += "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + legendItems[i]['imageData'] + "\">"; - legendHtml += "</li>"; - } - legendHtml += '</ul>'; - } - if (!skipLayerNameAndExpander) { - legendHtml = "<span class=\"legend-layer-subitem\">" + layerName + "</span>" + legendHtml; - } - return legendHtml; -} -/** - * make map service legent - * @param {object} esriResponse - layer info - * @param showLayers - limited number of layers to show in map service - * @returns {string} legend content - */ -function makeMapServiceLegend(esriResponse, showLayers) { - "use strict"; - if (showLayers === void 0) { showLayers = []; } - var newLegendHtml = ''; - var layers = esriResponse['layers']; - if (layers.length == 1) { - newLegendHtml += mapServiceLegendItem(layers[0], true); - } - else { - newLegendHtml += '<ul>'; - for (var i = 0; i < layers.length; i++) { - if (showLayers.length > 0 && showLayers.indexOf(i) < 0) { - continue; - } - newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>'; - } - newLegendHtml += '</ul>'; - } - return newLegendHtml; -} -exports.makeMapServiceLegend = makeMapServiceLegend; -nm.makeMapServiceLegend = makeMapServiceLegend; - - -/***/ }), -/* 29 */, -/* 30 */, -/* 31 */, -/* 32 */, -/* 33 */, -/* 34 */, -/* 35 */, -/* 36 */, -/* 37 */, -/* 38 */, -/* 39 */, -/* 40 */, -/* 41 */, -/* 42 */, -/* 43 */, -/* 44 */, -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBase_1 = __webpack_require__(10); -var mapMove_1 = __webpack_require__(6); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The Vector layer base - * @augments LayerBase - * @abstract - */ -var LayerBaseVector = (function (_super) { - __extends(LayerBaseVector, _super); - /** - * The base vector layer - * @param {string} url - pass an empty string to prevent default load and add from a json source - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible - * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined - * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move - * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called - * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params - * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages - * - */ - function LayerBaseVector(url, options) { - if (options === void 0) { options = {}; } - var _this = _super.call(this, url, options) || this; - options = options; - //prevent regular load if no url has been provided - if (_this.url.trim() == '') { - _this._loaded = true; - } - _this._style = typeof options.style == 'undefined' ? undefined : options.style; - if (_this.visible) { - _this._autoLoad = true; - } - else { - _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false); - } - _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false; - _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300; - if (options.mapMoveObj) { - _this._mapMove = options.mapMoveObj; - } - else { - _this._mapMove = _this._onDemand ? mapMove_1.default : undefined; - } - _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams : - function () { return {}; }; - if (_this._onDemand) { - _this._loaded = true; - _this._mapMoveParams = {}; - _this._mapMove.checkInit(); - _this._mapMove.addVectorLayer(_this); - } - _this._source = new ol.source.Vector(); - _this._olLayer = new ol.layer.Vector({ - source: _this._source, - visible: _this.visible, - style: _this.style, - minResolution: _this._minResolution, - maxResolution: _this._maxResolution, - renderOrder: options.renderOrder - }); - _this.olLayer.setZIndex(_this._zIndex); - _this._projectionMap = null; - _this._projection4326 = new ol.proj.Projection({ code: "EPSG:4326" }); - _this._olLayer.setOpacity(_this.opacity); - return _this; - } - /** - * dummy to be overridden - * @param {object} featureCollection - geojson or esrijson object - */ - LayerBaseVector.prototype.addFeatures = function (featureCollection) { - console.log('Layer vector base addFeatures is a placeholder and does nothing'); - }; - /** - * Before call to map move callback, can prevent call by returning false - * @param {number} zoom - zoom level - * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution' - * @returns {boolean} if the call should proceed - */ - LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) { - if (this.minZoom !== undefined) { - if (zoom < this.minZoom) { - return false; - } - } - if (this.maxZoom !== undefined) { - if (zoom > this.maxZoom) { - return false; - } - } - return this.visible; - }; - /** - * callback to generate the parameters passed in the get request - * @param {object} extent - extent object - * @param {number} extent.minX - minX - * @param {number} extent.minY - minY - * @param {number} extent.maxX - maxX - * @param {number} extent.maxY - maxY - * @param {number} zoomLevel - zoom level - */ - LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) { - this._mapMoveParams = {}; - $.extend(this._mapMoveParams, this.params); - $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel)); - }; - /** - * callback function on map move - * @param {object} d - the json response - */ - LayerBaseVector.prototype.mapMoveCallback = function (d) { - if (this.source) { - this._source.clear(); - } - }; - /** - * clear features in the layer - */ - LayerBaseVector.prototype.clear = function () { - if (this._source) { - this._source.clear(); - } - }; - Object.defineProperty(LayerBaseVector.prototype, "onDemandDelay", { - /** - * get on demand delay in miliseconds - */ - get: function () { - return this._onDemandDelay; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "autoLoad", { - /** - * get if the layer is autoloaded - */ - get: function () { - return this._autoLoad; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "style", { - /** - * get the style definition - */ - get: function () { - return this._style; - }, - /** - * set the style - * @param style - the style or function - */ - set: function (style) { - this._style = style; - this.olLayer.setStyle(this._style); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapCrs", { - /** - * get the map CRS if it is defined by the map move object - */ - get: function () { - return this.mapProj == null ? null : this.mapProj.getCode(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapProj", { - get: function () { - if (this._projectionMap != null) { - return this._projectionMap; - } - if (this._mapMove) { - this._projectionMap = this._mapMove.map.getView().getProjection(); - return this._projectionMap; - } - else { - return null; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapMove", { - /** - * get the map move object - * @type {MapMoveCls|*} - */ - get: function () { - return this._mapMove; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapMoveParams", { - /** - * map move params - * @type {object} - */ - get: function () { - return this._mapMoveParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "visible", { - get: function () { - return this._visible; - }, - /** - * Set the layer visibility - * @type {boolean} - * @override - */ - set: function (visibility) { - _super.prototype.setVisible.call(this, visibility); - if (this._onDemand) { - this.mapMove.triggerLyrLoad(this); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "source", { - /** - * get the layer vector source - * @override - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "features", { - /** - * array of ol features - */ - get: function () { - return this.source.getFeatures(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "olLayer", { - /** - * - */ - get: function () { - return _super.prototype.getOlLayer.call(this); - }, - enumerable: true, - configurable: true - }); - LayerBaseVector.prototype.setZIndex = function (newZ) { - this.olLayer.setZIndex(newZ); - }; - return LayerBaseVector; -}(LayerBase_1.LayerBase)); -exports.LayerBaseVector = LayerBaseVector; -nm.LayerBaseVector = LayerBaseVector; -exports.default = LayerBaseVector; - - -/***/ }), -/* 46 */, -/* 47 */, -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/2/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var range_change_1 = __webpack_require__(52); -var $ = __webpack_require__(1); -var nm = provide_1.default('domUtil'); -/** - * @callback mediaCallback - * @param {number} tm - */ -function timeToLocalDateString(tm) { - "use strict"; - var d = new Date(tm); - var p1 = d.toLocaleTimeString().split(' '); - var p2 = p1[0].split(':'); - p2 = p2.slice(0, 2); - return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1]; -} -var MediaControl = (function () { - /** - * - * @param element - * @param changeFunc - * @param mediaConfig - */ - function MediaControl(element, changeFunc, mediaConfig) { - if (changeFunc === void 0) { changeFunc = function () { - return; - }; } - if (mediaConfig === void 0) { mediaConfig = {}; } - var _this = this; - mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0; - mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100; - mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0; - mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5; - mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500; - mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false; - if (typeof element == 'string') { - this._container = $('#' + element); - } - else if (typeof element.style !== 'undefined') { - this._container = $(element); - } - else { - this._container = element; - } - this._container.addClass('media-control-container'); - this._playInterval = mediaConfig.playInterval; - this._changeFunc = changeFunc; - this._showAsDate = mediaConfig.showAsDate; - this._currentValue = undefined; - this._min = undefined; - this._max = undefined; - this._step = undefined; - this._playing = false; - var htmlStr = '<span class="media-player-button media-back"></span>' + - '<span class="media-player-button media-play"></span>' + - '<span class="media-player-button media-pause media-disabled"></span>' + - '<span class="media-player-button media-stop media-disabled" ></span>' + - '<span class="media-player-button media-ahead"></span>' + - "<input type=\"range\">" + - "<div class=\"media-control-value-label-container\">" + - "<span class=\"media-control-value-label-min\"></span>" + - "<span class=\"media-control-value-label-val\"></span>" + - "<span class=\"media-control-value-label-max\"></span>" + - "</div>"; - this._container.append(htmlStr); - // let btnPause = this._container.find('.media-pause'); - var btnPlay = this._container.find('.media-play'); - this._$btnStop = this._container.find('.media-stop'); - var btnAhead = this._container.find('.media-ahead'); - var btnBack = this._container.find('.media-back'); - this._$slider = this._container.find('input[type=range]'); - this._$valLabelMin = this._container.find('.media-control-value-label-min'); - this._$valLabelVal = this._container.find('.media-control-value-label-val'); - this._$valLabelMax = this._container.find('.media-control-value-label-max'); - this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step); - range_change_1.rangeChange(this._$slider, function (newVal) { - _this.currentValue = newVal; - }, 100); - var ___this = this; - btnPlay.click(function () { - var $this = $(this); - $this.addClass('media-disabled'); - ___this._$btnStop.removeClass('media-disabled'); - btnAhead.addClass('media-locked'); - btnBack.addClass('media-locked'); - ___this._$slider.prop('disabled', true); - ___this._playing = true; - ___this._interval = setInterval(function () { - ___this.currentValue += ___this._step; - }, ___this._playInterval); - }); - this._$btnStop.click(function () { - clearInterval(___this._interval); - var $this = $(this); - $this.addClass('media-disabled'); - btnPlay.removeClass('media-disabled'); - btnAhead.removeClass('media-locked'); - btnBack.removeClass('media-locked'); - ___this._$slider.prop('disabled', false); - ___this._playing = false; - }); - btnAhead.click(function () { - ___this.currentValue = ___this.currentValue + ___this._step; - }); - btnBack.click(function () { - ___this.currentValue = ___this.currentValue - ___this._step; - }); - } - MediaControl.prototype.stopPlaying = function () { - if (this._playing) { - this._$btnStop.trigger('click'); - } - }; - Object.defineProperty(MediaControl.prototype, "playing", { - get: function () { - return this._playing; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "min", { - get: function () { - return this._min; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "max", { - get: function () { - return this._max; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "step", { - get: function () { - return this._step; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "currentValue", { - get: function () { - return this._currentValue; - }, - set: function (newValue) { - if (newValue > this._max) { - newValue = this._min; - } - else if (newValue < this._min) { - newValue = this._max; - } - this._currentValue = newValue; - this._$slider.val(this._currentValue.toFixed(2)); - if (this._showAsDate) { - this._$valLabelVal.html(timeToLocalDateString(this.currentValue)); - } - else { - this._$valLabelVal.html(this.currentValue.toString()); - } - this._changeFunc(newValue); - }, - enumerable: true, - configurable: true - }); - /** - * set min and max value with step - * @param {number} newMin the new min - * @param {number} newMax the new mas - * @param {number} [newValue=newMin] the value to set - * @param {number} [newStep=(newMax-newMin)/20] step value - */ - MediaControl.prototype.setMinMaxValueStep = function (newMin, newMax, newValue, newStep) { - this._min = newMin; - this._max = newMax; - newValue = typeof newValue == 'number' ? newValue : newMin; - newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20; - this._currentValue = newValue; - this._step = newStep; - this._$slider.prop('min', this.min.toString()); - this._$slider.prop('max', this.max.toString()); - this._$slider.prop('step', this.step.toString()); - this._$slider.val(this.currentValue.toString()); - if (this._showAsDate) { - this._$valLabelMin.html(timeToLocalDateString(this._min)); - this._$valLabelVal.html(timeToLocalDateString(this.currentValue)); - this._$valLabelMax.html(timeToLocalDateString(this._max)); - } - else { - this._$valLabelMin.html(this._min.toString()); - this._$valLabelVal.html(this.currentValue.toString()); - this._$valLabelMax.html(this._max.toString()); - } - }; - Object.defineProperty(MediaControl.prototype, "changeFunction", { - /** - * - * @param {mediaCallback} newFunc the callback on change - */ - set: function (newFunc) { - this._changeFunc = newFunc; - }, - enumerable: true, - configurable: true - }); - return MediaControl; -}()); -exports.MediaControl = MediaControl; -nm.MediaControl = MediaControl; - - -/***/ }), -/* 49 */, -/* 50 */, -/* 51 */, -/* 52 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('domUtil'); -var mouseIn = false; -var mouseDown = false; -var timeout = null; -var dragged = false; -var lastVal; -/** - * Created by gavorhes on 11/2/2015. - */ -function triggerCallback(callback, evt) { - "use strict"; - var val = parseFloat(this.value); - var min = parseFloat(this.min); - var max = parseFloat(this.max); - var step = parseFloat(this.step); - if (max - val < step) { - val = max; - } - var percent = (val - min) / (max - min); - if (typeof lastVal == 'number' && val == lastVal) { - return; - } - lastVal = val; - callback(val, percent, evt); -} -/** - * Add a variety of listeners for range inputs applied to a common callback - * @param $slider - jquery reference to the slider - * @param {rangeChangeCallback} callback - the callback - * @param {number} [changeTimeout=75] before the callback is called - * @this {jQuery} - * @returns {jQuery} the jQuery object - */ -function rangeChange($slider, callback, changeTimeout) { - changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75; - $slider.mouseenter(function () { - mouseIn = true; - }); - $slider.mouseleave(function () { - mouseIn = false; - mouseDown = false; - }); - $slider.mousedown(function () { - mouseDown = true; - }); - $slider.mouseup(function () { - mouseDown = false; - }); - $slider.mousemove( - /** - * - * @param {object} evt - event properties - * @this {HTMLElement} - */ - function (evt) { - if (!(mouseIn && mouseDown)) { - return; - } - dragged = true; - if (lastVal == this['value']) { - return; - } - lastVal = this['value']; - if (timeout != null) { - clearTimeout(timeout); - } - var _this = this; - timeout = setTimeout(function () { - triggerCallback.call(_this, callback, evt); - timeout = null; - }, changeTimeout); - }); - $slider.keyup( - /** - * - * @param {object} evt - event properties - */ - function (evt) { - if (evt.keyCode == 37 || evt.keyCode == 39) { - triggerCallback.call(this, callback, evt); - } - }); - $slider.change(function (evt) { - if (dragged) { - dragged = false; - return; - } - triggerCallback.call(this, callback, evt); - }); - return this; -} -exports.rangeChange = rangeChange; -nm.rangeChange = rangeChange; - - -/***/ }), -/* 53 */, -/* 54 */, -/* 55 */, -/* 56 */, -/* 57 */, -/* 58 */, -/* 59 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/2/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBaseVector_1 = __webpack_require__(45); -var esriToOl = __webpack_require__(28); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * Helper to return the url to the service on the production server - * @param {string} folder - * @param {string} service - * @param {number} layer - * @returns {string} - */ -function makeServiceUrl(folder, service, layer) { - return "https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/" + folder + "/" + service + "/MapServer/" + layer; -} -exports.makeServiceUrl = makeServiceUrl; -/** - * Base layer for esri vector layers - * @augments LayerBaseVector - */ -var LayerBaseVectorEsri = (function (_super) { - __extends(LayerBaseVectorEsri, _super); - /** - * The base vector layer - * @param {string} url - url for source - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible - * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined - * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move - * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called - * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages - * - * @param {string} [options.where=1=1] the layer filter clause - * @param {string} [options.outFields=*] comma separated list of output fields, defaults to all - * @param {string} [options.format=pjson] the format the retrieve the data - * @param {number} [options.outSR=3857] the output spatial reference, defaults to web mercator - * @param {boolean} [options.useEsriStyle=false] if the map service style should be used - * @param {boolean} [options.collapseLegend=false] if the legend should be initially collapsed - * @param {number} [options.mapMoveMakeGetParams=function(extent, zoomLevel){}] function to create additional map move params - */ - function LayerBaseVectorEsri(url, options) { - var _this = this; - if (typeof options.params != 'object') { - options.params = {}; - } - options.params['where'] = options.where || '1=1'; - options.params['outFields'] = options.outFields || '*'; - options.params['f'] = options.format || 'pjson'; - options.params['outSR'] = options.outSR || 3857; - _this = _super.call(this, url, options) || this; - _this._outSR = _this.params['outSR']; - _this._esriFormat = new ol.format.EsriJSON(); - if (_this._url[_this._url.length - 1] !== '/') { - _this._url += '/'; - } - _this._urlCopy = _this.url; - _this._url += 'query?callback=?'; - if (_this.autoLoad || _this.visible) { - _this._load(); - } - _this._useEsriStyle = typeof options.useEsriStyle == 'boolean' ? options.useEsriStyle : false; - if (_this._useEsriStyle) { - _this.addLegendContent(); - } - return _this; - } - /** - * add additional content to the legend - * @param {string} [additionalContent=''] additional content to add to legend - */ - LayerBaseVectorEsri.prototype.addLegendContent = function (additionalContent) { - var _this = this; - if (!this._useEsriStyle) { - _super.prototype.addLegendContent.call(this, additionalContent); - } - else { - $.get(this._urlCopy + '?f=pjson&callback=?', {}, function (d) { - if (d['subLayers'].length > 0) { - alert('should only use single feature layers, not groups'); - return; - } - var newStyleAndLegend = esriToOl.makeFeatureServiceLegendAndSymbol(d); - _this.style = newStyleAndLegend.style; - _super.prototype.addLegendContent.call(_this, newStyleAndLegend.legend); - }, 'json'); - } - }; - /** - * add feature collection - * @param {object} featureCollection - features as esrijson - */ - LayerBaseVectorEsri.prototype.addFeatures = function (featureCollection) { - var feats = this._esriFormat.readFeatures(featureCollection); - this.source.addFeatures(feats); - }; - /** - * trigger load features - * @protected - * @returns {boolean} if already loaded - */ - LayerBaseVectorEsri.prototype._load = function () { - var _this = this; - if (_super.prototype._load.call(this)) { - return true; - } - $.get(this._url, this.params, function (d) { - _this.addFeatures(d); - _this.loadCallback(_this); - }, 'json').fail(function () { - _this._loaded = false; - }); - return false; - }; - /** - * callback to generate the parameters passed in the get request - * @param {object} extent - extent object - * @param {number} extent.minX - minX - * @param {number} extent.minY - minY - * @param {number} extent.maxX - maxX - * @param {number} extent.maxY - maxY - * @param {number} zoomLevel - zoom level - */ - LayerBaseVectorEsri.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) { - _super.prototype.mapMoveMakeGetParams.call(this, extent, zoomLevel); - this.mapMoveParams['geometry'] = extent.minX + "," + extent.minY + "," + extent.maxX + "," + extent.maxY; - this.mapMoveParams['geometryType'] = 'esriGeometryEnvelope'; - this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects'; - this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects'; - this.mapMoveParams['inSR'] = 3857; - if (this._outSR == 3857) { - this.mapMoveParams['geometryPrecision'] = 1; - } - }; - /** - * Before call to map move callback, can prevent call by returning false - * @param {number} zoom - zoom level - * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution' - * @returns {boolean} if the call should proceed - */ - LayerBaseVectorEsri.prototype.mapMoveBefore = function (zoom, evtType) { - return _super.prototype.mapMoveBefore.call(this, zoom, evtType); - //if (super.mapMoveBefore(zoom, evtType)){ - // //place holder for additional processing - // return true; - //} else { - // return false; - //} - }; - /** - * callback function on map move - * @param {object} d - the json response - */ - LayerBaseVectorEsri.prototype.mapMoveCallback = function (d) { - _super.prototype.mapMoveCallback.call(this, d); - this.source.addFeatures(this._esriFormat.readFeatures(d)); - }; - return LayerBaseVectorEsri; -}(LayerBaseVector_1.LayerBaseVector)); -exports.LayerBaseVectorEsri = LayerBaseVectorEsri; -nm.LayerBaseVectorEsri = LayerBaseVectorEsri; -exports.default = LayerBaseVectorEsri; - - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/4/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBaseXyzTile_1 = __webpack_require__(63); -var RealEarthAnimateTile_1 = __webpack_require__(66); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('layers'); -/** - * Real earth tile - * @augments LayerBaseXyzTile - */ -var LayerRealEarthTile = (function (_super) { - __extends(LayerRealEarthTile, _super); - /** - * The base layer for all others - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {string} options.products - the products to request - * @param {boolean} [options.hasTimes=false] If the layer is time dependent, fixed set of dates - * @param {boolean} [options.animate=false] if the layer should be animated - */ - function LayerRealEarthTile(options) { - var _this = this; - options.animate = typeof options.animate == 'boolean' ? options.animate : false; - if (options.animate) { - _this = _super.call(this, '', options) || this; - _this._products = options.products; - _this.animator = new RealEarthAnimateTile_1.default(_this, options.timeLoadCallback); - _this.animator.timeInit(); - } - else { - _this = _super.call(this, "http://realearth.ssec.wisc.edu/api/image?products=" + options.products + "&x={x}&y={y}&z={z}", options) || this; - _this._products = options.products; - } - return _this; - } - LayerRealEarthTile.prototype.setLayerTime = function (theTime) { - if (this.animator) { - return this.animator.setLayerTime(theTime); - } - else { - return false; - } - }; - LayerRealEarthTile.prototype._load = function () { - if (this.animator) { - return false; - } - return _super.prototype._load.call(this); - }; - return LayerRealEarthTile; -}(LayerBaseXyzTile_1.LayerBaseXyzTile)); -exports.LayerRealEarthTile = LayerRealEarthTile; -nm.LayerRealEarthTile = LayerRealEarthTile; -exports.default = LayerRealEarthTile; - - -/***/ }), -/* 61 */, -/* 62 */, -/* 63 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/4/2015. - */ -var LayerBase_1 = __webpack_require__(10); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var nm = provide_1.default('layers'); -/** - * XYZ tile - * @augments LayerBase - */ -var LayerBaseXyzTile = (function (_super) { - __extends(LayerBaseXyzTile, _super); - /** - * The XYZ tile layer - * @param {string} url - url for source - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * @param {boolean} [options.useEsriStyle=false] if the map service style should be used - */ - function LayerBaseXyzTile(url, options) { - if (options === void 0) { options = {}; } - var _this = _super.call(this, url, options) || this; - _this._source = new ol.source.XYZ({ url: _this.url == '' ? undefined : _this.url }); - _this._olLayer = new ol.layer.Tile({ - source: _this._source, - visible: _this.visible, - opacity: _this.opacity, - minResolution: _this._minResolution, - maxResolution: _this._maxResolution - }); - _this._olLayer.setZIndex(_this._zIndex); - return _this; - } - Object.defineProperty(LayerBaseXyzTile.prototype, "source", { - /** - * - * @returns {ol.source.XYZ} the vector source - */ - get: function () { - return this._source; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseXyzTile.prototype, "olLayer", { - /** - * - * @returns {ol.layer.Tile|ol.layer.Base|undefined} the ol layer - */ - get: function () { - return this._olLayer; - }, - enumerable: true, - configurable: true - }); - return LayerBaseXyzTile; -}(LayerBase_1.LayerBase)); -exports.LayerBaseXyzTile = LayerBaseXyzTile; -nm.LayerBaseXyzTile = LayerBaseXyzTile; -exports.default = LayerBaseXyzTile; - - -/***/ }), -/* 64 */, -/* 65 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/4/2015. - */ -var provide_1 = __webpack_require__(0); -var mapPopup_1 = __webpack_require__(7); -var $ = __webpack_require__(1); -var nm = provide_1.default('mixin'); -/** - * The GMT offset time in minutes - * @type {number} - */ -var offsetMinutes = (new Date()).getTimezoneOffset(); -/** - * Mixin to get the product times - * Be sure to call getTimeInit after the mixin has been applied - */ -var RealEarthAnimate = (function () { - function RealEarthAnimate(lyr, loadCallback) { - this.lyr = lyr; - this._products = lyr._products; - if (loadCallback) { - this.loadCallback = loadCallback; - } - else { - this.loadCallback = function () { return; }; - } - } - /** - * Call this after the mixin has been applied - */ - RealEarthAnimate.prototype.timeInit = function () { - var _this = this; - this._rawDateStrings = []; - this._localDates = []; - this.localTimes = []; - this._animateEnabled = true; - // this._loaded = true; - this._currentTime = undefined; - this._currentIndex = undefined; - $.get('http://realearth.ssec.wisc.edu/api/products', { products: this._products }, function (d) { - if (d.length == 0) { - console.log(_this._products + " layer not available or does not have times"); - return; - } - d = d[0]; - for (var i = 0; i < d['times'].length; i++) { - _this._loadDates.call(_this, d['times'][i]); - } - _this.loadCallback.call(_this.lyr, _this.lyr); - _this._loadLatest.call(_this); - }, 'json'); - }; - /** - * Given the raw time string, add to the arrays to keep track of dates and cache - * @param {string} inString - input string to parse - * @returns {string} the converted string - * @protected - */ - RealEarthAnimate.prototype._loadDates = function (inString) { - var yr = inString.slice(0, 4); - var month = inString.slice(4, 6); - var d = inString.slice(6, 8); - var hr = inString.slice(9, 11); - var mn = inString.slice(11, 13); - var sec = inString.slice(13, 15); - var rawDateStr = inString.replace('.', '_'); - this._rawDateStrings.push(rawDateStr); - var dteStr = month + "/" + d + "/" + yr + " " + hr + ":" + mn + ":" + sec; - var newDte = new Date(dteStr); - newDte.setMinutes(newDte.getMinutes() - offsetMinutes); - this._localDates.push(newDte); - this.localTimes.push(newDte.getTime()); - return rawDateStr; - }; - /** - * - * @protected - * @returns {boolean} if should continue - */ - RealEarthAnimate.prototype._loadLatest = function () { - mapPopup_1.default.closePopup(); - if (this.localTimes.length > 0) { - this._currentIndex = this.localTimes.length - 1; - return true; - } - else { - return false; - } - }; - /** - * - * @param {number} theTime - the time - * @returns {boolean} true if new index, false if the same or below lowest value - */ - RealEarthAnimate.prototype.setLayerTime = function (theTime) { - this._currentTime = theTime; - var newIndex; - if (theTime < this.localTimes[0]) { - return false; - } - else if (theTime > this.localTimes[this.localTimes.length - 1]) { - newIndex = this.localTimes.length - 1; - } - for (var i = 0; i < this.localTimes.length; i++) { - if (this.localTimes[i] >= theTime) { - newIndex = i; - break; - } - } - if (newIndex == this._currentIndex) { - return false; - } - else { - this._currentIndex = newIndex; - mapPopup_1.default.closePopup(); - return true; - } - }; - return RealEarthAnimate; -}()); -exports.RealEarthAnimate = RealEarthAnimate; -nm.RealEarthAnimate = RealEarthAnimate; -exports.default = RealEarthAnimate; - - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/4/2015. - */ -var RealEarthAnimate_1 = __webpack_require__(65); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('mixin'); -/** - * Animate real earth tile - * @augments RealEarthAnimate - */ -var RealEarthAnimateTile = (function (_super) { - __extends(RealEarthAnimateTile, _super); - function RealEarthAnimateTile(layer, loadCallback) { - var _this = _super.call(this, layer, loadCallback) || this; - _this._source = layer.source; - _this._olLayer = layer.olLayer; - return _this; - } - RealEarthAnimateTile.prototype.timeInit = function () { - _super.prototype.timeInit.call(this); - this._sourceUrls = []; - }; - RealEarthAnimateTile.prototype._loadDates = function (inString) { - var rawDte = _super.prototype._loadDates.call(this, inString); - var dteProductUrl = "http://realearth.ssec.wisc.edu/api/image?products=" + this._products + "_" + rawDte + "&x={x}&y={y}&z={z}"; - this._sourceUrls.push(dteProductUrl); - return ''; - }; - /** - * @protected - */ - RealEarthAnimateTile.prototype._loadLatest = function () { - if (_super.prototype._loadLatest.call(this)) { - this._source.setUrl(this._sourceUrls[this._sourceUrls.length - 1]); - } - return true; - }; - RealEarthAnimateTile.prototype.setLayerTime = function (theTime) { - if (_super.prototype.setLayerTime.call(this, theTime)) { - if (this._olLayer.getZIndex() < 0) { - this._olLayer.setZIndex(0); - } - this._source.setUrl(this._sourceUrls[this._currentIndex]); - } - else { - this._olLayer.setZIndex(-1); - } - return true; - }; - return RealEarthAnimateTile; -}(RealEarthAnimate_1.default)); -nm.RealEarthAnimateTile = RealEarthAnimateTile; -exports.default = RealEarthAnimateTile; - - -/***/ }), -/* 67 */, -/* 68 */, -/* 69 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMap_1 = __webpack_require__(5); -var LayerRealEarthTile_1 = __webpack_require__(60); -var media_control_1 = __webpack_require__(48); -var $ = __webpack_require__(1); -var LayerBaseVectorEsri_1 = __webpack_require__(59); -var LayerEsriMapServer_1 = __webpack_require__(26); -var nexrhresStatic = new LayerRealEarthTile_1.default({ - products: 'nexrhres', - id: 'nexrhres-static', - opacity: 0.6, - animate: true, - name: 'Hybrid Reflectivity', - // maxZoom: 10, - timeLoadCallback: function (f) { - console.log(f); - } -}); -var d = new Date(); -var endTime = d.getTime(); -d.setHours(d.getHours() - 4); -var startTime = d.getTime(); -var rangeStep = Math.round((endTime - startTime) / 8); -var media = new media_control_1.MediaControl($('#control'), function (v) { - nexrhresStatic.setLayerTime(v); -}, { - min: startTime, - max: endTime, - val: endTime, - step: rangeStep, - playInterval: 750, - showAsDate: true -}); -var map = quickMap_1.quickMap(); -map.addLayer(nexrhresStatic.olLayer); -var coordinationLayer = new LayerBaseVectorEsri_1.LayerBaseVectorEsri('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0', { - visible: true, - autoLoad: true, - name: 'Coordination', - useEsriStyle: true -}); -map.addLayer(coordinationLayer.olLayer); -var oakRidgeLayers = [ - ['Cameras', 'cameras33'], - ['HAR', 'HAR33'], - ['DMS', 'MessageSigns33'], - //['State Summary', 'statesummary'], - ['Traffic Control', 'TrafficControl33'], - ['Traffic Detection', 'TrafficDetectionMulti'], - ['Weather', 'Weather33'] -]; -for (var i = 0; i < oakRidgeLayers.length; i++) { - var oakRidgeLayer = new LayerEsriMapServer_1.LayerEsriMapServer("http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/" + oakRidgeLayers[i][1] + "/MapServer", { - id: oakRidgeLayers[i][1], - name: oakRidgeLayers[i][0], - visible: true, - minZoom: 7, - zIndex: 20, - addPopup: true, - legendCollapse: true - }); - map.addLayer(oakRidgeLayer.olLayer); -} - - -/***/ }) -/******/ ]); +!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=68)}([function(e,t,o){"use strict";function n(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){void 0===o[t[n]]&&(o[t[n]]={}),o=o[t[n]]}return o}Object.defineProperty(t,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,t.default=n},function(e,t){e.exports=$},function(e,t){e.exports=ol},function(e,t,o){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),a=r.default("util");t.makeGuid=n,a.makeGuid=n,t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);t.mapPopup=new n.default,t.default=t.mapPopup},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=n.default("olHelpers"),a=function(){function e(e){this._map=null,this._initialized=!1,this._subtype=e}return e.prototype.init=function(e){this._initialized||(this._map=e,this._initialized=!0)},Object.defineProperty(e.prototype,"map",{get:function(){return this._map},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),e.prototype._checkInit=function(){if(!this.initialized){var e=this._subtype+" object not initialized";throw alert(e),console.log(e),e}},e.prototype.checkInit=function(){this._checkInit()},e}();t.MapInteractionBase=a,r.MapInteractionBase=a,t.default=a},function(e,t,o){"use strict";function n(e){void 0===e&&(e={});var t=r.quickMapBase(e);return i.default.init(t),l.default.init(t),t}Object.defineProperty(t,"__esModule",{value:!0});var r=o(14),a=o(0),i=o(7),l=o(4),s=a.default("olHelpers");t.quickMap=n,s.quickMap=n,t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12);t.mapMove=new n.default,t.default=t.mapMove},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2);t.proj4326=new n.proj.Projection({code:"EPSG:4326"}),t.proj3857=new n.proj.Projection({code:"EPSG:3857"}),t.proj3070=new n.proj.Projection({code:"EPSG:3070"})},function(e,t,o){"use strict";function n(e){return void 0===e||null===e}function r(e){return!n(e)}Object.defineProperty(t,"__esModule",{value:!0});var a=o(0),i=a.default("util.checkDefined");t.undefinedOrNull=n,i.undefinedOrNull=n,t.definedAndNotNull=r,i.definedAndNotNull=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(17),r=o(0),a=o(3),i=o(1),l=r.default("layers"),s=function(){function e(e,t){if(void 0===t&&(t={}),t=t||{},"string"!=typeof e)throw"Invalid URL";this._url=e,this._params="object"==typeof t.params?t.params:{},this._legendCollapse="boolean"==typeof t.legendCollapse&&t.legendCollapse,this._legendCheckbox="boolean"!=typeof t.legendCheckbox||t.legendCheckbox,this.id=t.id||a.default(),this._name=t.name||"Unnamed Layer",this.animate=!1,this._opacity="number"==typeof t.opacity?t.opacity:1,this._opacity>1?this._opacity=1:this._opacity<0&&(this._opacity=0),this._visible="boolean"!=typeof t.visible||t.visible,this._source=void 0,this._olLayer=void 0,this._loaded=!1,this._maxResolution=n.zoomToResolution(t.minZoom),void 0!==this._maxResolution&&(this._maxResolution+=1e-5),this._minResolution=n.zoomToResolution(t.maxZoom),this._minZoom="number"==typeof t.minZoom?t.minZoom:void 0,this._maxZoom="number"==typeof t.maxZoom?t.maxZoom:void 0,this._zIndex="number"==typeof t.zIndex?t.zIndex:0,this.loadCallback="function"==typeof t.loadCallback?t.loadCallback:function(){},this._legendContent="",this._legendCheckbox?(this._legendContent+='<input type="checkbox" '+(this.visible?"checked":"")+' class="legend-check" id="'+this.id+'-legend-layer-check"><span></span>',this._legendContent+='<label for="'+this.id+'-legend-layer-check" class="legend-layer-name">'+this.name+"</label>"):this._legendContent+='<label class="legend-layer-name">'+this.name+"</label>",this._$legendDiv=null,this._applyCollapseCalled=!1,this._addLegendContent("string"==typeof t.legendContent?t.legendContent:void 0)}return e.prototype._load=function(){return 1==this.loaded||(this._loaded=!0,!1)},e.prototype.getLegendDiv=function(){return'<div class="legend-layer-div" id="'+this.id+'-legend-layer-div">'+this._legendContent+"</div>"},e.prototype._addLegendContent=function(e){void 0===e&&(e=""),e.indexOf("<ul>")>-1&&(e='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'+e),this._legendContent+=e,this._$legendDiv=i("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0&&(this._$legendDiv.append(e),this.applyCollapse())},e.prototype.addLegendContent=function(e){this._addLegendContent(e)},e.prototype.applyCollapse=function(){if(this._applyCollapseCalled)return void console.log("collapse already applied");if(this._$legendDiv=i("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0){var e=this._$legendDiv.find(".legend-items-expander");e.length>0&&(this._applyCollapseCalled=!0,e.click(function(){var e=i(this);e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("▼")):(e.addClass("legend-layer-group-collapsed"),e.html("▶"))}),this._legendCollapse&&e.trigger("click"))}},e.prototype.refresh=function(){this.source&&this.source.refresh()},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"legendContent",{get:function(){return this._legendContent},set:function(e){this._legendContent=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minResolution",{get:function(){return this._minResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxResolution",{get:function(){return this._maxResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minZoom",{get:function(){return this._minZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoom",{get:function(){return this._maxZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this.setVisible(e)},enumerable:!0,configurable:!0}),e.prototype.setVisible=function(e){this._visible=e,this.olLayer&&(this.olLayer.setVisible(this._visible),e&&!this._loaded&&this._load())},Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=e,this.olLayer&&this.olLayer.setOpacity(this._opacity)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),e.prototype.getSource=function(){return this._source},Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(e){this._zIndex=e},enumerable:!0,configurable:!0}),e.prototype.setZIndex=function(e){},Object.defineProperty(e.prototype,"olLayer",{get:function(){return this.getOlLayer()},enumerable:!0,configurable:!0}),e.prototype.getOlLayer=function(){return this._olLayer},e}();t.LayerBase=s,l.LayerBase=s,t.default=s},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),r=o(3),a=o(2),i=o(8),l="geocoder-invalid",s="geocoder-loading",p=function(){function e(e,t){var o=this,p=r.makeGuid(),u=r.makeGuid();this.map=t,this.indicationLayer=new a.layer.Vector({source:new a.source.Vector,style:new a.style.Style({image:new a.style.Circle({radius:12,fill:new a.style.Fill({color:"rgba(255,0,0,0.5)"}),stroke:new a.style.Stroke({color:"red",width:1})})})}),this.map.addLayer(this.indicationLayer),n(e).append('<div class="geocoder-el"><input type="text" id="'+p+'"><button id="'+u+'">Search</button></div>'),this.theButton=document.getElementById(u),this.theInput=document.getElementById(p),this.reset();var c=n(this.theButton),d=n(this.theInput);c.click(function(e){e.preventDefault(),c.addClass(s),o.theButton.disabled=!0,o.indicationLayer.getSource().clear(),n.get("https://geocode.xyz/"+o.theInput.value+"?geoit=json",{},function(e){var t=parseFloat(e.latt),n=parseFloat(e.longt);if(0==t&&0==n||e.error)d.addClass(l),o.theInput.title="Specified Location Invalid",o.theButton.title="Specified Location Invalid";else{var r=o.map.getView(),p=new a.geom.Point([n,t]),u=new a.Feature(p);o.indicationLayer.getSource().addFeature(u),p.transform(i.proj4326,i.proj3857),r.setCenter(p.getCoordinates()),r.setZoom(13)}c.removeClass(s),o.theButton.disabled=!1},"json")}),n(this.theInput).keyup(function(e){e.preventDefault(),o.theButton.disabled=0==o.theInput.value.length,d.removeClass(l),o.theInput.title="",o.theButton.title="",o.theButton.disabled||13!=e.keyCode||c.click()})}return e.prototype.reset=function(){this.theButton.disabled=!0,this.theInput.value=""},e}();t.Geocode=p},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),a=o(9),i=o(0),l=o(3),s=o(1),p=i.default("olHelpers"),u=function(e){function t(){var t=e.call(this,"map move")||this;return t._arrLyrRequest=[],t._arrLyrTimeout=[],t._arrLayer=[],t._lookupLayer={},t._mapMoveCallbacks=[],t._mapMoveCallbacksLookup={},t._mapMoveCallbackDelays=[],t._mapMoveCallbackContext=[],t._mapMoveCallbackTimeout=[],t._mapExtent=void 0,t._zoomLevel=void 0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t),this.map.getView().on(["change:center","change:resolution"],function(e){o._updateMapExtent();for(var t=0;t<o._arrLayer.length;t++)o.triggerLyrLoad(o._arrLayer[t],t,e.type);for(var t=0;t<o._mapMoveCallbacks.length;t++)o.triggerMoveCallback(t,e.type)})},t.prototype._updateMapExtent=function(){var e=this.map.getView();this._zoomLevel=e.getZoom();var t=e.calculateExtent(this.map.getSize());this._mapExtent={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},Object.defineProperty(t.prototype,"mapExtent",{get:function(){return this._mapExtent||this._updateMapExtent(),this._mapExtent},enumerable:!0,configurable:!0}),t.prototype.triggerLyrLoad=function(e,t,o){if(a.undefinedOrNull(e)&&a.undefinedOrNull(t))throw"need to define lyr or index";a.definedAndNotNull(e)&&a.undefinedOrNull(t)?t=this._arrLayer.indexOf(e):a.undefinedOrNull(e)&&a.definedAndNotNull(t)&&(e=this._arrLayer[t]),null!=this._arrLyrTimeout[t]&&(clearTimeout(this._arrLyrTimeout[t]),this._arrLyrTimeout[t]=null),null!=this._arrLyrRequest[t]&&4!=this._arrLyrRequest[t]&&(this._arrLyrRequest[t].abort(),this._arrLyrRequest[t]=null);var n=function(){};if(e.mapMoveBefore(this._zoomLevel,o)){e.mapMoveMakeGetParams(this._mapExtent,this._zoomLevel);var r=this;n=function(){function o(e,t){var o=this;this._arrLyrRequest[t]=s.get(e.url,e.mapMoveParams,function(t){e.mapMoveCallback(t),e.loadCallback()},"json").fail(function(t){"abort"!=t.statusText&&(console.log("failed"),console.log(e.url),console.log(e.mapMoveParams))}).always(function(){o._arrLyrTimeout[t]=null,o._arrLyrRequest[t]=null})}o.call(r,e,t)}}else e.clear();this._arrLyrTimeout[t]=setTimeout(n,e.onDemandDelay)},t.prototype.triggerMoveCallback=function(e,t,o){if(void 0===e&&void 0===o)throw"either the function index or the id must be defined";if("number"!=typeof e&&(e=this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[o])),e<0)return void console.log("function not found");null!=this._mapMoveCallbackTimeout[e]&&(clearTimeout(this._mapMoveCallbackTimeout[e]),this._mapMoveCallbackTimeout[e]=null);var n=this._mapMoveCallbackContext[e],r=this._mapMoveCallbacks[e],a=this,i=function(){null!==n?r.call(n,a._mapExtent,a._zoomLevel,t):r(a._mapExtent,a._zoomLevel,t)};this._mapMoveCallbackTimeout[e]=setTimeout(i,this._mapMoveCallbackDelays[e])},t.prototype.addVectorLayer=function(e,t){if(void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1)return void console.log("already added "+e.name+" to map move");this._checkInit(),this._arrLyrRequest.push(null),this._arrLyrTimeout.push(null),this._arrLayer.push(e),this._lookupLayer[e.id]=e,(t="boolean"!=typeof t||t)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))},t.prototype.addCallback=function(e,t,o,n,r){if(this._mapMoveCallbacks.indexOf(e)>-1)return void console.log("this function already added to map move");this._checkInit(),r||(r=l.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=e,this._mapMoveCallbackDelays.push("number"==typeof o?o:50),this._mapMoveCallbackContext.push(a.definedAndNotNull(t)?t:null),this._mapMoveCallbackTimeout.push(null),(n="boolean"!=typeof n||n)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))},t}(r.default);t.MapMoveCls=u,p.MapMoveCls=u,t.default=u},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),a=o(0),i=o(2),l=o(1),s=a.default("olHelpers"),p=function(){function e(e,t,o,n,r){this.feature=e,this.layer=t,this.layerIndex=o,this.selectionLayer=n,this.popupContent="",this.esriLayerName="string"==typeof r?r:void 0}return Object.defineProperty(e.prototype,"layerName",{get:function(){return"string"==typeof this.esriLayerName?this.esriLayerName:this.layer.name},enumerable:!0,configurable:!0}),e}();t.FeatureLayerProperties=p;var u=function(e){function t(){var t=e.call(this,"map popup")||this;return t._arrPopupLayerIds=[],t._arrPopupLayers=[],t._arrPopupContentFunction=[],t._$popupContainer=void 0,t._$popupContent=void 0,t._$popupCloser=void 0,t._popupOverlay=void 0,t._selectionLayers=[],t._selectionLayerLookup={},t._mapClickFunctions=[],t._popupChangedFunctions=[],t._esriMapServiceLayers=[],t._popupOpen=!1,t._popupCoordinate=null,t._passThroughLayerFeatureArray=[],t._currentPopupIndex=-1,t._popupContentLength=0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t);var n,r=this.map.getTarget();n=l("string"==typeof r?"#"+r:r),n.append('<div class="ol-popup"><span class="ol-popup-closer">X</span><div class="popup-content"></div></div>'),this._$popupContainer=n.find(".ol-popup"),this._$popupContent=n.find(".popup-content"),this._$popupCloser=n.find(".ol-popup-closer");var a=function(e){return i.easing.inAndOut(e)};this._popupOverlay=new i.Overlay({element:this._$popupContainer[0],autoPan:!0,autoPanAnimation:{duration:250,source:t.getView().getCenter(),easing:a}}),this._map.addOverlay(this._popupOverlay),this._$popupCloser.click(function(e){o.closePopup()}),this._map.on("singleclick",function(e){if(o.closePopup(),o._popupCoordinate=e.coordinate,o._esriMapServiceLayers.length>0)for(var t={geometry:e.coordinate.join(","),geometryType:"esriGeometryPoint",layers:"all",sr:o._map.getView().getProjection().getCode().split(":")[1],mapExtent:o._map.getView().calculateExtent(o._map.getSize()).join(","),imageDisplay:o._map.getSize().join(",")+",96",returnGeometry:!0,tolerance:15,f:"pjson"},n=0,r=o._esriMapServiceLayers;n<r.length;n++){var a=r[n];a.getPopupInfo(t)}var i=o._featuresAtPixel(e.pixel);o._passThroughLayerFeatureArray=[],o._currentPopupIndex=-1;for(var l=0;l<i.length;l++){var s=i[l],p=s.feature.getProperties(),u=o._arrPopupContentFunction[s.layerIndex](p,o._$popupContent);u===!1||("string"==typeof u?(s.popupContent=u,o._passThroughLayerFeatureArray.push(s)):s.selectionLayer.getSource().addFeature(s.feature))}o._popupContentLength=o._passThroughLayerFeatureArray.length,o._currentPopupIndex=-1;var c='<div class="ol-popup-nav">';c+='<span class="previous-popup ol-popup-nav-arrow">◀</span>',c+='<span class="next-popup ol-popup-nav-arrow">▶</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span> of </span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span> - </span>",c+='<span class="current-popup-layer-name"></span>',c+="</div>",c+='<div class="ol-popup-inner">',c+="</div>",o._$popupContent.html(c),o._$popupContent.find(".previous-popup").click(function(){1!=o._popupContentLength&&(0==o._currentPopupIndex?o._currentPopupIndex=o._popupContentLength-1:o._currentPopupIndex--,o._triggerFeatSelect())});var d=o._$popupContent.find(".next-popup");d.click(function(){1==o._popupContentLength&&o._currentPopupIndex>-1||(o._currentPopupIndex==o._popupContentLength-1?o._currentPopupIndex=0:o._currentPopupIndex++,o._triggerFeatSelect())}),o._popupContentLength>0&&(d.trigger("click"),o._popupOverlay.setPosition(o._popupCoordinate),o._$popupContent.scrollTop(0),o._popupOpen=!0)}),this._map.on("pointermove",function(e){if(!e.dragging){var t=o.map.getEventPixel(e.originalEvent),n=!1;o.map.forEachFeatureAtPixel(t,function(e,t){if(!n)for(var r=0,a=o._arrPopupLayers;r<a.length;r++){var i=a[r];if(i.olLayer==t){n=!0;break}}});o.map.getTargetElement().style.cursor=n?"pointer":""}})},t.prototype._triggerFeatSelect=function(){var e=this._$popupContent.find(".current-popup-item-number"),t=this._$popupContent.find(".ol-popup-inner"),o=this._$popupContent.find(".current-popup-layer-name");this.clearSelection();var n=this._passThroughLayerFeatureArray[this._currentPopupIndex];e.html((this._currentPopupIndex+1).toFixed()),o.html(n.layerName),t.html(n.popupContent),n.selectionLayer.getSource().addFeature(n.feature);for(var r=0,a=this._popupChangedFunctions;r<a.length;r++){(0,a[r])(this._$popupContent)}},t.prototype.addMapServicePopupContent=function(e,t,o,n){var r=new p(e,t,this._popupContentLength,this._selectionLayerLookup[t.id],n);r.popupContent=o,this._passThroughLayerFeatureArray.push(r),this._popupContentLength++,l(".popup-content-length").html(this._popupContentLength.toFixed()),this._popupOpen||(this._$popupContent.find(".next-popup").trigger("click"),this._popupOverlay.setPosition(this._popupCoordinate),this._$popupContent.scrollTop(0),this._popupOpen=!0)},t.prototype._featuresAtPixel=function(e){var t=this,o=[];return this.map.forEachFeatureAtPixel(e,function(e,n){var r,a=!1,i=null;for(r=0;r<t._arrPopupLayers.length;r++)if(i=t._arrPopupLayers[r],i.olLayer===n){a=!0;break}a&&o.push(new p(e,i,r,t._selectionLayers[r]))}),o},t.prototype.closePopup=function(){return this._checkInit(),this._popupOpen=!1,this._popupOverlay.setPosition(void 0),this._$popupCloser[0].blur(),this.clearSelection(),this._$popupContent.html(""),!1},t.prototype.addPopupChangedFunction=function(e){this._popupChangedFunctions.push(e)},t.prototype._addPopupLayer=function(e,t){this._checkInit(),t=t||{},t.color=t.color||"rgba(255,170,0,0.5)",t.width=t.width||10;var o;o=t.olStyle?t.olStyle:new i.style.Style({stroke:new i.style.Stroke({color:t.color,width:t.width}),image:new i.style.Circle({radius:7,fill:new i.style.Fill({color:t.color}),stroke:new i.style.Stroke({color:t.color,width:1})}),fill:new i.style.Fill({color:t.color})});var n=new i.layer.Vector({source:new i.source.Vector,style:o});return n.setZIndex(100),this._selectionLayers.push(n),this._selectionLayerLookup[e.id]=n,this.map.addLayer(n),n},t.prototype.addVectorPopup=function(e,t,o){var n=this._addPopupLayer(e,o);return this._arrPopupLayerIds.push(e.id),this._arrPopupLayers.push(e),this._arrPopupContentFunction.push(t),n},t.prototype.removeVectorPopup=function(e){var t=this._arrPopupLayerIds.indexOf(e.id);t>-1&&(this._arrPopupLayerIds.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupContentFunction.splice(t,1),this._selectionLayers.splice(t,1),delete this._selectionLayerLookup[e.id])},t.prototype.addMapServicePopup=function(e,t){var o=this._addPopupLayer(e,t);return this._esriMapServiceLayers.push(e),o},t.prototype.clearSelection=function(){this._checkInit();for(var e=0;e<this._selectionLayers.length;e++)this._selectionLayers[e].getSource().clear();for(var t=0,o=this._mapClickFunctions;t<o.length;t++){(0,o[t])()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,t.default=u},function(e,t,o){"use strict";function n(e){void 0===e&&(e={}),e.divId=e.divId||"map",e.center=e.center||{x:-10018378,y:5574910},e.zoom="number"==typeof e.zoom?e.zoom:7,e.baseSwitcher="boolean"!=typeof e.baseSwitcher||e.baseSwitcher,e.fullScreen="boolean"==typeof e.fullScreen&&e.fullScreen,e.addGeocode=e.addGeocode||!1,i("#"+e.divId).css("position","relative");var t=new a.layer.Tile({source:new a.source.OSM});if(e.baseSwitcher,e.zoom<0||e.zoom>28)throw"zoom out of range";if(e.center.x>=-180&&e.center.x<=180&&e.center.y>=-90&&e.center.y<=90){var o=new a.geom.Point([e.center.x,e.center.y]);new a.proj.Projection({code:"EPSG:4326"}),o.transform(new a.proj.Projection({code:"EPSG:4326"}),new a.proj.Projection({code:"EPSG:3857"}));var n=o.getCoordinates();e.center.x=n[0],e.center.y=n[1]}var r=a.control.defaults({attributionOptions:{collapsible:!1}}),s=new a.View({center:[e.center.x,e.center.y],zoom:e.zoom,minZoom:e.minZoom,maxZoom:e.maxZoom}),p=new a.Map({layers:[t],target:e.divId,controls:r,view:s});return e.fullScreen&&p.addControl(new a.control.FullScreen({})),e.addGeocode&&new l.Geocode(document.getElementById(e.divId),p),p}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),a=o(2),i=o(1),l=o(11),s=r.default("olHelpers");t.quickMapBase=n,s.quickMapBase=n,t.default=n},,,function(e,t,o){"use strict";function n(e){return"number"==typeof e?e%1==0&&e>=0&&e<=28?l[e]:void console.log("invalid zoom level provided: "+e):void 0}function r(e){for(var t=0;t<l.length;t++)if(e>=l[t])return t;return 0}Object.defineProperty(t,"__esModule",{value:!0});var a=o(0),i=a.default("olHelpers.zoomResolutionConvert"),l=[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,.5971642834779395,.29858214173896974,.14929107086948487,.07464553543474244,.03732276771737122,.01866138385868561,.009330691929342804,.004665345964671402,.002332672982335701,.0011663364911678506,.0005831682455839253];t.zoomToResolution=n,i.zoomToResolution=n,t.resolutionToZoom=r,i.resolutionToZoom=r},,,,,,,,function(e,t,o){"use strict";function n(e,t){return"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/"+e+"/"+t+"/MapServer"}function r(e,t){var o=window.location.href,n="/mapserver/"+e+"/"+t;return o.indexOf("transportal.cee.wisc.edu")>-1&&(n=o.toLowerCase().indexOf("webmapsstage")>-1?"https://transportal.cee.wisc.edu/gis/webmapsstage"+n:"https://transportal.cee.wisc.edu/gis/webmaps"+n),n}var a=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=o(10),l=o(27),s=o(4),p=o(0),u=o(2),c=o(1),d=p.default("layers");t.makeServiceUrl=n,t.localCacheUrl=r;var h=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._source=new u.source.TileArcGISRest({url:""==n.url?void 0:n.url,params:void 0===o.showLayers?void 0:{layers:"show:"+o.showLayers.join(",")}}),n._showLayers=o.showLayers||[],n._olLayer=new u.layer.Tile({source:n._source,visible:n.visible,opacity:n.opacity,minResolution:n._minResolution,maxResolution:n._maxResolution}),n._olLayer.setZIndex(n._zIndex),o.addPopup="boolean"==typeof o.addPopup&&o.addPopup,n._esriFormat=new u.format.EsriJSON,n._popupRequest=null,o.getLegend="boolean"!=typeof o.getLegend||o.getLegend,o.getLegend&&n.addLegendContent(),o.addPopup&&s.default.addMapServicePopup(n),n}return a(t,e),t.prototype.addLegendContent=function(t){var o=this,n=this.url;"/"!==n[n.length-1]&&(n+="/"),n+="legend?f=pjson&callback=?",c.get(n,{},function(t){var n=l.makeMapServiceLegend(t,o._showLayers);e.prototype.addLegendContent.call(o,n)},"json")},t.prototype.getPopupInfo=function(e){if(this.visible){var t=this.url;"/"!=t[t.length-1]&&(t+="/"),t+="identify?callback=?";var o=this;null!=this._popupRequest&&this._popupRequest.abort(),this._popupRequest=c.get(t,e,function(e){for(var t=0,n=e.results;t<n.length;t++){var r=n[t],a='<table class="esri-popup-table">';for(var i in r.attributes)if(r.attributes.hasOwnProperty(i)){var l=r.attributes[i];if(null==l||"null"==l.toString().toLowerCase())continue;var p=i;p.length>14&&(p=p.slice(0,11)+"..."),a+="<tr><td>"+p+"</td><td>"+l+"</td></tr>"}a+="</table>",s.default.addMapServicePopupContent(o._esriFormat.readFeature(r),o,a,r.layerName)}},"json"),this._popupRequest.always(function(){o._popupRequest=null})}},Object.defineProperty(t.prototype,"source",{get:function(){return e.prototype.getSource.call(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"olLayer",{get:function(){return e.prototype.getOlLayer.call(this)},enumerable:!0,configurable:!0}),t}(i.LayerBase);t.LayerEsriMapServer=h,d.LayerEsriMapServer=h,t.default=h},,function(e,t,o){"use strict";function n(e,t){return"rgba("+e[0]+","+e[1]+","+e[2]+","+t+")"}function r(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function a(e){var t=e.drawingInfo.renderer,o=null;switch(t.type){case"simple":switch(e.geometryType){case"esriGeometryPoint":o=new _(e,h);break;case"esriGeometryPolyline":o=new _(e,y);break;case"esriGeometryPolygon":o=new _(e,f);break;default:console.log(e),alert(e.geometryType+" not handled")}break;case"uniqueValue":switch(e.geometryType){case"esriGeometryPoint":o=new v(e,h);break;case"esriGeometryPolyline":o=new v(e,y);break;case"esriGeometryPolygon":o=new v(e,f);break;default:console.log(e),alert(e.geometryType+" not handled")}break;default:alert("not handled renderer type: "+t.type)}return null==o?{style:void 0,legend:""}:{style:o.olStyle,legend:o.legendHtml}}function i(e,t){void 0===t&&(t=!1),t="boolean"==typeof t&&t;var o=e.layerName,n=e.legend,a="";if(t||(a+='<span class="legend-layer-subitem">'+o+"</span>"),1==n.length)a='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+n[0].imageData+'">';else{t||(a+='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'),a+="<ul>";for(var i=0;i<n.length;i++)a+="<li>",a+='<span class="legend-layer-subitem">'+r(n[i].label)+"</span>",a+='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+n[i].imageData+'">',a+="</li>";a+="</ul>"}return t||(a='<span class="legend-layer-subitem">'+o+"</span>"+a),a}function l(e,t){void 0===t&&(t=[]);var o="",n=e.layers;if(1==n.length)o+=i(n[0],!0);else{o+="<ul>";for(var r=0;r<n.length;r++)t.length>0&&t.indexOf(r)<0||(o+="<li>"+i(n[r])+"</li>");o+="</ul>"}return o}var s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var p=o(0),u=o(2),c=p.default("olHelpers.esriToOlStyle");c.htmlEscape=r;var d=function(){function e(e,t){this.symbolObj=e,this.opacity=t,this.olStyle=void 0,this.legendHtml=""}return e}(),h=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSMS":var a=n(r.symbolObj.color,r.opacity),i=n(r.symbolObj.outline.color,r.opacity),l=r.symbolObj.outline.width,s=r.symbolObj.size;r.olStyle=new u.style.Style({image:new u.style.Circle({radius:s,fill:new u.style.Fill({color:a}),stroke:new u.style.Stroke({color:i,width:l})})}),r.legendHtml='<span class="legend-layer-icon" style="color: '+a+'">●</span>';break;case"esriPMS":r.olStyle=new u.style.Style({image:new u.style.Icon({src:"data:image/png;base64,"+r.symbolObj.imageData})}),r.legendHtml='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+r.symbolObj.imageData+'">';break;default:console.log(r.symbolObj),alert("Point symbol does not handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),y=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSLS":var a=n(r.symbolObj.color,r.opacity),i=r.symbolObj.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:a,width:i})}),r.legendHtml='<span class="legend-layer-icon" ',r.legendHtml+='style="',r.legendHtml+="background-color: "+a+";",r.legendHtml+="width: 40px;",r.legendHtml+="height: 4px;",r.legendHtml+="position: relative;",r.legendHtml+="display: inline-block;",r.legendHtml+="top: -1px;",r.legendHtml+='"></span>';break;default:console.log(r.symbolObj),alert("Line symbol does not handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),f=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSFS":var a=n(r.symbolObj.color,r.opacity),i=n(r.symbolObj.outline.color,r.opacity),l=r.symbolObj.outline.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:i,width:l}),fill:new u.style.Fill({color:a})}),r.legendHtml='<span class="legend-layer-icon" ',r.legendHtml+='style="',r.legendHtml+="background-color: "+a+";",r.legendHtml+="border: solid "+i+" 1px;",r.legendHtml+="width: 40px;",r.legendHtml+="height: 9px;",r.legendHtml+="position: relative;",r.legendHtml+="display: inline-block;",r.legendHtml+="top: 2px;",r.legendHtml+='"></span>';break;default:console.log(r.symbolObj),alert("Polygon symbol does handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),m=function(){function e(e){this.opacity=(100-(e.drawingInfo.transparency||0))/100,this.renderer=e.drawingInfo.renderer,this.olStyle=void 0,this.legendHtml=""}return e}(),_=function(e){function t(t,o){var n=e.call(this,t)||this;n.symbol=n.renderer.symbol;var r=new o(n.symbol,n.opacity);return n.olStyle=r.olStyle,n.legendHtml=r.legendHtml,n}return s(t,e),t}(m),v=function(e){function t(t,o){var n=e.call(this,t)||this;if(n.uniqueValueInfos=n.renderer.uniqueValueInfos,n.propertyName=n.renderer.field1,n.defaultSymbol=n.renderer.defaultSymbol,n.defaultSymbol){var a=new o(n.defaultSymbol,n.opacity);n.defaultStyle=a.olStyle,n.defaultLabelHtml='<span class="legend-layer-subitem">'+r(n.renderer.defaultLabel)+"</span>"+a.legendHtml}else n.defaultStyle=void 0,n.defaultLabelHtml="other";n.valueArray=[],n.labelArray=[],n.legendArray=[],n.propertyStyleLookup={};for(var i=0,l=n.uniqueValueInfos;i<l.length;i++){var s=l[i];n.labelArray.push(s.label),n.valueArray.push(s.value);var p=new o(s.symbol,n.opacity);n.legendArray.push('<span class="legend-layer-subitem">'+r(s.label)+"</span>"+p.legendHtml),n.propertyStyleLookup[s.value]=p.olStyle}n.olStyle=function(e){var t=e.getProperties(),o=t[n.propertyName];return void 0!==n.propertyStyleLookup[o]?[n.propertyStyleLookup[o]]:[n.defaultStyle]},null!==n.defaultLabelHtml&&n.legendArray.push(n.defaultLabelHtml),n.legendHtml="<ul>";for(var u=0,c=n.legendArray;u<c.length;u++){var d=c[u];n.legendHtml+="<li>"+d+"</li>"}return n.legendHtml+="</ul>",n}return s(t,e),t}(m);t.makeFeatureServiceLegendAndSymbol=a,c.makeFeatureServiceLegendAndSymbol=a,t.makeMapServiceLegend=l,c.makeMapServiceLegend=l},,,,,,,,,,,,,,,,,function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(10),a=o(7),i=o(0),l=o(2),s=o(1),p=i.default("layers"),u=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return o=o,""==n.url.trim()&&(n._loaded=!0),n._style=void 0===o.style?void 0:o.style,n.visible?n._autoLoad=!0:n._autoLoad="boolean"==typeof o.autoLoad&&o.autoLoad,n._onDemand="boolean"==typeof o.onDemand&&o.onDemand,n._onDemandDelay="number"==typeof o.onDemandDelay?o.onDemandDelay:300,o.mapMoveObj?n._mapMove=o.mapMoveObj:n._mapMove=n._onDemand?a.default:void 0,n._mapMoveMakeGetParams="function"==typeof o.mapMoveMakeGetParams?o.mapMoveMakeGetParams:function(){return{}},n._onDemand&&(n._loaded=!0,n._mapMoveParams={},n._mapMove.checkInit(),n._mapMove.addVectorLayer(n)),n._source=new l.source.Vector,n._olLayer=new l.layer.Vector({source:n._source,visible:n.visible,style:n.style,minResolution:n._minResolution,maxResolution:n._maxResolution,renderOrder:o.renderOrder}),n.olLayer.setZIndex(n._zIndex),n._projectionMap=null,n._projection4326=new l.proj.Projection({code:"EPSG:4326"}),n._olLayer.setOpacity(n.opacity),n}return n(t,e),t.prototype.addFeatures=function(e){console.log("Layer vector base addFeatures is a placeholder and does nothing")},t.prototype.mapMoveBefore=function(e,t){return!(void 0!==this.minZoom&&e<this.minZoom)&&(!(void 0!==this.maxZoom&&e>this.maxZoom)&&this.visible)},t.prototype.mapMoveMakeGetParams=function(e,t){this._mapMoveParams={},s.extend(this._mapMoveParams,this.params),s.extend(this._mapMoveParams,this._mapMoveMakeGetParams(this,e,t))},t.prototype.mapMoveCallback=function(e){this.source&&this._source.clear()},t.prototype.clear=function(){this._source&&this._source.clear()},Object.defineProperty(t.prototype,"onDemandDelay",{get:function(){return this._onDemandDelay},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoLoad",{get:function(){return this._autoLoad},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this._style},set:function(e){this._style=e,this.olLayer.setStyle(this._style)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapCrs",{get:function(){return null==this.mapProj?null:this.mapProj.getCode()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapProj",{get:function(){return null!=this._projectionMap?this._projectionMap:this._mapMove?(this._projectionMap=this._mapMove.map.getView().getProjection(),this._projectionMap):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapMove",{get:function(){return this._mapMove},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapMoveParams",{get:function(){return this._mapMoveParams},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){e.prototype.setVisible.call(this,t),this._onDemand&&this.mapMove.triggerLyrLoad(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return this.source.getFeatures()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"olLayer",{get:function(){return e.prototype.getOlLayer.call(this)},enumerable:!0,configurable:!0}),t.prototype.setZIndex=function(e){this.olLayer.setZIndex(e)},t}(r.LayerBase);t.LayerBaseVector=u,p.LayerBaseVector=u,t.default=u},,,function(e,t,o){"use strict";function n(e){var t=new Date(e),o=t.toLocaleTimeString().split(" "),n=o[0].split(":");return n=n.slice(0,2),t.toLocaleDateString()+"<br>"+n.join(":")+" "+o[1]}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),a=o(51),i=o(1),l=r.default("domUtil"),s=function(){function e(e,t,o){void 0===t&&(t=function(){}),void 0===o&&(o={});var n=this;o.min="number"==typeof o.min?o.min:0,o.max="number"==typeof o.max?o.max:100,o.val="number"==typeof o.val?o.val:0,o.step="number"==typeof o.step?o.step:5,o.playInterval="number"==typeof o.playInterval?o.playInterval:500,o.showAsDate="boolean"==typeof o.showAsDate&&o.showAsDate,"string"==typeof e?this._container=i("#"+e):void 0!==e.style?this._container=i(e):this._container=e,this._container.addClass("media-control-container"),this._playInterval=o.playInterval,this._changeFunc=t,this._showAsDate=o.showAsDate,this._currentValue=void 0,this._min=void 0,this._max=void 0,this._step=void 0,this._playing=!1,this._container.append('<span class="media-player-button media-back"></span><span class="media-player-button media-play"></span><span class="media-player-button media-pause media-disabled"></span><span class="media-player-button media-stop media-disabled" ></span><span class="media-player-button media-ahead"></span><input type="range"><div class="media-control-value-label-container"><span class="media-control-value-label-min"></span><span class="media-control-value-label-val"></span><span class="media-control-value-label-max"></span></div>');var r=this._container.find(".media-play");this._$btnStop=this._container.find(".media-stop");var l=this._container.find(".media-ahead"),s=this._container.find(".media-back");this._$slider=this._container.find("input[type=range]"),this._$valLabelMin=this._container.find(".media-control-value-label-min"),this._$valLabelVal=this._container.find(".media-control-value-label-val"),this._$valLabelMax=this._container.find(".media-control-value-label-max"),this.setMinMaxValueStep(o.min,o.max,o.val,o.step),a.rangeChange(this._$slider,function(e){n.currentValue=e},100);var p=this;r.click(function(){i(this).addClass("media-disabled"),p._$btnStop.removeClass("media-disabled"),l.addClass("media-locked"),s.addClass("media-locked"),p._$slider.prop("disabled",!0),p._playing=!0,p._interval=setInterval(function(){p.currentValue+=p._step},p._playInterval)}),this._$btnStop.click(function(){clearInterval(p._interval),i(this).addClass("media-disabled"),r.removeClass("media-disabled"),l.removeClass("media-locked"),s.removeClass("media-locked"),p._$slider.prop("disabled",!1),p._playing=!1}),l.click(function(){p.currentValue=p.currentValue+p._step}),s.click(function(){p.currentValue=p.currentValue-p._step})}return e.prototype.stopPlaying=function(){this._playing&&this._$btnStop.trigger("click")},Object.defineProperty(e.prototype,"playing",{get:function(){return this._playing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentValue",{get:function(){return this._currentValue},set:function(e){e>this._max?e=this._min:e<this._min&&(e=this._max),this._currentValue=e,this._$slider.val(this._currentValue.toFixed(2)),this._showAsDate?this._$valLabelVal.html(n(this.currentValue)):this._$valLabelVal.html(this.currentValue.toString()),this._changeFunc(e)},enumerable:!0,configurable:!0}),e.prototype.setMinMaxValueStep=function(e,t,o,r){this._min=e,this._max=t,o="number"==typeof o?o:e,r="number"==typeof r?r:(t-e)/20,this._currentValue=o,this._step=r,this._$slider.prop("min",this.min.toString()),this._$slider.prop("max",this.max.toString()),this._$slider.prop("step",this.step.toString()),this._$slider.val(this.currentValue.toString()),this._showAsDate?(this._$valLabelMin.html(n(this._min)),this._$valLabelVal.html(n(this.currentValue)),this._$valLabelMax.html(n(this._max))):(this._$valLabelMin.html(this._min.toString()),this._$valLabelVal.html(this.currentValue.toString()),this._$valLabelMax.html(this._max.toString()))},Object.defineProperty(e.prototype,"changeFunction",{set:function(e){this._changeFunc=e},enumerable:!0,configurable:!0}),e}();t.MediaControl=s,l.MediaControl=s},,,,function(e,t,o){"use strict";function n(e,t){var o=parseFloat(this.value),n=parseFloat(this.min),r=parseFloat(this.max);r-o<parseFloat(this.step)&&(o=r);var i=(o-n)/(r-n);"number"==typeof a&&o==a||(a=o,e(o,i,t))}function r(e,t,o){return o="number"==typeof o?o:75,e.mouseenter(function(){s=!0}),e.mouseleave(function(){s=!1,p=!1}),e.mousedown(function(){p=!0}),e.mouseup(function(){p=!1}),e.mousemove(function(e){if(s&&p&&(c=!0,a!=this.value)){a=this.value,null!=u&&clearTimeout(u);var r=this;u=setTimeout(function(){n.call(r,t,e),u=null},o)}}),e.keyup(function(e){37!=e.keyCode&&39!=e.keyCode||n.call(this,t,e)}),e.change(function(e){if(c)return void(c=!1);n.call(this,t,e)}),this}Object.defineProperty(t,"__esModule",{value:!0});var a,i=o(0),l=i.default("domUtil"),s=!1,p=!1,u=null,c=!1;t.rangeChange=r,l.rangeChange=r},,,,,,,function(e,t,o){"use strict";function n(e,t,o){return"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/"+e+"/"+t+"/MapServer/"+o}var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=o(44),i=o(27),l=o(0),s=o(2),p=o(1),u=l.default("layers");t.makeServiceUrl=n;var c=function(e){function t(t,o){var n=this;return"object"!=typeof o.params&&(o.params={}),o.params.where=o.where||"1=1",o.params.outFields=o.outFields||"*",o.params.f=o.format||"pjson",o.params.outSR=o.outSR||3857,n=e.call(this,t,o)||this,n._outSR=n.params.outSR,n._esriFormat=new s.format.EsriJSON,"/"!==n._url[n._url.length-1]&&(n._url+="/"),n._urlCopy=n.url,n._url+="query?callback=?",(n.autoLoad||n.visible)&&n._load(),n._useEsriStyle="boolean"==typeof o.useEsriStyle&&o.useEsriStyle,n._useEsriStyle&&n.addLegendContent(),n}return r(t,e),t.prototype.addLegendContent=function(t){var o=this;this._useEsriStyle?p.get(this._urlCopy+"?f=pjson&callback=?",{},function(t){if(t.subLayers.length>0)return void alert("should only use single feature layers, not groups");var n=i.makeFeatureServiceLegendAndSymbol(t);o.style=n.style,e.prototype.addLegendContent.call(o,n.legend)},"json"):e.prototype.addLegendContent.call(this,t)},t.prototype.addFeatures=function(e){var t=this._esriFormat.readFeatures(e);this.source.addFeatures(t)},t.prototype._load=function(){var t=this;return!!e.prototype._load.call(this)||(p.get(this._url,this.params,function(e){t.addFeatures(e),t.loadCallback(t)},"json").fail(function(){t._loaded=!1}),!1)},t.prototype.mapMoveMakeGetParams=function(t,o){e.prototype.mapMoveMakeGetParams.call(this,t,o),this.mapMoveParams.geometry=t.minX+","+t.minY+","+t.maxX+","+t.maxY,this.mapMoveParams.geometryType="esriGeometryEnvelope",this.mapMoveParams.spatialRel="esriSpatialRelIntersects",this.mapMoveParams.spatialRel="esriSpatialRelIntersects",this.mapMoveParams.inSR=3857,3857==this._outSR&&(this.mapMoveParams.geometryPrecision=1)},t.prototype.mapMoveBefore=function(t,o){return e.prototype.mapMoveBefore.call(this,t,o)},t.prototype.mapMoveCallback=function(t){e.prototype.mapMoveCallback.call(this,t),this.source.addFeatures(this._esriFormat.readFeatures(t))},t}(a.LayerBaseVector);t.LayerBaseVectorEsri=c,u.LayerBaseVectorEsri=c,t.default=c},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(62),a=o(65),i=o(0),l=i.default("layers"),s=function(e){function t(t){var o=this;return t.animate="boolean"==typeof t.animate&&t.animate,t.animate?(o=e.call(this,"",t)||this,o._products=t.products,o.animator=new a.default(o,t.timeLoadCallback),o.animator.timeInit()):(o=e.call(this,"http://realearth.ssec.wisc.edu/api/image?products="+t.products+"&x={x}&y={y}&z={z}",t)||this,o._products=t.products),o}return n(t,e),t.prototype.setLayerTime=function(e){return!!this.animator&&this.animator.setLayerTime(e)},t.prototype._load=function(){return!this.animator&&e.prototype._load.call(this)},t}(r.LayerBaseXyzTile);t.LayerRealEarthTile=s,l.LayerRealEarthTile=s,t.default=s},,,function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(10),a=o(0),i=o(2),l=a.default("layers"),s=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._source=new i.source.XYZ({url:""==n.url?void 0:n.url}),n._olLayer=new i.layer.Tile({source:n._source,visible:n.visible,opacity:n.opacity,minResolution:n._minResolution,maxResolution:n._maxResolution}),n._olLayer.setZIndex(n._zIndex),n}return n(t,e),Object.defineProperty(t.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"olLayer",{get:function(){return this._olLayer},enumerable:!0,configurable:!0}),t}(r.LayerBase);t.LayerBaseXyzTile=s,l.LayerBaseXyzTile=s,t.default=s},,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=o(4),a=o(1),i=n.default("mixin"),l=(new Date).getTimezoneOffset(),s=function(){function e(e,t){this.lyr=e,this._products=e._products,this.loadCallback=t?t:function(){}}return e.prototype.timeInit=function(){var e=this;this._rawDateStrings=[],this._localDates=[],this.localTimes=[],this._animateEnabled=!0,this._currentTime=void 0,this._currentIndex=void 0,a.get("http://realearth.ssec.wisc.edu/api/products",{products:this._products},function(t){if(0==t.length)return void console.log(e._products+" layer not available or does not have times");t=t[0];for(var o=0;o<t.times.length;o++)e._loadDates.call(e,t.times[o]);e.loadCallback.call(e.lyr,e.lyr),e._loadLatest.call(e)},"json")},e.prototype._loadDates=function(e){var t=e.slice(0,4),o=e.slice(4,6),n=e.slice(6,8),r=e.slice(9,11),a=e.slice(11,13),i=e.slice(13,15),s=e.replace(".","_");this._rawDateStrings.push(s);var p=o+"/"+n+"/"+t+" "+r+":"+a+":"+i,u=new Date(p);return u.setMinutes(u.getMinutes()-l),this._localDates.push(u),this.localTimes.push(u.getTime()),s},e.prototype._loadLatest=function(){return r.default.closePopup(),this.localTimes.length>0&&(this._currentIndex=this.localTimes.length-1,!0)},e.prototype.setLayerTime=function(e){this._currentTime=e;var t;if(e<this.localTimes[0])return!1;e>this.localTimes[this.localTimes.length-1]&&(t=this.localTimes.length-1);for(var o=0;o<this.localTimes.length;o++)if(this.localTimes[o]>=e){t=o;break}return t!=this._currentIndex&&(this._currentIndex=t,r.default.closePopup(),!0)},e}();t.RealEarthAnimate=s,i.RealEarthAnimate=s,t.default=s},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(64),a=o(0),i=a.default("mixin"),l=function(e){function t(t,o){var n=e.call(this,t,o)||this;return n._source=t.source,n._olLayer=t.olLayer,n}return n(t,e),t.prototype.timeInit=function(){e.prototype.timeInit.call(this),this._sourceUrls=[]},t.prototype._loadDates=function(t){var o=e.prototype._loadDates.call(this,t),n="http://realearth.ssec.wisc.edu/api/image?products="+this._products+"_"+o+"&x={x}&y={y}&z={z}";return this._sourceUrls.push(n),""},t.prototype._loadLatest=function(){return e.prototype._loadLatest.call(this)&&this._source.setUrl(this._sourceUrls[this._sourceUrls.length-1]),!0},t.prototype.setLayerTime=function(t){return e.prototype.setLayerTime.call(this,t)?(this._olLayer.getZIndex()<0&&this._olLayer.setZIndex(0),this._source.setUrl(this._sourceUrls[this._currentIndex])):this._olLayer.setZIndex(-1),!0},t}(r.default);i.RealEarthAnimateTile=l,t.default=l},,,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(6),r=o(59),a=o(47),i=o(1),l=o(58),s=o(25),p=new r.default({products:"nexrhres",id:"nexrhres-static",opacity:.6,animate:!0,name:"Hybrid Reflectivity",timeLoadCallback:function(e){console.log(e)}}),u=new Date,c=u.getTime();u.setHours(u.getHours()-4);var d=u.getTime(),h=Math.round((c-d)/8),y=(new a.MediaControl(i("#control"),function(e){p.setLayerTime(e)},{min:d,max:c,val:c,step:h,playInterval:750,showAsDate:!0}),n.quickMap());y.addLayer(p.olLayer);var f=new l.LayerBaseVectorEsri("https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0",{visible:!0,autoLoad:!0,name:"Coordination",useEsriStyle:!0});y.addLayer(f.olLayer);for(var m=[["Cameras","cameras33"],["HAR","HAR33"],["DMS","MessageSigns33"],["Traffic Control","TrafficControl33"],["Traffic Detection","TrafficDetectionMulti"],["Weather","Weather33"]],_=0;_<m.length;_++){var v=new s.LayerEsriMapServer("http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/"+m[_][1]+"/MapServer",{id:m[_][1],name:m[_][0],visible:!0,minZoom:7,zIndex:20,addPopup:!0,legendCollapse:!0});y.addLayer(v.olLayer)}}]); //# sourceMappingURL=animate.js.map \ No newline at end of file diff --git a/test/serve/js/animate.js.map b/test/serve/js/animate.js.map index 26468be85fded88921a4ab721d6dadf394bf7647..2432165a815e2f77f1de3b9fe73f26f01227d88b 100644 --- a/test/serve/js/animate.js.map +++ b/test/serve/js/animate.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 7bb55fd41bd308ae26ba","webpack:///./src/util/provide.ts","webpack:///external \"$\"","webpack:///external \"ol\"","webpack:///./src/util/makeGuid.ts","webpack:///./src/olHelpers/mapInteractionBase.ts","webpack:///./src/olHelpers/quickMap.ts","webpack:///./src/olHelpers/mapMove.ts","webpack:///./src/olHelpers/mapPopup.ts","webpack:///./src/olHelpers/projections.ts","webpack:///./src/util/checkDefined.ts","webpack:///./src/layers/LayerBase.ts","webpack:///./src/olHelpers/geocode.ts","webpack:///./src/olHelpers/mapMoveCls.ts","webpack:///./src/olHelpers/mapPopupCls.ts","webpack:///./src/olHelpers/quickMapBase.ts","webpack:///./src/olHelpers/zoomResolutionConvert.ts","webpack:///./src/layers/LayerEsriMapServer.ts","webpack:///./src/olHelpers/esriToOlStyle.ts","webpack:///./src/layers/LayerBaseVector.ts","webpack:///./src/domUtil/media-control.ts","webpack:///./src/domUtil/range-change.ts","webpack:///./src/layers/LayerBaseVectorEsri.ts","webpack:///./src/layers/LayerRealEarthTile.ts","webpack:///./src/layers/LayerBaseXyzTile.ts","webpack:///./src/mixin/RealEarthAnimate.ts","webpack:///./src/mixin/RealEarthAnimateTile.ts","webpack:///./src/_tests/demos/animate.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AChEA;;GAEG;;;AAGH;;;;GAIG;AACH,iBAAiB,SAAiB;IAC9B,YAAY,CAAC;IACb,EAAE,C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I,EAAE,cAAc;IACpB,YAAY,EAAE,IAAI;CACrB,CACJ,CAAC;AAEF,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;AAEpC,IAAI,cAAc,GAAG;IACjB,CAAC,SAAS,EAAE,WAAW,CAAC;IACxB,CAAC,KAAK,EAAE,OAAO,CAAC;IAChB,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACzB,oCAAoC;IACpC,CAAC,iBAAiB,EAAE,kBAAkB,CAAC;IACvC,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;IAC9C,CAAC,SAAS,EAAE,WAAW,CAAC;CAC3B,CAAC;AAGF,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;IAC7C,IAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,4DAA0D,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,eAAY,EAC1F;QACI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxB,IAAI,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE,IAAI;KACvB,CACJ,CAAC;IACF,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC","file":"animate.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 69);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7bb55fd41bd308ae26ba","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachLayerAtPixel(pixel, (lyr) => {\r\n if (hit){\r\n return;\r\n }\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == lyr){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbj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FrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpK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BxoV4//PfAgGCu+Rlm4SvZizyDH+0reDHp92iO0BuX3bCfItl0PEwvYLqpwXG2MHlGsQ4S8pMJZv1JGmHiEoHQDdOjwmVlEP/nE9ADKjI8xLI0OOGITfy0SbeG/C2jKUDGSlDhM9I3IpK9iup6XnbRNC7yqueNsJCCIiXzdQhnaGN+46umnEdy5U5UbUJ48LFM9GkJo8BdDOiAZ7ZIQbKhYLMqvhU2wmNxjEAsS2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer`\r\n}\r\n\r\nexport function localCacheUrl(folder: string, service: string): string{\r\n let loc = window.location.href;\r\n\r\n let url = `/mapserver/${folder}/${service}`;\r\n\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1){\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1){\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n } else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url\r\n }\r\n }\r\n\r\n\r\n return url;\r\n}\r\n\r\n\r\n\r\n\r\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n addPopup?: boolean;\r\n showLayers?: Array<number>;\r\n getLegend?: boolean;\r\n}\r\n\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nexport class LayerEsriMapServer extends LayerBase {\r\n _esriFormat: ol.format.EsriJSON;\r\n _popupRequest: JQueryXHR;\r\n _showLayers: number[];\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n constructor(url: string, options: LayerEsriMapServerOptions = {}) {\r\n\r\n super(url, options);\r\n this._source = new ol.source.TileArcGISRest(\r\n {\r\n url: this.url == '' ? undefined : this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : {layers: 'show:' + options.showLayers.join(',')}\r\n }\r\n );\r\n\r\n this._showLayers = options.showLayers || [];\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.Tile,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n });\r\n\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\r\n this._esriFormat = new ol.format.EsriJSON();\r\n this._popupRequest = null;\r\n\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n\r\n if (options.getLegend){\r\n this.addLegendContent();\r\n }\r\n\r\n if (options.addPopup) {\r\n mapPopup.addMapServicePopup(this);\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n\r\n $.get(urlCopy, {}, (d) => {\r\n let newHtml = esriToOl.makeMapServiceLegend(d, this._showLayers);\r\n super.addLegendContent(newHtml);\r\n }, 'json');\r\n }\r\n\r\n\r\n getPopupInfo(queryParams: {[s: string]: any}) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'identify?callback=?';\r\n\r\n let __this = this;\r\n\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n\r\n\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (let r of d['results']) {\r\n\r\n let popupHtml = '<table class=\"esri-popup-table\">';\r\n\r\n for (let a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n let attrVal = r['attributes'][a];\r\n\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n\r\n let attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n\r\n popupHtml += `<tr><td>${attr}</td><td>${attrVal}</td></tr>`;\r\n }\r\n }\r\n\r\n popupHtml += '</table>';\r\n\r\n mapPopup.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get source(): ol.source.TileArcGISRest {\r\n return super.getSource() as ol.source.TileArcGISRest;\r\n }\r\n\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get olLayer(): ol.layer.Tile {\r\n return super.getOlLayer() as ol.layer.Tile;\r\n }\r\n}\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexport default LayerEsriMapServer;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerEsriMapServer.ts","/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers.esriToOlStyle');\r\n\r\n\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray: [number, number, number], opacity: number): string {\r\n \"use strict\";\r\n\r\n return `rgba(${colorArray[0]},${colorArray[1]},${colorArray[2]},${opacity})`;\r\n}\r\n\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str: string): string {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface iEsriResponse{\r\n drawingInfo: {\r\n renderer: iEsriRenderer;\r\n transparency: number\r\n },\r\n geometryType: string\r\n}\r\n\r\n\r\nexport interface iEsriRenderer{\r\n type: string;\r\n symbol: iEsriSymbol;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n field1: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultLabel: string;\r\n}\r\n\r\nexport interface iEsriSymbol{\r\n size: number;\r\n type: string;\r\n outline:{\r\n color: [number, number, number];\r\n width: number;\r\n },\r\n color: [number, number, number];\r\n width: number;\r\n imageData: string\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n legendHtml: string;\r\n opacity: number;\r\n symbolObj: iEsriSymbol;\r\n olStyle: ol.style.Style;\r\n\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\ninterface ICommonSymbol{\r\n new (symbolObj: iEsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSMS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n let radius = this.symbolObj.size;\r\n\r\n\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({color: outerColor, width: outlineWidth})\r\n })\r\n });\r\n this.legendHtml = `<span class=\"legend-layer-icon\" style=\"color: ${innerColor}\">●</span>`;\r\n break;\r\n case 'esriPMS':\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({src: `data:image/png;base64,${this.symbolObj['imageData']}`})\r\n });\r\n this.legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${this.symbolObj['imageData']}\">`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass LineSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSLS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let lineWidth = this.symbolObj.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 4px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: -1px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass PolygonSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj['type']) {\r\n case 'esriSFS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `border: solid ${outerColor} 1px;`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 9px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: 2px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nexport interface iStyleFunc{\r\n (f: ol.Feature): ol.style.Style| ol.style.Style[]\r\n}\r\n\r\nclass SymbolGenerator {\r\n opacity: number;\r\n renderer: iEsriRenderer;\r\n legendHtml: string;\r\n olStyle: iStyleFunc | ol.style.Style;\r\n\r\n constructor(esriResponse: iEsriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n symbol: iEsriSymbol;\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.symbol = this.renderer.symbol;\r\n let symbolObj = new SymbolClass(this.symbol, this.opacity);\r\n this.olStyle = symbolObj.olStyle;\r\n this.legendHtml = symbolObj.legendHtml;\r\n }\r\n}\r\n\r\nclass UniqueValueSymbol extends SymbolGenerator {\r\n\r\n propertyName: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultStyle: ol.style.Style;\r\n defaultLabelHtml: string;\r\n labelArray: Array<string>;\r\n legendArray: Array<string>;\r\n propertyStyleLookup: {[s: string]: ol.style.Style};\r\n valueArray: Array<any>;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.uniqueValueInfos = this.renderer.uniqueValueInfos;\r\n this.propertyName = this.renderer.field1;\r\n this.defaultSymbol = this.renderer.defaultSymbol;\r\n\r\n\r\n if (this.defaultSymbol) {\r\n let symbolObj = new SymbolClass(this.defaultSymbol, this.opacity);\r\n this.defaultStyle = symbolObj.olStyle;\r\n this.defaultLabelHtml = `<span class=\"legend-layer-subitem\">${htmlEscape(this.renderer['defaultLabel'])}</span>` + symbolObj.legendHtml;\r\n } else {\r\n this.defaultStyle = undefined;\r\n this.defaultLabelHtml = 'other';\r\n }\r\n\r\n this.valueArray = [];\r\n this.labelArray = [];\r\n this.legendArray = [];\r\n this.propertyStyleLookup = {};\r\n\r\n for (let uniqueVal of this.uniqueValueInfos) {\r\n this.labelArray.push(uniqueVal['label']);\r\n this.valueArray.push(uniqueVal['value']);\r\n let uniqueSym = new SymbolClass(uniqueVal.symbol, this.opacity);\r\n this.legendArray.push(`<span class=\"legend-layer-subitem\">${htmlEscape(uniqueVal['label'])}</span>` + uniqueSym.legendHtml);\r\n this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n\r\n this.olStyle = (feature: ol.Feature): ol.style.Style[] => {\r\n let checkProperties = feature.getProperties();\r\n let checkProperty = checkProperties[this.propertyName];\r\n\r\n if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [this.propertyStyleLookup[checkProperty]];\r\n } else {\r\n return [this.defaultStyle];\r\n }\r\n };\r\n\r\n if (this.defaultLabelHtml !== null) {\r\n this.legendArray.push(this.defaultLabelHtml);\r\n }\r\n\r\n this.legendHtml = '<ul>';\r\n for (let h of this.legendArray) {\r\n this.legendHtml += `<li>${h}</li>`;\r\n }\r\n this.legendHtml += '</ul>';\r\n }\r\n}\r\n\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: iEsriResponse): {style: iStyleFunc | ol.style.Style, legend: string} {\r\n \"use strict\";\r\n let renderer = esriResponse.drawingInfo.renderer;\r\n let symbolLegendOut: SymbolGenerator = null;\r\n\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n\r\n if (symbolLegendOut == null) {\r\n return {style: undefined, legend: ''};\r\n } else {\r\n return {style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml};\r\n }\r\n}\r\n\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\r\n\r\nexport interface iMapServiceLegend{\r\n layerName: string;\r\n legend: {label: string, imageData: string}[]\r\n}\r\n\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject: iMapServiceLegend, skipLayerNameAndExpander: boolean = false) {\r\n\r\n\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n let layerName = lyrObject['layerName'];\r\n let legendItems = lyrObject['legend'];\r\n let legendHtml = '';\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += `<span class=\"legend-layer-subitem\">${layerName}</span>`;\r\n }\r\n\r\n if (legendItems.length == 1) {\r\n legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[0]['imageData']}\">`;\r\n } else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (let i = 0; i < legendItems.length; i++) {\r\n legendHtml += `<li>`;\r\n legendHtml += `<span class=\"legend-layer-subitem\">${htmlEscape(legendItems[i]['label'])}</span>`;\r\n legendHtml += `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[i]['imageData']}\">`;\r\n legendHtml += `</li>`;\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = `<span class=\"legend-layer-subitem\">${layerName}</span>` + legendHtml;\r\n }\r\n\r\n return legendHtml;\r\n}\r\n\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse: {layers: iMapServiceLegend[]}, showLayers: number[] = []) {\r\n \"use strict\";\r\n\r\n let newLegendHtml = '';\r\n\r\n let layers = esriResponse['layers'];\r\n\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n } else {\r\n newLegendHtml += '<ul>';\r\n for (let i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0){\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n\r\n return newLegendHtml;\r\n}\r\n\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/esriToOlStyle.ts","import {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport mapMove from '../olHelpers/mapMove';\r\nimport MapMoveCls from '../olHelpers/mapMoveCls'\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\nexport interface makeMapMoveParams {\r\n /**\r\n *\r\n * @param lyr\r\n * @param extent\r\n * @param zoomLevel\r\n */\r\n (lyr: LayerBaseVector, extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel?: number): any\r\n}\r\n\r\n\r\n\r\nexport interface LayerBaseVectorOptions extends LayerBaseOptions{\r\n autoLoad?: boolean;\r\n style?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n onDemand?: boolean;\r\n onDemandDelay?: number;\r\n mapMoveMakeGetParams?: makeMapMoveParams;\r\n mapMoveObj?: MapMoveCls;\r\n renderOrder?: (a: ol.Feature, b: ol.Feature) => number;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nexport class LayerBaseVector extends LayerBase {\r\n _olLayer: ol.layer.Vector;\r\n _source: ol.source.Vector;\r\n _style: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n _autoLoad: boolean;\r\n _onDemand: boolean;\r\n _onDemandDelay: number;\r\n _mapMoveMakeGetParams: makeMapMoveParams;\r\n _mapMoveParams: any;\r\n _mapMove: MapMoveCls;\r\n _projectionMap: ol.proj.Projection;\r\n _projection4326: ol.proj.Projection;\r\n\r\n\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n constructor(url: string, options: LayerBaseVectorOptions = {}) {\r\n super(url, options);\r\n\r\n options = options as LayerBaseVectorOptions;\r\n\r\n //prevent regular load if no url has been provided\r\n if (this.url.trim() == '') {\r\n this._loaded = true;\r\n }\r\n\r\n this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\r\n if (this.visible) {\r\n this._autoLoad = true;\r\n } else {\r\n this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n\r\n this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\r\n if (options.mapMoveObj) {\r\n this._mapMove = options.mapMoveObj;\r\n } else {\r\n this._mapMove = this._onDemand ? mapMove : undefined;\r\n }\r\n\r\n\r\n this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () {return {};};\r\n\r\n if (this._onDemand) {\r\n this._loaded = true;\r\n this._mapMoveParams = {};\r\n this._mapMove.checkInit();\r\n this._mapMove.addVectorLayer(this);\r\n }\r\n\r\n this._source = new ol.source.Vector();\r\n\r\n\r\n this._olLayer = new ol.layer.Vector(\r\n {\r\n source: this._source,\r\n visible: this.visible,\r\n style: this.style,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution,\r\n renderOrder: options.renderOrder\r\n }\r\n );\r\n\r\n this.olLayer.setZIndex(this._zIndex);\r\n\r\n this._projectionMap = null;\r\n this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\r\n this._olLayer.setOpacity(this.opacity)\r\n }\r\n\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n addFeatures(featureCollection: Object) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n return this.visible;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * clear features in the layer\r\n */\r\n clear() {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get onDemandDelay(): number {\r\n return this._onDemandDelay;\r\n }\r\n\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get autoLoad(): boolean {\r\n return this._autoLoad;\r\n }\r\n\r\n /**\r\n * get the style definition\r\n */\r\n get style(): ol.StyleFunction|Array<ol.style.Style>|ol.style.Style {\r\n return this._style;\r\n }\r\n\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set style(style: ol.StyleFunction|Array<ol.style.Style>|ol.style.Style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style as ol.style.Style);\r\n }\r\n\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get mapCrs(): string {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n }\r\n\r\n get mapProj(): ol.proj.Projection{\r\n if (this._projectionMap != null){\r\n return this._projectionMap;\r\n }\r\n\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get mapMove(): MapMoveCls {\r\n return this._mapMove;\r\n }\r\n\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get mapMoveParams() {\r\n return this._mapMoveParams;\r\n }\r\n\r\n get visible(): boolean{\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set visible(visibility) {\r\n super.setVisible(visibility);\r\n\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n }\r\n\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get source(): ol.source.Vector {\r\n return this.getSource() as ol.source.Vector;\r\n }\r\n\r\n /**\r\n * array of ol features\r\n */\r\n get features(): Array<ol.Feature> {\r\n return this.source.getFeatures();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n get olLayer(): ol.layer.Vector {\r\n return super.getOlLayer() as ol.layer.Vector;\r\n }\r\n\r\n protected setZIndex(newZ: number) {\r\n this.olLayer.setZIndex(newZ);\r\n }\r\n}\r\n\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexport default LayerBaseVector;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVector.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport {rangeChange} from './range-change';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('domUtil');\r\n\r\n/**\r\n * @callback mediaCallback\r\n * @param {number} tm\r\n */\r\n\r\nfunction timeToLocalDateString(tm: number) {\r\n \"use strict\";\r\n let d = new Date(tm);\r\n let p1 = d.toLocaleTimeString().split(' ');\r\n let p2 = p1[0].split(':');\r\n p2 = p2.slice(0, 2);\r\n\r\n return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n}\r\n\r\nexport interface changeFunction {\r\n (newVal?: number): void;\r\n}\r\n\r\nexport interface mediaRangeConfig {\r\n min?: number;\r\n max?: number;\r\n val?: number;\r\n step?: number;\r\n playInterval?: number;\r\n showAsDate?: boolean;\r\n}\r\n\r\n\r\nexport class MediaControl {\r\n _container: JQuery;\r\n _min: number;\r\n _max: number;\r\n _playInterval: number;\r\n _step: number;\r\n _currentValue: number;\r\n\r\n _playing: boolean;\r\n\r\n _$btnStop: JQuery;\r\n _$slider: JQuery;\r\n _$valLabelVal: JQuery;\r\n _$valLabelMin: JQuery;\r\n _$valLabelMax: JQuery;\r\n _interval: number;\r\n _showAsDate: boolean;\r\n\r\n _changeFunc: changeFunction;\r\n\r\n /**\r\n *\r\n * @param element\r\n * @param changeFunc\r\n * @param mediaConfig\r\n */\r\n constructor(element: JQuery | HTMLElement | string,\r\n changeFunc: changeFunction = (): void => {\r\n return;\r\n },\r\n mediaConfig: mediaRangeConfig = {}) {\r\n\r\n mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n\r\n if (typeof element == 'string') {\r\n this._container = $('#' + element);\r\n }\r\n else if (typeof (element as HTMLElement).style !== 'undefined') {\r\n this._container = $(element);\r\n } else {\r\n this._container = element as JQuery;\r\n }\r\n\r\n this._container.addClass('media-control-container');\r\n this._playInterval = mediaConfig.playInterval;\r\n this._changeFunc = changeFunc;\r\n\r\n this._showAsDate = mediaConfig.showAsDate;\r\n\r\n this._currentValue = undefined;\r\n this._min = undefined;\r\n this._max = undefined;\r\n this._step = undefined;\r\n this._playing = false;\r\n\r\n let htmlStr =\r\n '<span class=\"media-player-button media-back\"></span>' +\r\n '<span class=\"media-player-button media-play\"></span>' +\r\n '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n '<span class=\"media-player-button media-ahead\"></span>' +\r\n `<input type=\"range\">` +\r\n `<div class=\"media-control-value-label-container\">` +\r\n `<span class=\"media-control-value-label-min\"></span>` +\r\n `<span class=\"media-control-value-label-val\"></span>` +\r\n `<span class=\"media-control-value-label-max\"></span>` +\r\n `</div>`;\r\n\r\n this._container.append(htmlStr);\r\n\r\n // let btnPause = this._container.find('.media-pause');\r\n let btnPlay = this._container.find('.media-play');\r\n this._$btnStop = this._container.find('.media-stop');\r\n let btnAhead = this._container.find('.media-ahead');\r\n let btnBack = this._container.find('.media-back');\r\n this._$slider = this._container.find('input[type=range]');\r\n\r\n this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n\r\n this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n\r\n rangeChange(this._$slider, (newVal) => {\r\n this.currentValue = newVal;\r\n }, 100);\r\n\r\n let ___this = this;\r\n\r\n btnPlay.click(function () {\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n ___this._$btnStop.removeClass('media-disabled');\r\n btnAhead.addClass('media-locked');\r\n btnBack.addClass('media-locked');\r\n ___this._$slider.prop('disabled', true);\r\n ___this._playing = true;\r\n\r\n ___this._interval = setInterval(function () {\r\n ___this.currentValue += ___this._step;\r\n }, ___this._playInterval);\r\n });\r\n\r\n this._$btnStop.click(function () {\r\n clearInterval(___this._interval);\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n btnPlay.removeClass('media-disabled');\r\n btnAhead.removeClass('media-locked');\r\n btnBack.removeClass('media-locked');\r\n ___this._$slider.prop('disabled', false);\r\n ___this._playing = false;\r\n });\r\n\r\n btnAhead.click(function () {\r\n ___this.currentValue = ___this.currentValue + ___this._step;\r\n });\r\n\r\n btnBack.click(function () {\r\n ___this.currentValue = ___this.currentValue - ___this._step;\r\n });\r\n }\r\n\r\n stopPlaying() {\r\n if (this._playing) {\r\n this._$btnStop.trigger('click');\r\n }\r\n }\r\n\r\n get playing() {\r\n return this._playing;\r\n }\r\n\r\n get min() {\r\n return this._min;\r\n }\r\n\r\n get max() {\r\n return this._max;\r\n }\r\n\r\n get step() {\r\n return this._step;\r\n }\r\n\r\n get currentValue() {\r\n return this._currentValue;\r\n }\r\n\r\n set currentValue(newValue) {\r\n if (newValue > this._max) {\r\n newValue = this._min;\r\n } else if (newValue < this._min) {\r\n newValue = this._max;\r\n }\r\n this._currentValue = newValue;\r\n this._$slider.val(this._currentValue.toFixed(2));\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n } else {\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n }\r\n\r\n this._changeFunc(newValue);\r\n }\r\n\r\n /**\r\n * set min and max value with step\r\n * @param {number} newMin the new min\r\n * @param {number} newMax the new mas\r\n * @param {number} [newValue=newMin] the value to set\r\n * @param {number} [newStep=(newMax-newMin)/20] step value\r\n */\r\n setMinMaxValueStep(newMin: number, newMax: number, newValue: number, newStep: number) {\r\n this._min = newMin;\r\n this._max = newMax;\r\n\r\n newValue = typeof newValue == 'number' ? newValue : newMin;\r\n newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n\r\n this._currentValue = newValue;\r\n this._step = newStep;\r\n\r\n this._$slider.prop('min', this.min.toString());\r\n this._$slider.prop('max', this.max.toString());\r\n this._$slider.prop('step', this.step.toString());\r\n this._$slider.val(this.currentValue.toString());\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n } else {\r\n this._$valLabelMin.html(this._min.toString());\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n this._$valLabelMax.html(this._max.toString());\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {mediaCallback} newFunc the callback on change\r\n */\r\n set changeFunction(newFunc: changeFunction) {\r\n this._changeFunc = newFunc;\r\n }\r\n}\r\n\r\nnm.MediaControl = MediaControl;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/media-control.ts","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport {ChangeEvent} from \"react\";\r\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout: number = null;\r\nlet dragged = false;\r\nlet lastVal: number;\r\n\r\n\r\n/**\r\n * callback on range change interaction, context of this is the firing dom element\r\n * @callback rangeChangeCallback\r\n * @param {number} newValue\r\n * @param {number} ratio value from 0 to 1 relative of the value to the min and max\r\n * @param {object} evt\r\n */\r\n\r\n/***\r\n * callback funcion after the slider has been moved\r\n */\r\nexport interface rangeChangedCallback{\r\n /**\r\n *\r\n * @param newValue new value of the slider\r\n * @param ratio ratio from low to high, 0 to 1\r\n * @param evt the original event\r\n */\r\n (newValue: number, ratio: number, evt: ChangeEvent<HTMLInputElement>): any\r\n}\r\n\r\n\r\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nfunction triggerCallback(callback: rangeChangedCallback, evt: ChangeEvent<HTMLInputElement>) {\r\n \"use strict\";\r\n\r\n let val = parseFloat(this.value);\r\n let min = parseFloat(this.min);\r\n let max = parseFloat(this.max);\r\n let step = parseFloat(this.step);\r\n\r\n if (max - val < step){\r\n val = max;\r\n }\r\n\r\n let percent = (val - min) / (max - min);\r\n\r\n if (typeof lastVal == 'number' && val == lastVal){\r\n return;\r\n }\r\n lastVal = val;\r\n callback(val, percent, evt);\r\n}\r\n\r\n\r\n\r\n/**\r\n * Add a variety of listeners for range inputs applied to a common callback\r\n * @param $slider - jquery reference to the slider\r\n * @param {rangeChangeCallback} callback - the callback\r\n * @param {number} [changeTimeout=75] before the callback is called\r\n * @this {jQuery}\r\n * @returns {jQuery} the jQuery object\r\n */\r\nexport function rangeChange ($slider: JQuery, callback: rangeChangedCallback, changeTimeout: number) {\r\n\r\n changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n\r\n $slider.mouseenter(function () {\r\n mouseIn = true;\r\n });\r\n\r\n $slider.mouseleave(function () {\r\n mouseIn = false;\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n\r\n $slider.mouseup(function () {\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousemove(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n * @this {HTMLElement}\r\n */\r\n function (evt) {\r\n if (!(mouseIn && mouseDown)) {\r\n return;\r\n }\r\n\r\n dragged = true;\r\n\r\n if (lastVal == this['value']) {\r\n return;\r\n }\r\n lastVal = this['value'];\r\n\r\n if (timeout != null) {\r\n clearTimeout(timeout);\r\n }\r\n\r\n let _this = this;\r\n\r\n timeout = setTimeout(function () {\r\n triggerCallback.call(_this, callback, evt);\r\n timeout = null;\r\n\r\n }, changeTimeout);\r\n });\r\n\r\n $slider.keyup(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n */\r\n function (evt) {\r\n if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n triggerCallback.call(this, callback, evt);\r\n }\r\n });\r\n\r\n $slider.change(function (evt) {\r\n if (dragged) {\r\n dragged = false;\r\n\r\n return;\r\n }\r\n triggerCallback.call(this, callback, evt);\r\n });\r\n\r\n return this;\r\n}\r\n\r\nnm.rangeChange = rangeChange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/range-change.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nlet nm = provide('layers');\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @param {number} layer\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string, layer: number): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer/${layer}`\r\n}\r\n\r\nexport interface LayerBaseVectorEsriOptions extends LayerBaseVectorOptions{\r\n format?: string;\r\n outSR?: number;\r\n where?: string;\r\n outFields?: string;\r\n useEsriStyle?: boolean;\r\n}\r\n\r\n/**\r\n * Base layer for esri vector layers\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorEsri extends LayerBaseVector {\r\n _outSR: number;\r\n _esriFormat: ol.format.EsriJSON;\r\n _urlCopy: string;\r\n _useEsriStyle: boolean;\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n * @param {string} [options.where=1=1] the layer filter clause\r\n * @param {string} [options.outFields=*] comma separated list of output fields, defaults to all\r\n * @param {string} [options.format=pjson] the format the retrieve the data\r\n * @param {number} [options.outSR=3857] the output spatial reference, defaults to web mercator\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n * @param {boolean} [options.collapseLegend=false] if the legend should be initially collapsed\r\n * @param {number} [options.mapMoveMakeGetParams=function(extent, zoomLevel){}] function to create additional map move params\r\n */\r\n constructor(url: string, options: LayerBaseVectorEsriOptions) {\r\n\r\n if (typeof options.params != 'object') {\r\n options.params = {};\r\n }\r\n options.params['where'] = options.where || '1=1';\r\n options.params['outFields'] = options.outFields || '*';\r\n options.params['f'] = options.format || 'pjson';\r\n options.params['outSR'] = options.outSR || 3857;\r\n\r\n super(url, options);\r\n this._outSR = this.params['outSR'];\r\n this._esriFormat = new ol.format.EsriJSON();\r\n\r\n if (this._url[this._url.length - 1] !== '/') {\r\n this._url += '/';\r\n }\r\n\r\n this._urlCopy = this.url;\r\n this._url += 'query?callback=?';\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n\r\n this._useEsriStyle = typeof options.useEsriStyle == 'boolean' ? options.useEsriStyle : false;\r\n\r\n if (this._useEsriStyle) {\r\n this.addLegendContent();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content to add to legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n if (!this._useEsriStyle) {\r\n super.addLegendContent(additionalContent);\r\n } else {\r\n $.get(this._urlCopy + '?f=pjson&callback=?', {}, (d) => {\r\n if (d['subLayers'].length > 0) {\r\n alert('should only use single feature layers, not groups');\r\n\r\n return;\r\n }\r\n\r\n let newStyleAndLegend = esriToOl.makeFeatureServiceLegendAndSymbol(d);\r\n this.style = newStyleAndLegend.style;\r\n super.addLegendContent(newStyleAndLegend.legend);\r\n }, 'json');\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - features as esrijson\r\n */\r\n addFeatures(featureCollection: Object) {\r\n let feats = this._esriFormat.readFeatures(featureCollection);\r\n this.source.addFeatures(feats);\r\n }\r\n\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (super._load()) {\r\n return true;\r\n }\r\n $.get(this._url, this.params, (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(() => {\r\n this._loaded = false;\r\n });\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n super.mapMoveMakeGetParams(extent, zoomLevel);\r\n this.mapMoveParams['geometry'] = `${extent.minX},${extent.minY},${extent.maxX},${extent.maxY}`;\r\n this.mapMoveParams['geometryType'] = 'esriGeometryEnvelope';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['inSR'] = 3857;\r\n if (this._outSR == 3857) {\r\n this.mapMoveParams['geometryPrecision'] = 1;\r\n }\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n return super.mapMoveBefore(zoom, evtType);\r\n //if (super.mapMoveBefore(zoom, evtType)){\r\n // //place holder for additional processing\r\n // return true;\r\n //} else {\r\n // return false;\r\n //}\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this.source.addFeatures(this._esriFormat.readFeatures(d));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\nexport default LayerBaseVectorEsri;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVectorEsri.ts","/**\r\n * Created by gavorhes on 11/4/2015.\r\n */\r\n\r\nimport {LayerBaseXyzTile} from './LayerBaseXyzTile';\r\nimport {LayerBaseOptions} from './LayerBase';\r\nimport RealEarthAnimateTile from '../mixin/RealEarthAnimateTile';\r\nimport provide from '../util/provide';\r\nimport {IRealEarthAnimate, timesLoadedCallback} from \"../mixin/RealEarthAnimate\";\r\nconst nm = provide('layers');\r\n\r\nexport interface LayerRealEarthTileOptions extends LayerBaseOptions {\r\n products: string;\r\n animate?: boolean;\r\n timeLoadCallback?: timesLoadedCallback;\r\n}\r\n\r\n\r\n/**\r\n * Real earth tile\r\n * @augments LayerBaseXyzTile\r\n */\r\nexport class LayerRealEarthTile extends LayerBaseXyzTile implements IRealEarthAnimate {\r\n _products: string;\r\n animator: RealEarthAnimateTile;\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {string} options.products - the products to request\r\n * @param {boolean} [options.hasTimes=false] If the layer is time dependent, fixed set of dates\r\n * @param {boolean} [options.animate=false] if the layer should be animated\r\n */\r\n constructor(options: LayerRealEarthTileOptions) {\r\n options.animate = typeof options.animate == 'boolean' ? options.animate : false;\r\n if (options.animate) {\r\n super('', options);\r\n this._products = options.products;\r\n this.animator = new RealEarthAnimateTile(this, options.timeLoadCallback);\r\n this.animator.timeInit();\r\n } else {\r\n super(`http://realearth.ssec.wisc.edu/api/image?products=${options.products}&x={x}&y={y}&z={z}`, options);\r\n this._products = options.products;\r\n }\r\n }\r\n\r\n setLayerTime(theTime: number): boolean {\r\n if (this.animator) {\r\n return this.animator.setLayerTime(theTime);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n _load(): boolean {\r\n if (this.animator) {\r\n return false;\r\n }\r\n return super._load();\r\n }\r\n}\r\n\r\nnm.LayerRealEarthTile = LayerRealEarthTile;\r\nexport default LayerRealEarthTile;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerRealEarthTile.ts","/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('layers');\r\n\r\n\r\n/**\r\n * XYZ tile\r\n * @augments LayerBase\r\n */\r\nexport class LayerBaseXyzTile extends LayerBase {\r\n\r\n\r\n /**\r\n * The XYZ tile layer\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n super(url, options);\r\n this._source = new ol.source.XYZ({url: this.url == '' ? undefined : this.url});\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.XYZ,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n } );\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.XYZ} the vector source\r\n */\r\n get source(): ol.source.XYZ {\r\n return this._source as ol.source.XYZ;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.layer.Tile|ol.layer.Base|undefined} the ol layer\r\n */\r\n get olLayer() : ol.layer.Tile {\r\n return this._olLayer as ol.layer.Tile;\r\n }\r\n}\r\n\r\nnm.LayerBaseXyzTile = LayerBaseXyzTile;\r\nexport default LayerBaseXyzTile;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseXyzTile.ts","/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport LayerRealEarthTile from \"../layers/LayerRealEarthTile\";\r\nimport {LayerVectorRealEarth} from '../layers/LayerRealEarthVector'\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('mixin');\r\n\r\n\r\n/**\r\n * The GMT offset time in minutes\r\n * @type {number}\r\n */\r\nlet offsetMinutes = (new Date()).getTimezoneOffset();\r\n\r\nexport interface IRealEarthAnimate{\r\n setLayerTime(theTime: number): boolean;\r\n}\r\n\r\nexport interface timesLoadedCallback{\r\n (lyr?: LayerRealEarthTile|LayerVectorRealEarth): void;\r\n}\r\n\r\n\r\n/**\r\n * Mixin to get the product times\r\n * Be sure to call getTimeInit after the mixin has been applied\r\n */\r\nexport class RealEarthAnimate {\r\n _animateEnabled: boolean;\r\n _currentIndex: number;\r\n _localDates: Date[];\r\n _rawDateStrings: string[];\r\n _products: string;\r\n loadCallback: timesLoadedCallback;\r\n localTimes: number[];\r\n _currentTime: number;\r\n\r\n lyr: LayerRealEarthTile|LayerVectorRealEarth;\r\n\r\n constructor(lyr: LayerRealEarthTile|LayerVectorRealEarth, loadCallback?: timesLoadedCallback){\r\n this.lyr = lyr;\r\n this._products = lyr._products;\r\n if (loadCallback){\r\n this.loadCallback = loadCallback;\r\n } else {\r\n this.loadCallback = function(): void {return;};\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Call this after the mixin has been applied\r\n */\r\n timeInit() {\r\n\r\n this._rawDateStrings = [];\r\n this._localDates = [];\r\n this.localTimes = [];\r\n this._animateEnabled = true;\r\n // this._loaded = true;\r\n this._currentTime = undefined;\r\n this._currentIndex = undefined;\r\n\r\n $.get('http://realearth.ssec.wisc.edu/api/products', {products: this._products}, (d) => {\r\n if (d.length == 0) {\r\n console.log(`${this._products} layer not available or does not have times`);\r\n\r\n return;\r\n }\r\n d = d[0];\r\n for (let i = 0; i < d['times'].length; i++) {\r\n this._loadDates.call(this, d['times'][i]);\r\n }\r\n this.loadCallback.call(this.lyr, this.lyr);\r\n this._loadLatest.call(this);\r\n }, 'json');\r\n }\r\n\r\n\r\n /**\r\n * Given the raw time string, add to the arrays to keep track of dates and cache\r\n * @param {string} inString - input string to parse\r\n * @returns {string} the converted string\r\n * @protected\r\n */\r\n _loadDates(inString: string): string {\r\n let yr = inString.slice(0, 4);\r\n let month = inString.slice(4, 6);\r\n let d = inString.slice(6, 8);\r\n let hr = inString.slice(9, 11);\r\n let mn = inString.slice(11, 13);\r\n let sec = inString.slice(13, 15);\r\n\r\n let rawDateStr = inString.replace('.', '_');\r\n this._rawDateStrings.push(rawDateStr);\r\n\r\n let dteStr = `${month}/${d}/${yr} ${hr}:${mn}:${sec}`;\r\n let newDte = new Date(dteStr);\r\n newDte.setMinutes(newDte.getMinutes() - offsetMinutes);\r\n this._localDates.push(newDte);\r\n this.localTimes.push(newDte.getTime());\r\n\r\n return rawDateStr;\r\n }\r\n\r\n /**\r\n *\r\n * @protected\r\n * @returns {boolean} if should continue\r\n */\r\n _loadLatest(){\r\n mapPopup.closePopup();\r\n if (this.localTimes.length > 0){\r\n this._currentIndex = this.localTimes.length -1;\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} theTime - the time\r\n * @returns {boolean} true if new index, false if the same or below lowest value\r\n */\r\n setLayerTime(theTime: number): boolean{\r\n\r\n this._currentTime = theTime;\r\n\r\n let newIndex;\r\n\r\n if (theTime < this.localTimes[0]){\r\n return false;\r\n } else if (theTime > this.localTimes[this.localTimes.length - 1]){\r\n newIndex = this.localTimes.length - 1;\r\n }\r\n\r\n for (let i = 0; i < this.localTimes.length; i++){\r\n if (this.localTimes[i] >= theTime){\r\n newIndex = i;\r\n break;\r\n }\r\n }\r\n\r\n if (newIndex == this._currentIndex){\r\n return false;\r\n } else {\r\n this._currentIndex = newIndex;\r\n mapPopup.closePopup();\r\n\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nnm.RealEarthAnimate = RealEarthAnimate;\r\nexport default RealEarthAnimate;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/mixin/RealEarthAnimate.ts","/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nimport RealEarthAnimate from './RealEarthAnimate';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport LayerRealEarthTile from \"../layers/LayerRealEarthTile\";\r\nconst nm = provide('mixin');\r\n\r\n/**\r\n * Animate real earth tile\r\n * @augments RealEarthAnimate\r\n */\r\nclass RealEarthAnimateTile extends RealEarthAnimate {\r\n _sourceUrls: string[];\r\n _source: ol.source.XYZ;\r\n _olLayer: ol.layer.Tile;\r\n\r\n constructor(layer: LayerRealEarthTile, loadCallback?: (lyr: LayerRealEarthTile) => void){\r\n super(layer, loadCallback);\r\n this._source = layer.source;\r\n this._olLayer = layer.olLayer;\r\n }\r\n\r\n\r\n\r\n timeInit() {\r\n super.timeInit();\r\n this._sourceUrls = [];\r\n }\r\n\r\n _loadDates(inString: string): string {\r\n let rawDte = super._loadDates(inString);\r\n let dteProductUrl =\r\n `http://realearth.ssec.wisc.edu/api/image?products=${this._products}_${rawDte}&x={x}&y={y}&z={z}`;\r\n this._sourceUrls.push(dteProductUrl);\r\n return '';\r\n }\r\n\r\n /**\r\n * @protected\r\n */\r\n _loadLatest(): boolean {\r\n if (super._loadLatest()){\r\n this._source.setUrl(this._sourceUrls[this._sourceUrls.length - 1]);\r\n }\r\n return true;\r\n }\r\n\r\n setLayerTime(theTime: number): boolean {\r\n if (super.setLayerTime(theTime)) {\r\n if (this._olLayer.getZIndex() < 0){\r\n this._olLayer.setZIndex(0);\r\n }\r\n this._source.setUrl(this._sourceUrls[this._currentIndex]);\r\n } else {\r\n this._olLayer.setZIndex(-1);\r\n }\r\n return true;\r\n }\r\n}\r\n\r\nnm.RealEarthAnimateTile = RealEarthAnimateTile;\r\nexport default RealEarthAnimateTile;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/mixin/RealEarthAnimateTile.ts","import {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerRealEarthTile from \"../../layers/LayerRealEarthTile\";\r\nimport {MediaControl, changeFunction} from \"../../domUtil/media-control\";\r\nimport $ = require('jquery');\r\nimport {LayerBaseVectorEsri} from \"../../layers/LayerBaseVectorEsri\";\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\n\r\nlet nexrhresStatic = new LayerRealEarthTile({\r\n products: 'nexrhres',\r\n id: 'nexrhres-static',\r\n opacity: 0.6,\r\n animate: true,\r\n name: 'Hybrid Reflectivity',\r\n // maxZoom: 10,\r\n timeLoadCallback: function (f) {\r\n console.log(f);\r\n }\r\n }\r\n);\r\n\r\n\r\nlet d = new Date();\r\nlet endTime = d.getTime();\r\nd.setHours(d.getHours() - 4);\r\nlet startTime = d.getTime();\r\nlet rangeStep = Math.round((endTime - startTime) / 8);\r\n\r\nlet media = new MediaControl(\r\n $('#control'),\r\n (v: number) => {\r\n nexrhresStatic.setLayerTime(v);\r\n },\r\n {\r\n min: startTime,\r\n max: endTime,\r\n val: endTime,\r\n step: rangeStep,\r\n playInterval: 750,\r\n showAsDate: true\r\n }\r\n);\r\n\r\n\r\nlet map = quickMap();\r\nmap.addLayer(nexrhresStatic.olLayer);\r\n\r\n\r\nlet coordinationLayer = new LayerBaseVectorEsri(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0',\r\n {\r\n visible: true,\r\n autoLoad: true,\r\n name: 'Coordination',\r\n useEsriStyle: true\r\n }\r\n);\r\n\r\nmap.addLayer(coordinationLayer.olLayer);\r\n\r\n let oakRidgeLayers = [\r\n ['Cameras', 'cameras33'],\r\n ['HAR', 'HAR33'],\r\n ['DMS', 'MessageSigns33'],\r\n //['State Summary', 'statesummary'],\r\n ['Traffic Control', 'TrafficControl33'],\r\n ['Traffic Detection', 'TrafficDetectionMulti'],\r\n ['Weather', 'Weather33']\r\n ];\r\n\r\n\r\n for (let i = 0; i < oakRidgeLayers.length; i++) {\r\n let oakRidgeLayer = new LayerEsriMapServer(\r\n `http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/${oakRidgeLayers[i][1]}/MapServer`,\r\n {\r\n id: oakRidgeLayers[i][1],\r\n name: oakRidgeLayers[i][0],\r\n visible: true,\r\n minZoom: 7,\r\n zIndex: 20,\r\n addPopup: true,\r\n legendCollapse: true\r\n }\r\n );\r\n map.addLayer(oakRidgeLayer.olLayer);\r\n }\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/animate.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///animate.js","webpack:///webpack/bootstrap 99693f14fcb3e83c98ca","webpack:///./src/util/provide.ts","webpack:///external \"$\"","webpack:///external \"ol\"","webpack:///./src/util/makeGuid.ts","webpack:///./src/olHelpers/mapPopup.ts","webpack:///./src/olHelpers/mapInteractionBase.ts","webpack:///./src/olHelpers/quickMap.ts","webpack:///./src/olHelpers/mapMove.ts","webpack:///./src/olHelpers/projections.ts","webpack:///./src/util/checkDefined.ts","webpack:///./src/layers/LayerBase.ts","webpack:///./src/olHelpers/geocode.ts","webpack:///./src/olHelpers/mapMoveCls.ts","webpack:///./src/olHelpers/mapPopupCls.ts","webpack:///./src/olHelpers/quickMapBase.ts","webpack:///./src/olHelpers/zoomResolutionConvert.ts","webpack:///./src/layers/LayerEsriMapServer.ts","webpack:///./src/olHelpers/esriToOlStyle.ts","webpack:///./src/layers/LayerBaseVector.ts","webpack:///./src/domUtil/media-control.ts","webpack:///./src/domUtil/range-change.ts","webpack:///./src/layers/LayerBaseVectorEsri.ts","webpack:///./src/layers/LayerRealEarthTile.ts","webpack:///./src/layers/LayerBaseXyzTile.ts","webpack:///./src/mixin/RealEarthAnimate.ts","webpack:///./src/mixin/RealEarthAnimateTile.ts","webpack:///./src/_tests/demos/animate.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","$","ol","makeGuid","replace","r","Math","random","toString","provide_1","nm","mapPopupCls_1","mapPopup","MapInteractionBase","subtype","this","_map","_initialized","_subtype","init","theMap","_checkInit","initialized","msg","alert","console","log","checkInit","quickMap","options","quickMapBase_1","quickMapBase","mapMove_1","mapPopup_1","mapMoveCls_1","mapMove","proj4326","proj","Projection","code","proj3857","proj3070","undefinedOrNull","input","definedAndNotNull","zoomResolutionConvert","makeGuid_1","LayerBase","url","_url","_params","params","_legendCollapse","legendCollapse","_legendCheckbox","legendCheckbox","id","_name","animate","_opacity","opacity","_visible","visible","_source","undefined","_olLayer","_loaded","_maxResolution","zoomToResolution","minZoom","_minResolution","maxZoom","_minZoom","_maxZoom","_zIndex","zIndex","loadCallback","_legendContent","_$legendDiv","_applyCollapseCalled","_addLegendContent","legendContent","_load","loaded","getLegendDiv","additionalContent","indexOf","append","applyCollapse","addLegendContent","$expander","find","click","$this","siblings","slideToggle","hasClass","removeClass","html","addClass","trigger","refresh","source","_id","set","newId","_animate","newVal","newParams","visibility","setVisible","olLayer","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","projections_1","invalidClass","geocoderLoadingClass","Geocode","mapDiv","map","_this","inputGuid","buttonGuid","indicationLayer","layer","Vector","style","Style","image","Circle","radius","fill","Fill","color","stroke","Stroke","width","addLayer","theButton","document","getElementById","theInput","reset","$theButton","$theInput","evt","preventDefault","disabled","clear","lat","parseFloat","lon","title","v","getView","geom","Point","feat","Feature","addFeature","transform","setCenter","getCoordinates","setZoom","keyup","keyCode","__extends","extendStatics","setPrototypeOf","__proto__","Array","b","__","constructor","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","on","e","_updateMapExtent","triggerLyrLoad","type","triggerMoveCallback","theView","getZoom","extentArray","calculateExtent","getSize","minX","minY","maxX","maxY","lyr","index","eventType","clearTimeout","abort","callbackFunc","mapMoveBefore","mapMoveMakeGetParams","__this_1","innerFunction","theLayer","theIndex","_innerThis","mapMoveParams","mapMoveCallback","fail","jqXHR","statusText","always","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","push","addCallback","func","context","delay","FeatureLayerProperties","feature","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","addOverlay","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","forEachFeatureAtPixel","vLyr","getTargetElement","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","j","hasLyr","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","theStyle","olStyle","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","divId","center","x","y","zoom","baseSwitcher","fullScreen","addGeocode","css","osmLayer","Tile","OSM","coordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","geocode_1","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","makeServiceUrl","folder","service","localCacheUrl","loc","location","href","toLowerCase","LayerBase_1","esriToOl","LayerEsriMapServer","TileArcGISRest","showLayers","_showLayers","minResolution","maxResolution","addPopup","_esriFormat","format","EsriJSON","_popupRequest","getLegend","urlCopy","newHtml","makeMapServiceLegend","a","attrVal","attr","slice","readFeature","_colorArrayToRgba","colorArray","htmlEscape","str","String","makeFeatureServiceLegendAndSymbol","esriResponse","renderer","drawingInfo","symbolLegendOut","SingleSymbol","PointSymbol","LineSymbol","PolygonSymbol","UniqueValueSymbol","legend","legendHtml","mapServiceLegendItem","lyrObject","skipLayerNameAndExpander","legendItems","newLegendHtml","CommonSymbol","symbolObj","innerColor","outerColor","outline","outlineWidth","size","Icon","src","lineWidth","SymbolGenerator","SymbolClass","symbol","uniqueValueInfos","propertyName","field1","defaultSymbol","defaultStyle","defaultLabelHtml","valueArray","labelArray","legendArray","propertyStyleLookup","uniqueVal","uniqueSym","checkProperties","checkProperty","_b","_c","h","LayerBaseVector","trim","_style","_autoLoad","_onDemand","onDemand","_onDemandDelay","mapMoveObj","_mapMove","_mapMoveMakeGetParams","_mapMoveParams","renderOrder","_projectionMap","_projection4326","addFeatures","featureCollection","evtType","extent","extend","setStyle","mapProj","getFeatures","timeToLocalDateString","tm","Date","p1","toLocaleTimeString","p2","toLocaleDateString","range_change_1","MediaControl","changeFunc","mediaConfig","min","max","val","step","playInterval","showAsDate","_container","_playInterval","_changeFunc","_showAsDate","_currentValue","_min","_max","_step","_playing","btnPlay","_$btnStop","btnAhead","btnBack","_$slider","_$valLabelMin","_$valLabelVal","_$valLabelMax","setMinMaxValueStep","rangeChange","currentValue","___this","prop","_interval","setInterval","clearInterval","stopPlaying","newValue","newMin","newMax","newStep","newFunc","triggerCallback","callback","percent","lastVal","$slider","changeTimeout","mouseenter","mouseIn","mouseleave","mouseDown","mousedown","mouseup","mousemove","dragged","timeout","change","LayerBaseVector_1","LayerBaseVectorEsri","where","outFields","outSR","_outSR","_urlCopy","autoLoad","_useEsriStyle","useEsriStyle","newStyleAndLegend","feats","readFeatures","LayerBaseXyzTile_1","RealEarthAnimateTile_1","LayerRealEarthTile","_products","products","animator","timeLoadCallback","timeInit","setLayerTime","theTime","LayerBaseXyzTile","XYZ","offsetMinutes","getTimezoneOffset","RealEarthAnimate","_rawDateStrings","_localDates","localTimes","_animateEnabled","_currentTime","_currentIndex","_loadDates","_loadLatest","inString","yr","month","hr","mn","sec","rawDateStr","dteStr","newDte","setMinutes","getMinutes","getTime","newIndex","RealEarthAnimate_1","RealEarthAnimateTile","_sourceUrls","rawDte","dteProductUrl","setUrl","getZIndex","quickMap_1","LayerRealEarthTile_1","media_control_1","LayerBaseVectorEsri_1","LayerEsriMapServer_1","nexrhresStatic","endTime","setHours","getHours","startTime","rangeStep","round","coordinationLayer","oakRidgeLayers","oakRidgeLayer"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,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,GAAA1D,oBACxB,6GAEI3d,SAAS,EACTie,UAAU,EACVxjB,KAAM,eACN0jB,cAAc,GAItBta,GAAIkB,SAAS+c,EAAkB7e,QAa3B,KAAK,GAXD8e,KACC,UAAW,cACX,MAAO,UACP,MAAO,mBAEP,kBAAmB,qBACnB,oBAAqB,0BACrB,UAAW,cAIP7nB,EAAI,EAAGA,EAAI6nB,EAAe/lB,OAAQ9B,IAAK,CAC5C,GAAI8nB,GAAgB,GAAIV,GAAA1N,mBACpB,0DAA0DmO,EAAe7nB,GAAG,GAAE,cAE1EwF,GAAIqiB,EAAe7nB,GAAG,GACtBO,KAAMsnB,EAAe7nB,GAAG,GACxB8F,SAAS,EACTO,QAAS,EACTM,OAAQ,GACRqT,UAAU,EACV3U,gBAAgB,GAGxBsE,GAAIkB,SAASid,EAAc/e","file":"animate.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 68);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = ol;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapPopupCls_1 = __webpack_require__(13);\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexports.mapPopup = new mapPopupCls_1.default();\r\nexports.default = exports.mapPopup;\r\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * base interaction\r\n */\r\nvar MapInteractionBase = (function () {\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n function MapInteractionBase(subtype) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n MapInteractionBase.prototype.init = function (theMap) {\r\n if (!this._initialized) {\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n };\r\n Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get: function () {\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get: function () {\r\n return this._initialized;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n MapInteractionBase.prototype._checkInit = function () {\r\n if (!this.initialized) {\r\n var msg = this._subtype + \" object not initialized\";\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n };\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n MapInteractionBase.prototype.checkInit = function () {\r\n this._checkInit();\r\n };\r\n return MapInteractionBase;\r\n}());\r\nexports.MapInteractionBase = MapInteractionBase;\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexports.default = MapInteractionBase;\r\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMapBase_1 = __webpack_require__(14);\r\nvar provide_1 = __webpack_require__(0);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nfunction quickMap(options) {\r\n if (options === void 0) { options = {}; }\r\n var m = quickMapBase_1.quickMapBase(options);\r\n mapMove_1.default.init(m);\r\n mapPopup_1.default.init(m);\r\n return m;\r\n}\r\nexports.quickMap = quickMap;\r\nnm.quickMap = quickMap;\r\nexports.default = quickMap;\r\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapMoveCls_1 = __webpack_require__(12);\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\nexports.mapMove = new mapMoveCls_1.default();\r\nexports.default = exports.mapMove;\r\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nvar ol = __webpack_require__(2);\r\nexports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' });\r\nexports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' });\r\nexports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' });\r\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util.checkDefined');\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nfunction undefinedOrNull(input) {\r\n \"use strict\";\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\nexports.undefinedOrNull = undefinedOrNull;\r\nnm.undefinedOrNull = undefinedOrNull;\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nfunction definedAndNotNull(input) {\r\n \"use strict\";\r\n return !(undefinedOrNull(input));\r\n}\r\nexports.definedAndNotNull = definedAndNotNull;\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar zoomResolutionConvert = __webpack_require__(17);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nvar LayerBase = (function () {\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n function LayerBase(url, options) {\r\n if (options === void 0) { options = {}; }\r\n options = options || {};\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n this.id = options.id || makeGuid_1.default();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n }\r\n else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n this._source = undefined;\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n this._legendContent = '';\r\n if (this._legendCheckbox) {\r\n this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n else {\r\n this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBase.prototype._load = function () {\r\n if (this.loaded == true) {\r\n return true;\r\n }\r\n else {\r\n this._loaded = true;\r\n return false;\r\n }\r\n };\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n LayerBase.prototype.getLegendDiv = function () {\r\n return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n };\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n if (additionalContent === void 0) { additionalContent = ''; }\r\n var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n this._legendContent += additionalContent;\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n };\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n this._addLegendContent(additionalContent);\r\n };\r\n LayerBase.prototype.applyCollapse = function () {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n return undefined;\r\n }\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n var $expander = this._$legendDiv.find('.legend-items-expander');\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n $expander.click(function () {\r\n var $this = $(this);\r\n $this.siblings('ul').slideToggle();\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n }\r\n else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * trick to refresh the layer\r\n */\r\n LayerBase.prototype.refresh = function () {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"id\", {\r\n get: function () {\r\n return this._id;\r\n },\r\n set: function (newId) {\r\n this._id = newId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n get: function () {\r\n return this._animate;\r\n },\r\n set: function (animate) {\r\n this._animate = animate;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._legendContent;\r\n },\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set: function (newVal) {\r\n this._legendContent = newVal;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"params\", {\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._params;\r\n },\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set: function (newParams) {\r\n this._params = newParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"url\", {\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._url;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set: function (visibility) {\r\n this.setVisible(visibility);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setVisible = function (visibility) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get: function () {\r\n return this._opacity;\r\n },\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set: function (opacity) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"name\", {\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._name;\r\n },\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set: function (newName) {\r\n this._name = newName;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._loaded;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"source\", {\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getSource = function () {\r\n return this._source;\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n /**\r\n * get the z index\r\n */\r\n get: function () {\r\n return this._zIndex;\r\n },\r\n /**\r\n * set the z index\r\n */\r\n set: function (newZ) {\r\n this._zIndex = newZ;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setZIndex = function (newZ) {\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n /**\r\n * the the ol layer\r\n */\r\n get: function () {\r\n return this.getOlLayer();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getOlLayer = function () {\r\n return this._olLayer;\r\n };\r\n return LayerBase;\r\n}());\r\nexports.LayerBase = LayerBase;\r\nnm.LayerBase = LayerBase;\r\nexports.default = LayerBase;\r\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar ol = __webpack_require__(2);\r\nvar projections_1 = __webpack_require__(8);\r\nvar invalidClass = 'geocoder-invalid';\r\nvar geocoderLoadingClass = 'geocoder-loading';\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\nvar Geocode = (function () {\r\n function Geocode(mapDiv, map) {\r\n var _this = this;\r\n var inputGuid = makeGuid_1.makeGuid();\r\n var buttonGuid = makeGuid_1.makeGuid();\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }),\r\n stroke: new ol.style.Stroke({ color: 'red', width: 1 })\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n (\"<input type=\\\"text\\\" id=\\\"\" + inputGuid + \"\\\">\") +\r\n (\"<button id=\\\"\" + buttonGuid + \"\\\">Search</button>\") +\r\n '</div>');\r\n this.theButton = document.getElementById(buttonGuid);\r\n this.theInput = document.getElementById(inputGuid);\r\n this.reset();\r\n var $theButton = $(this.theButton);\r\n var $theInput = $(this.theInput);\r\n $theButton.click(function (evt) {\r\n evt.preventDefault();\r\n $theButton.addClass(geocoderLoadingClass);\r\n _this.theButton.disabled = true;\r\n _this.indicationLayer.getSource().clear();\r\n $.get(\"https://geocode.xyz/\" + _this.theInput.value + \"?geoit=json\", {}, function (d) {\r\n var lat = parseFloat(d['latt']);\r\n var lon = parseFloat(d['longt']);\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n _this.theInput.title = 'Specified Location Invalid';\r\n _this.theButton.title = 'Specified Location Invalid';\r\n }\r\n else {\r\n var v = _this.map.getView();\r\n var p = new ol.geom.Point([lon, lat]);\r\n var feat = new ol.Feature(p);\r\n _this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(projections_1.proj4326, projections_1.proj3857);\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n $theButton.removeClass(geocoderLoadingClass);\r\n _this.theButton.disabled = false;\r\n }, 'json');\r\n });\r\n $(this.theInput).keyup(function (evt) {\r\n evt.preventDefault();\r\n _this.theButton.disabled = _this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n _this.theInput.title = '';\r\n _this.theButton.title = '';\r\n if (!_this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n });\r\n }\r\n Geocode.prototype.reset = function () {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n };\r\n return Geocode;\r\n}());\r\nexports.Geocode = Geocode;\r\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar checkDefined = __webpack_require__(9);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nvar MapMoveCls = (function (_super) {\r\n __extends(MapMoveCls, _super);\r\n /**\r\n * constructor called implicitly\r\n */\r\n function MapMoveCls() {\r\n var _this = _super.call(this, 'map move') || this;\r\n _this._arrLyrRequest = [];\r\n _this._arrLyrTimeout = [];\r\n _this._arrLayer = [];\r\n _this._lookupLayer = {};\r\n _this._mapMoveCallbacks = [];\r\n _this._mapMoveCallbacksLookup = {};\r\n _this._mapMoveCallbackDelays = [];\r\n _this._mapMoveCallbackContext = [];\r\n _this._mapMoveCallbackTimeout = [];\r\n _this._mapExtent = undefined;\r\n _this._zoomLevel = undefined;\r\n return _this;\r\n }\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n MapMoveCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n _this._updateMapExtent();\r\n // trigger the layer updates\r\n for (var i = 0; i < _this._arrLayer.length; i++) {\r\n _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n }\r\n // trigger the map callbacks\r\n for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n _this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n };\r\n MapMoveCls.prototype._updateMapExtent = function () {\r\n var theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n var extentArray = theView.calculateExtent(this.map.getSize());\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n };\r\n Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n /**\r\n * return the map extent\r\n */\r\n get: function () {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n return this._mapExtent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n }\r\n else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n }\r\n else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n // dummy callback used if before load returns false\r\n var callbackFunc = function () { };\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n var __this_1 = this;\r\n callbackFunc = function () {\r\n function innerFunction(theLayer, theIndex) {\r\n var _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this_1, lyr, index);\r\n };\r\n }\r\n else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n };\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n throw 'either the function index or the id must be defined';\r\n }\r\n if (typeof ind !== 'number') {\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n if (ind < 0) {\r\n console.log('function not found');\r\n return;\r\n }\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n var ctx = this._mapMoveCallbackContext[ind];\r\n var theFunc = this._mapMoveCallbacks[ind];\r\n var __this = this;\r\n var f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n };\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n };\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId) {\r\n functionId = makeGuid_1.default();\r\n }\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n };\r\n return MapMoveCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapMoveCls = MapMoveCls;\r\nnm.MapMoveCls = MapMoveCls;\r\nexports.default = MapMoveCls;\r\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\nvar FeatureLayerProperties = (function () {\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n get: function () {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n }\r\n else {\r\n return this.layer.name;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FeatureLayerProperties;\r\n}());\r\nexports.FeatureLayerProperties = FeatureLayerProperties;\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nvar MapPopupCls = (function (_super) {\r\n __extends(MapPopupCls, _super);\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n /**\r\n * map popup constructor\r\n */\r\n function MapPopupCls() {\r\n var _this = _super.call(this, 'map popup') || this;\r\n _this._arrPopupLayerIds = [];\r\n _this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n _this._arrPopupContentFunction = [];\r\n _this._$popupContainer = undefined;\r\n _this._$popupContent = undefined;\r\n _this._$popupCloser = undefined;\r\n _this._popupOverlay = undefined;\r\n _this._selectionLayers = [];\r\n _this._selectionLayerLookup = {};\r\n _this._mapClickFunctions = [];\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n _this._popupChangedFunctions = [];\r\n _this._esriMapServiceLayers = [];\r\n _this._popupOpen = false;\r\n _this._popupCoordinate = null;\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n _this._popupContentLength = 0;\r\n return _this;\r\n }\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n MapPopupCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n var $map;\r\n var target = this.map.getTarget();\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n $map.append('<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>');\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n var _ease = function (n) {\r\n return ol.easing.inAndOut(n);\r\n };\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n this._map.addOverlay(this._popupOverlay);\r\n this._$popupCloser.click(function (evt) {\r\n _this.closePopup();\r\n });\r\n // display popup on click\r\n this._map.on('singleclick', function (evt) {\r\n _this.closePopup();\r\n _this._popupCoordinate = evt['coordinate'];\r\n // esri map service layers\r\n if (_this._esriMapServiceLayers.length > 0) {\r\n var queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n imageDisplay: _this._map.getSize().join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n var l = _a[_i];\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n var featObj = layerFeatureObjectArray[i];\r\n var props = featObj.feature.getProperties();\r\n var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n }\r\n else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse;\r\n _this._passThroughLayerFeatureArray.push(featObj);\r\n }\r\n else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n _this._currentPopupIndex = -1;\r\n var popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n popupHtml += \"<span> of </span>\";\r\n popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n popupHtml += \"<span> - </span>\";\r\n popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n popupHtml += '</div>';\r\n _this._$popupContent.html(popupHtml);\r\n _this._$popupContent.find('.previous-popup').click(function () {\r\n if (_this._popupContentLength == 1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == 0) {\r\n _this._currentPopupIndex = _this._popupContentLength - 1;\r\n }\r\n else {\r\n _this._currentPopupIndex--;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n var nextPopup = _this._$popupContent.find('.next-popup');\r\n nextPopup.click(function () {\r\n if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n _this._currentPopupIndex = 0;\r\n }\r\n else {\r\n _this._currentPopupIndex++;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n if (_this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n _this._$popupContent.scrollTop(0);\r\n _this._popupOpen = true;\r\n }\r\n });\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', function (evt) {\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n var hit = false;\r\n _this.map.forEachFeatureAtPixel(pixel, function (f, l) {\r\n if (hit) {\r\n return;\r\n }\r\n for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) {\r\n var vLyr = _a[_i];\r\n if (vLyr.olLayer == l) {\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n var mapElement = _this.map.getTargetElement();\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n };\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n MapPopupCls.prototype._triggerFeatSelect = function () {\r\n var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f(this._$popupContent);\r\n }\r\n };\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n featLayerObject.popupContent = popupContent;\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n };\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n var _this = this;\r\n var layerFeatureObjectArray = [];\r\n this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n var hasLyr = false;\r\n var j;\r\n var lyr = null;\r\n for (j = 0; j < _this._arrPopupLayers.length; j++) {\r\n lyr = _this._arrPopupLayers[j];\r\n if (lyr.olLayer === layer) {\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j]));\r\n }\r\n });\r\n return layerFeatureObjectArray;\r\n };\r\n MapPopupCls.prototype.closePopup = function () {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n return false;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n };\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n this._checkInit();\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n var theStyle;\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n }\r\n else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n var selectionLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n });\r\n selectionLayer.setZIndex(100);\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n return selectionLayer;\r\n };\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n return selectionLayer;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n };\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n return selectionLayer;\r\n };\r\n MapPopupCls.prototype.clearSelection = function () {\r\n this._checkInit();\r\n for (var i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f();\r\n }\r\n };\r\n ;\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n this._mapClickFunctions.push(func);\r\n };\r\n return MapPopupCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapPopupCls = MapPopupCls;\r\nnm.MapPopupCls = MapPopupCls;\r\nexports.default = MapPopupCls;\r\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar geocode_1 = __webpack_require__(11);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nfunction quickMapBase(options) {\r\n if (options === void 0) { options = {}; }\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || { x: -10018378, y: 5574910 };\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n var $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n var osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZ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M9MBwzMiUvFCMtGiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptV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c/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n var coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n var controls = ol.control.defaults({\r\n attributionOptions: { collapsible: false }\r\n });\r\n var view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n var map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n if (options.addGeocode) {\r\n new geocode_1.Geocode(document.getElementById(options.divId), map);\r\n }\r\n return map;\r\n}\r\nexports.quickMapBase = quickMapBase;\r\nnm.quickMapBase = quickMapBase;\r\nexports.default = quickMapBase;\r\n\n\n/***/ }),\n/* 15 */,\n/* 16 */,\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\nvar _zoomResLookup = [\r\n 156543.03392804097,\r\n 78271.51696402048,\r\n 39135.75848201024,\r\n 19567.87924100512,\r\n 9783.93962050256,\r\n 4891.96981025128,\r\n 2445.98490512564,\r\n 1222.99245256282,\r\n 611.49622628141,\r\n 305.748113140705,\r\n 152.8740565703525,\r\n 76.43702828517625,\r\n 38.21851414258813,\r\n 19.109257071294063,\r\n 9.554628535647032,\r\n 4.777314267823516,\r\n 2.388657133911758,\r\n 1.194328566955879,\r\n 0.5971642834779395,\r\n 0.29858214173896974,\r\n 0.14929107086948487,\r\n 0.07464553543474244,\r\n 0.03732276771737122,\r\n 0.01866138385868561,\r\n 0.009330691929342804,\r\n 0.004665345964671402,\r\n 0.002332672982335701,\r\n 0.0011663364911678506,\r\n 0.0005831682455839253 //28\r\n];\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nfunction zoomToResolution(zoomLevel) {\r\n \"use strict\";\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n }\r\n else {\r\n console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n return undefined;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.zoomToResolution = zoomToResolution;\r\nnm.zoomToResolution = zoomToResolution;\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nfunction resolutionToZoom(resolution) {\r\n for (var i = 0; i < _zoomResLookup.length; i++) {\r\n if (resolution >= _zoomResLookup[i]) {\r\n return i;\r\n }\r\n }\r\n return 0;\r\n}\r\nexports.resolutionToZoom = resolutionToZoom;\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ }),\n/* 18 */,\n/* 19 */,\n/* 20 */,\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nvar LayerBase_1 = __webpack_require__(10);\r\nvar esriToOl = __webpack_require__(27);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nfunction makeServiceUrl(folder, service) {\r\n return \"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/\" + folder + \"/\" + service + \"/MapServer\";\r\n}\r\nexports.makeServiceUrl = makeServiceUrl;\r\nfunction localCacheUrl(folder, service) {\r\n var loc = window.location.href;\r\n var url = \"/mapserver/\" + folder + \"/\" + service;\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1) {\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1) {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n }\r\n else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url;\r\n }\r\n }\r\n return url;\r\n}\r\nexports.localCacheUrl = localCacheUrl;\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nvar LayerEsriMapServer = (function (_super) {\r\n __extends(LayerEsriMapServer, _super);\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n function LayerEsriMapServer(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, url, options) || this;\r\n _this._source = new ol.source.TileArcGISRest({\r\n url: _this.url == '' ? undefined : _this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') }\r\n });\r\n _this._showLayers = options.showLayers || [];\r\n _this._olLayer = new ol.layer.Tile({\r\n source: _this._source,\r\n visible: _this.visible,\r\n opacity: _this.opacity,\r\n minResolution: _this._minResolution,\r\n maxResolution: _this._maxResolution\r\n });\r\n _this._olLayer.setZIndex(_this._zIndex);\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n _this._esriFormat = new ol.format.EsriJSON();\r\n _this._popupRequest = null;\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n if (options.getLegend) {\r\n _this.addLegendContent();\r\n }\r\n if (options.addPopup) {\r\n mapPopup_1.default.addMapServicePopup(_this);\r\n }\r\n return _this;\r\n }\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) {\r\n var _this = this;\r\n var urlCopy = this.url;\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n $.get(urlCopy, {}, function (d) {\r\n var newHtml = esriToOl.makeMapServiceLegend(d, _this._showLayers);\r\n _super.prototype.addLegendContent.call(_this, newHtml);\r\n }, 'json');\r\n };\r\n LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n var urlCopy = this.url;\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n urlCopy += 'identify?callback=?';\r\n var __this = this;\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (var _i = 0, _a = d['results']; _i < _a.length; _i++) {\r\n var r = _a[_i];\r\n var popupHtml = '<table class=\"esri-popup-table\">';\r\n for (var a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n var attrVal = r['attributes'][a];\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n var attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n popupHtml += \"<tr><td>\" + attr + \"</td><td>\" + attrVal + \"</td></tr>\";\r\n }\r\n }\r\n popupHtml += '</table>';\r\n mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n };\r\n Object.defineProperty(LayerEsriMapServer.prototype, \"source\", {\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get: function () {\r\n return _super.prototype.getSource.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerEsriMapServer.prototype, \"olLayer\", {\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get: function () {\r\n return _super.prototype.getOlLayer.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LayerEsriMapServer;\r\n}(LayerBase_1.LayerBase));\r\nexports.LayerEsriMapServer = LayerEsriMapServer;\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexports.default = LayerEsriMapServer;\r\n\n\n/***/ }),\n/* 26 */,\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar nm = provide_1.default('olHelpers.esriToOlStyle');\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray, opacity) {\r\n \"use strict\";\r\n return \"rgba(\" + colorArray[0] + \",\" + colorArray[1] + \",\" + colorArray[2] + \",\" + opacity + \")\";\r\n}\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str) {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\nnm.htmlEscape = htmlEscape;\r\nvar CommonSymbol = (function () {\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n function CommonSymbol(symbolObj, opacity) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n return CommonSymbol;\r\n}());\r\nvar PointSymbol = (function (_super) {\r\n __extends(PointSymbol, _super);\r\n function PointSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj.type) {\r\n case 'esriSMS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n var outlineWidth = _this.symbolObj.outline.width;\r\n var radius = _this.symbolObj.size;\r\n _this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth })\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" style=\\\"color: \" + innerColor + \"\\\">●</span>\";\r\n break;\r\n case 'esriPMS':\r\n _this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({ src: \"data:image/png;base64,\" + _this.symbolObj['imageData'] })\r\n });\r\n _this.legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + _this.symbolObj['imageData'] + \"\\\">\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return PointSymbol;\r\n}(CommonSymbol));\r\nvar LineSymbol = (function (_super) {\r\n __extends(LineSymbol, _super);\r\n function LineSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj.type) {\r\n case 'esriSLS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var lineWidth = _this.symbolObj.width;\r\n _this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n _this.legendHtml += \"style=\\\"\";\r\n _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n _this.legendHtml += \"width: 40px;\";\r\n _this.legendHtml += \"height: 4px;\";\r\n _this.legendHtml += \"position: relative;\";\r\n _this.legendHtml += \"display: inline-block;\";\r\n _this.legendHtml += \"top: -1px;\";\r\n _this.legendHtml += \"\\\"></span>\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return LineSymbol;\r\n}(CommonSymbol));\r\nvar PolygonSymbol = (function (_super) {\r\n __extends(PolygonSymbol, _super);\r\n function PolygonSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj['type']) {\r\n case 'esriSFS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n var outlineWidth = _this.symbolObj.outline.width;\r\n _this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n _this.legendHtml += \"style=\\\"\";\r\n _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n _this.legendHtml += \"border: solid \" + outerColor + \" 1px;\";\r\n _this.legendHtml += \"width: 40px;\";\r\n _this.legendHtml += \"height: 9px;\";\r\n _this.legendHtml += \"position: relative;\";\r\n _this.legendHtml += \"display: inline-block;\";\r\n _this.legendHtml += \"top: 2px;\";\r\n _this.legendHtml += \"\\\"></span>\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return PolygonSymbol;\r\n}(CommonSymbol));\r\nvar SymbolGenerator = (function () {\r\n function SymbolGenerator(esriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n return SymbolGenerator;\r\n}());\r\nvar SingleSymbol = (function (_super) {\r\n __extends(SingleSymbol, _super);\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n function SingleSymbol(esriResponse, SymbolClass) {\r\n var _this = _super.call(this, esriResponse) || this;\r\n _this.symbol = _this.renderer.symbol;\r\n var symbolObj = new SymbolClass(_this.symbol, _this.opacity);\r\n _this.olStyle = symbolObj.olStyle;\r\n _this.legendHtml = symbolObj.legendHtml;\r\n return _this;\r\n }\r\n return SingleSymbol;\r\n}(SymbolGenerator));\r\nvar UniqueValueSymbol = (function (_super) {\r\n __extends(UniqueValueSymbol, _super);\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n function UniqueValueSymbol(esriResponse, SymbolClass) {\r\n var _this = _super.call(this, esriResponse) || this;\r\n _this.uniqueValueInfos = _this.renderer.uniqueValueInfos;\r\n _this.propertyName = _this.renderer.field1;\r\n _this.defaultSymbol = _this.renderer.defaultSymbol;\r\n if (_this.defaultSymbol) {\r\n var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity);\r\n _this.defaultStyle = symbolObj.olStyle;\r\n _this.defaultLabelHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(_this.renderer['defaultLabel']) + \"</span>\" + symbolObj.legendHtml;\r\n }\r\n else {\r\n _this.defaultStyle = undefined;\r\n _this.defaultLabelHtml = 'other';\r\n }\r\n _this.valueArray = [];\r\n _this.labelArray = [];\r\n _this.legendArray = [];\r\n _this.propertyStyleLookup = {};\r\n for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) {\r\n var uniqueVal = _a[_i];\r\n _this.labelArray.push(uniqueVal['label']);\r\n _this.valueArray.push(uniqueVal['value']);\r\n var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity);\r\n _this.legendArray.push(\"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(uniqueVal['label']) + \"</span>\" + uniqueSym.legendHtml);\r\n _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n _this.olStyle = function (feature) {\r\n var checkProperties = feature.getProperties();\r\n var checkProperty = checkProperties[_this.propertyName];\r\n if (_this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [_this.propertyStyleLookup[checkProperty]];\r\n }\r\n else {\r\n return [_this.defaultStyle];\r\n }\r\n };\r\n if (_this.defaultLabelHtml !== null) {\r\n _this.legendArray.push(_this.defaultLabelHtml);\r\n }\r\n _this.legendHtml = '<ul>';\r\n for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) {\r\n var h = _c[_b];\r\n _this.legendHtml += \"<li>\" + h + \"</li>\";\r\n }\r\n _this.legendHtml += '</ul>';\r\n return _this;\r\n }\r\n return UniqueValueSymbol;\r\n}(SymbolGenerator));\r\nfunction makeFeatureServiceLegendAndSymbol(esriResponse) {\r\n \"use strict\";\r\n var renderer = esriResponse.drawingInfo.renderer;\r\n var symbolLegendOut = null;\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n if (symbolLegendOut == null) {\r\n return { style: undefined, legend: '' };\r\n }\r\n else {\r\n return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml };\r\n }\r\n}\r\nexports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) {\r\n if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; }\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n var layerName = lyrObject['layerName'];\r\n var legendItems = lyrObject['legend'];\r\n var legendHtml = '';\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\";\r\n }\r\n if (legendItems.length == 1) {\r\n legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[0]['imageData'] + \"\\\">\";\r\n }\r\n else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (var i = 0; i < legendItems.length; i++) {\r\n legendHtml += \"<li>\";\r\n legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(legendItems[i]['label']) + \"</span>\";\r\n legendHtml += \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[i]['imageData'] + \"\\\">\";\r\n legendHtml += \"</li>\";\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\" + legendHtml;\r\n }\r\n return legendHtml;\r\n}\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nfunction makeMapServiceLegend(esriResponse, showLayers) {\r\n \"use strict\";\r\n if (showLayers === void 0) { showLayers = []; }\r\n var newLegendHtml = '';\r\n var layers = esriResponse['layers'];\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n }\r\n else {\r\n newLegendHtml += '<ul>';\r\n for (var i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0) {\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n return newLegendHtml;\r\n}\r\nexports.makeMapServiceLegend = makeMapServiceLegend;\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n/***/ }),\n/* 28 */,\n/* 29 */,\n/* 30 */,\n/* 31 */,\n/* 32 */,\n/* 33 */,\n/* 34 */,\n/* 35 */,\n/* 36 */,\n/* 37 */,\n/* 38 */,\n/* 39 */,\n/* 40 */,\n/* 41 */,\n/* 42 */,\n/* 43 */,\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBase_1 = __webpack_require__(10);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nvar LayerBaseVector = (function (_super) {\r\n __extends(LayerBaseVector, _super);\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n function LayerBaseVector(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, url, options) || this;\r\n options = options;\r\n //prevent regular load if no url has been provided\r\n if (_this.url.trim() == '') {\r\n _this._loaded = true;\r\n }\r\n _this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n if (_this.visible) {\r\n _this._autoLoad = true;\r\n }\r\n else {\r\n _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n if (options.mapMoveObj) {\r\n _this._mapMove = options.mapMoveObj;\r\n }\r\n else {\r\n _this._mapMove = _this._onDemand ? mapMove_1.default : undefined;\r\n }\r\n _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () { return {}; };\r\n if (_this._onDemand) {\r\n _this._loaded = true;\r\n _this._mapMoveParams = {};\r\n _this._mapMove.checkInit();\r\n _this._mapMove.addVectorLayer(_this);\r\n }\r\n _this._source = new ol.source.Vector();\r\n _this._olLayer = new ol.layer.Vector({\r\n source: _this._source,\r\n visible: _this.visible,\r\n style: _this.style,\r\n minResolution: _this._minResolution,\r\n maxResolution: _this._maxResolution,\r\n renderOrder: options.renderOrder\r\n });\r\n _this.olLayer.setZIndex(_this._zIndex);\r\n _this._projectionMap = null;\r\n _this._projection4326 = new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n _this._olLayer.setOpacity(_this.opacity);\r\n return _this;\r\n }\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n LayerBaseVector.prototype.addFeatures = function (featureCollection) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n };\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n return this.visible;\r\n };\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n };\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n LayerBaseVector.prototype.mapMoveCallback = function (d) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n };\r\n /**\r\n * clear features in the layer\r\n */\r\n LayerBaseVector.prototype.clear = function () {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n };\r\n Object.defineProperty(LayerBaseVector.prototype, \"onDemandDelay\", {\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get: function () {\r\n return this._onDemandDelay;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"autoLoad\", {\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get: function () {\r\n return this._autoLoad;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"style\", {\r\n /**\r\n * get the style definition\r\n */\r\n get: function () {\r\n return this._style;\r\n },\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set: function (style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapCrs\", {\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get: function () {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapProj\", {\r\n get: function () {\r\n if (this._projectionMap != null) {\r\n return this._projectionMap;\r\n }\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n }\r\n else {\r\n return null;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapMove\", {\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get: function () {\r\n return this._mapMove;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapMoveParams\", {\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._mapMoveParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"visible\", {\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set: function (visibility) {\r\n _super.prototype.setVisible.call(this, visibility);\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"source\", {\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"features\", {\r\n /**\r\n * array of ol features\r\n */\r\n get: function () {\r\n return this.source.getFeatures();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"olLayer\", {\r\n /**\r\n *\r\n */\r\n get: function () {\r\n return _super.prototype.getOlLayer.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBaseVector.prototype.setZIndex = function (newZ) {\r\n this.olLayer.setZIndex(newZ);\r\n };\r\n return LayerBaseVector;\r\n}(LayerBase_1.LayerBase));\r\nexports.LayerBaseVector = LayerBaseVector;\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexports.default = LayerBaseVector;\r\n\n\n/***/ }),\n/* 45 */,\n/* 46 */,\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar range_change_1 = __webpack_require__(51);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('domUtil');\r\n/**\r\n * @callback mediaCallback\r\n * @param {number} tm\r\n */\r\nfunction timeToLocalDateString(tm) {\r\n \"use strict\";\r\n var d = new Date(tm);\r\n var p1 = d.toLocaleTimeString().split(' ');\r\n var p2 = p1[0].split(':');\r\n p2 = p2.slice(0, 2);\r\n return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n}\r\nvar MediaControl = (function () {\r\n /**\r\n *\r\n * @param element\r\n * @param changeFunc\r\n * @param mediaConfig\r\n */\r\n function MediaControl(element, changeFunc, mediaConfig) {\r\n if (changeFunc === void 0) { changeFunc = function () {\r\n return;\r\n }; }\r\n if (mediaConfig === void 0) { mediaConfig = {}; }\r\n var _this = this;\r\n mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n if (typeof element == 'string') {\r\n this._container = $('#' + element);\r\n }\r\n else if (typeof element.style !== 'undefined') {\r\n this._container = $(element);\r\n }\r\n else {\r\n this._container = element;\r\n }\r\n this._container.addClass('media-control-container');\r\n this._playInterval = mediaConfig.playInterval;\r\n this._changeFunc = changeFunc;\r\n this._showAsDate = mediaConfig.showAsDate;\r\n this._currentValue = undefined;\r\n this._min = undefined;\r\n this._max = undefined;\r\n this._step = undefined;\r\n this._playing = false;\r\n var htmlStr = '<span class=\"media-player-button media-back\"></span>' +\r\n '<span class=\"media-player-button media-play\"></span>' +\r\n '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n '<span class=\"media-player-button media-ahead\"></span>' +\r\n \"<input type=\\\"range\\\">\" +\r\n \"<div class=\\\"media-control-value-label-container\\\">\" +\r\n \"<span class=\\\"media-control-value-label-min\\\"></span>\" +\r\n \"<span class=\\\"media-control-value-label-val\\\"></span>\" +\r\n \"<span class=\\\"media-control-value-label-max\\\"></span>\" +\r\n \"</div>\";\r\n this._container.append(htmlStr);\r\n // let btnPause = this._container.find('.media-pause');\r\n var btnPlay = this._container.find('.media-play');\r\n this._$btnStop = this._container.find('.media-stop');\r\n var btnAhead = this._container.find('.media-ahead');\r\n var btnBack = this._container.find('.media-back');\r\n this._$slider = this._container.find('input[type=range]');\r\n this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n range_change_1.rangeChange(this._$slider, function (newVal) {\r\n _this.currentValue = newVal;\r\n }, 100);\r\n var ___this = this;\r\n btnPlay.click(function () {\r\n var $this = $(this);\r\n $this.addClass('media-disabled');\r\n ___this._$btnStop.removeClass('media-disabled');\r\n btnAhead.addClass('media-locked');\r\n btnBack.addClass('media-locked');\r\n ___this._$slider.prop('disabled', true);\r\n ___this._playing = true;\r\n ___this._interval = setInterval(function () {\r\n ___this.currentValue += ___this._step;\r\n }, ___this._playInterval);\r\n });\r\n this._$btnStop.click(function () {\r\n clearInterval(___this._interval);\r\n var $this = $(this);\r\n $this.addClass('media-disabled');\r\n btnPlay.removeClass('media-disabled');\r\n btnAhead.removeClass('media-locked');\r\n btnBack.removeClass('media-locked');\r\n ___this._$slider.prop('disabled', false);\r\n ___this._playing = false;\r\n });\r\n btnAhead.click(function () {\r\n ___this.currentValue = ___this.currentValue + ___this._step;\r\n });\r\n btnBack.click(function () {\r\n ___this.currentValue = ___this.currentValue - ___this._step;\r\n });\r\n }\r\n MediaControl.prototype.stopPlaying = function () {\r\n if (this._playing) {\r\n this._$btnStop.trigger('click');\r\n }\r\n };\r\n Object.defineProperty(MediaControl.prototype, \"playing\", {\r\n get: function () {\r\n return this._playing;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"min\", {\r\n get: function () {\r\n return this._min;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"max\", {\r\n get: function () {\r\n return this._max;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"step\", {\r\n get: function () {\r\n return this._step;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"currentValue\", {\r\n get: function () {\r\n return this._currentValue;\r\n },\r\n set: function (newValue) {\r\n if (newValue > this._max) {\r\n newValue = this._min;\r\n }\r\n else if (newValue < this._min) {\r\n newValue = this._max;\r\n }\r\n this._currentValue = newValue;\r\n this._$slider.val(this._currentValue.toFixed(2));\r\n if (this._showAsDate) {\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n }\r\n else {\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n }\r\n this._changeFunc(newValue);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * set min and max value with step\r\n * @param {number} newMin the new min\r\n * @param {number} newMax the new mas\r\n * @param {number} [newValue=newMin] the value to set\r\n * @param {number} [newStep=(newMax-newMin)/20] step value\r\n */\r\n MediaControl.prototype.setMinMaxValueStep = function (newMin, newMax, newValue, newStep) {\r\n this._min = newMin;\r\n this._max = newMax;\r\n newValue = typeof newValue == 'number' ? newValue : newMin;\r\n newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n this._currentValue = newValue;\r\n this._step = newStep;\r\n this._$slider.prop('min', this.min.toString());\r\n this._$slider.prop('max', this.max.toString());\r\n this._$slider.prop('step', this.step.toString());\r\n this._$slider.val(this.currentValue.toString());\r\n if (this._showAsDate) {\r\n this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n }\r\n else {\r\n this._$valLabelMin.html(this._min.toString());\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n this._$valLabelMax.html(this._max.toString());\r\n }\r\n };\r\n Object.defineProperty(MediaControl.prototype, \"changeFunction\", {\r\n /**\r\n *\r\n * @param {mediaCallback} newFunc the callback on change\r\n */\r\n set: function (newFunc) {\r\n this._changeFunc = newFunc;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MediaControl;\r\n}());\r\nexports.MediaControl = MediaControl;\r\nnm.MediaControl = MediaControl;\r\n\n\n/***/ }),\n/* 48 */,\n/* 49 */,\n/* 50 */,\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('domUtil');\r\nvar mouseIn = false;\r\nvar mouseDown = false;\r\nvar timeout = null;\r\nvar dragged = false;\r\nvar lastVal;\r\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\nfunction triggerCallback(callback, evt) {\r\n \"use strict\";\r\n var val = parseFloat(this.value);\r\n var min = parseFloat(this.min);\r\n var max = parseFloat(this.max);\r\n var step = parseFloat(this.step);\r\n if (max - val < step) {\r\n val = max;\r\n }\r\n var percent = (val - min) / (max - min);\r\n if (typeof lastVal == 'number' && val == lastVal) {\r\n return;\r\n }\r\n lastVal = val;\r\n callback(val, percent, evt);\r\n}\r\n/**\r\n * Add a variety of listeners for range inputs applied to a common callback\r\n * @param $slider - jquery reference to the slider\r\n * @param {rangeChangeCallback} callback - the callback\r\n * @param {number} [changeTimeout=75] before the callback is called\r\n * @this {jQuery}\r\n * @returns {jQuery} the jQuery object\r\n */\r\nfunction rangeChange($slider, callback, changeTimeout) {\r\n changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n $slider.mouseenter(function () {\r\n mouseIn = true;\r\n });\r\n $slider.mouseleave(function () {\r\n mouseIn = false;\r\n mouseDown = false;\r\n });\r\n $slider.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n $slider.mouseup(function () {\r\n mouseDown = false;\r\n });\r\n $slider.mousemove(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n * @this {HTMLElement}\r\n */\r\n function (evt) {\r\n if (!(mouseIn && mouseDown)) {\r\n return;\r\n }\r\n dragged = true;\r\n if (lastVal == this['value']) {\r\n return;\r\n }\r\n lastVal = this['value'];\r\n if (timeout != null) {\r\n clearTimeout(timeout);\r\n }\r\n var _this = this;\r\n timeout = setTimeout(function () {\r\n triggerCallback.call(_this, callback, evt);\r\n timeout = null;\r\n }, changeTimeout);\r\n });\r\n $slider.keyup(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n */\r\n function (evt) {\r\n if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n triggerCallback.call(this, callback, evt);\r\n }\r\n });\r\n $slider.change(function (evt) {\r\n if (dragged) {\r\n dragged = false;\r\n return;\r\n }\r\n triggerCallback.call(this, callback, evt);\r\n });\r\n return this;\r\n}\r\nexports.rangeChange = rangeChange;\r\nnm.rangeChange = rangeChange;\r\n\n\n/***/ }),\n/* 52 */,\n/* 53 */,\n/* 54 */,\n/* 55 */,\n/* 56 */,\n/* 57 */,\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBaseVector_1 = __webpack_require__(44);\r\nvar esriToOl = __webpack_require__(27);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @param {number} layer\r\n * @returns {string}\r\n */\r\nfunction makeServiceUrl(folder, service, layer) {\r\n return \"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/\" + folder + \"/\" + service + \"/MapServer/\" + layer;\r\n}\r\nexports.makeServiceUrl = makeServiceUrl;\r\n/**\r\n * Base layer for esri vector layers\r\n * @augments LayerBaseVector\r\n */\r\nvar LayerBaseVectorEsri = (function (_super) {\r\n __extends(LayerBaseVectorEsri, _super);\r\n /**\r\n * The base vector layer\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n * @param {string} [options.where=1=1] the layer filter clause\r\n * @param {string} [options.outFields=*] comma separated list of output fields, defaults to all\r\n * @param {string} [options.format=pjson] the format the retrieve the data\r\n * @param {number} [options.outSR=3857] the output spatial reference, defaults to web mercator\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n * @param {boolean} [options.collapseLegend=false] if the legend should be initially collapsed\r\n * @param {number} [options.mapMoveMakeGetParams=function(extent, zoomLevel){}] function to create additional map move params\r\n */\r\n function LayerBaseVectorEsri(url, options) {\r\n var _this = this;\r\n if (typeof options.params != 'object') {\r\n options.params = {};\r\n }\r\n options.params['where'] = options.where || '1=1';\r\n options.params['outFields'] = options.outFields || '*';\r\n options.params['f'] = options.format || 'pjson';\r\n options.params['outSR'] = options.outSR || 3857;\r\n _this = _super.call(this, url, options) || this;\r\n _this._outSR = _this.params['outSR'];\r\n _this._esriFormat = new ol.format.EsriJSON();\r\n if (_this._url[_this._url.length - 1] !== '/') {\r\n _this._url += '/';\r\n }\r\n _this._urlCopy = _this.url;\r\n _this._url += 'query?callback=?';\r\n if (_this.autoLoad || _this.visible) {\r\n _this._load();\r\n }\r\n _this._useEsriStyle = typeof options.useEsriStyle == 'boolean' ? options.useEsriStyle : false;\r\n if (_this._useEsriStyle) {\r\n _this.addLegendContent();\r\n }\r\n return _this;\r\n }\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content to add to legend\r\n */\r\n LayerBaseVectorEsri.prototype.addLegendContent = function (additionalContent) {\r\n var _this = this;\r\n if (!this._useEsriStyle) {\r\n _super.prototype.addLegendContent.call(this, additionalContent);\r\n }\r\n else {\r\n $.get(this._urlCopy + '?f=pjson&callback=?', {}, function (d) {\r\n if (d['subLayers'].length > 0) {\r\n alert('should only use single feature layers, not groups');\r\n return;\r\n }\r\n var newStyleAndLegend = esriToOl.makeFeatureServiceLegendAndSymbol(d);\r\n _this.style = newStyleAndLegend.style;\r\n _super.prototype.addLegendContent.call(_this, newStyleAndLegend.legend);\r\n }, 'json');\r\n }\r\n };\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - features as esrijson\r\n */\r\n LayerBaseVectorEsri.prototype.addFeatures = function (featureCollection) {\r\n var feats = this._esriFormat.readFeatures(featureCollection);\r\n this.source.addFeatures(feats);\r\n };\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBaseVectorEsri.prototype._load = function () {\r\n var _this = this;\r\n if (_super.prototype._load.call(this)) {\r\n return true;\r\n }\r\n $.get(this._url, this.params, function (d) {\r\n _this.addFeatures(d);\r\n _this.loadCallback(_this);\r\n }, 'json').fail(function () {\r\n _this._loaded = false;\r\n });\r\n return false;\r\n };\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n LayerBaseVectorEsri.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n _super.prototype.mapMoveMakeGetParams.call(this, extent, zoomLevel);\r\n this.mapMoveParams['geometry'] = extent.minX + \",\" + extent.minY + \",\" + extent.maxX + \",\" + extent.maxY;\r\n this.mapMoveParams['geometryType'] = 'esriGeometryEnvelope';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['inSR'] = 3857;\r\n if (this._outSR == 3857) {\r\n this.mapMoveParams['geometryPrecision'] = 1;\r\n }\r\n };\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n LayerBaseVectorEsri.prototype.mapMoveBefore = function (zoom, evtType) {\r\n return _super.prototype.mapMoveBefore.call(this, zoom, evtType);\r\n //if (super.mapMoveBefore(zoom, evtType)){\r\n // //place holder for additional processing\r\n // return true;\r\n //} else {\r\n // return false;\r\n //}\r\n };\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n LayerBaseVectorEsri.prototype.mapMoveCallback = function (d) {\r\n _super.prototype.mapMoveCallback.call(this, d);\r\n this.source.addFeatures(this._esriFormat.readFeatures(d));\r\n };\r\n return LayerBaseVectorEsri;\r\n}(LayerBaseVector_1.LayerBaseVector));\r\nexports.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\nnm.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\nexports.default = LayerBaseVectorEsri;\r\n\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/4/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBaseXyzTile_1 = __webpack_require__(62);\r\nvar RealEarthAnimateTile_1 = __webpack_require__(65);\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * Real earth tile\r\n * @augments LayerBaseXyzTile\r\n */\r\nvar LayerRealEarthTile = (function (_super) {\r\n __extends(LayerRealEarthTile, _super);\r\n /**\r\n * The base layer for all others\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {string} options.products - the products to request\r\n * @param {boolean} [options.hasTimes=false] If the layer is time dependent, fixed set of dates\r\n * @param {boolean} [options.animate=false] if the layer should be animated\r\n */\r\n function LayerRealEarthTile(options) {\r\n var _this = this;\r\n options.animate = typeof options.animate == 'boolean' ? options.animate : false;\r\n if (options.animate) {\r\n _this = _super.call(this, '', options) || this;\r\n _this._products = options.products;\r\n _this.animator = new RealEarthAnimateTile_1.default(_this, options.timeLoadCallback);\r\n _this.animator.timeInit();\r\n }\r\n else {\r\n _this = _super.call(this, \"http://realearth.ssec.wisc.edu/api/image?products=\" + options.products + \"&x={x}&y={y}&z={z}\", options) || this;\r\n _this._products = options.products;\r\n }\r\n return _this;\r\n }\r\n LayerRealEarthTile.prototype.setLayerTime = function (theTime) {\r\n if (this.animator) {\r\n return this.animator.setLayerTime(theTime);\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n LayerRealEarthTile.prototype._load = function () {\r\n if (this.animator) {\r\n return false;\r\n }\r\n return _super.prototype._load.call(this);\r\n };\r\n return LayerRealEarthTile;\r\n}(LayerBaseXyzTile_1.LayerBaseXyzTile));\r\nexports.LayerRealEarthTile = LayerRealEarthTile;\r\nnm.LayerRealEarthTile = LayerRealEarthTile;\r\nexports.default = LayerRealEarthTile;\r\n\n\n/***/ }),\n/* 60 */,\n/* 61 */,\n/* 62 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nvar LayerBase_1 = __webpack_require__(10);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * XYZ tile\r\n * @augments LayerBase\r\n */\r\nvar LayerBaseXyzTile = (function (_super) {\r\n __extends(LayerBaseXyzTile, _super);\r\n /**\r\n * The XYZ tile layer\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n */\r\n function LayerBaseXyzTile(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, url, options) || this;\r\n _this._source = new ol.source.XYZ({ url: _this.url == '' ? undefined : _this.url });\r\n _this._olLayer = new ol.layer.Tile({\r\n source: _this._source,\r\n visible: _this.visible,\r\n opacity: _this.opacity,\r\n minResolution: _this._minResolution,\r\n maxResolution: _this._maxResolution\r\n });\r\n _this._olLayer.setZIndex(_this._zIndex);\r\n return _this;\r\n }\r\n Object.defineProperty(LayerBaseXyzTile.prototype, \"source\", {\r\n /**\r\n *\r\n * @returns {ol.source.XYZ} the vector source\r\n */\r\n get: function () {\r\n return this._source;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseXyzTile.prototype, \"olLayer\", {\r\n /**\r\n *\r\n * @returns {ol.layer.Tile|ol.layer.Base|undefined} the ol layer\r\n */\r\n get: function () {\r\n return this._olLayer;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LayerBaseXyzTile;\r\n}(LayerBase_1.LayerBase));\r\nexports.LayerBaseXyzTile = LayerBaseXyzTile;\r\nnm.LayerBaseXyzTile = LayerBaseXyzTile;\r\nexports.default = LayerBaseXyzTile;\r\n\n\n/***/ }),\n/* 63 */,\n/* 64 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('mixin');\r\n/**\r\n * The GMT offset time in minutes\r\n * @type {number}\r\n */\r\nvar offsetMinutes = (new Date()).getTimezoneOffset();\r\n/**\r\n * Mixin to get the product times\r\n * Be sure to call getTimeInit after the mixin has been applied\r\n */\r\nvar RealEarthAnimate = (function () {\r\n function RealEarthAnimate(lyr, loadCallback) {\r\n this.lyr = lyr;\r\n this._products = lyr._products;\r\n if (loadCallback) {\r\n this.loadCallback = loadCallback;\r\n }\r\n else {\r\n this.loadCallback = function () { return; };\r\n }\r\n }\r\n /**\r\n * Call this after the mixin has been applied\r\n */\r\n RealEarthAnimate.prototype.timeInit = function () {\r\n var _this = this;\r\n this._rawDateStrings = [];\r\n this._localDates = [];\r\n this.localTimes = [];\r\n this._animateEnabled = true;\r\n // this._loaded = true;\r\n this._currentTime = undefined;\r\n this._currentIndex = undefined;\r\n $.get('http://realearth.ssec.wisc.edu/api/products', { products: this._products }, function (d) {\r\n if (d.length == 0) {\r\n console.log(_this._products + \" layer not available or does not have times\");\r\n return;\r\n }\r\n d = d[0];\r\n for (var i = 0; i < d['times'].length; i++) {\r\n _this._loadDates.call(_this, d['times'][i]);\r\n }\r\n _this.loadCallback.call(_this.lyr, _this.lyr);\r\n _this._loadLatest.call(_this);\r\n }, 'json');\r\n };\r\n /**\r\n * Given the raw time string, add to the arrays to keep track of dates and cache\r\n * @param {string} inString - input string to parse\r\n * @returns {string} the converted string\r\n * @protected\r\n */\r\n RealEarthAnimate.prototype._loadDates = function (inString) {\r\n var yr = inString.slice(0, 4);\r\n var month = inString.slice(4, 6);\r\n var d = inString.slice(6, 8);\r\n var hr = inString.slice(9, 11);\r\n var mn = inString.slice(11, 13);\r\n var sec = inString.slice(13, 15);\r\n var rawDateStr = inString.replace('.', '_');\r\n this._rawDateStrings.push(rawDateStr);\r\n var dteStr = month + \"/\" + d + \"/\" + yr + \" \" + hr + \":\" + mn + \":\" + sec;\r\n var newDte = new Date(dteStr);\r\n newDte.setMinutes(newDte.getMinutes() - offsetMinutes);\r\n this._localDates.push(newDte);\r\n this.localTimes.push(newDte.getTime());\r\n return rawDateStr;\r\n };\r\n /**\r\n *\r\n * @protected\r\n * @returns {boolean} if should continue\r\n */\r\n RealEarthAnimate.prototype._loadLatest = function () {\r\n mapPopup_1.default.closePopup();\r\n if (this.localTimes.length > 0) {\r\n this._currentIndex = this.localTimes.length - 1;\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n };\r\n /**\r\n *\r\n * @param {number} theTime - the time\r\n * @returns {boolean} true if new index, false if the same or below lowest value\r\n */\r\n RealEarthAnimate.prototype.setLayerTime = function (theTime) {\r\n this._currentTime = theTime;\r\n var newIndex;\r\n if (theTime < this.localTimes[0]) {\r\n return false;\r\n }\r\n else if (theTime > this.localTimes[this.localTimes.length - 1]) {\r\n newIndex = this.localTimes.length - 1;\r\n }\r\n for (var i = 0; i < this.localTimes.length; i++) {\r\n if (this.localTimes[i] >= theTime) {\r\n newIndex = i;\r\n break;\r\n }\r\n }\r\n if (newIndex == this._currentIndex) {\r\n return false;\r\n }\r\n else {\r\n this._currentIndex = newIndex;\r\n mapPopup_1.default.closePopup();\r\n return true;\r\n }\r\n };\r\n return RealEarthAnimate;\r\n}());\r\nexports.RealEarthAnimate = RealEarthAnimate;\r\nnm.RealEarthAnimate = RealEarthAnimate;\r\nexports.default = RealEarthAnimate;\r\n\n\n/***/ }),\n/* 65 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nvar RealEarthAnimate_1 = __webpack_require__(64);\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('mixin');\r\n/**\r\n * Animate real earth tile\r\n * @augments RealEarthAnimate\r\n */\r\nvar RealEarthAnimateTile = (function (_super) {\r\n __extends(RealEarthAnimateTile, _super);\r\n function RealEarthAnimateTile(layer, loadCallback) {\r\n var _this = _super.call(this, layer, loadCallback) || this;\r\n _this._source = layer.source;\r\n _this._olLayer = layer.olLayer;\r\n return _this;\r\n }\r\n RealEarthAnimateTile.prototype.timeInit = function () {\r\n _super.prototype.timeInit.call(this);\r\n this._sourceUrls = [];\r\n };\r\n RealEarthAnimateTile.prototype._loadDates = function (inString) {\r\n var rawDte = _super.prototype._loadDates.call(this, inString);\r\n var dteProductUrl = \"http://realearth.ssec.wisc.edu/api/image?products=\" + this._products + \"_\" + rawDte + \"&x={x}&y={y}&z={z}\";\r\n this._sourceUrls.push(dteProductUrl);\r\n return '';\r\n };\r\n /**\r\n * @protected\r\n */\r\n RealEarthAnimateTile.prototype._loadLatest = function () {\r\n if (_super.prototype._loadLatest.call(this)) {\r\n this._source.setUrl(this._sourceUrls[this._sourceUrls.length - 1]);\r\n }\r\n return true;\r\n };\r\n RealEarthAnimateTile.prototype.setLayerTime = function (theTime) {\r\n if (_super.prototype.setLayerTime.call(this, theTime)) {\r\n if (this._olLayer.getZIndex() < 0) {\r\n this._olLayer.setZIndex(0);\r\n }\r\n this._source.setUrl(this._sourceUrls[this._currentIndex]);\r\n }\r\n else {\r\n this._olLayer.setZIndex(-1);\r\n }\r\n return true;\r\n };\r\n return RealEarthAnimateTile;\r\n}(RealEarthAnimate_1.default));\r\nnm.RealEarthAnimateTile = RealEarthAnimateTile;\r\nexports.default = RealEarthAnimateTile;\r\n\n\n/***/ }),\n/* 66 */,\n/* 67 */,\n/* 68 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMap_1 = __webpack_require__(6);\r\nvar LayerRealEarthTile_1 = __webpack_require__(59);\r\nvar media_control_1 = __webpack_require__(47);\r\nvar $ = __webpack_require__(1);\r\nvar LayerBaseVectorEsri_1 = __webpack_require__(58);\r\nvar LayerEsriMapServer_1 = __webpack_require__(25);\r\nvar nexrhresStatic = new LayerRealEarthTile_1.default({\r\n products: 'nexrhres',\r\n id: 'nexrhres-static',\r\n opacity: 0.6,\r\n animate: true,\r\n name: 'Hybrid Reflectivity',\r\n // maxZoom: 10,\r\n timeLoadCallback: function (f) {\r\n console.log(f);\r\n }\r\n});\r\nvar d = new Date();\r\nvar endTime = d.getTime();\r\nd.setHours(d.getHours() - 4);\r\nvar startTime = d.getTime();\r\nvar rangeStep = Math.round((endTime - startTime) / 8);\r\nvar media = new media_control_1.MediaControl($('#control'), function (v) {\r\n nexrhresStatic.setLayerTime(v);\r\n}, {\r\n min: startTime,\r\n max: endTime,\r\n val: endTime,\r\n step: rangeStep,\r\n playInterval: 750,\r\n showAsDate: true\r\n});\r\nvar map = quickMap_1.quickMap();\r\nmap.addLayer(nexrhresStatic.olLayer);\r\nvar coordinationLayer = new LayerBaseVectorEsri_1.LayerBaseVectorEsri('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0', {\r\n visible: true,\r\n autoLoad: true,\r\n name: 'Coordination',\r\n useEsriStyle: true\r\n});\r\nmap.addLayer(coordinationLayer.olLayer);\r\nvar oakRidgeLayers = [\r\n ['Cameras', 'cameras33'],\r\n ['HAR', 'HAR33'],\r\n ['DMS', 'MessageSigns33'],\r\n //['State Summary', 'statesummary'],\r\n ['Traffic Control', 'TrafficControl33'],\r\n ['Traffic Detection', 'TrafficDetectionMulti'],\r\n ['Weather', 'Weather33']\r\n];\r\nfor (var i = 0; i < oakRidgeLayers.length; i++) {\r\n var oakRidgeLayer = new LayerEsriMapServer_1.LayerEsriMapServer(\"http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/\" + oakRidgeLayers[i][1] + \"/MapServer\", {\r\n id: oakRidgeLayers[i][1],\r\n name: oakRidgeLayers[i][0],\r\n visible: true,\r\n minZoom: 7,\r\n zIndex: 20,\r\n addPopup: true,\r\n legendCollapse: true\r\n });\r\n map.addLayer(oakRidgeLayer.olLayer);\r\n}\r\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// animate.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 68);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 99693f14fcb3e83c98ca","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (f, l) => {\r\n if (hit) {\r\n return;\r\n }\r\n\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == l){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////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iIQwmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYW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EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer`\r\n}\r\n\r\nexport function localCacheUrl(folder: string, service: string): string{\r\n let loc = window.location.href;\r\n\r\n let url = `/mapserver/${folder}/${service}`;\r\n\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1){\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1){\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n } else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url\r\n }\r\n }\r\n\r\n\r\n return url;\r\n}\r\n\r\n\r\n\r\n\r\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n addPopup?: boolean;\r\n showLayers?: Array<number>;\r\n getLegend?: boolean;\r\n}\r\n\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nexport class LayerEsriMapServer extends LayerBase {\r\n _esriFormat: ol.format.EsriJSON;\r\n _popupRequest: JQueryXHR;\r\n _showLayers: number[];\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n constructor(url: string, options: LayerEsriMapServerOptions = {}) {\r\n\r\n super(url, options);\r\n this._source = new ol.source.TileArcGISRest(\r\n {\r\n url: this.url == '' ? undefined : this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : {layers: 'show:' + options.showLayers.join(',')}\r\n }\r\n );\r\n\r\n this._showLayers = options.showLayers || [];\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.Tile,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n });\r\n\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\r\n this._esriFormat = new ol.format.EsriJSON();\r\n this._popupRequest = null;\r\n\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n\r\n if (options.getLegend){\r\n this.addLegendContent();\r\n }\r\n\r\n if (options.addPopup) {\r\n mapPopup.addMapServicePopup(this);\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n\r\n $.get(urlCopy, {}, (d) => {\r\n let newHtml = esriToOl.makeMapServiceLegend(d, this._showLayers);\r\n super.addLegendContent(newHtml);\r\n }, 'json');\r\n }\r\n\r\n\r\n getPopupInfo(queryParams: {[s: string]: any}) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'identify?callback=?';\r\n\r\n let __this = this;\r\n\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n\r\n\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (let r of d['results']) {\r\n\r\n let popupHtml = '<table class=\"esri-popup-table\">';\r\n\r\n for (let a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n let attrVal = r['attributes'][a];\r\n\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n\r\n let attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n\r\n popupHtml += `<tr><td>${attr}</td><td>${attrVal}</td></tr>`;\r\n }\r\n }\r\n\r\n popupHtml += '</table>';\r\n\r\n mapPopup.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get source(): ol.source.TileArcGISRest {\r\n return super.getSource() as ol.source.TileArcGISRest;\r\n }\r\n\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get olLayer(): ol.layer.Tile {\r\n return super.getOlLayer() as ol.layer.Tile;\r\n }\r\n}\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexport default LayerEsriMapServer;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerEsriMapServer.ts","/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers.esriToOlStyle');\r\n\r\n\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray: [number, number, number], opacity: number): string {\r\n \"use strict\";\r\n\r\n return `rgba(${colorArray[0]},${colorArray[1]},${colorArray[2]},${opacity})`;\r\n}\r\n\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str: string): string {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface iEsriResponse{\r\n drawingInfo: {\r\n renderer: iEsriRenderer;\r\n transparency: number\r\n },\r\n geometryType: string\r\n}\r\n\r\n\r\nexport interface iEsriRenderer{\r\n type: string;\r\n symbol: iEsriSymbol;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n field1: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultLabel: string;\r\n}\r\n\r\nexport interface iEsriSymbol{\r\n size: number;\r\n type: string;\r\n outline:{\r\n color: [number, number, number];\r\n width: number;\r\n },\r\n color: [number, number, number];\r\n width: number;\r\n imageData: string\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n legendHtml: string;\r\n opacity: number;\r\n symbolObj: iEsriSymbol;\r\n olStyle: ol.style.Style;\r\n\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\ninterface ICommonSymbol{\r\n new (symbolObj: iEsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSMS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n let radius = this.symbolObj.size;\r\n\r\n\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({color: outerColor, width: outlineWidth})\r\n })\r\n });\r\n this.legendHtml = `<span class=\"legend-layer-icon\" style=\"color: ${innerColor}\">●</span>`;\r\n break;\r\n case 'esriPMS':\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({src: `data:image/png;base64,${this.symbolObj['imageData']}`})\r\n });\r\n this.legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${this.symbolObj['imageData']}\">`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass LineSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSLS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let lineWidth = this.symbolObj.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 4px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: -1px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass PolygonSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj['type']) {\r\n case 'esriSFS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `border: solid ${outerColor} 1px;`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 9px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: 2px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nexport interface iStyleFunc{\r\n (f: ol.Feature): ol.style.Style| ol.style.Style[]\r\n}\r\n\r\nclass SymbolGenerator {\r\n opacity: number;\r\n renderer: iEsriRenderer;\r\n legendHtml: string;\r\n olStyle: iStyleFunc | ol.style.Style;\r\n\r\n constructor(esriResponse: iEsriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n symbol: iEsriSymbol;\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.symbol = this.renderer.symbol;\r\n let symbolObj = new SymbolClass(this.symbol, this.opacity);\r\n this.olStyle = symbolObj.olStyle;\r\n this.legendHtml = symbolObj.legendHtml;\r\n }\r\n}\r\n\r\nclass UniqueValueSymbol extends SymbolGenerator {\r\n\r\n propertyName: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultStyle: ol.style.Style;\r\n defaultLabelHtml: string;\r\n labelArray: Array<string>;\r\n legendArray: Array<string>;\r\n propertyStyleLookup: {[s: string]: ol.style.Style};\r\n valueArray: Array<any>;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.uniqueValueInfos = this.renderer.uniqueValueInfos;\r\n this.propertyName = this.renderer.field1;\r\n this.defaultSymbol = this.renderer.defaultSymbol;\r\n\r\n\r\n if (this.defaultSymbol) {\r\n let symbolObj = new SymbolClass(this.defaultSymbol, this.opacity);\r\n this.defaultStyle = symbolObj.olStyle;\r\n this.defaultLabelHtml = `<span class=\"legend-layer-subitem\">${htmlEscape(this.renderer['defaultLabel'])}</span>` + symbolObj.legendHtml;\r\n } else {\r\n this.defaultStyle = undefined;\r\n this.defaultLabelHtml = 'other';\r\n }\r\n\r\n this.valueArray = [];\r\n this.labelArray = [];\r\n this.legendArray = [];\r\n this.propertyStyleLookup = {};\r\n\r\n for (let uniqueVal of this.uniqueValueInfos) {\r\n this.labelArray.push(uniqueVal['label']);\r\n this.valueArray.push(uniqueVal['value']);\r\n let uniqueSym = new SymbolClass(uniqueVal.symbol, this.opacity);\r\n this.legendArray.push(`<span class=\"legend-layer-subitem\">${htmlEscape(uniqueVal['label'])}</span>` + uniqueSym.legendHtml);\r\n this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n\r\n this.olStyle = (feature: ol.Feature): ol.style.Style[] => {\r\n let checkProperties = feature.getProperties();\r\n let checkProperty = checkProperties[this.propertyName];\r\n\r\n if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [this.propertyStyleLookup[checkProperty]];\r\n } else {\r\n return [this.defaultStyle];\r\n }\r\n };\r\n\r\n if (this.defaultLabelHtml !== null) {\r\n this.legendArray.push(this.defaultLabelHtml);\r\n }\r\n\r\n this.legendHtml = '<ul>';\r\n for (let h of this.legendArray) {\r\n this.legendHtml += `<li>${h}</li>`;\r\n }\r\n this.legendHtml += '</ul>';\r\n }\r\n}\r\n\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: iEsriResponse): {style: iStyleFunc | ol.style.Style, legend: string} {\r\n \"use strict\";\r\n let renderer = esriResponse.drawingInfo.renderer;\r\n let symbolLegendOut: SymbolGenerator = null;\r\n\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n\r\n if (symbolLegendOut == null) {\r\n return {style: undefined, legend: ''};\r\n } else {\r\n return {style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml};\r\n }\r\n}\r\n\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\r\n\r\nexport interface iMapServiceLegend{\r\n layerName: string;\r\n legend: {label: string, imageData: string}[]\r\n}\r\n\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject: iMapServiceLegend, skipLayerNameAndExpander: boolean = false) {\r\n\r\n\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n let layerName = lyrObject['layerName'];\r\n let legendItems = lyrObject['legend'];\r\n let legendHtml = '';\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += `<span class=\"legend-layer-subitem\">${layerName}</span>`;\r\n }\r\n\r\n if (legendItems.length == 1) {\r\n legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[0]['imageData']}\">`;\r\n } else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (let i = 0; i < legendItems.length; i++) {\r\n legendHtml += `<li>`;\r\n legendHtml += `<span class=\"legend-layer-subitem\">${htmlEscape(legendItems[i]['label'])}</span>`;\r\n legendHtml += `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[i]['imageData']}\">`;\r\n legendHtml += `</li>`;\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = `<span class=\"legend-layer-subitem\">${layerName}</span>` + legendHtml;\r\n }\r\n\r\n return legendHtml;\r\n}\r\n\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse: {layers: iMapServiceLegend[]}, showLayers: number[] = []) {\r\n \"use strict\";\r\n\r\n let newLegendHtml = '';\r\n\r\n let layers = esriResponse['layers'];\r\n\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n } else {\r\n newLegendHtml += '<ul>';\r\n for (let i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0){\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n\r\n return newLegendHtml;\r\n}\r\n\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/esriToOlStyle.ts","import {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport mapMove from '../olHelpers/mapMove';\r\nimport MapMoveCls from '../olHelpers/mapMoveCls'\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\nexport interface makeMapMoveParams {\r\n /**\r\n *\r\n * @param lyr\r\n * @param extent\r\n * @param zoomLevel\r\n */\r\n (lyr: LayerBaseVector, extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel?: number): any\r\n}\r\n\r\n\r\n\r\nexport interface LayerBaseVectorOptions extends LayerBaseOptions{\r\n autoLoad?: boolean;\r\n style?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n onDemand?: boolean;\r\n onDemandDelay?: number;\r\n mapMoveMakeGetParams?: makeMapMoveParams;\r\n mapMoveObj?: MapMoveCls;\r\n renderOrder?: (a: ol.Feature, b: ol.Feature) => number;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nexport class LayerBaseVector extends LayerBase {\r\n _olLayer: ol.layer.Vector;\r\n _source: ol.source.Vector;\r\n _style: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n _autoLoad: boolean;\r\n _onDemand: boolean;\r\n _onDemandDelay: number;\r\n _mapMoveMakeGetParams: makeMapMoveParams;\r\n _mapMoveParams: any;\r\n _mapMove: MapMoveCls;\r\n _projectionMap: ol.proj.Projection;\r\n _projection4326: ol.proj.Projection;\r\n\r\n\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n constructor(url: string, options: LayerBaseVectorOptions = {}) {\r\n super(url, options);\r\n\r\n options = options as LayerBaseVectorOptions;\r\n\r\n //prevent regular load if no url has been provided\r\n if (this.url.trim() == '') {\r\n this._loaded = true;\r\n }\r\n\r\n this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\r\n if (this.visible) {\r\n this._autoLoad = true;\r\n } else {\r\n this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n\r\n this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\r\n if (options.mapMoveObj) {\r\n this._mapMove = options.mapMoveObj;\r\n } else {\r\n this._mapMove = this._onDemand ? mapMove : undefined;\r\n }\r\n\r\n\r\n this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () {return {};};\r\n\r\n if (this._onDemand) {\r\n this._loaded = true;\r\n this._mapMoveParams = {};\r\n this._mapMove.checkInit();\r\n this._mapMove.addVectorLayer(this);\r\n }\r\n\r\n this._source = new ol.source.Vector();\r\n\r\n\r\n this._olLayer = new ol.layer.Vector(\r\n {\r\n source: this._source,\r\n visible: this.visible,\r\n style: this.style,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution,\r\n renderOrder: options.renderOrder\r\n }\r\n );\r\n\r\n this.olLayer.setZIndex(this._zIndex);\r\n\r\n this._projectionMap = null;\r\n this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\r\n this._olLayer.setOpacity(this.opacity)\r\n }\r\n\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n addFeatures(featureCollection: Object) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n return this.visible;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * clear features in the layer\r\n */\r\n clear() {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get onDemandDelay(): number {\r\n return this._onDemandDelay;\r\n }\r\n\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get autoLoad(): boolean {\r\n return this._autoLoad;\r\n }\r\n\r\n /**\r\n * get the style definition\r\n */\r\n get style(): ol.StyleFunction|Array<ol.style.Style>|ol.style.Style {\r\n return this._style;\r\n }\r\n\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set style(style: ol.StyleFunction|Array<ol.style.Style>|ol.style.Style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style as ol.style.Style);\r\n }\r\n\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get mapCrs(): string {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n }\r\n\r\n get mapProj(): ol.proj.Projection{\r\n if (this._projectionMap != null){\r\n return this._projectionMap;\r\n }\r\n\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get mapMove(): MapMoveCls {\r\n return this._mapMove;\r\n }\r\n\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get mapMoveParams() {\r\n return this._mapMoveParams;\r\n }\r\n\r\n get visible(): boolean{\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set visible(visibility) {\r\n super.setVisible(visibility);\r\n\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n }\r\n\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get source(): ol.source.Vector {\r\n return this.getSource() as ol.source.Vector;\r\n }\r\n\r\n /**\r\n * array of ol features\r\n */\r\n get features(): Array<ol.Feature> {\r\n return this.source.getFeatures();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n get olLayer(): ol.layer.Vector {\r\n return super.getOlLayer() as ol.layer.Vector;\r\n }\r\n\r\n protected setZIndex(newZ: number) {\r\n this.olLayer.setZIndex(newZ);\r\n }\r\n}\r\n\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexport default LayerBaseVector;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVector.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport {rangeChange} from './range-change';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('domUtil');\r\n\r\n/**\r\n * @callback mediaCallback\r\n * @param {number} tm\r\n */\r\n\r\nfunction timeToLocalDateString(tm: number) {\r\n \"use strict\";\r\n let d = new Date(tm);\r\n let p1 = d.toLocaleTimeString().split(' ');\r\n let p2 = p1[0].split(':');\r\n p2 = p2.slice(0, 2);\r\n\r\n return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n}\r\n\r\nexport interface changeFunction {\r\n (newVal?: number): void;\r\n}\r\n\r\nexport interface mediaRangeConfig {\r\n min?: number;\r\n max?: number;\r\n val?: number;\r\n step?: number;\r\n playInterval?: number;\r\n showAsDate?: boolean;\r\n}\r\n\r\n\r\nexport class MediaControl {\r\n _container: JQuery;\r\n _min: number;\r\n _max: number;\r\n _playInterval: number;\r\n _step: number;\r\n _currentValue: number;\r\n\r\n _playing: boolean;\r\n\r\n _$btnStop: JQuery;\r\n _$slider: JQuery;\r\n _$valLabelVal: JQuery;\r\n _$valLabelMin: JQuery;\r\n _$valLabelMax: JQuery;\r\n _interval: number;\r\n _showAsDate: boolean;\r\n\r\n _changeFunc: changeFunction;\r\n\r\n /**\r\n *\r\n * @param element\r\n * @param changeFunc\r\n * @param mediaConfig\r\n */\r\n constructor(element: JQuery | HTMLElement | string,\r\n changeFunc: changeFunction = (): void => {\r\n return;\r\n },\r\n mediaConfig: mediaRangeConfig = {}) {\r\n\r\n mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n\r\n if (typeof element == 'string') {\r\n this._container = $('#' + element);\r\n }\r\n else if (typeof (element as HTMLElement).style !== 'undefined') {\r\n this._container = $(element);\r\n } else {\r\n this._container = element as JQuery;\r\n }\r\n\r\n this._container.addClass('media-control-container');\r\n this._playInterval = mediaConfig.playInterval;\r\n this._changeFunc = changeFunc;\r\n\r\n this._showAsDate = mediaConfig.showAsDate;\r\n\r\n this._currentValue = undefined;\r\n this._min = undefined;\r\n this._max = undefined;\r\n this._step = undefined;\r\n this._playing = false;\r\n\r\n let htmlStr =\r\n '<span class=\"media-player-button media-back\"></span>' +\r\n '<span class=\"media-player-button media-play\"></span>' +\r\n '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n '<span class=\"media-player-button media-ahead\"></span>' +\r\n `<input type=\"range\">` +\r\n `<div class=\"media-control-value-label-container\">` +\r\n `<span class=\"media-control-value-label-min\"></span>` +\r\n `<span class=\"media-control-value-label-val\"></span>` +\r\n `<span class=\"media-control-value-label-max\"></span>` +\r\n `</div>`;\r\n\r\n this._container.append(htmlStr);\r\n\r\n // let btnPause = this._container.find('.media-pause');\r\n let btnPlay = this._container.find('.media-play');\r\n this._$btnStop = this._container.find('.media-stop');\r\n let btnAhead = this._container.find('.media-ahead');\r\n let btnBack = this._container.find('.media-back');\r\n this._$slider = this._container.find('input[type=range]');\r\n\r\n this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n\r\n this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n\r\n rangeChange(this._$slider, (newVal) => {\r\n this.currentValue = newVal;\r\n }, 100);\r\n\r\n let ___this = this;\r\n\r\n btnPlay.click(function () {\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n ___this._$btnStop.removeClass('media-disabled');\r\n btnAhead.addClass('media-locked');\r\n btnBack.addClass('media-locked');\r\n ___this._$slider.prop('disabled', true);\r\n ___this._playing = true;\r\n\r\n ___this._interval = setInterval(function () {\r\n ___this.currentValue += ___this._step;\r\n }, ___this._playInterval);\r\n });\r\n\r\n this._$btnStop.click(function () {\r\n clearInterval(___this._interval);\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n btnPlay.removeClass('media-disabled');\r\n btnAhead.removeClass('media-locked');\r\n btnBack.removeClass('media-locked');\r\n ___this._$slider.prop('disabled', false);\r\n ___this._playing = false;\r\n });\r\n\r\n btnAhead.click(function () {\r\n ___this.currentValue = ___this.currentValue + ___this._step;\r\n });\r\n\r\n btnBack.click(function () {\r\n ___this.currentValue = ___this.currentValue - ___this._step;\r\n });\r\n }\r\n\r\n stopPlaying() {\r\n if (this._playing) {\r\n this._$btnStop.trigger('click');\r\n }\r\n }\r\n\r\n get playing() {\r\n return this._playing;\r\n }\r\n\r\n get min() {\r\n return this._min;\r\n }\r\n\r\n get max() {\r\n return this._max;\r\n }\r\n\r\n get step() {\r\n return this._step;\r\n }\r\n\r\n get currentValue() {\r\n return this._currentValue;\r\n }\r\n\r\n set currentValue(newValue) {\r\n if (newValue > this._max) {\r\n newValue = this._min;\r\n } else if (newValue < this._min) {\r\n newValue = this._max;\r\n }\r\n this._currentValue = newValue;\r\n this._$slider.val(this._currentValue.toFixed(2));\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n } else {\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n }\r\n\r\n this._changeFunc(newValue);\r\n }\r\n\r\n /**\r\n * set min and max value with step\r\n * @param {number} newMin the new min\r\n * @param {number} newMax the new mas\r\n * @param {number} [newValue=newMin] the value to set\r\n * @param {number} [newStep=(newMax-newMin)/20] step value\r\n */\r\n setMinMaxValueStep(newMin: number, newMax: number, newValue: number, newStep: number) {\r\n this._min = newMin;\r\n this._max = newMax;\r\n\r\n newValue = typeof newValue == 'number' ? newValue : newMin;\r\n newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n\r\n this._currentValue = newValue;\r\n this._step = newStep;\r\n\r\n this._$slider.prop('min', this.min.toString());\r\n this._$slider.prop('max', this.max.toString());\r\n this._$slider.prop('step', this.step.toString());\r\n this._$slider.val(this.currentValue.toString());\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n } else {\r\n this._$valLabelMin.html(this._min.toString());\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n this._$valLabelMax.html(this._max.toString());\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {mediaCallback} newFunc the callback on change\r\n */\r\n set changeFunction(newFunc: changeFunction) {\r\n this._changeFunc = newFunc;\r\n }\r\n}\r\n\r\nnm.MediaControl = MediaControl;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/media-control.ts","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport {ChangeEvent} from \"react\";\r\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout: number = null;\r\nlet dragged = false;\r\nlet lastVal: number;\r\n\r\n\r\n/**\r\n * callback on range change interaction, context of this is the firing dom element\r\n * @callback rangeChangeCallback\r\n * @param {number} newValue\r\n * @param {number} ratio value from 0 to 1 relative of the value to the min and max\r\n * @param {object} evt\r\n */\r\n\r\n/***\r\n * callback funcion after the slider has been moved\r\n */\r\nexport interface rangeChangedCallback{\r\n /**\r\n *\r\n * @param newValue new value of the slider\r\n * @param ratio ratio from low to high, 0 to 1\r\n * @param evt the original event\r\n */\r\n (newValue: number, ratio: number, evt: ChangeEvent<HTMLInputElement>): any\r\n}\r\n\r\n\r\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nfunction triggerCallback(callback: rangeChangedCallback, evt: ChangeEvent<HTMLInputElement>) {\r\n \"use strict\";\r\n\r\n let val = parseFloat(this.value);\r\n let min = parseFloat(this.min);\r\n let max = parseFloat(this.max);\r\n let step = parseFloat(this.step);\r\n\r\n if (max - val < step){\r\n val = max;\r\n }\r\n\r\n let percent = (val - min) / (max - min);\r\n\r\n if (typeof lastVal == 'number' && val == lastVal){\r\n return;\r\n }\r\n lastVal = val;\r\n callback(val, percent, evt);\r\n}\r\n\r\n\r\n\r\n/**\r\n * Add a variety of listeners for range inputs applied to a common callback\r\n * @param $slider - jquery reference to the slider\r\n * @param {rangeChangeCallback} callback - the callback\r\n * @param {number} [changeTimeout=75] before the callback is called\r\n * @this {jQuery}\r\n * @returns {jQuery} the jQuery object\r\n */\r\nexport function rangeChange ($slider: JQuery, callback: rangeChangedCallback, changeTimeout: number) {\r\n\r\n changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n\r\n $slider.mouseenter(function () {\r\n mouseIn = true;\r\n });\r\n\r\n $slider.mouseleave(function () {\r\n mouseIn = false;\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n\r\n $slider.mouseup(function () {\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousemove(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n * @this {HTMLElement}\r\n */\r\n function (evt) {\r\n if (!(mouseIn && mouseDown)) {\r\n return;\r\n }\r\n\r\n dragged = true;\r\n\r\n if (lastVal == this['value']) {\r\n return;\r\n }\r\n lastVal = this['value'];\r\n\r\n if (timeout != null) {\r\n clearTimeout(timeout);\r\n }\r\n\r\n let _this = this;\r\n\r\n timeout = setTimeout(function () {\r\n triggerCallback.call(_this, callback, evt);\r\n timeout = null;\r\n\r\n }, changeTimeout);\r\n });\r\n\r\n $slider.keyup(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n */\r\n function (evt) {\r\n if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n triggerCallback.call(this, callback, evt);\r\n }\r\n });\r\n\r\n $slider.change(function (evt) {\r\n if (dragged) {\r\n dragged = false;\r\n\r\n return;\r\n }\r\n triggerCallback.call(this, callback, evt);\r\n });\r\n\r\n return this;\r\n}\r\n\r\nnm.rangeChange = rangeChange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/range-change.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nlet nm = provide('layers');\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @param {number} layer\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string, layer: number): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer/${layer}`\r\n}\r\n\r\nexport interface LayerBaseVectorEsriOptions extends LayerBaseVectorOptions{\r\n format?: string;\r\n outSR?: number;\r\n where?: string;\r\n outFields?: string;\r\n useEsriStyle?: boolean;\r\n}\r\n\r\n/**\r\n * Base layer for esri vector layers\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorEsri extends LayerBaseVector {\r\n _outSR: number;\r\n _esriFormat: ol.format.EsriJSON;\r\n _urlCopy: string;\r\n _useEsriStyle: boolean;\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n * @param {string} [options.where=1=1] the layer filter clause\r\n * @param {string} [options.outFields=*] comma separated list of output fields, defaults to all\r\n * @param {string} [options.format=pjson] the format the retrieve the data\r\n * @param {number} [options.outSR=3857] the output spatial reference, defaults to web mercator\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n * @param {boolean} [options.collapseLegend=false] if the legend should be initially collapsed\r\n * @param {number} [options.mapMoveMakeGetParams=function(extent, zoomLevel){}] function to create additional map move params\r\n */\r\n constructor(url: string, options: LayerBaseVectorEsriOptions) {\r\n\r\n if (typeof options.params != 'object') {\r\n options.params = {};\r\n }\r\n options.params['where'] = options.where || '1=1';\r\n options.params['outFields'] = options.outFields || '*';\r\n options.params['f'] = options.format || 'pjson';\r\n options.params['outSR'] = options.outSR || 3857;\r\n\r\n super(url, options);\r\n this._outSR = this.params['outSR'];\r\n this._esriFormat = new ol.format.EsriJSON();\r\n\r\n if (this._url[this._url.length - 1] !== '/') {\r\n this._url += '/';\r\n }\r\n\r\n this._urlCopy = this.url;\r\n this._url += 'query?callback=?';\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n\r\n this._useEsriStyle = typeof options.useEsriStyle == 'boolean' ? options.useEsriStyle : false;\r\n\r\n if (this._useEsriStyle) {\r\n this.addLegendContent();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content to add to legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n if (!this._useEsriStyle) {\r\n super.addLegendContent(additionalContent);\r\n } else {\r\n $.get(this._urlCopy + '?f=pjson&callback=?', {}, (d) => {\r\n if (d['subLayers'].length > 0) {\r\n alert('should only use single feature layers, not groups');\r\n\r\n return;\r\n }\r\n\r\n let newStyleAndLegend = esriToOl.makeFeatureServiceLegendAndSymbol(d);\r\n this.style = newStyleAndLegend.style;\r\n super.addLegendContent(newStyleAndLegend.legend);\r\n }, 'json');\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - features as esrijson\r\n */\r\n addFeatures(featureCollection: Object) {\r\n let feats = this._esriFormat.readFeatures(featureCollection);\r\n this.source.addFeatures(feats);\r\n }\r\n\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (super._load()) {\r\n return true;\r\n }\r\n $.get(this._url, this.params, (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(() => {\r\n this._loaded = false;\r\n });\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n super.mapMoveMakeGetParams(extent, zoomLevel);\r\n this.mapMoveParams['geometry'] = `${extent.minX},${extent.minY},${extent.maxX},${extent.maxY}`;\r\n this.mapMoveParams['geometryType'] = 'esriGeometryEnvelope';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n this.mapMoveParams['inSR'] = 3857;\r\n if (this._outSR == 3857) {\r\n this.mapMoveParams['geometryPrecision'] = 1;\r\n }\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n return super.mapMoveBefore(zoom, evtType);\r\n //if (super.mapMoveBefore(zoom, evtType)){\r\n // //place holder for additional processing\r\n // return true;\r\n //} else {\r\n // return false;\r\n //}\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this.source.addFeatures(this._esriFormat.readFeatures(d));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\nexport default LayerBaseVectorEsri;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVectorEsri.ts","/**\r\n * Created by gavorhes on 11/4/2015.\r\n */\r\n\r\nimport {LayerBaseXyzTile} from './LayerBaseXyzTile';\r\nimport {LayerBaseOptions} from './LayerBase';\r\nimport RealEarthAnimateTile from '../mixin/RealEarthAnimateTile';\r\nimport provide from '../util/provide';\r\nimport {IRealEarthAnimate, timesLoadedCallback} from \"../mixin/RealEarthAnimate\";\r\nconst nm = provide('layers');\r\n\r\nexport interface LayerRealEarthTileOptions extends LayerBaseOptions {\r\n products: string;\r\n animate?: boolean;\r\n timeLoadCallback?: timesLoadedCallback;\r\n}\r\n\r\n\r\n/**\r\n * Real earth tile\r\n * @augments LayerBaseXyzTile\r\n */\r\nexport class LayerRealEarthTile extends LayerBaseXyzTile implements IRealEarthAnimate {\r\n _products: string;\r\n animator: RealEarthAnimateTile;\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {string} options.products - the products to request\r\n * @param {boolean} [options.hasTimes=false] If the layer is time dependent, fixed set of dates\r\n * @param {boolean} [options.animate=false] if the layer should be animated\r\n */\r\n constructor(options: LayerRealEarthTileOptions) {\r\n options.animate = typeof options.animate == 'boolean' ? options.animate : false;\r\n if (options.animate) {\r\n super('', options);\r\n this._products = options.products;\r\n this.animator = new RealEarthAnimateTile(this, options.timeLoadCallback);\r\n this.animator.timeInit();\r\n } else {\r\n super(`http://realearth.ssec.wisc.edu/api/image?products=${options.products}&x={x}&y={y}&z={z}`, options);\r\n this._products = options.products;\r\n }\r\n }\r\n\r\n setLayerTime(theTime: number): boolean {\r\n if (this.animator) {\r\n return this.animator.setLayerTime(theTime);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n _load(): boolean {\r\n if (this.animator) {\r\n return false;\r\n }\r\n return super._load();\r\n }\r\n}\r\n\r\nnm.LayerRealEarthTile = LayerRealEarthTile;\r\nexport default LayerRealEarthTile;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerRealEarthTile.ts","/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('layers');\r\n\r\n\r\n/**\r\n * XYZ tile\r\n * @augments LayerBase\r\n */\r\nexport class LayerBaseXyzTile extends LayerBase {\r\n\r\n\r\n /**\r\n * The XYZ tile layer\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n super(url, options);\r\n this._source = new ol.source.XYZ({url: this.url == '' ? undefined : this.url});\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.XYZ,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n } );\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.XYZ} the vector source\r\n */\r\n get source(): ol.source.XYZ {\r\n return this._source as ol.source.XYZ;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.layer.Tile|ol.layer.Base|undefined} the ol layer\r\n */\r\n get olLayer() : ol.layer.Tile {\r\n return this._olLayer as ol.layer.Tile;\r\n }\r\n}\r\n\r\nnm.LayerBaseXyzTile = LayerBaseXyzTile;\r\nexport default LayerBaseXyzTile;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseXyzTile.ts","/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport LayerRealEarthTile from \"../layers/LayerRealEarthTile\";\r\nimport {LayerVectorRealEarth} from '../layers/LayerRealEarthVector'\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('mixin');\r\n\r\n\r\n/**\r\n * The GMT offset time in minutes\r\n * @type {number}\r\n */\r\nlet offsetMinutes = (new Date()).getTimezoneOffset();\r\n\r\nexport interface IRealEarthAnimate{\r\n setLayerTime(theTime: number): boolean;\r\n}\r\n\r\nexport interface timesLoadedCallback{\r\n (lyr?: LayerRealEarthTile|LayerVectorRealEarth): void;\r\n}\r\n\r\n\r\n/**\r\n * Mixin to get the product times\r\n * Be sure to call getTimeInit after the mixin has been applied\r\n */\r\nexport class RealEarthAnimate {\r\n _animateEnabled: boolean;\r\n _currentIndex: number;\r\n _localDates: Date[];\r\n _rawDateStrings: string[];\r\n _products: string;\r\n loadCallback: timesLoadedCallback;\r\n localTimes: number[];\r\n _currentTime: number;\r\n\r\n lyr: LayerRealEarthTile|LayerVectorRealEarth;\r\n\r\n constructor(lyr: LayerRealEarthTile|LayerVectorRealEarth, loadCallback?: timesLoadedCallback){\r\n this.lyr = lyr;\r\n this._products = lyr._products;\r\n if (loadCallback){\r\n this.loadCallback = loadCallback;\r\n } else {\r\n this.loadCallback = function(): void {return;};\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Call this after the mixin has been applied\r\n */\r\n timeInit() {\r\n\r\n this._rawDateStrings = [];\r\n this._localDates = [];\r\n this.localTimes = [];\r\n this._animateEnabled = true;\r\n // this._loaded = true;\r\n this._currentTime = undefined;\r\n this._currentIndex = undefined;\r\n\r\n $.get('http://realearth.ssec.wisc.edu/api/products', {products: this._products}, (d) => {\r\n if (d.length == 0) {\r\n console.log(`${this._products} layer not available or does not have times`);\r\n\r\n return;\r\n }\r\n d = d[0];\r\n for (let i = 0; i < d['times'].length; i++) {\r\n this._loadDates.call(this, d['times'][i]);\r\n }\r\n this.loadCallback.call(this.lyr, this.lyr);\r\n this._loadLatest.call(this);\r\n }, 'json');\r\n }\r\n\r\n\r\n /**\r\n * Given the raw time string, add to the arrays to keep track of dates and cache\r\n * @param {string} inString - input string to parse\r\n * @returns {string} the converted string\r\n * @protected\r\n */\r\n _loadDates(inString: string): string {\r\n let yr = inString.slice(0, 4);\r\n let month = inString.slice(4, 6);\r\n let d = inString.slice(6, 8);\r\n let hr = inString.slice(9, 11);\r\n let mn = inString.slice(11, 13);\r\n let sec = inString.slice(13, 15);\r\n\r\n let rawDateStr = inString.replace('.', '_');\r\n this._rawDateStrings.push(rawDateStr);\r\n\r\n let dteStr = `${month}/${d}/${yr} ${hr}:${mn}:${sec}`;\r\n let newDte = new Date(dteStr);\r\n newDte.setMinutes(newDte.getMinutes() - offsetMinutes);\r\n this._localDates.push(newDte);\r\n this.localTimes.push(newDte.getTime());\r\n\r\n return rawDateStr;\r\n }\r\n\r\n /**\r\n *\r\n * @protected\r\n * @returns {boolean} if should continue\r\n */\r\n _loadLatest(){\r\n mapPopup.closePopup();\r\n if (this.localTimes.length > 0){\r\n this._currentIndex = this.localTimes.length -1;\r\n\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} theTime - the time\r\n * @returns {boolean} true if new index, false if the same or below lowest value\r\n */\r\n setLayerTime(theTime: number): boolean{\r\n\r\n this._currentTime = theTime;\r\n\r\n let newIndex;\r\n\r\n if (theTime < this.localTimes[0]){\r\n return false;\r\n } else if (theTime > this.localTimes[this.localTimes.length - 1]){\r\n newIndex = this.localTimes.length - 1;\r\n }\r\n\r\n for (let i = 0; i < this.localTimes.length; i++){\r\n if (this.localTimes[i] >= theTime){\r\n newIndex = i;\r\n break;\r\n }\r\n }\r\n\r\n if (newIndex == this._currentIndex){\r\n return false;\r\n } else {\r\n this._currentIndex = newIndex;\r\n mapPopup.closePopup();\r\n\r\n return true;\r\n }\r\n }\r\n}\r\n\r\nnm.RealEarthAnimate = RealEarthAnimate;\r\nexport default RealEarthAnimate;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/mixin/RealEarthAnimate.ts","/**\r\n * Created by gavorhes on 12/4/2015.\r\n */\r\nimport RealEarthAnimate from './RealEarthAnimate';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport LayerRealEarthTile from \"../layers/LayerRealEarthTile\";\r\nconst nm = provide('mixin');\r\n\r\n/**\r\n * Animate real earth tile\r\n * @augments RealEarthAnimate\r\n */\r\nclass RealEarthAnimateTile extends RealEarthAnimate {\r\n _sourceUrls: string[];\r\n _source: ol.source.XYZ;\r\n _olLayer: ol.layer.Tile;\r\n\r\n constructor(layer: LayerRealEarthTile, loadCallback?: (lyr: LayerRealEarthTile) => void){\r\n super(layer, loadCallback);\r\n this._source = layer.source;\r\n this._olLayer = layer.olLayer;\r\n }\r\n\r\n\r\n\r\n timeInit() {\r\n super.timeInit();\r\n this._sourceUrls = [];\r\n }\r\n\r\n _loadDates(inString: string): string {\r\n let rawDte = super._loadDates(inString);\r\n let dteProductUrl =\r\n `http://realearth.ssec.wisc.edu/api/image?products=${this._products}_${rawDte}&x={x}&y={y}&z={z}`;\r\n this._sourceUrls.push(dteProductUrl);\r\n return '';\r\n }\r\n\r\n /**\r\n * @protected\r\n */\r\n _loadLatest(): boolean {\r\n if (super._loadLatest()){\r\n this._source.setUrl(this._sourceUrls[this._sourceUrls.length - 1]);\r\n }\r\n return true;\r\n }\r\n\r\n setLayerTime(theTime: number): boolean {\r\n if (super.setLayerTime(theTime)) {\r\n if (this._olLayer.getZIndex() < 0){\r\n this._olLayer.setZIndex(0);\r\n }\r\n this._source.setUrl(this._sourceUrls[this._currentIndex]);\r\n } else {\r\n this._olLayer.setZIndex(-1);\r\n }\r\n return true;\r\n }\r\n}\r\n\r\nnm.RealEarthAnimateTile = RealEarthAnimateTile;\r\nexport default RealEarthAnimateTile;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/mixin/RealEarthAnimateTile.ts","import {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerRealEarthTile from \"../../layers/LayerRealEarthTile\";\r\nimport {MediaControl, changeFunction} from \"../../domUtil/media-control\";\r\nimport $ = require('jquery');\r\nimport {LayerBaseVectorEsri} from \"../../layers/LayerBaseVectorEsri\";\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\n\r\nlet nexrhresStatic = new LayerRealEarthTile({\r\n products: 'nexrhres',\r\n id: 'nexrhres-static',\r\n opacity: 0.6,\r\n animate: true,\r\n name: 'Hybrid Reflectivity',\r\n // maxZoom: 10,\r\n timeLoadCallback: function (f) {\r\n console.log(f);\r\n }\r\n }\r\n);\r\n\r\n\r\nlet d = new Date();\r\nlet endTime = d.getTime();\r\nd.setHours(d.getHours() - 4);\r\nlet startTime = d.getTime();\r\nlet rangeStep = Math.round((endTime - startTime) / 8);\r\n\r\nlet media = new MediaControl(\r\n $('#control'),\r\n (v: number) => {\r\n nexrhresStatic.setLayerTime(v);\r\n },\r\n {\r\n min: startTime,\r\n max: endTime,\r\n val: endTime,\r\n step: rangeStep,\r\n playInterval: 750,\r\n showAsDate: true\r\n }\r\n);\r\n\r\n\r\nlet map = quickMap();\r\nmap.addLayer(nexrhresStatic.olLayer);\r\n\r\n\r\nlet coordinationLayer = new LayerBaseVectorEsri(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0',\r\n {\r\n visible: true,\r\n autoLoad: true,\r\n name: 'Coordination',\r\n useEsriStyle: true\r\n }\r\n);\r\n\r\nmap.addLayer(coordinationLayer.olLayer);\r\n\r\n let oakRidgeLayers = [\r\n ['Cameras', 'cameras33'],\r\n ['HAR', 'HAR33'],\r\n ['DMS', 'MessageSigns33'],\r\n //['State Summary', 'statesummary'],\r\n ['Traffic Control', 'TrafficControl33'],\r\n ['Traffic Detection', 'TrafficDetectionMulti'],\r\n ['Weather', 'Weather33']\r\n ];\r\n\r\n\r\n for (let i = 0; i < oakRidgeLayers.length; i++) {\r\n let oakRidgeLayer = new LayerEsriMapServer(\r\n `http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/${oakRidgeLayers[i][1]}/MapServer`,\r\n {\r\n id: oakRidgeLayers[i][1],\r\n name: oakRidgeLayers[i][0],\r\n visible: true,\r\n minZoom: 7,\r\n zIndex: 20,\r\n addPopup: true,\r\n legendCollapse: true\r\n }\r\n );\r\n map.addLayer(oakRidgeLayer.olLayer);\r\n }\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/animate.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/another.js b/test/serve/js/another.js index 17fc6cac4378d7c96f473def67162526f371a00a..eb9acd4a9fe3ce998b760aef76e9881372f77fc7 100644 --- a/test/serve/js/another.js +++ b/test/serve/js/another.js @@ -1,84 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 70); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 70: -/***/ (function(module, exports) { - -/** - * Created by gavorhes on 9/22/2016. - */ -console.log('here is another'); -console.log('here is another'); - - -/***/ }) - -/******/ }); +!function(e){function n(t){if(r[t])return r[t].exports;var o=r[t]={i:t,l:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r={};n.m=e,n.c=r,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n(n.s=69)}({69:function(e,n){console.log("here is another"),console.log("here is another")}}); //# sourceMappingURL=another.js.map \ No newline at end of file diff --git a/test/serve/js/another.js.map b/test/serve/js/another.js.map index 943207c6e17c4787099ad683617a9076bd792d7d..51829013f120a06e027f952f31a77860ddf640f2 100644 --- a/test/serve/js/another.js.map +++ b/test/serve/js/another.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc************","webpack:///./src/_tests/demos/another.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AChEA;;GAEG;AAEH,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC/B,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC","file":"another.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 70);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","/**\r\n * Created by gavorhes on 9/22/2016.\r\n */\r\n\r\nconsole.log('here is another');\r\nconsole.log('here is another');\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/another.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///another.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d************","webpack:///./src/_tests/demos/another.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","69","console","log"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,EAAAC,IAGtDvB,EAAA0B,EAAA,GAGA1B,IAAA2B,EAAA,MDMMC,GACA,SAAUxB,EAAQD,GEnExB0B,QAAQC,IAAI,mBACZD,QAAQC,IAAI","file":"another.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 69);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 69:\n/***/ (function(module, exports) {\n\n/**\r\n * Created by gavorhes on 9/22/2016.\r\n */\r\nconsole.log('here is another');\r\nconsole.log('here is another');\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// another.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 69);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","/**\r\n * Created by gavorhes on 9/22/2016.\r\n */\r\n\r\nconsole.log('here is another');\r\nconsole.log('here is another');\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/another.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/compare-test.js b/test/serve/js/compare-test.js index c7b5d3ff9be8c0dfd67d46bd7036484980cd3ac1..a6dc378f809465d337cb466d7db337e34b63300a 100644 --- a/test/serve/js/compare-test.js +++ b/test/serve/js/compare-test.js @@ -1,2484 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 71); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), - -/***/ 10: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var zoomResolutionConvert = __webpack_require__(17); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The base layer class - * @abstract - */ -var LayerBase = (function () { - /** - * The base layer for all others - * @param {string} url - url for source - * @param {object} options - config - * @param {string} [options.id=makeGuid()] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] - the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] - the z index for the layer - * @param {function} [options.loadCallback] - function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend - */ - function LayerBase(url, options) { - if (options === void 0) { options = {}; } - options = options || {}; - if (typeof url !== 'string') { - throw 'Invalid URL'; - } - this._url = url; - this._params = typeof options.params == 'object' ? options.params : {}; - this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false; - this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true; - this.id = options.id || makeGuid_1.default(); - this._name = options.name || 'Unnamed Layer'; - this.animate = false; - this._opacity = typeof options.opacity == 'number' ? options.opacity : 1; - if (this._opacity > 1) { - this._opacity = 1; - } - else if (this._opacity < 0) { - this._opacity = 0; - } - this._visible = typeof options.visible === 'boolean' ? options.visible : true; - this._source = undefined; - /** - * - * @protected - */ - this._olLayer = undefined; - this._loaded = false; - this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom); - if (typeof this._maxResolution !== 'undefined') { - this._maxResolution += 0.00001; - } - this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom); - this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined; - this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined; - this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0; - this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () { - }; - this._legendContent = ''; - if (this._legendCheckbox) { - this._legendContent += "<input type=\"checkbox\" " + (this.visible ? 'checked' : '') + " " + - ("class=\"legend-check\" id=\"" + this.id + "-legend-layer-check\"><span></span>"); - this._legendContent += "<label for=\"" + this.id + "-legend-layer-check\" class=\"legend-layer-name\">" + this.name + "</label>"; - } - else { - this._legendContent += "<label class=\"legend-layer-name\">" + this.name + "</label>"; - } - this._$legendDiv = null; - this._applyCollapseCalled = false; - this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined); - } - /** - * base load function, sets _loaded = true if it is not already - * @protected - * @returns {boolean} if already loaded - */ - LayerBase.prototype._load = function () { - if (this.loaded == true) { - return true; - } - else { - this._loaded = true; - return false; - } - }; - /** - * Get the legend html, be sure to only add to the DOM once - * @returns {string} html for layer wrapped in a div - */ - LayerBase.prototype.getLegendDiv = function () { - return "<div class=\"legend-layer-div\" id=\"" + this.id + "-legend-layer-div\">" + this._legendContent + "</div>"; - }; - /** - * - * @param additionalContent - additional content to add to legend - * @private - */ - LayerBase.prototype._addLegendContent = function (additionalContent) { - if (additionalContent === void 0) { additionalContent = ''; } - var addCollapse = additionalContent.indexOf('<ul>') > -1; - if (addCollapse) { - additionalContent = '<span class="legend-items-expander" title="Expand/Collapse">▼</span>' + additionalContent; - } - this._legendContent += additionalContent; - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - this._$legendDiv.append(additionalContent); - this.applyCollapse(); - } - }; - /** - * add additional content to the legend - * @param {string} [additionalContent=] - additonal content to add - */ - LayerBase.prototype.addLegendContent = function (additionalContent) { - this._addLegendContent(additionalContent); - }; - LayerBase.prototype.applyCollapse = function () { - if (this._applyCollapseCalled) { - console.log('collapse already applied'); - return undefined; - } - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - var $expander = this._$legendDiv.find('.legend-items-expander'); - if ($expander.length > 0) { - this._applyCollapseCalled = true; - $expander.click(function () { - var $this = $(this); - $this.siblings('ul').slideToggle(); - if ($this.hasClass('legend-layer-group-collapsed')) { - $this.removeClass('legend-layer-group-collapsed'); - $this.html('▼'); - } - else { - $this.addClass('legend-layer-group-collapsed'); - $this.html('▶'); - } - }); - if (this._legendCollapse) { - $expander.trigger('click'); - } - } - } - }; - /** - * trick to refresh the layer - */ - LayerBase.prototype.refresh = function () { - if (this.source) { - this.source.refresh(); - } - }; - Object.defineProperty(LayerBase.prototype, "id", { - get: function () { - return this._id; - }, - set: function (newId) { - this._id = newId; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "animate", { - get: function () { - return this._animate; - }, - set: function (animate) { - this._animate = animate; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "legendContent", { - /** - * get the legend content - * @type {string} - */ - get: function () { - return this._legendContent; - }, - /** - * set the legend content directly - * @param {string} newVal - new content - * @protected - */ - set: function (newVal) { - this._legendContent = newVal; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "params", { - /** - * get the map get params - * @type {object} - */ - get: function () { - return this._params; - }, - /** - * set the map get params - * @param {object} newParams - new get params - * @protected - */ - set: function (newParams) { - this._params = newParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minResolution", { - /** - * get the minimum resolution - * @type {number|*} - */ - get: function () { - return this._minResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxResolution", { - /** - * get the maximum resolution - * @type {number|*} - */ - get: function () { - return this._maxResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minZoom", { - /** - * get min zoom - * @type {number|*} - */ - get: function () { - return this._minZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxZoom", { - /** - * get max zoom - * @type {number|*} - */ - get: function () { - return this._maxZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "url", { - /** - * get the url - * @type {string} - */ - get: function () { - return this._url; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "visible", { - /** - * Get the layer visibility - * @type {boolean} - */ - get: function () { - return this._visible; - }, - /** - * set the visibility - * @param visibility - */ - set: function (visibility) { - this.setVisible(visibility); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setVisible = function (visibility) { - this._visible = visibility; - if (this.olLayer) { - this.olLayer.setVisible(this._visible); - if (visibility && !this._loaded) { - this._load(); - } - } - }; - Object.defineProperty(LayerBase.prototype, "opacity", { - /** - * Get the layer opacity - * @type {number} - */ - get: function () { - return this._opacity; - }, - /** - * Set the layer opacity - * @param {number} opacity - layer opacity - */ - set: function (opacity) { - this._opacity = opacity; - if (this.olLayer) { - this.olLayer.setOpacity(this._opacity); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "name", { - /** - * Get the layer name - * @type {string} - */ - get: function () { - return this._name; - }, - /** - * set the layer name - * @param {string} newName - the new name - */ - set: function (newName) { - this._name = newName; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "loaded", { - /** - * Check if the layer is loaded - * @type {boolean} - */ - get: function () { - return this._loaded; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "source", { - /** - * get the layer source - * @type {*} - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getSource = function () { - return this._source; - }; - Object.defineProperty(LayerBase.prototype, "zIndex", { - /** - * get the z index - */ - get: function () { - return this._zIndex; - }, - /** - * set the z index - */ - set: function (newZ) { - this._zIndex = newZ; - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setZIndex = function (newZ) { - }; - Object.defineProperty(LayerBase.prototype, "olLayer", { - /** - * the the ol layer - */ - get: function () { - return this.getOlLayer(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getOlLayer = function () { - return this._olLayer; - }; - return LayerBase; -}()); -exports.LayerBase = LayerBase; -nm.LayerBase = LayerBase; -exports.default = LayerBase; - - -/***/ }), - -/***/ 11: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var $ = __webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var ol = __webpack_require__(2); -var projections_1 = __webpack_require__(8); -var invalidClass = 'geocoder-invalid'; -var geocoderLoadingClass = 'geocoder-loading'; -// let testAddress = '65 7th Street, Prairie du Sac, WI'; -var Geocode = (function () { - function Geocode(mapDiv, map) { - var _this = this; - var inputGuid = makeGuid_1.makeGuid(); - var buttonGuid = makeGuid_1.makeGuid(); - this.map = map; - this.indicationLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: new ol.style.Style({ - image: new ol.style.Circle({ - radius: 12, - fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }), - stroke: new ol.style.Stroke({ color: 'red', width: 1 }) - }) - }) - }); - this.map.addLayer(this.indicationLayer); - $(mapDiv).append('<div class="geocoder-el">' + - ("<input type=\"text\" id=\"" + inputGuid + "\">") + - ("<button id=\"" + buttonGuid + "\">Search</button>") + - '</div>'); - this.theButton = document.getElementById(buttonGuid); - this.theInput = document.getElementById(inputGuid); - this.reset(); - var $theButton = $(this.theButton); - var $theInput = $(this.theInput); - $theButton.click(function (evt) { - evt.preventDefault(); - $theButton.addClass(geocoderLoadingClass); - _this.theButton.disabled = true; - _this.indicationLayer.getSource().clear(); - $.get("https://geocode.xyz/" + _this.theInput.value + "?geoit=json", {}, function (d) { - var lat = parseFloat(d['latt']); - var lon = parseFloat(d['longt']); - if ((lat == 0 && lon == 0) || d['error']) { - $theInput.addClass(invalidClass); - _this.theInput.title = 'Specified Location Invalid'; - _this.theButton.title = 'Specified Location Invalid'; - } - else { - var v = _this.map.getView(); - var p = new ol.geom.Point([lon, lat]); - var feat = new ol.Feature(p); - _this.indicationLayer.getSource().addFeature(feat); - p.transform(projections_1.proj4326, projections_1.proj3857); - v.setCenter(p.getCoordinates()); - v.setZoom(13); - } - $theButton.removeClass(geocoderLoadingClass); - _this.theButton.disabled = false; - }, 'json'); - }); - $(this.theInput).keyup(function (evt) { - evt.preventDefault(); - _this.theButton.disabled = _this.theInput.value.length == 0; - $theInput.removeClass(invalidClass); - _this.theInput.title = ''; - _this.theButton.title = ''; - if (!_this.theButton.disabled && evt.keyCode == 13) { - $theButton.click(); - } - }); - } - Geocode.prototype.reset = function () { - this.theButton.disabled = true; - this.theInput.value = ''; - }; - return Geocode; -}()); -exports.Geocode = Geocode; - - -/***/ }), - -/***/ 12: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var checkDefined = __webpack_require__(9); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -/** - * assists with map move interactions, trigger callback functions - * @augments MapInteractionBase - */ -var MapMoveCls = (function (_super) { - __extends(MapMoveCls, _super); - /** - * constructor called implicitly - */ - function MapMoveCls() { - var _this = _super.call(this, 'map move') || this; - _this._arrLyrRequest = []; - _this._arrLyrTimeout = []; - _this._arrLayer = []; - _this._lookupLayer = {}; - _this._mapMoveCallbacks = []; - _this._mapMoveCallbacksLookup = {}; - _this._mapMoveCallbackDelays = []; - _this._mapMoveCallbackContext = []; - _this._mapMoveCallbackTimeout = []; - _this._mapExtent = undefined; - _this._zoomLevel = undefined; - return _this; - } - /** - * initialize the map move object - * @param theMap - the ol map - */ - MapMoveCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - this.map.getView().on(['change:center', 'change:resolution'], function (e) { - _this._updateMapExtent(); - // trigger the layer updates - for (var i = 0; i < _this._arrLayer.length; i++) { - _this.triggerLyrLoad(_this._arrLayer[i], i, e.type); - } - // trigger the map callbacks - for (var i = 0; i < _this._mapMoveCallbacks.length; i++) { - _this.triggerMoveCallback(i, e.type); - } - }); - }; - MapMoveCls.prototype._updateMapExtent = function () { - var theView = this.map.getView(); - this._zoomLevel = theView.getZoom(); - var extentArray = theView.calculateExtent(this.map.getSize()); - this._mapExtent = { - minX: extentArray[0], - minY: extentArray[1], - maxX: extentArray[2], - maxY: extentArray[3] - }; - }; - Object.defineProperty(MapMoveCls.prototype, "mapExtent", { - /** - * return the map extent - */ - get: function () { - if (!this._mapExtent) { - this._updateMapExtent(); - } - return this._mapExtent; - }, - enumerable: true, - configurable: true - }); - /** - * Trigger the layer load - * @param lyr the layer being acted on - * @param index index of the layer - * @param eventType the event triggering the load, as 'change:center' or 'change:resolution' - */ - MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) { - if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) { - throw 'need to define lyr or index'; - } - else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) { - index = this._arrLayer.indexOf(lyr); - } - else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) { - lyr = this._arrLayer[index]; - } - // clear the timeout - if (this._arrLyrTimeout[index] != null) { - clearTimeout(this._arrLyrTimeout[index]); - this._arrLyrTimeout[index] = null; - } - // abort if necessary and clear the request - if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) { - this._arrLyrRequest[index].abort(); - this._arrLyrRequest[index] = null; - } - // dummy callback used if before load returns false - var callbackFunc = function () { }; - if (lyr.mapMoveBefore(this._zoomLevel, eventType)) { - lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel); - var __this_1 = this; - callbackFunc = function () { - function innerFunction(theLayer, theIndex) { - var _innerThis = this; - this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) { - /** - * @type {LayerBaseVector} - */ - theLayer.mapMoveCallback(d); - theLayer.loadCallback(); - }, 'json').fail(function (jqXHR) { - if (jqXHR.statusText != 'abort') { - console.log('failed'); - console.log(theLayer.url); - console.log(theLayer.mapMoveParams); - } - }).always(function () { - _innerThis._arrLyrTimeout[theIndex] = null; - _innerThis._arrLyrRequest[theIndex] = null; - }); - } - innerFunction.call(__this_1, lyr, index); - }; - } - else { - lyr.clear(); - } - this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay); - }; - /** - * trigger the map move call back at the given index - * @param ind - the index of the layer - * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution' - * @param functionId=undefined the function id used to reference the added callback function - */ - MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) { - if (typeof ind == 'undefined' && typeof functionId == 'undefined') { - throw 'either the function index or the id must be defined'; - } - if (typeof ind !== 'number') { - ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]); - } - if (ind < 0) { - console.log('function not found'); - return; - } - // clear the timeout - if (this._mapMoveCallbackTimeout[ind] != null) { - clearTimeout(this._mapMoveCallbackTimeout[ind]); - this._mapMoveCallbackTimeout[ind] = null; - } - var ctx = this._mapMoveCallbackContext[ind]; - var theFunc = this._mapMoveCallbacks[ind]; - var __this = this; - var f = function () { - if (ctx !== null) { - theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType); - } - else { - theFunc(__this._mapExtent, __this._zoomLevel, eventType); - } - }; - this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]); - }; - /** - * Add a layer to the interaction - * @param lyr - layer to add - * @param triggerOnAdd - if the layer should be loaded on add - */ - MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) { - if (triggerOnAdd === void 0) { triggerOnAdd = true; } - if (this._arrLayer.indexOf(lyr) > -1) { - console.log('already added ' + lyr.name + ' to map move'); - return; - } - this._checkInit(); - this._arrLyrRequest.push(null); - this._arrLyrTimeout.push(null); - this._arrLayer.push(lyr); - this._lookupLayer[lyr.id] = lyr; - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerLyrLoad(lyr, this._arrLayer.length - 1); - } - }; - /** - * add a callback to the map move event - * @param func - callback function - * @param context - the context to use for this function - * @param delay=50 the delay before call load - * @param triggerOnAdd if the layer should be loaded on add to mapMove - * @param functionId optional id to reference the function later for outside triggering - */ - MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) { - if (this._mapMoveCallbacks.indexOf(func) > -1) { - console.log('this function already added to map move'); - return; - } - this._checkInit(); - if (!functionId) { - functionId = makeGuid_1.default(); - } - this._mapMoveCallbacks.push(func); - this._mapMoveCallbacksLookup[functionId] = func; - this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50); - this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null); - this._mapMoveCallbackTimeout.push(null); - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerMoveCallback(this._mapMoveCallbacks.length - 1); - } - }; - return MapMoveCls; -}(mapInteractionBase_1.default)); -exports.MapMoveCls = MapMoveCls; -nm.MapMoveCls = MapMoveCls; -exports.default = MapMoveCls; - - -/***/ }), - -/***/ 13: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -var FeatureLayerProperties = (function () { - /** - * - * @param feature the feature - * @param layer - the layer in the popup - * @param layerIndex - index of the layer - * @param selectionLayer - the ol selection layer - * @param [esriLayerName=undefined] - esri layer name - */ - function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) { - this.feature = feature; - this.layer = layer; - this.layerIndex = layerIndex; - this.selectionLayer = selectionLayer; - this.popupContent = ''; - this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined; - } - Object.defineProperty(FeatureLayerProperties.prototype, "layerName", { - get: function () { - if (typeof this.esriLayerName == 'string') { - return this.esriLayerName; - } - else { - return this.layer.name; - } - }, - enumerable: true, - configurable: true - }); - return FeatureLayerProperties; -}()); -exports.FeatureLayerProperties = FeatureLayerProperties; -/** - * map popup class - * @augments MapInteractionBase - */ -var MapPopupCls = (function (_super) { - __extends(MapPopupCls, _super); - /** - * Definition for openlayers style function - * @callback olStyleFunction - * ¶m feature the openlayers vector feature - * $param - */ - /** - * map popup constructor - */ - function MapPopupCls() { - var _this = _super.call(this, 'map popup') || this; - _this._arrPopupLayerIds = []; - _this._arrPopupLayers = []; - // this._arrPopupOlLayers = []; - _this._arrPopupContentFunction = []; - _this._$popupContainer = undefined; - _this._$popupContent = undefined; - _this._$popupCloser = undefined; - _this._popupOverlay = undefined; - _this._selectionLayers = []; - _this._selectionLayerLookup = {}; - _this._mapClickFunctions = []; - //let a = function($jqueryContent){console.log($jqueryContent)}; - //this._popupChangedLookup = {'a': a}; - _this._popupChangedFunctions = []; - _this._esriMapServiceLayers = []; - _this._popupOpen = false; - _this._popupCoordinate = null; - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - _this._popupContentLength = 0; - return _this; - } - /** - * map popup initialization - * @param {ol.Map} theMap - the ol map - */ - MapPopupCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - var $map; - var target = this.map.getTarget(); - if (typeof target == 'string') { - $map = $('#' + target); - } - else { - $map = $(target); - } - $map.append('<div class="ol-popup">' + - '<span class="ol-popup-closer">X</span>' + - '<div class="popup-content"></div>' + - '</div>'); - this._$popupContainer = $map.find('.ol-popup'); - this._$popupContent = $map.find('.popup-content'); - this._$popupCloser = $map.find('.ol-popup-closer'); - var _ease = function (n) { - return ol.easing.inAndOut(n); - }; - this._popupOverlay = new ol.Overlay({ - element: this._$popupContainer[0], - autoPan: true, - autoPanAnimation: { - duration: 250, - source: theMap.getView().getCenter(), - easing: _ease - } - }); - this._map.addOverlay(this._popupOverlay); - this._$popupCloser.click(function (evt) { - _this.closePopup(); - }); - // display popup on click - this._map.on('singleclick', function (evt) { - _this.closePopup(); - _this._popupCoordinate = evt['coordinate']; - // esri map service layers - if (_this._esriMapServiceLayers.length > 0) { - var queryParams = { - geometry: evt['coordinate'].join(','), - geometryType: 'esriGeometryPoint', - layers: 'all', - sr: _this._map.getView().getProjection().getCode().split(':')[1], - mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','), - imageDisplay: _this._map.getSize().join(',') + ',96', - returnGeometry: true, - tolerance: 15, - f: 'pjson' - }; - for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) { - var l = _a[_i]; - l.getPopupInfo(queryParams); - } - } - var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']); - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - for (var i = 0; i < layerFeatureObjectArray.length; i++) { - var featObj = layerFeatureObjectArray[i]; - var props = featObj.feature.getProperties(); - var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent); - //skip if return was false - if (popupContentResponse === false) { - //continue; - } - else if (typeof popupContentResponse == 'string') { - featObj.popupContent = popupContentResponse; - _this._passThroughLayerFeatureArray.push(featObj); - } - else { - featObj.selectionLayer.getSource().addFeature(featObj.feature); - } - } - _this._popupContentLength = _this._passThroughLayerFeatureArray.length; - _this._currentPopupIndex = -1; - var popupHtml = '<div class="ol-popup-nav">'; - popupHtml += '<span class="previous-popup ol-popup-nav-arrow">◀</span>'; - popupHtml += '<span class="next-popup ol-popup-nav-arrow">▶</span>'; - popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>"; - popupHtml += "<span> of </span>"; - popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>"; - popupHtml += "<span> - </span>"; - popupHtml += "<span class=\"current-popup-layer-name\"></span>"; - popupHtml += '</div>'; - popupHtml += '<div class="ol-popup-inner">'; - popupHtml += '</div>'; - _this._$popupContent.html(popupHtml); - _this._$popupContent.find('.previous-popup').click(function () { - if (_this._popupContentLength == 1) { - return; - } - if (_this._currentPopupIndex == 0) { - _this._currentPopupIndex = _this._popupContentLength - 1; - } - else { - _this._currentPopupIndex--; - } - _this._triggerFeatSelect(); - }); - var nextPopup = _this._$popupContent.find('.next-popup'); - nextPopup.click(function () { - if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) { - return; - } - if (_this._currentPopupIndex == _this._popupContentLength - 1) { - _this._currentPopupIndex = 0; - } - else { - _this._currentPopupIndex++; - } - _this._triggerFeatSelect(); - }); - if (_this._popupContentLength > 0) { - nextPopup.trigger('click'); - _this._popupOverlay.setPosition(_this._popupCoordinate); - _this._$popupContent.scrollTop(0); - _this._popupOpen = true; - } - }); - //change mouse cursor when over marker - this._map.on('pointermove', function (evt) { - if (evt['dragging']) { - return; - } - var pixel = _this.map.getEventPixel(evt['originalEvent']); - var hit = false; - _this.map.forEachLayerAtPixel(pixel, function (lyr) { - if (hit) { - return; - } - for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) { - var vLyr = _a[_i]; - if (vLyr.olLayer == lyr) { - hit = true; - break; - } - } - }); - var mapElement = _this.map.getTargetElement(); - mapElement.style.cursor = hit ? 'pointer' : ''; - }); - }; - /** - * helper to select features - * @private - */ - MapPopupCls.prototype._triggerFeatSelect = function () { - var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number'); - var $innerPopup = this._$popupContent.find('.ol-popup-inner'); - var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name'); - this.clearSelection(); - var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex]; - $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed()); - $layerNameSpan.html(lyrFeatObj.layerName); - $innerPopup.html(lyrFeatObj.popupContent); - lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature); - for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(this._$popupContent); - } - }; - /** - * - * @param feature - the ol feature - * @param {LayerEsriMapServer} lyr - the map server layer - * @param {string} popupContent - popup content - * @param {string} esriName - esri layer name - */ - MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) { - var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName); - featLayerObject.popupContent = popupContent; - this._passThroughLayerFeatureArray.push(featLayerObject); - this._popupContentLength++; - $('.popup-content-length').html(this._popupContentLength.toFixed()); - if (!this._popupOpen) { - this._$popupContent.find('.next-popup').trigger('click'); - this._popupOverlay.setPosition(this._popupCoordinate); - this._$popupContent.scrollTop(0); - this._popupOpen = true; - } - }; - /** - * - * @param pixel - the ol pixel - * @returns feature layer properties - * @private - */ - MapPopupCls.prototype._featuresAtPixel = function (pixel) { - var _this = this; - var layerFeatureObjectArray = []; - this.map.forEachFeatureAtPixel(pixel, function (feature, layer) { - var hasLyr = false; - var j; - var lyr = null; - for (j = 0; j < _this._arrPopupLayers.length; j++) { - lyr = _this._arrPopupLayers[j]; - if (lyr.olLayer === layer) { - hasLyr = true; - break; - } - } - if (hasLyr) { - layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j])); - } - }); - return layerFeatureObjectArray; - }; - MapPopupCls.prototype.closePopup = function () { - this._checkInit(); - this._popupOpen = false; - this._popupOverlay.setPosition(undefined); - this._$popupCloser[0].blur(); - this.clearSelection(); - this._$popupContent.html(''); - return false; - }; - ; - /** - * - * @param chgFunction - popup change function - */ - MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) { - this._popupChangedFunctions.push(chgFunction); - }; - /** - * - * @param {LayerBase|*} lyr - the layer being acted on - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns the new selection layer - * @private - */ - MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) { - this._checkInit(); - selectionStyle = selectionStyle || {}; - selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)'; - selectionStyle.width = selectionStyle.width || 10; - var theStyle; - if (selectionStyle.olStyle) { - theStyle = selectionStyle.olStyle; - } - else { - theStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: selectionStyle.color, - width: selectionStyle.width - }), - image: new ol.style.Circle({ - radius: 7, - fill: new ol.style.Fill({ color: selectionStyle.color }), - stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 }) - }), - fill: new ol.style.Fill({ - color: selectionStyle.color - }) - }); - } - var selectionLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: theStyle - }); - selectionLayer.setZIndex(100); - this._selectionLayers.push(selectionLayer); - this._selectionLayerLookup[lyr.id] = selectionLayer; - this.map.addLayer(selectionLayer); - return selectionLayer; - }; - /** - * Add popup to the map - * @param {LayerBase|*} lyr The layer that the popup with act on - * @param {popupCallback} popupContentFunction - popup content function that makes popup info - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._arrPopupLayerIds.push(lyr.id); - this._arrPopupLayers.push(lyr); - // this._arrPopupOlLayers.push(lyr.olLayer); - this._arrPopupContentFunction.push(popupContentFunction); - return selectionLayer; - }; - ; - /** - * - * @param {LayerBase} lyr - layer - */ - MapPopupCls.prototype.removeVectorPopup = function (lyr) { - var idx = this._arrPopupLayerIds.indexOf(lyr.id); - if (idx > -1) { - this._arrPopupLayerIds.splice(idx, 1); - this._arrPopupLayers.splice(idx, 1); - // this._arrPopupOlLayers.splice(idx, 1); - this._arrPopupContentFunction.splice(idx, 1); - this._selectionLayers.splice(idx, 1); - delete this._selectionLayerLookup[lyr.id]; - } - }; - /** - * - * @param {LayerEsriMapServer} lyr - map server layer - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._esriMapServiceLayers.push(lyr); - return selectionLayer; - }; - MapPopupCls.prototype.clearSelection = function () { - this._checkInit(); - for (var i = 0; i < this._selectionLayers.length; i++) { - this._selectionLayers[i].getSource().clear(); - } - for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(); - } - }; - ; - /** - * Add a function to be called when the map is clicked but before any popups are implemented - * @param {function} func - the map click function - */ - MapPopupCls.prototype.addMapClickFunction = function (func) { - this._mapClickFunctions.push(func); - }; - return MapPopupCls; -}(mapInteractionBase_1.default)); -exports.MapPopupCls = MapPopupCls; -nm.MapPopupCls = MapPopupCls; -exports.default = MapPopupCls; - - -/***/ }), - -/***/ 14: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var geocode_1 = __webpack_require__(11); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param [options={}] config options - * @param [options.divId=map] map div id - * @param [options.center={}] center config object - * @param [options.center.x=-10018378] center x, web mercator x or lon - * @param [options.center.y=5574910] center y, web mercator y or lat - * @param [options.zoom=7] zoom level - * @param [options.minZoom=undefined] min zoom - * @param [options.maxZoom=undefined] max zoom - * @param [options.baseSwitcher=true] if add base map switcher - * @param [options.fullScreen=false] if add base map switcher - * @returns the ol map - */ -function quickMapBase(options) { - if (options === void 0) { options = {}; } - options.divId = options.divId || 'map'; - options.center = options.center || { x: -10018378, y: 5574910 }; - options.zoom = typeof options.zoom == 'number' ? options.zoom : 7; - options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true; - options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false; - options.addGeocode = options.addGeocode || false; - var $mapDiv = $('#' + options.divId); - $mapDiv.css('position', 'relative'); - var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); - // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})}); - var osmCss = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQ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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw4scxNysnHxU7nSspTRcJjCZGL3IsjsYJMMg5mwgx7gaIOLBFCogAgBBoNa9w+DE6I+Bs7FTgwwrJbHjWDgpYo2KwtBTcYEDuloC9geQw+k2RGnPGpTaOlq7AS+YICUz4DZVaX2TiNDhuYfTtY4geLi0IoCm3XccwM9hx4kU28StQEljDs3ZEpFGA+8dKzLmV9ymIwF5FOGn2GdJM8KLHDJbXyiYVMG9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EbHAwWIA4bIREcIQ4hCQwjFw4lHBgkDB8sDxUiExIiGhAoGxohFRshGRorHQcrKQsiIQwmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////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BJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')"; - if (options.baseSwitcher) { - // let switcherContent = '<div class="base-map-switcher" title="Toggle Base Layer" style="'; - // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; '; - // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`; - // switcherContent += '"></div>'; - // $mapDiv.append(switcherContent); - // - // $mapDiv.find('.base-map-switcher').click(function() { - // "use strict"; - // osmLayer.setVisible(!osmLayer.getVisible()); - // satLayer.setVisible(!satLayer.getVisible()); - // - // if (osmLayer.getVisible()){ - // $(this).css('background', aerialCss); - // } else { - // $(this).css('background', osmCss); - // } - // }); - } - if (options.zoom < 0 || options.zoom > 28) { - throw 'zoom out of range'; - } - if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) { - var p = new ol.geom.Point([options.center.x, options.center.y]); - new ol.proj.Projection({ code: "EPSG:4326" }); - p.transform(new ol.proj.Projection({ code: "EPSG:4326" }), new ol.proj.Projection({ code: "EPSG:3857" })); - var coordinates = p.getCoordinates(); - options.center.x = coordinates[0]; - options.center.y = coordinates[1]; - } - var controls = ol.control.defaults({ - attributionOptions: { collapsible: false } - }); - var view = new ol.View({ - center: [options.center.x, options.center.y], - zoom: options.zoom, - minZoom: options.minZoom, - maxZoom: options.maxZoom - }); - var map = new ol.Map({ - layers: [osmLayer], - target: options.divId, - controls: controls, - view: view - }); - if (options.fullScreen) { - map.addControl(new ol.control.FullScreen({})); - } - if (options.addGeocode) { - new geocode_1.Geocode(document.getElementById(options.divId), map); - } - return map; -} -exports.quickMapBase = quickMapBase; -nm.quickMapBase = quickMapBase; -exports.default = quickMapBase; - - -/***/ }), - -/***/ 17: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/14/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers.zoomResolutionConvert'); -var _zoomResLookup = [ - 156543.03392804097, - 78271.51696402048, - 39135.75848201024, - 19567.87924100512, - 9783.93962050256, - 4891.96981025128, - 2445.98490512564, - 1222.99245256282, - 611.49622628141, - 305.748113140705, - 152.8740565703525, - 76.43702828517625, - 38.21851414258813, - 19.109257071294063, - 9.554628535647032, - 4.777314267823516, - 2.388657133911758, - 1.194328566955879, - 0.5971642834779395, - 0.29858214173896974, - 0.14929107086948487, - 0.07464553543474244, - 0.03732276771737122, - 0.01866138385868561, - 0.009330691929342804, - 0.004665345964671402, - 0.002332672982335701, - 0.0011663364911678506, - 0.0005831682455839253 //28 -]; -/** - * Get the resolution given the zoom level - * @param {number} zoomLevel - the zoom level - * @returns {number|*} the map resolution - */ -function zoomToResolution(zoomLevel) { - "use strict"; - if (typeof zoomLevel == 'number') { - if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) { - return _zoomResLookup[zoomLevel]; - } - else { - console.log("invalid zoom level provided: " + zoomLevel); - return undefined; - } - } - else { - return undefined; - } -} -exports.zoomToResolution = zoomToResolution; -nm.zoomToResolution = zoomToResolution; -/** - * Get resolution from the zoom level - * @param {number} resolution - the resolution - * @returns {number|*} the zoom level - */ -function resolutionToZoom(resolution) { - for (var i = 0; i < _zoomResLookup.length; i++) { - if (resolution >= _zoomResLookup[i]) { - return i; - } - } - return 0; -} -exports.resolutionToZoom = resolutionToZoom; -nm.resolutionToZoom = resolutionToZoom; - - -/***/ }), - -/***/ 2: -/***/ (function(module, exports) { - -module.exports = ol; - -/***/ }), - -/***/ 26: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/7/2015. - */ -var LayerBase_1 = __webpack_require__(10); -var esriToOl = __webpack_require__(28); -var mapPopup_1 = __webpack_require__(7); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * Helper to return the url to the service on the production server - * @param {string} folder - * @param {string} service - * @returns {string} - */ -function makeServiceUrl(folder, service) { - return "https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/" + folder + "/" + service + "/MapServer"; -} -exports.makeServiceUrl = makeServiceUrl; -function localCacheUrl(folder, service) { - var loc = window.location.href; - var url = "/mapserver/" + folder + "/" + service; - if (loc.indexOf('transportal.cee.wisc.edu') > -1) { - if (loc.toLowerCase().indexOf('webmapsstage') > -1) { - url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url; - } - else { - url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url; - } - } - return url; -} -exports.localCacheUrl = localCacheUrl; -/** - * esri mapserver layer - * @augments LayerBase - */ -var LayerEsriMapServer = (function (_super) { - __extends(LayerEsriMapServer, _super); - /** - * The base layer for all others - * @param {string} url - resource url - * @param {object} [options] - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * @param {boolean} [options.addPopup=false] if a popup should be added - * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added - */ - function LayerEsriMapServer(url, options) { - if (options === void 0) { options = {}; } - var _this = _super.call(this, url, options) || this; - _this._source = new ol.source.TileArcGISRest({ - url: _this.url == '' ? undefined : _this.url, - params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') } - }); - _this._showLayers = options.showLayers || []; - _this._olLayer = new ol.layer.Tile({ - source: _this._source, - visible: _this.visible, - opacity: _this.opacity, - minResolution: _this._minResolution, - maxResolution: _this._maxResolution - }); - _this._olLayer.setZIndex(_this._zIndex); - options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false; - _this._esriFormat = new ol.format.EsriJSON(); - _this._popupRequest = null; - options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true; - if (options.getLegend) { - _this.addLegendContent(); - } - if (options.addPopup) { - mapPopup_1.default.addMapServicePopup(_this); - } - return _this; - } - /** - * add additional content to the legend - * @param {string} [additionalContent=''] additional content for legend - */ - LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) { - var _this = this; - var urlCopy = this.url; - if (urlCopy[urlCopy.length - 1] !== '/') { - urlCopy += '/'; - } - urlCopy += 'legend?f=pjson&callback=?'; - $.get(urlCopy, {}, function (d) { - var newHtml = esriToOl.makeMapServiceLegend(d, _this._showLayers); - _super.prototype.addLegendContent.call(_this, newHtml); - }, 'json'); - }; - LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) { - if (!this.visible) { - return; - } - var urlCopy = this.url; - if (urlCopy[urlCopy.length - 1] != '/') { - urlCopy += '/'; - } - urlCopy += 'identify?callback=?'; - var __this = this; - if (this._popupRequest != null) { - this._popupRequest.abort(); - } - this._popupRequest = $.get(urlCopy, queryParams, function (d) { - for (var _i = 0, _a = d['results']; _i < _a.length; _i++) { - var r = _a[_i]; - var popupHtml = '<table class="esri-popup-table">'; - for (var a in r['attributes']) { - if (r['attributes'].hasOwnProperty(a)) { - var attrVal = r['attributes'][a]; - if (attrVal == null || attrVal.toString().toLowerCase() == 'null') { - continue; - } - var attr = a; - if (attr.length > 14) { - attr = attr.slice(0, 11) + '...'; - } - popupHtml += "<tr><td>" + attr + "</td><td>" + attrVal + "</td></tr>"; - } - } - popupHtml += '</table>'; - mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']); - } - }, 'json'); - this._popupRequest.always(function () { - __this._popupRequest = null; - }); - }; - Object.defineProperty(LayerEsriMapServer.prototype, "source", { - /** - * - * @returns {ol.source.TileArcGISRest} the vector source - */ - get: function () { - return _super.prototype.getSource.call(this); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerEsriMapServer.prototype, "olLayer", { - /** - * - * @returns the ol layer - */ - get: function () { - return _super.prototype.getOlLayer.call(this); - }, - enumerable: true, - configurable: true - }); - return LayerEsriMapServer; -}(LayerBase_1.LayerBase)); -exports.LayerEsriMapServer = LayerEsriMapServer; -nm.LayerEsriMapServer = LayerEsriMapServer; -exports.default = LayerEsriMapServer; - - -/***/ }), - -/***/ 28: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 1/4/2016. - */ -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var nm = provide_1.default('olHelpers.esriToOlStyle'); -/** - * - * @param {Array<number>} colorArray - input color array - * @param {number} opacity - the opacity 0 to 1 - * @returns {string} rgba string - * @private - */ -function _colorArrayToRgba(colorArray, opacity) { - "use strict"; - return "rgba(" + colorArray[0] + "," + colorArray[1] + "," + colorArray[2] + "," + opacity + ")"; -} -/** - * escape html charcters - * @param {string} str - input string - * @returns {string} escaped string - */ -function htmlEscape(str) { - return String(str) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/</g, '<') - .replace(/>/g, '>'); -} -nm.htmlEscape = htmlEscape; -var CommonSymbol = (function () { - /** - * - * @param symbolObj - * @param {number} opacity - */ - function CommonSymbol(symbolObj, opacity) { - this.symbolObj = symbolObj; - this.opacity = opacity; - this.olStyle = undefined; - this.legendHtml = ''; - } - return CommonSymbol; -}()); -var PointSymbol = (function (_super) { - __extends(PointSymbol, _super); - function PointSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj.type) { - case 'esriSMS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity); - var outlineWidth = _this.symbolObj.outline.width; - var radius = _this.symbolObj.size; - _this.olStyle = new ol.style.Style({ - image: new ol.style.Circle({ - radius: radius, - fill: new ol.style.Fill({ - color: innerColor - }), - stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth }) - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" style=\"color: " + innerColor + "\">●</span>"; - break; - case 'esriPMS': - _this.olStyle = new ol.style.Style({ - image: new ol.style.Icon({ src: "data:image/png;base64," + _this.symbolObj['imageData'] }) - }); - _this.legendHtml = "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + _this.symbolObj['imageData'] + "\">"; - break; - default: - console.log(_this.symbolObj); - alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return PointSymbol; -}(CommonSymbol)); -var LineSymbol = (function (_super) { - __extends(LineSymbol, _super); - function LineSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj.type) { - case 'esriSLS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var lineWidth = _this.symbolObj.width; - _this.olStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: innerColor, - //lineDash: [4], - width: lineWidth - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" "; - _this.legendHtml += "style=\""; - _this.legendHtml += "background-color: " + innerColor + ";"; - _this.legendHtml += "width: 40px;"; - _this.legendHtml += "height: 4px;"; - _this.legendHtml += "position: relative;"; - _this.legendHtml += "display: inline-block;"; - _this.legendHtml += "top: -1px;"; - _this.legendHtml += "\"></span>"; - break; - default: - console.log(_this.symbolObj); - alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return LineSymbol; -}(CommonSymbol)); -var PolygonSymbol = (function (_super) { - __extends(PolygonSymbol, _super); - function PolygonSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj['type']) { - case 'esriSFS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity); - var outlineWidth = _this.symbolObj.outline.width; - _this.olStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: outerColor, - //lineDash: [4], - width: outlineWidth - }), - fill: new ol.style.Fill({ - color: innerColor - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" "; - _this.legendHtml += "style=\""; - _this.legendHtml += "background-color: " + innerColor + ";"; - _this.legendHtml += "border: solid " + outerColor + " 1px;"; - _this.legendHtml += "width: 40px;"; - _this.legendHtml += "height: 9px;"; - _this.legendHtml += "position: relative;"; - _this.legendHtml += "display: inline-block;"; - _this.legendHtml += "top: 2px;"; - _this.legendHtml += "\"></span>"; - break; - default: - console.log(_this.symbolObj); - alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return PolygonSymbol; -}(CommonSymbol)); -var SymbolGenerator = (function () { - function SymbolGenerator(esriResponse) { - this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100; - this.renderer = esriResponse.drawingInfo.renderer; - this.olStyle = undefined; - this.legendHtml = ''; - } - return SymbolGenerator; -}()); -var SingleSymbol = (function (_super) { - __extends(SingleSymbol, _super); - /** - * - * @param {object} esriResponse - layer info - * @param SymbolClass - the symbol class to use - */ - function SingleSymbol(esriResponse, SymbolClass) { - var _this = _super.call(this, esriResponse) || this; - _this.symbol = _this.renderer.symbol; - var symbolObj = new SymbolClass(_this.symbol, _this.opacity); - _this.olStyle = symbolObj.olStyle; - _this.legendHtml = symbolObj.legendHtml; - return _this; - } - return SingleSymbol; -}(SymbolGenerator)); -var UniqueValueSymbol = (function (_super) { - __extends(UniqueValueSymbol, _super); - /** - * - * @param {object} esriResponse - layer info - * @param SymbolClass - the Symbol class definition - */ - function UniqueValueSymbol(esriResponse, SymbolClass) { - var _this = _super.call(this, esriResponse) || this; - _this.uniqueValueInfos = _this.renderer.uniqueValueInfos; - _this.propertyName = _this.renderer.field1; - _this.defaultSymbol = _this.renderer.defaultSymbol; - if (_this.defaultSymbol) { - var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity); - _this.defaultStyle = symbolObj.olStyle; - _this.defaultLabelHtml = "<span class=\"legend-layer-subitem\">" + htmlEscape(_this.renderer['defaultLabel']) + "</span>" + symbolObj.legendHtml; - } - else { - _this.defaultStyle = undefined; - _this.defaultLabelHtml = 'other'; - } - _this.valueArray = []; - _this.labelArray = []; - _this.legendArray = []; - _this.propertyStyleLookup = {}; - for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) { - var uniqueVal = _a[_i]; - _this.labelArray.push(uniqueVal['label']); - _this.valueArray.push(uniqueVal['value']); - var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity); - _this.legendArray.push("<span class=\"legend-layer-subitem\">" + htmlEscape(uniqueVal['label']) + "</span>" + uniqueSym.legendHtml); - _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle; - } - _this.olStyle = function (feature) { - var checkProperties = feature.getProperties(); - var checkProperty = checkProperties[_this.propertyName]; - if (_this.propertyStyleLookup[checkProperty] !== undefined) { - return [_this.propertyStyleLookup[checkProperty]]; - } - else { - return [_this.defaultStyle]; - } - }; - if (_this.defaultLabelHtml !== null) { - _this.legendArray.push(_this.defaultLabelHtml); - } - _this.legendHtml = '<ul>'; - for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) { - var h = _c[_b]; - _this.legendHtml += "<li>" + h + "</li>"; - } - _this.legendHtml += '</ul>'; - return _this; - } - return UniqueValueSymbol; -}(SymbolGenerator)); -function makeFeatureServiceLegendAndSymbol(esriResponse) { - "use strict"; - var renderer = esriResponse.drawingInfo.renderer; - var symbolLegendOut = null; - switch (renderer.type) { - case 'simple': - switch (esriResponse.geometryType) { - case 'esriGeometryPoint': - symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol); - break; - case 'esriGeometryPolyline': - symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol); - break; - case 'esriGeometryPolygon': - symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol); - break; - default: - console.log(esriResponse); - alert(esriResponse.geometryType + ' not handled'); - } - break; - case 'uniqueValue': - switch (esriResponse.geometryType) { - case 'esriGeometryPoint': - symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol); - break; - case 'esriGeometryPolyline': - symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol); - break; - case 'esriGeometryPolygon': - symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol); - break; - default: - console.log(esriResponse); - alert(esriResponse['geometryType'] + ' not handled'); - } - break; - default: - alert('not handled renderer type: ' + renderer['type']); - } - if (symbolLegendOut == null) { - return { style: undefined, legend: '' }; - } - else { - return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml }; - } -} -exports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol; -nm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol; -/** - * - * @param {object} lyrObject - the layer as defined in the response - * @param {boolean} [skipLayerNameAndExpander=false] use only icons - * @returns {string} legend html - */ -function mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) { - if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; } - skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false; - var layerName = lyrObject['layerName']; - var legendItems = lyrObject['legend']; - var legendHtml = ''; - if (!skipLayerNameAndExpander) { - legendHtml += "<span class=\"legend-layer-subitem\">" + layerName + "</span>"; - } - if (legendItems.length == 1) { - legendHtml = "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + legendItems[0]['imageData'] + "\">"; - } - else { - if (!skipLayerNameAndExpander) { - legendHtml += '<span class="legend-items-expander" title="Expand/Collapse">▼</span>'; - } - legendHtml += '<ul>'; - for (var i = 0; i < legendItems.length; i++) { - legendHtml += "<li>"; - legendHtml += "<span class=\"legend-layer-subitem\">" + htmlEscape(legendItems[i]['label']) + "</span>"; - legendHtml += "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + legendItems[i]['imageData'] + "\">"; - legendHtml += "</li>"; - } - legendHtml += '</ul>'; - } - if (!skipLayerNameAndExpander) { - legendHtml = "<span class=\"legend-layer-subitem\">" + layerName + "</span>" + legendHtml; - } - return legendHtml; -} -/** - * make map service legent - * @param {object} esriResponse - layer info - * @param showLayers - limited number of layers to show in map service - * @returns {string} legend content - */ -function makeMapServiceLegend(esriResponse, showLayers) { - "use strict"; - if (showLayers === void 0) { showLayers = []; } - var newLegendHtml = ''; - var layers = esriResponse['layers']; - if (layers.length == 1) { - newLegendHtml += mapServiceLegendItem(layers[0], true); - } - else { - newLegendHtml += '<ul>'; - for (var i = 0; i < layers.length; i++) { - if (showLayers.length > 0 && showLayers.indexOf(i) < 0) { - continue; - } - newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>'; - } - newLegendHtml += '</ul>'; - } - return newLegendHtml; -} -exports.makeMapServiceLegend = makeMapServiceLegend; -nm.makeMapServiceLegend = makeMapServiceLegend; - - -/***/ }), - -/***/ 3: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/8/2015. - */ -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers'); -/** - * base interaction - */ -var MapInteractionBase = (function () { - /** - * map interaction base - * @param subtype - the interaction subtype - */ - function MapInteractionBase(subtype) { - this._map = null; - this._initialized = false; - this._subtype = subtype; - } - /** - * base initializer, returns true for already initialized - * @param theMap - the ol Map - * @returns true for already initialized - */ - MapInteractionBase.prototype.init = function (theMap) { - if (!this._initialized) { - this._map = theMap; - this._initialized = true; - } - }; - Object.defineProperty(MapInteractionBase.prototype, "map", { - /** - * get reference to the ol map object - * @returns {ol.Map} the map object - */ - get: function () { - return this._map; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MapInteractionBase.prototype, "initialized", { - /** - * get if is initialized - * @returns {boolean} is initialized - */ - get: function () { - return this._initialized; - }, - enumerable: true, - configurable: true - }); - /** - * Check the initialization status and throw exception if not valid yet - * @protected - */ - MapInteractionBase.prototype._checkInit = function () { - if (!this.initialized) { - var msg = this._subtype + " object not initialized"; - alert(msg); - console.log(msg); - throw msg; - } - }; - /** - * Check the initialization status and throw exception if not valid yet - */ - MapInteractionBase.prototype.checkInit = function () { - this._checkInit(); - }; - return MapInteractionBase; -}()); -exports.MapInteractionBase = MapInteractionBase; -nm.MapInteractionBase = MapInteractionBase; -exports.default = MapInteractionBase; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMapBase_1 = __webpack_require__(14); -var provide_1 = __webpack_require__(0); -var mapMove_1 = __webpack_require__(6); -var mapPopup_1 = __webpack_require__(7); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param {object} [options={}] config options - * @param {string} [options.divId=map] map div id - * @param {object} [options.center={}] center config object - * @param {number} [options.center.x=-10018378] center x, web mercator x or lon - * @param {number} [options.center.y=5574910] center y, web mercator y or lat - * @param {number} [options.zoom=7] zoom level - * @param {number} [options.minZoom=undefined] min zoom - * @param {number} [options.maxZoom=undefined] max zoom - * @param {boolean} [options.baseSwitcher=true] if add base map switcher - * @param {boolean} [options.fullScreen=false] if add base map switcher - * @returns {ol.Map} the ol map - */ -function quickMap(options) { - if (options === void 0) { options = {}; } - var m = quickMapBase_1.quickMapBase(options); - mapMove_1.default.init(m); - mapPopup_1.default.init(m); - return m; -} -exports.quickMap = quickMap; -nm.quickMap = quickMap; -exports.default = quickMap; - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapMoveCls_1 = __webpack_require__(12); -/** - * The single map move object catch is that it is common to multimap pages - * @type {MapMoveCls} - */ -exports.mapMove = new mapMoveCls_1.default(); -exports.default = exports.mapMove; - - -/***/ }), - -/***/ 61: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 6/1/2016. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var $ = __webpack_require__(1); -var nm = provide_1.default('collections.layerSwipe'); -var LayerSwipe = (function () { - /** - * - * @param {ol.Map} map - the map - * @param {string} [sliderContent=''] - additional html to be added inside the slider div - */ - function LayerSwipe(map, sliderContent) { - if (sliderContent === void 0) { sliderContent = ''; } - var _this = this; - sliderContent = sliderContent || ''; - /** - * - * @type {Array<LayerBase>} - */ - this.leftLayers = []; - /** - * - * @type {Array<LayerBase>} - */ - this.rightLayers = []; - this._percentRight = 50; - this.offset = null; - this._map = map; - this.$mapElement = $(map.getTargetElement()); - this.$mapElement.append("<div class=\"layer-swiper\">" + sliderContent + "</div>"); - this.$swiper = this.$mapElement.find('.layer-swiper'); - this.percentRight = this.percentRight; - this.dragging = false; - this.$mapElement.mouseleave(function () { - _this.dragging = false; - }); - this.$swiper.bind('mousewheel DOMMouseScroll', function (evt) { - evt.preventDefault(); - }); - this.$swiper.mousedown(function (evt) { - _this.dragging = true; - _this.offset = evt.offsetX; - }); - $(window).mouseup(function () { - _this.dragging = false; - }); - this.$mapElement.mousemove(function (evt) { - if (_this.dragging) { - var mapLeft = _this.$mapElement.position().left; - var mapWidth = _this.$mapElement.width(); - _this.percentRight = 100 * (evt.pageX - _this.offset - mapLeft) / mapWidth; - } - }); - } - /** - * - * @param {LayerBase|*} lyr - layer to be added to left side - */ - LayerSwipe.prototype.addLeftLayer = function (lyr) { - var _this = this; - if (this.leftLayers.indexOf(lyr) != -1) { - return; - } - lyr.olLayer.on('precompose', function (event) { - var ctx = event['context']; - var width = ctx.canvas.width * (_this.percentRight / 100); - ctx.save(); - ctx.beginPath(); - ctx.rect(0, 0, width, ctx.canvas.height); - ctx.clip(); - }); - lyr.olLayer.on('postcompose', function (event) { - var ctx = event['context']; - ctx.restore(); - }); - this.leftLayers.push(lyr); - }; - /** - * - * @param {LayerBase|*} lyr - layer to be added to right side - */ - LayerSwipe.prototype.addRightLayer = function (lyr) { - var _this = this; - if (this.rightLayers.indexOf(lyr) != -1) { - return; - } - lyr.olLayer.on('precompose', function (event) { - var ctx = event['context']; - var width = ctx.canvas.width * (_this.percentRight / 100); - ctx.save(); - ctx.beginPath(); - ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height); - ctx.clip(); - }); - lyr.olLayer.on('postcompose', function (event) { - var ctx = event['context']; - ctx.restore(); - }); - this.rightLayers.push(lyr); - }; - Object.defineProperty(LayerSwipe.prototype, "percentRight", { - get: function () { - return this._percentRight; - }, - set: function (percent) { - var maxed = this.$swiper.position().left + this.$swiper.width() > this.$mapElement.width(); - if (percent < 0) { - return; - } - else if (maxed && percent > this.percentRight) { - return; - } - this._percentRight = percent; - this.$swiper.css('left', this._percentRight.toFixed(2) + "%"); - this._map.render(); - }, - enumerable: true, - configurable: true - }); - return LayerSwipe; -}()); -nm.LayerSwipe = LayerSwipe; -exports.default = LayerSwipe; - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapPopupCls_1 = __webpack_require__(13); -/** - * The single popup object catch is that it is common to multimap pages - * @type {MapPopupCls} - */ -exports.mapPopup = new mapPopupCls_1.default(); -exports.default = exports.mapPopup; - - -/***/ }), - -/***/ 71: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 6/1/2016. - */ -var quickMap_1 = __webpack_require__(5); -var layerSwipe_1 = __webpack_require__(61); -var LayerEsriMapServer_1 = __webpack_require__(26); -var map = quickMap_1.quickMap(); -var swiper = new layerSwipe_1.default(map); -var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer', { - minZoom: 6, - maxZoom: 12, - name: 'WisDOT Regions' -}); -var metamanagerSegments = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer', { - minZoom: 7, - visible: true, - name: 'Metamanager Segments' -}); -var truckSpeed2014 = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { - minZoom: 7, - visible: true, - name: 'truck2014', - showLayers: [8] -}); -var truckSpeed2015 = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', { - minZoom: 7, - visible: true, - name: 'truck2015', - showLayers: [9] -}); -map.addLayer(wisDotRegions.olLayer); -map.addLayer(truckSpeed2014.olLayer); -map.addLayer(truckSpeed2015.olLayer); -map.addLayer(metamanagerSegments.olLayer); -swiper.addLeftLayer(wisDotRegions); -swiper.addRightLayer(metamanagerSegments); -swiper.addLeftLayer(truckSpeed2014); -swiper.addRightLayer(truckSpeed2015); -setTimeout(function () { -}, 5000); - - -/***/ }), - -/***/ 8: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 10/3/2016. - */ -var ol = __webpack_require__(2); -exports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' }); -exports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' }); -exports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' }); - - -/***/ }), - -/***/ 9: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util.checkDefined'); -/** - * check if the input is undefined or null - * @param input - input pointer - * @returns true undefined or null - */ -function undefinedOrNull(input) { - "use strict"; - return (typeof input === 'undefined' || input === null); -} -exports.undefinedOrNull = undefinedOrNull; -nm.undefinedOrNull = undefinedOrNull; -/** - * check if the input is defined and not null - * @param input - input pointer - * @returns true defined and not null - */ -function definedAndNotNull(input) { - "use strict"; - return !(undefinedOrNull(input)); -} -exports.definedAndNotNull = definedAndNotNull; -nm.definedAndNotNull = definedAndNotNull; - - -/***/ }) - -/******/ }); +!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=70)}({0:function(e,t,o){"use strict";function n(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){void 0===o[t[n]]&&(o[t[n]]={}),o=o[t[n]]}return o}Object.defineProperty(t,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,t.default=n},1:function(e,t){e.exports=$},10:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(17),r=o(0),i=o(3),a=o(1),l=r.default("layers"),s=function(){function e(e,t){if(void 0===t&&(t={}),t=t||{},"string"!=typeof e)throw"Invalid URL";this._url=e,this._params="object"==typeof t.params?t.params:{},this._legendCollapse="boolean"==typeof t.legendCollapse&&t.legendCollapse,this._legendCheckbox="boolean"!=typeof t.legendCheckbox||t.legendCheckbox,this.id=t.id||i.default(),this._name=t.name||"Unnamed Layer",this.animate=!1,this._opacity="number"==typeof t.opacity?t.opacity:1,this._opacity>1?this._opacity=1:this._opacity<0&&(this._opacity=0),this._visible="boolean"!=typeof t.visible||t.visible,this._source=void 0,this._olLayer=void 0,this._loaded=!1,this._maxResolution=n.zoomToResolution(t.minZoom),void 0!==this._maxResolution&&(this._maxResolution+=1e-5),this._minResolution=n.zoomToResolution(t.maxZoom),this._minZoom="number"==typeof t.minZoom?t.minZoom:void 0,this._maxZoom="number"==typeof t.maxZoom?t.maxZoom:void 0,this._zIndex="number"==typeof t.zIndex?t.zIndex:0,this.loadCallback="function"==typeof t.loadCallback?t.loadCallback:function(){},this._legendContent="",this._legendCheckbox?(this._legendContent+='<input type="checkbox" '+(this.visible?"checked":"")+' class="legend-check" id="'+this.id+'-legend-layer-check"><span></span>',this._legendContent+='<label for="'+this.id+'-legend-layer-check" class="legend-layer-name">'+this.name+"</label>"):this._legendContent+='<label class="legend-layer-name">'+this.name+"</label>",this._$legendDiv=null,this._applyCollapseCalled=!1,this._addLegendContent("string"==typeof t.legendContent?t.legendContent:void 0)}return e.prototype._load=function(){return 1==this.loaded||(this._loaded=!0,!1)},e.prototype.getLegendDiv=function(){return'<div class="legend-layer-div" id="'+this.id+'-legend-layer-div">'+this._legendContent+"</div>"},e.prototype._addLegendContent=function(e){void 0===e&&(e=""),e.indexOf("<ul>")>-1&&(e='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'+e),this._legendContent+=e,this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0&&(this._$legendDiv.append(e),this.applyCollapse())},e.prototype.addLegendContent=function(e){this._addLegendContent(e)},e.prototype.applyCollapse=function(){if(this._applyCollapseCalled)return void console.log("collapse already applied");if(this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0){var e=this._$legendDiv.find(".legend-items-expander");e.length>0&&(this._applyCollapseCalled=!0,e.click(function(){var e=a(this);e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("▼")):(e.addClass("legend-layer-group-collapsed"),e.html("▶"))}),this._legendCollapse&&e.trigger("click"))}},e.prototype.refresh=function(){this.source&&this.source.refresh()},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"legendContent",{get:function(){return this._legendContent},set:function(e){this._legendContent=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minResolution",{get:function(){return this._minResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxResolution",{get:function(){return this._maxResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minZoom",{get:function(){return this._minZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoom",{get:function(){return this._maxZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this.setVisible(e)},enumerable:!0,configurable:!0}),e.prototype.setVisible=function(e){this._visible=e,this.olLayer&&(this.olLayer.setVisible(this._visible),e&&!this._loaded&&this._load())},Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=e,this.olLayer&&this.olLayer.setOpacity(this._opacity)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),e.prototype.getSource=function(){return this._source},Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(e){this._zIndex=e},enumerable:!0,configurable:!0}),e.prototype.setZIndex=function(e){},Object.defineProperty(e.prototype,"olLayer",{get:function(){return this.getOlLayer()},enumerable:!0,configurable:!0}),e.prototype.getOlLayer=function(){return this._olLayer},e}();t.LayerBase=s,l.LayerBase=s,t.default=s},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),r=o(3),i=o(2),a=o(8),l="geocoder-invalid",s="geocoder-loading",p=function(){function e(e,t){var o=this,p=r.makeGuid(),u=r.makeGuid();this.map=t,this.indicationLayer=new i.layer.Vector({source:new i.source.Vector,style:new i.style.Style({image:new i.style.Circle({radius:12,fill:new i.style.Fill({color:"rgba(255,0,0,0.5)"}),stroke:new i.style.Stroke({color:"red",width:1})})})}),this.map.addLayer(this.indicationLayer),n(e).append('<div class="geocoder-el"><input type="text" id="'+p+'"><button id="'+u+'">Search</button></div>'),this.theButton=document.getElementById(u),this.theInput=document.getElementById(p),this.reset();var c=n(this.theButton),d=n(this.theInput);c.click(function(e){e.preventDefault(),c.addClass(s),o.theButton.disabled=!0,o.indicationLayer.getSource().clear(),n.get("https://geocode.xyz/"+o.theInput.value+"?geoit=json",{},function(e){var t=parseFloat(e.latt),n=parseFloat(e.longt);if(0==t&&0==n||e.error)d.addClass(l),o.theInput.title="Specified Location Invalid",o.theButton.title="Specified Location Invalid";else{var r=o.map.getView(),p=new i.geom.Point([n,t]),u=new i.Feature(p);o.indicationLayer.getSource().addFeature(u),p.transform(a.proj4326,a.proj3857),r.setCenter(p.getCoordinates()),r.setZoom(13)}c.removeClass(s),o.theButton.disabled=!1},"json")}),n(this.theInput).keyup(function(e){e.preventDefault(),o.theButton.disabled=0==o.theInput.value.length,d.removeClass(l),o.theInput.title="",o.theButton.title="",o.theButton.disabled||13!=e.keyCode||c.click()})}return e.prototype.reset=function(){this.theButton.disabled=!0,this.theInput.value=""},e}();t.Geocode=p},12:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(9),a=o(0),l=o(3),s=o(1),p=a.default("olHelpers"),u=function(e){function t(){var t=e.call(this,"map move")||this;return t._arrLyrRequest=[],t._arrLyrTimeout=[],t._arrLayer=[],t._lookupLayer={},t._mapMoveCallbacks=[],t._mapMoveCallbacksLookup={},t._mapMoveCallbackDelays=[],t._mapMoveCallbackContext=[],t._mapMoveCallbackTimeout=[],t._mapExtent=void 0,t._zoomLevel=void 0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t),this.map.getView().on(["change:center","change:resolution"],function(e){o._updateMapExtent();for(var t=0;t<o._arrLayer.length;t++)o.triggerLyrLoad(o._arrLayer[t],t,e.type);for(var t=0;t<o._mapMoveCallbacks.length;t++)o.triggerMoveCallback(t,e.type)})},t.prototype._updateMapExtent=function(){var e=this.map.getView();this._zoomLevel=e.getZoom();var t=e.calculateExtent(this.map.getSize());this._mapExtent={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},Object.defineProperty(t.prototype,"mapExtent",{get:function(){return this._mapExtent||this._updateMapExtent(),this._mapExtent},enumerable:!0,configurable:!0}),t.prototype.triggerLyrLoad=function(e,t,o){if(i.undefinedOrNull(e)&&i.undefinedOrNull(t))throw"need to define lyr or index";i.definedAndNotNull(e)&&i.undefinedOrNull(t)?t=this._arrLayer.indexOf(e):i.undefinedOrNull(e)&&i.definedAndNotNull(t)&&(e=this._arrLayer[t]),null!=this._arrLyrTimeout[t]&&(clearTimeout(this._arrLyrTimeout[t]),this._arrLyrTimeout[t]=null),null!=this._arrLyrRequest[t]&&4!=this._arrLyrRequest[t]&&(this._arrLyrRequest[t].abort(),this._arrLyrRequest[t]=null);var n=function(){};if(e.mapMoveBefore(this._zoomLevel,o)){e.mapMoveMakeGetParams(this._mapExtent,this._zoomLevel);var r=this;n=function(){function o(e,t){var o=this;this._arrLyrRequest[t]=s.get(e.url,e.mapMoveParams,function(t){e.mapMoveCallback(t),e.loadCallback()},"json").fail(function(t){"abort"!=t.statusText&&(console.log("failed"),console.log(e.url),console.log(e.mapMoveParams))}).always(function(){o._arrLyrTimeout[t]=null,o._arrLyrRequest[t]=null})}o.call(r,e,t)}}else e.clear();this._arrLyrTimeout[t]=setTimeout(n,e.onDemandDelay)},t.prototype.triggerMoveCallback=function(e,t,o){if(void 0===e&&void 0===o)throw"either the function index or the id must be defined";if("number"!=typeof e&&(e=this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[o])),e<0)return void console.log("function not found");null!=this._mapMoveCallbackTimeout[e]&&(clearTimeout(this._mapMoveCallbackTimeout[e]),this._mapMoveCallbackTimeout[e]=null);var n=this._mapMoveCallbackContext[e],r=this._mapMoveCallbacks[e],i=this,a=function(){null!==n?r.call(n,i._mapExtent,i._zoomLevel,t):r(i._mapExtent,i._zoomLevel,t)};this._mapMoveCallbackTimeout[e]=setTimeout(a,this._mapMoveCallbackDelays[e])},t.prototype.addVectorLayer=function(e,t){if(void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1)return void console.log("already added "+e.name+" to map move");this._checkInit(),this._arrLyrRequest.push(null),this._arrLyrTimeout.push(null),this._arrLayer.push(e),this._lookupLayer[e.id]=e,(t="boolean"!=typeof t||t)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))},t.prototype.addCallback=function(e,t,o,n,r){if(this._mapMoveCallbacks.indexOf(e)>-1)return void console.log("this function already added to map move");this._checkInit(),r||(r=l.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=e,this._mapMoveCallbackDelays.push("number"==typeof o?o:50),this._mapMoveCallbackContext.push(i.definedAndNotNull(t)?t:null),this._mapMoveCallbackTimeout.push(null),(n="boolean"!=typeof n||n)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))},t}(r.default);t.MapMoveCls=u,p.MapMoveCls=u,t.default=u},13:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(0),a=o(2),l=o(1),s=i.default("olHelpers"),p=function(){function e(e,t,o,n,r){this.feature=e,this.layer=t,this.layerIndex=o,this.selectionLayer=n,this.popupContent="",this.esriLayerName="string"==typeof r?r:void 0}return Object.defineProperty(e.prototype,"layerName",{get:function(){return"string"==typeof this.esriLayerName?this.esriLayerName:this.layer.name},enumerable:!0,configurable:!0}),e}();t.FeatureLayerProperties=p;var u=function(e){function t(){var t=e.call(this,"map popup")||this;return t._arrPopupLayerIds=[],t._arrPopupLayers=[],t._arrPopupContentFunction=[],t._$popupContainer=void 0,t._$popupContent=void 0,t._$popupCloser=void 0,t._popupOverlay=void 0,t._selectionLayers=[],t._selectionLayerLookup={},t._mapClickFunctions=[],t._popupChangedFunctions=[],t._esriMapServiceLayers=[],t._popupOpen=!1,t._popupCoordinate=null,t._passThroughLayerFeatureArray=[],t._currentPopupIndex=-1,t._popupContentLength=0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t);var n,r=this.map.getTarget();n=l("string"==typeof r?"#"+r:r),n.append('<div class="ol-popup"><span class="ol-popup-closer">X</span><div class="popup-content"></div></div>'),this._$popupContainer=n.find(".ol-popup"),this._$popupContent=n.find(".popup-content"),this._$popupCloser=n.find(".ol-popup-closer");var i=function(e){return a.easing.inAndOut(e)};this._popupOverlay=new a.Overlay({element:this._$popupContainer[0],autoPan:!0,autoPanAnimation:{duration:250,source:t.getView().getCenter(),easing:i}}),this._map.addOverlay(this._popupOverlay),this._$popupCloser.click(function(e){o.closePopup()}),this._map.on("singleclick",function(e){if(o.closePopup(),o._popupCoordinate=e.coordinate,o._esriMapServiceLayers.length>0)for(var t={geometry:e.coordinate.join(","),geometryType:"esriGeometryPoint",layers:"all",sr:o._map.getView().getProjection().getCode().split(":")[1],mapExtent:o._map.getView().calculateExtent(o._map.getSize()).join(","),imageDisplay:o._map.getSize().join(",")+",96",returnGeometry:!0,tolerance:15,f:"pjson"},n=0,r=o._esriMapServiceLayers;n<r.length;n++){var i=r[n];i.getPopupInfo(t)}var a=o._featuresAtPixel(e.pixel);o._passThroughLayerFeatureArray=[],o._currentPopupIndex=-1;for(var l=0;l<a.length;l++){var s=a[l],p=s.feature.getProperties(),u=o._arrPopupContentFunction[s.layerIndex](p,o._$popupContent);u===!1||("string"==typeof u?(s.popupContent=u,o._passThroughLayerFeatureArray.push(s)):s.selectionLayer.getSource().addFeature(s.feature))}o._popupContentLength=o._passThroughLayerFeatureArray.length,o._currentPopupIndex=-1;var c='<div class="ol-popup-nav">';c+='<span class="previous-popup ol-popup-nav-arrow">◀</span>',c+='<span class="next-popup ol-popup-nav-arrow">▶</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span> of </span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span> - </span>",c+='<span class="current-popup-layer-name"></span>',c+="</div>",c+='<div class="ol-popup-inner">',c+="</div>",o._$popupContent.html(c),o._$popupContent.find(".previous-popup").click(function(){1!=o._popupContentLength&&(0==o._currentPopupIndex?o._currentPopupIndex=o._popupContentLength-1:o._currentPopupIndex--,o._triggerFeatSelect())});var d=o._$popupContent.find(".next-popup");d.click(function(){1==o._popupContentLength&&o._currentPopupIndex>-1||(o._currentPopupIndex==o._popupContentLength-1?o._currentPopupIndex=0:o._currentPopupIndex++,o._triggerFeatSelect())}),o._popupContentLength>0&&(d.trigger("click"),o._popupOverlay.setPosition(o._popupCoordinate),o._$popupContent.scrollTop(0),o._popupOpen=!0)}),this._map.on("pointermove",function(e){if(!e.dragging){var t=o.map.getEventPixel(e.originalEvent),n=!1;o.map.forEachFeatureAtPixel(t,function(e,t){if(!n)for(var r=0,i=o._arrPopupLayers;r<i.length;r++){var a=i[r];if(a.olLayer==t){n=!0;break}}});o.map.getTargetElement().style.cursor=n?"pointer":""}})},t.prototype._triggerFeatSelect=function(){var e=this._$popupContent.find(".current-popup-item-number"),t=this._$popupContent.find(".ol-popup-inner"),o=this._$popupContent.find(".current-popup-layer-name");this.clearSelection();var n=this._passThroughLayerFeatureArray[this._currentPopupIndex];e.html((this._currentPopupIndex+1).toFixed()),o.html(n.layerName),t.html(n.popupContent),n.selectionLayer.getSource().addFeature(n.feature);for(var r=0,i=this._popupChangedFunctions;r<i.length;r++){(0,i[r])(this._$popupContent)}},t.prototype.addMapServicePopupContent=function(e,t,o,n){var r=new p(e,t,this._popupContentLength,this._selectionLayerLookup[t.id],n);r.popupContent=o,this._passThroughLayerFeatureArray.push(r),this._popupContentLength++,l(".popup-content-length").html(this._popupContentLength.toFixed()),this._popupOpen||(this._$popupContent.find(".next-popup").trigger("click"),this._popupOverlay.setPosition(this._popupCoordinate),this._$popupContent.scrollTop(0),this._popupOpen=!0)},t.prototype._featuresAtPixel=function(e){var t=this,o=[];return this.map.forEachFeatureAtPixel(e,function(e,n){var r,i=!1,a=null;for(r=0;r<t._arrPopupLayers.length;r++)if(a=t._arrPopupLayers[r],a.olLayer===n){i=!0;break}i&&o.push(new p(e,a,r,t._selectionLayers[r]))}),o},t.prototype.closePopup=function(){return this._checkInit(),this._popupOpen=!1,this._popupOverlay.setPosition(void 0),this._$popupCloser[0].blur(),this.clearSelection(),this._$popupContent.html(""),!1},t.prototype.addPopupChangedFunction=function(e){this._popupChangedFunctions.push(e)},t.prototype._addPopupLayer=function(e,t){this._checkInit(),t=t||{},t.color=t.color||"rgba(255,170,0,0.5)",t.width=t.width||10;var o;o=t.olStyle?t.olStyle:new a.style.Style({stroke:new a.style.Stroke({color:t.color,width:t.width}),image:new a.style.Circle({radius:7,fill:new a.style.Fill({color:t.color}),stroke:new a.style.Stroke({color:t.color,width:1})}),fill:new a.style.Fill({color:t.color})});var n=new a.layer.Vector({source:new a.source.Vector,style:o});return n.setZIndex(100),this._selectionLayers.push(n),this._selectionLayerLookup[e.id]=n,this.map.addLayer(n),n},t.prototype.addVectorPopup=function(e,t,o){var n=this._addPopupLayer(e,o);return this._arrPopupLayerIds.push(e.id),this._arrPopupLayers.push(e),this._arrPopupContentFunction.push(t),n},t.prototype.removeVectorPopup=function(e){var t=this._arrPopupLayerIds.indexOf(e.id);t>-1&&(this._arrPopupLayerIds.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupContentFunction.splice(t,1),this._selectionLayers.splice(t,1),delete this._selectionLayerLookup[e.id])},t.prototype.addMapServicePopup=function(e,t){var o=this._addPopupLayer(e,t);return this._esriMapServiceLayers.push(e),o},t.prototype.clearSelection=function(){this._checkInit();for(var e=0;e<this._selectionLayers.length;e++)this._selectionLayers[e].getSource().clear();for(var t=0,o=this._mapClickFunctions;t<o.length;t++){(0,o[t])()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,t.default=u},14:function(e,t,o){"use strict";function n(e){void 0===e&&(e={}),e.divId=e.divId||"map",e.center=e.center||{x:-10018378,y:5574910},e.zoom="number"==typeof e.zoom?e.zoom:7,e.baseSwitcher="boolean"!=typeof e.baseSwitcher||e.baseSwitcher,e.fullScreen="boolean"==typeof e.fullScreen&&e.fullScreen,e.addGeocode=e.addGeocode||!1,a("#"+e.divId).css("position","relative");var t=new i.layer.Tile({source:new i.source.OSM});if(e.baseSwitcher,e.zoom<0||e.zoom>28)throw"zoom out of range";if(e.center.x>=-180&&e.center.x<=180&&e.center.y>=-90&&e.center.y<=90){var o=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),o.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var n=o.getCoordinates();e.center.x=n[0],e.center.y=n[1]}var r=i.control.defaults({attributionOptions:{collapsible:!1}}),s=new i.View({center:[e.center.x,e.center.y],zoom:e.zoom,minZoom:e.minZoom,maxZoom:e.maxZoom}),p=new i.Map({layers:[t],target:e.divId,controls:r,view:s});return e.fullScreen&&p.addControl(new i.control.FullScreen({})),e.addGeocode&&new l.Geocode(document.getElementById(e.divId),p),p}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(2),a=o(1),l=o(11),s=r.default("olHelpers");t.quickMapBase=n,s.quickMapBase=n,t.default=n},17:function(e,t,o){"use strict";function n(e){return"number"==typeof e?e%1==0&&e>=0&&e<=28?l[e]:void console.log("invalid zoom level provided: "+e):void 0}function r(e){for(var t=0;t<l.length;t++)if(e>=l[t])return t;return 0}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("olHelpers.zoomResolutionConvert"),l=[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,.5971642834779395,.29858214173896974,.14929107086948487,.07464553543474244,.03732276771737122,.01866138385868561,.009330691929342804,.004665345964671402,.002332672982335701,.0011663364911678506,.0005831682455839253];t.zoomToResolution=n,a.zoomToResolution=n,t.resolutionToZoom=r,a.resolutionToZoom=r},2:function(e,t){e.exports=ol},25:function(e,t,o){"use strict";function n(e,t){return"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/"+e+"/"+t+"/MapServer"}function r(e,t){var o=window.location.href,n="/mapserver/"+e+"/"+t;return o.indexOf("transportal.cee.wisc.edu")>-1&&(n=o.toLowerCase().indexOf("webmapsstage")>-1?"https://transportal.cee.wisc.edu/gis/webmapsstage"+n:"https://transportal.cee.wisc.edu/gis/webmaps"+n),n}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=o(10),l=o(27),s=o(4),p=o(0),u=o(2),c=o(1),d=p.default("layers");t.makeServiceUrl=n,t.localCacheUrl=r;var h=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._source=new u.source.TileArcGISRest({url:""==n.url?void 0:n.url,params:void 0===o.showLayers?void 0:{layers:"show:"+o.showLayers.join(",")}}),n._showLayers=o.showLayers||[],n._olLayer=new u.layer.Tile({source:n._source,visible:n.visible,opacity:n.opacity,minResolution:n._minResolution,maxResolution:n._maxResolution}),n._olLayer.setZIndex(n._zIndex),o.addPopup="boolean"==typeof o.addPopup&&o.addPopup,n._esriFormat=new u.format.EsriJSON,n._popupRequest=null,o.getLegend="boolean"!=typeof o.getLegend||o.getLegend,o.getLegend&&n.addLegendContent(),o.addPopup&&s.default.addMapServicePopup(n),n}return i(t,e),t.prototype.addLegendContent=function(t){var o=this,n=this.url;"/"!==n[n.length-1]&&(n+="/"),n+="legend?f=pjson&callback=?",c.get(n,{},function(t){var n=l.makeMapServiceLegend(t,o._showLayers);e.prototype.addLegendContent.call(o,n)},"json")},t.prototype.getPopupInfo=function(e){if(this.visible){var t=this.url;"/"!=t[t.length-1]&&(t+="/"),t+="identify?callback=?";var o=this;null!=this._popupRequest&&this._popupRequest.abort(),this._popupRequest=c.get(t,e,function(e){for(var t=0,n=e.results;t<n.length;t++){var r=n[t],i='<table class="esri-popup-table">';for(var a in r.attributes)if(r.attributes.hasOwnProperty(a)){var l=r.attributes[a];if(null==l||"null"==l.toString().toLowerCase())continue;var p=a;p.length>14&&(p=p.slice(0,11)+"..."),i+="<tr><td>"+p+"</td><td>"+l+"</td></tr>"}i+="</table>",s.default.addMapServicePopupContent(o._esriFormat.readFeature(r),o,i,r.layerName)}},"json"),this._popupRequest.always(function(){o._popupRequest=null})}},Object.defineProperty(t.prototype,"source",{get:function(){return e.prototype.getSource.call(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"olLayer",{get:function(){return e.prototype.getOlLayer.call(this)},enumerable:!0,configurable:!0}),t}(a.LayerBase);t.LayerEsriMapServer=h,d.LayerEsriMapServer=h,t.default=h},27:function(e,t,o){"use strict";function n(e,t){return"rgba("+e[0]+","+e[1]+","+e[2]+","+t+")"}function r(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function i(e){var t=e.drawingInfo.renderer,o=null;switch(t.type){case"simple":switch(e.geometryType){case"esriGeometryPoint":o=new g(e,h);break;case"esriGeometryPolyline":o=new g(e,y);break;case"esriGeometryPolygon":o=new g(e,f);break;default:console.log(e),alert(e.geometryType+" not handled")}break;case"uniqueValue":switch(e.geometryType){case"esriGeometryPoint":o=new _(e,h);break;case"esriGeometryPolyline":o=new _(e,y);break;case"esriGeometryPolygon":o=new _(e,f);break;default:console.log(e),alert(e.geometryType+" not handled")}break;default:alert("not handled renderer type: "+t.type)}return null==o?{style:void 0,legend:""}:{style:o.olStyle,legend:o.legendHtml}}function a(e,t){void 0===t&&(t=!1),t="boolean"==typeof t&&t;var o=e.layerName,n=e.legend,i="";if(t||(i+='<span class="legend-layer-subitem">'+o+"</span>"),1==n.length)i='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+n[0].imageData+'">';else{t||(i+='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'),i+="<ul>";for(var a=0;a<n.length;a++)i+="<li>",i+='<span class="legend-layer-subitem">'+r(n[a].label)+"</span>",i+='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+n[a].imageData+'">',i+="</li>";i+="</ul>"}return t||(i='<span class="legend-layer-subitem">'+o+"</span>"+i),i}function l(e,t){void 0===t&&(t=[]);var o="",n=e.layers;if(1==n.length)o+=a(n[0],!0);else{o+="<ul>";for(var r=0;r<n.length;r++)t.length>0&&t.indexOf(r)<0||(o+="<li>"+a(n[r])+"</li>");o+="</ul>"}return o}var s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var p=o(0),u=o(2),c=p.default("olHelpers.esriToOlStyle");c.htmlEscape=r;var d=function(){function e(e,t){this.symbolObj=e,this.opacity=t,this.olStyle=void 0,this.legendHtml=""}return e}(),h=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSMS":var i=n(r.symbolObj.color,r.opacity),a=n(r.symbolObj.outline.color,r.opacity),l=r.symbolObj.outline.width,s=r.symbolObj.size;r.olStyle=new u.style.Style({image:new u.style.Circle({radius:s,fill:new u.style.Fill({color:i}),stroke:new u.style.Stroke({color:a,width:l})})}),r.legendHtml='<span class="legend-layer-icon" style="color: '+i+'">●</span>';break;case"esriPMS":r.olStyle=new u.style.Style({image:new u.style.Icon({src:"data:image/png;base64,"+r.symbolObj.imageData})}),r.legendHtml='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+r.symbolObj.imageData+'">';break;default:console.log(r.symbolObj),alert("Point symbol does not handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),y=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSLS":var i=n(r.symbolObj.color,r.opacity),a=r.symbolObj.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:i,width:a})}),r.legendHtml='<span class="legend-layer-icon" ',r.legendHtml+='style="',r.legendHtml+="background-color: "+i+";",r.legendHtml+="width: 40px;",r.legendHtml+="height: 4px;",r.legendHtml+="position: relative;",r.legendHtml+="display: inline-block;",r.legendHtml+="top: -1px;",r.legendHtml+='"></span>';break;default:console.log(r.symbolObj),alert("Line symbol does not handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),f=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSFS":var i=n(r.symbolObj.color,r.opacity),a=n(r.symbolObj.outline.color,r.opacity),l=r.symbolObj.outline.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:a,width:l}),fill:new u.style.Fill({color:i})}),r.legendHtml='<span class="legend-layer-icon" ',r.legendHtml+='style="',r.legendHtml+="background-color: "+i+";",r.legendHtml+="border: solid "+a+" 1px;",r.legendHtml+="width: 40px;",r.legendHtml+="height: 9px;",r.legendHtml+="position: relative;",r.legendHtml+="display: inline-block;",r.legendHtml+="top: 2px;",r.legendHtml+='"></span>';break;default:console.log(r.symbolObj),alert("Polygon symbol does handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),m=function(){function e(e){this.opacity=(100-(e.drawingInfo.transparency||0))/100,this.renderer=e.drawingInfo.renderer,this.olStyle=void 0,this.legendHtml=""}return e}(),g=function(e){function t(t,o){var n=e.call(this,t)||this;n.symbol=n.renderer.symbol;var r=new o(n.symbol,n.opacity);return n.olStyle=r.olStyle,n.legendHtml=r.legendHtml,n}return s(t,e),t}(m),_=function(e){function t(t,o){var n=e.call(this,t)||this;if(n.uniqueValueInfos=n.renderer.uniqueValueInfos,n.propertyName=n.renderer.field1,n.defaultSymbol=n.renderer.defaultSymbol,n.defaultSymbol){var i=new o(n.defaultSymbol,n.opacity);n.defaultStyle=i.olStyle,n.defaultLabelHtml='<span class="legend-layer-subitem">'+r(n.renderer.defaultLabel)+"</span>"+i.legendHtml}else n.defaultStyle=void 0,n.defaultLabelHtml="other";n.valueArray=[],n.labelArray=[],n.legendArray=[],n.propertyStyleLookup={};for(var a=0,l=n.uniqueValueInfos;a<l.length;a++){var s=l[a];n.labelArray.push(s.label),n.valueArray.push(s.value);var p=new o(s.symbol,n.opacity);n.legendArray.push('<span class="legend-layer-subitem">'+r(s.label)+"</span>"+p.legendHtml),n.propertyStyleLookup[s.value]=p.olStyle}n.olStyle=function(e){var t=e.getProperties(),o=t[n.propertyName];return void 0!==n.propertyStyleLookup[o]?[n.propertyStyleLookup[o]]:[n.defaultStyle]},null!==n.defaultLabelHtml&&n.legendArray.push(n.defaultLabelHtml),n.legendHtml="<ul>";for(var u=0,c=n.legendArray;u<c.length;u++){var d=c[u];n.legendHtml+="<li>"+d+"</li>"}return n.legendHtml+="</ul>",n}return s(t,e),t}(m);t.makeFeatureServiceLegendAndSymbol=i,c.makeFeatureServiceLegendAndSymbol=i,t.makeMapServiceLegend=l,c.makeMapServiceLegend=l},3:function(e,t,o){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=r.default("util");t.makeGuid=n,i.makeGuid=n,t.default=n},4:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);t.mapPopup=new n.default,t.default=t.mapPopup},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=n.default("olHelpers"),i=function(){function e(e){this._map=null,this._initialized=!1,this._subtype=e}return e.prototype.init=function(e){this._initialized||(this._map=e,this._initialized=!0)},Object.defineProperty(e.prototype,"map",{get:function(){return this._map},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),e.prototype._checkInit=function(){if(!this.initialized){var e=this._subtype+" object not initialized";throw alert(e),console.log(e),e}},e.prototype.checkInit=function(){this._checkInit()},e}();t.MapInteractionBase=i,r.MapInteractionBase=i,t.default=i},6:function(e,t,o){"use strict";function n(e){void 0===e&&(e={});var t=r.quickMapBase(e);return a.default.init(t),l.default.init(t),t}Object.defineProperty(t,"__esModule",{value:!0});var r=o(14),i=o(0),a=o(7),l=o(4),s=i.default("olHelpers");t.quickMap=n,s.quickMap=n,t.default=n},60:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=o(1),i=n.default("collections.layerSwipe"),a=function(){function e(e,t){void 0===t&&(t="");var o=this;t=t||"",this.leftLayers=[],this.rightLayers=[],this._percentRight=50,this.offset=null,this._map=e,this.$mapElement=r(e.getTargetElement()),this.$mapElement.append('<div class="layer-swiper">'+t+"</div>"),this.$swiper=this.$mapElement.find(".layer-swiper"),this.percentRight=this.percentRight,this.dragging=!1,this.$mapElement.mouseleave(function(){o.dragging=!1}),this.$swiper.bind("mousewheel DOMMouseScroll",function(e){e.preventDefault()}),this.$swiper.mousedown(function(e){o.dragging=!0,o.offset=e.offsetX}),r(window).mouseup(function(){o.dragging=!1}),this.$mapElement.mousemove(function(e){if(o.dragging){var t=o.$mapElement.position().left,n=o.$mapElement.width();o.percentRight=100*(e.pageX-o.offset-t)/n}})}return e.prototype.addLeftLayer=function(e){var t=this;this.leftLayers.indexOf(e)==-1&&(e.olLayer.on("precompose",function(e){var o=e.context,n=o.canvas.width*(t.percentRight/100);o.save(),o.beginPath(),o.rect(0,0,n,o.canvas.height),o.clip()}),e.olLayer.on("postcompose",function(e){e.context.restore()}),this.leftLayers.push(e))},e.prototype.addRightLayer=function(e){var t=this;this.rightLayers.indexOf(e)==-1&&(e.olLayer.on("precompose",function(e){var o=e.context,n=o.canvas.width*(t.percentRight/100);o.save(),o.beginPath(),o.rect(n,0,o.canvas.width-n,o.canvas.height),o.clip()}),e.olLayer.on("postcompose",function(e){e.context.restore()}),this.rightLayers.push(e))},Object.defineProperty(e.prototype,"percentRight",{get:function(){return this._percentRight},set:function(e){var t=this.$swiper.position().left+this.$swiper.width()>this.$mapElement.width();e<0||t&&e>this.percentRight||(this._percentRight=e,this.$swiper.css("left",this._percentRight.toFixed(2)+"%"),this._map.render())},enumerable:!0,configurable:!0}),e}();i.LayerSwipe=a,t.default=a},7:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12);t.mapMove=new n.default,t.default=t.mapMove},70:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(6),r=o(60),i=o(25),a=n.quickMap(),l=new r.default(a),s=new i.LayerEsriMapServer("https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer",{minZoom:6,maxZoom:12,name:"WisDOT Regions"}),p=new i.LayerEsriMapServer("https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer",{minZoom:7,visible:!0,name:"Metamanager Segments"}),u=new i.LayerEsriMapServer("https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer",{minZoom:7,visible:!0,name:"truck2014",showLayers:[8]}),c=new i.LayerEsriMapServer("https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer",{minZoom:7,visible:!0,name:"truck2015",showLayers:[9]});a.addLayer(s.olLayer),a.addLayer(u.olLayer),a.addLayer(c.olLayer),a.addLayer(p.olLayer),l.addLeftLayer(s),l.addRightLayer(p),l.addLeftLayer(u),l.addRightLayer(c),setTimeout(function(){},5e3)},8:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2);t.proj4326=new n.proj.Projection({code:"EPSG:4326"}),t.proj3857=new n.proj.Projection({code:"EPSG:3857"}),t.proj3070=new n.proj.Projection({code:"EPSG:3070"})},9:function(e,t,o){"use strict";function n(e){return void 0===e||null===e}function r(e){return!n(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("util.checkDefined");t.undefinedOrNull=n,a.undefinedOrNull=n,t.definedAndNotNull=r,a.definedAndNotNull=r}}); //# sourceMappingURL=compare-test.js.map \ No newline at end of file diff --git a/test/serve/js/compare-test.js.map b/test/serve/js/compare-test.js.map index 559993578c28b9d7199c4a0b77b36172c1182399..3b8ebc4f0014354b39fef6628b6a63b1352d48a3 100644 --- a/test/serve/js/compare-test.js.map +++ b/test/serve/js/compare-test.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 7bb55fd41bd308ae26ba?4c44**","webpack:///./src/util/provide.ts?5c82**","webpack:///external \"$\"?57aa**","webpack:///./src/layers/LayerBase.ts?bf94**","webpack:///./src/olHelpers/geocode.ts?5a2f**","webpack:///./src/olHelpers/mapMoveCls.ts?cd45**","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7**","webpack:///./src/olHelpers/quickMapBase.ts?fb65**","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b**","webpack:///external \"ol\"?81ed**","webpack:///./src/layers/LayerEsriMapServer.ts?9c85*","webpack:///./src/olHelpers/esriToOlStyle.ts?9363*","webpack:///./src/util/makeGuid.ts?e80e**","webpack:///./src/olHelpers/mapInteractionBase.ts?f419**","webpack:///./src/olHelpers/quickMap.ts?1069**","webpack:///./src/olHelpers/mapMove.ts?6a2b**","webpack:///./src/olHelpers/layerSwipe.ts","webpack:///./src/olHelpers/mapPopup.ts?5d6c**","webpack:///./src/_tests/demos/compare-test.ts","webpack:///./src/olHelpers/projections.ts?804b**","webpack:///./src/util/checkDefined.ts?bc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pack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 71);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7bb55fd41bd308ae26ba","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachLayerAtPixel(pixel, (lyr) => {\r\n if (hit){\r\n return;\r\n }\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == lyr){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUl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VMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gP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CKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer`\r\n}\r\n\r\nexport function localCacheUrl(folder: string, service: string): string{\r\n let loc = window.location.href;\r\n\r\n let url = `/mapserver/${folder}/${service}`;\r\n\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1){\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1){\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n } else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url\r\n }\r\n }\r\n\r\n\r\n return url;\r\n}\r\n\r\n\r\n\r\n\r\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n addPopup?: boolean;\r\n showLayers?: Array<number>;\r\n getLegend?: boolean;\r\n}\r\n\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nexport class LayerEsriMapServer extends LayerBase {\r\n _esriFormat: ol.format.EsriJSON;\r\n _popupRequest: JQueryXHR;\r\n _showLayers: number[];\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n constructor(url: string, options: LayerEsriMapServerOptions = {}) {\r\n\r\n super(url, options);\r\n this._source = new ol.source.TileArcGISRest(\r\n {\r\n url: this.url == '' ? undefined : this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : {layers: 'show:' + options.showLayers.join(',')}\r\n }\r\n );\r\n\r\n this._showLayers = options.showLayers || [];\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.Tile,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n });\r\n\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\r\n this._esriFormat = new ol.format.EsriJSON();\r\n this._popupRequest = null;\r\n\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n\r\n if (options.getLegend){\r\n this.addLegendContent();\r\n }\r\n\r\n if (options.addPopup) {\r\n mapPopup.addMapServicePopup(this);\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n\r\n $.get(urlCopy, {}, (d) => {\r\n let newHtml = esriToOl.makeMapServiceLegend(d, this._showLayers);\r\n super.addLegendContent(newHtml);\r\n }, 'json');\r\n }\r\n\r\n\r\n getPopupInfo(queryParams: {[s: string]: any}) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'identify?callback=?';\r\n\r\n let __this = this;\r\n\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n\r\n\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (let r of d['results']) {\r\n\r\n let popupHtml = '<table class=\"esri-popup-table\">';\r\n\r\n for (let a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n let attrVal = r['attributes'][a];\r\n\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n\r\n let attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n\r\n popupHtml += `<tr><td>${attr}</td><td>${attrVal}</td></tr>`;\r\n }\r\n }\r\n\r\n popupHtml += '</table>';\r\n\r\n mapPopup.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get source(): ol.source.TileArcGISRest {\r\n return super.getSource() as ol.source.TileArcGISRest;\r\n }\r\n\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get olLayer(): ol.layer.Tile {\r\n return super.getOlLayer() as ol.layer.Tile;\r\n }\r\n}\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexport default LayerEsriMapServer;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerEsriMapServer.ts","/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers.esriToOlStyle');\r\n\r\n\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray: [number, number, number], opacity: number): string {\r\n \"use strict\";\r\n\r\n return `rgba(${colorArray[0]},${colorArray[1]},${colorArray[2]},${opacity})`;\r\n}\r\n\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str: string): string {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface iEsriResponse{\r\n drawingInfo: {\r\n renderer: iEsriRenderer;\r\n transparency: number\r\n },\r\n geometryType: string\r\n}\r\n\r\n\r\nexport interface iEsriRenderer{\r\n type: string;\r\n symbol: iEsriSymbol;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n field1: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultLabel: string;\r\n}\r\n\r\nexport interface iEsriSymbol{\r\n size: number;\r\n type: string;\r\n outline:{\r\n color: [number, number, number];\r\n width: number;\r\n },\r\n color: [number, number, number];\r\n width: number;\r\n imageData: string\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n legendHtml: string;\r\n opacity: number;\r\n symbolObj: iEsriSymbol;\r\n olStyle: ol.style.Style;\r\n\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\ninterface ICommonSymbol{\r\n new (symbolObj: iEsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSMS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n let radius = this.symbolObj.size;\r\n\r\n\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({color: outerColor, width: outlineWidth})\r\n })\r\n });\r\n this.legendHtml = `<span class=\"legend-layer-icon\" style=\"color: ${innerColor}\">●</span>`;\r\n break;\r\n case 'esriPMS':\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({src: `data:image/png;base64,${this.symbolObj['imageData']}`})\r\n });\r\n this.legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${this.symbolObj['imageData']}\">`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass LineSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSLS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let lineWidth = this.symbolObj.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 4px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: -1px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass PolygonSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj['type']) {\r\n case 'esriSFS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `border: solid ${outerColor} 1px;`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 9px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: 2px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nexport interface iStyleFunc{\r\n (f: ol.Feature): ol.style.Style| ol.style.Style[]\r\n}\r\n\r\nclass SymbolGenerator {\r\n opacity: number;\r\n renderer: iEsriRenderer;\r\n legendHtml: string;\r\n olStyle: iStyleFunc | ol.style.Style;\r\n\r\n constructor(esriResponse: iEsriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n symbol: iEsriSymbol;\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.symbol = this.renderer.symbol;\r\n let symbolObj = new SymbolClass(this.symbol, this.opacity);\r\n this.olStyle = symbolObj.olStyle;\r\n this.legendHtml = symbolObj.legendHtml;\r\n }\r\n}\r\n\r\nclass UniqueValueSymbol extends SymbolGenerator {\r\n\r\n propertyName: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultStyle: ol.style.Style;\r\n defaultLabelHtml: string;\r\n labelArray: Array<string>;\r\n legendArray: Array<string>;\r\n propertyStyleLookup: {[s: string]: ol.style.Style};\r\n valueArray: Array<any>;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.uniqueValueInfos = this.renderer.uniqueValueInfos;\r\n this.propertyName = this.renderer.field1;\r\n this.defaultSymbol = this.renderer.defaultSymbol;\r\n\r\n\r\n if (this.defaultSymbol) {\r\n let symbolObj = new SymbolClass(this.defaultSymbol, this.opacity);\r\n this.defaultStyle = symbolObj.olStyle;\r\n this.defaultLabelHtml = `<span class=\"legend-layer-subitem\">${htmlEscape(this.renderer['defaultLabel'])}</span>` + symbolObj.legendHtml;\r\n } else {\r\n this.defaultStyle = undefined;\r\n this.defaultLabelHtml = 'other';\r\n }\r\n\r\n this.valueArray = [];\r\n this.labelArray = [];\r\n this.legendArray = [];\r\n this.propertyStyleLookup = {};\r\n\r\n for (let uniqueVal of this.uniqueValueInfos) {\r\n this.labelArray.push(uniqueVal['label']);\r\n this.valueArray.push(uniqueVal['value']);\r\n let uniqueSym = new SymbolClass(uniqueVal.symbol, this.opacity);\r\n this.legendArray.push(`<span class=\"legend-layer-subitem\">${htmlEscape(uniqueVal['label'])}</span>` + uniqueSym.legendHtml);\r\n this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n\r\n this.olStyle = (feature: ol.Feature): ol.style.Style[] => {\r\n let checkProperties = feature.getProperties();\r\n let checkProperty = checkProperties[this.propertyName];\r\n\r\n if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [this.propertyStyleLookup[checkProperty]];\r\n } else {\r\n return [this.defaultStyle];\r\n }\r\n };\r\n\r\n if (this.defaultLabelHtml !== null) {\r\n this.legendArray.push(this.defaultLabelHtml);\r\n }\r\n\r\n this.legendHtml = '<ul>';\r\n for (let h of this.legendArray) {\r\n this.legendHtml += `<li>${h}</li>`;\r\n }\r\n this.legendHtml += '</ul>';\r\n }\r\n}\r\n\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: iEsriResponse): {style: iStyleFunc | ol.style.Style, legend: string} {\r\n \"use strict\";\r\n let renderer = esriResponse.drawingInfo.renderer;\r\n let symbolLegendOut: SymbolGenerator = null;\r\n\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n\r\n if (symbolLegendOut == null) {\r\n return {style: undefined, legend: ''};\r\n } else {\r\n return {style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml};\r\n }\r\n}\r\n\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\r\n\r\nexport interface iMapServiceLegend{\r\n layerName: string;\r\n legend: {label: string, imageData: string}[]\r\n}\r\n\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject: iMapServiceLegend, skipLayerNameAndExpander: boolean = false) {\r\n\r\n\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n let layerName = lyrObject['layerName'];\r\n let legendItems = lyrObject['legend'];\r\n let legendHtml = '';\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += `<span class=\"legend-layer-subitem\">${layerName}</span>`;\r\n }\r\n\r\n if (legendItems.length == 1) {\r\n legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[0]['imageData']}\">`;\r\n } else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (let i = 0; i < legendItems.length; i++) {\r\n legendHtml += `<li>`;\r\n legendHtml += `<span class=\"legend-layer-subitem\">${htmlEscape(legendItems[i]['label'])}</span>`;\r\n legendHtml += `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[i]['imageData']}\">`;\r\n legendHtml += `</li>`;\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = `<span class=\"legend-layer-subitem\">${layerName}</span>` + legendHtml;\r\n }\r\n\r\n return legendHtml;\r\n}\r\n\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse: {layers: iMapServiceLegend[]}, showLayers: number[] = []) {\r\n \"use strict\";\r\n\r\n let newLegendHtml = '';\r\n\r\n let layers = esriResponse['layers'];\r\n\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n } else {\r\n newLegendHtml += '<ul>';\r\n for (let i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0){\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n\r\n return newLegendHtml;\r\n}\r\n\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/esriToOlStyle.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\n\r\n\r\nimport provide from '../util/provide';\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('collections.layerSwipe');\r\n\r\n\r\nclass LayerSwipe {\r\n leftLayers: Array<LayerBase>;\r\n rightLayers: Array<LayerBase>;\r\n _percentRight: number;\r\n _map: ol.Map;\r\n $mapElement: JQuery;\r\n $swiper: JQuery;\r\n dragging: boolean;\r\n offset: number;\r\n /**\r\n *\r\n * @param {ol.Map} map - the map\r\n * @param {string} [sliderContent=''] - additional html to be added inside the slider div\r\n */\r\n constructor(map: ol.Map, sliderContent: string = '') {\r\n\r\n sliderContent = sliderContent || '';\r\n /**\r\n *\r\n * @type {Array<LayerBase>}\r\n */\r\n this.leftLayers = [];\r\n\r\n /**\r\n *\r\n * @type {Array<LayerBase>}\r\n */\r\n this.rightLayers = [];\r\n\r\n this._percentRight = 50;\r\n this.offset = null;\r\n\r\n this._map = map;\r\n this.$mapElement = $(map.getTargetElement());\r\n this.$mapElement.append(`<div class=\"layer-swiper\">${sliderContent}</div>`);\r\n\r\n\r\n this.$swiper = this.$mapElement.find('.layer-swiper');\r\n this.percentRight = this.percentRight;\r\n\r\n this.dragging = false;\r\n\r\n this.$mapElement.mouseleave(() => {\r\n this.dragging = false;\r\n });\r\n\r\n this.$swiper.bind('mousewheel DOMMouseScroll', function(evt){\r\n evt.preventDefault();\r\n });\r\n\r\n this.$swiper.mousedown((evt) => {\r\n this.dragging = true;\r\n this.offset = evt.offsetX;\r\n });\r\n\r\n $(window).mouseup(() => {\r\n this.dragging = false;\r\n });\r\n\r\n this.$mapElement.mousemove((evt) => {\r\n if (this.dragging) {\r\n let mapLeft = this.$mapElement.position().left;\r\n let mapWidth = this.$mapElement.width();\r\n\r\n this.percentRight = 100 * (evt.pageX - this.offset - mapLeft) / mapWidth;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - layer to be added to left side\r\n */\r\n addLeftLayer(lyr: LayerBase) {\r\n\r\n if (this.leftLayers.indexOf(lyr) != -1){\r\n return;\r\n }\r\n\r\n lyr.olLayer.on('precompose', (event: {context: CanvasRenderingContext2D}) => {\r\n let ctx = event['context'];\r\n let width = ctx.canvas.width * (this.percentRight / 100);\r\n\r\n ctx.save();\r\n ctx.beginPath();\r\n ctx.rect(0, 0, width, ctx.canvas.height);\r\n ctx.clip();\r\n });\r\n\r\n lyr.olLayer.on('postcompose', function (event: {context: CanvasRenderingContext2D}) {\r\n let ctx = event['context'];\r\n ctx.restore();\r\n });\r\n\r\n\r\n this.leftLayers.push(lyr);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - layer to be added to right side\r\n */\r\n addRightLayer(lyr: LayerBase) {\r\n\r\n if (this.rightLayers.indexOf(lyr) != -1){\r\n return;\r\n }\r\n\r\n lyr.olLayer.on('precompose', (event: {context: CanvasRenderingContext2D}) => {\r\n let ctx = event['context'];\r\n let width = ctx.canvas.width * (this.percentRight / 100);\r\n\r\n ctx.save();\r\n ctx.beginPath();\r\n ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height);\r\n ctx.clip();\r\n });\r\n\r\n lyr.olLayer.on('postcompose', function (event: {context: CanvasRenderingContext2D}) {\r\n let ctx = event['context'];\r\n ctx.restore();\r\n });\r\n\r\n this.rightLayers.push(lyr);\r\n }\r\n\r\n get percentRight() : number{\r\n return this._percentRight;\r\n }\r\n\r\n set percentRight(percent: number) {\r\n let maxed = this.$swiper.position().left + this.$swiper.width() > this.$mapElement.width();\r\n\r\n if (percent < 0) {\r\n return;\r\n } else if (maxed && percent > this.percentRight) {\r\n return;\r\n }\r\n\r\n this._percentRight = percent;\r\n this.$swiper.css('left', `${this._percentRight.toFixed(2)}%`);\r\n this._map.render();\r\n }\r\n}\r\n\r\nnm.LayerSwipe = LayerSwipe;\r\nexport default LayerSwipe;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/layerSwipe.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerSwipe from '../../olHelpers/layerSwipe';\r\nimport {LayerEsriMapServer} from '../../layers/LayerEsriMapServer';\r\n\r\nlet map = quickMap();\r\n\r\n\r\nlet swiper = new LayerSwipe(map);\r\n\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions'\r\n });\r\n\r\nlet metamanagerSegments = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'Metamanager Segments'\r\n });\r\n\r\nlet truckSpeed2014 = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2014',\r\n showLayers: [8]\r\n });\r\n\r\nlet truckSpeed2015 = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2015',\r\n showLayers: [9]\r\n });\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(truckSpeed2014.olLayer);\r\nmap.addLayer(truckSpeed2015.olLayer);\r\nmap.addLayer(metamanagerSegments.olLayer);\r\n\r\n\r\nswiper.addLeftLayer(wisDotRegions);\r\nswiper.addRightLayer(metamanagerSegments);\r\n\r\nswiper.addLeftLayer(truckSpeed2014);\r\nswiper.addRightLayer(truckSpeed2015);\r\n\r\nsetTimeout(() => {\r\n\r\n}, 5000);\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/compare-test.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///compare-test.js","webpack:///webpack/bootstrap 99693f14fcb3e83c98ca?ad23**","webpack:///./src/util/provide.ts?5c82**","webpack:///external \"$\"?57aa**","webpack:///./src/layers/LayerBase.ts?bf94**","webpack:///./src/olHelpers/geocode.ts?5a2f**","webpack:///./src/olHelpers/mapMoveCls.ts?cd45**","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7**","webpack:///./src/olHelpers/quickMapBase.ts?fb65**","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b**","webpack:///external \"ol\"?81ed**","webpack:///./src/layers/LayerEsriMapServer.ts?9c85*","webpack:///./src/olHelpers/esriToOlStyle.ts?9363*","webpack:///./src/util/makeGuid.ts?e80e**","webpack:///./src/olHelpers/mapPopup.ts?5d6c**","webpack:///./src/olHelpers/mapInteractionBase.ts?f419**","webpack:///./src/olHelpers/quickMap.ts?1069**","webpack:///./src/olHelpers/layerSwipe.ts","webpack:///./src/olHelpers/mapMove.ts?6a2b**","webpack:///./src/_tests/demos/compare-test.ts","webpack:///./src/olHelpers/projections.ts?804b**","webpack:///./src/util/checkDefined.ts?bcd7**"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","1","$","10","zoomResolutionConvert","provide_1","makeGuid_1","nm","LayerBase","url","options","this","_url","_params","params","_legendCollapse","legendCollapse","_legendCheckbox","legendCheckbox","id","_name","animate","_opacity","opacity","_visible","visible","_source","undefined","_olLayer","_loaded","_maxResolution","zoomToResolution","minZoom","_minResolution","maxZoom","_minZoom","_maxZoom","_zIndex","zIndex","loadCallback","_legendContent","_$legendDiv","_applyCollapseCalled","_addLegendContent","legendContent","_load","loaded","getLegendDiv","additionalContent","indexOf","append","applyCollapse","addLegendContent","console","log","$expander","find","click","$this","siblings","slideToggle","hasClass","removeClass","html","addClass","trigger","refresh","source","_id","set","newId","_animate","newVal","newParams","visibility","setVisible","olLayer","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","11","ol","projections_1","invalidClass","geocoderLoadingClass","Geocode","mapDiv","map","_this","inputGuid","makeGuid","buttonGuid","indicationLayer","layer","Vector","style","Style","image","Circle","radius","fill","Fill","color","stroke","Stroke","width","addLayer","theButton","document","getElementById","theInput","reset","$theButton","$theInput","evt","preventDefault","disabled","clear","lat","parseFloat","lon","title","v","getView","geom","Point","feat","Feature","addFeature","transform","proj4326","proj3857","setCenter","getCoordinates","setZoom","keyup","keyCode","12","__extends","extendStatics","setPrototypeOf","__proto__","Array","b","__","constructor","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","init","theMap","on","e","_updateMapExtent","triggerLyrLoad","type","triggerMoveCallback","theView","getZoom","extentArray","calculateExtent","getSize","minX","minY","maxX","maxY","lyr","index","eventType","undefinedOrNull","definedAndNotNull","clearTimeout","abort","callbackFunc","mapMoveBefore","mapMoveMakeGetParams","__this_1","innerFunction","theLayer","theIndex","_innerThis","mapMoveParams","mapMoveCallback","fail","jqXHR","statusText","always","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","_checkInit","push","addCallback","func","context","delay","13","FeatureLayerProperties","feature","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","_map","addOverlay","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","forEachFeatureAtPixel","vLyr","getTargetElement","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","j","hasLyr","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","theStyle","olStyle","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","14","quickMapBase","divId","center","x","y","zoom","baseSwitcher","fullScreen","addGeocode","css","osmLayer","Tile","OSM","proj","Projection","code","coordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","geocode_1","17","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","2","25","makeServiceUrl","folder","service","localCacheUrl","loc","location","href","toLowerCase","LayerBase_1","esriToOl","mapPopup_1","LayerEsriMapServer","TileArcGISRest","showLayers","_showLayers","minResolution","maxResolution","addPopup","_esriFormat","format","EsriJSON","_popupRequest","getLegend","urlCopy","newHtml","makeMapServiceLegend","r","a","attrVal","toString","attr","slice","readFeature","27","_colorArrayToRgba","colorArray","htmlEscape","str","String","replace","makeFeatureServiceLegendAndSymbol","esriResponse","renderer","drawingInfo","symbolLegendOut","SingleSymbol","PointSymbol","LineSymbol","PolygonSymbol","alert","UniqueValueSymbol","legend","legendHtml","mapServiceLegendItem","lyrObject","skipLayerNameAndExpander","legendItems","newLegendHtml","CommonSymbol","symbolObj","innerColor","outerColor","outline","outlineWidth","size","Icon","src","lineWidth","SymbolGenerator","SymbolClass","symbol","uniqueValueInfos","propertyName","field1","defaultSymbol","defaultStyle","defaultLabelHtml","valueArray","labelArray","legendArray","propertyStyleLookup","uniqueVal","uniqueSym","checkProperties","checkProperty","_b","_c","h","3","Math","random","4","mapPopupCls_1","mapPopup","5","MapInteractionBase","subtype","_initialized","_subtype","initialized","msg","checkInit","6","quickMap","quickMapBase_1","mapMove_1","60","LayerSwipe","sliderContent","leftLayers","rightLayers","_percentRight","offset","$mapElement","$swiper","percentRight","dragging","mouseleave","bind","mousedown","offsetX","mouseup","mousemove","mapLeft","position","left","mapWidth","pageX","addLeftLayer","event","canvas","save","beginPath","rect","height","clip","restore","addRightLayer","percent","maxed","render","7","mapMoveCls_1","mapMove","70","quickMap_1","layerSwipe_1","LayerEsriMapServer_1","swiper","wisDotRegions","metamanagerSegments","truckSpeed2014","truckSpeed2015","8","proj3070","9","input"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,EAAAC,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7B,MAAyB,UAAVA,GAAmC,OAAVA,EAW5C,QAAApU,GAAmCoU,GAG/B,OAASrU,EAAgBqU,GrB43E7BrhB,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GqBr5EtD,IAAAiC,GAAA3C,EAAA,GACI6C,EAAKF,EAAAL,QAAQ,oBAOjBnC,GAAA4N,kBAMAlL,EAAGkL,gBAAkBA,EAQrB5N,EAAA6N,oBAMAnL,EAAGmL,kBAAoBA","file":"compare-test.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 70);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar zoomResolutionConvert = __webpack_require__(17);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nvar LayerBase = (function () {\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n function LayerBase(url, options) {\r\n if (options === void 0) { options = {}; }\r\n options = options || {};\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n this.id = options.id || makeGuid_1.default();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n }\r\n else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n this._source = undefined;\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n this._legendContent = '';\r\n if (this._legendCheckbox) {\r\n this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n else {\r\n this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBase.prototype._load = function () {\r\n if (this.loaded == true) {\r\n return true;\r\n }\r\n else {\r\n this._loaded = true;\r\n return false;\r\n }\r\n };\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n LayerBase.prototype.getLegendDiv = function () {\r\n return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n };\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n if (additionalContent === void 0) { additionalContent = ''; }\r\n var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n this._legendContent += additionalContent;\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n };\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n this._addLegendContent(additionalContent);\r\n };\r\n LayerBase.prototype.applyCollapse = function () {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n return undefined;\r\n }\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n var $expander = this._$legendDiv.find('.legend-items-expander');\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n $expander.click(function () {\r\n var $this = $(this);\r\n $this.siblings('ul').slideToggle();\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n }\r\n else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * trick to refresh the layer\r\n */\r\n LayerBase.prototype.refresh = function () {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"id\", {\r\n get: function () {\r\n return this._id;\r\n },\r\n set: function (newId) {\r\n this._id = newId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n get: function () {\r\n return this._animate;\r\n },\r\n set: function (animate) {\r\n this._animate = animate;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._legendContent;\r\n },\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set: function (newVal) {\r\n this._legendContent = newVal;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"params\", {\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._params;\r\n },\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set: function (newParams) {\r\n this._params = newParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"url\", {\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._url;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set: function (visibility) {\r\n this.setVisible(visibility);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setVisible = function (visibility) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get: function () {\r\n return this._opacity;\r\n },\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set: function (opacity) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"name\", {\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._name;\r\n },\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set: function (newName) {\r\n this._name = newName;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._loaded;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"source\", {\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getSource = function () {\r\n return this._source;\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n /**\r\n * get the z index\r\n */\r\n get: function () {\r\n return this._zIndex;\r\n },\r\n /**\r\n * set the z index\r\n */\r\n set: function (newZ) {\r\n this._zIndex = newZ;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setZIndex = function (newZ) {\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n /**\r\n * the the ol layer\r\n */\r\n get: function () {\r\n return this.getOlLayer();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getOlLayer = function () {\r\n return this._olLayer;\r\n };\r\n return LayerBase;\r\n}());\r\nexports.LayerBase = LayerBase;\r\nnm.LayerBase = LayerBase;\r\nexports.default = LayerBase;\r\n\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar ol = __webpack_require__(2);\r\nvar projections_1 = __webpack_require__(8);\r\nvar invalidClass = 'geocoder-invalid';\r\nvar geocoderLoadingClass = 'geocoder-loading';\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\nvar Geocode = (function () {\r\n function Geocode(mapDiv, map) {\r\n var _this = this;\r\n var inputGuid = makeGuid_1.makeGuid();\r\n var buttonGuid = makeGuid_1.makeGuid();\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }),\r\n stroke: new ol.style.Stroke({ color: 'red', width: 1 })\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n (\"<input type=\\\"text\\\" id=\\\"\" + inputGuid + \"\\\">\") +\r\n (\"<button id=\\\"\" + buttonGuid + \"\\\">Search</button>\") +\r\n '</div>');\r\n this.theButton = document.getElementById(buttonGuid);\r\n this.theInput = document.getElementById(inputGuid);\r\n this.reset();\r\n var $theButton = $(this.theButton);\r\n var $theInput = $(this.theInput);\r\n $theButton.click(function (evt) {\r\n evt.preventDefault();\r\n $theButton.addClass(geocoderLoadingClass);\r\n _this.theButton.disabled = true;\r\n _this.indicationLayer.getSource().clear();\r\n $.get(\"https://geocode.xyz/\" + _this.theInput.value + \"?geoit=json\", {}, function (d) {\r\n var lat = parseFloat(d['latt']);\r\n var lon = parseFloat(d['longt']);\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n _this.theInput.title = 'Specified Location Invalid';\r\n _this.theButton.title = 'Specified Location Invalid';\r\n }\r\n else {\r\n var v = _this.map.getView();\r\n var p = new ol.geom.Point([lon, lat]);\r\n var feat = new ol.Feature(p);\r\n _this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(projections_1.proj4326, projections_1.proj3857);\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n $theButton.removeClass(geocoderLoadingClass);\r\n _this.theButton.disabled = false;\r\n }, 'json');\r\n });\r\n $(this.theInput).keyup(function (evt) {\r\n evt.preventDefault();\r\n _this.theButton.disabled = _this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n _this.theInput.title = '';\r\n _this.theButton.title = '';\r\n if (!_this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n });\r\n }\r\n Geocode.prototype.reset = function () {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n };\r\n return Geocode;\r\n}());\r\nexports.Geocode = Geocode;\r\n\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar checkDefined = __webpack_require__(9);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nvar MapMoveCls = (function (_super) {\r\n __extends(MapMoveCls, _super);\r\n /**\r\n * constructor called implicitly\r\n */\r\n function MapMoveCls() {\r\n var _this = _super.call(this, 'map move') || this;\r\n _this._arrLyrRequest = [];\r\n _this._arrLyrTimeout = [];\r\n _this._arrLayer = [];\r\n _this._lookupLayer = {};\r\n _this._mapMoveCallbacks = [];\r\n _this._mapMoveCallbacksLookup = {};\r\n _this._mapMoveCallbackDelays = [];\r\n _this._mapMoveCallbackContext = [];\r\n _this._mapMoveCallbackTimeout = [];\r\n _this._mapExtent = undefined;\r\n _this._zoomLevel = undefined;\r\n return _this;\r\n }\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n MapMoveCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n _this._updateMapExtent();\r\n // trigger the layer updates\r\n for (var i = 0; i < _this._arrLayer.length; i++) {\r\n _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n }\r\n // trigger the map callbacks\r\n for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n _this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n };\r\n MapMoveCls.prototype._updateMapExtent = function () {\r\n var theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n var extentArray = theView.calculateExtent(this.map.getSize());\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n };\r\n Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n /**\r\n * return the map extent\r\n */\r\n get: function () {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n return this._mapExtent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n }\r\n else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n }\r\n else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n // dummy callback used if before load returns false\r\n var callbackFunc = function () { };\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n var __this_1 = this;\r\n callbackFunc = function () {\r\n function innerFunction(theLayer, theIndex) {\r\n var _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this_1, lyr, index);\r\n };\r\n }\r\n else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n };\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n throw 'either the function index or the id must be defined';\r\n }\r\n if (typeof ind !== 'number') {\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n if (ind < 0) {\r\n console.log('function not found');\r\n return;\r\n }\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n var ctx = this._mapMoveCallbackContext[ind];\r\n var theFunc = this._mapMoveCallbacks[ind];\r\n var __this = this;\r\n var f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n };\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n };\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId) {\r\n functionId = makeGuid_1.default();\r\n }\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n };\r\n return MapMoveCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapMoveCls = MapMoveCls;\r\nnm.MapMoveCls = MapMoveCls;\r\nexports.default = MapMoveCls;\r\n\n\n/***/ }),\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\nvar FeatureLayerProperties = (function () {\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n get: function () {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n }\r\n else {\r\n return this.layer.name;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FeatureLayerProperties;\r\n}());\r\nexports.FeatureLayerProperties = FeatureLayerProperties;\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nvar MapPopupCls = (function (_super) {\r\n __extends(MapPopupCls, _super);\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n /**\r\n * map popup constructor\r\n */\r\n function MapPopupCls() {\r\n var _this = _super.call(this, 'map popup') || this;\r\n _this._arrPopupLayerIds = [];\r\n _this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n _this._arrPopupContentFunction = [];\r\n _this._$popupContainer = undefined;\r\n _this._$popupContent = undefined;\r\n _this._$popupCloser = undefined;\r\n _this._popupOverlay = undefined;\r\n _this._selectionLayers = [];\r\n _this._selectionLayerLookup = {};\r\n _this._mapClickFunctions = [];\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n _this._popupChangedFunctions = [];\r\n _this._esriMapServiceLayers = [];\r\n _this._popupOpen = false;\r\n _this._popupCoordinate = null;\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n _this._popupContentLength = 0;\r\n return _this;\r\n }\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n MapPopupCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n var $map;\r\n var target = this.map.getTarget();\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n $map.append('<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>');\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n var _ease = function (n) {\r\n return ol.easing.inAndOut(n);\r\n };\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n this._map.addOverlay(this._popupOverlay);\r\n this._$popupCloser.click(function (evt) {\r\n _this.closePopup();\r\n });\r\n // display popup on click\r\n this._map.on('singleclick', function (evt) {\r\n _this.closePopup();\r\n _this._popupCoordinate = evt['coordinate'];\r\n // esri map service layers\r\n if (_this._esriMapServiceLayers.length > 0) {\r\n var queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n imageDisplay: _this._map.getSize().join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n var l = _a[_i];\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n var featObj = layerFeatureObjectArray[i];\r\n var props = featObj.feature.getProperties();\r\n var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n }\r\n else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse;\r\n _this._passThroughLayerFeatureArray.push(featObj);\r\n }\r\n else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n _this._currentPopupIndex = -1;\r\n var popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n popupHtml += \"<span> of </span>\";\r\n popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n popupHtml += \"<span> - </span>\";\r\n popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n popupHtml += '</div>';\r\n _this._$popupContent.html(popupHtml);\r\n _this._$popupContent.find('.previous-popup').click(function () {\r\n if (_this._popupContentLength == 1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == 0) {\r\n _this._currentPopupIndex = _this._popupContentLength - 1;\r\n }\r\n else {\r\n _this._currentPopupIndex--;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n var nextPopup = _this._$popupContent.find('.next-popup');\r\n nextPopup.click(function () {\r\n if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n _this._currentPopupIndex = 0;\r\n }\r\n else {\r\n _this._currentPopupIndex++;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n if (_this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n _this._$popupContent.scrollTop(0);\r\n _this._popupOpen = true;\r\n }\r\n });\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', function (evt) {\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n var hit = false;\r\n _this.map.forEachFeatureAtPixel(pixel, function (f, l) {\r\n if (hit) {\r\n return;\r\n }\r\n for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) {\r\n var vLyr = _a[_i];\r\n if (vLyr.olLayer == l) {\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n var mapElement = _this.map.getTargetElement();\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n };\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n MapPopupCls.prototype._triggerFeatSelect = function () {\r\n var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f(this._$popupContent);\r\n }\r\n };\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n featLayerObject.popupContent = popupContent;\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n };\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n var _this = this;\r\n var layerFeatureObjectArray = [];\r\n this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n var hasLyr = false;\r\n var j;\r\n var lyr = null;\r\n for (j = 0; j < _this._arrPopupLayers.length; j++) {\r\n lyr = _this._arrPopupLayers[j];\r\n if (lyr.olLayer === layer) {\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j]));\r\n }\r\n });\r\n return layerFeatureObjectArray;\r\n };\r\n MapPopupCls.prototype.closePopup = function () {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n return false;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n };\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n this._checkInit();\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n var theStyle;\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n }\r\n else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n var selectionLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n });\r\n selectionLayer.setZIndex(100);\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n return selectionLayer;\r\n };\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n return selectionLayer;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n };\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n return selectionLayer;\r\n };\r\n MapPopupCls.prototype.clearSelection = function () {\r\n this._checkInit();\r\n for (var i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f();\r\n }\r\n };\r\n ;\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n this._mapClickFunctions.push(func);\r\n };\r\n return MapPopupCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapPopupCls = MapPopupCls;\r\nnm.MapPopupCls = MapPopupCls;\r\nexports.default = MapPopupCls;\r\n\n\n/***/ }),\n\n/***/ 14:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar geocode_1 = __webpack_require__(11);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nfunction quickMapBase(options) {\r\n if (options === void 0) { options = {}; }\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || { x: -10018378, y: 5574910 };\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n var $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n var osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqK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rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/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LTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n var coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n var controls = ol.control.defaults({\r\n attributionOptions: { collapsible: false }\r\n });\r\n var view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n var map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n if (options.addGeocode) {\r\n new geocode_1.Geocode(document.getElementById(options.divId), map);\r\n }\r\n return map;\r\n}\r\nexports.quickMapBase = quickMapBase;\r\nnm.quickMapBase = quickMapBase;\r\nexports.default = quickMapBase;\r\n\n\n/***/ }),\n\n/***/ 17:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\nvar _zoomResLookup = [\r\n 156543.03392804097,\r\n 78271.51696402048,\r\n 39135.75848201024,\r\n 19567.87924100512,\r\n 9783.93962050256,\r\n 4891.96981025128,\r\n 2445.98490512564,\r\n 1222.99245256282,\r\n 611.49622628141,\r\n 305.748113140705,\r\n 152.8740565703525,\r\n 76.43702828517625,\r\n 38.21851414258813,\r\n 19.109257071294063,\r\n 9.554628535647032,\r\n 4.777314267823516,\r\n 2.388657133911758,\r\n 1.194328566955879,\r\n 0.5971642834779395,\r\n 0.29858214173896974,\r\n 0.14929107086948487,\r\n 0.07464553543474244,\r\n 0.03732276771737122,\r\n 0.01866138385868561,\r\n 0.009330691929342804,\r\n 0.004665345964671402,\r\n 0.002332672982335701,\r\n 0.0011663364911678506,\r\n 0.0005831682455839253 //28\r\n];\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nfunction zoomToResolution(zoomLevel) {\r\n \"use strict\";\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n }\r\n else {\r\n console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n return undefined;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.zoomToResolution = zoomToResolution;\r\nnm.zoomToResolution = zoomToResolution;\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nfunction resolutionToZoom(resolution) {\r\n for (var i = 0; i < _zoomResLookup.length; i++) {\r\n if (resolution >= _zoomResLookup[i]) {\r\n return i;\r\n }\r\n }\r\n return 0;\r\n}\r\nexports.resolutionToZoom = resolutionToZoom;\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports) {\n\nmodule.exports = ol;\n\n/***/ }),\n\n/***/ 25:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nvar LayerBase_1 = __webpack_require__(10);\r\nvar esriToOl = __webpack_require__(27);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nfunction makeServiceUrl(folder, service) {\r\n return \"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/\" + folder + \"/\" + service + \"/MapServer\";\r\n}\r\nexports.makeServiceUrl = makeServiceUrl;\r\nfunction localCacheUrl(folder, service) {\r\n var loc = window.location.href;\r\n var url = \"/mapserver/\" + folder + \"/\" + service;\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1) {\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1) {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n }\r\n else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url;\r\n }\r\n }\r\n return url;\r\n}\r\nexports.localCacheUrl = localCacheUrl;\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nvar LayerEsriMapServer = (function (_super) {\r\n __extends(LayerEsriMapServer, _super);\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n function LayerEsriMapServer(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, url, options) || this;\r\n _this._source = new ol.source.TileArcGISRest({\r\n url: _this.url == '' ? undefined : _this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') }\r\n });\r\n _this._showLayers = options.showLayers || [];\r\n _this._olLayer = new ol.layer.Tile({\r\n source: _this._source,\r\n visible: _this.visible,\r\n opacity: _this.opacity,\r\n minResolution: _this._minResolution,\r\n maxResolution: _this._maxResolution\r\n });\r\n _this._olLayer.setZIndex(_this._zIndex);\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n _this._esriFormat = new ol.format.EsriJSON();\r\n _this._popupRequest = null;\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n if (options.getLegend) {\r\n _this.addLegendContent();\r\n }\r\n if (options.addPopup) {\r\n mapPopup_1.default.addMapServicePopup(_this);\r\n }\r\n return _this;\r\n }\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) {\r\n var _this = this;\r\n var urlCopy = this.url;\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n $.get(urlCopy, {}, function (d) {\r\n var newHtml = esriToOl.makeMapServiceLegend(d, _this._showLayers);\r\n _super.prototype.addLegendContent.call(_this, newHtml);\r\n }, 'json');\r\n };\r\n LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n var urlCopy = this.url;\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n urlCopy += 'identify?callback=?';\r\n var __this = this;\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (var _i = 0, _a = d['results']; _i < _a.length; _i++) {\r\n var r = _a[_i];\r\n var popupHtml = '<table class=\"esri-popup-table\">';\r\n for (var a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n var attrVal = r['attributes'][a];\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n var attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n popupHtml += \"<tr><td>\" + attr + \"</td><td>\" + attrVal + \"</td></tr>\";\r\n }\r\n }\r\n popupHtml += '</table>';\r\n mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n };\r\n Object.defineProperty(LayerEsriMapServer.prototype, \"source\", {\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get: function () {\r\n return _super.prototype.getSource.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerEsriMapServer.prototype, \"olLayer\", {\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get: function () {\r\n return _super.prototype.getOlLayer.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LayerEsriMapServer;\r\n}(LayerBase_1.LayerBase));\r\nexports.LayerEsriMapServer = LayerEsriMapServer;\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexports.default = LayerEsriMapServer;\r\n\n\n/***/ }),\n\n/***/ 27:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar nm = provide_1.default('olHelpers.esriToOlStyle');\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray, opacity) {\r\n \"use strict\";\r\n return \"rgba(\" + colorArray[0] + \",\" + colorArray[1] + \",\" + colorArray[2] + \",\" + opacity + \")\";\r\n}\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str) {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\nnm.htmlEscape = htmlEscape;\r\nvar CommonSymbol = (function () {\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n function CommonSymbol(symbolObj, opacity) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n return CommonSymbol;\r\n}());\r\nvar PointSymbol = (function (_super) {\r\n __extends(PointSymbol, _super);\r\n function PointSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj.type) {\r\n case 'esriSMS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n var outlineWidth = _this.symbolObj.outline.width;\r\n var radius = _this.symbolObj.size;\r\n _this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth })\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" style=\\\"color: \" + innerColor + \"\\\">●</span>\";\r\n break;\r\n case 'esriPMS':\r\n _this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({ src: \"data:image/png;base64,\" + _this.symbolObj['imageData'] })\r\n });\r\n _this.legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + _this.symbolObj['imageData'] + \"\\\">\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return PointSymbol;\r\n}(CommonSymbol));\r\nvar LineSymbol = (function (_super) {\r\n __extends(LineSymbol, _super);\r\n function LineSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj.type) {\r\n case 'esriSLS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var lineWidth = _this.symbolObj.width;\r\n _this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n _this.legendHtml += \"style=\\\"\";\r\n _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n _this.legendHtml += \"width: 40px;\";\r\n _this.legendHtml += \"height: 4px;\";\r\n _this.legendHtml += \"position: relative;\";\r\n _this.legendHtml += \"display: inline-block;\";\r\n _this.legendHtml += \"top: -1px;\";\r\n _this.legendHtml += \"\\\"></span>\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return LineSymbol;\r\n}(CommonSymbol));\r\nvar PolygonSymbol = (function (_super) {\r\n __extends(PolygonSymbol, _super);\r\n function PolygonSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj['type']) {\r\n case 'esriSFS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n var outlineWidth = _this.symbolObj.outline.width;\r\n _this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n _this.legendHtml += \"style=\\\"\";\r\n _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n _this.legendHtml += \"border: solid \" + outerColor + \" 1px;\";\r\n _this.legendHtml += \"width: 40px;\";\r\n _this.legendHtml += \"height: 9px;\";\r\n _this.legendHtml += \"position: relative;\";\r\n _this.legendHtml += \"display: inline-block;\";\r\n _this.legendHtml += \"top: 2px;\";\r\n _this.legendHtml += \"\\\"></span>\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return PolygonSymbol;\r\n}(CommonSymbol));\r\nvar SymbolGenerator = (function () {\r\n function SymbolGenerator(esriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n return SymbolGenerator;\r\n}());\r\nvar SingleSymbol = (function (_super) {\r\n __extends(SingleSymbol, _super);\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n function SingleSymbol(esriResponse, SymbolClass) {\r\n var _this = _super.call(this, esriResponse) || this;\r\n _this.symbol = _this.renderer.symbol;\r\n var symbolObj = new SymbolClass(_this.symbol, _this.opacity);\r\n _this.olStyle = symbolObj.olStyle;\r\n _this.legendHtml = symbolObj.legendHtml;\r\n return _this;\r\n }\r\n return SingleSymbol;\r\n}(SymbolGenerator));\r\nvar UniqueValueSymbol = (function (_super) {\r\n __extends(UniqueValueSymbol, _super);\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n function UniqueValueSymbol(esriResponse, SymbolClass) {\r\n var _this = _super.call(this, esriResponse) || this;\r\n _this.uniqueValueInfos = _this.renderer.uniqueValueInfos;\r\n _this.propertyName = _this.renderer.field1;\r\n _this.defaultSymbol = _this.renderer.defaultSymbol;\r\n if (_this.defaultSymbol) {\r\n var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity);\r\n _this.defaultStyle = symbolObj.olStyle;\r\n _this.defaultLabelHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(_this.renderer['defaultLabel']) + \"</span>\" + symbolObj.legendHtml;\r\n }\r\n else {\r\n _this.defaultStyle = undefined;\r\n _this.defaultLabelHtml = 'other';\r\n }\r\n _this.valueArray = [];\r\n _this.labelArray = [];\r\n _this.legendArray = [];\r\n _this.propertyStyleLookup = {};\r\n for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) {\r\n var uniqueVal = _a[_i];\r\n _this.labelArray.push(uniqueVal['label']);\r\n _this.valueArray.push(uniqueVal['value']);\r\n var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity);\r\n _this.legendArray.push(\"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(uniqueVal['label']) + \"</span>\" + uniqueSym.legendHtml);\r\n _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n _this.olStyle = function (feature) {\r\n var checkProperties = feature.getProperties();\r\n var checkProperty = checkProperties[_this.propertyName];\r\n if (_this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [_this.propertyStyleLookup[checkProperty]];\r\n }\r\n else {\r\n return [_this.defaultStyle];\r\n }\r\n };\r\n if (_this.defaultLabelHtml !== null) {\r\n _this.legendArray.push(_this.defaultLabelHtml);\r\n }\r\n _this.legendHtml = '<ul>';\r\n for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) {\r\n var h = _c[_b];\r\n _this.legendHtml += \"<li>\" + h + \"</li>\";\r\n }\r\n _this.legendHtml += '</ul>';\r\n return _this;\r\n }\r\n return UniqueValueSymbol;\r\n}(SymbolGenerator));\r\nfunction makeFeatureServiceLegendAndSymbol(esriResponse) {\r\n \"use strict\";\r\n var renderer = esriResponse.drawingInfo.renderer;\r\n var symbolLegendOut = null;\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n if (symbolLegendOut == null) {\r\n return { style: undefined, legend: '' };\r\n }\r\n else {\r\n return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml };\r\n }\r\n}\r\nexports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) {\r\n if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; }\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n var layerName = lyrObject['layerName'];\r\n var legendItems = lyrObject['legend'];\r\n var legendHtml = '';\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\";\r\n }\r\n if (legendItems.length == 1) {\r\n legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[0]['imageData'] + \"\\\">\";\r\n }\r\n else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (var i = 0; i < legendItems.length; i++) {\r\n legendHtml += \"<li>\";\r\n legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(legendItems[i]['label']) + \"</span>\";\r\n legendHtml += \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[i]['imageData'] + \"\\\">\";\r\n legendHtml += \"</li>\";\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\" + legendHtml;\r\n }\r\n return legendHtml;\r\n}\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nfunction makeMapServiceLegend(esriResponse, showLayers) {\r\n \"use strict\";\r\n if (showLayers === void 0) { showLayers = []; }\r\n var newLegendHtml = '';\r\n var layers = esriResponse['layers'];\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n }\r\n else {\r\n newLegendHtml += '<ul>';\r\n for (var i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0) {\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n return newLegendHtml;\r\n}\r\nexports.makeMapServiceLegend = makeMapServiceLegend;\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapPopupCls_1 = __webpack_require__(13);\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexports.mapPopup = new mapPopupCls_1.default();\r\nexports.default = exports.mapPopup;\r\n\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * base interaction\r\n */\r\nvar MapInteractionBase = (function () {\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n function MapInteractionBase(subtype) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n MapInteractionBase.prototype.init = function (theMap) {\r\n if (!this._initialized) {\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n };\r\n Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get: function () {\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get: function () {\r\n return this._initialized;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n MapInteractionBase.prototype._checkInit = function () {\r\n if (!this.initialized) {\r\n var msg = this._subtype + \" object not initialized\";\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n };\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n MapInteractionBase.prototype.checkInit = function () {\r\n this._checkInit();\r\n };\r\n return MapInteractionBase;\r\n}());\r\nexports.MapInteractionBase = MapInteractionBase;\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexports.default = MapInteractionBase;\r\n\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMapBase_1 = __webpack_require__(14);\r\nvar provide_1 = __webpack_require__(0);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nfunction quickMap(options) {\r\n if (options === void 0) { options = {}; }\r\n var m = quickMapBase_1.quickMapBase(options);\r\n mapMove_1.default.init(m);\r\n mapPopup_1.default.init(m);\r\n return m;\r\n}\r\nexports.quickMap = quickMap;\r\nnm.quickMap = quickMap;\r\nexports.default = quickMap;\r\n\n\n/***/ }),\n\n/***/ 60:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('collections.layerSwipe');\r\nvar LayerSwipe = (function () {\r\n /**\r\n *\r\n * @param {ol.Map} map - the map\r\n * @param {string} [sliderContent=''] - additional html to be added inside the slider div\r\n */\r\n function LayerSwipe(map, sliderContent) {\r\n if (sliderContent === void 0) { sliderContent = ''; }\r\n var _this = this;\r\n sliderContent = sliderContent || '';\r\n /**\r\n *\r\n * @type {Array<LayerBase>}\r\n */\r\n this.leftLayers = [];\r\n /**\r\n *\r\n * @type {Array<LayerBase>}\r\n */\r\n this.rightLayers = [];\r\n this._percentRight = 50;\r\n this.offset = null;\r\n this._map = map;\r\n this.$mapElement = $(map.getTargetElement());\r\n this.$mapElement.append(\"<div class=\\\"layer-swiper\\\">\" + sliderContent + \"</div>\");\r\n this.$swiper = this.$mapElement.find('.layer-swiper');\r\n this.percentRight = this.percentRight;\r\n this.dragging = false;\r\n this.$mapElement.mouseleave(function () {\r\n _this.dragging = false;\r\n });\r\n this.$swiper.bind('mousewheel DOMMouseScroll', function (evt) {\r\n evt.preventDefault();\r\n });\r\n this.$swiper.mousedown(function (evt) {\r\n _this.dragging = true;\r\n _this.offset = evt.offsetX;\r\n });\r\n $(window).mouseup(function () {\r\n _this.dragging = false;\r\n });\r\n this.$mapElement.mousemove(function (evt) {\r\n if (_this.dragging) {\r\n var mapLeft = _this.$mapElement.position().left;\r\n var mapWidth = _this.$mapElement.width();\r\n _this.percentRight = 100 * (evt.pageX - _this.offset - mapLeft) / mapWidth;\r\n }\r\n });\r\n }\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - layer to be added to left side\r\n */\r\n LayerSwipe.prototype.addLeftLayer = function (lyr) {\r\n var _this = this;\r\n if (this.leftLayers.indexOf(lyr) != -1) {\r\n return;\r\n }\r\n lyr.olLayer.on('precompose', function (event) {\r\n var ctx = event['context'];\r\n var width = ctx.canvas.width * (_this.percentRight / 100);\r\n ctx.save();\r\n ctx.beginPath();\r\n ctx.rect(0, 0, width, ctx.canvas.height);\r\n ctx.clip();\r\n });\r\n lyr.olLayer.on('postcompose', function (event) {\r\n var ctx = event['context'];\r\n ctx.restore();\r\n });\r\n this.leftLayers.push(lyr);\r\n };\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - layer to be added to right side\r\n */\r\n LayerSwipe.prototype.addRightLayer = function (lyr) {\r\n var _this = this;\r\n if (this.rightLayers.indexOf(lyr) != -1) {\r\n return;\r\n }\r\n lyr.olLayer.on('precompose', function (event) {\r\n var ctx = event['context'];\r\n var width = ctx.canvas.width * (_this.percentRight / 100);\r\n ctx.save();\r\n ctx.beginPath();\r\n ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height);\r\n ctx.clip();\r\n });\r\n lyr.olLayer.on('postcompose', function (event) {\r\n var ctx = event['context'];\r\n ctx.restore();\r\n });\r\n this.rightLayers.push(lyr);\r\n };\r\n Object.defineProperty(LayerSwipe.prototype, \"percentRight\", {\r\n get: function () {\r\n return this._percentRight;\r\n },\r\n set: function (percent) {\r\n var maxed = this.$swiper.position().left + this.$swiper.width() > this.$mapElement.width();\r\n if (percent < 0) {\r\n return;\r\n }\r\n else if (maxed && percent > this.percentRight) {\r\n return;\r\n }\r\n this._percentRight = percent;\r\n this.$swiper.css('left', this._percentRight.toFixed(2) + \"%\");\r\n this._map.render();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LayerSwipe;\r\n}());\r\nnm.LayerSwipe = LayerSwipe;\r\nexports.default = LayerSwipe;\r\n\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapMoveCls_1 = __webpack_require__(12);\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\nexports.mapMove = new mapMoveCls_1.default();\r\nexports.default = exports.mapMove;\r\n\n\n/***/ }),\n\n/***/ 70:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\nvar quickMap_1 = __webpack_require__(6);\r\nvar layerSwipe_1 = __webpack_require__(60);\r\nvar LayerEsriMapServer_1 = __webpack_require__(25);\r\nvar map = quickMap_1.quickMap();\r\nvar swiper = new layerSwipe_1.default(map);\r\nvar wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer', {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions'\r\n});\r\nvar metamanagerSegments = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer', {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'Metamanager Segments'\r\n});\r\nvar truckSpeed2014 = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2014',\r\n showLayers: [8]\r\n});\r\nvar truckSpeed2015 = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2015',\r\n showLayers: [9]\r\n});\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(truckSpeed2014.olLayer);\r\nmap.addLayer(truckSpeed2015.olLayer);\r\nmap.addLayer(metamanagerSegments.olLayer);\r\nswiper.addLeftLayer(wisDotRegions);\r\nswiper.addRightLayer(metamanagerSegments);\r\nswiper.addLeftLayer(truckSpeed2014);\r\nswiper.addRightLayer(truckSpeed2015);\r\nsetTimeout(function () {\r\n}, 5000);\r\n\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nvar ol = __webpack_require__(2);\r\nexports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' });\r\nexports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' });\r\nexports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' });\r\n\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util.checkDefined');\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nfunction undefinedOrNull(input) {\r\n \"use strict\";\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\nexports.undefinedOrNull = undefinedOrNull;\r\nnm.undefinedOrNull = undefinedOrNull;\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nfunction definedAndNotNull(input) {\r\n \"use strict\";\r\n return !(undefinedOrNull(input));\r\n}\r\nexports.definedAndNotNull = definedAndNotNull;\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// compare-test.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 70);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 99693f14fcb3e83c98ca","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (f, l) => {\r\n if (hit) {\r\n return;\r\n }\r\n\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == l){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3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//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw4scxNysnHxU7nSspTRcJjCZGL3IsjsYJMMg5mwgx7gaIOLBFCogAgBBoNa9w+DE6I+Bs7FTgwwrJbHjWDgpYo2KwtBTcYEDuloC9geQw+k2RGnPGpTaOlq7AS+YICUz4DZVaX2TiNDhuYfTtY4geLi0IoCm3XccwM9hx4kU28StQEljDs3ZEpFGA+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ZDgUREwYUGAYZFQYZGgkTFQoVGQsZFAwZHBMeDhIbFBEbHAwWIA4bIREcIQ4hCQwjFw4lHBgkDB8sDxUiExIiGhAoGxohFRshGRorHQcrKQsiIQwmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHjKTHPPBo8CSJISqqq4wGGOcWylIGlgvgNX1Gd8vF5f+IUIwb30ng+Gg2QfBRIMvy0jG8SVkYo4N0zvUXVRztbJ/L6xL7lUZEXBEHkuZqlS6gEAUgKJurnhFtfpACOYd8b/hVbJPqwi44a6KA0sPVjIi/SIyxb3u8KlAJ0S8jRVgrlW+nVHPdrhiXCxu42d86ByksDc80P3MkJFBFQ8Ho1lQegpWJRWFGsDsRwwv7pIyvuQW0ZkrX6NDVFbqcvaQI8vbyqzt5AARrsbKx5yhQEGs+wPO56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iP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer`\r\n}\r\n\r\nexport function localCacheUrl(folder: string, service: string): string{\r\n let loc = window.location.href;\r\n\r\n let url = `/mapserver/${folder}/${service}`;\r\n\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1){\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1){\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n } else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url\r\n }\r\n }\r\n\r\n\r\n return url;\r\n}\r\n\r\n\r\n\r\n\r\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n addPopup?: boolean;\r\n showLayers?: Array<number>;\r\n getLegend?: boolean;\r\n}\r\n\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nexport class LayerEsriMapServer extends LayerBase {\r\n _esriFormat: ol.format.EsriJSON;\r\n _popupRequest: JQueryXHR;\r\n _showLayers: number[];\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n constructor(url: string, options: LayerEsriMapServerOptions = {}) {\r\n\r\n super(url, options);\r\n this._source = new ol.source.TileArcGISRest(\r\n {\r\n url: this.url == '' ? undefined : this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : {layers: 'show:' + options.showLayers.join(',')}\r\n }\r\n );\r\n\r\n this._showLayers = options.showLayers || [];\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.Tile,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n });\r\n\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\r\n this._esriFormat = new ol.format.EsriJSON();\r\n this._popupRequest = null;\r\n\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n\r\n if (options.getLegend){\r\n this.addLegendContent();\r\n }\r\n\r\n if (options.addPopup) {\r\n mapPopup.addMapServicePopup(this);\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n\r\n $.get(urlCopy, {}, (d) => {\r\n let newHtml = esriToOl.makeMapServiceLegend(d, this._showLayers);\r\n super.addLegendContent(newHtml);\r\n }, 'json');\r\n }\r\n\r\n\r\n getPopupInfo(queryParams: {[s: string]: any}) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'identify?callback=?';\r\n\r\n let __this = this;\r\n\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n\r\n\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (let r of d['results']) {\r\n\r\n let popupHtml = '<table class=\"esri-popup-table\">';\r\n\r\n for (let a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n let attrVal = r['attributes'][a];\r\n\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n\r\n let attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n\r\n popupHtml += `<tr><td>${attr}</td><td>${attrVal}</td></tr>`;\r\n }\r\n }\r\n\r\n popupHtml += '</table>';\r\n\r\n mapPopup.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get source(): ol.source.TileArcGISRest {\r\n return super.getSource() as ol.source.TileArcGISRest;\r\n }\r\n\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get olLayer(): ol.layer.Tile {\r\n return super.getOlLayer() as ol.layer.Tile;\r\n }\r\n}\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexport default LayerEsriMapServer;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerEsriMapServer.ts","/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers.esriToOlStyle');\r\n\r\n\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray: [number, number, number], opacity: number): string {\r\n \"use strict\";\r\n\r\n return `rgba(${colorArray[0]},${colorArray[1]},${colorArray[2]},${opacity})`;\r\n}\r\n\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str: string): string {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface iEsriResponse{\r\n drawingInfo: {\r\n renderer: iEsriRenderer;\r\n transparency: number\r\n },\r\n geometryType: string\r\n}\r\n\r\n\r\nexport interface iEsriRenderer{\r\n type: string;\r\n symbol: iEsriSymbol;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n field1: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultLabel: string;\r\n}\r\n\r\nexport interface iEsriSymbol{\r\n size: number;\r\n type: string;\r\n outline:{\r\n color: [number, number, number];\r\n width: number;\r\n },\r\n color: [number, number, number];\r\n width: number;\r\n imageData: string\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n legendHtml: string;\r\n opacity: number;\r\n symbolObj: iEsriSymbol;\r\n olStyle: ol.style.Style;\r\n\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\ninterface ICommonSymbol{\r\n new (symbolObj: iEsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSMS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n let radius = this.symbolObj.size;\r\n\r\n\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({color: outerColor, width: outlineWidth})\r\n })\r\n });\r\n this.legendHtml = `<span class=\"legend-layer-icon\" style=\"color: ${innerColor}\">●</span>`;\r\n break;\r\n case 'esriPMS':\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({src: `data:image/png;base64,${this.symbolObj['imageData']}`})\r\n });\r\n this.legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${this.symbolObj['imageData']}\">`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass LineSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSLS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let lineWidth = this.symbolObj.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 4px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: -1px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass PolygonSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj['type']) {\r\n case 'esriSFS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `border: solid ${outerColor} 1px;`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 9px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: 2px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nexport interface iStyleFunc{\r\n (f: ol.Feature): ol.style.Style| ol.style.Style[]\r\n}\r\n\r\nclass SymbolGenerator {\r\n opacity: number;\r\n renderer: iEsriRenderer;\r\n legendHtml: string;\r\n olStyle: iStyleFunc | ol.style.Style;\r\n\r\n constructor(esriResponse: iEsriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n symbol: iEsriSymbol;\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.symbol = this.renderer.symbol;\r\n let symbolObj = new SymbolClass(this.symbol, this.opacity);\r\n this.olStyle = symbolObj.olStyle;\r\n this.legendHtml = symbolObj.legendHtml;\r\n }\r\n}\r\n\r\nclass UniqueValueSymbol extends SymbolGenerator {\r\n\r\n propertyName: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultStyle: ol.style.Style;\r\n defaultLabelHtml: string;\r\n labelArray: Array<string>;\r\n legendArray: Array<string>;\r\n propertyStyleLookup: {[s: string]: ol.style.Style};\r\n valueArray: Array<any>;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.uniqueValueInfos = this.renderer.uniqueValueInfos;\r\n this.propertyName = this.renderer.field1;\r\n this.defaultSymbol = this.renderer.defaultSymbol;\r\n\r\n\r\n if (this.defaultSymbol) {\r\n let symbolObj = new SymbolClass(this.defaultSymbol, this.opacity);\r\n this.defaultStyle = symbolObj.olStyle;\r\n this.defaultLabelHtml = `<span class=\"legend-layer-subitem\">${htmlEscape(this.renderer['defaultLabel'])}</span>` + symbolObj.legendHtml;\r\n } else {\r\n this.defaultStyle = undefined;\r\n this.defaultLabelHtml = 'other';\r\n }\r\n\r\n this.valueArray = [];\r\n this.labelArray = [];\r\n this.legendArray = [];\r\n this.propertyStyleLookup = {};\r\n\r\n for (let uniqueVal of this.uniqueValueInfos) {\r\n this.labelArray.push(uniqueVal['label']);\r\n this.valueArray.push(uniqueVal['value']);\r\n let uniqueSym = new SymbolClass(uniqueVal.symbol, this.opacity);\r\n this.legendArray.push(`<span class=\"legend-layer-subitem\">${htmlEscape(uniqueVal['label'])}</span>` + uniqueSym.legendHtml);\r\n this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n\r\n this.olStyle = (feature: ol.Feature): ol.style.Style[] => {\r\n let checkProperties = feature.getProperties();\r\n let checkProperty = checkProperties[this.propertyName];\r\n\r\n if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [this.propertyStyleLookup[checkProperty]];\r\n } else {\r\n return [this.defaultStyle];\r\n }\r\n };\r\n\r\n if (this.defaultLabelHtml !== null) {\r\n this.legendArray.push(this.defaultLabelHtml);\r\n }\r\n\r\n this.legendHtml = '<ul>';\r\n for (let h of this.legendArray) {\r\n this.legendHtml += `<li>${h}</li>`;\r\n }\r\n this.legendHtml += '</ul>';\r\n }\r\n}\r\n\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: iEsriResponse): {style: iStyleFunc | ol.style.Style, legend: string} {\r\n \"use strict\";\r\n let renderer = esriResponse.drawingInfo.renderer;\r\n let symbolLegendOut: SymbolGenerator = null;\r\n\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n\r\n if (symbolLegendOut == null) {\r\n return {style: undefined, legend: ''};\r\n } else {\r\n return {style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml};\r\n }\r\n}\r\n\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\r\n\r\nexport interface iMapServiceLegend{\r\n layerName: string;\r\n legend: {label: string, imageData: string}[]\r\n}\r\n\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject: iMapServiceLegend, skipLayerNameAndExpander: boolean = false) {\r\n\r\n\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n let layerName = lyrObject['layerName'];\r\n let legendItems = lyrObject['legend'];\r\n let legendHtml = '';\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += `<span class=\"legend-layer-subitem\">${layerName}</span>`;\r\n }\r\n\r\n if (legendItems.length == 1) {\r\n legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[0]['imageData']}\">`;\r\n } else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (let i = 0; i < legendItems.length; i++) {\r\n legendHtml += `<li>`;\r\n legendHtml += `<span class=\"legend-layer-subitem\">${htmlEscape(legendItems[i]['label'])}</span>`;\r\n legendHtml += `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[i]['imageData']}\">`;\r\n legendHtml += `</li>`;\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = `<span class=\"legend-layer-subitem\">${layerName}</span>` + legendHtml;\r\n }\r\n\r\n return legendHtml;\r\n}\r\n\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse: {layers: iMapServiceLegend[]}, showLayers: number[] = []) {\r\n \"use strict\";\r\n\r\n let newLegendHtml = '';\r\n\r\n let layers = esriResponse['layers'];\r\n\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n } else {\r\n newLegendHtml += '<ul>';\r\n for (let i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0){\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n\r\n return newLegendHtml;\r\n}\r\n\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/esriToOlStyle.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\n\r\n\r\nimport provide from '../util/provide';\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('collections.layerSwipe');\r\n\r\n\r\nclass LayerSwipe {\r\n leftLayers: Array<LayerBase>;\r\n rightLayers: Array<LayerBase>;\r\n _percentRight: number;\r\n _map: ol.Map;\r\n $mapElement: JQuery;\r\n $swiper: JQuery;\r\n dragging: boolean;\r\n offset: number;\r\n /**\r\n *\r\n * @param {ol.Map} map - the map\r\n * @param {string} [sliderContent=''] - additional html to be added inside the slider div\r\n */\r\n constructor(map: ol.Map, sliderContent: string = '') {\r\n\r\n sliderContent = sliderContent || '';\r\n /**\r\n *\r\n * @type {Array<LayerBase>}\r\n */\r\n this.leftLayers = [];\r\n\r\n /**\r\n *\r\n * @type {Array<LayerBase>}\r\n */\r\n this.rightLayers = [];\r\n\r\n this._percentRight = 50;\r\n this.offset = null;\r\n\r\n this._map = map;\r\n this.$mapElement = $(map.getTargetElement());\r\n this.$mapElement.append(`<div class=\"layer-swiper\">${sliderContent}</div>`);\r\n\r\n\r\n this.$swiper = this.$mapElement.find('.layer-swiper');\r\n this.percentRight = this.percentRight;\r\n\r\n this.dragging = false;\r\n\r\n this.$mapElement.mouseleave(() => {\r\n this.dragging = false;\r\n });\r\n\r\n this.$swiper.bind('mousewheel DOMMouseScroll', function(evt){\r\n evt.preventDefault();\r\n });\r\n\r\n this.$swiper.mousedown((evt) => {\r\n this.dragging = true;\r\n this.offset = evt.offsetX;\r\n });\r\n\r\n $(window).mouseup(() => {\r\n this.dragging = false;\r\n });\r\n\r\n this.$mapElement.mousemove((evt) => {\r\n if (this.dragging) {\r\n let mapLeft = this.$mapElement.position().left;\r\n let mapWidth = this.$mapElement.width();\r\n\r\n this.percentRight = 100 * (evt.pageX - this.offset - mapLeft) / mapWidth;\r\n }\r\n });\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - layer to be added to left side\r\n */\r\n addLeftLayer(lyr: LayerBase) {\r\n\r\n if (this.leftLayers.indexOf(lyr) != -1){\r\n return;\r\n }\r\n\r\n lyr.olLayer.on('precompose', (event: {context: CanvasRenderingContext2D}) => {\r\n let ctx = event['context'];\r\n let width = ctx.canvas.width * (this.percentRight / 100);\r\n\r\n ctx.save();\r\n ctx.beginPath();\r\n ctx.rect(0, 0, width, ctx.canvas.height);\r\n ctx.clip();\r\n });\r\n\r\n lyr.olLayer.on('postcompose', function (event: {context: CanvasRenderingContext2D}) {\r\n let ctx = event['context'];\r\n ctx.restore();\r\n });\r\n\r\n\r\n this.leftLayers.push(lyr);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - layer to be added to right side\r\n */\r\n addRightLayer(lyr: LayerBase) {\r\n\r\n if (this.rightLayers.indexOf(lyr) != -1){\r\n return;\r\n }\r\n\r\n lyr.olLayer.on('precompose', (event: {context: CanvasRenderingContext2D}) => {\r\n let ctx = event['context'];\r\n let width = ctx.canvas.width * (this.percentRight / 100);\r\n\r\n ctx.save();\r\n ctx.beginPath();\r\n ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height);\r\n ctx.clip();\r\n });\r\n\r\n lyr.olLayer.on('postcompose', function (event: {context: CanvasRenderingContext2D}) {\r\n let ctx = event['context'];\r\n ctx.restore();\r\n });\r\n\r\n this.rightLayers.push(lyr);\r\n }\r\n\r\n get percentRight() : number{\r\n return this._percentRight;\r\n }\r\n\r\n set percentRight(percent: number) {\r\n let maxed = this.$swiper.position().left + this.$swiper.width() > this.$mapElement.width();\r\n\r\n if (percent < 0) {\r\n return;\r\n } else if (maxed && percent > this.percentRight) {\r\n return;\r\n }\r\n\r\n this._percentRight = percent;\r\n this.$swiper.css('left', `${this._percentRight.toFixed(2)}%`);\r\n this._map.render();\r\n }\r\n}\r\n\r\nnm.LayerSwipe = LayerSwipe;\r\nexport default LayerSwipe;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/layerSwipe.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 6/1/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport LayerSwipe from '../../olHelpers/layerSwipe';\r\nimport {LayerEsriMapServer} from '../../layers/LayerEsriMapServer';\r\n\r\nlet map = quickMap();\r\n\r\n\r\nlet swiper = new LayerSwipe(map);\r\n\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions'\r\n });\r\n\r\nlet metamanagerSegments = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'Metamanager Segments'\r\n });\r\n\r\nlet truckSpeed2014 = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2014',\r\n showLayers: [8]\r\n });\r\n\r\nlet truckSpeed2015 = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer',\r\n {\r\n minZoom: 7,\r\n visible: true,\r\n name: 'truck2015',\r\n showLayers: [9]\r\n });\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(truckSpeed2014.olLayer);\r\nmap.addLayer(truckSpeed2015.olLayer);\r\nmap.addLayer(metamanagerSegments.olLayer);\r\n\r\n\r\nswiper.addLeftLayer(wisDotRegions);\r\nswiper.addRightLayer(metamanagerSegments);\r\n\r\nswiper.addLeftLayer(truckSpeed2014);\r\nswiper.addRightLayer(truckSpeed2015);\r\n\r\nsetTimeout(() => {\r\n\r\n}, 5000);\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/compare-test.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/geocode.js b/test/serve/js/geocode.js index 8836dfadc65cbe8b27b65f8eab7fe9132530b13c..68e54c72dc8537f2ae7d349d354275d2ac1c3daf 100644 --- a/test/serve/js/geocode.js +++ b/test/serve/js/geocode.js @@ -1,1418 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 72); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), - -/***/ 11: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var $ = __webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var ol = __webpack_require__(2); -var projections_1 = __webpack_require__(8); -var invalidClass = 'geocoder-invalid'; -var geocoderLoadingClass = 'geocoder-loading'; -// let testAddress = '65 7th Street, Prairie du Sac, WI'; -var Geocode = (function () { - function Geocode(mapDiv, map) { - var _this = this; - var inputGuid = makeGuid_1.makeGuid(); - var buttonGuid = makeGuid_1.makeGuid(); - this.map = map; - this.indicationLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: new ol.style.Style({ - image: new ol.style.Circle({ - radius: 12, - fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }), - stroke: new ol.style.Stroke({ color: 'red', width: 1 }) - }) - }) - }); - this.map.addLayer(this.indicationLayer); - $(mapDiv).append('<div class="geocoder-el">' + - ("<input type=\"text\" id=\"" + inputGuid + "\">") + - ("<button id=\"" + buttonGuid + "\">Search</button>") + - '</div>'); - this.theButton = document.getElementById(buttonGuid); - this.theInput = document.getElementById(inputGuid); - this.reset(); - var $theButton = $(this.theButton); - var $theInput = $(this.theInput); - $theButton.click(function (evt) { - evt.preventDefault(); - $theButton.addClass(geocoderLoadingClass); - _this.theButton.disabled = true; - _this.indicationLayer.getSource().clear(); - $.get("https://geocode.xyz/" + _this.theInput.value + "?geoit=json", {}, function (d) { - var lat = parseFloat(d['latt']); - var lon = parseFloat(d['longt']); - if ((lat == 0 && lon == 0) || d['error']) { - $theInput.addClass(invalidClass); - _this.theInput.title = 'Specified Location Invalid'; - _this.theButton.title = 'Specified Location Invalid'; - } - else { - var v = _this.map.getView(); - var p = new ol.geom.Point([lon, lat]); - var feat = new ol.Feature(p); - _this.indicationLayer.getSource().addFeature(feat); - p.transform(projections_1.proj4326, projections_1.proj3857); - v.setCenter(p.getCoordinates()); - v.setZoom(13); - } - $theButton.removeClass(geocoderLoadingClass); - _this.theButton.disabled = false; - }, 'json'); - }); - $(this.theInput).keyup(function (evt) { - evt.preventDefault(); - _this.theButton.disabled = _this.theInput.value.length == 0; - $theInput.removeClass(invalidClass); - _this.theInput.title = ''; - _this.theButton.title = ''; - if (!_this.theButton.disabled && evt.keyCode == 13) { - $theButton.click(); - } - }); - } - Geocode.prototype.reset = function () { - this.theButton.disabled = true; - this.theInput.value = ''; - }; - return Geocode; -}()); -exports.Geocode = Geocode; - - -/***/ }), - -/***/ 12: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var checkDefined = __webpack_require__(9); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -/** - * assists with map move interactions, trigger callback functions - * @augments MapInteractionBase - */ -var MapMoveCls = (function (_super) { - __extends(MapMoveCls, _super); - /** - * constructor called implicitly - */ - function MapMoveCls() { - var _this = _super.call(this, 'map move') || this; - _this._arrLyrRequest = []; - _this._arrLyrTimeout = []; - _this._arrLayer = []; - _this._lookupLayer = {}; - _this._mapMoveCallbacks = []; - _this._mapMoveCallbacksLookup = {}; - _this._mapMoveCallbackDelays = []; - _this._mapMoveCallbackContext = []; - _this._mapMoveCallbackTimeout = []; - _this._mapExtent = undefined; - _this._zoomLevel = undefined; - return _this; - } - /** - * initialize the map move object - * @param theMap - the ol map - */ - MapMoveCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - this.map.getView().on(['change:center', 'change:resolution'], function (e) { - _this._updateMapExtent(); - // trigger the layer updates - for (var i = 0; i < _this._arrLayer.length; i++) { - _this.triggerLyrLoad(_this._arrLayer[i], i, e.type); - } - // trigger the map callbacks - for (var i = 0; i < _this._mapMoveCallbacks.length; i++) { - _this.triggerMoveCallback(i, e.type); - } - }); - }; - MapMoveCls.prototype._updateMapExtent = function () { - var theView = this.map.getView(); - this._zoomLevel = theView.getZoom(); - var extentArray = theView.calculateExtent(this.map.getSize()); - this._mapExtent = { - minX: extentArray[0], - minY: extentArray[1], - maxX: extentArray[2], - maxY: extentArray[3] - }; - }; - Object.defineProperty(MapMoveCls.prototype, "mapExtent", { - /** - * return the map extent - */ - get: function () { - if (!this._mapExtent) { - this._updateMapExtent(); - } - return this._mapExtent; - }, - enumerable: true, - configurable: true - }); - /** - * Trigger the layer load - * @param lyr the layer being acted on - * @param index index of the layer - * @param eventType the event triggering the load, as 'change:center' or 'change:resolution' - */ - MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) { - if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) { - throw 'need to define lyr or index'; - } - else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) { - index = this._arrLayer.indexOf(lyr); - } - else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) { - lyr = this._arrLayer[index]; - } - // clear the timeout - if (this._arrLyrTimeout[index] != null) { - clearTimeout(this._arrLyrTimeout[index]); - this._arrLyrTimeout[index] = null; - } - // abort if necessary and clear the request - if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) { - this._arrLyrRequest[index].abort(); - this._arrLyrRequest[index] = null; - } - // dummy callback used if before load returns false - var callbackFunc = function () { }; - if (lyr.mapMoveBefore(this._zoomLevel, eventType)) { - lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel); - var __this_1 = this; - callbackFunc = function () { - function innerFunction(theLayer, theIndex) { - var _innerThis = this; - this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) { - /** - * @type {LayerBaseVector} - */ - theLayer.mapMoveCallback(d); - theLayer.loadCallback(); - }, 'json').fail(function (jqXHR) { - if (jqXHR.statusText != 'abort') { - console.log('failed'); - console.log(theLayer.url); - console.log(theLayer.mapMoveParams); - } - }).always(function () { - _innerThis._arrLyrTimeout[theIndex] = null; - _innerThis._arrLyrRequest[theIndex] = null; - }); - } - innerFunction.call(__this_1, lyr, index); - }; - } - else { - lyr.clear(); - } - this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay); - }; - /** - * trigger the map move call back at the given index - * @param ind - the index of the layer - * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution' - * @param functionId=undefined the function id used to reference the added callback function - */ - MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) { - if (typeof ind == 'undefined' && typeof functionId == 'undefined') { - throw 'either the function index or the id must be defined'; - } - if (typeof ind !== 'number') { - ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]); - } - if (ind < 0) { - console.log('function not found'); - return; - } - // clear the timeout - if (this._mapMoveCallbackTimeout[ind] != null) { - clearTimeout(this._mapMoveCallbackTimeout[ind]); - this._mapMoveCallbackTimeout[ind] = null; - } - var ctx = this._mapMoveCallbackContext[ind]; - var theFunc = this._mapMoveCallbacks[ind]; - var __this = this; - var f = function () { - if (ctx !== null) { - theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType); - } - else { - theFunc(__this._mapExtent, __this._zoomLevel, eventType); - } - }; - this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]); - }; - /** - * Add a layer to the interaction - * @param lyr - layer to add - * @param triggerOnAdd - if the layer should be loaded on add - */ - MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) { - if (triggerOnAdd === void 0) { triggerOnAdd = true; } - if (this._arrLayer.indexOf(lyr) > -1) { - console.log('already added ' + lyr.name + ' to map move'); - return; - } - this._checkInit(); - this._arrLyrRequest.push(null); - this._arrLyrTimeout.push(null); - this._arrLayer.push(lyr); - this._lookupLayer[lyr.id] = lyr; - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerLyrLoad(lyr, this._arrLayer.length - 1); - } - }; - /** - * add a callback to the map move event - * @param func - callback function - * @param context - the context to use for this function - * @param delay=50 the delay before call load - * @param triggerOnAdd if the layer should be loaded on add to mapMove - * @param functionId optional id to reference the function later for outside triggering - */ - MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) { - if (this._mapMoveCallbacks.indexOf(func) > -1) { - console.log('this function already added to map move'); - return; - } - this._checkInit(); - if (!functionId) { - functionId = makeGuid_1.default(); - } - this._mapMoveCallbacks.push(func); - this._mapMoveCallbacksLookup[functionId] = func; - this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50); - this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null); - this._mapMoveCallbackTimeout.push(null); - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerMoveCallback(this._mapMoveCallbacks.length - 1); - } - }; - return MapMoveCls; -}(mapInteractionBase_1.default)); -exports.MapMoveCls = MapMoveCls; -nm.MapMoveCls = MapMoveCls; -exports.default = MapMoveCls; - - -/***/ }), - -/***/ 13: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -var FeatureLayerProperties = (function () { - /** - * - * @param feature the feature - * @param layer - the layer in the popup - * @param layerIndex - index of the layer - * @param selectionLayer - the ol selection layer - * @param [esriLayerName=undefined] - esri layer name - */ - function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) { - this.feature = feature; - this.layer = layer; - this.layerIndex = layerIndex; - this.selectionLayer = selectionLayer; - this.popupContent = ''; - this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined; - } - Object.defineProperty(FeatureLayerProperties.prototype, "layerName", { - get: function () { - if (typeof this.esriLayerName == 'string') { - return this.esriLayerName; - } - else { - return this.layer.name; - } - }, - enumerable: true, - configurable: true - }); - return FeatureLayerProperties; -}()); -exports.FeatureLayerProperties = FeatureLayerProperties; -/** - * map popup class - * @augments MapInteractionBase - */ -var MapPopupCls = (function (_super) { - __extends(MapPopupCls, _super); - /** - * Definition for openlayers style function - * @callback olStyleFunction - * ¶m feature the openlayers vector feature - * $param - */ - /** - * map popup constructor - */ - function MapPopupCls() { - var _this = _super.call(this, 'map popup') || this; - _this._arrPopupLayerIds = []; - _this._arrPopupLayers = []; - // this._arrPopupOlLayers = []; - _this._arrPopupContentFunction = []; - _this._$popupContainer = undefined; - _this._$popupContent = undefined; - _this._$popupCloser = undefined; - _this._popupOverlay = undefined; - _this._selectionLayers = []; - _this._selectionLayerLookup = {}; - _this._mapClickFunctions = []; - //let a = function($jqueryContent){console.log($jqueryContent)}; - //this._popupChangedLookup = {'a': a}; - _this._popupChangedFunctions = []; - _this._esriMapServiceLayers = []; - _this._popupOpen = false; - _this._popupCoordinate = null; - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - _this._popupContentLength = 0; - return _this; - } - /** - * map popup initialization - * @param {ol.Map} theMap - the ol map - */ - MapPopupCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - var $map; - var target = this.map.getTarget(); - if (typeof target == 'string') { - $map = $('#' + target); - } - else { - $map = $(target); - } - $map.append('<div class="ol-popup">' + - '<span class="ol-popup-closer">X</span>' + - '<div class="popup-content"></div>' + - '</div>'); - this._$popupContainer = $map.find('.ol-popup'); - this._$popupContent = $map.find('.popup-content'); - this._$popupCloser = $map.find('.ol-popup-closer'); - var _ease = function (n) { - return ol.easing.inAndOut(n); - }; - this._popupOverlay = new ol.Overlay({ - element: this._$popupContainer[0], - autoPan: true, - autoPanAnimation: { - duration: 250, - source: theMap.getView().getCenter(), - easing: _ease - } - }); - this._map.addOverlay(this._popupOverlay); - this._$popupCloser.click(function (evt) { - _this.closePopup(); - }); - // display popup on click - this._map.on('singleclick', function (evt) { - _this.closePopup(); - _this._popupCoordinate = evt['coordinate']; - // esri map service layers - if (_this._esriMapServiceLayers.length > 0) { - var queryParams = { - geometry: evt['coordinate'].join(','), - geometryType: 'esriGeometryPoint', - layers: 'all', - sr: _this._map.getView().getProjection().getCode().split(':')[1], - mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','), - imageDisplay: _this._map.getSize().join(',') + ',96', - returnGeometry: true, - tolerance: 15, - f: 'pjson' - }; - for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) { - var l = _a[_i]; - l.getPopupInfo(queryParams); - } - } - var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']); - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - for (var i = 0; i < layerFeatureObjectArray.length; i++) { - var featObj = layerFeatureObjectArray[i]; - var props = featObj.feature.getProperties(); - var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent); - //skip if return was false - if (popupContentResponse === false) { - //continue; - } - else if (typeof popupContentResponse == 'string') { - featObj.popupContent = popupContentResponse; - _this._passThroughLayerFeatureArray.push(featObj); - } - else { - featObj.selectionLayer.getSource().addFeature(featObj.feature); - } - } - _this._popupContentLength = _this._passThroughLayerFeatureArray.length; - _this._currentPopupIndex = -1; - var popupHtml = '<div class="ol-popup-nav">'; - popupHtml += '<span class="previous-popup ol-popup-nav-arrow">◀</span>'; - popupHtml += '<span class="next-popup ol-popup-nav-arrow">▶</span>'; - popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>"; - popupHtml += "<span> of </span>"; - popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>"; - popupHtml += "<span> - </span>"; - popupHtml += "<span class=\"current-popup-layer-name\"></span>"; - popupHtml += '</div>'; - popupHtml += '<div class="ol-popup-inner">'; - popupHtml += '</div>'; - _this._$popupContent.html(popupHtml); - _this._$popupContent.find('.previous-popup').click(function () { - if (_this._popupContentLength == 1) { - return; - } - if (_this._currentPopupIndex == 0) { - _this._currentPopupIndex = _this._popupContentLength - 1; - } - else { - _this._currentPopupIndex--; - } - _this._triggerFeatSelect(); - }); - var nextPopup = _this._$popupContent.find('.next-popup'); - nextPopup.click(function () { - if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) { - return; - } - if (_this._currentPopupIndex == _this._popupContentLength - 1) { - _this._currentPopupIndex = 0; - } - else { - _this._currentPopupIndex++; - } - _this._triggerFeatSelect(); - }); - if (_this._popupContentLength > 0) { - nextPopup.trigger('click'); - _this._popupOverlay.setPosition(_this._popupCoordinate); - _this._$popupContent.scrollTop(0); - _this._popupOpen = true; - } - }); - //change mouse cursor when over marker - this._map.on('pointermove', function (evt) { - if (evt['dragging']) { - return; - } - var pixel = _this.map.getEventPixel(evt['originalEvent']); - var hit = false; - _this.map.forEachLayerAtPixel(pixel, function (lyr) { - if (hit) { - return; - } - for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) { - var vLyr = _a[_i]; - if (vLyr.olLayer == lyr) { - hit = true; - break; - } - } - }); - var mapElement = _this.map.getTargetElement(); - mapElement.style.cursor = hit ? 'pointer' : ''; - }); - }; - /** - * helper to select features - * @private - */ - MapPopupCls.prototype._triggerFeatSelect = function () { - var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number'); - var $innerPopup = this._$popupContent.find('.ol-popup-inner'); - var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name'); - this.clearSelection(); - var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex]; - $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed()); - $layerNameSpan.html(lyrFeatObj.layerName); - $innerPopup.html(lyrFeatObj.popupContent); - lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature); - for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(this._$popupContent); - } - }; - /** - * - * @param feature - the ol feature - * @param {LayerEsriMapServer} lyr - the map server layer - * @param {string} popupContent - popup content - * @param {string} esriName - esri layer name - */ - MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) { - var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName); - featLayerObject.popupContent = popupContent; - this._passThroughLayerFeatureArray.push(featLayerObject); - this._popupContentLength++; - $('.popup-content-length').html(this._popupContentLength.toFixed()); - if (!this._popupOpen) { - this._$popupContent.find('.next-popup').trigger('click'); - this._popupOverlay.setPosition(this._popupCoordinate); - this._$popupContent.scrollTop(0); - this._popupOpen = true; - } - }; - /** - * - * @param pixel - the ol pixel - * @returns feature layer properties - * @private - */ - MapPopupCls.prototype._featuresAtPixel = function (pixel) { - var _this = this; - var layerFeatureObjectArray = []; - this.map.forEachFeatureAtPixel(pixel, function (feature, layer) { - var hasLyr = false; - var j; - var lyr = null; - for (j = 0; j < _this._arrPopupLayers.length; j++) { - lyr = _this._arrPopupLayers[j]; - if (lyr.olLayer === layer) { - hasLyr = true; - break; - } - } - if (hasLyr) { - layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j])); - } - }); - return layerFeatureObjectArray; - }; - MapPopupCls.prototype.closePopup = function () { - this._checkInit(); - this._popupOpen = false; - this._popupOverlay.setPosition(undefined); - this._$popupCloser[0].blur(); - this.clearSelection(); - this._$popupContent.html(''); - return false; - }; - ; - /** - * - * @param chgFunction - popup change function - */ - MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) { - this._popupChangedFunctions.push(chgFunction); - }; - /** - * - * @param {LayerBase|*} lyr - the layer being acted on - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns the new selection layer - * @private - */ - MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) { - this._checkInit(); - selectionStyle = selectionStyle || {}; - selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)'; - selectionStyle.width = selectionStyle.width || 10; - var theStyle; - if (selectionStyle.olStyle) { - theStyle = selectionStyle.olStyle; - } - else { - theStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: selectionStyle.color, - width: selectionStyle.width - }), - image: new ol.style.Circle({ - radius: 7, - fill: new ol.style.Fill({ color: selectionStyle.color }), - stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 }) - }), - fill: new ol.style.Fill({ - color: selectionStyle.color - }) - }); - } - var selectionLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: theStyle - }); - selectionLayer.setZIndex(100); - this._selectionLayers.push(selectionLayer); - this._selectionLayerLookup[lyr.id] = selectionLayer; - this.map.addLayer(selectionLayer); - return selectionLayer; - }; - /** - * Add popup to the map - * @param {LayerBase|*} lyr The layer that the popup with act on - * @param {popupCallback} popupContentFunction - popup content function that makes popup info - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._arrPopupLayerIds.push(lyr.id); - this._arrPopupLayers.push(lyr); - // this._arrPopupOlLayers.push(lyr.olLayer); - this._arrPopupContentFunction.push(popupContentFunction); - return selectionLayer; - }; - ; - /** - * - * @param {LayerBase} lyr - layer - */ - MapPopupCls.prototype.removeVectorPopup = function (lyr) { - var idx = this._arrPopupLayerIds.indexOf(lyr.id); - if (idx > -1) { - this._arrPopupLayerIds.splice(idx, 1); - this._arrPopupLayers.splice(idx, 1); - // this._arrPopupOlLayers.splice(idx, 1); - this._arrPopupContentFunction.splice(idx, 1); - this._selectionLayers.splice(idx, 1); - delete this._selectionLayerLookup[lyr.id]; - } - }; - /** - * - * @param {LayerEsriMapServer} lyr - map server layer - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._esriMapServiceLayers.push(lyr); - return selectionLayer; - }; - MapPopupCls.prototype.clearSelection = function () { - this._checkInit(); - for (var i = 0; i < this._selectionLayers.length; i++) { - this._selectionLayers[i].getSource().clear(); - } - for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(); - } - }; - ; - /** - * Add a function to be called when the map is clicked but before any popups are implemented - * @param {function} func - the map click function - */ - MapPopupCls.prototype.addMapClickFunction = function (func) { - this._mapClickFunctions.push(func); - }; - return MapPopupCls; -}(mapInteractionBase_1.default)); -exports.MapPopupCls = MapPopupCls; -nm.MapPopupCls = MapPopupCls; -exports.default = MapPopupCls; - - -/***/ }), - -/***/ 14: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var geocode_1 = __webpack_require__(11); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param [options={}] config options - * @param [options.divId=map] map div id - * @param [options.center={}] center config object - * @param [options.center.x=-10018378] center x, web mercator x or lon - * @param [options.center.y=5574910] center y, web mercator y or lat - * @param [options.zoom=7] zoom level - * @param [options.minZoom=undefined] min zoom - * @param [options.maxZoom=undefined] max zoom - * @param [options.baseSwitcher=true] if add base map switcher - * @param [options.fullScreen=false] if add base map switcher - * @returns the ol map - */ -function quickMapBase(options) { - if (options === void 0) { options = {}; } - options.divId = options.divId || 'map'; - options.center = options.center || { x: -10018378, y: 5574910 }; - options.zoom = typeof options.zoom == 'number' ? options.zoom : 7; - options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true; - options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false; - options.addGeocode = options.addGeocode || false; - var $mapDiv = $('#' + options.divId); - $mapDiv.css('position', 'relative'); - var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); - // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})}); - var osmCss = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat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PD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzY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mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')"; - if (options.baseSwitcher) { - // let switcherContent = '<div class="base-map-switcher" title="Toggle Base Layer" style="'; - // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; '; - // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`; - // switcherContent += '"></div>'; - // $mapDiv.append(switcherContent); - // - // $mapDiv.find('.base-map-switcher').click(function() { - // "use strict"; - // osmLayer.setVisible(!osmLayer.getVisible()); - // satLayer.setVisible(!satLayer.getVisible()); - // - // if (osmLayer.getVisible()){ - // $(this).css('background', aerialCss); - // } else { - // $(this).css('background', osmCss); - // } - // }); - } - if (options.zoom < 0 || options.zoom > 28) { - throw 'zoom out of range'; - } - if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) { - var p = new ol.geom.Point([options.center.x, options.center.y]); - new ol.proj.Projection({ code: "EPSG:4326" }); - p.transform(new ol.proj.Projection({ code: "EPSG:4326" }), new ol.proj.Projection({ code: "EPSG:3857" })); - var coordinates = p.getCoordinates(); - options.center.x = coordinates[0]; - options.center.y = coordinates[1]; - } - var controls = ol.control.defaults({ - attributionOptions: { collapsible: false } - }); - var view = new ol.View({ - center: [options.center.x, options.center.y], - zoom: options.zoom, - minZoom: options.minZoom, - maxZoom: options.maxZoom - }); - var map = new ol.Map({ - layers: [osmLayer], - target: options.divId, - controls: controls, - view: view - }); - if (options.fullScreen) { - map.addControl(new ol.control.FullScreen({})); - } - if (options.addGeocode) { - new geocode_1.Geocode(document.getElementById(options.divId), map); - } - return map; -} -exports.quickMapBase = quickMapBase; -nm.quickMapBase = quickMapBase; -exports.default = quickMapBase; - - -/***/ }), - -/***/ 2: -/***/ (function(module, exports) { - -module.exports = ol; - -/***/ }), - -/***/ 3: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/8/2015. - */ -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers'); -/** - * base interaction - */ -var MapInteractionBase = (function () { - /** - * map interaction base - * @param subtype - the interaction subtype - */ - function MapInteractionBase(subtype) { - this._map = null; - this._initialized = false; - this._subtype = subtype; - } - /** - * base initializer, returns true for already initialized - * @param theMap - the ol Map - * @returns true for already initialized - */ - MapInteractionBase.prototype.init = function (theMap) { - if (!this._initialized) { - this._map = theMap; - this._initialized = true; - } - }; - Object.defineProperty(MapInteractionBase.prototype, "map", { - /** - * get reference to the ol map object - * @returns {ol.Map} the map object - */ - get: function () { - return this._map; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MapInteractionBase.prototype, "initialized", { - /** - * get if is initialized - * @returns {boolean} is initialized - */ - get: function () { - return this._initialized; - }, - enumerable: true, - configurable: true - }); - /** - * Check the initialization status and throw exception if not valid yet - * @protected - */ - MapInteractionBase.prototype._checkInit = function () { - if (!this.initialized) { - var msg = this._subtype + " object not initialized"; - alert(msg); - console.log(msg); - throw msg; - } - }; - /** - * Check the initialization status and throw exception if not valid yet - */ - MapInteractionBase.prototype.checkInit = function () { - this._checkInit(); - }; - return MapInteractionBase; -}()); -exports.MapInteractionBase = MapInteractionBase; -nm.MapInteractionBase = MapInteractionBase; -exports.default = MapInteractionBase; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMapBase_1 = __webpack_require__(14); -var provide_1 = __webpack_require__(0); -var mapMove_1 = __webpack_require__(6); -var mapPopup_1 = __webpack_require__(7); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param {object} [options={}] config options - * @param {string} [options.divId=map] map div id - * @param {object} [options.center={}] center config object - * @param {number} [options.center.x=-10018378] center x, web mercator x or lon - * @param {number} [options.center.y=5574910] center y, web mercator y or lat - * @param {number} [options.zoom=7] zoom level - * @param {number} [options.minZoom=undefined] min zoom - * @param {number} [options.maxZoom=undefined] max zoom - * @param {boolean} [options.baseSwitcher=true] if add base map switcher - * @param {boolean} [options.fullScreen=false] if add base map switcher - * @returns {ol.Map} the ol map - */ -function quickMap(options) { - if (options === void 0) { options = {}; } - var m = quickMapBase_1.quickMapBase(options); - mapMove_1.default.init(m); - mapPopup_1.default.init(m); - return m; -} -exports.quickMap = quickMap; -nm.quickMap = quickMap; -exports.default = quickMap; - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapMoveCls_1 = __webpack_require__(12); -/** - * The single map move object catch is that it is common to multimap pages - * @type {MapMoveCls} - */ -exports.mapMove = new mapMoveCls_1.default(); -exports.default = exports.mapMove; - - -/***/ }), - -/***/ 62: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var extentUtil_1 = __webpack_require__(67); -/** - * - * @param {ol.Map} map - * @param {(imgData) => string} callback - * @param {iMapToBase64Options} options - * @returns {any} - */ -function mapToBase64(map, callback, options) { - options = options || {}; - if (typeof options.delay === 'number') { - //pass - } - else if (options.layers || options.resize) { - options.delay = 2000; - } - else { - options.delay = 1; - } - var mapTarget = map.getTargetElement(); - var originalHeight = mapTarget.style.height; - var originalWidth = mapTarget.style.width; - var originalPosition = mapTarget.style.position; - var originalCenter = map.getView().getCenter(); - var originalZoom = map.getView().getZoom(); - // let mapTimeout = 1; - if (options.resize) { - mapTarget.style.height = options.resize.height + "px"; - mapTarget.style.width = options.resize.width + "px"; - mapTarget.style.position = 'absolute'; - map.updateSize(); - } - map.once('postrender', function () { - if (options.layers) { - extentUtil_1.fitToMap(options.layers, map); - } - setTimeout(function () { - map.once('postcompose', function (event) { - try { - var canvas = event['context'].canvas; - var imgData = canvas.toDataURL('image/png'); - callback(imgData); - } - catch (ex) { - // reportParams['imgData'] = null; - } - finally { - if (options.resize) { - mapTarget.style.height = originalHeight; - mapTarget.style.width = originalWidth; - mapTarget.style.position = originalPosition; - map.updateSize(); - map.getView().setCenter(originalCenter); - map.getView().setZoom(originalZoom); - } - if (options.layers) { - extentUtil_1.fitToMap(options.layers, map); - } - } - }); - map.renderSync(); - }, options.delay); - }); - map.updateSize(); -} -exports.mapToBase64 = mapToBase64; -exports.default = mapToBase64; - - -/***/ }), - -/***/ 67: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 7/18/2016. - */ -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * - * @param {Array<LayerBaseVector>|Array<ol.layer.Vector>|LayerBaseVector|ol.layer.Vector|*} layers - array of layers or single - * @returns {ol.Extent|Array<number>|*} - collective extent - */ -function calculateExtent(layers) { - "use strict"; - var hasExtent = false; - var minX = 10E100; - var minY = 10E100; - var maxX = -10E100; - var maxY = -10E100; - for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) { - var lyr = layers_1[_i]; - var olLayer = lyr.olLayer || lyr; - if (olLayer.getSource().getFeatures().length > 0) { - hasExtent = true; - var ext = olLayer.getSource().getExtent(); - minX = ext[0] < minX ? ext[0] : minX; - minY = ext[1] < minY ? ext[1] : minY; - maxX = ext[2] > maxX ? ext[2] : maxX; - maxY = ext[3] > maxY ? ext[3] : maxY; - } - } - if (hasExtent) { - return [minX, minY, maxX, maxY]; - } - else { - return undefined; - } -} -exports.calculateExtent = calculateExtent; -nm.calculateExtent = calculateExtent; -/** - * given one or an array of layers, fit to the map - * @param layers - array of layers or single - * @param mp - the map to fit - * @param [zoomOut=undefined] - levels to zoom out after fit - */ -function fitToMap(layers, mp, zoomOut) { - "use strict"; - var ext = calculateExtent(layers); - if (typeof ext == 'undefined') { - return; - } - mp.getView().fit(ext, mp.getSize()); - if (typeof zoomOut == 'number') { - mp.getView().setZoom(mp.getView().getZoom() - zoomOut); - } -} -exports.fitToMap = fitToMap; -nm.calculateExtent = calculateExtent; - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapPopupCls_1 = __webpack_require__(13); -/** - * The single popup object catch is that it is common to multimap pages - * @type {MapPopupCls} - */ -exports.mapPopup = new mapPopupCls_1.default(); -exports.default = exports.mapPopup; - - -/***/ }), - -/***/ 72: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMap_1 = __webpack_require__(5); -var mapToBase64_1 = __webpack_require__(62); -var map = quickMap_1.default({ addGeocode: true }); -window['map'] = map; -function callback(d) { - console.log(d); -} -setTimeout(function () { - mapToBase64_1.mapToBase64(map, callback, { delay: 1500 }); -}, 2000); -console.log('it works'); - - -/***/ }), - -/***/ 8: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 10/3/2016. - */ -var ol = __webpack_require__(2); -exports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' }); -exports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' }); -exports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' }); - - -/***/ }), - -/***/ 9: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util.checkDefined'); -/** - * check if the input is undefined or null - * @param input - input pointer - * @returns true undefined or null - */ -function undefinedOrNull(input) { - "use strict"; - return (typeof input === 'undefined' || input === null); -} -exports.undefinedOrNull = undefinedOrNull; -nm.undefinedOrNull = undefinedOrNull; -/** - * check if the input is defined and not null - * @param input - input pointer - * @returns true defined and not null - */ -function definedAndNotNull(input) { - "use strict"; - return !(undefinedOrNull(input)); -} -exports.definedAndNotNull = definedAndNotNull; -nm.definedAndNotNull = definedAndNotNull; - - -/***/ }) - -/******/ }); +!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=71)}({0:function(e,t,o){"use strict";function n(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){void 0===o[t[n]]&&(o[t[n]]={}),o=o[t[n]]}return o}Object.defineProperty(t,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,t.default=n},1:function(e,t){e.exports=$},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),r=o(3),i=o(2),a=o(8),p="geocoder-invalid",u="geocoder-loading",l=function(){function e(e,t){var o=this,l=r.makeGuid(),s=r.makeGuid();this.map=t,this.indicationLayer=new i.layer.Vector({source:new i.source.Vector,style:new i.style.Style({image:new i.style.Circle({radius:12,fill:new i.style.Fill({color:"rgba(255,0,0,0.5)"}),stroke:new i.style.Stroke({color:"red",width:1})})})}),this.map.addLayer(this.indicationLayer),n(e).append('<div class="geocoder-el"><input type="text" id="'+l+'"><button id="'+s+'">Search</button></div>'),this.theButton=document.getElementById(s),this.theInput=document.getElementById(l),this.reset();var c=n(this.theButton),d=n(this.theInput);c.click(function(e){e.preventDefault(),c.addClass(u),o.theButton.disabled=!0,o.indicationLayer.getSource().clear(),n.get("https://geocode.xyz/"+o.theInput.value+"?geoit=json",{},function(e){var t=parseFloat(e.latt),n=parseFloat(e.longt);if(0==t&&0==n||e.error)d.addClass(p),o.theInput.title="Specified Location Invalid",o.theButton.title="Specified Location Invalid";else{var r=o.map.getView(),l=new i.geom.Point([n,t]),s=new i.Feature(l);o.indicationLayer.getSource().addFeature(s),l.transform(a.proj4326,a.proj3857),r.setCenter(l.getCoordinates()),r.setZoom(13)}c.removeClass(u),o.theButton.disabled=!1},"json")}),n(this.theInput).keyup(function(e){e.preventDefault(),o.theButton.disabled=0==o.theInput.value.length,d.removeClass(p),o.theInput.title="",o.theButton.title="",o.theButton.disabled||13!=e.keyCode||c.click()})}return e.prototype.reset=function(){this.theButton.disabled=!0,this.theInput.value=""},e}();t.Geocode=l},12:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(9),a=o(0),p=o(3),u=o(1),l=a.default("olHelpers"),s=function(e){function t(){var t=e.call(this,"map move")||this;return t._arrLyrRequest=[],t._arrLyrTimeout=[],t._arrLayer=[],t._lookupLayer={},t._mapMoveCallbacks=[],t._mapMoveCallbacksLookup={},t._mapMoveCallbackDelays=[],t._mapMoveCallbackContext=[],t._mapMoveCallbackTimeout=[],t._mapExtent=void 0,t._zoomLevel=void 0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t),this.map.getView().on(["change:center","change:resolution"],function(e){o._updateMapExtent();for(var t=0;t<o._arrLayer.length;t++)o.triggerLyrLoad(o._arrLayer[t],t,e.type);for(var t=0;t<o._mapMoveCallbacks.length;t++)o.triggerMoveCallback(t,e.type)})},t.prototype._updateMapExtent=function(){var e=this.map.getView();this._zoomLevel=e.getZoom();var t=e.calculateExtent(this.map.getSize());this._mapExtent={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},Object.defineProperty(t.prototype,"mapExtent",{get:function(){return this._mapExtent||this._updateMapExtent(),this._mapExtent},enumerable:!0,configurable:!0}),t.prototype.triggerLyrLoad=function(e,t,o){if(i.undefinedOrNull(e)&&i.undefinedOrNull(t))throw"need to define lyr or index";i.definedAndNotNull(e)&&i.undefinedOrNull(t)?t=this._arrLayer.indexOf(e):i.undefinedOrNull(e)&&i.definedAndNotNull(t)&&(e=this._arrLayer[t]),null!=this._arrLyrTimeout[t]&&(clearTimeout(this._arrLyrTimeout[t]),this._arrLyrTimeout[t]=null),null!=this._arrLyrRequest[t]&&4!=this._arrLyrRequest[t]&&(this._arrLyrRequest[t].abort(),this._arrLyrRequest[t]=null);var n=function(){};if(e.mapMoveBefore(this._zoomLevel,o)){e.mapMoveMakeGetParams(this._mapExtent,this._zoomLevel);var r=this;n=function(){function o(e,t){var o=this;this._arrLyrRequest[t]=u.get(e.url,e.mapMoveParams,function(t){e.mapMoveCallback(t),e.loadCallback()},"json").fail(function(t){"abort"!=t.statusText&&(console.log("failed"),console.log(e.url),console.log(e.mapMoveParams))}).always(function(){o._arrLyrTimeout[t]=null,o._arrLyrRequest[t]=null})}o.call(r,e,t)}}else e.clear();this._arrLyrTimeout[t]=setTimeout(n,e.onDemandDelay)},t.prototype.triggerMoveCallback=function(e,t,o){if(void 0===e&&void 0===o)throw"either the function index or the id must be defined";if("number"!=typeof e&&(e=this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[o])),e<0)return void console.log("function not found");null!=this._mapMoveCallbackTimeout[e]&&(clearTimeout(this._mapMoveCallbackTimeout[e]),this._mapMoveCallbackTimeout[e]=null);var n=this._mapMoveCallbackContext[e],r=this._mapMoveCallbacks[e],i=this,a=function(){null!==n?r.call(n,i._mapExtent,i._zoomLevel,t):r(i._mapExtent,i._zoomLevel,t)};this._mapMoveCallbackTimeout[e]=setTimeout(a,this._mapMoveCallbackDelays[e])},t.prototype.addVectorLayer=function(e,t){if(void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1)return void console.log("already added "+e.name+" to map move");this._checkInit(),this._arrLyrRequest.push(null),this._arrLyrTimeout.push(null),this._arrLayer.push(e),this._lookupLayer[e.id]=e,(t="boolean"!=typeof t||t)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))},t.prototype.addCallback=function(e,t,o,n,r){if(this._mapMoveCallbacks.indexOf(e)>-1)return void console.log("this function already added to map move");this._checkInit(),r||(r=p.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=e,this._mapMoveCallbackDelays.push("number"==typeof o?o:50),this._mapMoveCallbackContext.push(i.definedAndNotNull(t)?t:null),this._mapMoveCallbackTimeout.push(null),(n="boolean"!=typeof n||n)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))},t}(r.default);t.MapMoveCls=s,l.MapMoveCls=s,t.default=s},13:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(0),a=o(2),p=o(1),u=i.default("olHelpers"),l=function(){function e(e,t,o,n,r){this.feature=e,this.layer=t,this.layerIndex=o,this.selectionLayer=n,this.popupContent="",this.esriLayerName="string"==typeof r?r:void 0}return Object.defineProperty(e.prototype,"layerName",{get:function(){return"string"==typeof this.esriLayerName?this.esriLayerName:this.layer.name},enumerable:!0,configurable:!0}),e}();t.FeatureLayerProperties=l;var s=function(e){function t(){var t=e.call(this,"map popup")||this;return t._arrPopupLayerIds=[],t._arrPopupLayers=[],t._arrPopupContentFunction=[],t._$popupContainer=void 0,t._$popupContent=void 0,t._$popupCloser=void 0,t._popupOverlay=void 0,t._selectionLayers=[],t._selectionLayerLookup={},t._mapClickFunctions=[],t._popupChangedFunctions=[],t._esriMapServiceLayers=[],t._popupOpen=!1,t._popupCoordinate=null,t._passThroughLayerFeatureArray=[],t._currentPopupIndex=-1,t._popupContentLength=0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t);var n,r=this.map.getTarget();n=p("string"==typeof r?"#"+r:r),n.append('<div class="ol-popup"><span class="ol-popup-closer">X</span><div class="popup-content"></div></div>'),this._$popupContainer=n.find(".ol-popup"),this._$popupContent=n.find(".popup-content"),this._$popupCloser=n.find(".ol-popup-closer");var i=function(e){return a.easing.inAndOut(e)};this._popupOverlay=new a.Overlay({element:this._$popupContainer[0],autoPan:!0,autoPanAnimation:{duration:250,source:t.getView().getCenter(),easing:i}}),this._map.addOverlay(this._popupOverlay),this._$popupCloser.click(function(e){o.closePopup()}),this._map.on("singleclick",function(e){if(o.closePopup(),o._popupCoordinate=e.coordinate,o._esriMapServiceLayers.length>0)for(var t={geometry:e.coordinate.join(","),geometryType:"esriGeometryPoint",layers:"all",sr:o._map.getView().getProjection().getCode().split(":")[1],mapExtent:o._map.getView().calculateExtent(o._map.getSize()).join(","),imageDisplay:o._map.getSize().join(",")+",96",returnGeometry:!0,tolerance:15,f:"pjson"},n=0,r=o._esriMapServiceLayers;n<r.length;n++){var i=r[n];i.getPopupInfo(t)}var a=o._featuresAtPixel(e.pixel);o._passThroughLayerFeatureArray=[],o._currentPopupIndex=-1;for(var p=0;p<a.length;p++){var u=a[p],l=u.feature.getProperties(),s=o._arrPopupContentFunction[u.layerIndex](l,o._$popupContent);s===!1||("string"==typeof s?(u.popupContent=s,o._passThroughLayerFeatureArray.push(u)):u.selectionLayer.getSource().addFeature(u.feature))}o._popupContentLength=o._passThroughLayerFeatureArray.length,o._currentPopupIndex=-1;var c='<div class="ol-popup-nav">';c+='<span class="previous-popup ol-popup-nav-arrow">◀</span>',c+='<span class="next-popup ol-popup-nav-arrow">▶</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span> of </span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span> - </span>",c+='<span class="current-popup-layer-name"></span>',c+="</div>",c+='<div class="ol-popup-inner">',c+="</div>",o._$popupContent.html(c),o._$popupContent.find(".previous-popup").click(function(){1!=o._popupContentLength&&(0==o._currentPopupIndex?o._currentPopupIndex=o._popupContentLength-1:o._currentPopupIndex--,o._triggerFeatSelect())});var d=o._$popupContent.find(".next-popup");d.click(function(){1==o._popupContentLength&&o._currentPopupIndex>-1||(o._currentPopupIndex==o._popupContentLength-1?o._currentPopupIndex=0:o._currentPopupIndex++,o._triggerFeatSelect())}),o._popupContentLength>0&&(d.trigger("click"),o._popupOverlay.setPosition(o._popupCoordinate),o._$popupContent.scrollTop(0),o._popupOpen=!0)}),this._map.on("pointermove",function(e){if(!e.dragging){var t=o.map.getEventPixel(e.originalEvent),n=!1;o.map.forEachFeatureAtPixel(t,function(e,t){if(!n)for(var r=0,i=o._arrPopupLayers;r<i.length;r++){var a=i[r];if(a.olLayer==t){n=!0;break}}});o.map.getTargetElement().style.cursor=n?"pointer":""}})},t.prototype._triggerFeatSelect=function(){var e=this._$popupContent.find(".current-popup-item-number"),t=this._$popupContent.find(".ol-popup-inner"),o=this._$popupContent.find(".current-popup-layer-name");this.clearSelection();var n=this._passThroughLayerFeatureArray[this._currentPopupIndex];e.html((this._currentPopupIndex+1).toFixed()),o.html(n.layerName),t.html(n.popupContent),n.selectionLayer.getSource().addFeature(n.feature);for(var r=0,i=this._popupChangedFunctions;r<i.length;r++){(0,i[r])(this._$popupContent)}},t.prototype.addMapServicePopupContent=function(e,t,o,n){var r=new l(e,t,this._popupContentLength,this._selectionLayerLookup[t.id],n);r.popupContent=o,this._passThroughLayerFeatureArray.push(r),this._popupContentLength++,p(".popup-content-length").html(this._popupContentLength.toFixed()),this._popupOpen||(this._$popupContent.find(".next-popup").trigger("click"),this._popupOverlay.setPosition(this._popupCoordinate),this._$popupContent.scrollTop(0),this._popupOpen=!0)},t.prototype._featuresAtPixel=function(e){var t=this,o=[];return this.map.forEachFeatureAtPixel(e,function(e,n){var r,i=!1,a=null;for(r=0;r<t._arrPopupLayers.length;r++)if(a=t._arrPopupLayers[r],a.olLayer===n){i=!0;break}i&&o.push(new l(e,a,r,t._selectionLayers[r]))}),o},t.prototype.closePopup=function(){return this._checkInit(),this._popupOpen=!1,this._popupOverlay.setPosition(void 0),this._$popupCloser[0].blur(),this.clearSelection(),this._$popupContent.html(""),!1},t.prototype.addPopupChangedFunction=function(e){this._popupChangedFunctions.push(e)},t.prototype._addPopupLayer=function(e,t){this._checkInit(),t=t||{},t.color=t.color||"rgba(255,170,0,0.5)",t.width=t.width||10;var o;o=t.olStyle?t.olStyle:new a.style.Style({stroke:new a.style.Stroke({color:t.color,width:t.width}),image:new a.style.Circle({radius:7,fill:new a.style.Fill({color:t.color}),stroke:new a.style.Stroke({color:t.color,width:1})}),fill:new a.style.Fill({color:t.color})});var n=new a.layer.Vector({source:new a.source.Vector,style:o});return n.setZIndex(100),this._selectionLayers.push(n),this._selectionLayerLookup[e.id]=n,this.map.addLayer(n),n},t.prototype.addVectorPopup=function(e,t,o){var n=this._addPopupLayer(e,o);return this._arrPopupLayerIds.push(e.id),this._arrPopupLayers.push(e),this._arrPopupContentFunction.push(t),n},t.prototype.removeVectorPopup=function(e){var t=this._arrPopupLayerIds.indexOf(e.id);t>-1&&(this._arrPopupLayerIds.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupContentFunction.splice(t,1),this._selectionLayers.splice(t,1),delete this._selectionLayerLookup[e.id])},t.prototype.addMapServicePopup=function(e,t){var o=this._addPopupLayer(e,t);return this._esriMapServiceLayers.push(e),o},t.prototype.clearSelection=function(){this._checkInit();for(var e=0;e<this._selectionLayers.length;e++)this._selectionLayers[e].getSource().clear();for(var t=0,o=this._mapClickFunctions;t<o.length;t++){(0,o[t])()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=s,u.MapPopupCls=s,t.default=s},14:function(e,t,o){"use strict";function n(e){void 0===e&&(e={}),e.divId=e.divId||"map",e.center=e.center||{x:-10018378,y:5574910},e.zoom="number"==typeof e.zoom?e.zoom:7,e.baseSwitcher="boolean"!=typeof e.baseSwitcher||e.baseSwitcher,e.fullScreen="boolean"==typeof e.fullScreen&&e.fullScreen,e.addGeocode=e.addGeocode||!1,a("#"+e.divId).css("position","relative");var t=new i.layer.Tile({source:new i.source.OSM});if(e.baseSwitcher,e.zoom<0||e.zoom>28)throw"zoom out of range";if(e.center.x>=-180&&e.center.x<=180&&e.center.y>=-90&&e.center.y<=90){var o=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),o.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var n=o.getCoordinates();e.center.x=n[0],e.center.y=n[1]}var r=i.control.defaults({attributionOptions:{collapsible:!1}}),u=new i.View({center:[e.center.x,e.center.y],zoom:e.zoom,minZoom:e.minZoom,maxZoom:e.maxZoom}),l=new i.Map({layers:[t],target:e.divId,controls:r,view:u});return e.fullScreen&&l.addControl(new i.control.FullScreen({})),e.addGeocode&&new p.Geocode(document.getElementById(e.divId),l),l}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(2),a=o(1),p=o(11),u=r.default("olHelpers");t.quickMapBase=n,u.quickMapBase=n,t.default=n},2:function(e,t){e.exports=ol},3:function(e,t,o){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=r.default("util");t.makeGuid=n,i.makeGuid=n,t.default=n},4:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);t.mapPopup=new n.default,t.default=t.mapPopup},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=n.default("olHelpers"),i=function(){function e(e){this._map=null,this._initialized=!1,this._subtype=e}return e.prototype.init=function(e){this._initialized||(this._map=e,this._initialized=!0)},Object.defineProperty(e.prototype,"map",{get:function(){return this._map},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),e.prototype._checkInit=function(){if(!this.initialized){var e=this._subtype+" object not initialized";throw alert(e),console.log(e),e}},e.prototype.checkInit=function(){this._checkInit()},e}();t.MapInteractionBase=i,r.MapInteractionBase=i,t.default=i},6:function(e,t,o){"use strict";function n(e){void 0===e&&(e={});var t=r.quickMapBase(e);return a.default.init(t),p.default.init(t),t}Object.defineProperty(t,"__esModule",{value:!0});var r=o(14),i=o(0),a=o(7),p=o(4),u=i.default("olHelpers");t.quickMap=n,u.quickMap=n,t.default=n},61:function(e,t,o){"use strict";function n(e,t,o){o=o||{},"number"==typeof o.delay||(o.layers||o.resize?o.delay=2e3:o.delay=1);var n=e.getTargetElement(),i=n.style.height,a=n.style.width,p=n.style.position,u=e.getView().getCenter(),l=e.getView().getZoom();o.resize&&(n.style.height=o.resize.height+"px",n.style.width=o.resize.width+"px",n.style.position="absolute",e.updateSize()),e.once("postrender",function(){o.layers&&r.fitToMap(o.layers,e),setTimeout(function(){e.once("postcompose",function(s){try{t(s.context.canvas.toDataURL("image/png"))}catch(e){}finally{o.resize&&(n.style.height=i,n.style.width=a,n.style.position=p,e.updateSize(),e.getView().setCenter(u),e.getView().setZoom(l)),o.layers&&r.fitToMap(o.layers,e)}}),e.renderSync()},o.delay)}),e.updateSize()}Object.defineProperty(t,"__esModule",{value:!0});var r=o(66);t.mapToBase64=n,t.default=n},66:function(e,t,o){"use strict";function n(e){for(var t=!1,o=1e101,n=1e101,r=-1e101,i=-1e101,a=0,p=e;a<p.length;a++){var u=p[a],l=u.olLayer||u;if(l.getSource().getFeatures().length>0){t=!0;var s=l.getSource().getExtent();o=s[0]<o?s[0]:o,n=s[1]<n?s[1]:n,r=s[2]>r?s[2]:r,i=s[3]>i?s[3]:i}}return t?[o,n,r,i]:void 0}function r(e,t,o){var r=n(e);void 0!==r&&(t.getView().fit(r,t.getSize()),"number"==typeof o&&t.getView().setZoom(t.getView().getZoom()-o))}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("util");t.calculateExtent=n,a.calculateExtent=n,t.fitToMap=r,a.calculateExtent=n},7:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12);t.mapMove=new n.default,t.default=t.mapMove},71:function(e,t,o){"use strict";function n(e){console.log(e)}Object.defineProperty(t,"__esModule",{value:!0});var r=o(6),i=o(61),a=r.default({addGeocode:!0});window.map=a,setTimeout(function(){i.mapToBase64(a,n,{delay:1500})},2e3),console.log("it works")},8:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2);t.proj4326=new n.proj.Projection({code:"EPSG:4326"}),t.proj3857=new n.proj.Projection({code:"EPSG:3857"}),t.proj3070=new n.proj.Projection({code:"EPSG:3070"})},9:function(e,t,o){"use strict";function n(e){return void 0===e||null===e}function r(e){return!n(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("util.checkDefined");t.undefinedOrNull=n,a.undefinedOrNull=n,t.definedAndNotNull=r,a.definedAndNotNull=r}}); //# sourceMappingURL=geocode.js.map \ No newline at end of file diff --git a/test/serve/js/geocode.js.map b/test/serve/js/geocode.js.map index 0dedcb12df647de881109a9a75ae81a265f95478..247fafb9dee77172716d489f6dde64ee772166ce 100644 --- a/test/serve/js/geocode.js.map +++ b/test/serve/js/geocode.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 7bb55fd41bd308ae26ba?4c44****","webpack:///./src/util/provide.ts?5c82****","webpack:///external \"$\"?57aa****","webpack:///./src/olHelpers/geocode.ts?5a2f****","webpack:///./src/olHelpers/mapMoveCls.ts?cd45****","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7****","webpack:///./src/olHelpers/quickMapBase.ts?fb65****","webpack:///external \"ol\"?81ed****","webpack:///./src/util/makeGuid.ts?e80e****","webpack:///./src/olHelpers/mapInteractionBase.ts?f419****","webpack:///./src/olHelpers/quickMap.ts?1069****","webpack:///./src/olHelpers/mapMove.ts?6a2b****","webpack:///./src/olHelpers/mapToBase64.ts","webpack:///./src/olHelpers/extentUtil.ts","webpack:///./src/olHelpers/mapPopup.ts?5d6c****","webpack:///./src/_tests/demos/geocode.ts","webpack:///./src/olHelpers/projections.ts?804b****","webpack:///./src/util/checkDefined.ts?bcd7****"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAG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AAI,EAAE,WAAW,EAAC,CAAC,CAAC;AACvD,gBAAQ,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC,CAAC;AACvD,gBAAQ,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAC,IAAI,EAAE,WAAW,EAAC,CAAC,CAAC;;;;;;;;;;;ACRpE,uCAAgC;AAChC,IAAI,EAAE,GAAG,iBAAO,CAAC,mBAAmB,CAAC,CAAC;AAEtC;;;;GAIG;AACH,yBAAiC,KAAU;IACvC,YAAY,CAAC;IAEb,MAAM,CAAC,CAAC,OAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;AAC5D,CAAC;AAJD,0CAIC;AAED,EAAE,CAAC,eAAe,GAAG,eAAe,CAAC;AAGrC;;;;GAIG;AACH,2BAAmC,KAAU;IACzC,YAAY,CAAC;IAEb,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,CAAC;AAJD,8CAIC;AAED,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,CAAC","file":"geocode.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 72);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7bb55fd41bd308ae26ba","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachLayerAtPixel(pixel, (lyr) => {\r\n if (hit){\r\n return;\r\n }\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == lyr){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw4scxNysnHxU7nSspTRcJjCZGL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XqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHjKTHPPBo8CSJISqqq4wGGOcWylIGlgvgNX1Gd8vF5f+IUIwb30ng+Gg2QfBRIMvy0jG8SVkYo4N0zvUXVRztbJ/L6xL7lUZEXBEHkuZqlS6gEAUgKJurnhFtfpACOYd8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IiXzdQhnaGN+46umnEdy5U5UbUJ48LFM9GkJo8BdDOiAZ7ZIQbKhYLMqvhU2wmNxjEAsS2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","import ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {fitToMap} from '../olHelpers/extentUtil';\r\nimport {layers} from \"../\";\r\n\r\ndeclare const glob: Object;\r\n\r\nexport interface iMapToBase64Options {\r\n resize?: { width: number, height: number };\r\n layers?: LayerBaseVector[] | LayerBaseVector[];\r\n delay?: number;\r\n}\r\n\r\n\r\n/**\r\n *\r\n * @param {ol.Map} map\r\n * @param {(imgData) => string} callback\r\n * @param {iMapToBase64Options} options\r\n * @returns {any}\r\n */\r\nexport function mapToBase64(map: ol.Map, callback: (imgData: string) => any, options?: iMapToBase64Options): any {\r\n options = options || {};\r\n\r\n if (typeof options.delay === 'number') {\r\n //pass\r\n } else if (options.layers || options.resize) {\r\n options.delay = 2000;\r\n } else {\r\n options.delay = 1;\r\n }\r\n\r\n let mapTarget: HTMLDivElement = map.getTargetElement() as HTMLDivElement;\r\n\r\n let originalHeight = mapTarget.style.height;\r\n let originalWidth = mapTarget.style.width;\r\n let originalPosition = mapTarget.style.position;\r\n let originalCenter = map.getView().getCenter();\r\n let originalZoom = map.getView().getZoom();\r\n\r\n // let mapTimeout = 1;\r\n\r\n if (options.resize) {\r\n mapTarget.style.height = `${options.resize.height}px`;\r\n mapTarget.style.width = `${options.resize.width}px`;\r\n mapTarget.style.position = 'absolute';\r\n map.updateSize();\r\n }\r\n\r\n map.once('postrender', () => {\r\n\r\n if (options.layers) {\r\n fitToMap(options.layers, map);\r\n }\r\n\r\n setTimeout(() => {\r\n map.once('postcompose', (event) => {\r\n try {\r\n let canvas: HTMLCanvasElement = event['context'].canvas;\r\n let imgData = canvas.toDataURL('image/png');\r\n callback(imgData);\r\n }\r\n catch (ex) {\r\n // reportParams['imgData'] = null;\r\n } finally {\r\n if (options.resize) {\r\n mapTarget.style.height = originalHeight;\r\n mapTarget.style.width = originalWidth;\r\n mapTarget.style.position = originalPosition;\r\n\r\n map.updateSize();\r\n map.getView().setCenter(originalCenter);\r\n map.getView().setZoom(originalZoom);\r\n }\r\n\r\n if (options.layers) {\r\n fitToMap(options.layers, map);\r\n }\r\n }\r\n });\r\n map.renderSync();\r\n }, options.delay);\r\n });\r\n\r\n map.updateSize();\r\n\r\n}\r\n\r\nexport default mapToBase64;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapToBase64.ts","/**\r\n * Created by gavorhes on 7/18/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\n\r\n\r\nconst nm = provide('util');\r\n\r\n/**\r\n *\r\n * @param {Array<LayerBaseVector>|Array<ol.layer.Vector>|LayerBaseVector|ol.layer.Vector|*} layers - array of layers or single\r\n * @returns {ol.Extent|Array<number>|*} - collective extent\r\n */\r\nexport function calculateExtent(layers: ol.layer.Vector[]|LayerBaseVector[]): ol.Extent|Array<number>| ol.Extent| number[] {\r\n \"use strict\";\r\n\r\n let hasExtent = false;\r\n\r\n let minX = 10E100;\r\n let minY = 10E100;\r\n let maxX = -10E100;\r\n let maxY = -10E100;\r\n\r\n for (let lyr of layers) {\r\n\r\n let olLayer: ol.layer.Vector = (lyr as LayerBaseVector).olLayer || lyr as ol.layer.Vector;\r\n \r\n \r\n if (olLayer.getSource().getFeatures().length > 0) {\r\n hasExtent = true;\r\n let ext = olLayer.getSource().getExtent();\r\n minX = ext[0] < minX ? ext[0] : minX;\r\n minY = ext[1] < minY ? ext[1] : minY;\r\n maxX = ext[2] > maxX ? ext[2] : maxX;\r\n maxY = ext[3] > maxY ? ext[3] : maxY;\r\n }\r\n }\r\n\r\n if (hasExtent) {\r\n return [minX, minY, maxX, maxY];\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\nnm.calculateExtent = calculateExtent;\r\n \r\n\r\n/**\r\n * given one or an array of layers, fit to the map\r\n * @param layers - array of layers or single\r\n * @param mp - the map to fit\r\n * @param [zoomOut=undefined] - levels to zoom out after fit\r\n */\r\nexport function fitToMap(layers: ol.layer.Vector[]|LayerBaseVector[], mp: ol.Map, zoomOut?: number){\r\n \"use strict\";\r\n\r\n let ext = calculateExtent(layers);\r\n \r\n if (typeof ext == 'undefined'){\r\n return;\r\n }\r\n \r\n mp.getView().fit(ext as ol.Extent, mp.getSize());\r\n \r\n if (typeof zoomOut == 'number'){\r\n mp.getView().setZoom(mp.getView().getZoom() - zoomOut);\r\n }\r\n}\r\n\r\nnm.calculateExtent = calculateExtent;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/extentUtil.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","import ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\nimport {mapToBase64} from '../../olHelpers/mapToBase64';\r\nlet map = quickMap({addGeocode: true});\r\n\r\nwindow['map'] = map;\r\n\r\nfunction callback(d: string){\r\n console.log(d);\r\n}\r\n\r\nsetTimeout(() => {\r\n mapToBase64(map, callback, {delay: 1500});\r\n}, 2000);\r\n\r\n\r\nconsole.log('it works');\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/geocode.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///geocode.js","webpack:///webpack/bootstrap 99693f14fcb3e83c98ca?ad23****","webpack:///./src/util/provide.ts?5c82****","webpack:///external \"$\"?57aa****","webpack:///./src/olHelpers/geocode.ts?5a2f****","webpack:///./src/olHelpers/mapMoveCls.ts?cd45****","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7****","webpack:///./src/olHelpers/quickMapBase.ts?fb65****","webpack:///external \"ol\"?81ed****","webpack:///./src/util/makeGuid.ts?e80e****","webpack:///./src/olHelpers/mapPopup.ts?5d6c****","webpack:///./src/olHelpers/mapInteractionBase.ts?f419****","webpack:///./src/olHelpers/quickMap.ts?1069****","webpack:///./src/olHelpers/mapToBase64.ts","webpack:///./src/olHelpers/extentUtil.ts","webpack:///./src/olHelpers/mapMove.ts?6a2b****","webpack:///./src/_tests/demos/geocode.ts","webpack:///./src/olHelpers/projections.ts?804b****","webpack:///./src/util/checkDefined.ts?bcd7****"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","1","$","11","makeGuid_1","ol","projections_1","invalidClass","geocoderLoadingClass","Geocode","mapDiv","map","_this","this","inputGuid","makeGuid","buttonGuid","indicationLayer","layer","Vector","source","style","Style","image","Circle","radius","fill","Fill","color","stroke","Stroke","width","addLayer","append","theButton","document","getElementById","theInput","reset","$theButton","$theInput","click","evt","preventDefault","addClass","disabled","getSource","clear","lat","parseFloat","lon","title","v","getView","geom","Point","feat","Feature","addFeature","transform","proj4326","proj3857","setCenter","getCoordinates","setZoom","removeClass","keyup","keyCode","12","__extends","extendStatics","setPrototypeOf","__proto__","Array","b","__","constructor","create","mapInteractionBase_1","checkDefined","provide_1","nm","MapMoveCls","_super","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","undefined","_zoomLevel","init","theMap","on","e","_updateMapExtent","triggerLyrLoad","type","triggerMoveCallback","theView","getZoom","extentArray","calculateExtent","getSize","minX","minY","maxX","maxY","lyr","index","eventType","undefinedOrNull","definedAndNotNull","indexOf","clearTimeout","abort","callbackFunc","mapMoveBefore","mapMoveMakeGetParams","__this_1","innerFunction","theLayer","theIndex","_innerThis","url","mapMoveParams","mapMoveCallback","loadCallback","fail","jqXHR","statusText","console","log","always","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","_checkInit","push","id","addCallback","func","context","delay","13","FeatureLayerProperties","feature","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","find","_ease","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","_map","addOverlay","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","popupHtml","html","_triggerFeatSelect","nextPopup","trigger","setPosition","scrollTop","pixel","getEventPixel","hit","forEachFeatureAtPixel","vLyr","olLayer","getTargetElement","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","j","hasLyr","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","theStyle","olStyle","setZIndex","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","14","quickMapBase","options","divId","center","x","y","zoom","baseSwitcher","fullScreen","addGeocode","css","osmLayer","Tile","OSM","proj","Projection","code","coordinates","controls","control","defaults","attributionOptions","collapsible","view","View","minZoom","maxZoom","Map","addControl","FullScreen","geocode_1","2","3","replace","r","Math","random","toString","4","mapPopupCls_1","mapPopup","5","MapInteractionBase","subtype","_initialized","_subtype","initialized","msg","alert","checkInit","6","quickMap","quickMapBase_1","mapMove_1","mapPopup_1","61","mapToBase64","callback","resize","mapTarget","originalHeight","height","originalWidth","originalPosition","position","originalCenter","originalZoom","updateSize","once","extentUtil_1","fitToMap","event","canvas","toDataURL","ex","renderSync","66","hasExtent","layers_1","getFeatures","ext","getExtent","mp","zoomOut","fit","7","mapMoveCls_1","mapMove","71","quickMap_1","mapToBase64_1","8","proj3070","9","input"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EA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A,SAAU/X,EAAQD,EAASH,GAEjC,YgB3zCA,SAAAoW,GAAkBzV,GACdmK,QAAQC,IAAIpK,GhB4zChBI,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GgBn0CtD,IAAA0X,GAAApY,EAAA,GACAqY,EAAArY,EAAA,IACIiD,EAAMmV,EAAA9V,SAAU8Q,YAAY,GAEhCrR,QAAY,IAAIkB,EAMhBgI,WAAW,WACPoN,EAAAlC,YAAYlT,EAAKmT,GAAWnK,MAAO,QACpC,KAGHnB,QAAQC,IAAI,ahBo0CNuN,EACA,SAAUlY,EAAQD,EAASH,GAEjC,YAEAe,QAAOC,eAAeb,EAAS,cAAgBO,OAAO,GiBv1CtD,IAAAiC,GAAA3C,EAAA,EAGaG,GAAA+F,SAAW,GAAIvD,GAAG8Q,KAAKC,YAAYC,KAAM,cACzCxT,EAAAgG,SAAW,GAAIxD,GAAG8Q,KAAKC,YAAYC,KAAM,cACzCxT,EAAAoY,SAAW,GAAI5V,GAAG8Q,KAAKC,YAAYC,KAAM,ejB81ChD6E,EACA,SAAUpY,EAAQD,EAASH,GAEjC,YkBj2CA,SAAA0J,GAAiC+O,GAG7B,MAAyB,UAAVA,GAAmC,OAAVA,EAW5C,QAAA9O,GAAmC8O,GAG/B,OAAS/O,EAAgB+O,GlBk1C7B1X,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GkB32CtD,IAAA4G,GAAAtH,EAAA,GACIuH,EAAKD,EAAAhF,QAAQ,oBAOjBnC,GAAAuJ,kBAMAnC,EAAGmC,gBAAkBA,EAQrBvJ,EAAAwJ,oBAMApC,EAAGoC,kBAAoBA","file":"geocode.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 71);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar ol = __webpack_require__(2);\r\nvar projections_1 = __webpack_require__(8);\r\nvar invalidClass = 'geocoder-invalid';\r\nvar geocoderLoadingClass = 'geocoder-loading';\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\nvar Geocode = (function () {\r\n function Geocode(mapDiv, map) {\r\n var _this = this;\r\n var inputGuid = makeGuid_1.makeGuid();\r\n var buttonGuid = makeGuid_1.makeGuid();\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }),\r\n stroke: new ol.style.Stroke({ color: 'red', width: 1 })\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n (\"<input type=\\\"text\\\" id=\\\"\" + inputGuid + \"\\\">\") +\r\n (\"<button id=\\\"\" + buttonGuid + \"\\\">Search</button>\") +\r\n '</div>');\r\n this.theButton = document.getElementById(buttonGuid);\r\n this.theInput = document.getElementById(inputGuid);\r\n this.reset();\r\n var $theButton = $(this.theButton);\r\n var $theInput = $(this.theInput);\r\n $theButton.click(function (evt) {\r\n evt.preventDefault();\r\n $theButton.addClass(geocoderLoadingClass);\r\n _this.theButton.disabled = true;\r\n _this.indicationLayer.getSource().clear();\r\n $.get(\"https://geocode.xyz/\" + _this.theInput.value + \"?geoit=json\", {}, function (d) {\r\n var lat = parseFloat(d['latt']);\r\n var lon = parseFloat(d['longt']);\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n _this.theInput.title = 'Specified Location Invalid';\r\n _this.theButton.title = 'Specified Location Invalid';\r\n }\r\n else {\r\n var v = _this.map.getView();\r\n var p = new ol.geom.Point([lon, lat]);\r\n var feat = new ol.Feature(p);\r\n _this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(projections_1.proj4326, projections_1.proj3857);\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n $theButton.removeClass(geocoderLoadingClass);\r\n _this.theButton.disabled = false;\r\n }, 'json');\r\n });\r\n $(this.theInput).keyup(function (evt) {\r\n evt.preventDefault();\r\n _this.theButton.disabled = _this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n _this.theInput.title = '';\r\n _this.theButton.title = '';\r\n if (!_this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n });\r\n }\r\n Geocode.prototype.reset = function () {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n };\r\n return Geocode;\r\n}());\r\nexports.Geocode = Geocode;\r\n\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar checkDefined = __webpack_require__(9);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nvar MapMoveCls = (function (_super) {\r\n __extends(MapMoveCls, _super);\r\n /**\r\n * constructor called implicitly\r\n */\r\n function MapMoveCls() {\r\n var _this = _super.call(this, 'map move') || this;\r\n _this._arrLyrRequest = [];\r\n _this._arrLyrTimeout = [];\r\n _this._arrLayer = [];\r\n _this._lookupLayer = {};\r\n _this._mapMoveCallbacks = [];\r\n _this._mapMoveCallbacksLookup = {};\r\n _this._mapMoveCallbackDelays = [];\r\n _this._mapMoveCallbackContext = [];\r\n _this._mapMoveCallbackTimeout = [];\r\n _this._mapExtent = undefined;\r\n _this._zoomLevel = undefined;\r\n return _this;\r\n }\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n MapMoveCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n _this._updateMapExtent();\r\n // trigger the layer updates\r\n for (var i = 0; i < _this._arrLayer.length; i++) {\r\n _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n }\r\n // trigger the map callbacks\r\n for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n _this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n };\r\n MapMoveCls.prototype._updateMapExtent = function () {\r\n var theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n var extentArray = theView.calculateExtent(this.map.getSize());\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n };\r\n Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n /**\r\n * return the map extent\r\n */\r\n get: function () {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n return this._mapExtent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n }\r\n else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n }\r\n else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n // dummy callback used if before load returns false\r\n var callbackFunc = function () { };\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n var __this_1 = this;\r\n callbackFunc = function () {\r\n function innerFunction(theLayer, theIndex) {\r\n var _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this_1, lyr, index);\r\n };\r\n }\r\n else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n };\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n throw 'either the function index or the id must be defined';\r\n }\r\n if (typeof ind !== 'number') {\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n if (ind < 0) {\r\n console.log('function not found');\r\n return;\r\n }\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n var ctx = this._mapMoveCallbackContext[ind];\r\n var theFunc = this._mapMoveCallbacks[ind];\r\n var __this = this;\r\n var f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n };\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n };\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId) {\r\n functionId = makeGuid_1.default();\r\n }\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n };\r\n return MapMoveCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapMoveCls = MapMoveCls;\r\nnm.MapMoveCls = MapMoveCls;\r\nexports.default = MapMoveCls;\r\n\n\n/***/ }),\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\nvar FeatureLayerProperties = (function () {\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n get: function () {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n }\r\n else {\r\n return this.layer.name;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FeatureLayerProperties;\r\n}());\r\nexports.FeatureLayerProperties = FeatureLayerProperties;\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nvar MapPopupCls = (function (_super) {\r\n __extends(MapPopupCls, _super);\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n /**\r\n * map popup constructor\r\n */\r\n function MapPopupCls() {\r\n var _this = _super.call(this, 'map popup') || this;\r\n _this._arrPopupLayerIds = [];\r\n _this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n _this._arrPopupContentFunction = [];\r\n _this._$popupContainer = undefined;\r\n _this._$popupContent = undefined;\r\n _this._$popupCloser = undefined;\r\n _this._popupOverlay = undefined;\r\n _this._selectionLayers = [];\r\n _this._selectionLayerLookup = {};\r\n _this._mapClickFunctions = [];\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n _this._popupChangedFunctions = [];\r\n _this._esriMapServiceLayers = [];\r\n _this._popupOpen = false;\r\n _this._popupCoordinate = null;\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n _this._popupContentLength = 0;\r\n return _this;\r\n }\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n MapPopupCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n var $map;\r\n var target = this.map.getTarget();\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n $map.append('<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>');\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n var _ease = function (n) {\r\n return ol.easing.inAndOut(n);\r\n };\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n this._map.addOverlay(this._popupOverlay);\r\n this._$popupCloser.click(function (evt) {\r\n _this.closePopup();\r\n });\r\n // display popup on click\r\n this._map.on('singleclick', function (evt) {\r\n _this.closePopup();\r\n _this._popupCoordinate = evt['coordinate'];\r\n // esri map service layers\r\n if (_this._esriMapServiceLayers.length > 0) {\r\n var queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n imageDisplay: _this._map.getSize().join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n var l = _a[_i];\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n var featObj = layerFeatureObjectArray[i];\r\n var props = featObj.feature.getProperties();\r\n var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n }\r\n else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse;\r\n _this._passThroughLayerFeatureArray.push(featObj);\r\n }\r\n else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n _this._currentPopupIndex = -1;\r\n var popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n popupHtml += \"<span> of </span>\";\r\n popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n popupHtml += \"<span> - </span>\";\r\n popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n popupHtml += '</div>';\r\n _this._$popupContent.html(popupHtml);\r\n _this._$popupContent.find('.previous-popup').click(function () {\r\n if (_this._popupContentLength == 1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == 0) {\r\n _this._currentPopupIndex = _this._popupContentLength - 1;\r\n }\r\n else {\r\n _this._currentPopupIndex--;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n var nextPopup = _this._$popupContent.find('.next-popup');\r\n nextPopup.click(function () {\r\n if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n _this._currentPopupIndex = 0;\r\n }\r\n else {\r\n _this._currentPopupIndex++;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n if (_this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n _this._$popupContent.scrollTop(0);\r\n _this._popupOpen = true;\r\n }\r\n });\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', function (evt) {\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n var hit = false;\r\n _this.map.forEachFeatureAtPixel(pixel, function (f, l) {\r\n if (hit) {\r\n return;\r\n }\r\n for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) {\r\n var vLyr = _a[_i];\r\n if (vLyr.olLayer == l) {\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n var mapElement = _this.map.getTargetElement();\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n };\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n MapPopupCls.prototype._triggerFeatSelect = function () {\r\n var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f(this._$popupContent);\r\n }\r\n };\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n featLayerObject.popupContent = popupContent;\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n };\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n var _this = this;\r\n var layerFeatureObjectArray = [];\r\n this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n var hasLyr = false;\r\n var j;\r\n var lyr = null;\r\n for (j = 0; j < _this._arrPopupLayers.length; j++) {\r\n lyr = _this._arrPopupLayers[j];\r\n if (lyr.olLayer === layer) {\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j]));\r\n }\r\n });\r\n return layerFeatureObjectArray;\r\n };\r\n MapPopupCls.prototype.closePopup = function () {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n return false;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n };\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n this._checkInit();\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n var theStyle;\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n }\r\n else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n var selectionLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n });\r\n selectionLayer.setZIndex(100);\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n return selectionLayer;\r\n };\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n return selectionLayer;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n };\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n return selectionLayer;\r\n };\r\n MapPopupCls.prototype.clearSelection = function () {\r\n this._checkInit();\r\n for (var i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f();\r\n }\r\n };\r\n ;\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n this._mapClickFunctions.push(func);\r\n };\r\n return MapPopupCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapPopupCls = MapPopupCls;\r\nnm.MapPopupCls = MapPopupCls;\r\nexports.default = MapPopupCls;\r\n\n\n/***/ }),\n\n/***/ 14:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar geocode_1 = __webpack_require__(11);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nfunction quickMapBase(options) {\r\n if (options === void 0) { options = {}; }\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || { x: -10018378, y: 5574910 };\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n var $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n var osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuR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Mk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rX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g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n var coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n var controls = ol.control.defaults({\r\n attributionOptions: { collapsible: false }\r\n });\r\n var view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n var map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n if (options.addGeocode) {\r\n new geocode_1.Geocode(document.getElementById(options.divId), map);\r\n }\r\n return map;\r\n}\r\nexports.quickMapBase = quickMapBase;\r\nnm.quickMapBase = quickMapBase;\r\nexports.default = quickMapBase;\r\n\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports) {\n\nmodule.exports = ol;\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapPopupCls_1 = __webpack_require__(13);\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexports.mapPopup = new mapPopupCls_1.default();\r\nexports.default = exports.mapPopup;\r\n\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * base interaction\r\n */\r\nvar MapInteractionBase = (function () {\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n function MapInteractionBase(subtype) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n MapInteractionBase.prototype.init = function (theMap) {\r\n if (!this._initialized) {\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n };\r\n Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get: function () {\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get: function () {\r\n return this._initialized;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n MapInteractionBase.prototype._checkInit = function () {\r\n if (!this.initialized) {\r\n var msg = this._subtype + \" object not initialized\";\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n };\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n MapInteractionBase.prototype.checkInit = function () {\r\n this._checkInit();\r\n };\r\n return MapInteractionBase;\r\n}());\r\nexports.MapInteractionBase = MapInteractionBase;\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexports.default = MapInteractionBase;\r\n\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMapBase_1 = __webpack_require__(14);\r\nvar provide_1 = __webpack_require__(0);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nfunction quickMap(options) {\r\n if (options === void 0) { options = {}; }\r\n var m = quickMapBase_1.quickMapBase(options);\r\n mapMove_1.default.init(m);\r\n mapPopup_1.default.init(m);\r\n return m;\r\n}\r\nexports.quickMap = quickMap;\r\nnm.quickMap = quickMap;\r\nexports.default = quickMap;\r\n\n\n/***/ }),\n\n/***/ 61:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar extentUtil_1 = __webpack_require__(66);\r\n/**\r\n *\r\n * @param {ol.Map} map\r\n * @param {(imgData) => string} callback\r\n * @param {iMapToBase64Options} options\r\n * @returns {any}\r\n */\r\nfunction mapToBase64(map, callback, options) {\r\n options = options || {};\r\n if (typeof options.delay === 'number') {\r\n //pass\r\n }\r\n else if (options.layers || options.resize) {\r\n options.delay = 2000;\r\n }\r\n else {\r\n options.delay = 1;\r\n }\r\n var mapTarget = map.getTargetElement();\r\n var originalHeight = mapTarget.style.height;\r\n var originalWidth = mapTarget.style.width;\r\n var originalPosition = mapTarget.style.position;\r\n var originalCenter = map.getView().getCenter();\r\n var originalZoom = map.getView().getZoom();\r\n // let mapTimeout = 1;\r\n if (options.resize) {\r\n mapTarget.style.height = options.resize.height + \"px\";\r\n mapTarget.style.width = options.resize.width + \"px\";\r\n mapTarget.style.position = 'absolute';\r\n map.updateSize();\r\n }\r\n map.once('postrender', function () {\r\n if (options.layers) {\r\n extentUtil_1.fitToMap(options.layers, map);\r\n }\r\n setTimeout(function () {\r\n map.once('postcompose', function (event) {\r\n try {\r\n var canvas = event['context'].canvas;\r\n var imgData = canvas.toDataURL('image/png');\r\n callback(imgData);\r\n }\r\n catch (ex) {\r\n // reportParams['imgData'] = null;\r\n }\r\n finally {\r\n if (options.resize) {\r\n mapTarget.style.height = originalHeight;\r\n mapTarget.style.width = originalWidth;\r\n mapTarget.style.position = originalPosition;\r\n map.updateSize();\r\n map.getView().setCenter(originalCenter);\r\n map.getView().setZoom(originalZoom);\r\n }\r\n if (options.layers) {\r\n extentUtil_1.fitToMap(options.layers, map);\r\n }\r\n }\r\n });\r\n map.renderSync();\r\n }, options.delay);\r\n });\r\n map.updateSize();\r\n}\r\nexports.mapToBase64 = mapToBase64;\r\nexports.default = mapToBase64;\r\n\n\n/***/ }),\n\n/***/ 66:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 7/18/2016.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n *\r\n * @param {Array<LayerBaseVector>|Array<ol.layer.Vector>|LayerBaseVector|ol.layer.Vector|*} layers - array of layers or single\r\n * @returns {ol.Extent|Array<number>|*} - collective extent\r\n */\r\nfunction calculateExtent(layers) {\r\n \"use strict\";\r\n var hasExtent = false;\r\n var minX = 10E100;\r\n var minY = 10E100;\r\n var maxX = -10E100;\r\n var maxY = -10E100;\r\n for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) {\r\n var lyr = layers_1[_i];\r\n var olLayer = lyr.olLayer || lyr;\r\n if (olLayer.getSource().getFeatures().length > 0) {\r\n hasExtent = true;\r\n var ext = olLayer.getSource().getExtent();\r\n minX = ext[0] < minX ? ext[0] : minX;\r\n minY = ext[1] < minY ? ext[1] : minY;\r\n maxX = ext[2] > maxX ? ext[2] : maxX;\r\n maxY = ext[3] > maxY ? ext[3] : maxY;\r\n }\r\n }\r\n if (hasExtent) {\r\n return [minX, minY, maxX, maxY];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.calculateExtent = calculateExtent;\r\nnm.calculateExtent = calculateExtent;\r\n/**\r\n * given one or an array of layers, fit to the map\r\n * @param layers - array of layers or single\r\n * @param mp - the map to fit\r\n * @param [zoomOut=undefined] - levels to zoom out after fit\r\n */\r\nfunction fitToMap(layers, mp, zoomOut) {\r\n \"use strict\";\r\n var ext = calculateExtent(layers);\r\n if (typeof ext == 'undefined') {\r\n return;\r\n }\r\n mp.getView().fit(ext, mp.getSize());\r\n if (typeof zoomOut == 'number') {\r\n mp.getView().setZoom(mp.getView().getZoom() - zoomOut);\r\n }\r\n}\r\nexports.fitToMap = fitToMap;\r\nnm.calculateExtent = calculateExtent;\r\n\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapMoveCls_1 = __webpack_require__(12);\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\nexports.mapMove = new mapMoveCls_1.default();\r\nexports.default = exports.mapMove;\r\n\n\n/***/ }),\n\n/***/ 71:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMap_1 = __webpack_require__(6);\r\nvar mapToBase64_1 = __webpack_require__(61);\r\nvar map = quickMap_1.default({ addGeocode: true });\r\nwindow['map'] = map;\r\nfunction callback(d) {\r\n console.log(d);\r\n}\r\nsetTimeout(function () {\r\n mapToBase64_1.mapToBase64(map, callback, { delay: 1500 });\r\n}, 2000);\r\nconsole.log('it works');\r\n\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nvar ol = __webpack_require__(2);\r\nexports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' });\r\nexports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' });\r\nexports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' });\r\n\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util.checkDefined');\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nfunction undefinedOrNull(input) {\r\n \"use strict\";\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\nexports.undefinedOrNull = undefinedOrNull;\r\nnm.undefinedOrNull = undefinedOrNull;\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nfunction definedAndNotNull(input) {\r\n \"use strict\";\r\n return !(undefinedOrNull(input));\r\n}\r\nexports.definedAndNotNull = definedAndNotNull;\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// geocode.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 71);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 99693f14fcb3e83c98ca","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (f, l) => {\r\n if (hit) {\r\n return;\r\n }\r\n\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == l){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm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XlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHA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sC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","import ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {fitToMap} from '../olHelpers/extentUtil';\r\nimport {layers} from \"../\";\r\n\r\ndeclare const glob: Object;\r\n\r\nexport interface iMapToBase64Options {\r\n resize?: { width: number, height: number };\r\n layers?: LayerBaseVector[] | LayerBaseVector[];\r\n delay?: number;\r\n}\r\n\r\n\r\n/**\r\n *\r\n * @param {ol.Map} map\r\n * @param {(imgData) => string} callback\r\n * @param {iMapToBase64Options} options\r\n * @returns {any}\r\n */\r\nexport function mapToBase64(map: ol.Map, callback: (imgData: string) => any, options?: iMapToBase64Options): any {\r\n options = options || {};\r\n\r\n if (typeof options.delay === 'number') {\r\n //pass\r\n } else if (options.layers || options.resize) {\r\n options.delay = 2000;\r\n } else {\r\n options.delay = 1;\r\n }\r\n\r\n let mapTarget: HTMLDivElement = map.getTargetElement() as HTMLDivElement;\r\n\r\n let originalHeight = mapTarget.style.height;\r\n let originalWidth = mapTarget.style.width;\r\n let originalPosition = mapTarget.style.position;\r\n let originalCenter = map.getView().getCenter();\r\n let originalZoom = map.getView().getZoom();\r\n\r\n // let mapTimeout = 1;\r\n\r\n if (options.resize) {\r\n mapTarget.style.height = `${options.resize.height}px`;\r\n mapTarget.style.width = `${options.resize.width}px`;\r\n mapTarget.style.position = 'absolute';\r\n map.updateSize();\r\n }\r\n\r\n map.once('postrender', () => {\r\n\r\n if (options.layers) {\r\n fitToMap(options.layers, map);\r\n }\r\n\r\n setTimeout(() => {\r\n map.once('postcompose', (event) => {\r\n try {\r\n let canvas: HTMLCanvasElement = event['context'].canvas;\r\n let imgData = canvas.toDataURL('image/png');\r\n callback(imgData);\r\n }\r\n catch (ex) {\r\n // reportParams['imgData'] = null;\r\n } finally {\r\n if (options.resize) {\r\n mapTarget.style.height = originalHeight;\r\n mapTarget.style.width = originalWidth;\r\n mapTarget.style.position = originalPosition;\r\n\r\n map.updateSize();\r\n map.getView().setCenter(originalCenter);\r\n map.getView().setZoom(originalZoom);\r\n }\r\n\r\n if (options.layers) {\r\n fitToMap(options.layers, map);\r\n }\r\n }\r\n });\r\n map.renderSync();\r\n }, options.delay);\r\n });\r\n\r\n map.updateSize();\r\n\r\n}\r\n\r\nexport default mapToBase64;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapToBase64.ts","/**\r\n * Created by gavorhes on 7/18/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\n\r\n\r\nconst nm = provide('util');\r\n\r\n/**\r\n *\r\n * @param {Array<LayerBaseVector>|Array<ol.layer.Vector>|LayerBaseVector|ol.layer.Vector|*} layers - array of layers or single\r\n * @returns {ol.Extent|Array<number>|*} - collective extent\r\n */\r\nexport function calculateExtent(layers: ol.layer.Vector[]|LayerBaseVector[]): ol.Extent|Array<number>| ol.Extent| number[] {\r\n \"use strict\";\r\n\r\n let hasExtent = false;\r\n\r\n let minX = 10E100;\r\n let minY = 10E100;\r\n let maxX = -10E100;\r\n let maxY = -10E100;\r\n\r\n for (let lyr of layers) {\r\n\r\n let olLayer: ol.layer.Vector = (lyr as LayerBaseVector).olLayer || lyr as ol.layer.Vector;\r\n \r\n \r\n if (olLayer.getSource().getFeatures().length > 0) {\r\n hasExtent = true;\r\n let ext = olLayer.getSource().getExtent();\r\n minX = ext[0] < minX ? ext[0] : minX;\r\n minY = ext[1] < minY ? ext[1] : minY;\r\n maxX = ext[2] > maxX ? ext[2] : maxX;\r\n maxY = ext[3] > maxY ? ext[3] : maxY;\r\n }\r\n }\r\n\r\n if (hasExtent) {\r\n return [minX, minY, maxX, maxY];\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\nnm.calculateExtent = calculateExtent;\r\n \r\n\r\n/**\r\n * given one or an array of layers, fit to the map\r\n * @param layers - array of layers or single\r\n * @param mp - the map to fit\r\n * @param [zoomOut=undefined] - levels to zoom out after fit\r\n */\r\nexport function fitToMap(layers: ol.layer.Vector[]|LayerBaseVector[], mp: ol.Map, zoomOut?: number){\r\n \"use strict\";\r\n\r\n let ext = calculateExtent(layers);\r\n \r\n if (typeof ext == 'undefined'){\r\n return;\r\n }\r\n \r\n mp.getView().fit(ext as ol.Extent, mp.getSize());\r\n \r\n if (typeof zoomOut == 'number'){\r\n mp.getView().setZoom(mp.getView().getZoom() - zoomOut);\r\n }\r\n}\r\n\r\nnm.calculateExtent = calculateExtent;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/extentUtil.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","import ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\nimport {mapToBase64} from '../../olHelpers/mapToBase64';\r\nlet map = quickMap({addGeocode: true});\r\n\r\nwindow['map'] = map;\r\n\r\nfunction callback(d: string){\r\n console.log(d);\r\n}\r\n\r\nsetTimeout(() => {\r\n mapToBase64(map, callback, {delay: 1500});\r\n}, 2000);\r\n\r\n\r\nconsole.log('it works');\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/geocode.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/itsMap.js b/test/serve/js/itsMap.js index d3784e6c47c8db889a51348fa86ab20a8a058af3..99b99d3e077415994c41a947c7b5b2074da60ea0 100644 --- a/test/serve/js/itsMap.js +++ b/test/serve/js/itsMap.js @@ -1,3155 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 73); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -module.exports = ol; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/8/2015. - */ -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers'); -/** - * base interaction - */ -var MapInteractionBase = (function () { - /** - * map interaction base - * @param subtype - the interaction subtype - */ - function MapInteractionBase(subtype) { - this._map = null; - this._initialized = false; - this._subtype = subtype; - } - /** - * base initializer, returns true for already initialized - * @param theMap - the ol Map - * @returns true for already initialized - */ - MapInteractionBase.prototype.init = function (theMap) { - if (!this._initialized) { - this._map = theMap; - this._initialized = true; - } - }; - Object.defineProperty(MapInteractionBase.prototype, "map", { - /** - * get reference to the ol map object - * @returns {ol.Map} the map object - */ - get: function () { - return this._map; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MapInteractionBase.prototype, "initialized", { - /** - * get if is initialized - * @returns {boolean} is initialized - */ - get: function () { - return this._initialized; - }, - enumerable: true, - configurable: true - }); - /** - * Check the initialization status and throw exception if not valid yet - * @protected - */ - MapInteractionBase.prototype._checkInit = function () { - if (!this.initialized) { - var msg = this._subtype + " object not initialized"; - alert(msg); - console.log(msg); - throw msg; - } - }; - /** - * Check the initialization status and throw exception if not valid yet - */ - MapInteractionBase.prototype.checkInit = function () { - this._checkInit(); - }; - return MapInteractionBase; -}()); -exports.MapInteractionBase = MapInteractionBase; -nm.MapInteractionBase = MapInteractionBase; -exports.default = MapInteractionBase; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMapBase_1 = __webpack_require__(14); -var provide_1 = __webpack_require__(0); -var mapMove_1 = __webpack_require__(6); -var mapPopup_1 = __webpack_require__(7); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param {object} [options={}] config options - * @param {string} [options.divId=map] map div id - * @param {object} [options.center={}] center config object - * @param {number} [options.center.x=-10018378] center x, web mercator x or lon - * @param {number} [options.center.y=5574910] center y, web mercator y or lat - * @param {number} [options.zoom=7] zoom level - * @param {number} [options.minZoom=undefined] min zoom - * @param {number} [options.maxZoom=undefined] max zoom - * @param {boolean} [options.baseSwitcher=true] if add base map switcher - * @param {boolean} [options.fullScreen=false] if add base map switcher - * @returns {ol.Map} the ol map - */ -function quickMap(options) { - if (options === void 0) { options = {}; } - var m = quickMapBase_1.quickMapBase(options); - mapMove_1.default.init(m); - mapPopup_1.default.init(m); - return m; -} -exports.quickMap = quickMap; -nm.quickMap = quickMap; -exports.default = quickMap; - - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapMoveCls_1 = __webpack_require__(12); -/** - * The single map move object catch is that it is common to multimap pages - * @type {MapMoveCls} - */ -exports.mapMove = new mapMoveCls_1.default(); -exports.default = exports.mapMove; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapPopupCls_1 = __webpack_require__(13); -/** - * The single popup object catch is that it is common to multimap pages - * @type {MapPopupCls} - */ -exports.mapPopup = new mapPopupCls_1.default(); -exports.default = exports.mapPopup; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 10/3/2016. - */ -var ol = __webpack_require__(2); -exports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' }); -exports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' }); -exports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' }); - - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util.checkDefined'); -/** - * check if the input is undefined or null - * @param input - input pointer - * @returns true undefined or null - */ -function undefinedOrNull(input) { - "use strict"; - return (typeof input === 'undefined' || input === null); -} -exports.undefinedOrNull = undefinedOrNull; -nm.undefinedOrNull = undefinedOrNull; -/** - * check if the input is defined and not null - * @param input - input pointer - * @returns true defined and not null - */ -function definedAndNotNull(input) { - "use strict"; - return !(undefinedOrNull(input)); -} -exports.definedAndNotNull = definedAndNotNull; -nm.definedAndNotNull = definedAndNotNull; - - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var zoomResolutionConvert = __webpack_require__(17); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The base layer class - * @abstract - */ -var LayerBase = (function () { - /** - * The base layer for all others - * @param {string} url - url for source - * @param {object} options - config - * @param {string} [options.id=makeGuid()] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] - the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] - the z index for the layer - * @param {function} [options.loadCallback] - function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend - */ - function LayerBase(url, options) { - if (options === void 0) { options = {}; } - options = options || {}; - if (typeof url !== 'string') { - throw 'Invalid URL'; - } - this._url = url; - this._params = typeof options.params == 'object' ? options.params : {}; - this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false; - this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true; - this.id = options.id || makeGuid_1.default(); - this._name = options.name || 'Unnamed Layer'; - this.animate = false; - this._opacity = typeof options.opacity == 'number' ? options.opacity : 1; - if (this._opacity > 1) { - this._opacity = 1; - } - else if (this._opacity < 0) { - this._opacity = 0; - } - this._visible = typeof options.visible === 'boolean' ? options.visible : true; - this._source = undefined; - /** - * - * @protected - */ - this._olLayer = undefined; - this._loaded = false; - this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom); - if (typeof this._maxResolution !== 'undefined') { - this._maxResolution += 0.00001; - } - this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom); - this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined; - this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined; - this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0; - this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () { - }; - this._legendContent = ''; - if (this._legendCheckbox) { - this._legendContent += "<input type=\"checkbox\" " + (this.visible ? 'checked' : '') + " " + - ("class=\"legend-check\" id=\"" + this.id + "-legend-layer-check\"><span></span>"); - this._legendContent += "<label for=\"" + this.id + "-legend-layer-check\" class=\"legend-layer-name\">" + this.name + "</label>"; - } - else { - this._legendContent += "<label class=\"legend-layer-name\">" + this.name + "</label>"; - } - this._$legendDiv = null; - this._applyCollapseCalled = false; - this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined); - } - /** - * base load function, sets _loaded = true if it is not already - * @protected - * @returns {boolean} if already loaded - */ - LayerBase.prototype._load = function () { - if (this.loaded == true) { - return true; - } - else { - this._loaded = true; - return false; - } - }; - /** - * Get the legend html, be sure to only add to the DOM once - * @returns {string} html for layer wrapped in a div - */ - LayerBase.prototype.getLegendDiv = function () { - return "<div class=\"legend-layer-div\" id=\"" + this.id + "-legend-layer-div\">" + this._legendContent + "</div>"; - }; - /** - * - * @param additionalContent - additional content to add to legend - * @private - */ - LayerBase.prototype._addLegendContent = function (additionalContent) { - if (additionalContent === void 0) { additionalContent = ''; } - var addCollapse = additionalContent.indexOf('<ul>') > -1; - if (addCollapse) { - additionalContent = '<span class="legend-items-expander" title="Expand/Collapse">▼</span>' + additionalContent; - } - this._legendContent += additionalContent; - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - this._$legendDiv.append(additionalContent); - this.applyCollapse(); - } - }; - /** - * add additional content to the legend - * @param {string} [additionalContent=] - additonal content to add - */ - LayerBase.prototype.addLegendContent = function (additionalContent) { - this._addLegendContent(additionalContent); - }; - LayerBase.prototype.applyCollapse = function () { - if (this._applyCollapseCalled) { - console.log('collapse already applied'); - return undefined; - } - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - var $expander = this._$legendDiv.find('.legend-items-expander'); - if ($expander.length > 0) { - this._applyCollapseCalled = true; - $expander.click(function () { - var $this = $(this); - $this.siblings('ul').slideToggle(); - if ($this.hasClass('legend-layer-group-collapsed')) { - $this.removeClass('legend-layer-group-collapsed'); - $this.html('▼'); - } - else { - $this.addClass('legend-layer-group-collapsed'); - $this.html('▶'); - } - }); - if (this._legendCollapse) { - $expander.trigger('click'); - } - } - } - }; - /** - * trick to refresh the layer - */ - LayerBase.prototype.refresh = function () { - if (this.source) { - this.source.refresh(); - } - }; - Object.defineProperty(LayerBase.prototype, "id", { - get: function () { - return this._id; - }, - set: function (newId) { - this._id = newId; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "animate", { - get: function () { - return this._animate; - }, - set: function (animate) { - this._animate = animate; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "legendContent", { - /** - * get the legend content - * @type {string} - */ - get: function () { - return this._legendContent; - }, - /** - * set the legend content directly - * @param {string} newVal - new content - * @protected - */ - set: function (newVal) { - this._legendContent = newVal; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "params", { - /** - * get the map get params - * @type {object} - */ - get: function () { - return this._params; - }, - /** - * set the map get params - * @param {object} newParams - new get params - * @protected - */ - set: function (newParams) { - this._params = newParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minResolution", { - /** - * get the minimum resolution - * @type {number|*} - */ - get: function () { - return this._minResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxResolution", { - /** - * get the maximum resolution - * @type {number|*} - */ - get: function () { - return this._maxResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minZoom", { - /** - * get min zoom - * @type {number|*} - */ - get: function () { - return this._minZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxZoom", { - /** - * get max zoom - * @type {number|*} - */ - get: function () { - return this._maxZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "url", { - /** - * get the url - * @type {string} - */ - get: function () { - return this._url; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "visible", { - /** - * Get the layer visibility - * @type {boolean} - */ - get: function () { - return this._visible; - }, - /** - * set the visibility - * @param visibility - */ - set: function (visibility) { - this.setVisible(visibility); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setVisible = function (visibility) { - this._visible = visibility; - if (this.olLayer) { - this.olLayer.setVisible(this._visible); - if (visibility && !this._loaded) { - this._load(); - } - } - }; - Object.defineProperty(LayerBase.prototype, "opacity", { - /** - * Get the layer opacity - * @type {number} - */ - get: function () { - return this._opacity; - }, - /** - * Set the layer opacity - * @param {number} opacity - layer opacity - */ - set: function (opacity) { - this._opacity = opacity; - if (this.olLayer) { - this.olLayer.setOpacity(this._opacity); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "name", { - /** - * Get the layer name - * @type {string} - */ - get: function () { - return this._name; - }, - /** - * set the layer name - * @param {string} newName - the new name - */ - set: function (newName) { - this._name = newName; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "loaded", { - /** - * Check if the layer is loaded - * @type {boolean} - */ - get: function () { - return this._loaded; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "source", { - /** - * get the layer source - * @type {*} - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getSource = function () { - return this._source; - }; - Object.defineProperty(LayerBase.prototype, "zIndex", { - /** - * get the z index - */ - get: function () { - return this._zIndex; - }, - /** - * set the z index - */ - set: function (newZ) { - this._zIndex = newZ; - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setZIndex = function (newZ) { - }; - Object.defineProperty(LayerBase.prototype, "olLayer", { - /** - * the the ol layer - */ - get: function () { - return this.getOlLayer(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getOlLayer = function () { - return this._olLayer; - }; - return LayerBase; -}()); -exports.LayerBase = LayerBase; -nm.LayerBase = LayerBase; -exports.default = LayerBase; - - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var $ = __webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var ol = __webpack_require__(2); -var projections_1 = __webpack_require__(8); -var invalidClass = 'geocoder-invalid'; -var geocoderLoadingClass = 'geocoder-loading'; -// let testAddress = '65 7th Street, Prairie du Sac, WI'; -var Geocode = (function () { - function Geocode(mapDiv, map) { - var _this = this; - var inputGuid = makeGuid_1.makeGuid(); - var buttonGuid = makeGuid_1.makeGuid(); - this.map = map; - this.indicationLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: new ol.style.Style({ - image: new ol.style.Circle({ - radius: 12, - fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }), - stroke: new ol.style.Stroke({ color: 'red', width: 1 }) - }) - }) - }); - this.map.addLayer(this.indicationLayer); - $(mapDiv).append('<div class="geocoder-el">' + - ("<input type=\"text\" id=\"" + inputGuid + "\">") + - ("<button id=\"" + buttonGuid + "\">Search</button>") + - '</div>'); - this.theButton = document.getElementById(buttonGuid); - this.theInput = document.getElementById(inputGuid); - this.reset(); - var $theButton = $(this.theButton); - var $theInput = $(this.theInput); - $theButton.click(function (evt) { - evt.preventDefault(); - $theButton.addClass(geocoderLoadingClass); - _this.theButton.disabled = true; - _this.indicationLayer.getSource().clear(); - $.get("https://geocode.xyz/" + _this.theInput.value + "?geoit=json", {}, function (d) { - var lat = parseFloat(d['latt']); - var lon = parseFloat(d['longt']); - if ((lat == 0 && lon == 0) || d['error']) { - $theInput.addClass(invalidClass); - _this.theInput.title = 'Specified Location Invalid'; - _this.theButton.title = 'Specified Location Invalid'; - } - else { - var v = _this.map.getView(); - var p = new ol.geom.Point([lon, lat]); - var feat = new ol.Feature(p); - _this.indicationLayer.getSource().addFeature(feat); - p.transform(projections_1.proj4326, projections_1.proj3857); - v.setCenter(p.getCoordinates()); - v.setZoom(13); - } - $theButton.removeClass(geocoderLoadingClass); - _this.theButton.disabled = false; - }, 'json'); - }); - $(this.theInput).keyup(function (evt) { - evt.preventDefault(); - _this.theButton.disabled = _this.theInput.value.length == 0; - $theInput.removeClass(invalidClass); - _this.theInput.title = ''; - _this.theButton.title = ''; - if (!_this.theButton.disabled && evt.keyCode == 13) { - $theButton.click(); - } - }); - } - Geocode.prototype.reset = function () { - this.theButton.disabled = true; - this.theInput.value = ''; - }; - return Geocode; -}()); -exports.Geocode = Geocode; - - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var checkDefined = __webpack_require__(9); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -/** - * assists with map move interactions, trigger callback functions - * @augments MapInteractionBase - */ -var MapMoveCls = (function (_super) { - __extends(MapMoveCls, _super); - /** - * constructor called implicitly - */ - function MapMoveCls() { - var _this = _super.call(this, 'map move') || this; - _this._arrLyrRequest = []; - _this._arrLyrTimeout = []; - _this._arrLayer = []; - _this._lookupLayer = {}; - _this._mapMoveCallbacks = []; - _this._mapMoveCallbacksLookup = {}; - _this._mapMoveCallbackDelays = []; - _this._mapMoveCallbackContext = []; - _this._mapMoveCallbackTimeout = []; - _this._mapExtent = undefined; - _this._zoomLevel = undefined; - return _this; - } - /** - * initialize the map move object - * @param theMap - the ol map - */ - MapMoveCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - this.map.getView().on(['change:center', 'change:resolution'], function (e) { - _this._updateMapExtent(); - // trigger the layer updates - for (var i = 0; i < _this._arrLayer.length; i++) { - _this.triggerLyrLoad(_this._arrLayer[i], i, e.type); - } - // trigger the map callbacks - for (var i = 0; i < _this._mapMoveCallbacks.length; i++) { - _this.triggerMoveCallback(i, e.type); - } - }); - }; - MapMoveCls.prototype._updateMapExtent = function () { - var theView = this.map.getView(); - this._zoomLevel = theView.getZoom(); - var extentArray = theView.calculateExtent(this.map.getSize()); - this._mapExtent = { - minX: extentArray[0], - minY: extentArray[1], - maxX: extentArray[2], - maxY: extentArray[3] - }; - }; - Object.defineProperty(MapMoveCls.prototype, "mapExtent", { - /** - * return the map extent - */ - get: function () { - if (!this._mapExtent) { - this._updateMapExtent(); - } - return this._mapExtent; - }, - enumerable: true, - configurable: true - }); - /** - * Trigger the layer load - * @param lyr the layer being acted on - * @param index index of the layer - * @param eventType the event triggering the load, as 'change:center' or 'change:resolution' - */ - MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) { - if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) { - throw 'need to define lyr or index'; - } - else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) { - index = this._arrLayer.indexOf(lyr); - } - else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) { - lyr = this._arrLayer[index]; - } - // clear the timeout - if (this._arrLyrTimeout[index] != null) { - clearTimeout(this._arrLyrTimeout[index]); - this._arrLyrTimeout[index] = null; - } - // abort if necessary and clear the request - if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) { - this._arrLyrRequest[index].abort(); - this._arrLyrRequest[index] = null; - } - // dummy callback used if before load returns false - var callbackFunc = function () { }; - if (lyr.mapMoveBefore(this._zoomLevel, eventType)) { - lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel); - var __this_1 = this; - callbackFunc = function () { - function innerFunction(theLayer, theIndex) { - var _innerThis = this; - this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) { - /** - * @type {LayerBaseVector} - */ - theLayer.mapMoveCallback(d); - theLayer.loadCallback(); - }, 'json').fail(function (jqXHR) { - if (jqXHR.statusText != 'abort') { - console.log('failed'); - console.log(theLayer.url); - console.log(theLayer.mapMoveParams); - } - }).always(function () { - _innerThis._arrLyrTimeout[theIndex] = null; - _innerThis._arrLyrRequest[theIndex] = null; - }); - } - innerFunction.call(__this_1, lyr, index); - }; - } - else { - lyr.clear(); - } - this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay); - }; - /** - * trigger the map move call back at the given index - * @param ind - the index of the layer - * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution' - * @param functionId=undefined the function id used to reference the added callback function - */ - MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) { - if (typeof ind == 'undefined' && typeof functionId == 'undefined') { - throw 'either the function index or the id must be defined'; - } - if (typeof ind !== 'number') { - ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]); - } - if (ind < 0) { - console.log('function not found'); - return; - } - // clear the timeout - if (this._mapMoveCallbackTimeout[ind] != null) { - clearTimeout(this._mapMoveCallbackTimeout[ind]); - this._mapMoveCallbackTimeout[ind] = null; - } - var ctx = this._mapMoveCallbackContext[ind]; - var theFunc = this._mapMoveCallbacks[ind]; - var __this = this; - var f = function () { - if (ctx !== null) { - theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType); - } - else { - theFunc(__this._mapExtent, __this._zoomLevel, eventType); - } - }; - this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]); - }; - /** - * Add a layer to the interaction - * @param lyr - layer to add - * @param triggerOnAdd - if the layer should be loaded on add - */ - MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) { - if (triggerOnAdd === void 0) { triggerOnAdd = true; } - if (this._arrLayer.indexOf(lyr) > -1) { - console.log('already added ' + lyr.name + ' to map move'); - return; - } - this._checkInit(); - this._arrLyrRequest.push(null); - this._arrLyrTimeout.push(null); - this._arrLayer.push(lyr); - this._lookupLayer[lyr.id] = lyr; - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerLyrLoad(lyr, this._arrLayer.length - 1); - } - }; - /** - * add a callback to the map move event - * @param func - callback function - * @param context - the context to use for this function - * @param delay=50 the delay before call load - * @param triggerOnAdd if the layer should be loaded on add to mapMove - * @param functionId optional id to reference the function later for outside triggering - */ - MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) { - if (this._mapMoveCallbacks.indexOf(func) > -1) { - console.log('this function already added to map move'); - return; - } - this._checkInit(); - if (!functionId) { - functionId = makeGuid_1.default(); - } - this._mapMoveCallbacks.push(func); - this._mapMoveCallbacksLookup[functionId] = func; - this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50); - this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null); - this._mapMoveCallbackTimeout.push(null); - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerMoveCallback(this._mapMoveCallbacks.length - 1); - } - }; - return MapMoveCls; -}(mapInteractionBase_1.default)); -exports.MapMoveCls = MapMoveCls; -nm.MapMoveCls = MapMoveCls; -exports.default = MapMoveCls; - - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -var FeatureLayerProperties = (function () { - /** - * - * @param feature the feature - * @param layer - the layer in the popup - * @param layerIndex - index of the layer - * @param selectionLayer - the ol selection layer - * @param [esriLayerName=undefined] - esri layer name - */ - function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) { - this.feature = feature; - this.layer = layer; - this.layerIndex = layerIndex; - this.selectionLayer = selectionLayer; - this.popupContent = ''; - this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined; - } - Object.defineProperty(FeatureLayerProperties.prototype, "layerName", { - get: function () { - if (typeof this.esriLayerName == 'string') { - return this.esriLayerName; - } - else { - return this.layer.name; - } - }, - enumerable: true, - configurable: true - }); - return FeatureLayerProperties; -}()); -exports.FeatureLayerProperties = FeatureLayerProperties; -/** - * map popup class - * @augments MapInteractionBase - */ -var MapPopupCls = (function (_super) { - __extends(MapPopupCls, _super); - /** - * Definition for openlayers style function - * @callback olStyleFunction - * ¶m feature the openlayers vector feature - * $param - */ - /** - * map popup constructor - */ - function MapPopupCls() { - var _this = _super.call(this, 'map popup') || this; - _this._arrPopupLayerIds = []; - _this._arrPopupLayers = []; - // this._arrPopupOlLayers = []; - _this._arrPopupContentFunction = []; - _this._$popupContainer = undefined; - _this._$popupContent = undefined; - _this._$popupCloser = undefined; - _this._popupOverlay = undefined; - _this._selectionLayers = []; - _this._selectionLayerLookup = {}; - _this._mapClickFunctions = []; - //let a = function($jqueryContent){console.log($jqueryContent)}; - //this._popupChangedLookup = {'a': a}; - _this._popupChangedFunctions = []; - _this._esriMapServiceLayers = []; - _this._popupOpen = false; - _this._popupCoordinate = null; - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - _this._popupContentLength = 0; - return _this; - } - /** - * map popup initialization - * @param {ol.Map} theMap - the ol map - */ - MapPopupCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - var $map; - var target = this.map.getTarget(); - if (typeof target == 'string') { - $map = $('#' + target); - } - else { - $map = $(target); - } - $map.append('<div class="ol-popup">' + - '<span class="ol-popup-closer">X</span>' + - '<div class="popup-content"></div>' + - '</div>'); - this._$popupContainer = $map.find('.ol-popup'); - this._$popupContent = $map.find('.popup-content'); - this._$popupCloser = $map.find('.ol-popup-closer'); - var _ease = function (n) { - return ol.easing.inAndOut(n); - }; - this._popupOverlay = new ol.Overlay({ - element: this._$popupContainer[0], - autoPan: true, - autoPanAnimation: { - duration: 250, - source: theMap.getView().getCenter(), - easing: _ease - } - }); - this._map.addOverlay(this._popupOverlay); - this._$popupCloser.click(function (evt) { - _this.closePopup(); - }); - // display popup on click - this._map.on('singleclick', function (evt) { - _this.closePopup(); - _this._popupCoordinate = evt['coordinate']; - // esri map service layers - if (_this._esriMapServiceLayers.length > 0) { - var queryParams = { - geometry: evt['coordinate'].join(','), - geometryType: 'esriGeometryPoint', - layers: 'all', - sr: _this._map.getView().getProjection().getCode().split(':')[1], - mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','), - imageDisplay: _this._map.getSize().join(',') + ',96', - returnGeometry: true, - tolerance: 15, - f: 'pjson' - }; - for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) { - var l = _a[_i]; - l.getPopupInfo(queryParams); - } - } - var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']); - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - for (var i = 0; i < layerFeatureObjectArray.length; i++) { - var featObj = layerFeatureObjectArray[i]; - var props = featObj.feature.getProperties(); - var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent); - //skip if return was false - if (popupContentResponse === false) { - //continue; - } - else if (typeof popupContentResponse == 'string') { - featObj.popupContent = popupContentResponse; - _this._passThroughLayerFeatureArray.push(featObj); - } - else { - featObj.selectionLayer.getSource().addFeature(featObj.feature); - } - } - _this._popupContentLength = _this._passThroughLayerFeatureArray.length; - _this._currentPopupIndex = -1; - var popupHtml = '<div class="ol-popup-nav">'; - popupHtml += '<span class="previous-popup ol-popup-nav-arrow">◀</span>'; - popupHtml += '<span class="next-popup ol-popup-nav-arrow">▶</span>'; - popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>"; - popupHtml += "<span> of </span>"; - popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>"; - popupHtml += "<span> - </span>"; - popupHtml += "<span class=\"current-popup-layer-name\"></span>"; - popupHtml += '</div>'; - popupHtml += '<div class="ol-popup-inner">'; - popupHtml += '</div>'; - _this._$popupContent.html(popupHtml); - _this._$popupContent.find('.previous-popup').click(function () { - if (_this._popupContentLength == 1) { - return; - } - if (_this._currentPopupIndex == 0) { - _this._currentPopupIndex = _this._popupContentLength - 1; - } - else { - _this._currentPopupIndex--; - } - _this._triggerFeatSelect(); - }); - var nextPopup = _this._$popupContent.find('.next-popup'); - nextPopup.click(function () { - if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) { - return; - } - if (_this._currentPopupIndex == _this._popupContentLength - 1) { - _this._currentPopupIndex = 0; - } - else { - _this._currentPopupIndex++; - } - _this._triggerFeatSelect(); - }); - if (_this._popupContentLength > 0) { - nextPopup.trigger('click'); - _this._popupOverlay.setPosition(_this._popupCoordinate); - _this._$popupContent.scrollTop(0); - _this._popupOpen = true; - } - }); - //change mouse cursor when over marker - this._map.on('pointermove', function (evt) { - if (evt['dragging']) { - return; - } - var pixel = _this.map.getEventPixel(evt['originalEvent']); - var hit = false; - _this.map.forEachLayerAtPixel(pixel, function (lyr) { - if (hit) { - return; - } - for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) { - var vLyr = _a[_i]; - if (vLyr.olLayer == lyr) { - hit = true; - break; - } - } - }); - var mapElement = _this.map.getTargetElement(); - mapElement.style.cursor = hit ? 'pointer' : ''; - }); - }; - /** - * helper to select features - * @private - */ - MapPopupCls.prototype._triggerFeatSelect = function () { - var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number'); - var $innerPopup = this._$popupContent.find('.ol-popup-inner'); - var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name'); - this.clearSelection(); - var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex]; - $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed()); - $layerNameSpan.html(lyrFeatObj.layerName); - $innerPopup.html(lyrFeatObj.popupContent); - lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature); - for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(this._$popupContent); - } - }; - /** - * - * @param feature - the ol feature - * @param {LayerEsriMapServer} lyr - the map server layer - * @param {string} popupContent - popup content - * @param {string} esriName - esri layer name - */ - MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) { - var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName); - featLayerObject.popupContent = popupContent; - this._passThroughLayerFeatureArray.push(featLayerObject); - this._popupContentLength++; - $('.popup-content-length').html(this._popupContentLength.toFixed()); - if (!this._popupOpen) { - this._$popupContent.find('.next-popup').trigger('click'); - this._popupOverlay.setPosition(this._popupCoordinate); - this._$popupContent.scrollTop(0); - this._popupOpen = true; - } - }; - /** - * - * @param pixel - the ol pixel - * @returns feature layer properties - * @private - */ - MapPopupCls.prototype._featuresAtPixel = function (pixel) { - var _this = this; - var layerFeatureObjectArray = []; - this.map.forEachFeatureAtPixel(pixel, function (feature, layer) { - var hasLyr = false; - var j; - var lyr = null; - for (j = 0; j < _this._arrPopupLayers.length; j++) { - lyr = _this._arrPopupLayers[j]; - if (lyr.olLayer === layer) { - hasLyr = true; - break; - } - } - if (hasLyr) { - layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j])); - } - }); - return layerFeatureObjectArray; - }; - MapPopupCls.prototype.closePopup = function () { - this._checkInit(); - this._popupOpen = false; - this._popupOverlay.setPosition(undefined); - this._$popupCloser[0].blur(); - this.clearSelection(); - this._$popupContent.html(''); - return false; - }; - ; - /** - * - * @param chgFunction - popup change function - */ - MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) { - this._popupChangedFunctions.push(chgFunction); - }; - /** - * - * @param {LayerBase|*} lyr - the layer being acted on - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns the new selection layer - * @private - */ - MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) { - this._checkInit(); - selectionStyle = selectionStyle || {}; - selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)'; - selectionStyle.width = selectionStyle.width || 10; - var theStyle; - if (selectionStyle.olStyle) { - theStyle = selectionStyle.olStyle; - } - else { - theStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: selectionStyle.color, - width: selectionStyle.width - }), - image: new ol.style.Circle({ - radius: 7, - fill: new ol.style.Fill({ color: selectionStyle.color }), - stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 }) - }), - fill: new ol.style.Fill({ - color: selectionStyle.color - }) - }); - } - var selectionLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: theStyle - }); - selectionLayer.setZIndex(100); - this._selectionLayers.push(selectionLayer); - this._selectionLayerLookup[lyr.id] = selectionLayer; - this.map.addLayer(selectionLayer); - return selectionLayer; - }; - /** - * Add popup to the map - * @param {LayerBase|*} lyr The layer that the popup with act on - * @param {popupCallback} popupContentFunction - popup content function that makes popup info - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._arrPopupLayerIds.push(lyr.id); - this._arrPopupLayers.push(lyr); - // this._arrPopupOlLayers.push(lyr.olLayer); - this._arrPopupContentFunction.push(popupContentFunction); - return selectionLayer; - }; - ; - /** - * - * @param {LayerBase} lyr - layer - */ - MapPopupCls.prototype.removeVectorPopup = function (lyr) { - var idx = this._arrPopupLayerIds.indexOf(lyr.id); - if (idx > -1) { - this._arrPopupLayerIds.splice(idx, 1); - this._arrPopupLayers.splice(idx, 1); - // this._arrPopupOlLayers.splice(idx, 1); - this._arrPopupContentFunction.splice(idx, 1); - this._selectionLayers.splice(idx, 1); - delete this._selectionLayerLookup[lyr.id]; - } - }; - /** - * - * @param {LayerEsriMapServer} lyr - map server layer - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._esriMapServiceLayers.push(lyr); - return selectionLayer; - }; - MapPopupCls.prototype.clearSelection = function () { - this._checkInit(); - for (var i = 0; i < this._selectionLayers.length; i++) { - this._selectionLayers[i].getSource().clear(); - } - for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(); - } - }; - ; - /** - * Add a function to be called when the map is clicked but before any popups are implemented - * @param {function} func - the map click function - */ - MapPopupCls.prototype.addMapClickFunction = function (func) { - this._mapClickFunctions.push(func); - }; - return MapPopupCls; -}(mapInteractionBase_1.default)); -exports.MapPopupCls = MapPopupCls; -nm.MapPopupCls = MapPopupCls; -exports.default = MapPopupCls; - - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var geocode_1 = __webpack_require__(11); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param [options={}] config options - * @param [options.divId=map] map div id - * @param [options.center={}] center config object - * @param [options.center.x=-10018378] center x, web mercator x or lon - * @param [options.center.y=5574910] center y, web mercator y or lat - * @param [options.zoom=7] zoom level - * @param [options.minZoom=undefined] min zoom - * @param [options.maxZoom=undefined] max zoom - * @param [options.baseSwitcher=true] if add base map switcher - * @param [options.fullScreen=false] if add base map switcher - * @returns the ol map - */ -function quickMapBase(options) { - if (options === void 0) { options = {}; } - options.divId = options.divId || 'map'; - options.center = options.center || { x: -10018378, y: 5574910 }; - options.zoom = typeof options.zoom == 'number' ? options.zoom : 7; - options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true; - options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false; - options.addGeocode = options.addGeocode || false; - var $mapDiv = $('#' + options.divId); - $mapDiv.css('position', 'relative'); - var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); - // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})}); - var osmCss = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYK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UJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG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/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')"; - if (options.baseSwitcher) { - // let switcherContent = '<div class="base-map-switcher" title="Toggle Base Layer" style="'; - // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; '; - // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`; - // switcherContent += '"></div>'; - // $mapDiv.append(switcherContent); - // - // $mapDiv.find('.base-map-switcher').click(function() { - // "use strict"; - // osmLayer.setVisible(!osmLayer.getVisible()); - // satLayer.setVisible(!satLayer.getVisible()); - // - // if (osmLayer.getVisible()){ - // $(this).css('background', aerialCss); - // } else { - // $(this).css('background', osmCss); - // } - // }); - } - if (options.zoom < 0 || options.zoom > 28) { - throw 'zoom out of range'; - } - if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) { - var p = new ol.geom.Point([options.center.x, options.center.y]); - new ol.proj.Projection({ code: "EPSG:4326" }); - p.transform(new ol.proj.Projection({ code: "EPSG:4326" }), new ol.proj.Projection({ code: "EPSG:3857" })); - var coordinates = p.getCoordinates(); - options.center.x = coordinates[0]; - options.center.y = coordinates[1]; - } - var controls = ol.control.defaults({ - attributionOptions: { collapsible: false } - }); - var view = new ol.View({ - center: [options.center.x, options.center.y], - zoom: options.zoom, - minZoom: options.minZoom, - maxZoom: options.maxZoom - }); - var map = new ol.Map({ - layers: [osmLayer], - target: options.divId, - controls: controls, - view: view - }); - if (options.fullScreen) { - map.addControl(new ol.control.FullScreen({})); - } - if (options.addGeocode) { - new geocode_1.Geocode(document.getElementById(options.divId), map); - } - return map; -} -exports.quickMapBase = quickMapBase; -nm.quickMapBase = quickMapBase; -exports.default = quickMapBase; - - -/***/ }), -/* 15 */, -/* 16 */, -/* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/14/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers.zoomResolutionConvert'); -var _zoomResLookup = [ - 156543.03392804097, - 78271.51696402048, - 39135.75848201024, - 19567.87924100512, - 9783.93962050256, - 4891.96981025128, - 2445.98490512564, - 1222.99245256282, - 611.49622628141, - 305.748113140705, - 152.8740565703525, - 76.43702828517625, - 38.21851414258813, - 19.109257071294063, - 9.554628535647032, - 4.777314267823516, - 2.388657133911758, - 1.194328566955879, - 0.5971642834779395, - 0.29858214173896974, - 0.14929107086948487, - 0.07464553543474244, - 0.03732276771737122, - 0.01866138385868561, - 0.009330691929342804, - 0.004665345964671402, - 0.002332672982335701, - 0.0011663364911678506, - 0.0005831682455839253 //28 -]; -/** - * Get the resolution given the zoom level - * @param {number} zoomLevel - the zoom level - * @returns {number|*} the map resolution - */ -function zoomToResolution(zoomLevel) { - "use strict"; - if (typeof zoomLevel == 'number') { - if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) { - return _zoomResLookup[zoomLevel]; - } - else { - console.log("invalid zoom level provided: " + zoomLevel); - return undefined; - } - } - else { - return undefined; - } -} -exports.zoomToResolution = zoomToResolution; -nm.zoomToResolution = zoomToResolution; -/** - * Get resolution from the zoom level - * @param {number} resolution - the resolution - * @returns {number|*} the zoom level - */ -function resolutionToZoom(resolution) { - for (var i = 0; i < _zoomResLookup.length; i++) { - if (resolution >= _zoomResLookup[i]) { - return i; - } - } - return 0; -} -exports.resolutionToZoom = resolutionToZoom; -nm.resolutionToZoom = resolutionToZoom; - - -/***/ }), -/* 18 */, -/* 19 */, -/* 20 */, -/* 21 */, -/* 22 */, -/* 23 */, -/* 24 */, -/* 25 */, -/* 26 */, -/* 27 */, -/* 28 */, -/* 29 */, -/* 30 */, -/* 31 */, -/* 32 */, -/* 33 */, -/* 34 */, -/* 35 */, -/* 36 */, -/* 37 */, -/* 38 */, -/* 39 */, -/* 40 */, -/* 41 */, -/* 42 */, -/* 43 */, -/* 44 */, -/* 45 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBase_1 = __webpack_require__(10); -var mapMove_1 = __webpack_require__(6); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The Vector layer base - * @augments LayerBase - * @abstract - */ -var LayerBaseVector = (function (_super) { - __extends(LayerBaseVector, _super); - /** - * The base vector layer - * @param {string} url - pass an empty string to prevent default load and add from a json source - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible - * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined - * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move - * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called - * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params - * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages - * - */ - function LayerBaseVector(url, options) { - if (options === void 0) { options = {}; } - var _this = _super.call(this, url, options) || this; - options = options; - //prevent regular load if no url has been provided - if (_this.url.trim() == '') { - _this._loaded = true; - } - _this._style = typeof options.style == 'undefined' ? undefined : options.style; - if (_this.visible) { - _this._autoLoad = true; - } - else { - _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false); - } - _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false; - _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300; - if (options.mapMoveObj) { - _this._mapMove = options.mapMoveObj; - } - else { - _this._mapMove = _this._onDemand ? mapMove_1.default : undefined; - } - _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams : - function () { return {}; }; - if (_this._onDemand) { - _this._loaded = true; - _this._mapMoveParams = {}; - _this._mapMove.checkInit(); - _this._mapMove.addVectorLayer(_this); - } - _this._source = new ol.source.Vector(); - _this._olLayer = new ol.layer.Vector({ - source: _this._source, - visible: _this.visible, - style: _this.style, - minResolution: _this._minResolution, - maxResolution: _this._maxResolution, - renderOrder: options.renderOrder - }); - _this.olLayer.setZIndex(_this._zIndex); - _this._projectionMap = null; - _this._projection4326 = new ol.proj.Projection({ code: "EPSG:4326" }); - _this._olLayer.setOpacity(_this.opacity); - return _this; - } - /** - * dummy to be overridden - * @param {object} featureCollection - geojson or esrijson object - */ - LayerBaseVector.prototype.addFeatures = function (featureCollection) { - console.log('Layer vector base addFeatures is a placeholder and does nothing'); - }; - /** - * Before call to map move callback, can prevent call by returning false - * @param {number} zoom - zoom level - * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution' - * @returns {boolean} if the call should proceed - */ - LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) { - if (this.minZoom !== undefined) { - if (zoom < this.minZoom) { - return false; - } - } - if (this.maxZoom !== undefined) { - if (zoom > this.maxZoom) { - return false; - } - } - return this.visible; - }; - /** - * callback to generate the parameters passed in the get request - * @param {object} extent - extent object - * @param {number} extent.minX - minX - * @param {number} extent.minY - minY - * @param {number} extent.maxX - maxX - * @param {number} extent.maxY - maxY - * @param {number} zoomLevel - zoom level - */ - LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) { - this._mapMoveParams = {}; - $.extend(this._mapMoveParams, this.params); - $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel)); - }; - /** - * callback function on map move - * @param {object} d - the json response - */ - LayerBaseVector.prototype.mapMoveCallback = function (d) { - if (this.source) { - this._source.clear(); - } - }; - /** - * clear features in the layer - */ - LayerBaseVector.prototype.clear = function () { - if (this._source) { - this._source.clear(); - } - }; - Object.defineProperty(LayerBaseVector.prototype, "onDemandDelay", { - /** - * get on demand delay in miliseconds - */ - get: function () { - return this._onDemandDelay; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "autoLoad", { - /** - * get if the layer is autoloaded - */ - get: function () { - return this._autoLoad; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "style", { - /** - * get the style definition - */ - get: function () { - return this._style; - }, - /** - * set the style - * @param style - the style or function - */ - set: function (style) { - this._style = style; - this.olLayer.setStyle(this._style); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapCrs", { - /** - * get the map CRS if it is defined by the map move object - */ - get: function () { - return this.mapProj == null ? null : this.mapProj.getCode(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapProj", { - get: function () { - if (this._projectionMap != null) { - return this._projectionMap; - } - if (this._mapMove) { - this._projectionMap = this._mapMove.map.getView().getProjection(); - return this._projectionMap; - } - else { - return null; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapMove", { - /** - * get the map move object - * @type {MapMoveCls|*} - */ - get: function () { - return this._mapMove; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapMoveParams", { - /** - * map move params - * @type {object} - */ - get: function () { - return this._mapMoveParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "visible", { - get: function () { - return this._visible; - }, - /** - * Set the layer visibility - * @type {boolean} - * @override - */ - set: function (visibility) { - _super.prototype.setVisible.call(this, visibility); - if (this._onDemand) { - this.mapMove.triggerLyrLoad(this); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "source", { - /** - * get the layer vector source - * @override - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "features", { - /** - * array of ol features - */ - get: function () { - return this.source.getFeatures(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "olLayer", { - /** - * - */ - get: function () { - return _super.prototype.getOlLayer.call(this); - }, - enumerable: true, - configurable: true - }); - LayerBaseVector.prototype.setZIndex = function (newZ) { - this.olLayer.setZIndex(newZ); - }; - return LayerBaseVector; -}(LayerBase_1.LayerBase)); -exports.LayerBaseVector = LayerBaseVector; -nm.LayerBaseVector = LayerBaseVector; -exports.default = LayerBaseVector; - - -/***/ }), -/* 46 */, -/* 47 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/16/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var mapMove_1 = __webpack_require__(6); -var nm = provide_1.default('collections'); -var $ = __webpack_require__(1); -var LayerGroup = (function () { - /** - * - * @param {object} [groupConfig={}] - group configuration object - * @param {string} groupConfig.groupName - the group name - * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially - * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers - * @param {LayerGroup} [parent=undefined] - the parent group - */ - function LayerGroup(groupConfig, parent) { - this.groupLayers = []; - this.groupLayersLookup = {}; - this.groupGroups = []; - this.groupGroupsLookup = {}; - this.itemIdArray = []; - if (typeof groupConfig == 'undefined') { - this.parent = null; - this.groupId = 'root'; - this.groupName = 'root'; - this.allGroupLookup = { root: this }; - this.allGroupArray = [this]; - this.allLayerArray = []; - this.allLayerLookup = {}; - this.layerParentLookup = {}; - this.collapse = false; - this.addCheck = false; - } - else { - this.groupId = makeGuid_1.default(); - this.parent = parent; - this.groupName = groupConfig.groupName; - this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false; - this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true; - } - } - /** - * - * @param {object} groupConfig - configuration object - * @param {string} groupConfig.groupName - the group name - * @param {boolean} groupConfig.collapse if the group should be collapsed initially - * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers - * @param {Array<LayerGroup>} parents parent groups - * @returns {LayerGroup} the layer group just added - */ - LayerGroup.prototype.addGroup = function (groupConfig, parents) { - var parent; - if (parents.length > 0) { - parent = parents[parents.length - 1]; - } - else { - parent = 'root'; - } - /** - * @type {LayerGroup} - */ - var parentGroup = this.allGroupLookup[parent]; - var newGroup = new LayerGroup(groupConfig, parentGroup); - this.allGroupLookup[newGroup.groupId] = newGroup; - this.allGroupArray.push(newGroup); - parentGroup.groupGroups.push(newGroup); - parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup; - if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) { - console.log(newGroup.groupId); - throw 'layer and group ids must be unique'; - } - parentGroup.itemIdArray.push(newGroup.groupId); - return newGroup; - }; - /** - * - * @param {LayerBase} newLayer the layer to be added - * @param {Array} parents array - */ - LayerGroup.prototype.addLegendLayer = function (newLayer, parents) { - var parent; - if (parents.length > 0) { - parent = parents[parents.length - 1]; - } - else { - parent = 'root'; - } - this.allLayerLookup[newLayer.id] = newLayer; - this.allLayerArray.push(newLayer); - /** - * @type {LayerGroup} - */ - var parentGroup = this.allGroupLookup[parent]; - parentGroup.groupLayers.push(newLayer); - parentGroup.groupLayersLookup[newLayer.id] = newLayer; - if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) { - console.log(newLayer.id); - throw 'layer and group ids must be unique'; - } - parentGroup.itemIdArray.push(newLayer.id); - this.layerParentLookup[newLayer.id] = parentGroup; - }; - LayerGroup.prototype.getLegendHtml = function (legendId, options) { - var legendHtml = "<ul id=\"" + legendId + "\" class=\"legend-container\">"; - legendHtml += "<li>" + options.legendTitle + "<input type=\"checkbox\" checked id=\"suppress-by-extent-" + legendId + "\" class=\"suppress-by-extent\">" + - ("<label title=\"Suppress layers not visible at this zoom level\" for=\"suppress-by-extent-" + legendId + "\">") + - "<span></span>" + - "</label></li>"; - legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>'; - return legendHtml; - }; - /** - * @param {Array} itemIds the items to process - * @param {LayerGroup} theGroup new group - * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs - * @static - * @returns {string} html string - */ - LayerGroup.prototype._buildLegend = function (itemIds, theGroup, layerDivClasses) { - if (itemIds.length == 0) { - return ''; - } - var theHml = ''; - var itemId = itemIds[0]; - if (theGroup.groupLayersLookup[itemId]) { - /** - * @type {LayerBase} - */ - var lyr = theGroup.groupLayersLookup[itemId]; - theHml += "<li id=\"" + lyr.id + "-layer-li\" class=\"legend-layer-li " + layerDivClasses.join(' ') + "\">" + lyr.getLegendDiv() + '</li>'; - } - else if (theGroup.groupGroupsLookup[itemId]) { - /** - * type {LayerGroup} - */ - var otherGroup = theGroup.groupGroupsLookup[itemId]; - theHml += "<li>"; - theHml += "<div id=\"" + otherGroup.groupId + "-legend-layer-div\" " + - ("class=\"legend-layer-group " + layerDivClasses.join(' ') + "\">"); - if (otherGroup.addCheck) { - theHml += "<input type=\"checkbox\" checked id=\"" + otherGroup.groupId + "-group-chck\">" + - ("<label for=\"" + otherGroup.groupId + "-group-chck\" title=\"Click arrow to expand or collapse\">" + otherGroup.groupName + "</label>"); - } - else { - theHml += "<label title=\"Click arrow to expand or collapse\">" + otherGroup.groupName + "</label>"; - } - theHml += "<span title=\"Expand/Collapse\" class=\"layer-group-expander"; - theHml += (otherGroup.collapse ? ' legend-layer-group-initial-collapse' : '') + "\">"; - theHml += otherGroup.collapse ? '▶' : '▼'; - theHml += '</span>'; - //parents.push(groupId); - theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>'; - theHml += '</div>'; - theHml += '</li>'; - } - return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses); - }; - return LayerGroup; -}()); -/** - * a wrapper to make a legend - */ -var LayerLegend = (function () { - /**`` - * - * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}} - * @param {string} divId the div where the legend should be added - * @param {object} options for legend - * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling - * @param {string} [options.legendTitle=Legend] the legend title - * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent - */ - function LayerLegend(legendItems, divId, options) { - if (options === void 0) { options = {}; } - for (var _i = 0, legendItems_1 = legendItems; _i < legendItems_1.length; _i++) { - var i = legendItems_1[_i]; - if (typeof i == 'undefined') { - throw 'undefined item passed in array to legend constructor'; - } - } - options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend'; - options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true; - options.layerDivClasses = options.layerDivClasses || []; - // if legend display is scale dependent, make sure the mapMove object is initialized first - if (options.scaleDependent) { - mapMove_1.default.checkInit(); - } - this.$divElement = $('#' + divId); - this._legendItems = legendItems; - this.layerGroup = new LayerGroup(); - this._buildTree(legendItems); - this.legendId = makeGuid_1.default(); - this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options)); - for (var _a = 0, _b = this.layerGroup.allLayerArray; _a < _b.length; _a++) { - var l = _b[_a]; - l.applyCollapse(); - } - var _this = this; - //// if legend display is scale dependent, make sure the mapMove object is initialized first - if (options.scaleDependent) { - mapMove_1.default.checkInit(); - mapMove_1.default.addCallback(function (ext, zoom, evt) { - if (typeof evt == 'undefined' || evt == 'change:resolution') { - for (var _i = 0, _a = this.layerGroup.allLayerArray; _i < _a.length; _i++) { - var lyr = _a[_i]; - var $lyrLi = $('#' + lyr.id + '-layer-li'); - if (zoom > lyr.maxZoom || zoom < lyr.minZoom) { - $lyrLi.addClass('layer-not-visible'); - } - else { - $lyrLi.removeClass('layer-not-visible'); - } - } - } - }, this, 100, true, 'legend1'); - } - // <editor-fold desc="add event listeners"> - this.$divElement.find(".suppress-by-extent").change(function () { - var legendLayerLis = $('.legend-layer-li'); - if (this.checked) { - legendLayerLis.removeClass('layer-force-show'); - } - else { - legendLayerLis.addClass('layer-force-show'); - } - }); - this.$divElement.find('.legend-check').change(function () { - var lyrId = this.id.replace('-legend-layer-check', ''); - _this.layerGroup.allLayerLookup[lyrId].visible = this.checked; - }); - this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () { - $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change'); - }); - this.$divElement.find('.layer-group-expander').click(function () { - var $this = $(this); - $this.removeClass('legend-layer-group-initial-collapse'); - $this.siblings('ul').slideToggle(); - if ($this.hasClass('legend-layer-group-collapsed')) { - $this.removeClass('legend-layer-group-collapsed'); - $this.html('▼'); - } - else { - $this.addClass('legend-layer-group-collapsed'); - $this.html('▶'); - } - }); - this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click'); - // </editor-fold> - } - /** - * @param {Array} [legendItems=this._layerConfig] the legend items - * @param {Array} [parents=[]] the ordered list of groups in which this item is a member - * @private - */ - LayerLegend.prototype._buildTree = function (legendItems, parents) { - if (legendItems.length == 0) { - return; - } - var oneItem = legendItems[0]; - //reset the parent if the item is in the base array - if (this._legendItems.indexOf(oneItem) > -1 || typeof parents == 'undefined') { - parents = []; - } - if (typeof oneItem.groupName !== 'undefined') { - var groupItem = legendItems[0]; - var newGroup = this.layerGroup.addGroup(groupItem, parents); - parents.push(newGroup.groupId); - this._buildTree(oneItem.items, parents); - } - else { - /** - * @type {LayerBase} - */ - var layerItem = legendItems[0]; - this.layerGroup.addLegendLayer(layerItem, parents); - } - this._buildTree(legendItems.slice(1), parents); - }; - return LayerLegend; -}()); -exports.LayerLegend = LayerLegend; -nm.LayerLegend = LayerLegend; -exports.default = LayerLegend; - - -/***/ }), -/* 48 */, -/* 49 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/2/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBaseVector_1 = __webpack_require__(45); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var proj = __webpack_require__(8); -var projections_1 = __webpack_require__(8); -var nm = provide_1.default('layers'); -/** - * The Vector GeoJson Layer - * @augments LayerBaseVector - */ -var LayerBaseVectorGeoJson = (function (_super) { - __extends(LayerBaseVectorGeoJson, _super); - /** - * @param {string|null} url - resource url, set to '' to make blank layer - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible - * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined - * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move - * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called - * - * @param {object} [options.transform={}] SR transform, set as false for no transform - * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS - * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS - * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params - * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages - */ - function LayerBaseVectorGeoJson(url, options) { - if (options === void 0) { options = {}; } - var _this = this; - url = typeof url == 'string' ? url : ''; - _this = _super.call(this, url, options) || this; - _this._geoJsonFormat = new ol.format.GeoJSON(); - _this._transform = options.transform || {}; - _this._transform.dataProjection = _this._transform.dataProjection || proj.proj4326; - _this._transform.featureProjection = _this._transform.featureProjection || projections_1.proj3857; - if (_this.autoLoad || _this.visible) { - _this._load(); - } - return _this; - } - /** - * add feature collection - * @param {object} featureCollection - as geojson object - */ - LayerBaseVectorGeoJson.prototype.addFeatures = function (featureCollection) { - this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, { dataProjection: this._transform.dataProjection, - featureProjection: this._transform.featureProjection })); - }; - /** - * trigger load features - * @protected - * @returns {boolean} if already loaded - */ - LayerBaseVectorGeoJson.prototype._load = function () { - var _this = this; - if (_super.prototype._load.call(this)) { - return true; - } - $.get(this._url, this._params, function (d) { - _this.addFeatures(d); - _this.loadCallback(_this); - }, 'json').fail(function () { - this._loaded = false; - }); - return false; - }; - /** - * callback function on map move - * @param {object} d the json response - * @override - */ - LayerBaseVectorGeoJson.prototype.mapMoveCallback = function (d) { - _super.prototype.mapMoveCallback.call(this, d); - this._source.addFeatures(this._geoJsonFormat.readFeatures(d, { featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection })); - }; - return LayerBaseVectorGeoJson; -}(LayerBaseVector_1.LayerBaseVector)); -exports.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson; -nm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson; -exports.default = LayerBaseVectorGeoJson; - - -/***/ }), -/* 50 */, -/* 51 */, -/* 52 */, -/* 53 */, -/* 54 */, -/* 55 */, -/* 56 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/14/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var colors = __webpack_require__(68); -var provide_1 = __webpack_require__(0); -var LayerItsInventory_1 = __webpack_require__(64); -var nm = provide_1.default('collections'); -var itsConfig = [ - { - name: 'Camera', - itsType: 'cctv', - minZoom: 11, - itsIconConfig: { - prop: 'owner', - defaultName: 'WisDOT', - defaultIcon: 'cctv.png', - iconArray: [ - ['City of Madison', 'Madison', 'cctv-mad.png'] - ] - } - }, - { - name: 'Message Signs', - itsType: 'DMS', - minZoom: 11, - itsIconConfig: { - prop: 'dmsType', - defaultName: 'DMS', - defaultIcon: 'dms.png', - iconArray: [ - ['pcms', 'PCMS', 'pcms.png'] - ] - } - }, - { name: 'ATR', itsType: 'atr', minZoom: 8, itsIcon: 'atr.png', visible: false }, - { name: 'Lighting', itsType: 'light', minZoom: 16, itsIcon: 'streetlight.png', visible: false, onDemand: true }, - { name: 'Bluetooth', itsType: 'blue', minZoom: 10, itsIcon: 'bluetooth.png', visible: false }, - { name: 'Cabinets', itsType: 'cabinet', minZoom: 10, itsIcon: 'cabinet.png', visible: false }, - { name: 'Hut', itsType: 'hut', minZoom: 10, itsIcon: 'hut.png', visible: false }, - { name: 'Vault', itsType: 'vault', minZoom: 13, itsIcon: 'vault.png', visible: false }, - { name: 'Advisory Radio', itsType: 'har', minZoom: 10, itsIcon: 'har.png', visible: false }, - { - name: 'Loop Detectors', - itsType: 'loop', - legendCollapse: true, - minZoom: 14, - visible: false, - itsIconConfig: { - prop: 'dtctrType', - defaultName: 'Other', - defaultIcon: 'loopdetectorother.png', - iconArray: [ - ['detector', 'Detector', 'loopdetector.png'], - ['long', 'Long', 'loopdetectorlong.png'], - ['zone', 'Zone', 'loopdetectorzone.png'] - ] - }, - onDemand: true - }, - { name: 'Microwave', itsType: 'microwave', minZoom: 14, itsIcon: 'microwave.png', visible: false }, - { name: 'Pull Box', itsType: 'pull', minZoom: 14, itsIcon: 'pullbox.png', visible: false, onDemand: true }, - { name: 'RWIS', itsType: 'rwis', minZoom: 7, itsIcon: 'rwis.png', visible: false }, - { name: 'Ramp Gates', itsType: 'gate', minZoom: 10, itsIcon: 'rampgate.png', visible: false }, - { name: 'Ramp Meter', itsType: 'meter', minZoom: 10, itsIcon: 'rampmeter.png', visible: false }, - { name: 'Signal', itsType: 'signal', minZoom: 13, itsIcon: 'signal.png', visible: false, onDemand: true }, - { name: 'Tower', itsType: 'tower', minZoom: 10, itsIcon: 'tower.png', visible: false }, - { - name: 'Trench', - itsType: 'trench', - onDemand: true, - visible: false, - onDemandDelay: 500, - minZoom: 15, - legendCollapse: true, - itsLineConfig: { - prop: 'owner', - defaultName: 'Other', - //defaultWidth: 7, - defaultColor: colors.hexAlphaToRgbOrRgba('#747474', 0.8), - lineArray: [ - ['WisDOT', 'WisDOT', colors.hexAlphaToRgbOrRgba('#FF032F', 0.7)], - ['WIN', 'WIN', colors.hexAlphaToRgbOrRgba('#FFC632', 0.7)], - ['USXchange', 'USXchange', colors.hexAlphaToRgbOrRgba('#2DFF46', 0.7)], - ['AT&T', 'AT&T', colors.hexAlphaToRgbOrRgba('#ff2be5', 0.7)], - ['Touch America', 'Touch America', colors.hexAlphaToRgbOrRgba('#52f3ff', 0.7)], - ['Qwest', 'Qwest', colors.hexAlphaToRgbOrRgba('#9278ff', 0.7)], - ['McLeodUSA', 'McLeodUSA', colors.hexAlphaToRgbOrRgba('#2926FF', 0.7)], - ['CINC', 'CINC', colors.hexAlphaToRgbOrRgba('#CB00FF', 0.7)], - ['City of Madison', 'Madison', colors.hexAlphaToRgbOrRgba('#000380', 0.7)] - ] - } - } -]; -var ItsLayerCollection = (function () { - /** - * Create a collection of all ITS layers - * @param {ol.Map} theMap the openlayers map - * @param {Array} [exclude=[]] array of Its layer identifiers to exclude - * - * BLUE Bluetooth Detector - Bluetooth Detector - * CABINET Cabinets - The cabinets - * CCTV Camera - Traffic Cameras - * HUT Communication Hut - Communication Hut - * VAULT Communication Vault - The communication vaults - * HAR Highway Advisory Radio - Advisory Radios - * LIGHT Lighting - Lighting - * LOOP Loop Detectors - Loop Detectors - * DMS Message Board - Message Boards and Signs - * MICROWAVE Microwave Detector - Microwave Detectors - * PULL Pull Box - A pull box - * RWIS RWIS - Road weather information system - * GATE Ramp Gate - The ramp Gates - * METER Ramp Meter - The ramp meters - * SIGNAL Signal - Traffic Signal - * TOWER Tower - The towers - * TRENCH - */ - function ItsLayerCollection(theMap, exclude) { - this._map = theMap; - this._layers = []; - exclude = typeof exclude == 'object' ? exclude : []; - for (var i = 0; i < itsConfig.length; i++) { - var lyrConfig = itsConfig[i]; - var addLayer = true; - for (var j = 0; j < exclude.length; j++) { - if (exclude[j] == lyrConfig.itsType) { - addLayer = false; - break; - } - } - if (addLayer) { - var inventLyr = new LayerItsInventory_1.default(lyrConfig); - this._map.addLayer(inventLyr.olLayer); - this._layers.push(inventLyr); - } - } - } - Object.defineProperty(ItsLayerCollection.prototype, "layers", { - /** - * Return the array of layers in this collection - * @returns {Array<LayerItsInventory>} an array of layers - */ - get: function () { - return this._layers; - }, - enumerable: true, - configurable: true - }); - return ItsLayerCollection; -}()); -exports.ItsLayerCollection = ItsLayerCollection; -nm.ItsLayerCollection = ItsLayerCollection; -exports.default = ItsLayerCollection; - - -/***/ }), -/* 57 */, -/* 58 */, -/* 59 */, -/* 60 */, -/* 61 */, -/* 62 */, -/* 63 */, -/* 64 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/8/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBaseVectorGeoJson_1 = __webpack_require__(49); -var mapPopup_1 = __webpack_require__(7); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var projections_1 = __webpack_require__(8); -var nm = provide_1.default('layers'); -function checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) { - "use strict"; - //make sure one and only one configuration is defined; - var configCount = 0; - if (typeof itsIcon == 'string') { - configCount++; - } - if (typeof itsLineStyle == 'object') { - itsLineStyle.width = typeof itsLineStyle.width == 'number' ? itsLineStyle.width : 5; - itsLineStyle.color = typeof itsLineStyle.color == 'string' ? itsLineStyle.color : 'red'; - configCount++; - } - if (typeof itsIconConfig == 'object') { - itsIconConfig.defaultName = itsIconConfig.defaultName || 'Other'; - if (typeof itsIconConfig.iconArray == 'undefined') { - itsIconConfig.iconArray = []; - } - configCount++; - } - if (typeof itsLineConfig == 'object') { - itsLineConfig.defaultName = itsLineConfig.defaultName || 'Other'; - itsLineConfig.defaultWidth = itsLineConfig.defaultWidth || 5; - itsLineConfig.defaultColor = itsLineConfig.defaultColor || 'red'; - if (typeof itsLineConfig.lineArray == 'undefined') { - itsLineConfig.lineArray = []; - } - // set the width if not defined - for (var i = 0; i < itsLineConfig.lineArray.length; i++) { - if (itsLineConfig.lineArray[i].length == 3) { - itsLineConfig.lineArray[i].push(5); - } - } - configCount++; - } - if (configCount > 1) { - throw 'Only one style config can be defined'; - } -} -/** - * - * @param {string} [itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/ - * - * @param {object} [itsLineStyle=undefined] A single line style - * @param {string} itsLineStyle.color the line color as rgb or hex - * @param {number} [itsLineStyle.width=5] the line width - * - * @param {object} [itsIconConfig=undefined] The icon subtype configuration - * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization - * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found - * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches - * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img] - * - * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization - * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization - * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found - * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches - * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches - * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width] - * @returns {*} undefined, style, or style function - */ -function defineStyle(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) { - "use strict"; - checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig); - var _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/'; - if (itsIcon) { - return new ol.style.Style({ - image: new ol.style.Icon({ - src: _iconUrlRoot + itsIcon, - crossOrigin: 'anonymous' - }) - }); - } - else if (itsLineStyle) { - return new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: itsLineStyle.color, - width: itsLineStyle.width - }) - }); - } - else if (itsIconConfig) { - return function (feature) { - var symbolProp = feature.getProperties()[itsIconConfig.prop]; - var iconUrl = _iconUrlRoot + itsIconConfig.defaultIcon; - for (var i = 0; i < itsIconConfig.iconArray.length; i++) { - var thisProp = itsIconConfig.iconArray[i]; - if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) { - iconUrl = _iconUrlRoot + thisProp[2]; - break; - } - } - return [new ol.style.Style({ - image: new ol.style.Icon({ - src: iconUrl, - crossOrigin: 'anonymous' - }) - })]; - }; - } - else if (itsLineConfig) { - return function (feature) { - var symbolProp = feature.getProperties()[itsLineConfig.prop]; - var colr = itsLineConfig.defaultColor || 'red'; - var width = itsLineConfig.defaultWidth || 5; - for (var i = 0; i < itsLineConfig.lineArray.length; i++) { - var thisProp = itsLineConfig.lineArray[i]; - if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) { - colr = thisProp[2]; - width = thisProp[3]; - break; - } - } - return [new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: colr, - width: width - }) - })]; - }; - } - else { - return undefined; - } -} -function defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) { - "use strict"; - var iconHeight = 17; - checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig); - var _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/'; - if (itsIcon) { - return "<img src=\"" + (_iconUrlRoot + itsIcon) + "\" class=\"legend-layer-icon\" height=\"" + iconHeight + "\">"; - } - else if (itsLineStyle) { - return "<hr style=\"height: " + itsLineStyle.width + "px; background-color: " + itsLineStyle.color + "\">"; - } - else if (itsIconConfig) { - var outHtml = ''; - outHtml += '<ul>'; - for (var _i = 0, _a = itsIconConfig.iconArray; _i < _a.length; _i++) { - var a = _a[_i]; - outHtml += "<li><span class=\"legend-layer-subitem\">" + a[1] + "</span><img src=\"" + (_iconUrlRoot + a[2]) + "\" class=\"legend-layer-icon\" height=\"" + iconHeight + "\">"; - } - outHtml += "<li><span class=\"legend-layer-subitem\">" + itsIconConfig.defaultName + "</span>" + - ("<img src=\"" + (_iconUrlRoot + itsIconConfig.defaultIcon) + "\" class=\"legend-layer-icon\" height=\"" + iconHeight + "\"></li>"); - outHtml += '</ul>'; - return outHtml; - } - else if (itsLineConfig) { - var outHtml = ''; - outHtml += '<ul>'; - for (var _b = 0, _c = itsLineConfig.lineArray; _b < _c.length; _b++) { - var ls = _c[_b]; - outHtml += "<li><span class=\"legend-layer-subitem\">" + ls[1] + "</span>" + - ("<hr style=\"height: " + ls[3] + "px; background-color: " + ls[2] + "\">"); - } - outHtml += "<li><span class=\"legend-layer-subitem\">" + itsLineConfig.defaultName + "</span>" + - ("<hr style=\"height: " + itsLineConfig.defaultWidth + "px; background-color: " + itsLineConfig.defaultColor + "\"></li>"); - outHtml += '</ul>'; - return outHtml; - } - else { - return ''; - } -} -/** - * Its Layer class - * @augments LayerBaseVectorGeoJson - */ -var LayerItsInventory = (function (_super) { - __extends(LayerItsInventory, _super); - /** - * ITS device layer, types available at https://transportal.cee.wisc.edu/its/inventory/ - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible - * @param {object|*} [options.style=undefined] the layer style, use openlayers default style if not defined - * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move - * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called - * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages - * - * @param {string} options.itsType the ITS device type, use the url flag at https://transportal.cee.wisc.edu/its/inventory/ - * @param {boolean} [options.addPopup=true] if the popup should be added automatically - * - * @param {string} [options.itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/ - * - * @param {object} [options.itsLineStyle=undefined] A single line style - * @param {string} options.itsLineStyle.color the line color as rgb or hex - * @param {number} [options.itsLineStyle.width=5] the line width - * - * @param {object} [options.itsIconConfig=undefined] The icon subtype configuration - * @param {string} options.itsIconConfig.prop The property used to define icon attribute symbolization - * @param {string} options.itsIconConfig.defaultName The default name to be used if no other match is found - * @param {string} options.itsIconConfig.defaultIcon The default icon to be used for no other matches - * @param {object} [options.itsIconConfig.iconArray=[]] an array, items with format [property, name, img] - * - * @param {object} [options.itsLineConfig=undefined] The property used to define icon attribute symbolization - * @param {string} options.itsLineConfig.prop The property used to define icon attribute symbolization - * @param {string} [options.itsLineConfig.defaultName=Other] The default name to be used if no other match is found - * @param {string} [options.itsLineConfig.defaultColor=red] The default line color to be used for no other matches - * @param {number} [options.itsLineConfig.defaultWidth] The default line width to be used for no other matches - * @param {object} [options.itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width = 5] - */ - function LayerItsInventory(options) { - var _this = this; - if (typeof options.itsType !== 'string') { - throw 'its type must be defined'; - } - options.transform = { dataProjection: projections_1.proj4326, featureProjection: projections_1.proj3857 }; - var addToLegend = ''; - // define a style with the helper function if it is not explicitly defined - if (typeof options.style == 'undefined') { - options.style = defineStyle(options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig); - addToLegend = defineLegend(options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig); - } - options.params = typeof options.params == 'object' ? options.params : {}; - $.extend(options.params, { format: 'JSON', resource: options.itsType }); - _this = _super.call(this, 'https://transportal.cee.wisc.edu/its/inventory/', options) || this; - //add any additional content to the legend - _this.addLegendContent(addToLegend); - options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : true; - if (options.addPopup) { - mapPopup_1.default.addVectorPopup(_this, function (props) { - return "<iframe src=\"https://transportal.cee.wisc.edu/its/inventory/?feature=" + props.featureGuid + "\" " + - "height=\"250\" width=\"350\"></iframe>"; - }); - } - return _this; - } - /** - * callback to generate the parameters passed in the get request - * @callback makeGetParams - * @param {object} extent - extent object - * @param {number} extent.minX - minX - * @param {number} extent.minY - minY - * @param {number} extent.maxX - maxX - * @param {number} extent.maxY - maxY - * @param {number} zoomLevel - zoom level - */ - LayerItsInventory.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) { - _super.prototype.mapMoveMakeGetParams.call(this, extent, zoomLevel); - var lowerLeft = new ol.geom.Point([extent.minX, extent.minY]); - lowerLeft.transform(this.mapProj, this._projection4326); - var lowerLeftCoordinates = lowerLeft.getCoordinates(); - var upperRight = new ol.geom.Point([extent.maxX, extent.maxY]); - upperRight.transform(this.mapProj, this._projection4326); - var upperRightCoordinates = upperRight.getCoordinates(); - $.extend(this.mapMoveParams, { - L: lowerLeftCoordinates[0], - R: upperRightCoordinates[0], - B: lowerLeftCoordinates[1], - T: upperRightCoordinates[1] - }); - }; - return LayerItsInventory; -}(LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson)); -exports.LayerItsInventory = LayerItsInventory; -nm.LayerItsInventory = LayerItsInventory; -exports.default = LayerItsInventory; - - -/***/ }), -/* 65 */, -/* 66 */, -/* 67 */, -/* 68 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 11/3/2015. - */ -var provide_1 = __webpack_require__(0); -var chk = __webpack_require__(9); -var nm = provide_1.default('util.colors'); -/** - * helper function to convert to hex - * @param {number|string} x - the number to convert to hex - * @returns {string} number as hex - * @private - */ -function _hex(x) { - var hexDigits = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]; - if (isNaN(x)) { - return "00"; - } - else { - var m = x; - return hexDigits[(m - m % 16) / 16] + hexDigits[m % 16]; - } - // return isNaN(x as number) ? "00" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16]; -} -/** - * converts an RGB string to hex - * @param {string} rgb - rgb color - * @returns {string} rbg as hex - */ -function rgb2hex(rgb) { - var rgb1 = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); - return ("#" + _hex(rgb1[1]) + _hex(rgb1[2]) + _hex(rgb1[3])).toUpperCase(); -} -exports.rgb2hex = rgb2hex; -nm.rgb2hex = rgb2hex; -/** - * Convert hex string to RGB or RGBA string - * @param {string} hexString - hex color string - * @param {number} [alphaVal=undefined] Alpha value - * @returns {string} - rgb or rgba color - */ -function hexAlphaToRgbOrRgba(hexString, alphaVal) { - hexString = ((hexString.charAt(0) == "#") ? hexString.substring(1, 7) : hexString); - var r = parseInt(hexString.substring(0, 2), 16).toString() || '0'; - var g = parseInt(hexString.substring(2, 4), 16).toString() || '0'; - var b = parseInt(hexString.substring(4, 6), 16).toString() || '0'; - if (alphaVal) { - return "rgba(" + r + "," + g + "," + b + "," + alphaVal + ")"; - } - else { - return "rgba(" + r + "," + g + "," + b + ")"; - } -} -exports.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba; -nm.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba; -/** - * adds alpha value to rgb string 'rgb(r, b, g)', returns 'rgba(r, g, b, a)' - * @param {string} rgb - rgb color - * @param {number} alpha - alpha value 0 to 1 - * @returns {string} rgba color - */ -function rgbToRgba(rgb, alpha) { - var pieces = rgb.split(','); - pieces[0] = pieces[0].replace('rgb', 'rgba'); - pieces[2] = pieces[2].replace(')', ''); - pieces.push(' ' + alpha.toFixed(1) + ')'); - return pieces.join(','); -} -exports.rgbToRgba = rgbToRgba; -nm.rgbToRgba = rgbToRgba; -/** - * @typedef {function} colorLookupByNumber - * @param {number} num - the number to use to retrieve the color - * @returns {string} rgb color - */ -/** - * Make a blue green red gradient - * @param {number} minVal - minimum value - * @param {number} maxVal - maximum value - * @param {boolean} flipColors - if the colors should be flipped - * @returns {colorLookupByNumber} color lookup function - */ -function makeBlueGreenRedGradient(minVal, maxVal, flipColors) { - if (flipColors === void 0) { flipColors = false; } - if (typeof flipColors != "boolean") { - flipColors = false; - } - return function (theVal) { - var r, g, b; - var ratio; - if (chk.undefinedOrNull(theVal)) { - return 'rgb(100,100,100)'; - } - var percent = (theVal - minVal) / (maxVal - minVal); - if (flipColors == true) { - percent = 1 - percent; - } - if (percent >= 1) { - r = 255; - g = 0; - b = 0; - } - else if (percent <= 0) { - r = 0; - g = 0; - b = 255; - } - else if (percent < .25) { - // green up, blue constant - r = 0; - g = Math.floor(255 * percent / 0.25); - b = 255; - } - else if (percent < 0.50) { - //blue down, green constant - ratio = (percent - 0.25) / 0.25; - r = 0; - g = 255; - b = 255 - Math.floor(255 * ratio); - } - else if (percent < 0.75) { - // red up, green constant - ratio = (percent - 0.5) / 0.25; - r = Math.floor(255 * ratio); - g = 255; - b = 0; - } - else { - // green down, red constant - ratio = (percent - 0.75) / 0.25; - r = 255; - g = 255 - Math.floor(255 * ratio); - b = 0; - } - r = r.toFixed(); - g = g.toFixed(); - b = b.toFixed(); - return 'rgb(' + r + ',' + g + ',' + b + ')'; - }; -} -exports.makeBlueGreenRedGradient = makeBlueGreenRedGradient; -nm.makeBlueGreenRedGradient = makeBlueGreenRedGradient; -/** - * Create a function that will return colors based on a gradient - * @param {number} median - median value - * @param {number} stdDev - standard deviation - * @param {boolean} flipColors - if the colors should be flipped - * @returns {colorLookupByNumber} color lookup function - */ -function makeBlueGreenRedGradientZScore(median, stdDev, flipColors) { - if (flipColors === void 0) { flipColors = false; } - var grd = makeBlueGreenRedGradient(-2.5, 2.5, flipColors); - return function (theVal) { - var zScore; - if (theVal == null) { - zScore = null; - } - else { - zScore = (theVal - median) / stdDev; - } - return grd(zScore); - }; -} -exports.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore; -nm.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore; - - -/***/ }), -/* 69 */, -/* 70 */, -/* 71 */, -/* 72 */, -/* 73 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/18/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var ItsLayerCollection_1 = __webpack_require__(56); -var LayerLegend_1 = __webpack_require__(47); -var quickMap_1 = __webpack_require__(5); -var map = quickMap_1.default({ addGeocode: true }); -window['map'] = map; -var itsLayerCollection = new ItsLayerCollection_1.default(map); -var layerArray = [ - { - groupName: 'ITS Inventory Layers', - collapse: false, - addCheck: true, - items: itsLayerCollection.layers - } -]; -var legend = new LayerLegend_1.default(layerArray, 'legend-container', {}); -console.log('it works'); - - -/***/ }) -/******/ ]); +!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=72)}([function(e,t,o){"use strict";function n(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){void 0===o[t[n]]&&(o[t[n]]={}),o=o[t[n]]}return o}Object.defineProperty(t,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,t.default=n},function(e,t){e.exports=$},function(e,t){e.exports=ol},function(e,t,o){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=r.default("util");t.makeGuid=n,i.makeGuid=n,t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);t.mapPopup=new n.default,t.default=t.mapPopup},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=n.default("olHelpers"),i=function(){function e(e){this._map=null,this._initialized=!1,this._subtype=e}return e.prototype.init=function(e){this._initialized||(this._map=e,this._initialized=!0)},Object.defineProperty(e.prototype,"map",{get:function(){return this._map},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),e.prototype._checkInit=function(){if(!this.initialized){var e=this._subtype+" object not initialized";throw alert(e),console.log(e),e}},e.prototype.checkInit=function(){this._checkInit()},e}();t.MapInteractionBase=i,r.MapInteractionBase=i,t.default=i},function(e,t,o){"use strict";function n(e){void 0===e&&(e={});var t=r.quickMapBase(e);return a.default.init(t),l.default.init(t),t}Object.defineProperty(t,"__esModule",{value:!0});var r=o(14),i=o(0),a=o(7),l=o(4),s=i.default("olHelpers");t.quickMap=n,s.quickMap=n,t.default=n},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12);t.mapMove=new n.default,t.default=t.mapMove},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2);t.proj4326=new n.proj.Projection({code:"EPSG:4326"}),t.proj3857=new n.proj.Projection({code:"EPSG:3857"}),t.proj3070=new n.proj.Projection({code:"EPSG:3070"})},function(e,t,o){"use strict";function n(e){return void 0===e||null===e}function r(e){return!n(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("util.checkDefined");t.undefinedOrNull=n,a.undefinedOrNull=n,t.definedAndNotNull=r,a.definedAndNotNull=r},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(17),r=o(0),i=o(3),a=o(1),l=r.default("layers"),s=function(){function e(e,t){if(void 0===t&&(t={}),t=t||{},"string"!=typeof e)throw"Invalid URL";this._url=e,this._params="object"==typeof t.params?t.params:{},this._legendCollapse="boolean"==typeof t.legendCollapse&&t.legendCollapse,this._legendCheckbox="boolean"!=typeof t.legendCheckbox||t.legendCheckbox,this.id=t.id||i.default(),this._name=t.name||"Unnamed Layer",this.animate=!1,this._opacity="number"==typeof t.opacity?t.opacity:1,this._opacity>1?this._opacity=1:this._opacity<0&&(this._opacity=0),this._visible="boolean"!=typeof t.visible||t.visible,this._source=void 0,this._olLayer=void 0,this._loaded=!1,this._maxResolution=n.zoomToResolution(t.minZoom),void 0!==this._maxResolution&&(this._maxResolution+=1e-5),this._minResolution=n.zoomToResolution(t.maxZoom),this._minZoom="number"==typeof t.minZoom?t.minZoom:void 0,this._maxZoom="number"==typeof t.maxZoom?t.maxZoom:void 0,this._zIndex="number"==typeof t.zIndex?t.zIndex:0,this.loadCallback="function"==typeof t.loadCallback?t.loadCallback:function(){},this._legendContent="",this._legendCheckbox?(this._legendContent+='<input type="checkbox" '+(this.visible?"checked":"")+' class="legend-check" id="'+this.id+'-legend-layer-check"><span></span>',this._legendContent+='<label for="'+this.id+'-legend-layer-check" class="legend-layer-name">'+this.name+"</label>"):this._legendContent+='<label class="legend-layer-name">'+this.name+"</label>",this._$legendDiv=null,this._applyCollapseCalled=!1,this._addLegendContent("string"==typeof t.legendContent?t.legendContent:void 0)}return e.prototype._load=function(){return 1==this.loaded||(this._loaded=!0,!1)},e.prototype.getLegendDiv=function(){return'<div class="legend-layer-div" id="'+this.id+'-legend-layer-div">'+this._legendContent+"</div>"},e.prototype._addLegendContent=function(e){void 0===e&&(e=""),e.indexOf("<ul>")>-1&&(e='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'+e),this._legendContent+=e,this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0&&(this._$legendDiv.append(e),this.applyCollapse())},e.prototype.addLegendContent=function(e){this._addLegendContent(e)},e.prototype.applyCollapse=function(){if(this._applyCollapseCalled)return void console.log("collapse already applied");if(this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0){var e=this._$legendDiv.find(".legend-items-expander");e.length>0&&(this._applyCollapseCalled=!0,e.click(function(){var e=a(this);e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("▼")):(e.addClass("legend-layer-group-collapsed"),e.html("▶"))}),this._legendCollapse&&e.trigger("click"))}},e.prototype.refresh=function(){this.source&&this.source.refresh()},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"legendContent",{get:function(){return this._legendContent},set:function(e){this._legendContent=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minResolution",{get:function(){return this._minResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxResolution",{get:function(){return this._maxResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minZoom",{get:function(){return this._minZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoom",{get:function(){return this._maxZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this.setVisible(e)},enumerable:!0,configurable:!0}),e.prototype.setVisible=function(e){this._visible=e,this.olLayer&&(this.olLayer.setVisible(this._visible),e&&!this._loaded&&this._load())},Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=e,this.olLayer&&this.olLayer.setOpacity(this._opacity)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),e.prototype.getSource=function(){return this._source},Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(e){this._zIndex=e},enumerable:!0,configurable:!0}),e.prototype.setZIndex=function(e){},Object.defineProperty(e.prototype,"olLayer",{get:function(){return this.getOlLayer()},enumerable:!0,configurable:!0}),e.prototype.getOlLayer=function(){return this._olLayer},e}();t.LayerBase=s,l.LayerBase=s,t.default=s},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),r=o(3),i=o(2),a=o(8),l="geocoder-invalid",s="geocoder-loading",p=function(){function e(e,t){var o=this,p=r.makeGuid(),u=r.makeGuid();this.map=t,this.indicationLayer=new i.layer.Vector({source:new i.source.Vector,style:new i.style.Style({image:new i.style.Circle({radius:12,fill:new i.style.Fill({color:"rgba(255,0,0,0.5)"}),stroke:new i.style.Stroke({color:"red",width:1})})})}),this.map.addLayer(this.indicationLayer),n(e).append('<div class="geocoder-el"><input type="text" id="'+p+'"><button id="'+u+'">Search</button></div>'),this.theButton=document.getElementById(u),this.theInput=document.getElementById(p),this.reset();var c=n(this.theButton),d=n(this.theInput);c.click(function(e){e.preventDefault(),c.addClass(s),o.theButton.disabled=!0,o.indicationLayer.getSource().clear(),n.get("https://geocode.xyz/"+o.theInput.value+"?geoit=json",{},function(e){var t=parseFloat(e.latt),n=parseFloat(e.longt);if(0==t&&0==n||e.error)d.addClass(l),o.theInput.title="Specified Location Invalid",o.theButton.title="Specified Location Invalid";else{var r=o.map.getView(),p=new i.geom.Point([n,t]),u=new i.Feature(p);o.indicationLayer.getSource().addFeature(u),p.transform(a.proj4326,a.proj3857),r.setCenter(p.getCoordinates()),r.setZoom(13)}c.removeClass(s),o.theButton.disabled=!1},"json")}),n(this.theInput).keyup(function(e){e.preventDefault(),o.theButton.disabled=0==o.theInput.value.length,d.removeClass(l),o.theInput.title="",o.theButton.title="",o.theButton.disabled||13!=e.keyCode||c.click()})}return e.prototype.reset=function(){this.theButton.disabled=!0,this.theInput.value=""},e}();t.Geocode=p},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(9),a=o(0),l=o(3),s=o(1),p=a.default("olHelpers"),u=function(e){function t(){var t=e.call(this,"map move")||this;return t._arrLyrRequest=[],t._arrLyrTimeout=[],t._arrLayer=[],t._lookupLayer={},t._mapMoveCallbacks=[],t._mapMoveCallbacksLookup={},t._mapMoveCallbackDelays=[],t._mapMoveCallbackContext=[],t._mapMoveCallbackTimeout=[],t._mapExtent=void 0,t._zoomLevel=void 0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t),this.map.getView().on(["change:center","change:resolution"],function(e){o._updateMapExtent();for(var t=0;t<o._arrLayer.length;t++)o.triggerLyrLoad(o._arrLayer[t],t,e.type);for(var t=0;t<o._mapMoveCallbacks.length;t++)o.triggerMoveCallback(t,e.type)})},t.prototype._updateMapExtent=function(){var e=this.map.getView();this._zoomLevel=e.getZoom();var t=e.calculateExtent(this.map.getSize());this._mapExtent={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},Object.defineProperty(t.prototype,"mapExtent",{get:function(){return this._mapExtent||this._updateMapExtent(),this._mapExtent},enumerable:!0,configurable:!0}),t.prototype.triggerLyrLoad=function(e,t,o){if(i.undefinedOrNull(e)&&i.undefinedOrNull(t))throw"need to define lyr or index";i.definedAndNotNull(e)&&i.undefinedOrNull(t)?t=this._arrLayer.indexOf(e):i.undefinedOrNull(e)&&i.definedAndNotNull(t)&&(e=this._arrLayer[t]),null!=this._arrLyrTimeout[t]&&(clearTimeout(this._arrLyrTimeout[t]),this._arrLyrTimeout[t]=null),null!=this._arrLyrRequest[t]&&4!=this._arrLyrRequest[t]&&(this._arrLyrRequest[t].abort(),this._arrLyrRequest[t]=null);var n=function(){};if(e.mapMoveBefore(this._zoomLevel,o)){e.mapMoveMakeGetParams(this._mapExtent,this._zoomLevel);var r=this;n=function(){function o(e,t){var o=this;this._arrLyrRequest[t]=s.get(e.url,e.mapMoveParams,function(t){e.mapMoveCallback(t),e.loadCallback()},"json").fail(function(t){"abort"!=t.statusText&&(console.log("failed"),console.log(e.url),console.log(e.mapMoveParams))}).always(function(){o._arrLyrTimeout[t]=null,o._arrLyrRequest[t]=null})}o.call(r,e,t)}}else e.clear();this._arrLyrTimeout[t]=setTimeout(n,e.onDemandDelay)},t.prototype.triggerMoveCallback=function(e,t,o){if(void 0===e&&void 0===o)throw"either the function index or the id must be defined";if("number"!=typeof e&&(e=this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[o])),e<0)return void console.log("function not found");null!=this._mapMoveCallbackTimeout[e]&&(clearTimeout(this._mapMoveCallbackTimeout[e]),this._mapMoveCallbackTimeout[e]=null);var n=this._mapMoveCallbackContext[e],r=this._mapMoveCallbacks[e],i=this,a=function(){null!==n?r.call(n,i._mapExtent,i._zoomLevel,t):r(i._mapExtent,i._zoomLevel,t)};this._mapMoveCallbackTimeout[e]=setTimeout(a,this._mapMoveCallbackDelays[e])},t.prototype.addVectorLayer=function(e,t){if(void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1)return void console.log("already added "+e.name+" to map move");this._checkInit(),this._arrLyrRequest.push(null),this._arrLyrTimeout.push(null),this._arrLayer.push(e),this._lookupLayer[e.id]=e,(t="boolean"!=typeof t||t)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))},t.prototype.addCallback=function(e,t,o,n,r){if(this._mapMoveCallbacks.indexOf(e)>-1)return void console.log("this function already added to map move");this._checkInit(),r||(r=l.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=e,this._mapMoveCallbackDelays.push("number"==typeof o?o:50),this._mapMoveCallbackContext.push(i.definedAndNotNull(t)?t:null),this._mapMoveCallbackTimeout.push(null),(n="boolean"!=typeof n||n)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))},t}(r.default);t.MapMoveCls=u,p.MapMoveCls=u,t.default=u},function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(0),a=o(2),l=o(1),s=i.default("olHelpers"),p=function(){function e(e,t,o,n,r){this.feature=e,this.layer=t,this.layerIndex=o,this.selectionLayer=n,this.popupContent="",this.esriLayerName="string"==typeof r?r:void 0}return Object.defineProperty(e.prototype,"layerName",{get:function(){return"string"==typeof this.esriLayerName?this.esriLayerName:this.layer.name},enumerable:!0,configurable:!0}),e}();t.FeatureLayerProperties=p;var u=function(e){function t(){var t=e.call(this,"map popup")||this;return t._arrPopupLayerIds=[],t._arrPopupLayers=[],t._arrPopupContentFunction=[],t._$popupContainer=void 0,t._$popupContent=void 0,t._$popupCloser=void 0,t._popupOverlay=void 0,t._selectionLayers=[],t._selectionLayerLookup={},t._mapClickFunctions=[],t._popupChangedFunctions=[],t._esriMapServiceLayers=[],t._popupOpen=!1,t._popupCoordinate=null,t._passThroughLayerFeatureArray=[],t._currentPopupIndex=-1,t._popupContentLength=0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t);var n,r=this.map.getTarget();n=l("string"==typeof r?"#"+r:r),n.append('<div class="ol-popup"><span class="ol-popup-closer">X</span><div class="popup-content"></div></div>'),this._$popupContainer=n.find(".ol-popup"),this._$popupContent=n.find(".popup-content"),this._$popupCloser=n.find(".ol-popup-closer");var i=function(e){return a.easing.inAndOut(e)};this._popupOverlay=new a.Overlay({element:this._$popupContainer[0],autoPan:!0,autoPanAnimation:{duration:250,source:t.getView().getCenter(),easing:i}}),this._map.addOverlay(this._popupOverlay),this._$popupCloser.click(function(e){o.closePopup()}),this._map.on("singleclick",function(e){if(o.closePopup(),o._popupCoordinate=e.coordinate,o._esriMapServiceLayers.length>0)for(var t={geometry:e.coordinate.join(","),geometryType:"esriGeometryPoint",layers:"all",sr:o._map.getView().getProjection().getCode().split(":")[1],mapExtent:o._map.getView().calculateExtent(o._map.getSize()).join(","),imageDisplay:o._map.getSize().join(",")+",96",returnGeometry:!0,tolerance:15,f:"pjson"},n=0,r=o._esriMapServiceLayers;n<r.length;n++){var i=r[n];i.getPopupInfo(t)}var a=o._featuresAtPixel(e.pixel);o._passThroughLayerFeatureArray=[],o._currentPopupIndex=-1;for(var l=0;l<a.length;l++){var s=a[l],p=s.feature.getProperties(),u=o._arrPopupContentFunction[s.layerIndex](p,o._$popupContent);u===!1||("string"==typeof u?(s.popupContent=u,o._passThroughLayerFeatureArray.push(s)):s.selectionLayer.getSource().addFeature(s.feature))}o._popupContentLength=o._passThroughLayerFeatureArray.length,o._currentPopupIndex=-1;var c='<div class="ol-popup-nav">';c+='<span class="previous-popup ol-popup-nav-arrow">◀</span>',c+='<span class="next-popup ol-popup-nav-arrow">▶</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span> of </span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span> - </span>",c+='<span class="current-popup-layer-name"></span>',c+="</div>",c+='<div class="ol-popup-inner">',c+="</div>",o._$popupContent.html(c),o._$popupContent.find(".previous-popup").click(function(){1!=o._popupContentLength&&(0==o._currentPopupIndex?o._currentPopupIndex=o._popupContentLength-1:o._currentPopupIndex--,o._triggerFeatSelect())});var d=o._$popupContent.find(".next-popup");d.click(function(){1==o._popupContentLength&&o._currentPopupIndex>-1||(o._currentPopupIndex==o._popupContentLength-1?o._currentPopupIndex=0:o._currentPopupIndex++,o._triggerFeatSelect())}),o._popupContentLength>0&&(d.trigger("click"),o._popupOverlay.setPosition(o._popupCoordinate),o._$popupContent.scrollTop(0),o._popupOpen=!0)}),this._map.on("pointermove",function(e){if(!e.dragging){var t=o.map.getEventPixel(e.originalEvent),n=!1;o.map.forEachFeatureAtPixel(t,function(e,t){if(!n)for(var r=0,i=o._arrPopupLayers;r<i.length;r++){var a=i[r];if(a.olLayer==t){n=!0;break}}});o.map.getTargetElement().style.cursor=n?"pointer":""}})},t.prototype._triggerFeatSelect=function(){var e=this._$popupContent.find(".current-popup-item-number"),t=this._$popupContent.find(".ol-popup-inner"),o=this._$popupContent.find(".current-popup-layer-name");this.clearSelection();var n=this._passThroughLayerFeatureArray[this._currentPopupIndex];e.html((this._currentPopupIndex+1).toFixed()),o.html(n.layerName),t.html(n.popupContent),n.selectionLayer.getSource().addFeature(n.feature);for(var r=0,i=this._popupChangedFunctions;r<i.length;r++){(0,i[r])(this._$popupContent)}},t.prototype.addMapServicePopupContent=function(e,t,o,n){var r=new p(e,t,this._popupContentLength,this._selectionLayerLookup[t.id],n);r.popupContent=o,this._passThroughLayerFeatureArray.push(r),this._popupContentLength++,l(".popup-content-length").html(this._popupContentLength.toFixed()),this._popupOpen||(this._$popupContent.find(".next-popup").trigger("click"),this._popupOverlay.setPosition(this._popupCoordinate),this._$popupContent.scrollTop(0),this._popupOpen=!0)},t.prototype._featuresAtPixel=function(e){var t=this,o=[];return this.map.forEachFeatureAtPixel(e,function(e,n){var r,i=!1,a=null;for(r=0;r<t._arrPopupLayers.length;r++)if(a=t._arrPopupLayers[r],a.olLayer===n){i=!0;break}i&&o.push(new p(e,a,r,t._selectionLayers[r]))}),o},t.prototype.closePopup=function(){return this._checkInit(),this._popupOpen=!1,this._popupOverlay.setPosition(void 0),this._$popupCloser[0].blur(),this.clearSelection(),this._$popupContent.html(""),!1},t.prototype.addPopupChangedFunction=function(e){this._popupChangedFunctions.push(e)},t.prototype._addPopupLayer=function(e,t){this._checkInit(),t=t||{},t.color=t.color||"rgba(255,170,0,0.5)",t.width=t.width||10;var o;o=t.olStyle?t.olStyle:new a.style.Style({stroke:new a.style.Stroke({color:t.color,width:t.width}),image:new a.style.Circle({radius:7,fill:new a.style.Fill({color:t.color}),stroke:new a.style.Stroke({color:t.color,width:1})}),fill:new a.style.Fill({color:t.color})});var n=new a.layer.Vector({source:new a.source.Vector,style:o});return n.setZIndex(100),this._selectionLayers.push(n),this._selectionLayerLookup[e.id]=n,this.map.addLayer(n),n},t.prototype.addVectorPopup=function(e,t,o){var n=this._addPopupLayer(e,o);return this._arrPopupLayerIds.push(e.id),this._arrPopupLayers.push(e),this._arrPopupContentFunction.push(t),n},t.prototype.removeVectorPopup=function(e){var t=this._arrPopupLayerIds.indexOf(e.id);t>-1&&(this._arrPopupLayerIds.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupContentFunction.splice(t,1),this._selectionLayers.splice(t,1),delete this._selectionLayerLookup[e.id])},t.prototype.addMapServicePopup=function(e,t){var o=this._addPopupLayer(e,t);return this._esriMapServiceLayers.push(e),o},t.prototype.clearSelection=function(){this._checkInit();for(var e=0;e<this._selectionLayers.length;e++)this._selectionLayers[e].getSource().clear();for(var t=0,o=this._mapClickFunctions;t<o.length;t++){(0,o[t])()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,t.default=u},function(e,t,o){"use strict";function n(e){void 0===e&&(e={}),e.divId=e.divId||"map",e.center=e.center||{x:-10018378,y:5574910},e.zoom="number"==typeof e.zoom?e.zoom:7,e.baseSwitcher="boolean"!=typeof e.baseSwitcher||e.baseSwitcher,e.fullScreen="boolean"==typeof e.fullScreen&&e.fullScreen,e.addGeocode=e.addGeocode||!1,a("#"+e.divId).css("position","relative");var t=new i.layer.Tile({source:new i.source.OSM});if(e.baseSwitcher,e.zoom<0||e.zoom>28)throw"zoom out of range";if(e.center.x>=-180&&e.center.x<=180&&e.center.y>=-90&&e.center.y<=90){var o=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),o.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var n=o.getCoordinates();e.center.x=n[0],e.center.y=n[1]}var r=i.control.defaults({attributionOptions:{collapsible:!1}}),s=new i.View({center:[e.center.x,e.center.y],zoom:e.zoom,minZoom:e.minZoom,maxZoom:e.maxZoom}),p=new i.Map({layers:[t],target:e.divId,controls:r,view:s});return e.fullScreen&&p.addControl(new i.control.FullScreen({})),e.addGeocode&&new l.Geocode(document.getElementById(e.divId),p),p}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(2),a=o(1),l=o(11),s=r.default("olHelpers");t.quickMapBase=n,s.quickMapBase=n,t.default=n},,,function(e,t,o){"use strict";function n(e){return"number"==typeof e?e%1==0&&e>=0&&e<=28?l[e]:void console.log("invalid zoom level provided: "+e):void 0}function r(e){for(var t=0;t<l.length;t++)if(e>=l[t])return t;return 0}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("olHelpers.zoomResolutionConvert"),l=[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,.5971642834779395,.29858214173896974,.14929107086948487,.07464553543474244,.03732276771737122,.01866138385868561,.009330691929342804,.004665345964671402,.002332672982335701,.0011663364911678506,.0005831682455839253];t.zoomToResolution=n,a.zoomToResolution=n,t.resolutionToZoom=r,a.resolutionToZoom=r},,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(10),i=o(7),a=o(0),l=o(2),s=o(1),p=a.default("layers"),u=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return o=o,""==n.url.trim()&&(n._loaded=!0),n._style=void 0===o.style?void 0:o.style,n.visible?n._autoLoad=!0:n._autoLoad="boolean"==typeof o.autoLoad&&o.autoLoad,n._onDemand="boolean"==typeof o.onDemand&&o.onDemand,n._onDemandDelay="number"==typeof o.onDemandDelay?o.onDemandDelay:300,o.mapMoveObj?n._mapMove=o.mapMoveObj:n._mapMove=n._onDemand?i.default:void 0,n._mapMoveMakeGetParams="function"==typeof o.mapMoveMakeGetParams?o.mapMoveMakeGetParams:function(){return{}},n._onDemand&&(n._loaded=!0,n._mapMoveParams={},n._mapMove.checkInit(),n._mapMove.addVectorLayer(n)),n._source=new l.source.Vector,n._olLayer=new l.layer.Vector({source:n._source,visible:n.visible,style:n.style,minResolution:n._minResolution,maxResolution:n._maxResolution,renderOrder:o.renderOrder}),n.olLayer.setZIndex(n._zIndex),n._projectionMap=null,n._projection4326=new l.proj.Projection({code:"EPSG:4326"}),n._olLayer.setOpacity(n.opacity),n}return n(t,e),t.prototype.addFeatures=function(e){console.log("Layer vector base addFeatures is a placeholder and does nothing")},t.prototype.mapMoveBefore=function(e,t){return!(void 0!==this.minZoom&&e<this.minZoom)&&(!(void 0!==this.maxZoom&&e>this.maxZoom)&&this.visible)},t.prototype.mapMoveMakeGetParams=function(e,t){this._mapMoveParams={},s.extend(this._mapMoveParams,this.params),s.extend(this._mapMoveParams,this._mapMoveMakeGetParams(this,e,t))},t.prototype.mapMoveCallback=function(e){this.source&&this._source.clear()},t.prototype.clear=function(){this._source&&this._source.clear()},Object.defineProperty(t.prototype,"onDemandDelay",{get:function(){return this._onDemandDelay},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoLoad",{get:function(){return this._autoLoad},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this._style},set:function(e){this._style=e,this.olLayer.setStyle(this._style)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapCrs",{get:function(){return null==this.mapProj?null:this.mapProj.getCode()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapProj",{get:function(){return null!=this._projectionMap?this._projectionMap:this._mapMove?(this._projectionMap=this._mapMove.map.getView().getProjection(),this._projectionMap):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapMove",{get:function(){return this._mapMove},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapMoveParams",{get:function(){return this._mapMoveParams},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){e.prototype.setVisible.call(this,t),this._onDemand&&this.mapMove.triggerLyrLoad(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return this.source.getFeatures()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"olLayer",{get:function(){return e.prototype.getOlLayer.call(this)},enumerable:!0,configurable:!0}),t.prototype.setZIndex=function(e){this.olLayer.setZIndex(e)},t}(r.LayerBase);t.LayerBaseVector=u,p.LayerBaseVector=u,t.default=u},,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=o(3),i=o(7),a=n.default("collections"),l=o(1),s=function(){function e(e,t){this.groupLayers=[],this.groupLayersLookup={},this.groupGroups=[],this.groupGroupsLookup={},this.itemIdArray=[],void 0===e?(this.parent=null,this.groupId="root",this.groupName="root",this.allGroupLookup={root:this},this.allGroupArray=[this],this.allLayerArray=[],this.allLayerLookup={},this.layerParentLookup={},this.collapse=!1,this.addCheck=!1):(this.groupId=r.default(),this.parent=t,this.groupName=e.groupName,this.collapse="boolean"==typeof e.collapse&&e.collapse,this.addCheck="boolean"!=typeof e.addCheck||e.addCheck)}return e.prototype.addGroup=function(t,o){var n;n=o.length>0?o[o.length-1]:"root";var r=this.allGroupLookup[n],i=new e(t,r);if(this.allGroupLookup[i.groupId]=i,this.allGroupArray.push(i),r.groupGroups.push(i),r.groupGroupsLookup[i.groupId]=i,r.itemIdArray.indexOf(i.groupId)>0)throw console.log(i.groupId),"layer and group ids must be unique";return r.itemIdArray.push(i.groupId),i},e.prototype.addLegendLayer=function(e,t){var o;o=t.length>0?t[t.length-1]:"root",this.allLayerLookup[e.id]=e,this.allLayerArray.push(e);var n=this.allGroupLookup[o];if(n.groupLayers.push(e),n.groupLayersLookup[e.id]=e,n.itemIdArray.indexOf(e.id)>0)throw console.log(e.id),"layer and group ids must be unique";n.itemIdArray.push(e.id),this.layerParentLookup[e.id]=n},e.prototype.getLegendHtml=function(e,t){var o='<ul id="'+e+'" class="legend-container">';return o+="<li>"+t.legendTitle+'<input type="checkbox" checked id="suppress-by-extent-'+e+'" class="suppress-by-extent"><label title="Suppress layers not visible at this zoom level" for="suppress-by-extent-'+e+'"><span></span></label></li>',o+=this._buildLegend(this.itemIdArray,this,t.layerDivClasses)+"</ul>"},e.prototype._buildLegend=function(e,t,o){if(0==e.length)return"";var n="",r=e[0];if(t.groupLayersLookup[r]){var i=t.groupLayersLookup[r];n+='<li id="'+i.id+'-layer-li" class="legend-layer-li '+o.join(" ")+'">'+i.getLegendDiv()+"</li>"}else if(t.groupGroupsLookup[r]){var a=t.groupGroupsLookup[r];n+="<li>",n+='<div id="'+a.groupId+'-legend-layer-div" class="legend-layer-group '+o.join(" ")+'">',n+=a.addCheck?'<input type="checkbox" checked id="'+a.groupId+'-group-chck"><label for="'+a.groupId+'-group-chck" title="Click arrow to expand or collapse">'+a.groupName+"</label>":'<label title="Click arrow to expand or collapse">'+a.groupName+"</label>",n+='<span title="Expand/Collapse" class="layer-group-expander',n+=(a.collapse?" legend-layer-group-initial-collapse":"")+'">',n+=a.collapse?"▶":"▼",n+="</span>",n+="<ul>"+this._buildLegend(a.itemIdArray,a,o)+"</ul>",n+="</div>",n+="</li>"}return n+this._buildLegend(e.slice(1),t,o)},e}(),p=function(){function e(e,t,o){void 0===o&&(o={});for(var n=0,a=e;n<a.length;n++){if(void 0===a[n])throw"undefined item passed in array to legend constructor"}o.legendTitle="string"==typeof o.legendTitle?o.legendTitle:"Legend",o.scaleDependent="boolean"!=typeof o.scaleDependent||o.scaleDependent,o.layerDivClasses=o.layerDivClasses||[],o.scaleDependent&&i.default.checkInit(),this.$divElement=l("#"+t),this._legendItems=e,this.layerGroup=new s,this._buildTree(e),this.legendId=r.default(),this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId,o));for(var p=0,u=this.layerGroup.allLayerArray;p<u.length;p++){u[p].applyCollapse()}var c=this;o.scaleDependent&&(i.default.checkInit(),i.default.addCallback(function(e,t,o){if(void 0===o||"change:resolution"==o)for(var n=0,r=this.layerGroup.allLayerArray;n<r.length;n++){var i=r[n],a=l("#"+i.id+"-layer-li");t>i.maxZoom||t<i.minZoom?a.addClass("layer-not-visible"):a.removeClass("layer-not-visible")}},this,100,!0,"legend1")),this.$divElement.find(".suppress-by-extent").change(function(){var e=l(".legend-layer-li");this.checked?e.removeClass("layer-force-show"):e.addClass("layer-force-show")}),this.$divElement.find(".legend-check").change(function(){var e=this.id.replace("-legend-layer-check","");c.layerGroup.allLayerLookup[e].visible=this.checked}),this.$divElement.find(".legend-layer-group > input[type=checkbox]").change(function(){l(this).siblings("ul").find("input[type=checkbox]").prop("checked",this.checked).trigger("change")}),this.$divElement.find(".layer-group-expander").click(function(){var e=l(this);e.removeClass("legend-layer-group-initial-collapse"),e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("▼")):(e.addClass("legend-layer-group-collapsed"),e.html("▶"))}),this.$divElement.find(".legend-layer-group-initial-collapse").trigger("click")}return e.prototype._buildTree=function(e,t){if(0!=e.length){var o=e[0];if((this._legendItems.indexOf(o)>-1||void 0===t)&&(t=[]),void 0!==o.groupName){var n=e[0],r=this.layerGroup.addGroup(n,t);t.push(r.groupId),this._buildTree(o.items,t)}else{var i=e[0];this.layerGroup.addLegendLayer(i,t)}this._buildTree(e.slice(1),t)}},e}();t.LayerLegend=p,a.LayerLegend=p,t.default=p},,function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(44),i=o(0),a=o(2),l=o(1),s=o(8),p=o(8),u=i.default("layers"),c=function(e){function t(t,o){void 0===o&&(o={});var n=this;return t="string"==typeof t?t:"",n=e.call(this,t,o)||this,n._geoJsonFormat=new a.format.GeoJSON,n._transform=o.transform||{},n._transform.dataProjection=n._transform.dataProjection||s.proj4326,n._transform.featureProjection=n._transform.featureProjection||p.proj3857,(n.autoLoad||n.visible)&&n._load(),n}return n(t,e),t.prototype.addFeatures=function(e){this.source.addFeatures(this._geoJsonFormat.readFeatures(e,{dataProjection:this._transform.dataProjection,featureProjection:this._transform.featureProjection}))},t.prototype._load=function(){var t=this;return!!e.prototype._load.call(this)||(l.get(this._url,this._params,function(e){t.addFeatures(e),t.loadCallback(t)},"json").fail(function(){this._loaded=!1}),!1)},t.prototype.mapMoveCallback=function(t){e.prototype.mapMoveCallback.call(this,t),this._source.addFeatures(this._geoJsonFormat.readFeatures(t,{featureProjection:this._transform.featureProjection,dataProjection:this._transform.dataProjection}))},t}(r.LayerBaseVector);t.LayerBaseVectorGeoJson=c,u.LayerBaseVectorGeoJson=c,t.default=c},,,,,,,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(67),r=o(0),i=o(63),a=r.default("collections"),l=[{name:"Camera",itsType:"cctv",minZoom:11,itsIconConfig:{prop:"owner",defaultName:"WisDOT",defaultIcon:"cctv.png",iconArray:[["City of Madison","Madison","cctv-mad.png"]]}},{name:"Message Signs",itsType:"DMS",minZoom:11,itsIconConfig:{prop:"dmsType",defaultName:"DMS",defaultIcon:"dms.png",iconArray:[["pcms","PCMS","pcms.png"]]}},{name:"ATR",itsType:"atr",minZoom:8,itsIcon:"atr.png",visible:!1},{name:"Lighting",itsType:"light",minZoom:16,itsIcon:"streetlight.png",visible:!1,onDemand:!0},{name:"Bluetooth",itsType:"blue",minZoom:10,itsIcon:"bluetooth.png",visible:!1},{name:"Cabinets",itsType:"cabinet",minZoom:10,itsIcon:"cabinet.png",visible:!1},{name:"Hut",itsType:"hut",minZoom:10,itsIcon:"hut.png",visible:!1},{name:"Vault",itsType:"vault",minZoom:13,itsIcon:"vault.png",visible:!1},{name:"Advisory Radio",itsType:"har",minZoom:10,itsIcon:"har.png",visible:!1},{name:"Loop Detectors",itsType:"loop",legendCollapse:!0,minZoom:14,visible:!1,itsIconConfig:{prop:"dtctrType",defaultName:"Other",defaultIcon:"loopdetectorother.png",iconArray:[["detector","Detector","loopdetector.png"],["long","Long","loopdetectorlong.png"],["zone","Zone","loopdetectorzone.png"]]},onDemand:!0},{name:"Microwave",itsType:"microwave",minZoom:14,itsIcon:"microwave.png",visible:!1},{name:"Pull Box",itsType:"pull",minZoom:14,itsIcon:"pullbox.png",visible:!1,onDemand:!0},{name:"RWIS",itsType:"rwis",minZoom:7,itsIcon:"rwis.png",visible:!1},{name:"Ramp Gates",itsType:"gate",minZoom:10,itsIcon:"rampgate.png",visible:!1},{name:"Ramp Meter",itsType:"meter",minZoom:10,itsIcon:"rampmeter.png",visible:!1},{name:"Signal",itsType:"signal",minZoom:13,itsIcon:"signal.png",visible:!1,onDemand:!0},{name:"Tower",itsType:"tower",minZoom:10,itsIcon:"tower.png",visible:!1},{name:"Trench",itsType:"trench",onDemand:!0,visible:!1,onDemandDelay:500,minZoom:15,legendCollapse:!0,itsLineConfig:{prop:"owner",defaultName:"Other",defaultColor:n.hexAlphaToRgbOrRgba("#747474",.8),lineArray:[["WisDOT","WisDOT",n.hexAlphaToRgbOrRgba("#FF032F",.7)],["WIN","WIN",n.hexAlphaToRgbOrRgba("#FFC632",.7)],["USXchange","USXchange",n.hexAlphaToRgbOrRgba("#2DFF46",.7)],["AT&T","AT&T",n.hexAlphaToRgbOrRgba("#ff2be5",.7)],["Touch America","Touch America",n.hexAlphaToRgbOrRgba("#52f3ff",.7)],["Qwest","Qwest",n.hexAlphaToRgbOrRgba("#9278ff",.7)],["McLeodUSA","McLeodUSA",n.hexAlphaToRgbOrRgba("#2926FF",.7)],["CINC","CINC",n.hexAlphaToRgbOrRgba("#CB00FF",.7)],["City of Madison","Madison",n.hexAlphaToRgbOrRgba("#000380",.7)]]}}],s=function(){function e(e,t){this._map=e,this._layers=[],t="object"==typeof t?t:[];for(var o=0;o<l.length;o++){for(var n=l[o],r=!0,a=0;a<t.length;a++)if(t[a]==n.itsType){r=!1;break}if(r){var s=new i.default(n);this._map.addLayer(s.olLayer),this._layers.push(s)}}}return Object.defineProperty(e.prototype,"layers",{get:function(){return this._layers},enumerable:!0,configurable:!0}),e}();t.ItsLayerCollection=s,a.ItsLayerCollection=s,t.default=s},,,,,,,,function(e,t,o){"use strict";function n(e,t,o,n){var r=0;if("string"==typeof e&&r++,"object"==typeof t&&(t.width="number"==typeof t.width?t.width:5,t.color="string"==typeof t.color?t.color:"red",r++),"object"==typeof o&&(o.defaultName=o.defaultName||"Other",void 0===o.iconArray&&(o.iconArray=[]),r++),"object"==typeof n){n.defaultName=n.defaultName||"Other",n.defaultWidth=n.defaultWidth||5,n.defaultColor=n.defaultColor||"red",void 0===n.lineArray&&(n.lineArray=[]);for(var i=0;i<n.lineArray.length;i++)3==n.lineArray[i].length&&n.lineArray[i].push(5);r++}if(r>1)throw"Only one style config can be defined"}function r(e,t,o,r){n(e,t,o,r);var i="https://transportal.cee.wisc.edu/its/inventory/icons/";return e?new u.style.Style({image:new u.style.Icon({src:i+e,crossOrigin:"anonymous"})}):t?new u.style.Style({stroke:new u.style.Stroke({color:t.color,width:t.width})}):o?function(e){for(var t=e.getProperties()[o.prop],n=i+o.defaultIcon,r=0;r<o.iconArray.length;r++){var a=o.iconArray[r];if(t.trim().toLocaleLowerCase()==a[0].trim().toLocaleLowerCase()){n=i+a[2];break}}return[new u.style.Style({image:new u.style.Icon({src:n,crossOrigin:"anonymous"})})]}:r?function(e){for(var t=e.getProperties()[r.prop],o=r.defaultColor||"red",n=r.defaultWidth||5,i=0;i<r.lineArray.length;i++){var a=r.lineArray[i];if(t.trim().toLocaleLowerCase()==a[0].trim().toLocaleLowerCase()){o=a[2],n=a[3];break}}return[new u.style.Style({stroke:new u.style.Stroke({color:o,width:n})})]}:void 0}function i(e,t,o,r){var i=17;n(e,t,o,r);var a="https://transportal.cee.wisc.edu/its/inventory/icons/";if(e)return'<img src="'+(a+e)+'" class="legend-layer-icon" height="'+i+'">';if(t)return'<hr style="height: '+t.width+"px; background-color: "+t.color+'">';if(o){var l="";l+="<ul>";for(var s=0,p=o.iconArray;s<p.length;s++){var u=p[s];l+='<li><span class="legend-layer-subitem">'+u[1]+'</span><img src="'+(a+u[2])+'" class="legend-layer-icon" height="'+i+'">'}return l+='<li><span class="legend-layer-subitem">'+o.defaultName+'</span><img src="'+(a+o.defaultIcon)+'" class="legend-layer-icon" height="'+i+'"></li>',l+="</ul>"}if(r){var l="";l+="<ul>";for(var c=0,d=r.lineArray;c<d.length;c++){var h=d[c];l+='<li><span class="legend-layer-subitem">'+h[1]+'</span><hr style="height: '+h[3]+"px; background-color: "+h[2]+'">'}return l+='<li><span class="legend-layer-subitem">'+r.defaultName+'</span><hr style="height: '+r.defaultWidth+"px; background-color: "+r.defaultColor+'"></li>',l+="</ul>"}return""}var a=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var l=o(48),s=o(4),p=o(0),u=o(2),c=o(1),d=o(8),h=p.default("layers"),f=function(e){function t(t){var o=this;if("string"!=typeof t.itsType)throw"its type must be defined";t.transform={dataProjection:d.proj4326,featureProjection:d.proj3857};var n="";return void 0===t.style&&(t.style=r(t.itsIcon,t.itsLineStyle,t.itsIconConfig,t.itsLineConfig),n=i(t.itsIcon,t.itsLineStyle,t.itsIconConfig,t.itsLineConfig)),t.params="object"==typeof t.params?t.params:{},c.extend(t.params,{format:"JSON",resource:t.itsType}),o=e.call(this,"https://transportal.cee.wisc.edu/its/inventory/",t)||this,o.addLegendContent(n),t.addPopup="boolean"!=typeof t.addPopup||t.addPopup,t.addPopup&&s.default.addVectorPopup(o,function(e){return'<iframe src="https://transportal.cee.wisc.edu/its/inventory/?feature='+e.featureGuid+'" height="250" width="350"></iframe>'}),o}return a(t,e),t.prototype.mapMoveMakeGetParams=function(t,o){e.prototype.mapMoveMakeGetParams.call(this,t,o);var n=new u.geom.Point([t.minX,t.minY]);n.transform(this.mapProj,this._projection4326);var r=n.getCoordinates(),i=new u.geom.Point([t.maxX,t.maxY]);i.transform(this.mapProj,this._projection4326);var a=i.getCoordinates();c.extend(this.mapMoveParams,{L:r[0],R:a[0],B:r[1],T:a[1]})},t}(l.LayerBaseVectorGeoJson);t.LayerItsInventory=f,h.LayerItsInventory=f,t.default=f},,,,function(e,t,o){"use strict";function n(e){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];if(isNaN(e))return"00";var o=e;return t[(o-o%16)/16]+t[o%16]}function r(e){var t=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);return("#"+n(t[1])+n(t[2])+n(t[3])).toUpperCase()}function i(e,t){e="#"==e.charAt(0)?e.substring(1,7):e;var o=parseInt(e.substring(0,2),16).toString()||"0",n=parseInt(e.substring(2,4),16).toString()||"0",r=parseInt(e.substring(4,6),16).toString()||"0";return t?"rgba("+o+","+n+","+r+","+t+")":"rgba("+o+","+n+","+r+")"}function a(e,t){var o=e.split(",");return o[0]=o[0].replace("rgb","rgba"),o[2]=o[2].replace(")",""),o.push(" "+t.toFixed(1)+")"),o.join(",")}function l(e,t,o){return void 0===o&&(o=!1),"boolean"!=typeof o&&(o=!1),function(n){var r,i,a,l;if(u.undefinedOrNull(n))return"rgb(100,100,100)";var s=(n-e)/(t-e);return 1==o&&(s=1-s),s>=1?(r=255,i=0,a=0):s<=0?(r=0,i=0,a=255):s<.25?(r=0,i=Math.floor(255*s/.25),a=255):s<.5?(l=(s-.25)/.25,r=0,i=255,a=255-Math.floor(255*l)):s<.75?(l=(s-.5)/.25,r=Math.floor(255*l),i=255,a=0):(l=(s-.75)/.25,r=255,i=255-Math.floor(255*l),a=0),r=r.toFixed(),i=i.toFixed(),a=a.toFixed(),"rgb("+r+","+i+","+a+")"}}function s(e,t,o){void 0===o&&(o=!1);var n=l(-2.5,2.5,o);return function(o){var r;return r=null==o?null:(o-e)/t,n(r)}}Object.defineProperty(t,"__esModule",{value:!0});var p=o(0),u=o(9),c=p.default("util.colors");t.rgb2hex=r,c.rgb2hex=r,t.hexAlphaToRgbOrRgba=i,c.hexAlphaToRgbOrRgba=i,t.rgbToRgba=a,c.rgbToRgba=a,t.makeBlueGreenRedGradient=l,c.makeBlueGreenRedGradient=l,t.makeBlueGreenRedGradientZScore=s,c.makeBlueGreenRedGradientZScore=s},,,,,function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(55),r=o(46),i=o(6),a=i.default({addGeocode:!0});window.map=a;var l=new n.default(a),s=[{groupName:"ITS Inventory Layers",collapse:!1,addCheck:!0,items:l.layers}];new r.default(s,"legend-container",{});console.log("it works")}]); //# sourceMappingURL=itsMap.js.map \ No newline at end of file diff --git a/test/serve/js/itsMap.js.map b/test/serve/js/itsMap.js.map index 41cc52fac5f8769561970dec8aefa892ffd01776..a7af05b809633bb309bf92b2f415a4f2ea2b4cb7 100644 --- a/test/serve/js/itsMap.js.map +++ b/test/serve/js/itsMap.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 7bb55fd41bd308ae26ba?4c44","webpack:///./src/util/provide.ts?5c82","webpack:///external \"$\"?57aa","webpack:///external \"ol\"?81ed","webpack:///./src/util/makeGuid.ts?e80e","webpack:///./src/olHelpers/mapInteractionBase.ts?f419","webpack:///./src/olHelpers/quickMap.ts?1069","webpack:///./src/olHelpers/mapMove.ts?6a2b","webpack:///./src/olHelpers/mapPopup.ts?5d6c","webpack:///./src/olHelpers/projections.ts?804b","webpack:///./src/util/checkDefined.ts?bcd7","webpack:///./src/layers/LayerBase.ts?bf94","webpack:///./src/olHelpers/geocode.ts?5a2f","webpack:///./src/olHelpers/mapMoveCls.ts?cd45","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7","webpack:///./src/olHelpers/quickMapBase.ts?fb65","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b","webpack:///./src/layers/LayerBaseVector.ts?c105","webpack:///./src/collections/LayerLegend.ts","webpack:///./src/layers/LayerBaseVectorGeoJson.ts","webpack:///./src/collections/ItsLayerCollection.ts","webpack:///./src/layers/LayerItsInventory.ts","webpack:///./src/util/colors.ts","webpack:///./src/_tests/demos/itsMap.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AAC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UAAU,MAAc;QAE3B,IAAI,MAAM,CAAC;QACX,EAAE,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC;YACjB,MAAM,GAAG,IAAI,CAAC;QAClB,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC;QACxC,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC;AACN,CAAC;AAfD,wEAeC;AAED,EAAE,CAAC,8BAA8B,GAAG,8BAA8B,CAAC;;;;;;;;;;;;ACtLnE;;GAEG;;;AAGH,mDAAsE;AACtE,4CAAwD;AACxD,wCAAgD;AAEhD,IAAI,GAAG,GAAG,kBAAQ,CAAC,EAAC,UAAU,EAAE,IAAI,EAAC,CAAC,CAAC;AAGvC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;AAEpB,IAAI,kBAAkB,GAAG,IAAI,4BAAkB,CAAC,GAAG,CAAC,CAAC;AAErD,IAAI,UAAU,GAAG;IACb;QACI,SAAS,EAAE,sBAAsB;QACjC,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,kBAAkB,CAAC,MAAM;KACnC;CACJ,CAAC;AAEF,IAAI,MAAM,GAAG,IAAI,qBAAW,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAEjE,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC","file":"itsMap.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 73);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7bb55fd41bd308ae26ba","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachLayerAtPixel(pixel, (lyr) => {\r\n if (hit){\r\n return;\r\n }\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == lyr){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1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mZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxE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fAgGCu+Rlm4SvZizyDH+0reDHp92iO0BuX3bCfItl0PEwvYLqpwXG2MHlGsQ4S8pMJZv1JGmHiEoHQDdOjwmVlEP/nE9ADKjI8xLI0OOGITfy0SbeG/C2jKUDGSlDhM9I3IpK9iup6XnbRNC7yqueNsJCCIiXzdQhnaGN+46umnEdy5U5UbUJ48LFM9GkJo8BdDOiAZ7ZIQbKhYLMqvhU2wmNxjEAsS2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","import {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport mapMove from '../olHelpers/mapMove';\r\nimport MapMoveCls from '../olHelpers/mapMoveCls'\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\nexport interface makeMapMoveParams {\r\n /**\r\n *\r\n * @param lyr\r\n * @param extent\r\n * @param zoomLevel\r\n */\r\n (lyr: LayerBaseVector, extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel?: number): any\r\n}\r\n\r\n\r\n\r\nexport interface LayerBaseVectorOptions extends LayerBaseOptions{\r\n autoLoad?: boolean;\r\n style?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n onDemand?: boolean;\r\n onDemandDelay?: number;\r\n mapMoveMakeGetParams?: makeMapMoveParams;\r\n mapMoveObj?: MapMoveCls;\r\n renderOrder?: (a: ol.Feature, b: ol.Feature) => number;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nexport class LayerBaseVector extends LayerBase {\r\n _olLayer: ol.layer.Vector;\r\n _source: ol.source.Vector;\r\n _style: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n _autoLoad: boolean;\r\n _onDemand: boolean;\r\n _onDemandDelay: number;\r\n _mapMoveMakeGetParams: makeMapMoveParams;\r\n _mapMoveParams: any;\r\n _mapMove: MapMoveCls;\r\n _projectionMap: ol.proj.Projection;\r\n _projection4326: ol.proj.Projection;\r\n\r\n\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n constructor(url: string, options: LayerBaseVectorOptions = {}) {\r\n super(url, options);\r\n\r\n options = options as LayerBaseVectorOptions;\r\n\r\n //prevent regular load if no url has been provided\r\n if (this.url.trim() == '') {\r\n this._loaded = true;\r\n }\r\n\r\n this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\r\n if (this.visible) {\r\n this._autoLoad = true;\r\n } else {\r\n this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n\r\n this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\r\n if (options.mapMoveObj) {\r\n this._mapMove = options.mapMoveObj;\r\n } else {\r\n this._mapMove = this._onDemand ? mapMove : undefined;\r\n }\r\n\r\n\r\n this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () {return {};};\r\n\r\n if (this._onDemand) {\r\n this._loaded = true;\r\n this._mapMoveParams = {};\r\n this._mapMove.checkInit();\r\n this._mapMove.addVectorLayer(this);\r\n }\r\n\r\n this._source = new ol.source.Vector();\r\n\r\n\r\n this._olLayer = new ol.layer.Vector(\r\n {\r\n source: this._source,\r\n visible: this.visible,\r\n style: this.style,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution,\r\n renderOrder: options.renderOrder\r\n }\r\n );\r\n\r\n this.olLayer.setZIndex(this._zIndex);\r\n\r\n this._projectionMap = null;\r\n this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\r\n this._olLayer.setOpacity(this.opacity)\r\n }\r\n\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n addFeatures(featureCollection: Object) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n return this.visible;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * clear features in the layer\r\n */\r\n clear() {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get onDemandDelay(): number {\r\n return this._onDemandDelay;\r\n }\r\n\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get autoLoad(): boolean {\r\n return this._autoLoad;\r\n }\r\n\r\n /**\r\n * get the style definition\r\n */\r\n get style(): ol.StyleFunction|Array<ol.style.Style>|ol.style.Style {\r\n return this._style;\r\n }\r\n\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set style(style: ol.StyleFunction|Array<ol.style.Style>|ol.style.Style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style as ol.style.Style);\r\n }\r\n\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get mapCrs(): string {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n }\r\n\r\n get mapProj(): ol.proj.Projection{\r\n if (this._projectionMap != null){\r\n return this._projectionMap;\r\n }\r\n\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get mapMove(): MapMoveCls {\r\n return this._mapMove;\r\n }\r\n\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get mapMoveParams() {\r\n return this._mapMoveParams;\r\n }\r\n\r\n get visible(): boolean{\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set visible(visibility) {\r\n super.setVisible(visibility);\r\n\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n }\r\n\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get source(): ol.source.Vector {\r\n return this.getSource() as ol.source.Vector;\r\n }\r\n\r\n /**\r\n * array of ol features\r\n */\r\n get features(): Array<ol.Feature> {\r\n return this.source.getFeatures();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n get olLayer(): ol.layer.Vector {\r\n return super.getOlLayer() as ol.layer.Vector;\r\n }\r\n\r\n protected setZIndex(newZ: number) {\r\n this.olLayer.setZIndex(newZ);\r\n }\r\n}\r\n\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexport default LayerBaseVector;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVector.ts","/**\r\n * Created by gavorhes on 12/16/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport mapMove from '../olHelpers/mapMove';\r\n\r\nlet nm = provide('collections');\r\nimport $ = require('jquery');\r\nimport {LayerBase} from \"../layers\";\r\n\r\nexport interface iLegendItem{\r\n groupName: string;\r\n collapse?: boolean;\r\n addCheck?: boolean;\r\n items: Array<iLegendItem|LayerBase>\r\n}\r\n\r\nexport interface iLegendOptions{\r\n layerDivClasses?: string[]\r\n legendTitle?: string\r\n scaleDependent?: boolean\r\n}\r\n\r\nclass LayerGroup {\r\n groupLayers: any;\r\n groupLayersLookup: any;\r\n groupGroupsLookup: any;\r\n groupGroups: any;\r\n itemIdArray: any;\r\n groupId: any;\r\n groupName: any;\r\n allLayerArray: any;\r\n parent: any;\r\n allGroupArray: any;\r\n allGroupLookup: any;\r\n allLayerLookup: any;\r\n collapse: boolean;\r\n addCheck: boolean;\r\n layerParentLookup: any;\r\n\r\n /**\r\n *\r\n * @param {object} [groupConfig={}] - group configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n * @param {LayerGroup} [parent=undefined] - the parent group\r\n */\r\n constructor(groupConfig?: iLegendItem, parent?: LayerGroup) {\r\n this.groupLayers = [];\r\n this.groupLayersLookup = {};\r\n this.groupGroups = [];\r\n this.groupGroupsLookup = {};\r\n this.itemIdArray = [];\r\n\r\n if (typeof groupConfig == 'undefined') {\r\n this.parent = null;\r\n this.groupId = 'root';\r\n this.groupName = 'root';\r\n this.allGroupLookup = {root: this};\r\n this.allGroupArray = [this];\r\n this.allLayerArray = [];\r\n this.allLayerLookup = {};\r\n this.layerParentLookup = {};\r\n this.collapse = false;\r\n this.addCheck = false;\r\n } else {\r\n this.groupId = makeGuid();\r\n this.parent = parent;\r\n this.groupName = groupConfig.groupName;\r\n this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {object} groupConfig - configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n * @param {Array<LayerGroup>} parents parent groups\r\n * @returns {LayerGroup} the layer group just added\r\n */\r\n addGroup(groupConfig: iLegendItem, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n let newGroup = new LayerGroup(groupConfig, parentGroup);\r\n this.allGroupLookup[newGroup.groupId] = newGroup;\r\n this.allGroupArray.push(newGroup);\r\n\r\n parentGroup.groupGroups.push(newGroup);\r\n parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n\r\n if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n console.log(newGroup.groupId);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newGroup.groupId);\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase} newLayer the layer to be added\r\n * @param {Array} parents array\r\n */\r\n addLegendLayer(newLayer: LayerBase, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n this.allLayerLookup[newLayer.id] = newLayer;\r\n this.allLayerArray.push(newLayer);\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n\r\n parentGroup.groupLayers.push(newLayer);\r\n parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n console.log(newLayer.id);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newLayer.id);\r\n\r\n this.layerParentLookup[newLayer.id] = parentGroup;\r\n\r\n }\r\n\r\n\r\n\r\n getLegendHtml(legendId: string, options: iLegendOptions) {\r\n\r\n\r\n let legendHtml = `<ul id=\"${legendId}\" class=\"legend-container\">`;\r\n\r\n legendHtml += `<li>${options.legendTitle}<input type=\"checkbox\" checked id=\"suppress-by-extent-${legendId}\" class=\"suppress-by-extent\">` +\r\n `<label title=\"Suppress layers not visible at this zoom level\" for=\"suppress-by-extent-${legendId}\">` +\r\n `<span></span>` +\r\n `</label></li>`;\r\n\r\n legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n\r\n return legendHtml;\r\n }\r\n\r\n /**\r\n * @param {Array} itemIds the items to process\r\n * @param {LayerGroup} theGroup new group\r\n * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n * @static\r\n * @returns {string} html string\r\n */\r\n _buildLegend(itemIds: string[], theGroup: LayerGroup, layerDivClasses: string[]): string {\r\n\r\n if (itemIds.length == 0) {\r\n return '';\r\n }\r\n\r\n let theHml = '';\r\n\r\n let itemId = itemIds[0];\r\n\r\n if (theGroup.groupLayersLookup[itemId]) {\r\n\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let lyr = theGroup.groupLayersLookup[itemId];\r\n theHml += `<li id=\"${lyr.id}-layer-li\" class=\"legend-layer-li ${layerDivClasses.join(' ')}\">` + lyr.getLegendDiv() + '</li>';\r\n\r\n\r\n } else if (theGroup.groupGroupsLookup[itemId]) {\r\n /**\r\n * type {LayerGroup}\r\n */\r\n let otherGroup = theGroup.groupGroupsLookup[itemId];\r\n\r\n theHml += `<li>`;\r\n theHml += `<div id=\"${otherGroup.groupId}-legend-layer-div\" ` +\r\n `class=\"legend-layer-group ${layerDivClasses.join(' ')}\">`;\r\n\r\n if (otherGroup.addCheck) {\r\n theHml += `<input type=\"checkbox\" checked id=\"${otherGroup.groupId}-group-chck\">` +\r\n `<label for=\"${otherGroup.groupId}-group-chck\" title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n } else {\r\n theHml += `<label title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n }\r\n\r\n theHml += `<span title=\"Expand/Collapse\" class=\"layer-group-expander`;\r\n theHml += `${otherGroup.collapse ? ' legend-layer-group-initial-collapse' : ''}\">`;\r\n theHml += otherGroup.collapse ? '▶' : '▼';\r\n theHml += '</span>';\r\n\r\n //parents.push(groupId);\r\n theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n theHml += '</div>';\r\n theHml += '</li>';\r\n }\r\n\r\n return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n }\r\n}\r\n\r\n\r\n/**\r\n * a wrapper to make a legend\r\n */\r\nexport class LayerLegend {\r\n\r\n $divElement: JQuery;\r\n _legendItems: Array<iLegendItem|LayerBase>;\r\n layerGroup: any;\r\n legendId: string;\r\n\r\n /**``\r\n *\r\n * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n * @param {string} divId the div where the legend should be added\r\n * @param {object} options for legend\r\n * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n * @param {string} [options.legendTitle=Legend] the legend title\r\n * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n */\r\n constructor(legendItems: Array<iLegendItem|LayerBase>, divId: string, options: iLegendOptions = {}) {\r\n for (let i of legendItems) {\r\n if (typeof i == 'undefined') {\r\n throw 'undefined item passed in array to legend constructor';\r\n }\r\n }\r\n\r\n options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n options.layerDivClasses = options.layerDivClasses || [];\r\n\r\n // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n }\r\n\r\n this.$divElement = $('#' + divId);\r\n\r\n this._legendItems = legendItems;\r\n\r\n this.layerGroup = new LayerGroup();\r\n\r\n this._buildTree(legendItems);\r\n\r\n this.legendId = makeGuid();\r\n\r\n this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n\r\n for (let l of this.layerGroup.allLayerArray){\r\n l.applyCollapse();\r\n }\r\n\r\n let _this = this;\r\n //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n\r\n mapMove.addCallback(function (ext, zoom, evt) {\r\n\r\n if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n for (let lyr of this.layerGroup.allLayerArray) {\r\n let $lyrLi = $('#' + lyr.id + '-layer-li');\r\n if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n $lyrLi.addClass('layer-not-visible');\r\n } else {\r\n $lyrLi.removeClass('layer-not-visible');\r\n }\r\n }\r\n }\r\n }, this, 100, true, 'legend1');\r\n }\r\n\r\n // <editor-fold desc=\"add event listeners\">\r\n\r\n this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n let legendLayerLis = $('.legend-layer-li');\r\n if (this.checked) {\r\n legendLayerLis.removeClass('layer-force-show');\r\n } else {\r\n legendLayerLis.addClass('layer-force-show');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-check').change(function () {\r\n let lyrId = this.id.replace('-legend-layer-check', '');\r\n _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n });\r\n\r\n this.$divElement.find('.layer-group-expander').click(function () {\r\n let $this = $(this);\r\n $this.removeClass('legend-layer-group-initial-collapse');\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')){\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n // </editor-fold>\r\n }\r\n\r\n\r\n /**\r\n * @param {Array} [legendItems=this._layerConfig] the legend items\r\n * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n * @private\r\n */\r\n _buildTree(legendItems: Array<iLegendItem|LayerBase>, parents?: string[]) {\r\n\r\n if (legendItems.length == 0) {\r\n return;\r\n }\r\n\r\n let oneItem = legendItems[0];\r\n\r\n //reset the parent if the item is in the base array\r\n if ((this._legendItems as Array<any>).indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n parents = [];\r\n }\r\n\r\n if (typeof (oneItem as iLegendItem).groupName !== 'undefined') {\r\n let groupItem = legendItems[0];\r\n let newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n parents.push(newGroup.groupId);\r\n this._buildTree((oneItem as iLegendItem).items, parents);\r\n } else {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let layerItem: LayerBase = legendItems[0] as LayerBase;\r\n\r\n this.layerGroup.addLegendLayer(layerItem, parents);\r\n }\r\n\r\n this._buildTree(legendItems.slice(1), parents);\r\n }\r\n}\r\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport {proj3857} from \"../olHelpers/projections\";\r\n\r\nlet nm = provide('layers');\r\n\r\nexport interface crsTransform {\r\n dataProjection?: ol.proj.Projection;\r\n featureProjection?: ol.proj.Projection;\r\n}\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions {\r\n transform?: crsTransform;\r\n mapMoveObj?: MapMoveCls;\r\n}\r\n\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorGeoJson extends LayerBaseVector {\r\n _geoJsonFormat: ol.format.GeoJSON;\r\n _transform: crsTransform;\r\n\r\n /**\r\n * @param {string|null} url - resource url, set to '' to make blank layer\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n *\r\n * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n */\r\n constructor(url?: string, options: LayerBaseVectorGeoJsonOptions = {}) {\r\n url = typeof url == 'string' ? url : '';\r\n super(url, options);\r\n\r\n this._geoJsonFormat = new ol.format.GeoJSON();\r\n\r\n this._transform = options.transform || {};\r\n this._transform.dataProjection = this._transform.dataProjection || proj.proj4326;\r\n this._transform.featureProjection = this._transform.featureProjection || proj3857;\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n }\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - as geojson object\r\n */\r\n addFeatures(featureCollection: any) {\r\n this.source.addFeatures(\r\n this._geoJsonFormat.readFeatures(featureCollection,\r\n {dataProjection: this._transform.dataProjection,\r\n featureProjection: this._transform.featureProjection}\r\n )\r\n );\r\n }\r\n\r\n\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n\r\n if (super._load()) {\r\n return true;\r\n }\r\n\r\n $.get(this._url,\r\n this._params,\r\n (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(\r\n function () {\r\n this._loaded = false;\r\n }\r\n );\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d the json response\r\n * @override\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this._source.addFeatures(this._geoJsonFormat.readFeatures(d,\r\n {featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection}));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexport default LayerBaseVectorGeoJson;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVectorGeoJson.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport * as colors from '../util/colors';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport LayerItsInventory from \"../layers/LayerItsInventory\";\r\nlet nm = provide('collections');\r\n\r\n\r\nlet itsConfig = [\r\n {\r\n name: 'Camera',\r\n itsType: 'cctv',\r\n minZoom: 11,\r\n itsIconConfig: {\r\n prop: 'owner',\r\n defaultName: 'WisDOT',\r\n defaultIcon: 'cctv.png',\r\n iconArray: [\r\n ['City of Madison', 'Madison', 'cctv-mad.png']\r\n ]\r\n }\r\n },\r\n {\r\n name: 'Message Signs',\r\n itsType: 'DMS',\r\n minZoom: 11,\r\n itsIconConfig: {\r\n prop: 'dmsType',\r\n defaultName: 'DMS',\r\n defaultIcon: 'dms.png',\r\n iconArray: [\r\n ['pcms', 'PCMS', 'pcms.png']\r\n ]\r\n }\r\n },\r\n {name: 'ATR', itsType: 'atr', minZoom: 8, itsIcon: 'atr.png', visible: false},\r\n {name: 'Lighting', itsType: 'light', minZoom: 16, itsIcon: 'streetlight.png', visible: false, onDemand: true},\r\n {name: 'Bluetooth', itsType: 'blue', minZoom: 10, itsIcon: 'bluetooth.png', visible: false},\r\n {name: 'Cabinets', itsType: 'cabinet', minZoom: 10, itsIcon: 'cabinet.png', visible: false},\r\n {name: 'Hut', itsType: 'hut', minZoom: 10, itsIcon: 'hut.png', visible: false},\r\n {name: 'Vault', itsType: 'vault', minZoom: 13, itsIcon: 'vault.png', visible: false},\r\n {name: 'Advisory Radio', itsType: 'har', minZoom: 10, itsIcon: 'har.png', visible: false},\r\n {\r\n name: 'Loop Detectors',\r\n itsType: 'loop',\r\n legendCollapse: true,\r\n minZoom: 14,\r\n visible: false,\r\n itsIconConfig: {\r\n prop: 'dtctrType',\r\n defaultName: 'Other',\r\n defaultIcon: 'loopdetectorother.png',\r\n iconArray: [\r\n ['detector', 'Detector', 'loopdetector.png'],\r\n ['long', 'Long', 'loopdetectorlong.png'],\r\n ['zone', 'Zone', 'loopdetectorzone.png']\r\n ]\r\n },\r\n onDemand: true\r\n },\r\n {name: 'Microwave', itsType: 'microwave', minZoom: 14, itsIcon: 'microwave.png', visible: false},\r\n {name: 'Pull Box', itsType: 'pull', minZoom: 14, itsIcon: 'pullbox.png', visible: false, onDemand: true},\r\n {name: 'RWIS', itsType: 'rwis', minZoom: 7, itsIcon: 'rwis.png', visible: false},\r\n {name: 'Ramp Gates', itsType: 'gate', minZoom: 10, itsIcon: 'rampgate.png', visible: false},\r\n {name: 'Ramp Meter', itsType: 'meter', minZoom: 10, itsIcon: 'rampmeter.png', visible: false},\r\n {name: 'Signal', itsType: 'signal', minZoom: 13, itsIcon: 'signal.png', visible: false, onDemand: true},\r\n {name: 'Tower', itsType: 'tower', minZoom: 10, itsIcon: 'tower.png', visible: false},\r\n {\r\n name: 'Trench',\r\n itsType: 'trench',\r\n onDemand: true,\r\n visible: false,\r\n onDemandDelay: 500,\r\n minZoom: 15,\r\n legendCollapse: true,\r\n itsLineConfig: {\r\n prop: 'owner',\r\n defaultName: 'Other',\r\n //defaultWidth: 7,\r\n defaultColor: colors.hexAlphaToRgbOrRgba('#747474', 0.8),\r\n lineArray: [\r\n ['WisDOT', 'WisDOT', colors.hexAlphaToRgbOrRgba('#FF032F', 0.7)],\r\n ['WIN', 'WIN', colors.hexAlphaToRgbOrRgba('#FFC632', 0.7)],\r\n ['USXchange', 'USXchange', colors.hexAlphaToRgbOrRgba('#2DFF46', 0.7)],\r\n ['AT&T', 'AT&T', colors.hexAlphaToRgbOrRgba('#ff2be5', 0.7)],\r\n ['Touch America', 'Touch America', colors.hexAlphaToRgbOrRgba('#52f3ff', 0.7)],\r\n ['Qwest', 'Qwest', colors.hexAlphaToRgbOrRgba('#9278ff', 0.7)],\r\n ['McLeodUSA', 'McLeodUSA', colors.hexAlphaToRgbOrRgba('#2926FF', 0.7)],\r\n ['CINC', 'CINC', colors.hexAlphaToRgbOrRgba('#CB00FF', 0.7)],\r\n ['City of Madison', 'Madison', colors.hexAlphaToRgbOrRgba('#000380', 0.7)]\r\n ]\r\n }\r\n }\r\n];\r\n\r\n\r\nexport class ItsLayerCollection {\r\n _map: ol.Map;\r\n _layers: Array<LayerItsInventory>;\r\n\r\n\r\n /**\r\n * Create a collection of all ITS layers\r\n * @param {ol.Map} theMap the openlayers map\r\n * @param {Array} [exclude=[]] array of Its layer identifiers to exclude\r\n *\r\n * BLUE Bluetooth Detector - Bluetooth Detector\r\n * CABINET Cabinets - The cabinets\r\n * CCTV Camera - Traffic Cameras\r\n * HUT Communication Hut - Communication Hut\r\n * VAULT Communication Vault - The communication vaults\r\n * HAR Highway Advisory Radio - Advisory Radios\r\n * LIGHT Lighting - Lighting\r\n * LOOP Loop Detectors - Loop Detectors\r\n * DMS Message Board - Message Boards and Signs\r\n * MICROWAVE Microwave Detector - Microwave Detectors\r\n * PULL Pull Box - A pull box\r\n * RWIS RWIS - Road weather information system\r\n * GATE Ramp Gate - The ramp Gates\r\n * METER Ramp Meter - The ramp meters\r\n * SIGNAL Signal - Traffic Signal\r\n * TOWER Tower - The towers\r\n * TRENCH\r\n */\r\n constructor(theMap: ol.Map, exclude?: Array<string>) {\r\n\r\n this._map = theMap;\r\n this._layers = [];\r\n\r\n exclude = typeof exclude == 'object' ? exclude : [];\r\n\r\n for (let i = 0; i < itsConfig.length; i++) {\r\n let lyrConfig = itsConfig[i];\r\n let addLayer = true;\r\n\r\n for (let j = 0; j < exclude.length; j++) {\r\n if (exclude[j] == lyrConfig.itsType) {\r\n addLayer = false;\r\n break;\r\n }\r\n }\r\n\r\n if (addLayer) {\r\n let inventLyr = new LayerItsInventory(lyrConfig);\r\n this._map.addLayer(inventLyr.olLayer);\r\n this._layers.push(inventLyr);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Return the array of layers in this collection\r\n * @returns {Array<LayerItsInventory>} an array of layers\r\n */\r\n get layers(): LayerItsInventory[] {\r\n return this._layers;\r\n }\r\n\r\n}\r\n\r\nnm.ItsLayerCollection = ItsLayerCollection;\r\nexport default ItsLayerCollection;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/ItsLayerCollection.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\n\r\nimport {LayerBaseVectorGeoJson, LayerBaseVectorGeoJsonOptions} from './LayerBaseVectorGeoJson';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {proj4326, proj3857} from '../olHelpers/projections'\r\n\r\nlet nm = provide('layers');\r\n\r\n\r\nexport interface iLineStyle {\r\n color: string;\r\n width?: number\r\n}\r\n\r\nexport interface iMultiConfig {\r\n prop: string;\r\n defaultName: string;\r\n}\r\n\r\nexport interface iIconConfig extends iMultiConfig {\r\n defaultIcon: string;\r\n iconArray: string[][]\r\n}\r\n\r\nexport interface iLineConfig extends iMultiConfig {\r\n defaultColor: string;\r\n defaultWidth?: number;\r\n lineArray: any[][]\r\n}\r\n\r\nexport interface iLayerItsInventory extends LayerBaseVectorGeoJsonOptions {\r\n itsType: string;\r\n addPopup?: boolean;\r\n itsIcon?: string;\r\n itsLineStyle?: iLineStyle;\r\n itsIconConfig?: iIconConfig;\r\n itsLineConfig?: iLineConfig\r\n}\r\n\r\n\r\n\r\n\r\nfunction checkStyleNumber(itsIcon: string, itsLineStyle: iLineStyle, itsIconConfig: iIconConfig, itsLineConfig: iLineConfig) {\r\n \"use strict\";\r\n\r\n //make sure one and only one configuration is defined;\r\n let configCount = 0;\r\n if (typeof itsIcon == 'string') {\r\n configCount++;\r\n }\r\n\r\n if (typeof itsLineStyle == 'object') {\r\n itsLineStyle.width = typeof itsLineStyle.width == 'number' ? itsLineStyle.width : 5;\r\n itsLineStyle.color = typeof itsLineStyle.color == 'string' ? itsLineStyle.color : 'red';\r\n configCount++;\r\n }\r\n\r\n if (typeof itsIconConfig == 'object') {\r\n itsIconConfig.defaultName = itsIconConfig.defaultName || 'Other';\r\n\r\n if (typeof itsIconConfig.iconArray == 'undefined') {\r\n itsIconConfig.iconArray = [];\r\n }\r\n\r\n configCount++;\r\n }\r\n\r\n if (typeof itsLineConfig == 'object') {\r\n itsLineConfig.defaultName = itsLineConfig.defaultName || 'Other';\r\n itsLineConfig.defaultWidth = itsLineConfig.defaultWidth || 5;\r\n itsLineConfig.defaultColor = itsLineConfig.defaultColor || 'red';\r\n\r\n\r\n if (typeof itsLineConfig.lineArray == 'undefined') {\r\n itsLineConfig.lineArray = [];\r\n }\r\n\r\n // set the width if not defined\r\n for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n if (itsLineConfig.lineArray[i].length == 3) {\r\n itsLineConfig.lineArray[i].push(5);\r\n }\r\n }\r\n\r\n configCount++;\r\n }\r\n\r\n if (configCount > 1) {\r\n throw 'Only one style config can be defined';\r\n }\r\n}\r\n\r\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [itsLineStyle=undefined] A single line style\r\n * @param {string} itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n * @returns {*} undefined, style, or style function\r\n */\r\nfunction defineStyle(itsIcon: string, itsLineStyle: iLineStyle, itsIconConfig: iIconConfig, itsLineConfig: iLineConfig): ol.style.Style | Array<ol.style.Style> | ol.StyleFunction {\r\n \"use strict\";\r\n checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n let _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n if (itsIcon) {\r\n return new ol.style.Style({\r\n image: new ol.style.Icon(\r\n {\r\n src: _iconUrlRoot + itsIcon,\r\n crossOrigin: 'anonymous'\r\n }\r\n )\r\n });\r\n } else if (itsLineStyle) {\r\n return new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: itsLineStyle.color,\r\n width: itsLineStyle.width\r\n })\r\n });\r\n } else if (itsIconConfig) {\r\n return function (feature: ol.Feature) {\r\n let symbolProp = feature.getProperties()[itsIconConfig.prop];\r\n let iconUrl = _iconUrlRoot + itsIconConfig.defaultIcon;\r\n\r\n for (let i = 0; i < itsIconConfig.iconArray.length; i++) {\r\n let thisProp = itsIconConfig.iconArray[i];\r\n\r\n if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n iconUrl = _iconUrlRoot + thisProp[2];\r\n break;\r\n }\r\n }\r\n\r\n return [new ol.style.Style({\r\n image: new ol.style.Icon(\r\n {\r\n src: iconUrl,\r\n crossOrigin: 'anonymous'\r\n }\r\n )\r\n })];\r\n };\r\n } else if (itsLineConfig) {\r\n return function (feature: ol.Feature) {\r\n let symbolProp = feature.getProperties()[itsLineConfig.prop];\r\n let colr = itsLineConfig.defaultColor || 'red';\r\n let width = itsLineConfig.defaultWidth || 5;\r\n\r\n for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n let thisProp = itsLineConfig.lineArray[i];\r\n\r\n if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n colr = thisProp[2];\r\n width = thisProp[3];\r\n break;\r\n }\r\n }\r\n\r\n return [new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: colr,\r\n width: width\r\n })\r\n })];\r\n };\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\nfunction defineLegend(itsIcon: string, itsLineStyle: iLineStyle, itsIconConfig: iIconConfig, itsLineConfig: iLineConfig) {\r\n \"use strict\";\r\n\r\n let iconHeight = 17;\r\n\r\n checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n let _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n if (itsIcon) {\r\n return `<img src=\"${_iconUrlRoot + itsIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n } else if (itsLineStyle) {\r\n return `<hr style=\"height: ${itsLineStyle.width}px; background-color: ${itsLineStyle.color}\">`;\r\n } else if (itsIconConfig) {\r\n let outHtml = '';\r\n outHtml += '<ul>';\r\n\r\n for (let a of itsIconConfig.iconArray) {\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${a[1]}</span><img src=\"${_iconUrlRoot + a[2]}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n }\r\n\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${itsIconConfig.defaultName}</span>` +\r\n `<img src=\"${_iconUrlRoot + itsIconConfig.defaultIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\"></li>`;\r\n\r\n outHtml += '</ul>';\r\n\r\n return outHtml;\r\n } else if (itsLineConfig) {\r\n let outHtml = '';\r\n outHtml += '<ul>';\r\n for (let ls of itsLineConfig.lineArray) {\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${ls[1]}</span>` +\r\n `<hr style=\"height: ${ls[3]}px; background-color: ${ls[2]}\">`;\r\n }\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${itsLineConfig.defaultName}</span>` +\r\n `<hr style=\"height: ${itsLineConfig.defaultWidth}px; background-color: ${itsLineConfig.defaultColor}\"></li>`;\r\n outHtml += '</ul>';\r\n\r\n return outHtml;\r\n } else {\r\n return '';\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Its Layer class\r\n * @augments LayerBaseVectorGeoJson\r\n */\r\nexport class LayerItsInventory extends LayerBaseVectorGeoJson {\r\n\r\n /**\r\n * ITS device layer, types available at https://transportal.cee.wisc.edu/its/inventory/\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object|*} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n * @param {string} options.itsType the ITS device type, use the url flag at https://transportal.cee.wisc.edu/its/inventory/\r\n * @param {boolean} [options.addPopup=true] if the popup should be added automatically\r\n *\r\n * @param {string} [options.itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [options.itsLineStyle=undefined] A single line style\r\n * @param {string} options.itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [options.itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [options.itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} options.itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} options.itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} options.itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [options.itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [options.itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} options.itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [options.itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [options.itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [options.itsLineConfig.defaultWidth] The default line width to be used for no other matches\r\n * @param {object} [options.itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width = 5]\r\n */\r\n constructor(options: iLayerItsInventory) {\r\n if (typeof options.itsType !== 'string') {\r\n throw 'its type must be defined';\r\n }\r\n\r\n options.transform = {dataProjection: proj4326, featureProjection: proj3857};\r\n\r\n let addToLegend = '';\r\n\r\n // define a style with the helper function if it is not explicitly defined\r\n if (typeof options.style == 'undefined') {\r\n options.style = defineStyle(\r\n options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n );\r\n addToLegend = defineLegend(\r\n options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n );\r\n }\r\n\r\n options.params = typeof options.params == 'object' ? options.params : {};\r\n $.extend(options.params, {format: 'JSON', resource: options.itsType});\r\n\r\n super('https://transportal.cee.wisc.edu/its/inventory/', options);\r\n\r\n //add any additional content to the legend\r\n this.addLegendContent(addToLegend);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : true;\r\n\r\n if (options.addPopup) {\r\n mapPopup.addVectorPopup(this, function (props: { featureGuid: string }) {\r\n return `<iframe src=\"https://transportal.cee.wisc.edu/its/inventory/?feature=${props.featureGuid}\" ` +\r\n `height=\"250\" width=\"350\"></iframe>`;\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @callback makeGetParams\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: { minX: number, minY: number, maxX: number, maxY: number }, zoomLevel: number) {\r\n super.mapMoveMakeGetParams(extent, zoomLevel);\r\n let lowerLeft = new ol.geom.Point([extent.minX, extent.minY]);\r\n lowerLeft.transform(this.mapProj, this._projection4326);\r\n let lowerLeftCoordinates = lowerLeft.getCoordinates();\r\n let upperRight = new ol.geom.Point([extent.maxX, extent.maxY]);\r\n upperRight.transform(this.mapProj, this._projection4326);\r\n let upperRightCoordinates = upperRight.getCoordinates();\r\n\r\n $.extend(this.mapMoveParams,\r\n {\r\n L: lowerLeftCoordinates[0],\r\n R: upperRightCoordinates[0],\r\n B: lowerLeftCoordinates[1],\r\n T: upperRightCoordinates[1]\r\n });\r\n }\r\n}\r\n\r\nnm.LayerItsInventory = LayerItsInventory;\r\nexport default LayerItsInventory;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerItsInventory.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\nimport provide from './provide';\r\nimport * as chk from './checkDefined';\r\n\r\nlet nm = provide('util.colors');\r\n\r\n\r\n/**\r\n * helper function to convert to hex\r\n * @param {number|string} x - the number to convert to hex\r\n * @returns {string} number as hex\r\n * @private\r\n */\r\nfunction _hex(x: number|string): string {\r\n let hexDigits = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\r\n if (isNaN(x as number)){\r\n return \"00\";\r\n } else {\r\n let m = x as number;\r\n return hexDigits[(m - m % 16) / 16] + hexDigits[m % 16];\r\n }\r\n // return isNaN(x as number) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\r\n}\r\n\r\n/**\r\n * converts an RGB string to hex\r\n * @param {string} rgb - rgb color\r\n * @returns {string} rbg as hex\r\n */\r\nexport function rgb2hex(rgb: string): string {\r\n let rgb1 = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\r\n\r\n return (\"#\" + _hex(rgb1[1]) + _hex(rgb1[2]) + _hex(rgb1[3])).toUpperCase();\r\n}\r\n\r\nnm.rgb2hex = rgb2hex;\r\n\r\n\r\n/**\r\n * Convert hex string to RGB or RGBA string\r\n * @param {string} hexString - hex color string\r\n * @param {number} [alphaVal=undefined] Alpha value\r\n * @returns {string} - rgb or rgba color\r\n */\r\nexport function hexAlphaToRgbOrRgba(hexString: string, alphaVal: number): string {\r\n hexString = ((hexString.charAt(0) == \"#\") ? hexString.substring(1, 7) : hexString);\r\n let r = parseInt(hexString.substring(0, 2), 16).toString() || '0';\r\n let g = parseInt(hexString.substring(2, 4), 16).toString() || '0';\r\n let b = parseInt(hexString.substring(4, 6), 16).toString() || '0';\r\n if (alphaVal) {\r\n return `rgba(${r},${g},${b},${alphaVal})`;\r\n } else {\r\n return `rgba(${r},${g},${b})`;\r\n }\r\n}\r\n\r\nnm.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba;\r\n\r\n\r\n/**\r\n * adds alpha value to rgb string 'rgb(r, b, g)', returns 'rgba(r, g, b, a)'\r\n * @param {string} rgb - rgb color\r\n * @param {number} alpha - alpha value 0 to 1\r\n * @returns {string} rgba color\r\n */\r\nexport function rgbToRgba(rgb: string, alpha: number): string {\r\n let pieces = rgb.split(',');\r\n pieces[0] = pieces[0].replace('rgb', 'rgba');\r\n pieces[2] = pieces[2].replace(')', '');\r\n pieces.push(' ' + alpha.toFixed(1) + ')');\r\n\r\n return pieces.join(',');\r\n}\r\n\r\nnm.rgbToRgba = rgbToRgba;\r\n\r\n\r\n/**\r\n * @typedef {function} colorLookupByNumber\r\n * @param {number} num - the number to use to retrieve the color\r\n * @returns {string} rgb color\r\n */\r\n\r\n\r\n/**\r\n * Make a blue green red gradient\r\n * @param {number} minVal - minimum value\r\n * @param {number} maxVal - maximum value\r\n * @param {boolean} flipColors - if the colors should be flipped\r\n * @returns {colorLookupByNumber} color lookup function\r\n */\r\nexport function makeBlueGreenRedGradient(minVal: number, maxVal: number, flipColors:boolean=false): (v: number) => string {\r\n\r\n if (typeof flipColors != \"boolean\") {\r\n flipColors = false;\r\n }\r\n\r\n return function (theVal: number): string {\r\n let r, g, b;\r\n let ratio;\r\n\r\n if (chk.undefinedOrNull(theVal)) {\r\n return 'rgb(100,100,100)';\r\n }\r\n\r\n let percent = (theVal - minVal) / (maxVal - minVal);\r\n\r\n if (flipColors == true) {\r\n percent = 1 - percent;\r\n }\r\n\r\n if (percent >= 1) {\r\n r = 255;\r\n g = 0;\r\n b = 0;\r\n } else if (percent <= 0) {\r\n r = 0;\r\n g = 0;\r\n b = 255;\r\n } else if (percent < .25) {\r\n // green up, blue constant\r\n r = 0;\r\n g = Math.floor(255 * percent / 0.25);\r\n b = 255;\r\n } else if (percent < 0.50) {\r\n //blue down, green constant\r\n ratio = (percent - 0.25) / 0.25;\r\n r = 0;\r\n g = 255;\r\n b = 255 - Math.floor(255 * ratio);\r\n } else if (percent < 0.75) {\r\n // red up, green constant\r\n ratio = (percent - 0.5) / 0.25;\r\n r = Math.floor(255 * ratio);\r\n g = 255;\r\n b = 0;\r\n } else {\r\n // green down, red constant\r\n ratio = (percent - 0.75) / 0.25;\r\n r = 255;\r\n g = 255 - Math.floor(255 * ratio);\r\n b = 0;\r\n }\r\n\r\n r = r.toFixed();\r\n g = g.toFixed();\r\n b = b.toFixed();\r\n\r\n return 'rgb(' + r + ',' + g + ',' + b + ')';\r\n };\r\n}\r\n\r\nnm.makeBlueGreenRedGradient = makeBlueGreenRedGradient;\r\n\r\n\r\n/**\r\n * Create a function that will return colors based on a gradient\r\n * @param {number} median - median value\r\n * @param {number} stdDev - standard deviation\r\n * @param {boolean} flipColors - if the colors should be flipped\r\n * @returns {colorLookupByNumber} color lookup function\r\n */\r\nexport function makeBlueGreenRedGradientZScore(median: number, stdDev: number, flipColors: boolean = false):(v: number) => string {\r\n\r\n let grd = makeBlueGreenRedGradient(-2.5, 2.5, flipColors);\r\n\r\n return function (theVal: number): string {\r\n\r\n let zScore;\r\n if (theVal == null) {\r\n zScore = null;\r\n } else {\r\n zScore = (theVal - median) / stdDev;\r\n }\r\n\r\n return grd(zScore);\r\n };\r\n}\r\n\r\nnm.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/colors.ts","/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\n\r\nimport ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\n\r\nlet map = quickMap({addGeocode: true});\r\n\r\n\r\nwindow['map'] = map;\r\n\r\nlet itsLayerCollection = new ItsLayerCollection(map);\r\n\r\nlet layerArray = [\r\n {\r\n groupName: 'ITS Inventory Layers',\r\n collapse: false,\r\n addCheck: true,\r\n items: itsLayerCollection.layers\r\n }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\nconsole.log('it works');\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/itsMap.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///itsMap.js","webpack:///webpack/bootstrap 99693f14fcb3e83c98ca?ad23","webpack:///./src/util/provide.ts?5c82","webpack:///external \"$\"?57aa","webpack:///external \"ol\"?81ed","webpack:///./src/util/makeGuid.ts?e80e","webpack:///./src/olHelpers/mapPopup.ts?5d6c","webpack:///./src/olHelpers/mapInteractionBase.ts?f419","webpack:///./src/olHelpers/quickMap.ts?1069","webpack:///./src/olHelpers/mapMove.ts?6a2b","webpack:///./src/olHelpers/projections.ts?804b","webpack:///./src/util/checkDefined.ts?bcd7","webpack:///./src/layers/LayerBase.ts?bf94","webpack:///./src/olHelpers/geocode.ts?5a2f","webpack:///./src/olHelpers/mapMoveCls.ts?cd45","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7","webpack:///./src/olHelpers/quickMapBase.ts?fb65","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b","webpack:///./src/layers/LayerBaseVector.ts?c105","webpack:///./src/collections/LayerLegend.ts","webpack:///./src/layers/LayerBaseVectorGeoJson.ts","webpack:///./src/collections/ItsLayerCollection.ts","webpack:///./src/layers/LayerItsInventory.ts","webpack:///./src/util/colors.ts","webpack:///./src/_tests/demos/itsMap.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","$","ol","makeGuid","replace","r","Math","random","toString","provide_1","nm","mapPopupCls_1","mapPopup","MapInteractionBase","subtype","this","_map","_initialized","_subtype","init","theMap","_checkInit","initialized","msg","alert","console","log","checkInit","quickMap","options","quickMapBase_1","quickMapBase","mapMove_1","mapPopup_1","mapMoveCls_1","mapMove","proj4326","proj","Projection","code","proj3857","proj3070","undefinedOrNull","input","definedAndNotNull","zoomResolutionConvert","makeGuid_1","LayerBase","url","_url","_params","params","_legendCollapse","legendCollapse","_legendCheckbox","legendCheckbox","id","_name","animate","_opacity","opacity","_visible","visible","_source","undefined","_olLayer","_loaded","_maxResolution","zoomToResolution","minZoom","_minResolution","maxZoom","_minZoom","_maxZoom","_zIndex","zIndex","loadCallback","_legendContent","_$legendDiv","_applyCollapseCalled","_addLegendContent","legendContent","_load","loaded","getLegendDiv","additionalContent","indexOf","append","applyCollapse","addLegendContent","$expander","find","click","$this","siblings","slideToggle","hasClass","removeClass","html","addClass","trigger","refresh","source","_id","set","newId","_animate","newVal","newParams","visibility","setVisible","olLayer","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","projections_1","invalidClass","geocoderLoadingClass","Geocode","mapDiv","map","_this","inputGuid","buttonGuid","indicationLayer","layer","Vector","style","Style","image","Circle","radius","fill","Fill","color","stroke","Stroke","width","addLayer","theButton","document","getElementById","theInput","reset","$theButton","$theInput","evt","preventDefault","disabled","clear","lat","parseFloat","lon","title","v","getView","geom","Point","feat","Feature","addFeature","transform","setCenter","getCoordinates","setZoom","keyup","keyCode","__extends","extendStatics","setPrototypeOf","__proto__","Array","b","__","constructor","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","on","e","_updateMapExtent","triggerLyrLoad","type","triggerMoveCallback","theView","getZoom","extentArray","calculateExtent","getSize","minX","minY","maxX","maxY","lyr","index","eventType","clearTimeout","abort","callbackFunc","mapMoveBefore","mapMoveMakeGetParams","__this_1","innerFunction","theLayer","theIndex","_innerThis","mapMoveParams","mapMoveCallback","fail","jqXHR","statusText","always","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","push","addCallback","func","context","delay","FeatureLayerProperties","feature","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","addOverlay","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","forEachFeatureAtPixel","vLyr","getTargetElement","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","j","hasLyr","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","theStyle","olStyle","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","divId","center","x","y","zoom","baseSwitcher","fullScreen","addGeocode","css","osmLayer","Tile","OSM","coordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","geocode_1","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","LayerBase_1","LayerBaseVector","trim","_style","_autoLoad","_onDemand","onDemand","_onDemandDelay","mapMoveObj","_mapMove","_mapMoveMakeGetParams","_mapMoveParams","minResolution","maxResolution","renderOrder","_projectionMap","_projection4326","addFeatures","featureCollection","evtType","extent","extend","setStyle","mapProj","getFeatures","LayerGroup","groupConfig","parent","groupLayers","groupLayersLookup","groupGroups","groupGroupsLookup","itemIdArray","groupId","groupName","allGroupLookup","root","allGroupArray","allLayerArray","allLayerLookup","layerParentLookup","collapse","addCheck","addGroup","parents","parentGroup","newGroup","addLegendLayer","newLayer","getLegendHtml","legendId","legendHtml","legendTitle","_buildLegend","layerDivClasses","itemIds","theGroup","theHml","itemId","otherGroup","slice","LayerLegend","legendItems","legendItems_1","scaleDependent","$divElement","_legendItems","layerGroup","_buildTree","_b","ext","$lyrLi","change","legendLayerLis","checked","lyrId","prop","oneItem","groupItem","items","layerItem","LayerBaseVector_1","LayerBaseVectorGeoJson","_geoJsonFormat","format","GeoJSON","_transform","dataProjection","featureProjection","autoLoad","readFeatures","colors","LayerItsInventory_1","itsConfig","itsType","itsIconConfig","defaultName","defaultIcon","iconArray","itsIcon","itsLineConfig","defaultColor","hexAlphaToRgbOrRgba","lineArray","ItsLayerCollection","exclude","_layers","lyrConfig","inventLyr","checkStyleNumber","itsLineStyle","configCount","defaultWidth","defineStyle","_iconUrlRoot","Icon","src","crossOrigin","symbolProp","iconUrl","thisProp","toLocaleLowerCase","colr","defineLegend","iconHeight","outHtml","a","_c","ls","LayerBaseVectorGeoJson_1","LayerItsInventory","addToLegend","resource","addPopup","featureGuid","lowerLeft","lowerLeftCoordinates","upperRight","upperRightCoordinates","L","R","B","T","_hex","hexDigits","isNaN","rgb2hex","rgb","rgb1","match","toUpperCase","hexString","alphaVal","charAt","substring","parseInt","g","rgbToRgba","alpha","pieces","makeBlueGreenRedGradient","minVal","maxVal","flipColors","theVal","ratio","chk","percent","floor","makeBlueGreenRedGradientZScore","median","stdDev","grd","zScore","ItsLayerCollection_1","LayerLegend_1","quickMap_1","itsLayerCollection","layerArray"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAA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EAAIC,IvBstFnBnjB,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GuBr4FtD,IAAAoC,GAAA9C,EAAA,GACA2jB,EAAA3jB,EAAA,GAEI+C,EAAKD,EAAAT,QAAQ,cA0BjBlC,GAAAoiB,UAMAxf,EAAGwf,QAAUA,EASbpiB,EAAAwf,sBAYA5c,EAAG4c,oBAAsBA,EASzBxf,EAAA+iB,YASAngB,EAAGmgB,UAAYA,EAiBf/iB,EAAAkjB,2BA6DAtgB,EAAGsgB,yBAA2BA,EAU9BljB,EAAA2jB,iCAiBA/gB,EAAG+gB,+BAAiCA,GvB03F5B,CACA,CACA,CACA,CAEF,SAAU1jB,EAAQD,EAASH,GAEjC,YAKAe,QAAOC,eAAeb,EAAS,cAAgBO,OAAO,GwBvjGtD,IAAAyjB,GAAAnkB,EAAA,IACAokB,EAAApkB,EAAA,IACAqkB,EAAArkB,EAAA,GAEIgK,EAAMqa,EAAAhiB,SAAU2V,YAAY,GAGhClW,QAAY,IAAIkI,CAEhB,IAAIsa,GAAqB,GAAIH,GAAA9hB,QAAmB2H,GAE5Cua,IAEIhJ,UAAW,uBACXO,UAAU,EACVC,UAAU,EACVqC,MAAOkG,EAAmBpQ,QAIrB,IAAIkQ,GAAA/hB,QAAYkiB,EAAY,sBAEzCzgB,SAAQC,IAAI","file":"itsMap.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 72);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\nmodule.exports = ol;\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapPopupCls_1 = __webpack_require__(13);\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexports.mapPopup = new mapPopupCls_1.default();\r\nexports.default = exports.mapPopup;\r\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * base interaction\r\n */\r\nvar MapInteractionBase = (function () {\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n function MapInteractionBase(subtype) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n MapInteractionBase.prototype.init = function (theMap) {\r\n if (!this._initialized) {\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n };\r\n Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get: function () {\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get: function () {\r\n return this._initialized;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n MapInteractionBase.prototype._checkInit = function () {\r\n if (!this.initialized) {\r\n var msg = this._subtype + \" object not initialized\";\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n };\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n MapInteractionBase.prototype.checkInit = function () {\r\n this._checkInit();\r\n };\r\n return MapInteractionBase;\r\n}());\r\nexports.MapInteractionBase = MapInteractionBase;\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexports.default = MapInteractionBase;\r\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMapBase_1 = __webpack_require__(14);\r\nvar provide_1 = __webpack_require__(0);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nfunction quickMap(options) {\r\n if (options === void 0) { options = {}; }\r\n var m = quickMapBase_1.quickMapBase(options);\r\n mapMove_1.default.init(m);\r\n mapPopup_1.default.init(m);\r\n return m;\r\n}\r\nexports.quickMap = quickMap;\r\nnm.quickMap = quickMap;\r\nexports.default = quickMap;\r\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapMoveCls_1 = __webpack_require__(12);\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\nexports.mapMove = new mapMoveCls_1.default();\r\nexports.default = exports.mapMove;\r\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nvar ol = __webpack_require__(2);\r\nexports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' });\r\nexports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' });\r\nexports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' });\r\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util.checkDefined');\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nfunction undefinedOrNull(input) {\r\n \"use strict\";\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\nexports.undefinedOrNull = undefinedOrNull;\r\nnm.undefinedOrNull = undefinedOrNull;\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nfunction definedAndNotNull(input) {\r\n \"use strict\";\r\n return !(undefinedOrNull(input));\r\n}\r\nexports.definedAndNotNull = definedAndNotNull;\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar zoomResolutionConvert = __webpack_require__(17);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nvar LayerBase = (function () {\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n function LayerBase(url, options) {\r\n if (options === void 0) { options = {}; }\r\n options = options || {};\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n this.id = options.id || makeGuid_1.default();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n }\r\n else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n this._source = undefined;\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n this._legendContent = '';\r\n if (this._legendCheckbox) {\r\n this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n else {\r\n this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBase.prototype._load = function () {\r\n if (this.loaded == true) {\r\n return true;\r\n }\r\n else {\r\n this._loaded = true;\r\n return false;\r\n }\r\n };\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n LayerBase.prototype.getLegendDiv = function () {\r\n return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n };\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n if (additionalContent === void 0) { additionalContent = ''; }\r\n var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n this._legendContent += additionalContent;\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n };\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n this._addLegendContent(additionalContent);\r\n };\r\n LayerBase.prototype.applyCollapse = function () {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n return undefined;\r\n }\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n var $expander = this._$legendDiv.find('.legend-items-expander');\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n $expander.click(function () {\r\n var $this = $(this);\r\n $this.siblings('ul').slideToggle();\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n }\r\n else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * trick to refresh the layer\r\n */\r\n LayerBase.prototype.refresh = function () {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"id\", {\r\n get: function () {\r\n return this._id;\r\n },\r\n set: function (newId) {\r\n this._id = newId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n get: function () {\r\n return this._animate;\r\n },\r\n set: function (animate) {\r\n this._animate = animate;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._legendContent;\r\n },\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set: function (newVal) {\r\n this._legendContent = newVal;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"params\", {\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._params;\r\n },\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set: function (newParams) {\r\n this._params = newParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"url\", {\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._url;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set: function (visibility) {\r\n this.setVisible(visibility);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setVisible = function (visibility) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get: function () {\r\n return this._opacity;\r\n },\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set: function (opacity) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"name\", {\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._name;\r\n },\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set: function (newName) {\r\n this._name = newName;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._loaded;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"source\", {\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getSource = function () {\r\n return this._source;\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n /**\r\n * get the z index\r\n */\r\n get: function () {\r\n return this._zIndex;\r\n },\r\n /**\r\n * set the z index\r\n */\r\n set: function (newZ) {\r\n this._zIndex = newZ;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setZIndex = function (newZ) {\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n /**\r\n * the the ol layer\r\n */\r\n get: function () {\r\n return this.getOlLayer();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getOlLayer = function () {\r\n return this._olLayer;\r\n };\r\n return LayerBase;\r\n}());\r\nexports.LayerBase = LayerBase;\r\nnm.LayerBase = LayerBase;\r\nexports.default = LayerBase;\r\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar ol = __webpack_require__(2);\r\nvar projections_1 = __webpack_require__(8);\r\nvar invalidClass = 'geocoder-invalid';\r\nvar geocoderLoadingClass = 'geocoder-loading';\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\nvar Geocode = (function () {\r\n function Geocode(mapDiv, map) {\r\n var _this = this;\r\n var inputGuid = makeGuid_1.makeGuid();\r\n var buttonGuid = makeGuid_1.makeGuid();\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }),\r\n stroke: new ol.style.Stroke({ color: 'red', width: 1 })\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n (\"<input type=\\\"text\\\" id=\\\"\" + inputGuid + \"\\\">\") +\r\n (\"<button id=\\\"\" + buttonGuid + \"\\\">Search</button>\") +\r\n '</div>');\r\n this.theButton = document.getElementById(buttonGuid);\r\n this.theInput = document.getElementById(inputGuid);\r\n this.reset();\r\n var $theButton = $(this.theButton);\r\n var $theInput = $(this.theInput);\r\n $theButton.click(function (evt) {\r\n evt.preventDefault();\r\n $theButton.addClass(geocoderLoadingClass);\r\n _this.theButton.disabled = true;\r\n _this.indicationLayer.getSource().clear();\r\n $.get(\"https://geocode.xyz/\" + _this.theInput.value + \"?geoit=json\", {}, function (d) {\r\n var lat = parseFloat(d['latt']);\r\n var lon = parseFloat(d['longt']);\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n _this.theInput.title = 'Specified Location Invalid';\r\n _this.theButton.title = 'Specified Location Invalid';\r\n }\r\n else {\r\n var v = _this.map.getView();\r\n var p = new ol.geom.Point([lon, lat]);\r\n var feat = new ol.Feature(p);\r\n _this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(projections_1.proj4326, projections_1.proj3857);\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n $theButton.removeClass(geocoderLoadingClass);\r\n _this.theButton.disabled = false;\r\n }, 'json');\r\n });\r\n $(this.theInput).keyup(function (evt) {\r\n evt.preventDefault();\r\n _this.theButton.disabled = _this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n _this.theInput.title = '';\r\n _this.theButton.title = '';\r\n if (!_this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n });\r\n }\r\n Geocode.prototype.reset = function () {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n };\r\n return Geocode;\r\n}());\r\nexports.Geocode = Geocode;\r\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar checkDefined = __webpack_require__(9);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nvar MapMoveCls = (function (_super) {\r\n __extends(MapMoveCls, _super);\r\n /**\r\n * constructor called implicitly\r\n */\r\n function MapMoveCls() {\r\n var _this = _super.call(this, 'map move') || this;\r\n _this._arrLyrRequest = [];\r\n _this._arrLyrTimeout = [];\r\n _this._arrLayer = [];\r\n _this._lookupLayer = {};\r\n _this._mapMoveCallbacks = [];\r\n _this._mapMoveCallbacksLookup = {};\r\n _this._mapMoveCallbackDelays = [];\r\n _this._mapMoveCallbackContext = [];\r\n _this._mapMoveCallbackTimeout = [];\r\n _this._mapExtent = undefined;\r\n _this._zoomLevel = undefined;\r\n return _this;\r\n }\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n MapMoveCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n _this._updateMapExtent();\r\n // trigger the layer updates\r\n for (var i = 0; i < _this._arrLayer.length; i++) {\r\n _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n }\r\n // trigger the map callbacks\r\n for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n _this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n };\r\n MapMoveCls.prototype._updateMapExtent = function () {\r\n var theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n var extentArray = theView.calculateExtent(this.map.getSize());\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n };\r\n Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n /**\r\n * return the map extent\r\n */\r\n get: function () {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n return this._mapExtent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n }\r\n else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n }\r\n else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n // dummy callback used if before load returns false\r\n var callbackFunc = function () { };\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n var __this_1 = this;\r\n callbackFunc = function () {\r\n function innerFunction(theLayer, theIndex) {\r\n var _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this_1, lyr, index);\r\n };\r\n }\r\n else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n };\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n throw 'either the function index or the id must be defined';\r\n }\r\n if (typeof ind !== 'number') {\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n if (ind < 0) {\r\n console.log('function not found');\r\n return;\r\n }\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n var ctx = this._mapMoveCallbackContext[ind];\r\n var theFunc = this._mapMoveCallbacks[ind];\r\n var __this = this;\r\n var f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n };\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n };\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId) {\r\n functionId = makeGuid_1.default();\r\n }\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n };\r\n return MapMoveCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapMoveCls = MapMoveCls;\r\nnm.MapMoveCls = MapMoveCls;\r\nexports.default = MapMoveCls;\r\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\nvar FeatureLayerProperties = (function () {\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n get: function () {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n }\r\n else {\r\n return this.layer.name;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FeatureLayerProperties;\r\n}());\r\nexports.FeatureLayerProperties = FeatureLayerProperties;\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nvar MapPopupCls = (function (_super) {\r\n __extends(MapPopupCls, _super);\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n /**\r\n * map popup constructor\r\n */\r\n function MapPopupCls() {\r\n var _this = _super.call(this, 'map popup') || this;\r\n _this._arrPopupLayerIds = [];\r\n _this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n _this._arrPopupContentFunction = [];\r\n _this._$popupContainer = undefined;\r\n _this._$popupContent = undefined;\r\n _this._$popupCloser = undefined;\r\n _this._popupOverlay = undefined;\r\n _this._selectionLayers = [];\r\n _this._selectionLayerLookup = {};\r\n _this._mapClickFunctions = [];\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n _this._popupChangedFunctions = [];\r\n _this._esriMapServiceLayers = [];\r\n _this._popupOpen = false;\r\n _this._popupCoordinate = null;\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n _this._popupContentLength = 0;\r\n return _this;\r\n }\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n MapPopupCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n var $map;\r\n var target = this.map.getTarget();\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n $map.append('<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>');\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n var _ease = function (n) {\r\n return ol.easing.inAndOut(n);\r\n };\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n this._map.addOverlay(this._popupOverlay);\r\n this._$popupCloser.click(function (evt) {\r\n _this.closePopup();\r\n });\r\n // display popup on click\r\n this._map.on('singleclick', function (evt) {\r\n _this.closePopup();\r\n _this._popupCoordinate = evt['coordinate'];\r\n // esri map service layers\r\n if (_this._esriMapServiceLayers.length > 0) {\r\n var queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n imageDisplay: _this._map.getSize().join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n var l = _a[_i];\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n var featObj = layerFeatureObjectArray[i];\r\n var props = featObj.feature.getProperties();\r\n var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n }\r\n else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse;\r\n _this._passThroughLayerFeatureArray.push(featObj);\r\n }\r\n else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n _this._currentPopupIndex = -1;\r\n var popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n popupHtml += \"<span> of </span>\";\r\n popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n popupHtml += \"<span> - </span>\";\r\n popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n popupHtml += '</div>';\r\n _this._$popupContent.html(popupHtml);\r\n _this._$popupContent.find('.previous-popup').click(function () {\r\n if (_this._popupContentLength == 1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == 0) {\r\n _this._currentPopupIndex = _this._popupContentLength - 1;\r\n }\r\n else {\r\n _this._currentPopupIndex--;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n var nextPopup = _this._$popupContent.find('.next-popup');\r\n nextPopup.click(function () {\r\n if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n _this._currentPopupIndex = 0;\r\n }\r\n else {\r\n _this._currentPopupIndex++;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n if (_this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n _this._$popupContent.scrollTop(0);\r\n _this._popupOpen = true;\r\n }\r\n });\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', function (evt) {\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n var hit = false;\r\n _this.map.forEachFeatureAtPixel(pixel, function (f, l) {\r\n if (hit) {\r\n return;\r\n }\r\n for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) {\r\n var vLyr = _a[_i];\r\n if (vLyr.olLayer == l) {\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n var mapElement = _this.map.getTargetElement();\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n };\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n MapPopupCls.prototype._triggerFeatSelect = function () {\r\n var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f(this._$popupContent);\r\n }\r\n };\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n featLayerObject.popupContent = popupContent;\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n };\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n var _this = this;\r\n var layerFeatureObjectArray = [];\r\n this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n var hasLyr = false;\r\n var j;\r\n var lyr = null;\r\n for (j = 0; j < _this._arrPopupLayers.length; j++) {\r\n lyr = _this._arrPopupLayers[j];\r\n if (lyr.olLayer === layer) {\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j]));\r\n }\r\n });\r\n return layerFeatureObjectArray;\r\n };\r\n MapPopupCls.prototype.closePopup = function () {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n return false;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n };\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n this._checkInit();\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n var theStyle;\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n }\r\n else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n var selectionLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n });\r\n selectionLayer.setZIndex(100);\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n return selectionLayer;\r\n };\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n return selectionLayer;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n };\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n return selectionLayer;\r\n };\r\n MapPopupCls.prototype.clearSelection = function () {\r\n this._checkInit();\r\n for (var i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f();\r\n }\r\n };\r\n ;\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n this._mapClickFunctions.push(func);\r\n };\r\n return MapPopupCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapPopupCls = MapPopupCls;\r\nnm.MapPopupCls = MapPopupCls;\r\nexports.default = MapPopupCls;\r\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar geocode_1 = __webpack_require__(11);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nfunction quickMapBase(options) {\r\n if (options === void 0) { options = {}; }\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || { x: -10018378, y: 5574910 };\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n var $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n // let satLayer = new ol.layer.Tile({visible: false,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3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw4scxNysnHxU7nSspTRcJjCZGL3IsjsYJMMg5mwgx7gaIOLBFCogAgBBoNa9w+DE6I+Bs7FTgwwrJbHjWDgpYo2KwtBTcYE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Xe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHjKTHPPBo8CSJISqqq4wGGOcWylIGlgvgNX1Gd8vF5f+IUIwb30ng+Gg2QfBRIMvy0jG8SVkYo4N0zvUXVRztbJ/L6xL7lUZEXBEHkuZqlS6gEAUgKJurnhFtfpACOYd8b/hVbJPqwi44a6KA0sPVjIi/SIyxb3u8KlAJ0S8jRVgrlW+nVHPdrhiXCxu42d86ByksDc80P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2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n var coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n var controls = ol.control.defaults({\r\n attributionOptions: { collapsible: false }\r\n });\r\n var view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n var map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n if (options.addGeocode) {\r\n new geocode_1.Geocode(document.getElementById(options.divId), map);\r\n }\r\n return map;\r\n}\r\nexports.quickMapBase = quickMapBase;\r\nnm.quickMapBase = quickMapBase;\r\nexports.default = quickMapBase;\r\n\n\n/***/ }),\n/* 15 */,\n/* 16 */,\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\nvar _zoomResLookup = [\r\n 156543.03392804097,\r\n 78271.51696402048,\r\n 39135.75848201024,\r\n 19567.87924100512,\r\n 9783.93962050256,\r\n 4891.96981025128,\r\n 2445.98490512564,\r\n 1222.99245256282,\r\n 611.49622628141,\r\n 305.748113140705,\r\n 152.8740565703525,\r\n 76.43702828517625,\r\n 38.21851414258813,\r\n 19.109257071294063,\r\n 9.554628535647032,\r\n 4.777314267823516,\r\n 2.388657133911758,\r\n 1.194328566955879,\r\n 0.5971642834779395,\r\n 0.29858214173896974,\r\n 0.14929107086948487,\r\n 0.07464553543474244,\r\n 0.03732276771737122,\r\n 0.01866138385868561,\r\n 0.009330691929342804,\r\n 0.004665345964671402,\r\n 0.002332672982335701,\r\n 0.0011663364911678506,\r\n 0.0005831682455839253 //28\r\n];\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nfunction zoomToResolution(zoomLevel) {\r\n \"use strict\";\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n }\r\n else {\r\n console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n return undefined;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.zoomToResolution = zoomToResolution;\r\nnm.zoomToResolution = zoomToResolution;\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nfunction resolutionToZoom(resolution) {\r\n for (var i = 0; i < _zoomResLookup.length; i++) {\r\n if (resolution >= _zoomResLookup[i]) {\r\n return i;\r\n }\r\n }\r\n return 0;\r\n}\r\nexports.resolutionToZoom = resolutionToZoom;\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ }),\n/* 18 */,\n/* 19 */,\n/* 20 */,\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */,\n/* 26 */,\n/* 27 */,\n/* 28 */,\n/* 29 */,\n/* 30 */,\n/* 31 */,\n/* 32 */,\n/* 33 */,\n/* 34 */,\n/* 35 */,\n/* 36 */,\n/* 37 */,\n/* 38 */,\n/* 39 */,\n/* 40 */,\n/* 41 */,\n/* 42 */,\n/* 43 */,\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBase_1 = __webpack_require__(10);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nvar LayerBaseVector = (function (_super) {\r\n __extends(LayerBaseVector, _super);\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n function LayerBaseVector(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, url, options) || this;\r\n options = options;\r\n //prevent regular load if no url has been provided\r\n if (_this.url.trim() == '') {\r\n _this._loaded = true;\r\n }\r\n _this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n if (_this.visible) {\r\n _this._autoLoad = true;\r\n }\r\n else {\r\n _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n if (options.mapMoveObj) {\r\n _this._mapMove = options.mapMoveObj;\r\n }\r\n else {\r\n _this._mapMove = _this._onDemand ? mapMove_1.default : undefined;\r\n }\r\n _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () { return {}; };\r\n if (_this._onDemand) {\r\n _this._loaded = true;\r\n _this._mapMoveParams = {};\r\n _this._mapMove.checkInit();\r\n _this._mapMove.addVectorLayer(_this);\r\n }\r\n _this._source = new ol.source.Vector();\r\n _this._olLayer = new ol.layer.Vector({\r\n source: _this._source,\r\n visible: _this.visible,\r\n style: _this.style,\r\n minResolution: _this._minResolution,\r\n maxResolution: _this._maxResolution,\r\n renderOrder: options.renderOrder\r\n });\r\n _this.olLayer.setZIndex(_this._zIndex);\r\n _this._projectionMap = null;\r\n _this._projection4326 = new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n _this._olLayer.setOpacity(_this.opacity);\r\n return _this;\r\n }\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n LayerBaseVector.prototype.addFeatures = function (featureCollection) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n };\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n return this.visible;\r\n };\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n };\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n LayerBaseVector.prototype.mapMoveCallback = function (d) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n };\r\n /**\r\n * clear features in the layer\r\n */\r\n LayerBaseVector.prototype.clear = function () {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n };\r\n Object.defineProperty(LayerBaseVector.prototype, \"onDemandDelay\", {\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get: function () {\r\n return this._onDemandDelay;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"autoLoad\", {\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get: function () {\r\n return this._autoLoad;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"style\", {\r\n /**\r\n * get the style definition\r\n */\r\n get: function () {\r\n return this._style;\r\n },\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set: function (style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapCrs\", {\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get: function () {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapProj\", {\r\n get: function () {\r\n if (this._projectionMap != null) {\r\n return this._projectionMap;\r\n }\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n }\r\n else {\r\n return null;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapMove\", {\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get: function () {\r\n return this._mapMove;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapMoveParams\", {\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._mapMoveParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"visible\", {\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set: function (visibility) {\r\n _super.prototype.setVisible.call(this, visibility);\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"source\", {\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"features\", {\r\n /**\r\n * array of ol features\r\n */\r\n get: function () {\r\n return this.source.getFeatures();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"olLayer\", {\r\n /**\r\n *\r\n */\r\n get: function () {\r\n return _super.prototype.getOlLayer.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBaseVector.prototype.setZIndex = function (newZ) {\r\n this.olLayer.setZIndex(newZ);\r\n };\r\n return LayerBaseVector;\r\n}(LayerBase_1.LayerBase));\r\nexports.LayerBaseVector = LayerBaseVector;\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexports.default = LayerBaseVector;\r\n\n\n/***/ }),\n/* 45 */,\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/16/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar nm = provide_1.default('collections');\r\nvar $ = __webpack_require__(1);\r\nvar LayerGroup = (function () {\r\n /**\r\n *\r\n * @param {object} [groupConfig={}] - group configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n * @param {LayerGroup} [parent=undefined] - the parent group\r\n */\r\n function LayerGroup(groupConfig, parent) {\r\n this.groupLayers = [];\r\n this.groupLayersLookup = {};\r\n this.groupGroups = [];\r\n this.groupGroupsLookup = {};\r\n this.itemIdArray = [];\r\n if (typeof groupConfig == 'undefined') {\r\n this.parent = null;\r\n this.groupId = 'root';\r\n this.groupName = 'root';\r\n this.allGroupLookup = { root: this };\r\n this.allGroupArray = [this];\r\n this.allLayerArray = [];\r\n this.allLayerLookup = {};\r\n this.layerParentLookup = {};\r\n this.collapse = false;\r\n this.addCheck = false;\r\n }\r\n else {\r\n this.groupId = makeGuid_1.default();\r\n this.parent = parent;\r\n this.groupName = groupConfig.groupName;\r\n this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n }\r\n }\r\n /**\r\n *\r\n * @param {object} groupConfig - configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n * @param {Array<LayerGroup>} parents parent groups\r\n * @returns {LayerGroup} the layer group just added\r\n */\r\n LayerGroup.prototype.addGroup = function (groupConfig, parents) {\r\n var parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n }\r\n else {\r\n parent = 'root';\r\n }\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n var parentGroup = this.allGroupLookup[parent];\r\n var newGroup = new LayerGroup(groupConfig, parentGroup);\r\n this.allGroupLookup[newGroup.groupId] = newGroup;\r\n this.allGroupArray.push(newGroup);\r\n parentGroup.groupGroups.push(newGroup);\r\n parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n console.log(newGroup.groupId);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newGroup.groupId);\r\n return newGroup;\r\n };\r\n /**\r\n *\r\n * @param {LayerBase} newLayer the layer to be added\r\n * @param {Array} parents array\r\n */\r\n LayerGroup.prototype.addLegendLayer = function (newLayer, parents) {\r\n var parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n }\r\n else {\r\n parent = 'root';\r\n }\r\n this.allLayerLookup[newLayer.id] = newLayer;\r\n this.allLayerArray.push(newLayer);\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n var parentGroup = this.allGroupLookup[parent];\r\n parentGroup.groupLayers.push(newLayer);\r\n parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n console.log(newLayer.id);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newLayer.id);\r\n this.layerParentLookup[newLayer.id] = parentGroup;\r\n };\r\n LayerGroup.prototype.getLegendHtml = function (legendId, options) {\r\n var legendHtml = \"<ul id=\\\"\" + legendId + \"\\\" class=\\\"legend-container\\\">\";\r\n legendHtml += \"<li>\" + options.legendTitle + \"<input type=\\\"checkbox\\\" checked id=\\\"suppress-by-extent-\" + legendId + \"\\\" class=\\\"suppress-by-extent\\\">\" +\r\n (\"<label title=\\\"Suppress layers not visible at this zoom level\\\" for=\\\"suppress-by-extent-\" + legendId + \"\\\">\") +\r\n \"<span></span>\" +\r\n \"</label></li>\";\r\n legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n return legendHtml;\r\n };\r\n /**\r\n * @param {Array} itemIds the items to process\r\n * @param {LayerGroup} theGroup new group\r\n * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n * @static\r\n * @returns {string} html string\r\n */\r\n LayerGroup.prototype._buildLegend = function (itemIds, theGroup, layerDivClasses) {\r\n if (itemIds.length == 0) {\r\n return '';\r\n }\r\n var theHml = '';\r\n var itemId = itemIds[0];\r\n if (theGroup.groupLayersLookup[itemId]) {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n var lyr = theGroup.groupLayersLookup[itemId];\r\n theHml += \"<li id=\\\"\" + lyr.id + \"-layer-li\\\" class=\\\"legend-layer-li \" + layerDivClasses.join(' ') + \"\\\">\" + lyr.getLegendDiv() + '</li>';\r\n }\r\n else if (theGroup.groupGroupsLookup[itemId]) {\r\n /**\r\n * type {LayerGroup}\r\n */\r\n var otherGroup = theGroup.groupGroupsLookup[itemId];\r\n theHml += \"<li>\";\r\n theHml += \"<div id=\\\"\" + otherGroup.groupId + \"-legend-layer-div\\\" \" +\r\n (\"class=\\\"legend-layer-group \" + layerDivClasses.join(' ') + \"\\\">\");\r\n if (otherGroup.addCheck) {\r\n theHml += \"<input type=\\\"checkbox\\\" checked id=\\\"\" + otherGroup.groupId + \"-group-chck\\\">\" +\r\n (\"<label for=\\\"\" + otherGroup.groupId + \"-group-chck\\\" title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\");\r\n }\r\n else {\r\n theHml += \"<label title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\";\r\n }\r\n theHml += \"<span title=\\\"Expand/Collapse\\\" class=\\\"layer-group-expander\";\r\n theHml += (otherGroup.collapse ? ' legend-layer-group-initial-collapse' : '') + \"\\\">\";\r\n theHml += otherGroup.collapse ? '▶' : '▼';\r\n theHml += '</span>';\r\n //parents.push(groupId);\r\n theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n theHml += '</div>';\r\n theHml += '</li>';\r\n }\r\n return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n };\r\n return LayerGroup;\r\n}());\r\n/**\r\n * a wrapper to make a legend\r\n */\r\nvar LayerLegend = (function () {\r\n /**``\r\n *\r\n * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n * @param {string} divId the div where the legend should be added\r\n * @param {object} options for legend\r\n * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n * @param {string} [options.legendTitle=Legend] the legend title\r\n * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n */\r\n function LayerLegend(legendItems, divId, options) {\r\n if (options === void 0) { options = {}; }\r\n for (var _i = 0, legendItems_1 = legendItems; _i < legendItems_1.length; _i++) {\r\n var i = legendItems_1[_i];\r\n if (typeof i == 'undefined') {\r\n throw 'undefined item passed in array to legend constructor';\r\n }\r\n }\r\n options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n options.layerDivClasses = options.layerDivClasses || [];\r\n // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove_1.default.checkInit();\r\n }\r\n this.$divElement = $('#' + divId);\r\n this._legendItems = legendItems;\r\n this.layerGroup = new LayerGroup();\r\n this._buildTree(legendItems);\r\n this.legendId = makeGuid_1.default();\r\n this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n for (var _a = 0, _b = this.layerGroup.allLayerArray; _a < _b.length; _a++) {\r\n var l = _b[_a];\r\n l.applyCollapse();\r\n }\r\n var _this = this;\r\n //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove_1.default.checkInit();\r\n mapMove_1.default.addCallback(function (ext, zoom, evt) {\r\n if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n for (var _i = 0, _a = this.layerGroup.allLayerArray; _i < _a.length; _i++) {\r\n var lyr = _a[_i];\r\n var $lyrLi = $('#' + lyr.id + '-layer-li');\r\n if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n $lyrLi.addClass('layer-not-visible');\r\n }\r\n else {\r\n $lyrLi.removeClass('layer-not-visible');\r\n }\r\n }\r\n }\r\n }, this, 100, true, 'legend1');\r\n }\r\n // <editor-fold desc=\"add event listeners\">\r\n this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n var legendLayerLis = $('.legend-layer-li');\r\n if (this.checked) {\r\n legendLayerLis.removeClass('layer-force-show');\r\n }\r\n else {\r\n legendLayerLis.addClass('layer-force-show');\r\n }\r\n });\r\n this.$divElement.find('.legend-check').change(function () {\r\n var lyrId = this.id.replace('-legend-layer-check', '');\r\n _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n });\r\n this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n });\r\n this.$divElement.find('.layer-group-expander').click(function () {\r\n var $this = $(this);\r\n $this.removeClass('legend-layer-group-initial-collapse');\r\n $this.siblings('ul').slideToggle();\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n }\r\n else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n // </editor-fold>\r\n }\r\n /**\r\n * @param {Array} [legendItems=this._layerConfig] the legend items\r\n * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n * @private\r\n */\r\n LayerLegend.prototype._buildTree = function (legendItems, parents) {\r\n if (legendItems.length == 0) {\r\n return;\r\n }\r\n var oneItem = legendItems[0];\r\n //reset the parent if the item is in the base array\r\n if (this._legendItems.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n parents = [];\r\n }\r\n if (typeof oneItem.groupName !== 'undefined') {\r\n var groupItem = legendItems[0];\r\n var newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n parents.push(newGroup.groupId);\r\n this._buildTree(oneItem.items, parents);\r\n }\r\n else {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n var layerItem = legendItems[0];\r\n this.layerGroup.addLegendLayer(layerItem, parents);\r\n }\r\n this._buildTree(legendItems.slice(1), parents);\r\n };\r\n return LayerLegend;\r\n}());\r\nexports.LayerLegend = LayerLegend;\r\nnm.LayerLegend = LayerLegend;\r\nexports.default = LayerLegend;\r\n\n\n/***/ }),\n/* 47 */,\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBaseVector_1 = __webpack_require__(44);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar proj = __webpack_require__(8);\r\nvar projections_1 = __webpack_require__(8);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nvar LayerBaseVectorGeoJson = (function (_super) {\r\n __extends(LayerBaseVectorGeoJson, _super);\r\n /**\r\n * @param {string|null} url - resource url, set to '' to make blank layer\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n *\r\n * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n */\r\n function LayerBaseVectorGeoJson(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = this;\r\n url = typeof url == 'string' ? url : '';\r\n _this = _super.call(this, url, options) || this;\r\n _this._geoJsonFormat = new ol.format.GeoJSON();\r\n _this._transform = options.transform || {};\r\n _this._transform.dataProjection = _this._transform.dataProjection || proj.proj4326;\r\n _this._transform.featureProjection = _this._transform.featureProjection || projections_1.proj3857;\r\n if (_this.autoLoad || _this.visible) {\r\n _this._load();\r\n }\r\n return _this;\r\n }\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - as geojson object\r\n */\r\n LayerBaseVectorGeoJson.prototype.addFeatures = function (featureCollection) {\r\n this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, { dataProjection: this._transform.dataProjection,\r\n featureProjection: this._transform.featureProjection }));\r\n };\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBaseVectorGeoJson.prototype._load = function () {\r\n var _this = this;\r\n if (_super.prototype._load.call(this)) {\r\n return true;\r\n }\r\n $.get(this._url, this._params, function (d) {\r\n _this.addFeatures(d);\r\n _this.loadCallback(_this);\r\n }, 'json').fail(function () {\r\n this._loaded = false;\r\n });\r\n return false;\r\n };\r\n /**\r\n * callback function on map move\r\n * @param {object} d the json response\r\n * @override\r\n */\r\n LayerBaseVectorGeoJson.prototype.mapMoveCallback = function (d) {\r\n _super.prototype.mapMoveCallback.call(this, d);\r\n this._source.addFeatures(this._geoJsonFormat.readFeatures(d, { featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection }));\r\n };\r\n return LayerBaseVectorGeoJson;\r\n}(LayerBaseVector_1.LayerBaseVector));\r\nexports.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexports.default = LayerBaseVectorGeoJson;\r\n\n\n/***/ }),\n/* 49 */,\n/* 50 */,\n/* 51 */,\n/* 52 */,\n/* 53 */,\n/* 54 */,\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar colors = __webpack_require__(67);\r\nvar provide_1 = __webpack_require__(0);\r\nvar LayerItsInventory_1 = __webpack_require__(63);\r\nvar nm = provide_1.default('collections');\r\nvar itsConfig = [\r\n {\r\n name: 'Camera',\r\n itsType: 'cctv',\r\n minZoom: 11,\r\n itsIconConfig: {\r\n prop: 'owner',\r\n defaultName: 'WisDOT',\r\n defaultIcon: 'cctv.png',\r\n iconArray: [\r\n ['City of Madison', 'Madison', 'cctv-mad.png']\r\n ]\r\n }\r\n },\r\n {\r\n name: 'Message Signs',\r\n itsType: 'DMS',\r\n minZoom: 11,\r\n itsIconConfig: {\r\n prop: 'dmsType',\r\n defaultName: 'DMS',\r\n defaultIcon: 'dms.png',\r\n iconArray: [\r\n ['pcms', 'PCMS', 'pcms.png']\r\n ]\r\n }\r\n },\r\n { name: 'ATR', itsType: 'atr', minZoom: 8, itsIcon: 'atr.png', visible: false },\r\n { name: 'Lighting', itsType: 'light', minZoom: 16, itsIcon: 'streetlight.png', visible: false, onDemand: true },\r\n { name: 'Bluetooth', itsType: 'blue', minZoom: 10, itsIcon: 'bluetooth.png', visible: false },\r\n { name: 'Cabinets', itsType: 'cabinet', minZoom: 10, itsIcon: 'cabinet.png', visible: false },\r\n { name: 'Hut', itsType: 'hut', minZoom: 10, itsIcon: 'hut.png', visible: false },\r\n { name: 'Vault', itsType: 'vault', minZoom: 13, itsIcon: 'vault.png', visible: false },\r\n { name: 'Advisory Radio', itsType: 'har', minZoom: 10, itsIcon: 'har.png', visible: false },\r\n {\r\n name: 'Loop Detectors',\r\n itsType: 'loop',\r\n legendCollapse: true,\r\n minZoom: 14,\r\n visible: false,\r\n itsIconConfig: {\r\n prop: 'dtctrType',\r\n defaultName: 'Other',\r\n defaultIcon: 'loopdetectorother.png',\r\n iconArray: [\r\n ['detector', 'Detector', 'loopdetector.png'],\r\n ['long', 'Long', 'loopdetectorlong.png'],\r\n ['zone', 'Zone', 'loopdetectorzone.png']\r\n ]\r\n },\r\n onDemand: true\r\n },\r\n { name: 'Microwave', itsType: 'microwave', minZoom: 14, itsIcon: 'microwave.png', visible: false },\r\n { name: 'Pull Box', itsType: 'pull', minZoom: 14, itsIcon: 'pullbox.png', visible: false, onDemand: true },\r\n { name: 'RWIS', itsType: 'rwis', minZoom: 7, itsIcon: 'rwis.png', visible: false },\r\n { name: 'Ramp Gates', itsType: 'gate', minZoom: 10, itsIcon: 'rampgate.png', visible: false },\r\n { name: 'Ramp Meter', itsType: 'meter', minZoom: 10, itsIcon: 'rampmeter.png', visible: false },\r\n { name: 'Signal', itsType: 'signal', minZoom: 13, itsIcon: 'signal.png', visible: false, onDemand: true },\r\n { name: 'Tower', itsType: 'tower', minZoom: 10, itsIcon: 'tower.png', visible: false },\r\n {\r\n name: 'Trench',\r\n itsType: 'trench',\r\n onDemand: true,\r\n visible: false,\r\n onDemandDelay: 500,\r\n minZoom: 15,\r\n legendCollapse: true,\r\n itsLineConfig: {\r\n prop: 'owner',\r\n defaultName: 'Other',\r\n //defaultWidth: 7,\r\n defaultColor: colors.hexAlphaToRgbOrRgba('#747474', 0.8),\r\n lineArray: [\r\n ['WisDOT', 'WisDOT', colors.hexAlphaToRgbOrRgba('#FF032F', 0.7)],\r\n ['WIN', 'WIN', colors.hexAlphaToRgbOrRgba('#FFC632', 0.7)],\r\n ['USXchange', 'USXchange', colors.hexAlphaToRgbOrRgba('#2DFF46', 0.7)],\r\n ['AT&T', 'AT&T', colors.hexAlphaToRgbOrRgba('#ff2be5', 0.7)],\r\n ['Touch America', 'Touch America', colors.hexAlphaToRgbOrRgba('#52f3ff', 0.7)],\r\n ['Qwest', 'Qwest', colors.hexAlphaToRgbOrRgba('#9278ff', 0.7)],\r\n ['McLeodUSA', 'McLeodUSA', colors.hexAlphaToRgbOrRgba('#2926FF', 0.7)],\r\n ['CINC', 'CINC', colors.hexAlphaToRgbOrRgba('#CB00FF', 0.7)],\r\n ['City of Madison', 'Madison', colors.hexAlphaToRgbOrRgba('#000380', 0.7)]\r\n ]\r\n }\r\n }\r\n];\r\nvar ItsLayerCollection = (function () {\r\n /**\r\n * Create a collection of all ITS layers\r\n * @param {ol.Map} theMap the openlayers map\r\n * @param {Array} [exclude=[]] array of Its layer identifiers to exclude\r\n *\r\n * BLUE Bluetooth Detector - Bluetooth Detector\r\n * CABINET Cabinets - The cabinets\r\n * CCTV Camera - Traffic Cameras\r\n * HUT Communication Hut - Communication Hut\r\n * VAULT Communication Vault - The communication vaults\r\n * HAR Highway Advisory Radio - Advisory Radios\r\n * LIGHT Lighting - Lighting\r\n * LOOP Loop Detectors - Loop Detectors\r\n * DMS Message Board - Message Boards and Signs\r\n * MICROWAVE Microwave Detector - Microwave Detectors\r\n * PULL Pull Box - A pull box\r\n * RWIS RWIS - Road weather information system\r\n * GATE Ramp Gate - The ramp Gates\r\n * METER Ramp Meter - The ramp meters\r\n * SIGNAL Signal - Traffic Signal\r\n * TOWER Tower - The towers\r\n * TRENCH\r\n */\r\n function ItsLayerCollection(theMap, exclude) {\r\n this._map = theMap;\r\n this._layers = [];\r\n exclude = typeof exclude == 'object' ? exclude : [];\r\n for (var i = 0; i < itsConfig.length; i++) {\r\n var lyrConfig = itsConfig[i];\r\n var addLayer = true;\r\n for (var j = 0; j < exclude.length; j++) {\r\n if (exclude[j] == lyrConfig.itsType) {\r\n addLayer = false;\r\n break;\r\n }\r\n }\r\n if (addLayer) {\r\n var inventLyr = new LayerItsInventory_1.default(lyrConfig);\r\n this._map.addLayer(inventLyr.olLayer);\r\n this._layers.push(inventLyr);\r\n }\r\n }\r\n }\r\n Object.defineProperty(ItsLayerCollection.prototype, \"layers\", {\r\n /**\r\n * Return the array of layers in this collection\r\n * @returns {Array<LayerItsInventory>} an array of layers\r\n */\r\n get: function () {\r\n return this._layers;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return ItsLayerCollection;\r\n}());\r\nexports.ItsLayerCollection = ItsLayerCollection;\r\nnm.ItsLayerCollection = ItsLayerCollection;\r\nexports.default = ItsLayerCollection;\r\n\n\n/***/ }),\n/* 56 */,\n/* 57 */,\n/* 58 */,\n/* 59 */,\n/* 60 */,\n/* 61 */,\n/* 62 */,\n/* 63 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBaseVectorGeoJson_1 = __webpack_require__(48);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar projections_1 = __webpack_require__(8);\r\nvar nm = provide_1.default('layers');\r\nfunction checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n \"use strict\";\r\n //make sure one and only one configuration is defined;\r\n var configCount = 0;\r\n if (typeof itsIcon == 'string') {\r\n configCount++;\r\n }\r\n if (typeof itsLineStyle == 'object') {\r\n itsLineStyle.width = typeof itsLineStyle.width == 'number' ? itsLineStyle.width : 5;\r\n itsLineStyle.color = typeof itsLineStyle.color == 'string' ? itsLineStyle.color : 'red';\r\n configCount++;\r\n }\r\n if (typeof itsIconConfig == 'object') {\r\n itsIconConfig.defaultName = itsIconConfig.defaultName || 'Other';\r\n if (typeof itsIconConfig.iconArray == 'undefined') {\r\n itsIconConfig.iconArray = [];\r\n }\r\n configCount++;\r\n }\r\n if (typeof itsLineConfig == 'object') {\r\n itsLineConfig.defaultName = itsLineConfig.defaultName || 'Other';\r\n itsLineConfig.defaultWidth = itsLineConfig.defaultWidth || 5;\r\n itsLineConfig.defaultColor = itsLineConfig.defaultColor || 'red';\r\n if (typeof itsLineConfig.lineArray == 'undefined') {\r\n itsLineConfig.lineArray = [];\r\n }\r\n // set the width if not defined\r\n for (var i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n if (itsLineConfig.lineArray[i].length == 3) {\r\n itsLineConfig.lineArray[i].push(5);\r\n }\r\n }\r\n configCount++;\r\n }\r\n if (configCount > 1) {\r\n throw 'Only one style config can be defined';\r\n }\r\n}\r\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [itsLineStyle=undefined] A single line style\r\n * @param {string} itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n * @returns {*} undefined, style, or style function\r\n */\r\nfunction defineStyle(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n \"use strict\";\r\n checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n var _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/';\r\n if (itsIcon) {\r\n return new ol.style.Style({\r\n image: new ol.style.Icon({\r\n src: _iconUrlRoot + itsIcon,\r\n crossOrigin: 'anonymous'\r\n })\r\n });\r\n }\r\n else if (itsLineStyle) {\r\n return new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: itsLineStyle.color,\r\n width: itsLineStyle.width\r\n })\r\n });\r\n }\r\n else if (itsIconConfig) {\r\n return function (feature) {\r\n var symbolProp = feature.getProperties()[itsIconConfig.prop];\r\n var iconUrl = _iconUrlRoot + itsIconConfig.defaultIcon;\r\n for (var i = 0; i < itsIconConfig.iconArray.length; i++) {\r\n var thisProp = itsIconConfig.iconArray[i];\r\n if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n iconUrl = _iconUrlRoot + thisProp[2];\r\n break;\r\n }\r\n }\r\n return [new ol.style.Style({\r\n image: new ol.style.Icon({\r\n src: iconUrl,\r\n crossOrigin: 'anonymous'\r\n })\r\n })];\r\n };\r\n }\r\n else if (itsLineConfig) {\r\n return function (feature) {\r\n var symbolProp = feature.getProperties()[itsLineConfig.prop];\r\n var colr = itsLineConfig.defaultColor || 'red';\r\n var width = itsLineConfig.defaultWidth || 5;\r\n for (var i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n var thisProp = itsLineConfig.lineArray[i];\r\n if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n colr = thisProp[2];\r\n width = thisProp[3];\r\n break;\r\n }\r\n }\r\n return [new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: colr,\r\n width: width\r\n })\r\n })];\r\n };\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nfunction defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n \"use strict\";\r\n var iconHeight = 17;\r\n checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n var _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/';\r\n if (itsIcon) {\r\n return \"<img src=\\\"\" + (_iconUrlRoot + itsIcon) + \"\\\" class=\\\"legend-layer-icon\\\" height=\\\"\" + iconHeight + \"\\\">\";\r\n }\r\n else if (itsLineStyle) {\r\n return \"<hr style=\\\"height: \" + itsLineStyle.width + \"px; background-color: \" + itsLineStyle.color + \"\\\">\";\r\n }\r\n else if (itsIconConfig) {\r\n var outHtml = '';\r\n outHtml += '<ul>';\r\n for (var _i = 0, _a = itsIconConfig.iconArray; _i < _a.length; _i++) {\r\n var a = _a[_i];\r\n outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + a[1] + \"</span><img src=\\\"\" + (_iconUrlRoot + a[2]) + \"\\\" class=\\\"legend-layer-icon\\\" height=\\\"\" + iconHeight + \"\\\">\";\r\n }\r\n outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + itsIconConfig.defaultName + \"</span>\" +\r\n (\"<img src=\\\"\" + (_iconUrlRoot + itsIconConfig.defaultIcon) + \"\\\" class=\\\"legend-layer-icon\\\" height=\\\"\" + iconHeight + \"\\\"></li>\");\r\n outHtml += '</ul>';\r\n return outHtml;\r\n }\r\n else if (itsLineConfig) {\r\n var outHtml = '';\r\n outHtml += '<ul>';\r\n for (var _b = 0, _c = itsLineConfig.lineArray; _b < _c.length; _b++) {\r\n var ls = _c[_b];\r\n outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + ls[1] + \"</span>\" +\r\n (\"<hr style=\\\"height: \" + ls[3] + \"px; background-color: \" + ls[2] + \"\\\">\");\r\n }\r\n outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + itsLineConfig.defaultName + \"</span>\" +\r\n (\"<hr style=\\\"height: \" + itsLineConfig.defaultWidth + \"px; background-color: \" + itsLineConfig.defaultColor + \"\\\"></li>\");\r\n outHtml += '</ul>';\r\n return outHtml;\r\n }\r\n else {\r\n return '';\r\n }\r\n}\r\n/**\r\n * Its Layer class\r\n * @augments LayerBaseVectorGeoJson\r\n */\r\nvar LayerItsInventory = (function (_super) {\r\n __extends(LayerItsInventory, _super);\r\n /**\r\n * ITS device layer, types available at https://transportal.cee.wisc.edu/its/inventory/\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object|*} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n * @param {string} options.itsType the ITS device type, use the url flag at https://transportal.cee.wisc.edu/its/inventory/\r\n * @param {boolean} [options.addPopup=true] if the popup should be added automatically\r\n *\r\n * @param {string} [options.itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [options.itsLineStyle=undefined] A single line style\r\n * @param {string} options.itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [options.itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [options.itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} options.itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} options.itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} options.itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [options.itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [options.itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} options.itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [options.itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [options.itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [options.itsLineConfig.defaultWidth] The default line width to be used for no other matches\r\n * @param {object} [options.itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width = 5]\r\n */\r\n function LayerItsInventory(options) {\r\n var _this = this;\r\n if (typeof options.itsType !== 'string') {\r\n throw 'its type must be defined';\r\n }\r\n options.transform = { dataProjection: projections_1.proj4326, featureProjection: projections_1.proj3857 };\r\n var addToLegend = '';\r\n // define a style with the helper function if it is not explicitly defined\r\n if (typeof options.style == 'undefined') {\r\n options.style = defineStyle(options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig);\r\n addToLegend = defineLegend(options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig);\r\n }\r\n options.params = typeof options.params == 'object' ? options.params : {};\r\n $.extend(options.params, { format: 'JSON', resource: options.itsType });\r\n _this = _super.call(this, 'https://transportal.cee.wisc.edu/its/inventory/', options) || this;\r\n //add any additional content to the legend\r\n _this.addLegendContent(addToLegend);\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : true;\r\n if (options.addPopup) {\r\n mapPopup_1.default.addVectorPopup(_this, function (props) {\r\n return \"<iframe src=\\\"https://transportal.cee.wisc.edu/its/inventory/?feature=\" + props.featureGuid + \"\\\" \" +\r\n \"height=\\\"250\\\" width=\\\"350\\\"></iframe>\";\r\n });\r\n }\r\n return _this;\r\n }\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @callback makeGetParams\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n LayerItsInventory.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n _super.prototype.mapMoveMakeGetParams.call(this, extent, zoomLevel);\r\n var lowerLeft = new ol.geom.Point([extent.minX, extent.minY]);\r\n lowerLeft.transform(this.mapProj, this._projection4326);\r\n var lowerLeftCoordinates = lowerLeft.getCoordinates();\r\n var upperRight = new ol.geom.Point([extent.maxX, extent.maxY]);\r\n upperRight.transform(this.mapProj, this._projection4326);\r\n var upperRightCoordinates = upperRight.getCoordinates();\r\n $.extend(this.mapMoveParams, {\r\n L: lowerLeftCoordinates[0],\r\n R: upperRightCoordinates[0],\r\n B: lowerLeftCoordinates[1],\r\n T: upperRightCoordinates[1]\r\n });\r\n };\r\n return LayerItsInventory;\r\n}(LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson));\r\nexports.LayerItsInventory = LayerItsInventory;\r\nnm.LayerItsInventory = LayerItsInventory;\r\nexports.default = LayerItsInventory;\r\n\n\n/***/ }),\n/* 64 */,\n/* 65 */,\n/* 66 */,\n/* 67 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar chk = __webpack_require__(9);\r\nvar nm = provide_1.default('util.colors');\r\n/**\r\n * helper function to convert to hex\r\n * @param {number|string} x - the number to convert to hex\r\n * @returns {string} number as hex\r\n * @private\r\n */\r\nfunction _hex(x) {\r\n var hexDigits = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n if (isNaN(x)) {\r\n return \"00\";\r\n }\r\n else {\r\n var m = x;\r\n return hexDigits[(m - m % 16) / 16] + hexDigits[m % 16];\r\n }\r\n // return isNaN(x as number) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\r\n}\r\n/**\r\n * converts an RGB string to hex\r\n * @param {string} rgb - rgb color\r\n * @returns {string} rbg as hex\r\n */\r\nfunction rgb2hex(rgb) {\r\n var rgb1 = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\r\n return (\"#\" + _hex(rgb1[1]) + _hex(rgb1[2]) + _hex(rgb1[3])).toUpperCase();\r\n}\r\nexports.rgb2hex = rgb2hex;\r\nnm.rgb2hex = rgb2hex;\r\n/**\r\n * Convert hex string to RGB or RGBA string\r\n * @param {string} hexString - hex color string\r\n * @param {number} [alphaVal=undefined] Alpha value\r\n * @returns {string} - rgb or rgba color\r\n */\r\nfunction hexAlphaToRgbOrRgba(hexString, alphaVal) {\r\n hexString = ((hexString.charAt(0) == \"#\") ? hexString.substring(1, 7) : hexString);\r\n var r = parseInt(hexString.substring(0, 2), 16).toString() || '0';\r\n var g = parseInt(hexString.substring(2, 4), 16).toString() || '0';\r\n var b = parseInt(hexString.substring(4, 6), 16).toString() || '0';\r\n if (alphaVal) {\r\n return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + alphaVal + \")\";\r\n }\r\n else {\r\n return \"rgba(\" + r + \",\" + g + \",\" + b + \")\";\r\n }\r\n}\r\nexports.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba;\r\nnm.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba;\r\n/**\r\n * adds alpha value to rgb string 'rgb(r, b, g)', returns 'rgba(r, g, b, a)'\r\n * @param {string} rgb - rgb color\r\n * @param {number} alpha - alpha value 0 to 1\r\n * @returns {string} rgba color\r\n */\r\nfunction rgbToRgba(rgb, alpha) {\r\n var pieces = rgb.split(',');\r\n pieces[0] = pieces[0].replace('rgb', 'rgba');\r\n pieces[2] = pieces[2].replace(')', '');\r\n pieces.push(' ' + alpha.toFixed(1) + ')');\r\n return pieces.join(',');\r\n}\r\nexports.rgbToRgba = rgbToRgba;\r\nnm.rgbToRgba = rgbToRgba;\r\n/**\r\n * @typedef {function} colorLookupByNumber\r\n * @param {number} num - the number to use to retrieve the color\r\n * @returns {string} rgb color\r\n */\r\n/**\r\n * Make a blue green red gradient\r\n * @param {number} minVal - minimum value\r\n * @param {number} maxVal - maximum value\r\n * @param {boolean} flipColors - if the colors should be flipped\r\n * @returns {colorLookupByNumber} color lookup function\r\n */\r\nfunction makeBlueGreenRedGradient(minVal, maxVal, flipColors) {\r\n if (flipColors === void 0) { flipColors = false; }\r\n if (typeof flipColors != \"boolean\") {\r\n flipColors = false;\r\n }\r\n return function (theVal) {\r\n var r, g, b;\r\n var ratio;\r\n if (chk.undefinedOrNull(theVal)) {\r\n return 'rgb(100,100,100)';\r\n }\r\n var percent = (theVal - minVal) / (maxVal - minVal);\r\n if (flipColors == true) {\r\n percent = 1 - percent;\r\n }\r\n if (percent >= 1) {\r\n r = 255;\r\n g = 0;\r\n b = 0;\r\n }\r\n else if (percent <= 0) {\r\n r = 0;\r\n g = 0;\r\n b = 255;\r\n }\r\n else if (percent < .25) {\r\n // green up, blue constant\r\n r = 0;\r\n g = Math.floor(255 * percent / 0.25);\r\n b = 255;\r\n }\r\n else if (percent < 0.50) {\r\n //blue down, green constant\r\n ratio = (percent - 0.25) / 0.25;\r\n r = 0;\r\n g = 255;\r\n b = 255 - Math.floor(255 * ratio);\r\n }\r\n else if (percent < 0.75) {\r\n // red up, green constant\r\n ratio = (percent - 0.5) / 0.25;\r\n r = Math.floor(255 * ratio);\r\n g = 255;\r\n b = 0;\r\n }\r\n else {\r\n // green down, red constant\r\n ratio = (percent - 0.75) / 0.25;\r\n r = 255;\r\n g = 255 - Math.floor(255 * ratio);\r\n b = 0;\r\n }\r\n r = r.toFixed();\r\n g = g.toFixed();\r\n b = b.toFixed();\r\n return 'rgb(' + r + ',' + g + ',' + b + ')';\r\n };\r\n}\r\nexports.makeBlueGreenRedGradient = makeBlueGreenRedGradient;\r\nnm.makeBlueGreenRedGradient = makeBlueGreenRedGradient;\r\n/**\r\n * Create a function that will return colors based on a gradient\r\n * @param {number} median - median value\r\n * @param {number} stdDev - standard deviation\r\n * @param {boolean} flipColors - if the colors should be flipped\r\n * @returns {colorLookupByNumber} color lookup function\r\n */\r\nfunction makeBlueGreenRedGradientZScore(median, stdDev, flipColors) {\r\n if (flipColors === void 0) { flipColors = false; }\r\n var grd = makeBlueGreenRedGradient(-2.5, 2.5, flipColors);\r\n return function (theVal) {\r\n var zScore;\r\n if (theVal == null) {\r\n zScore = null;\r\n }\r\n else {\r\n zScore = (theVal - median) / stdDev;\r\n }\r\n return grd(zScore);\r\n };\r\n}\r\nexports.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore;\r\nnm.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore;\r\n\n\n/***/ }),\n/* 68 */,\n/* 69 */,\n/* 70 */,\n/* 71 */,\n/* 72 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar ItsLayerCollection_1 = __webpack_require__(55);\r\nvar LayerLegend_1 = __webpack_require__(46);\r\nvar quickMap_1 = __webpack_require__(6);\r\nvar map = quickMap_1.default({ addGeocode: true });\r\nwindow['map'] = map;\r\nvar itsLayerCollection = new ItsLayerCollection_1.default(map);\r\nvar layerArray = [\r\n {\r\n groupName: 'ITS Inventory Layers',\r\n collapse: false,\r\n addCheck: true,\r\n items: itsLayerCollection.layers\r\n }\r\n];\r\nvar legend = new LayerLegend_1.default(layerArray, 'legend-container', {});\r\nconsole.log('it works');\r\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// itsMap.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 72);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 99693f14fcb3e83c98ca","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (f, l) => {\r\n if (hit) {\r\n return;\r\n }\r\n\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == l){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////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IQwmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWlud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OOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","import {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport mapMove from '../olHelpers/mapMove';\r\nimport MapMoveCls from '../olHelpers/mapMoveCls'\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\nexport interface makeMapMoveParams {\r\n /**\r\n *\r\n * @param lyr\r\n * @param extent\r\n * @param zoomLevel\r\n */\r\n (lyr: LayerBaseVector, extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel?: number): any\r\n}\r\n\r\n\r\n\r\nexport interface LayerBaseVectorOptions extends LayerBaseOptions{\r\n autoLoad?: boolean;\r\n style?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n onDemand?: boolean;\r\n onDemandDelay?: number;\r\n mapMoveMakeGetParams?: makeMapMoveParams;\r\n mapMoveObj?: MapMoveCls;\r\n renderOrder?: (a: ol.Feature, b: ol.Feature) => number;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nexport class LayerBaseVector extends LayerBase {\r\n _olLayer: ol.layer.Vector;\r\n _source: ol.source.Vector;\r\n _style: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n _autoLoad: boolean;\r\n _onDemand: boolean;\r\n _onDemandDelay: number;\r\n _mapMoveMakeGetParams: makeMapMoveParams;\r\n _mapMoveParams: any;\r\n _mapMove: MapMoveCls;\r\n _projectionMap: ol.proj.Projection;\r\n _projection4326: ol.proj.Projection;\r\n\r\n\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n constructor(url: string, options: LayerBaseVectorOptions = {}) {\r\n super(url, options);\r\n\r\n options = options as LayerBaseVectorOptions;\r\n\r\n //prevent regular load if no url has been provided\r\n if (this.url.trim() == '') {\r\n this._loaded = true;\r\n }\r\n\r\n this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\r\n if (this.visible) {\r\n this._autoLoad = true;\r\n } else {\r\n this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n\r\n this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\r\n if (options.mapMoveObj) {\r\n this._mapMove = options.mapMoveObj;\r\n } else {\r\n this._mapMove = this._onDemand ? mapMove : undefined;\r\n }\r\n\r\n\r\n this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () {return {};};\r\n\r\n if (this._onDemand) {\r\n this._loaded = true;\r\n this._mapMoveParams = {};\r\n this._mapMove.checkInit();\r\n this._mapMove.addVectorLayer(this);\r\n }\r\n\r\n this._source = new ol.source.Vector();\r\n\r\n\r\n this._olLayer = new ol.layer.Vector(\r\n {\r\n source: this._source,\r\n visible: this.visible,\r\n style: this.style,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution,\r\n renderOrder: options.renderOrder\r\n }\r\n );\r\n\r\n this.olLayer.setZIndex(this._zIndex);\r\n\r\n this._projectionMap = null;\r\n this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\r\n this._olLayer.setOpacity(this.opacity)\r\n }\r\n\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n addFeatures(featureCollection: Object) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n return this.visible;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * clear features in the layer\r\n */\r\n clear() {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get onDemandDelay(): number {\r\n return this._onDemandDelay;\r\n }\r\n\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get autoLoad(): boolean {\r\n return this._autoLoad;\r\n }\r\n\r\n /**\r\n * get the style definition\r\n */\r\n get style(): ol.StyleFunction|Array<ol.style.Style>|ol.style.Style {\r\n return this._style;\r\n }\r\n\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set style(style: ol.StyleFunction|Array<ol.style.Style>|ol.style.Style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style as ol.style.Style);\r\n }\r\n\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get mapCrs(): string {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n }\r\n\r\n get mapProj(): ol.proj.Projection{\r\n if (this._projectionMap != null){\r\n return this._projectionMap;\r\n }\r\n\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get mapMove(): MapMoveCls {\r\n return this._mapMove;\r\n }\r\n\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get mapMoveParams() {\r\n return this._mapMoveParams;\r\n }\r\n\r\n get visible(): boolean{\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set visible(visibility) {\r\n super.setVisible(visibility);\r\n\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n }\r\n\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get source(): ol.source.Vector {\r\n return this.getSource() as ol.source.Vector;\r\n }\r\n\r\n /**\r\n * array of ol features\r\n */\r\n get features(): Array<ol.Feature> {\r\n return this.source.getFeatures();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n get olLayer(): ol.layer.Vector {\r\n return super.getOlLayer() as ol.layer.Vector;\r\n }\r\n\r\n protected setZIndex(newZ: number) {\r\n this.olLayer.setZIndex(newZ);\r\n }\r\n}\r\n\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexport default LayerBaseVector;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVector.ts","/**\r\n * Created by gavorhes on 12/16/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport mapMove from '../olHelpers/mapMove';\r\n\r\nlet nm = provide('collections');\r\nimport $ = require('jquery');\r\nimport {LayerBase} from \"../layers\";\r\n\r\nexport interface iLegendItem{\r\n groupName: string;\r\n collapse?: boolean;\r\n addCheck?: boolean;\r\n items: Array<iLegendItem|LayerBase>\r\n}\r\n\r\nexport interface iLegendOptions{\r\n layerDivClasses?: string[]\r\n legendTitle?: string\r\n scaleDependent?: boolean\r\n}\r\n\r\nclass LayerGroup {\r\n groupLayers: any;\r\n groupLayersLookup: any;\r\n groupGroupsLookup: any;\r\n groupGroups: any;\r\n itemIdArray: any;\r\n groupId: any;\r\n groupName: any;\r\n allLayerArray: any;\r\n parent: any;\r\n allGroupArray: any;\r\n allGroupLookup: any;\r\n allLayerLookup: any;\r\n collapse: boolean;\r\n addCheck: boolean;\r\n layerParentLookup: any;\r\n\r\n /**\r\n *\r\n * @param {object} [groupConfig={}] - group configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n * @param {LayerGroup} [parent=undefined] - the parent group\r\n */\r\n constructor(groupConfig?: iLegendItem, parent?: LayerGroup) {\r\n this.groupLayers = [];\r\n this.groupLayersLookup = {};\r\n this.groupGroups = [];\r\n this.groupGroupsLookup = {};\r\n this.itemIdArray = [];\r\n\r\n if (typeof groupConfig == 'undefined') {\r\n this.parent = null;\r\n this.groupId = 'root';\r\n this.groupName = 'root';\r\n this.allGroupLookup = {root: this};\r\n this.allGroupArray = [this];\r\n this.allLayerArray = [];\r\n this.allLayerLookup = {};\r\n this.layerParentLookup = {};\r\n this.collapse = false;\r\n this.addCheck = false;\r\n } else {\r\n this.groupId = makeGuid();\r\n this.parent = parent;\r\n this.groupName = groupConfig.groupName;\r\n this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {object} groupConfig - configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n * @param {Array<LayerGroup>} parents parent groups\r\n * @returns {LayerGroup} the layer group just added\r\n */\r\n addGroup(groupConfig: iLegendItem, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n let newGroup = new LayerGroup(groupConfig, parentGroup);\r\n this.allGroupLookup[newGroup.groupId] = newGroup;\r\n this.allGroupArray.push(newGroup);\r\n\r\n parentGroup.groupGroups.push(newGroup);\r\n parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n\r\n if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n console.log(newGroup.groupId);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newGroup.groupId);\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase} newLayer the layer to be added\r\n * @param {Array} parents array\r\n */\r\n addLegendLayer(newLayer: LayerBase, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n this.allLayerLookup[newLayer.id] = newLayer;\r\n this.allLayerArray.push(newLayer);\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n\r\n parentGroup.groupLayers.push(newLayer);\r\n parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n console.log(newLayer.id);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newLayer.id);\r\n\r\n this.layerParentLookup[newLayer.id] = parentGroup;\r\n\r\n }\r\n\r\n\r\n\r\n getLegendHtml(legendId: string, options: iLegendOptions) {\r\n\r\n\r\n let legendHtml = `<ul id=\"${legendId}\" class=\"legend-container\">`;\r\n\r\n legendHtml += `<li>${options.legendTitle}<input type=\"checkbox\" checked id=\"suppress-by-extent-${legendId}\" class=\"suppress-by-extent\">` +\r\n `<label title=\"Suppress layers not visible at this zoom level\" for=\"suppress-by-extent-${legendId}\">` +\r\n `<span></span>` +\r\n `</label></li>`;\r\n\r\n legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n\r\n return legendHtml;\r\n }\r\n\r\n /**\r\n * @param {Array} itemIds the items to process\r\n * @param {LayerGroup} theGroup new group\r\n * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n * @static\r\n * @returns {string} html string\r\n */\r\n _buildLegend(itemIds: string[], theGroup: LayerGroup, layerDivClasses: string[]): string {\r\n\r\n if (itemIds.length == 0) {\r\n return '';\r\n }\r\n\r\n let theHml = '';\r\n\r\n let itemId = itemIds[0];\r\n\r\n if (theGroup.groupLayersLookup[itemId]) {\r\n\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let lyr = theGroup.groupLayersLookup[itemId];\r\n theHml += `<li id=\"${lyr.id}-layer-li\" class=\"legend-layer-li ${layerDivClasses.join(' ')}\">` + lyr.getLegendDiv() + '</li>';\r\n\r\n\r\n } else if (theGroup.groupGroupsLookup[itemId]) {\r\n /**\r\n * type {LayerGroup}\r\n */\r\n let otherGroup = theGroup.groupGroupsLookup[itemId];\r\n\r\n theHml += `<li>`;\r\n theHml += `<div id=\"${otherGroup.groupId}-legend-layer-div\" ` +\r\n `class=\"legend-layer-group ${layerDivClasses.join(' ')}\">`;\r\n\r\n if (otherGroup.addCheck) {\r\n theHml += `<input type=\"checkbox\" checked id=\"${otherGroup.groupId}-group-chck\">` +\r\n `<label for=\"${otherGroup.groupId}-group-chck\" title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n } else {\r\n theHml += `<label title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n }\r\n\r\n theHml += `<span title=\"Expand/Collapse\" class=\"layer-group-expander`;\r\n theHml += `${otherGroup.collapse ? ' legend-layer-group-initial-collapse' : ''}\">`;\r\n theHml += otherGroup.collapse ? '▶' : '▼';\r\n theHml += '</span>';\r\n\r\n //parents.push(groupId);\r\n theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n theHml += '</div>';\r\n theHml += '</li>';\r\n }\r\n\r\n return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n }\r\n}\r\n\r\n\r\n/**\r\n * a wrapper to make a legend\r\n */\r\nexport class LayerLegend {\r\n\r\n $divElement: JQuery;\r\n _legendItems: Array<iLegendItem|LayerBase>;\r\n layerGroup: any;\r\n legendId: string;\r\n\r\n /**``\r\n *\r\n * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n * @param {string} divId the div where the legend should be added\r\n * @param {object} options for legend\r\n * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n * @param {string} [options.legendTitle=Legend] the legend title\r\n * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n */\r\n constructor(legendItems: Array<iLegendItem|LayerBase>, divId: string, options: iLegendOptions = {}) {\r\n for (let i of legendItems) {\r\n if (typeof i == 'undefined') {\r\n throw 'undefined item passed in array to legend constructor';\r\n }\r\n }\r\n\r\n options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n options.layerDivClasses = options.layerDivClasses || [];\r\n\r\n // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n }\r\n\r\n this.$divElement = $('#' + divId);\r\n\r\n this._legendItems = legendItems;\r\n\r\n this.layerGroup = new LayerGroup();\r\n\r\n this._buildTree(legendItems);\r\n\r\n this.legendId = makeGuid();\r\n\r\n this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n\r\n for (let l of this.layerGroup.allLayerArray){\r\n l.applyCollapse();\r\n }\r\n\r\n let _this = this;\r\n //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n\r\n mapMove.addCallback(function (ext, zoom, evt) {\r\n\r\n if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n for (let lyr of this.layerGroup.allLayerArray) {\r\n let $lyrLi = $('#' + lyr.id + '-layer-li');\r\n if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n $lyrLi.addClass('layer-not-visible');\r\n } else {\r\n $lyrLi.removeClass('layer-not-visible');\r\n }\r\n }\r\n }\r\n }, this, 100, true, 'legend1');\r\n }\r\n\r\n // <editor-fold desc=\"add event listeners\">\r\n\r\n this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n let legendLayerLis = $('.legend-layer-li');\r\n if (this.checked) {\r\n legendLayerLis.removeClass('layer-force-show');\r\n } else {\r\n legendLayerLis.addClass('layer-force-show');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-check').change(function () {\r\n let lyrId = this.id.replace('-legend-layer-check', '');\r\n _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n });\r\n\r\n this.$divElement.find('.layer-group-expander').click(function () {\r\n let $this = $(this);\r\n $this.removeClass('legend-layer-group-initial-collapse');\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')){\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n // </editor-fold>\r\n }\r\n\r\n\r\n /**\r\n * @param {Array} [legendItems=this._layerConfig] the legend items\r\n * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n * @private\r\n */\r\n _buildTree(legendItems: Array<iLegendItem|LayerBase>, parents?: string[]) {\r\n\r\n if (legendItems.length == 0) {\r\n return;\r\n }\r\n\r\n let oneItem = legendItems[0];\r\n\r\n //reset the parent if the item is in the base array\r\n if ((this._legendItems as Array<any>).indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n parents = [];\r\n }\r\n\r\n if (typeof (oneItem as iLegendItem).groupName !== 'undefined') {\r\n let groupItem = legendItems[0];\r\n let newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n parents.push(newGroup.groupId);\r\n this._buildTree((oneItem as iLegendItem).items, parents);\r\n } else {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let layerItem: LayerBase = legendItems[0] as LayerBase;\r\n\r\n this.layerGroup.addLegendLayer(layerItem, parents);\r\n }\r\n\r\n this._buildTree(legendItems.slice(1), parents);\r\n }\r\n}\r\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport {proj3857} from \"../olHelpers/projections\";\r\n\r\nlet nm = provide('layers');\r\n\r\nexport interface crsTransform {\r\n dataProjection?: ol.proj.Projection;\r\n featureProjection?: ol.proj.Projection;\r\n}\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions {\r\n transform?: crsTransform;\r\n mapMoveObj?: MapMoveCls;\r\n}\r\n\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorGeoJson extends LayerBaseVector {\r\n _geoJsonFormat: ol.format.GeoJSON;\r\n _transform: crsTransform;\r\n\r\n /**\r\n * @param {string|null} url - resource url, set to '' to make blank layer\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n *\r\n * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n */\r\n constructor(url?: string, options: LayerBaseVectorGeoJsonOptions = {}) {\r\n url = typeof url == 'string' ? url : '';\r\n super(url, options);\r\n\r\n this._geoJsonFormat = new ol.format.GeoJSON();\r\n\r\n this._transform = options.transform || {};\r\n this._transform.dataProjection = this._transform.dataProjection || proj.proj4326;\r\n this._transform.featureProjection = this._transform.featureProjection || proj3857;\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n }\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - as geojson object\r\n */\r\n addFeatures(featureCollection: any) {\r\n this.source.addFeatures(\r\n this._geoJsonFormat.readFeatures(featureCollection,\r\n {dataProjection: this._transform.dataProjection,\r\n featureProjection: this._transform.featureProjection}\r\n )\r\n );\r\n }\r\n\r\n\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n\r\n if (super._load()) {\r\n return true;\r\n }\r\n\r\n $.get(this._url,\r\n this._params,\r\n (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(\r\n function () {\r\n this._loaded = false;\r\n }\r\n );\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d the json response\r\n * @override\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this._source.addFeatures(this._geoJsonFormat.readFeatures(d,\r\n {featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection}));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexport default LayerBaseVectorGeoJson;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVectorGeoJson.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport * as colors from '../util/colors';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport LayerItsInventory from \"../layers/LayerItsInventory\";\r\nlet nm = provide('collections');\r\n\r\n\r\nlet itsConfig = [\r\n {\r\n name: 'Camera',\r\n itsType: 'cctv',\r\n minZoom: 11,\r\n itsIconConfig: {\r\n prop: 'owner',\r\n defaultName: 'WisDOT',\r\n defaultIcon: 'cctv.png',\r\n iconArray: [\r\n ['City of Madison', 'Madison', 'cctv-mad.png']\r\n ]\r\n }\r\n },\r\n {\r\n name: 'Message Signs',\r\n itsType: 'DMS',\r\n minZoom: 11,\r\n itsIconConfig: {\r\n prop: 'dmsType',\r\n defaultName: 'DMS',\r\n defaultIcon: 'dms.png',\r\n iconArray: [\r\n ['pcms', 'PCMS', 'pcms.png']\r\n ]\r\n }\r\n },\r\n {name: 'ATR', itsType: 'atr', minZoom: 8, itsIcon: 'atr.png', visible: false},\r\n {name: 'Lighting', itsType: 'light', minZoom: 16, itsIcon: 'streetlight.png', visible: false, onDemand: true},\r\n {name: 'Bluetooth', itsType: 'blue', minZoom: 10, itsIcon: 'bluetooth.png', visible: false},\r\n {name: 'Cabinets', itsType: 'cabinet', minZoom: 10, itsIcon: 'cabinet.png', visible: false},\r\n {name: 'Hut', itsType: 'hut', minZoom: 10, itsIcon: 'hut.png', visible: false},\r\n {name: 'Vault', itsType: 'vault', minZoom: 13, itsIcon: 'vault.png', visible: false},\r\n {name: 'Advisory Radio', itsType: 'har', minZoom: 10, itsIcon: 'har.png', visible: false},\r\n {\r\n name: 'Loop Detectors',\r\n itsType: 'loop',\r\n legendCollapse: true,\r\n minZoom: 14,\r\n visible: false,\r\n itsIconConfig: {\r\n prop: 'dtctrType',\r\n defaultName: 'Other',\r\n defaultIcon: 'loopdetectorother.png',\r\n iconArray: [\r\n ['detector', 'Detector', 'loopdetector.png'],\r\n ['long', 'Long', 'loopdetectorlong.png'],\r\n ['zone', 'Zone', 'loopdetectorzone.png']\r\n ]\r\n },\r\n onDemand: true\r\n },\r\n {name: 'Microwave', itsType: 'microwave', minZoom: 14, itsIcon: 'microwave.png', visible: false},\r\n {name: 'Pull Box', itsType: 'pull', minZoom: 14, itsIcon: 'pullbox.png', visible: false, onDemand: true},\r\n {name: 'RWIS', itsType: 'rwis', minZoom: 7, itsIcon: 'rwis.png', visible: false},\r\n {name: 'Ramp Gates', itsType: 'gate', minZoom: 10, itsIcon: 'rampgate.png', visible: false},\r\n {name: 'Ramp Meter', itsType: 'meter', minZoom: 10, itsIcon: 'rampmeter.png', visible: false},\r\n {name: 'Signal', itsType: 'signal', minZoom: 13, itsIcon: 'signal.png', visible: false, onDemand: true},\r\n {name: 'Tower', itsType: 'tower', minZoom: 10, itsIcon: 'tower.png', visible: false},\r\n {\r\n name: 'Trench',\r\n itsType: 'trench',\r\n onDemand: true,\r\n visible: false,\r\n onDemandDelay: 500,\r\n minZoom: 15,\r\n legendCollapse: true,\r\n itsLineConfig: {\r\n prop: 'owner',\r\n defaultName: 'Other',\r\n //defaultWidth: 7,\r\n defaultColor: colors.hexAlphaToRgbOrRgba('#747474', 0.8),\r\n lineArray: [\r\n ['WisDOT', 'WisDOT', colors.hexAlphaToRgbOrRgba('#FF032F', 0.7)],\r\n ['WIN', 'WIN', colors.hexAlphaToRgbOrRgba('#FFC632', 0.7)],\r\n ['USXchange', 'USXchange', colors.hexAlphaToRgbOrRgba('#2DFF46', 0.7)],\r\n ['AT&T', 'AT&T', colors.hexAlphaToRgbOrRgba('#ff2be5', 0.7)],\r\n ['Touch America', 'Touch America', colors.hexAlphaToRgbOrRgba('#52f3ff', 0.7)],\r\n ['Qwest', 'Qwest', colors.hexAlphaToRgbOrRgba('#9278ff', 0.7)],\r\n ['McLeodUSA', 'McLeodUSA', colors.hexAlphaToRgbOrRgba('#2926FF', 0.7)],\r\n ['CINC', 'CINC', colors.hexAlphaToRgbOrRgba('#CB00FF', 0.7)],\r\n ['City of Madison', 'Madison', colors.hexAlphaToRgbOrRgba('#000380', 0.7)]\r\n ]\r\n }\r\n }\r\n];\r\n\r\n\r\nexport class ItsLayerCollection {\r\n _map: ol.Map;\r\n _layers: Array<LayerItsInventory>;\r\n\r\n\r\n /**\r\n * Create a collection of all ITS layers\r\n * @param {ol.Map} theMap the openlayers map\r\n * @param {Array} [exclude=[]] array of Its layer identifiers to exclude\r\n *\r\n * BLUE Bluetooth Detector - Bluetooth Detector\r\n * CABINET Cabinets - The cabinets\r\n * CCTV Camera - Traffic Cameras\r\n * HUT Communication Hut - Communication Hut\r\n * VAULT Communication Vault - The communication vaults\r\n * HAR Highway Advisory Radio - Advisory Radios\r\n * LIGHT Lighting - Lighting\r\n * LOOP Loop Detectors - Loop Detectors\r\n * DMS Message Board - Message Boards and Signs\r\n * MICROWAVE Microwave Detector - Microwave Detectors\r\n * PULL Pull Box - A pull box\r\n * RWIS RWIS - Road weather information system\r\n * GATE Ramp Gate - The ramp Gates\r\n * METER Ramp Meter - The ramp meters\r\n * SIGNAL Signal - Traffic Signal\r\n * TOWER Tower - The towers\r\n * TRENCH\r\n */\r\n constructor(theMap: ol.Map, exclude?: Array<string>) {\r\n\r\n this._map = theMap;\r\n this._layers = [];\r\n\r\n exclude = typeof exclude == 'object' ? exclude : [];\r\n\r\n for (let i = 0; i < itsConfig.length; i++) {\r\n let lyrConfig = itsConfig[i];\r\n let addLayer = true;\r\n\r\n for (let j = 0; j < exclude.length; j++) {\r\n if (exclude[j] == lyrConfig.itsType) {\r\n addLayer = false;\r\n break;\r\n }\r\n }\r\n\r\n if (addLayer) {\r\n let inventLyr = new LayerItsInventory(lyrConfig);\r\n this._map.addLayer(inventLyr.olLayer);\r\n this._layers.push(inventLyr);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Return the array of layers in this collection\r\n * @returns {Array<LayerItsInventory>} an array of layers\r\n */\r\n get layers(): LayerItsInventory[] {\r\n return this._layers;\r\n }\r\n\r\n}\r\n\r\nnm.ItsLayerCollection = ItsLayerCollection;\r\nexport default ItsLayerCollection;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/ItsLayerCollection.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\n\r\nimport {LayerBaseVectorGeoJson, LayerBaseVectorGeoJsonOptions} from './LayerBaseVectorGeoJson';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {proj4326, proj3857} from '../olHelpers/projections'\r\n\r\nlet nm = provide('layers');\r\n\r\n\r\nexport interface iLineStyle {\r\n color: string;\r\n width?: number\r\n}\r\n\r\nexport interface iMultiConfig {\r\n prop: string;\r\n defaultName: string;\r\n}\r\n\r\nexport interface iIconConfig extends iMultiConfig {\r\n defaultIcon: string;\r\n iconArray: string[][]\r\n}\r\n\r\nexport interface iLineConfig extends iMultiConfig {\r\n defaultColor: string;\r\n defaultWidth?: number;\r\n lineArray: any[][]\r\n}\r\n\r\nexport interface iLayerItsInventory extends LayerBaseVectorGeoJsonOptions {\r\n itsType: string;\r\n addPopup?: boolean;\r\n itsIcon?: string;\r\n itsLineStyle?: iLineStyle;\r\n itsIconConfig?: iIconConfig;\r\n itsLineConfig?: iLineConfig\r\n}\r\n\r\n\r\n\r\n\r\nfunction checkStyleNumber(itsIcon: string, itsLineStyle: iLineStyle, itsIconConfig: iIconConfig, itsLineConfig: iLineConfig) {\r\n \"use strict\";\r\n\r\n //make sure one and only one configuration is defined;\r\n let configCount = 0;\r\n if (typeof itsIcon == 'string') {\r\n configCount++;\r\n }\r\n\r\n if (typeof itsLineStyle == 'object') {\r\n itsLineStyle.width = typeof itsLineStyle.width == 'number' ? itsLineStyle.width : 5;\r\n itsLineStyle.color = typeof itsLineStyle.color == 'string' ? itsLineStyle.color : 'red';\r\n configCount++;\r\n }\r\n\r\n if (typeof itsIconConfig == 'object') {\r\n itsIconConfig.defaultName = itsIconConfig.defaultName || 'Other';\r\n\r\n if (typeof itsIconConfig.iconArray == 'undefined') {\r\n itsIconConfig.iconArray = [];\r\n }\r\n\r\n configCount++;\r\n }\r\n\r\n if (typeof itsLineConfig == 'object') {\r\n itsLineConfig.defaultName = itsLineConfig.defaultName || 'Other';\r\n itsLineConfig.defaultWidth = itsLineConfig.defaultWidth || 5;\r\n itsLineConfig.defaultColor = itsLineConfig.defaultColor || 'red';\r\n\r\n\r\n if (typeof itsLineConfig.lineArray == 'undefined') {\r\n itsLineConfig.lineArray = [];\r\n }\r\n\r\n // set the width if not defined\r\n for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n if (itsLineConfig.lineArray[i].length == 3) {\r\n itsLineConfig.lineArray[i].push(5);\r\n }\r\n }\r\n\r\n configCount++;\r\n }\r\n\r\n if (configCount > 1) {\r\n throw 'Only one style config can be defined';\r\n }\r\n}\r\n\r\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [itsLineStyle=undefined] A single line style\r\n * @param {string} itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n * @returns {*} undefined, style, or style function\r\n */\r\nfunction defineStyle(itsIcon: string, itsLineStyle: iLineStyle, itsIconConfig: iIconConfig, itsLineConfig: iLineConfig): ol.style.Style | Array<ol.style.Style> | ol.StyleFunction {\r\n \"use strict\";\r\n checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n let _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n if (itsIcon) {\r\n return new ol.style.Style({\r\n image: new ol.style.Icon(\r\n {\r\n src: _iconUrlRoot + itsIcon,\r\n crossOrigin: 'anonymous'\r\n }\r\n )\r\n });\r\n } else if (itsLineStyle) {\r\n return new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: itsLineStyle.color,\r\n width: itsLineStyle.width\r\n })\r\n });\r\n } else if (itsIconConfig) {\r\n return function (feature: ol.Feature) {\r\n let symbolProp = feature.getProperties()[itsIconConfig.prop];\r\n let iconUrl = _iconUrlRoot + itsIconConfig.defaultIcon;\r\n\r\n for (let i = 0; i < itsIconConfig.iconArray.length; i++) {\r\n let thisProp = itsIconConfig.iconArray[i];\r\n\r\n if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n iconUrl = _iconUrlRoot + thisProp[2];\r\n break;\r\n }\r\n }\r\n\r\n return [new ol.style.Style({\r\n image: new ol.style.Icon(\r\n {\r\n src: iconUrl,\r\n crossOrigin: 'anonymous'\r\n }\r\n )\r\n })];\r\n };\r\n } else if (itsLineConfig) {\r\n return function (feature: ol.Feature) {\r\n let symbolProp = feature.getProperties()[itsLineConfig.prop];\r\n let colr = itsLineConfig.defaultColor || 'red';\r\n let width = itsLineConfig.defaultWidth || 5;\r\n\r\n for (let i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n let thisProp = itsLineConfig.lineArray[i];\r\n\r\n if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n colr = thisProp[2];\r\n width = thisProp[3];\r\n break;\r\n }\r\n }\r\n\r\n return [new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: colr,\r\n width: width\r\n })\r\n })];\r\n };\r\n } else {\r\n return undefined;\r\n }\r\n}\r\n\r\nfunction defineLegend(itsIcon: string, itsLineStyle: iLineStyle, itsIconConfig: iIconConfig, itsLineConfig: iLineConfig) {\r\n \"use strict\";\r\n\r\n let iconHeight = 17;\r\n\r\n checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\r\n let _iconUrlRoot = 'https://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\r\n if (itsIcon) {\r\n return `<img src=\"${_iconUrlRoot + itsIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n } else if (itsLineStyle) {\r\n return `<hr style=\"height: ${itsLineStyle.width}px; background-color: ${itsLineStyle.color}\">`;\r\n } else if (itsIconConfig) {\r\n let outHtml = '';\r\n outHtml += '<ul>';\r\n\r\n for (let a of itsIconConfig.iconArray) {\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${a[1]}</span><img src=\"${_iconUrlRoot + a[2]}\" class=\"legend-layer-icon\" height=\"${iconHeight}\">`;\r\n }\r\n\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${itsIconConfig.defaultName}</span>` +\r\n `<img src=\"${_iconUrlRoot + itsIconConfig.defaultIcon}\" class=\"legend-layer-icon\" height=\"${iconHeight}\"></li>`;\r\n\r\n outHtml += '</ul>';\r\n\r\n return outHtml;\r\n } else if (itsLineConfig) {\r\n let outHtml = '';\r\n outHtml += '<ul>';\r\n for (let ls of itsLineConfig.lineArray) {\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${ls[1]}</span>` +\r\n `<hr style=\"height: ${ls[3]}px; background-color: ${ls[2]}\">`;\r\n }\r\n outHtml += `<li><span class=\"legend-layer-subitem\">${itsLineConfig.defaultName}</span>` +\r\n `<hr style=\"height: ${itsLineConfig.defaultWidth}px; background-color: ${itsLineConfig.defaultColor}\"></li>`;\r\n outHtml += '</ul>';\r\n\r\n return outHtml;\r\n } else {\r\n return '';\r\n }\r\n}\r\n\r\n\r\n/**\r\n * Its Layer class\r\n * @augments LayerBaseVectorGeoJson\r\n */\r\nexport class LayerItsInventory extends LayerBaseVectorGeoJson {\r\n\r\n /**\r\n * ITS device layer, types available at https://transportal.cee.wisc.edu/its/inventory/\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object|*} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n * @param {string} options.itsType the ITS device type, use the url flag at https://transportal.cee.wisc.edu/its/inventory/\r\n * @param {boolean} [options.addPopup=true] if the popup should be added automatically\r\n *\r\n * @param {string} [options.itsIcon=undefined] the ITS device type icon image see https://transportal.cee.wisc.edu/its/inventory/icons/\r\n *\r\n * @param {object} [options.itsLineStyle=undefined] A single line style\r\n * @param {string} options.itsLineStyle.color the line color as rgb or hex\r\n * @param {number} [options.itsLineStyle.width=5] the line width\r\n *\r\n * @param {object} [options.itsIconConfig=undefined] The icon subtype configuration\r\n * @param {string} options.itsIconConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} options.itsIconConfig.defaultName The default name to be used if no other match is found\r\n * @param {string} options.itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n * @param {object} [options.itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n *\r\n * @param {object} [options.itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n * @param {string} options.itsLineConfig.prop The property used to define icon attribute symbolization\r\n * @param {string} [options.itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n * @param {string} [options.itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n * @param {number} [options.itsLineConfig.defaultWidth] The default line width to be used for no other matches\r\n * @param {object} [options.itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width = 5]\r\n */\r\n constructor(options: iLayerItsInventory) {\r\n if (typeof options.itsType !== 'string') {\r\n throw 'its type must be defined';\r\n }\r\n\r\n options.transform = {dataProjection: proj4326, featureProjection: proj3857};\r\n\r\n let addToLegend = '';\r\n\r\n // define a style with the helper function if it is not explicitly defined\r\n if (typeof options.style == 'undefined') {\r\n options.style = defineStyle(\r\n options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n );\r\n addToLegend = defineLegend(\r\n options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig\r\n );\r\n }\r\n\r\n options.params = typeof options.params == 'object' ? options.params : {};\r\n $.extend(options.params, {format: 'JSON', resource: options.itsType});\r\n\r\n super('https://transportal.cee.wisc.edu/its/inventory/', options);\r\n\r\n //add any additional content to the legend\r\n this.addLegendContent(addToLegend);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : true;\r\n\r\n if (options.addPopup) {\r\n mapPopup.addVectorPopup(this, function (props: { featureGuid: string }) {\r\n return `<iframe src=\"https://transportal.cee.wisc.edu/its/inventory/?feature=${props.featureGuid}\" ` +\r\n `height=\"250\" width=\"350\"></iframe>`;\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @callback makeGetParams\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: { minX: number, minY: number, maxX: number, maxY: number }, zoomLevel: number) {\r\n super.mapMoveMakeGetParams(extent, zoomLevel);\r\n let lowerLeft = new ol.geom.Point([extent.minX, extent.minY]);\r\n lowerLeft.transform(this.mapProj, this._projection4326);\r\n let lowerLeftCoordinates = lowerLeft.getCoordinates();\r\n let upperRight = new ol.geom.Point([extent.maxX, extent.maxY]);\r\n upperRight.transform(this.mapProj, this._projection4326);\r\n let upperRightCoordinates = upperRight.getCoordinates();\r\n\r\n $.extend(this.mapMoveParams,\r\n {\r\n L: lowerLeftCoordinates[0],\r\n R: upperRightCoordinates[0],\r\n B: lowerLeftCoordinates[1],\r\n T: upperRightCoordinates[1]\r\n });\r\n }\r\n}\r\n\r\nnm.LayerItsInventory = LayerItsInventory;\r\nexport default LayerItsInventory;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerItsInventory.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\nimport provide from './provide';\r\nimport * as chk from './checkDefined';\r\n\r\nlet nm = provide('util.colors');\r\n\r\n\r\n/**\r\n * helper function to convert to hex\r\n * @param {number|string} x - the number to convert to hex\r\n * @returns {string} number as hex\r\n * @private\r\n */\r\nfunction _hex(x: number|string): string {\r\n let hexDigits = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\r\n if (isNaN(x as number)){\r\n return \"00\";\r\n } else {\r\n let m = x as number;\r\n return hexDigits[(m - m % 16) / 16] + hexDigits[m % 16];\r\n }\r\n // return isNaN(x as number) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\r\n}\r\n\r\n/**\r\n * converts an RGB string to hex\r\n * @param {string} rgb - rgb color\r\n * @returns {string} rbg as hex\r\n */\r\nexport function rgb2hex(rgb: string): string {\r\n let rgb1 = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\r\n\r\n return (\"#\" + _hex(rgb1[1]) + _hex(rgb1[2]) + _hex(rgb1[3])).toUpperCase();\r\n}\r\n\r\nnm.rgb2hex = rgb2hex;\r\n\r\n\r\n/**\r\n * Convert hex string to RGB or RGBA string\r\n * @param {string} hexString - hex color string\r\n * @param {number} [alphaVal=undefined] Alpha value\r\n * @returns {string} - rgb or rgba color\r\n */\r\nexport function hexAlphaToRgbOrRgba(hexString: string, alphaVal: number): string {\r\n hexString = ((hexString.charAt(0) == \"#\") ? hexString.substring(1, 7) : hexString);\r\n let r = parseInt(hexString.substring(0, 2), 16).toString() || '0';\r\n let g = parseInt(hexString.substring(2, 4), 16).toString() || '0';\r\n let b = parseInt(hexString.substring(4, 6), 16).toString() || '0';\r\n if (alphaVal) {\r\n return `rgba(${r},${g},${b},${alphaVal})`;\r\n } else {\r\n return `rgba(${r},${g},${b})`;\r\n }\r\n}\r\n\r\nnm.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba;\r\n\r\n\r\n/**\r\n * adds alpha value to rgb string 'rgb(r, b, g)', returns 'rgba(r, g, b, a)'\r\n * @param {string} rgb - rgb color\r\n * @param {number} alpha - alpha value 0 to 1\r\n * @returns {string} rgba color\r\n */\r\nexport function rgbToRgba(rgb: string, alpha: number): string {\r\n let pieces = rgb.split(',');\r\n pieces[0] = pieces[0].replace('rgb', 'rgba');\r\n pieces[2] = pieces[2].replace(')', '');\r\n pieces.push(' ' + alpha.toFixed(1) + ')');\r\n\r\n return pieces.join(',');\r\n}\r\n\r\nnm.rgbToRgba = rgbToRgba;\r\n\r\n\r\n/**\r\n * @typedef {function} colorLookupByNumber\r\n * @param {number} num - the number to use to retrieve the color\r\n * @returns {string} rgb color\r\n */\r\n\r\n\r\n/**\r\n * Make a blue green red gradient\r\n * @param {number} minVal - minimum value\r\n * @param {number} maxVal - maximum value\r\n * @param {boolean} flipColors - if the colors should be flipped\r\n * @returns {colorLookupByNumber} color lookup function\r\n */\r\nexport function makeBlueGreenRedGradient(minVal: number, maxVal: number, flipColors:boolean=false): (v: number) => string {\r\n\r\n if (typeof flipColors != \"boolean\") {\r\n flipColors = false;\r\n }\r\n\r\n return function (theVal: number): string {\r\n let r, g, b;\r\n let ratio;\r\n\r\n if (chk.undefinedOrNull(theVal)) {\r\n return 'rgb(100,100,100)';\r\n }\r\n\r\n let percent = (theVal - minVal) / (maxVal - minVal);\r\n\r\n if (flipColors == true) {\r\n percent = 1 - percent;\r\n }\r\n\r\n if (percent >= 1) {\r\n r = 255;\r\n g = 0;\r\n b = 0;\r\n } else if (percent <= 0) {\r\n r = 0;\r\n g = 0;\r\n b = 255;\r\n } else if (percent < .25) {\r\n // green up, blue constant\r\n r = 0;\r\n g = Math.floor(255 * percent / 0.25);\r\n b = 255;\r\n } else if (percent < 0.50) {\r\n //blue down, green constant\r\n ratio = (percent - 0.25) / 0.25;\r\n r = 0;\r\n g = 255;\r\n b = 255 - Math.floor(255 * ratio);\r\n } else if (percent < 0.75) {\r\n // red up, green constant\r\n ratio = (percent - 0.5) / 0.25;\r\n r = Math.floor(255 * ratio);\r\n g = 255;\r\n b = 0;\r\n } else {\r\n // green down, red constant\r\n ratio = (percent - 0.75) / 0.25;\r\n r = 255;\r\n g = 255 - Math.floor(255 * ratio);\r\n b = 0;\r\n }\r\n\r\n r = r.toFixed();\r\n g = g.toFixed();\r\n b = b.toFixed();\r\n\r\n return 'rgb(' + r + ',' + g + ',' + b + ')';\r\n };\r\n}\r\n\r\nnm.makeBlueGreenRedGradient = makeBlueGreenRedGradient;\r\n\r\n\r\n/**\r\n * Create a function that will return colors based on a gradient\r\n * @param {number} median - median value\r\n * @param {number} stdDev - standard deviation\r\n * @param {boolean} flipColors - if the colors should be flipped\r\n * @returns {colorLookupByNumber} color lookup function\r\n */\r\nexport function makeBlueGreenRedGradientZScore(median: number, stdDev: number, flipColors: boolean = false):(v: number) => string {\r\n\r\n let grd = makeBlueGreenRedGradient(-2.5, 2.5, flipColors);\r\n\r\n return function (theVal: number): string {\r\n\r\n let zScore;\r\n if (theVal == null) {\r\n zScore = null;\r\n } else {\r\n zScore = (theVal - median) / stdDev;\r\n }\r\n\r\n return grd(zScore);\r\n };\r\n}\r\n\r\nnm.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/colors.ts","/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\n\r\nimport ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\n\r\nlet map = quickMap({addGeocode: true});\r\n\r\n\r\nwindow['map'] = map;\r\n\r\nlet itsLayerCollection = new ItsLayerCollection(map);\r\n\r\nlet layerArray = [\r\n {\r\n groupName: 'ITS Inventory Layers',\r\n collapse: false,\r\n addCheck: true,\r\n items: itsLayerCollection.layers\r\n }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\nconsole.log('it works');\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/itsMap.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/mapPopup.js b/test/serve/js/mapPopup.js index 96fa9c3e20a64770f009c368e3bf83afdaaef16c..62d05221b2e323c42a62e5df76172df0502ac157 100644 --- a/test/serve/js/mapPopup.js +++ b/test/serve/js/mapPopup.js @@ -1,2260 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 74); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), - -/***/ 10: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var zoomResolutionConvert = __webpack_require__(17); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The base layer class - * @abstract - */ -var LayerBase = (function () { - /** - * The base layer for all others - * @param {string} url - url for source - * @param {object} options - config - * @param {string} [options.id=makeGuid()] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] - the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] - the z index for the layer - * @param {function} [options.loadCallback] - function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend - */ - function LayerBase(url, options) { - if (options === void 0) { options = {}; } - options = options || {}; - if (typeof url !== 'string') { - throw 'Invalid URL'; - } - this._url = url; - this._params = typeof options.params == 'object' ? options.params : {}; - this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false; - this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true; - this.id = options.id || makeGuid_1.default(); - this._name = options.name || 'Unnamed Layer'; - this.animate = false; - this._opacity = typeof options.opacity == 'number' ? options.opacity : 1; - if (this._opacity > 1) { - this._opacity = 1; - } - else if (this._opacity < 0) { - this._opacity = 0; - } - this._visible = typeof options.visible === 'boolean' ? options.visible : true; - this._source = undefined; - /** - * - * @protected - */ - this._olLayer = undefined; - this._loaded = false; - this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom); - if (typeof this._maxResolution !== 'undefined') { - this._maxResolution += 0.00001; - } - this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom); - this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined; - this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined; - this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0; - this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () { - }; - this._legendContent = ''; - if (this._legendCheckbox) { - this._legendContent += "<input type=\"checkbox\" " + (this.visible ? 'checked' : '') + " " + - ("class=\"legend-check\" id=\"" + this.id + "-legend-layer-check\"><span></span>"); - this._legendContent += "<label for=\"" + this.id + "-legend-layer-check\" class=\"legend-layer-name\">" + this.name + "</label>"; - } - else { - this._legendContent += "<label class=\"legend-layer-name\">" + this.name + "</label>"; - } - this._$legendDiv = null; - this._applyCollapseCalled = false; - this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined); - } - /** - * base load function, sets _loaded = true if it is not already - * @protected - * @returns {boolean} if already loaded - */ - LayerBase.prototype._load = function () { - if (this.loaded == true) { - return true; - } - else { - this._loaded = true; - return false; - } - }; - /** - * Get the legend html, be sure to only add to the DOM once - * @returns {string} html for layer wrapped in a div - */ - LayerBase.prototype.getLegendDiv = function () { - return "<div class=\"legend-layer-div\" id=\"" + this.id + "-legend-layer-div\">" + this._legendContent + "</div>"; - }; - /** - * - * @param additionalContent - additional content to add to legend - * @private - */ - LayerBase.prototype._addLegendContent = function (additionalContent) { - if (additionalContent === void 0) { additionalContent = ''; } - var addCollapse = additionalContent.indexOf('<ul>') > -1; - if (addCollapse) { - additionalContent = '<span class="legend-items-expander" title="Expand/Collapse">▼</span>' + additionalContent; - } - this._legendContent += additionalContent; - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - this._$legendDiv.append(additionalContent); - this.applyCollapse(); - } - }; - /** - * add additional content to the legend - * @param {string} [additionalContent=] - additonal content to add - */ - LayerBase.prototype.addLegendContent = function (additionalContent) { - this._addLegendContent(additionalContent); - }; - LayerBase.prototype.applyCollapse = function () { - if (this._applyCollapseCalled) { - console.log('collapse already applied'); - return undefined; - } - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - var $expander = this._$legendDiv.find('.legend-items-expander'); - if ($expander.length > 0) { - this._applyCollapseCalled = true; - $expander.click(function () { - var $this = $(this); - $this.siblings('ul').slideToggle(); - if ($this.hasClass('legend-layer-group-collapsed')) { - $this.removeClass('legend-layer-group-collapsed'); - $this.html('▼'); - } - else { - $this.addClass('legend-layer-group-collapsed'); - $this.html('▶'); - } - }); - if (this._legendCollapse) { - $expander.trigger('click'); - } - } - } - }; - /** - * trick to refresh the layer - */ - LayerBase.prototype.refresh = function () { - if (this.source) { - this.source.refresh(); - } - }; - Object.defineProperty(LayerBase.prototype, "id", { - get: function () { - return this._id; - }, - set: function (newId) { - this._id = newId; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "animate", { - get: function () { - return this._animate; - }, - set: function (animate) { - this._animate = animate; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "legendContent", { - /** - * get the legend content - * @type {string} - */ - get: function () { - return this._legendContent; - }, - /** - * set the legend content directly - * @param {string} newVal - new content - * @protected - */ - set: function (newVal) { - this._legendContent = newVal; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "params", { - /** - * get the map get params - * @type {object} - */ - get: function () { - return this._params; - }, - /** - * set the map get params - * @param {object} newParams - new get params - * @protected - */ - set: function (newParams) { - this._params = newParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minResolution", { - /** - * get the minimum resolution - * @type {number|*} - */ - get: function () { - return this._minResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxResolution", { - /** - * get the maximum resolution - * @type {number|*} - */ - get: function () { - return this._maxResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minZoom", { - /** - * get min zoom - * @type {number|*} - */ - get: function () { - return this._minZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxZoom", { - /** - * get max zoom - * @type {number|*} - */ - get: function () { - return this._maxZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "url", { - /** - * get the url - * @type {string} - */ - get: function () { - return this._url; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "visible", { - /** - * Get the layer visibility - * @type {boolean} - */ - get: function () { - return this._visible; - }, - /** - * set the visibility - * @param visibility - */ - set: function (visibility) { - this.setVisible(visibility); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setVisible = function (visibility) { - this._visible = visibility; - if (this.olLayer) { - this.olLayer.setVisible(this._visible); - if (visibility && !this._loaded) { - this._load(); - } - } - }; - Object.defineProperty(LayerBase.prototype, "opacity", { - /** - * Get the layer opacity - * @type {number} - */ - get: function () { - return this._opacity; - }, - /** - * Set the layer opacity - * @param {number} opacity - layer opacity - */ - set: function (opacity) { - this._opacity = opacity; - if (this.olLayer) { - this.olLayer.setOpacity(this._opacity); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "name", { - /** - * Get the layer name - * @type {string} - */ - get: function () { - return this._name; - }, - /** - * set the layer name - * @param {string} newName - the new name - */ - set: function (newName) { - this._name = newName; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "loaded", { - /** - * Check if the layer is loaded - * @type {boolean} - */ - get: function () { - return this._loaded; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "source", { - /** - * get the layer source - * @type {*} - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getSource = function () { - return this._source; - }; - Object.defineProperty(LayerBase.prototype, "zIndex", { - /** - * get the z index - */ - get: function () { - return this._zIndex; - }, - /** - * set the z index - */ - set: function (newZ) { - this._zIndex = newZ; - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setZIndex = function (newZ) { - }; - Object.defineProperty(LayerBase.prototype, "olLayer", { - /** - * the the ol layer - */ - get: function () { - return this.getOlLayer(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getOlLayer = function () { - return this._olLayer; - }; - return LayerBase; -}()); -exports.LayerBase = LayerBase; -nm.LayerBase = LayerBase; -exports.default = LayerBase; - - -/***/ }), - -/***/ 11: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var $ = __webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var ol = __webpack_require__(2); -var projections_1 = __webpack_require__(8); -var invalidClass = 'geocoder-invalid'; -var geocoderLoadingClass = 'geocoder-loading'; -// let testAddress = '65 7th Street, Prairie du Sac, WI'; -var Geocode = (function () { - function Geocode(mapDiv, map) { - var _this = this; - var inputGuid = makeGuid_1.makeGuid(); - var buttonGuid = makeGuid_1.makeGuid(); - this.map = map; - this.indicationLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: new ol.style.Style({ - image: new ol.style.Circle({ - radius: 12, - fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }), - stroke: new ol.style.Stroke({ color: 'red', width: 1 }) - }) - }) - }); - this.map.addLayer(this.indicationLayer); - $(mapDiv).append('<div class="geocoder-el">' + - ("<input type=\"text\" id=\"" + inputGuid + "\">") + - ("<button id=\"" + buttonGuid + "\">Search</button>") + - '</div>'); - this.theButton = document.getElementById(buttonGuid); - this.theInput = document.getElementById(inputGuid); - this.reset(); - var $theButton = $(this.theButton); - var $theInput = $(this.theInput); - $theButton.click(function (evt) { - evt.preventDefault(); - $theButton.addClass(geocoderLoadingClass); - _this.theButton.disabled = true; - _this.indicationLayer.getSource().clear(); - $.get("https://geocode.xyz/" + _this.theInput.value + "?geoit=json", {}, function (d) { - var lat = parseFloat(d['latt']); - var lon = parseFloat(d['longt']); - if ((lat == 0 && lon == 0) || d['error']) { - $theInput.addClass(invalidClass); - _this.theInput.title = 'Specified Location Invalid'; - _this.theButton.title = 'Specified Location Invalid'; - } - else { - var v = _this.map.getView(); - var p = new ol.geom.Point([lon, lat]); - var feat = new ol.Feature(p); - _this.indicationLayer.getSource().addFeature(feat); - p.transform(projections_1.proj4326, projections_1.proj3857); - v.setCenter(p.getCoordinates()); - v.setZoom(13); - } - $theButton.removeClass(geocoderLoadingClass); - _this.theButton.disabled = false; - }, 'json'); - }); - $(this.theInput).keyup(function (evt) { - evt.preventDefault(); - _this.theButton.disabled = _this.theInput.value.length == 0; - $theInput.removeClass(invalidClass); - _this.theInput.title = ''; - _this.theButton.title = ''; - if (!_this.theButton.disabled && evt.keyCode == 13) { - $theButton.click(); - } - }); - } - Geocode.prototype.reset = function () { - this.theButton.disabled = true; - this.theInput.value = ''; - }; - return Geocode; -}()); -exports.Geocode = Geocode; - - -/***/ }), - -/***/ 12: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var checkDefined = __webpack_require__(9); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -/** - * assists with map move interactions, trigger callback functions - * @augments MapInteractionBase - */ -var MapMoveCls = (function (_super) { - __extends(MapMoveCls, _super); - /** - * constructor called implicitly - */ - function MapMoveCls() { - var _this = _super.call(this, 'map move') || this; - _this._arrLyrRequest = []; - _this._arrLyrTimeout = []; - _this._arrLayer = []; - _this._lookupLayer = {}; - _this._mapMoveCallbacks = []; - _this._mapMoveCallbacksLookup = {}; - _this._mapMoveCallbackDelays = []; - _this._mapMoveCallbackContext = []; - _this._mapMoveCallbackTimeout = []; - _this._mapExtent = undefined; - _this._zoomLevel = undefined; - return _this; - } - /** - * initialize the map move object - * @param theMap - the ol map - */ - MapMoveCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - this.map.getView().on(['change:center', 'change:resolution'], function (e) { - _this._updateMapExtent(); - // trigger the layer updates - for (var i = 0; i < _this._arrLayer.length; i++) { - _this.triggerLyrLoad(_this._arrLayer[i], i, e.type); - } - // trigger the map callbacks - for (var i = 0; i < _this._mapMoveCallbacks.length; i++) { - _this.triggerMoveCallback(i, e.type); - } - }); - }; - MapMoveCls.prototype._updateMapExtent = function () { - var theView = this.map.getView(); - this._zoomLevel = theView.getZoom(); - var extentArray = theView.calculateExtent(this.map.getSize()); - this._mapExtent = { - minX: extentArray[0], - minY: extentArray[1], - maxX: extentArray[2], - maxY: extentArray[3] - }; - }; - Object.defineProperty(MapMoveCls.prototype, "mapExtent", { - /** - * return the map extent - */ - get: function () { - if (!this._mapExtent) { - this._updateMapExtent(); - } - return this._mapExtent; - }, - enumerable: true, - configurable: true - }); - /** - * Trigger the layer load - * @param lyr the layer being acted on - * @param index index of the layer - * @param eventType the event triggering the load, as 'change:center' or 'change:resolution' - */ - MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) { - if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) { - throw 'need to define lyr or index'; - } - else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) { - index = this._arrLayer.indexOf(lyr); - } - else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) { - lyr = this._arrLayer[index]; - } - // clear the timeout - if (this._arrLyrTimeout[index] != null) { - clearTimeout(this._arrLyrTimeout[index]); - this._arrLyrTimeout[index] = null; - } - // abort if necessary and clear the request - if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) { - this._arrLyrRequest[index].abort(); - this._arrLyrRequest[index] = null; - } - // dummy callback used if before load returns false - var callbackFunc = function () { }; - if (lyr.mapMoveBefore(this._zoomLevel, eventType)) { - lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel); - var __this_1 = this; - callbackFunc = function () { - function innerFunction(theLayer, theIndex) { - var _innerThis = this; - this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) { - /** - * @type {LayerBaseVector} - */ - theLayer.mapMoveCallback(d); - theLayer.loadCallback(); - }, 'json').fail(function (jqXHR) { - if (jqXHR.statusText != 'abort') { - console.log('failed'); - console.log(theLayer.url); - console.log(theLayer.mapMoveParams); - } - }).always(function () { - _innerThis._arrLyrTimeout[theIndex] = null; - _innerThis._arrLyrRequest[theIndex] = null; - }); - } - innerFunction.call(__this_1, lyr, index); - }; - } - else { - lyr.clear(); - } - this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay); - }; - /** - * trigger the map move call back at the given index - * @param ind - the index of the layer - * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution' - * @param functionId=undefined the function id used to reference the added callback function - */ - MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) { - if (typeof ind == 'undefined' && typeof functionId == 'undefined') { - throw 'either the function index or the id must be defined'; - } - if (typeof ind !== 'number') { - ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]); - } - if (ind < 0) { - console.log('function not found'); - return; - } - // clear the timeout - if (this._mapMoveCallbackTimeout[ind] != null) { - clearTimeout(this._mapMoveCallbackTimeout[ind]); - this._mapMoveCallbackTimeout[ind] = null; - } - var ctx = this._mapMoveCallbackContext[ind]; - var theFunc = this._mapMoveCallbacks[ind]; - var __this = this; - var f = function () { - if (ctx !== null) { - theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType); - } - else { - theFunc(__this._mapExtent, __this._zoomLevel, eventType); - } - }; - this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]); - }; - /** - * Add a layer to the interaction - * @param lyr - layer to add - * @param triggerOnAdd - if the layer should be loaded on add - */ - MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) { - if (triggerOnAdd === void 0) { triggerOnAdd = true; } - if (this._arrLayer.indexOf(lyr) > -1) { - console.log('already added ' + lyr.name + ' to map move'); - return; - } - this._checkInit(); - this._arrLyrRequest.push(null); - this._arrLyrTimeout.push(null); - this._arrLayer.push(lyr); - this._lookupLayer[lyr.id] = lyr; - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerLyrLoad(lyr, this._arrLayer.length - 1); - } - }; - /** - * add a callback to the map move event - * @param func - callback function - * @param context - the context to use for this function - * @param delay=50 the delay before call load - * @param triggerOnAdd if the layer should be loaded on add to mapMove - * @param functionId optional id to reference the function later for outside triggering - */ - MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) { - if (this._mapMoveCallbacks.indexOf(func) > -1) { - console.log('this function already added to map move'); - return; - } - this._checkInit(); - if (!functionId) { - functionId = makeGuid_1.default(); - } - this._mapMoveCallbacks.push(func); - this._mapMoveCallbacksLookup[functionId] = func; - this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50); - this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null); - this._mapMoveCallbackTimeout.push(null); - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerMoveCallback(this._mapMoveCallbacks.length - 1); - } - }; - return MapMoveCls; -}(mapInteractionBase_1.default)); -exports.MapMoveCls = MapMoveCls; -nm.MapMoveCls = MapMoveCls; -exports.default = MapMoveCls; - - -/***/ }), - -/***/ 13: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -var FeatureLayerProperties = (function () { - /** - * - * @param feature the feature - * @param layer - the layer in the popup - * @param layerIndex - index of the layer - * @param selectionLayer - the ol selection layer - * @param [esriLayerName=undefined] - esri layer name - */ - function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) { - this.feature = feature; - this.layer = layer; - this.layerIndex = layerIndex; - this.selectionLayer = selectionLayer; - this.popupContent = ''; - this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined; - } - Object.defineProperty(FeatureLayerProperties.prototype, "layerName", { - get: function () { - if (typeof this.esriLayerName == 'string') { - return this.esriLayerName; - } - else { - return this.layer.name; - } - }, - enumerable: true, - configurable: true - }); - return FeatureLayerProperties; -}()); -exports.FeatureLayerProperties = FeatureLayerProperties; -/** - * map popup class - * @augments MapInteractionBase - */ -var MapPopupCls = (function (_super) { - __extends(MapPopupCls, _super); - /** - * Definition for openlayers style function - * @callback olStyleFunction - * ¶m feature the openlayers vector feature - * $param - */ - /** - * map popup constructor - */ - function MapPopupCls() { - var _this = _super.call(this, 'map popup') || this; - _this._arrPopupLayerIds = []; - _this._arrPopupLayers = []; - // this._arrPopupOlLayers = []; - _this._arrPopupContentFunction = []; - _this._$popupContainer = undefined; - _this._$popupContent = undefined; - _this._$popupCloser = undefined; - _this._popupOverlay = undefined; - _this._selectionLayers = []; - _this._selectionLayerLookup = {}; - _this._mapClickFunctions = []; - //let a = function($jqueryContent){console.log($jqueryContent)}; - //this._popupChangedLookup = {'a': a}; - _this._popupChangedFunctions = []; - _this._esriMapServiceLayers = []; - _this._popupOpen = false; - _this._popupCoordinate = null; - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - _this._popupContentLength = 0; - return _this; - } - /** - * map popup initialization - * @param {ol.Map} theMap - the ol map - */ - MapPopupCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - var $map; - var target = this.map.getTarget(); - if (typeof target == 'string') { - $map = $('#' + target); - } - else { - $map = $(target); - } - $map.append('<div class="ol-popup">' + - '<span class="ol-popup-closer">X</span>' + - '<div class="popup-content"></div>' + - '</div>'); - this._$popupContainer = $map.find('.ol-popup'); - this._$popupContent = $map.find('.popup-content'); - this._$popupCloser = $map.find('.ol-popup-closer'); - var _ease = function (n) { - return ol.easing.inAndOut(n); - }; - this._popupOverlay = new ol.Overlay({ - element: this._$popupContainer[0], - autoPan: true, - autoPanAnimation: { - duration: 250, - source: theMap.getView().getCenter(), - easing: _ease - } - }); - this._map.addOverlay(this._popupOverlay); - this._$popupCloser.click(function (evt) { - _this.closePopup(); - }); - // display popup on click - this._map.on('singleclick', function (evt) { - _this.closePopup(); - _this._popupCoordinate = evt['coordinate']; - // esri map service layers - if (_this._esriMapServiceLayers.length > 0) { - var queryParams = { - geometry: evt['coordinate'].join(','), - geometryType: 'esriGeometryPoint', - layers: 'all', - sr: _this._map.getView().getProjection().getCode().split(':')[1], - mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','), - imageDisplay: _this._map.getSize().join(',') + ',96', - returnGeometry: true, - tolerance: 15, - f: 'pjson' - }; - for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) { - var l = _a[_i]; - l.getPopupInfo(queryParams); - } - } - var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']); - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - for (var i = 0; i < layerFeatureObjectArray.length; i++) { - var featObj = layerFeatureObjectArray[i]; - var props = featObj.feature.getProperties(); - var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent); - //skip if return was false - if (popupContentResponse === false) { - //continue; - } - else if (typeof popupContentResponse == 'string') { - featObj.popupContent = popupContentResponse; - _this._passThroughLayerFeatureArray.push(featObj); - } - else { - featObj.selectionLayer.getSource().addFeature(featObj.feature); - } - } - _this._popupContentLength = _this._passThroughLayerFeatureArray.length; - _this._currentPopupIndex = -1; - var popupHtml = '<div class="ol-popup-nav">'; - popupHtml += '<span class="previous-popup ol-popup-nav-arrow">◀</span>'; - popupHtml += '<span class="next-popup ol-popup-nav-arrow">▶</span>'; - popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>"; - popupHtml += "<span> of </span>"; - popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>"; - popupHtml += "<span> - </span>"; - popupHtml += "<span class=\"current-popup-layer-name\"></span>"; - popupHtml += '</div>'; - popupHtml += '<div class="ol-popup-inner">'; - popupHtml += '</div>'; - _this._$popupContent.html(popupHtml); - _this._$popupContent.find('.previous-popup').click(function () { - if (_this._popupContentLength == 1) { - return; - } - if (_this._currentPopupIndex == 0) { - _this._currentPopupIndex = _this._popupContentLength - 1; - } - else { - _this._currentPopupIndex--; - } - _this._triggerFeatSelect(); - }); - var nextPopup = _this._$popupContent.find('.next-popup'); - nextPopup.click(function () { - if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) { - return; - } - if (_this._currentPopupIndex == _this._popupContentLength - 1) { - _this._currentPopupIndex = 0; - } - else { - _this._currentPopupIndex++; - } - _this._triggerFeatSelect(); - }); - if (_this._popupContentLength > 0) { - nextPopup.trigger('click'); - _this._popupOverlay.setPosition(_this._popupCoordinate); - _this._$popupContent.scrollTop(0); - _this._popupOpen = true; - } - }); - //change mouse cursor when over marker - this._map.on('pointermove', function (evt) { - if (evt['dragging']) { - return; - } - var pixel = _this.map.getEventPixel(evt['originalEvent']); - var hit = false; - _this.map.forEachLayerAtPixel(pixel, function (lyr) { - if (hit) { - return; - } - for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) { - var vLyr = _a[_i]; - if (vLyr.olLayer == lyr) { - hit = true; - break; - } - } - }); - var mapElement = _this.map.getTargetElement(); - mapElement.style.cursor = hit ? 'pointer' : ''; - }); - }; - /** - * helper to select features - * @private - */ - MapPopupCls.prototype._triggerFeatSelect = function () { - var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number'); - var $innerPopup = this._$popupContent.find('.ol-popup-inner'); - var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name'); - this.clearSelection(); - var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex]; - $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed()); - $layerNameSpan.html(lyrFeatObj.layerName); - $innerPopup.html(lyrFeatObj.popupContent); - lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature); - for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(this._$popupContent); - } - }; - /** - * - * @param feature - the ol feature - * @param {LayerEsriMapServer} lyr - the map server layer - * @param {string} popupContent - popup content - * @param {string} esriName - esri layer name - */ - MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) { - var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName); - featLayerObject.popupContent = popupContent; - this._passThroughLayerFeatureArray.push(featLayerObject); - this._popupContentLength++; - $('.popup-content-length').html(this._popupContentLength.toFixed()); - if (!this._popupOpen) { - this._$popupContent.find('.next-popup').trigger('click'); - this._popupOverlay.setPosition(this._popupCoordinate); - this._$popupContent.scrollTop(0); - this._popupOpen = true; - } - }; - /** - * - * @param pixel - the ol pixel - * @returns feature layer properties - * @private - */ - MapPopupCls.prototype._featuresAtPixel = function (pixel) { - var _this = this; - var layerFeatureObjectArray = []; - this.map.forEachFeatureAtPixel(pixel, function (feature, layer) { - var hasLyr = false; - var j; - var lyr = null; - for (j = 0; j < _this._arrPopupLayers.length; j++) { - lyr = _this._arrPopupLayers[j]; - if (lyr.olLayer === layer) { - hasLyr = true; - break; - } - } - if (hasLyr) { - layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j])); - } - }); - return layerFeatureObjectArray; - }; - MapPopupCls.prototype.closePopup = function () { - this._checkInit(); - this._popupOpen = false; - this._popupOverlay.setPosition(undefined); - this._$popupCloser[0].blur(); - this.clearSelection(); - this._$popupContent.html(''); - return false; - }; - ; - /** - * - * @param chgFunction - popup change function - */ - MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) { - this._popupChangedFunctions.push(chgFunction); - }; - /** - * - * @param {LayerBase|*} lyr - the layer being acted on - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns the new selection layer - * @private - */ - MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) { - this._checkInit(); - selectionStyle = selectionStyle || {}; - selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)'; - selectionStyle.width = selectionStyle.width || 10; - var theStyle; - if (selectionStyle.olStyle) { - theStyle = selectionStyle.olStyle; - } - else { - theStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: selectionStyle.color, - width: selectionStyle.width - }), - image: new ol.style.Circle({ - radius: 7, - fill: new ol.style.Fill({ color: selectionStyle.color }), - stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 }) - }), - fill: new ol.style.Fill({ - color: selectionStyle.color - }) - }); - } - var selectionLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: theStyle - }); - selectionLayer.setZIndex(100); - this._selectionLayers.push(selectionLayer); - this._selectionLayerLookup[lyr.id] = selectionLayer; - this.map.addLayer(selectionLayer); - return selectionLayer; - }; - /** - * Add popup to the map - * @param {LayerBase|*} lyr The layer that the popup with act on - * @param {popupCallback} popupContentFunction - popup content function that makes popup info - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._arrPopupLayerIds.push(lyr.id); - this._arrPopupLayers.push(lyr); - // this._arrPopupOlLayers.push(lyr.olLayer); - this._arrPopupContentFunction.push(popupContentFunction); - return selectionLayer; - }; - ; - /** - * - * @param {LayerBase} lyr - layer - */ - MapPopupCls.prototype.removeVectorPopup = function (lyr) { - var idx = this._arrPopupLayerIds.indexOf(lyr.id); - if (idx > -1) { - this._arrPopupLayerIds.splice(idx, 1); - this._arrPopupLayers.splice(idx, 1); - // this._arrPopupOlLayers.splice(idx, 1); - this._arrPopupContentFunction.splice(idx, 1); - this._selectionLayers.splice(idx, 1); - delete this._selectionLayerLookup[lyr.id]; - } - }; - /** - * - * @param {LayerEsriMapServer} lyr - map server layer - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._esriMapServiceLayers.push(lyr); - return selectionLayer; - }; - MapPopupCls.prototype.clearSelection = function () { - this._checkInit(); - for (var i = 0; i < this._selectionLayers.length; i++) { - this._selectionLayers[i].getSource().clear(); - } - for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(); - } - }; - ; - /** - * Add a function to be called when the map is clicked but before any popups are implemented - * @param {function} func - the map click function - */ - MapPopupCls.prototype.addMapClickFunction = function (func) { - this._mapClickFunctions.push(func); - }; - return MapPopupCls; -}(mapInteractionBase_1.default)); -exports.MapPopupCls = MapPopupCls; -nm.MapPopupCls = MapPopupCls; -exports.default = MapPopupCls; - - -/***/ }), - -/***/ 14: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var geocode_1 = __webpack_require__(11); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param [options={}] config options - * @param [options.divId=map] map div id - * @param [options.center={}] center config object - * @param [options.center.x=-10018378] center x, web mercator x or lon - * @param [options.center.y=5574910] center y, web mercator y or lat - * @param [options.zoom=7] zoom level - * @param [options.minZoom=undefined] min zoom - * @param [options.maxZoom=undefined] max zoom - * @param [options.baseSwitcher=true] if add base map switcher - * @param [options.fullScreen=false] if add base map switcher - * @returns the ol map - */ -function quickMapBase(options) { - if (options === void 0) { options = {}; } - options.divId = options.divId || 'map'; - options.center = options.center || { x: -10018378, y: 5574910 }; - options.zoom = typeof options.zoom == 'number' ? options.zoom : 7; - options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true; - options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false; - options.addGeocode = options.addGeocode || false; - var $mapDiv = $('#' + options.divId); - $mapDiv.css('position', 'relative'); - var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); - // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})}); - var osmCss = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw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CYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHjKTHPPBo8CSJISqqq4wGGOcWylIGlgvgNX1Gd8vF5f+IUIwb30ng+Gg2QfBRIMvy0jG8SVkYo4N0zvUXVRztbJ/L6xL7lUZEXBEHkuZqlS6g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iup6XnbRNC7yqueNsJCCIiXzdQhnaGN+46umnEdy5U5UbUJ48LFM9GkJo8BdDOiAZ7ZIQbKhYLMqvhU2wmNxjEAsS2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')"; - if (options.baseSwitcher) { - // let switcherContent = '<div class="base-map-switcher" title="Toggle Base Layer" style="'; - // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; '; - // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`; - // switcherContent += '"></div>'; - // $mapDiv.append(switcherContent); - // - // $mapDiv.find('.base-map-switcher').click(function() { - // "use strict"; - // osmLayer.setVisible(!osmLayer.getVisible()); - // satLayer.setVisible(!satLayer.getVisible()); - // - // if (osmLayer.getVisible()){ - // $(this).css('background', aerialCss); - // } else { - // $(this).css('background', osmCss); - // } - // }); - } - if (options.zoom < 0 || options.zoom > 28) { - throw 'zoom out of range'; - } - if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) { - var p = new ol.geom.Point([options.center.x, options.center.y]); - new ol.proj.Projection({ code: "EPSG:4326" }); - p.transform(new ol.proj.Projection({ code: "EPSG:4326" }), new ol.proj.Projection({ code: "EPSG:3857" })); - var coordinates = p.getCoordinates(); - options.center.x = coordinates[0]; - options.center.y = coordinates[1]; - } - var controls = ol.control.defaults({ - attributionOptions: { collapsible: false } - }); - var view = new ol.View({ - center: [options.center.x, options.center.y], - zoom: options.zoom, - minZoom: options.minZoom, - maxZoom: options.maxZoom - }); - var map = new ol.Map({ - layers: [osmLayer], - target: options.divId, - controls: controls, - view: view - }); - if (options.fullScreen) { - map.addControl(new ol.control.FullScreen({})); - } - if (options.addGeocode) { - new geocode_1.Geocode(document.getElementById(options.divId), map); - } - return map; -} -exports.quickMapBase = quickMapBase; -nm.quickMapBase = quickMapBase; -exports.default = quickMapBase; - - -/***/ }), - -/***/ 17: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/14/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers.zoomResolutionConvert'); -var _zoomResLookup = [ - 156543.03392804097, - 78271.51696402048, - 39135.75848201024, - 19567.87924100512, - 9783.93962050256, - 4891.96981025128, - 2445.98490512564, - 1222.99245256282, - 611.49622628141, - 305.748113140705, - 152.8740565703525, - 76.43702828517625, - 38.21851414258813, - 19.109257071294063, - 9.554628535647032, - 4.777314267823516, - 2.388657133911758, - 1.194328566955879, - 0.5971642834779395, - 0.29858214173896974, - 0.14929107086948487, - 0.07464553543474244, - 0.03732276771737122, - 0.01866138385868561, - 0.009330691929342804, - 0.004665345964671402, - 0.002332672982335701, - 0.0011663364911678506, - 0.0005831682455839253 //28 -]; -/** - * Get the resolution given the zoom level - * @param {number} zoomLevel - the zoom level - * @returns {number|*} the map resolution - */ -function zoomToResolution(zoomLevel) { - "use strict"; - if (typeof zoomLevel == 'number') { - if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) { - return _zoomResLookup[zoomLevel]; - } - else { - console.log("invalid zoom level provided: " + zoomLevel); - return undefined; - } - } - else { - return undefined; - } -} -exports.zoomToResolution = zoomToResolution; -nm.zoomToResolution = zoomToResolution; -/** - * Get resolution from the zoom level - * @param {number} resolution - the resolution - * @returns {number|*} the zoom level - */ -function resolutionToZoom(resolution) { - for (var i = 0; i < _zoomResLookup.length; i++) { - if (resolution >= _zoomResLookup[i]) { - return i; - } - } - return 0; -} -exports.resolutionToZoom = resolutionToZoom; -nm.resolutionToZoom = resolutionToZoom; - - -/***/ }), - -/***/ 2: -/***/ (function(module, exports) { - -module.exports = ol; - -/***/ }), - -/***/ 3: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/8/2015. - */ -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers'); -/** - * base interaction - */ -var MapInteractionBase = (function () { - /** - * map interaction base - * @param subtype - the interaction subtype - */ - function MapInteractionBase(subtype) { - this._map = null; - this._initialized = false; - this._subtype = subtype; - } - /** - * base initializer, returns true for already initialized - * @param theMap - the ol Map - * @returns true for already initialized - */ - MapInteractionBase.prototype.init = function (theMap) { - if (!this._initialized) { - this._map = theMap; - this._initialized = true; - } - }; - Object.defineProperty(MapInteractionBase.prototype, "map", { - /** - * get reference to the ol map object - * @returns {ol.Map} the map object - */ - get: function () { - return this._map; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MapInteractionBase.prototype, "initialized", { - /** - * get if is initialized - * @returns {boolean} is initialized - */ - get: function () { - return this._initialized; - }, - enumerable: true, - configurable: true - }); - /** - * Check the initialization status and throw exception if not valid yet - * @protected - */ - MapInteractionBase.prototype._checkInit = function () { - if (!this.initialized) { - var msg = this._subtype + " object not initialized"; - alert(msg); - console.log(msg); - throw msg; - } - }; - /** - * Check the initialization status and throw exception if not valid yet - */ - MapInteractionBase.prototype.checkInit = function () { - this._checkInit(); - }; - return MapInteractionBase; -}()); -exports.MapInteractionBase = MapInteractionBase; -nm.MapInteractionBase = MapInteractionBase; -exports.default = MapInteractionBase; - - -/***/ }), - -/***/ 45: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBase_1 = __webpack_require__(10); -var mapMove_1 = __webpack_require__(6); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The Vector layer base - * @augments LayerBase - * @abstract - */ -var LayerBaseVector = (function (_super) { - __extends(LayerBaseVector, _super); - /** - * The base vector layer - * @param {string} url - pass an empty string to prevent default load and add from a json source - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible - * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined - * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move - * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called - * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params - * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages - * - */ - function LayerBaseVector(url, options) { - if (options === void 0) { options = {}; } - var _this = _super.call(this, url, options) || this; - options = options; - //prevent regular load if no url has been provided - if (_this.url.trim() == '') { - _this._loaded = true; - } - _this._style = typeof options.style == 'undefined' ? undefined : options.style; - if (_this.visible) { - _this._autoLoad = true; - } - else { - _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false); - } - _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false; - _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300; - if (options.mapMoveObj) { - _this._mapMove = options.mapMoveObj; - } - else { - _this._mapMove = _this._onDemand ? mapMove_1.default : undefined; - } - _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams : - function () { return {}; }; - if (_this._onDemand) { - _this._loaded = true; - _this._mapMoveParams = {}; - _this._mapMove.checkInit(); - _this._mapMove.addVectorLayer(_this); - } - _this._source = new ol.source.Vector(); - _this._olLayer = new ol.layer.Vector({ - source: _this._source, - visible: _this.visible, - style: _this.style, - minResolution: _this._minResolution, - maxResolution: _this._maxResolution, - renderOrder: options.renderOrder - }); - _this.olLayer.setZIndex(_this._zIndex); - _this._projectionMap = null; - _this._projection4326 = new ol.proj.Projection({ code: "EPSG:4326" }); - _this._olLayer.setOpacity(_this.opacity); - return _this; - } - /** - * dummy to be overridden - * @param {object} featureCollection - geojson or esrijson object - */ - LayerBaseVector.prototype.addFeatures = function (featureCollection) { - console.log('Layer vector base addFeatures is a placeholder and does nothing'); - }; - /** - * Before call to map move callback, can prevent call by returning false - * @param {number} zoom - zoom level - * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution' - * @returns {boolean} if the call should proceed - */ - LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) { - if (this.minZoom !== undefined) { - if (zoom < this.minZoom) { - return false; - } - } - if (this.maxZoom !== undefined) { - if (zoom > this.maxZoom) { - return false; - } - } - return this.visible; - }; - /** - * callback to generate the parameters passed in the get request - * @param {object} extent - extent object - * @param {number} extent.minX - minX - * @param {number} extent.minY - minY - * @param {number} extent.maxX - maxX - * @param {number} extent.maxY - maxY - * @param {number} zoomLevel - zoom level - */ - LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) { - this._mapMoveParams = {}; - $.extend(this._mapMoveParams, this.params); - $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel)); - }; - /** - * callback function on map move - * @param {object} d - the json response - */ - LayerBaseVector.prototype.mapMoveCallback = function (d) { - if (this.source) { - this._source.clear(); - } - }; - /** - * clear features in the layer - */ - LayerBaseVector.prototype.clear = function () { - if (this._source) { - this._source.clear(); - } - }; - Object.defineProperty(LayerBaseVector.prototype, "onDemandDelay", { - /** - * get on demand delay in miliseconds - */ - get: function () { - return this._onDemandDelay; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "autoLoad", { - /** - * get if the layer is autoloaded - */ - get: function () { - return this._autoLoad; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "style", { - /** - * get the style definition - */ - get: function () { - return this._style; - }, - /** - * set the style - * @param style - the style or function - */ - set: function (style) { - this._style = style; - this.olLayer.setStyle(this._style); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapCrs", { - /** - * get the map CRS if it is defined by the map move object - */ - get: function () { - return this.mapProj == null ? null : this.mapProj.getCode(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapProj", { - get: function () { - if (this._projectionMap != null) { - return this._projectionMap; - } - if (this._mapMove) { - this._projectionMap = this._mapMove.map.getView().getProjection(); - return this._projectionMap; - } - else { - return null; - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapMove", { - /** - * get the map move object - * @type {MapMoveCls|*} - */ - get: function () { - return this._mapMove; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "mapMoveParams", { - /** - * map move params - * @type {object} - */ - get: function () { - return this._mapMoveParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "visible", { - get: function () { - return this._visible; - }, - /** - * Set the layer visibility - * @type {boolean} - * @override - */ - set: function (visibility) { - _super.prototype.setVisible.call(this, visibility); - if (this._onDemand) { - this.mapMove.triggerLyrLoad(this); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "source", { - /** - * get the layer vector source - * @override - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "features", { - /** - * array of ol features - */ - get: function () { - return this.source.getFeatures(); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBaseVector.prototype, "olLayer", { - /** - * - */ - get: function () { - return _super.prototype.getOlLayer.call(this); - }, - enumerable: true, - configurable: true - }); - LayerBaseVector.prototype.setZIndex = function (newZ) { - this.olLayer.setZIndex(newZ); - }; - return LayerBaseVector; -}(LayerBase_1.LayerBase)); -exports.LayerBaseVector = LayerBaseVector; -nm.LayerBaseVector = LayerBaseVector; -exports.default = LayerBaseVector; - - -/***/ }), - -/***/ 49: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/2/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var LayerBaseVector_1 = __webpack_require__(45); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var proj = __webpack_require__(8); -var projections_1 = __webpack_require__(8); -var nm = provide_1.default('layers'); -/** - * The Vector GeoJson Layer - * @augments LayerBaseVector - */ -var LayerBaseVectorGeoJson = (function (_super) { - __extends(LayerBaseVectorGeoJson, _super); - /** - * @param {string|null} url - resource url, set to '' to make blank layer - * @param {object} options - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * - * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible - * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined - * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move - * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called - * - * @param {object} [options.transform={}] SR transform, set as false for no transform - * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS - * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS - * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params - * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages - */ - function LayerBaseVectorGeoJson(url, options) { - if (options === void 0) { options = {}; } - var _this = this; - url = typeof url == 'string' ? url : ''; - _this = _super.call(this, url, options) || this; - _this._geoJsonFormat = new ol.format.GeoJSON(); - _this._transform = options.transform || {}; - _this._transform.dataProjection = _this._transform.dataProjection || proj.proj4326; - _this._transform.featureProjection = _this._transform.featureProjection || projections_1.proj3857; - if (_this.autoLoad || _this.visible) { - _this._load(); - } - return _this; - } - /** - * add feature collection - * @param {object} featureCollection - as geojson object - */ - LayerBaseVectorGeoJson.prototype.addFeatures = function (featureCollection) { - this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, { dataProjection: this._transform.dataProjection, - featureProjection: this._transform.featureProjection })); - }; - /** - * trigger load features - * @protected - * @returns {boolean} if already loaded - */ - LayerBaseVectorGeoJson.prototype._load = function () { - var _this = this; - if (_super.prototype._load.call(this)) { - return true; - } - $.get(this._url, this._params, function (d) { - _this.addFeatures(d); - _this.loadCallback(_this); - }, 'json').fail(function () { - this._loaded = false; - }); - return false; - }; - /** - * callback function on map move - * @param {object} d the json response - * @override - */ - LayerBaseVectorGeoJson.prototype.mapMoveCallback = function (d) { - _super.prototype.mapMoveCallback.call(this, d); - this._source.addFeatures(this._geoJsonFormat.readFeatures(d, { featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection })); - }; - return LayerBaseVectorGeoJson; -}(LayerBaseVector_1.LayerBaseVector)); -exports.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson; -nm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson; -exports.default = LayerBaseVectorGeoJson; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMapBase_1 = __webpack_require__(14); -var provide_1 = __webpack_require__(0); -var mapMove_1 = __webpack_require__(6); -var mapPopup_1 = __webpack_require__(7); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param {object} [options={}] config options - * @param {string} [options.divId=map] map div id - * @param {object} [options.center={}] center config object - * @param {number} [options.center.x=-10018378] center x, web mercator x or lon - * @param {number} [options.center.y=5574910] center y, web mercator y or lat - * @param {number} [options.zoom=7] zoom level - * @param {number} [options.minZoom=undefined] min zoom - * @param {number} [options.maxZoom=undefined] max zoom - * @param {boolean} [options.baseSwitcher=true] if add base map switcher - * @param {boolean} [options.fullScreen=false] if add base map switcher - * @returns {ol.Map} the ol map - */ -function quickMap(options) { - if (options === void 0) { options = {}; } - var m = quickMapBase_1.quickMapBase(options); - mapMove_1.default.init(m); - mapPopup_1.default.init(m); - return m; -} -exports.quickMap = quickMap; -nm.quickMap = quickMap; -exports.default = quickMap; - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapMoveCls_1 = __webpack_require__(12); -/** - * The single map move object catch is that it is common to multimap pages - * @type {MapMoveCls} - */ -exports.mapMove = new mapMoveCls_1.default(); -exports.default = exports.mapMove; - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapPopupCls_1 = __webpack_require__(13); -/** - * The single popup object catch is that it is common to multimap pages - * @type {MapPopupCls} - */ -exports.mapPopup = new mapPopupCls_1.default(); -exports.default = exports.mapPopup; - - -/***/ }), - -/***/ 74: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/18/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMap_1 = __webpack_require__(5); -var LayerBaseVectorGeoJson_1 = __webpack_require__(49); -var ol = __webpack_require__(2); -var mapPopup_1 = __webpack_require__(7); -var reg = { - "type": "FeatureCollection", - "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - "features": [ - { - "type": "Feature", - "properties": {}, - "geometry": { - "type": "Polygon", - "coordinates": [[[-91.4232, 43.9834], [-91.3246, 43.9834], [-91.3465, 44.0162], [-91.3082, 44.0655], [-91.2205, 44.0546], [-91.1767, 44.0874], [-91.1493, 44.0819], [-90.9741, 44.071], [-90.9741, 44.071], [-90.9796, 44.1312], [-90.9084, 44.1586], [-90.4921, 44.1586], [-90.3114, 44.1531], [-90.3114, 44.2463], [-90.0813, 44.2463], [-89.9006, 44.2517], [-89.928, 44.197], [-89.9061, 44.1805], [-89.928, 44.1531], [-89.9718, 44.1696], [-90.0266, 44.071], [-89.9608, 43.9779], [-89.9499, 43.9231], [-89.9828, 43.9122], [-89.9608, 43.8629], [-89.8513, 43.7698], [-89.7856, 43.6383], [-89.5994, 43.6438], [-89.2434, 43.6438], [-89.0079, 43.6328], [-88.8874, 43.6328], [-88.3999, 43.6328], [-88.3999, 43.5452], [-88.4163, 43.1947], [-88.5368, 43.1947], [-88.5423, 42.8442], [-88.5478, 42.8442], [-88.7778, 42.8442], [-88.7778, 42.4936], [-88.9421, 42.4936], [-89.3639, 42.4991], [-89.4022, 42.4991], [-89.8404, 42.5046], [-89.928, 42.5046], [-90.4264, 42.5046], [-90.64, 42.5101], [-90.7112, 42.636], [-90.8974, 42.6744], [-91.0672, 42.7511], [-91.1548, 42.9866], [-91.1767, 43.0797], [-91.1767, 43.1344], [-91.0562, 43.2549], [-91.1055, 43.3152], [-91.2041, 43.3535], [-91.2041, 43.4247], [-91.2315, 43.4576], [-91.2151, 43.5014], [-91.2698, 43.6164], [-91.2589, 43.7259], [-91.2424, 43.7752], [-91.2863, 43.8464]]] - } - } - ] -}; -var reg2 = { - "type": "FeatureCollection", - "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, - "features": [ - { - "type": "Feature", - "properties": {}, - "geometry": { - "type": "Polygon", - "coordinates": [[[-93.0, 45.0], [-94.0, 45.0], [-94.0, 46.0], [-93.0, 46.0], [-93.0, 45.0]]] - } - } - ] -}; -var map = quickMap_1.default({ addGeocode: true }); -var regionLayer = new LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson('', { - minZoom: 6, - maxZoom: 12, - name: 'WisDOT Regions', - style: new ol.style.Style({ - fill: new ol.style.Fill({ - color: 'blue' - }), - stroke: new ol.style.Stroke({ - color: 'yellow', - width: 5 - }) - }) -}); -var regionLayer2 = new LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson('', { - minZoom: 6, - maxZoom: 12, - name: 'WisDOT Regions', - style: new ol.style.Style({ - fill: new ol.style.Fill({ - color: 'red' - }), - stroke: new ol.style.Stroke({ - color: 'yellow', - width: 5 - }) - }) -}); -regionLayer.addFeatures(reg); -regionLayer2.addFeatures(reg2); -map.addLayer(regionLayer.olLayer); -map.addLayer(regionLayer2.olLayer); -mapPopup_1.mapPopup.addVectorPopup(regionLayer2, function (p) { return 'cats'; }); -window['map'] = map; -// -// let itsLayerCollection = new ItsLayerCollection(map); -// -// let layerArray = [ -// { -// groupName: 'ITS Inventory Layers', -// collapse: false, -// addCheck: true, -// items: itsLayerCollection.layers -// } -// ]; -// let legend = new LayerLegend(layerArray, 'legend-container', {}); -console.log('it works'); - - -/***/ }), - -/***/ 8: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 10/3/2016. - */ -var ol = __webpack_require__(2); -exports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' }); -exports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' }); -exports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' }); - - -/***/ }), - -/***/ 9: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util.checkDefined'); -/** - * check if the input is undefined or null - * @param input - input pointer - * @returns true undefined or null - */ -function undefinedOrNull(input) { - "use strict"; - return (typeof input === 'undefined' || input === null); -} -exports.undefinedOrNull = undefinedOrNull; -nm.undefinedOrNull = undefinedOrNull; -/** - * check if the input is defined and not null - * @param input - input pointer - * @returns true defined and not null - */ -function definedAndNotNull(input) { - "use strict"; - return !(undefinedOrNull(input)); -} -exports.definedAndNotNull = definedAndNotNull; -nm.definedAndNotNull = definedAndNotNull; - - -/***/ }) - -/******/ }); +!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=73)}({0:function(e,t,o){"use strict";function n(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){void 0===o[t[n]]&&(o[t[n]]={}),o=o[t[n]]}return o}Object.defineProperty(t,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,t.default=n},1:function(e,t){e.exports=$},10:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(17),r=o(0),i=o(3),a=o(1),p=r.default("layers"),s=function(){function e(e,t){if(void 0===t&&(t={}),t=t||{},"string"!=typeof e)throw"Invalid URL";this._url=e,this._params="object"==typeof t.params?t.params:{},this._legendCollapse="boolean"==typeof t.legendCollapse&&t.legendCollapse,this._legendCheckbox="boolean"!=typeof t.legendCheckbox||t.legendCheckbox,this.id=t.id||i.default(),this._name=t.name||"Unnamed Layer",this.animate=!1,this._opacity="number"==typeof t.opacity?t.opacity:1,this._opacity>1?this._opacity=1:this._opacity<0&&(this._opacity=0),this._visible="boolean"!=typeof t.visible||t.visible,this._source=void 0,this._olLayer=void 0,this._loaded=!1,this._maxResolution=n.zoomToResolution(t.minZoom),void 0!==this._maxResolution&&(this._maxResolution+=1e-5),this._minResolution=n.zoomToResolution(t.maxZoom),this._minZoom="number"==typeof t.minZoom?t.minZoom:void 0,this._maxZoom="number"==typeof t.maxZoom?t.maxZoom:void 0,this._zIndex="number"==typeof t.zIndex?t.zIndex:0,this.loadCallback="function"==typeof t.loadCallback?t.loadCallback:function(){},this._legendContent="",this._legendCheckbox?(this._legendContent+='<input type="checkbox" '+(this.visible?"checked":"")+' class="legend-check" id="'+this.id+'-legend-layer-check"><span></span>',this._legendContent+='<label for="'+this.id+'-legend-layer-check" class="legend-layer-name">'+this.name+"</label>"):this._legendContent+='<label class="legend-layer-name">'+this.name+"</label>",this._$legendDiv=null,this._applyCollapseCalled=!1,this._addLegendContent("string"==typeof t.legendContent?t.legendContent:void 0)}return e.prototype._load=function(){return 1==this.loaded||(this._loaded=!0,!1)},e.prototype.getLegendDiv=function(){return'<div class="legend-layer-div" id="'+this.id+'-legend-layer-div">'+this._legendContent+"</div>"},e.prototype._addLegendContent=function(e){void 0===e&&(e=""),e.indexOf("<ul>")>-1&&(e='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'+e),this._legendContent+=e,this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0&&(this._$legendDiv.append(e),this.applyCollapse())},e.prototype.addLegendContent=function(e){this._addLegendContent(e)},e.prototype.applyCollapse=function(){if(this._applyCollapseCalled)return void console.log("collapse already applied");if(this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0){var e=this._$legendDiv.find(".legend-items-expander");e.length>0&&(this._applyCollapseCalled=!0,e.click(function(){var e=a(this);e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("▼")):(e.addClass("legend-layer-group-collapsed"),e.html("▶"))}),this._legendCollapse&&e.trigger("click"))}},e.prototype.refresh=function(){this.source&&this.source.refresh()},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"legendContent",{get:function(){return this._legendContent},set:function(e){this._legendContent=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minResolution",{get:function(){return this._minResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxResolution",{get:function(){return this._maxResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minZoom",{get:function(){return this._minZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoom",{get:function(){return this._maxZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this.setVisible(e)},enumerable:!0,configurable:!0}),e.prototype.setVisible=function(e){this._visible=e,this.olLayer&&(this.olLayer.setVisible(this._visible),e&&!this._loaded&&this._load())},Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=e,this.olLayer&&this.olLayer.setOpacity(this._opacity)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),e.prototype.getSource=function(){return this._source},Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(e){this._zIndex=e},enumerable:!0,configurable:!0}),e.prototype.setZIndex=function(e){},Object.defineProperty(e.prototype,"olLayer",{get:function(){return this.getOlLayer()},enumerable:!0,configurable:!0}),e.prototype.getOlLayer=function(){return this._olLayer},e}();t.LayerBase=s,p.LayerBase=s,t.default=s},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),r=o(3),i=o(2),a=o(8),p="geocoder-invalid",s="geocoder-loading",l=function(){function e(e,t){var o=this,l=r.makeGuid(),u=r.makeGuid();this.map=t,this.indicationLayer=new i.layer.Vector({source:new i.source.Vector,style:new i.style.Style({image:new i.style.Circle({radius:12,fill:new i.style.Fill({color:"rgba(255,0,0,0.5)"}),stroke:new i.style.Stroke({color:"red",width:1})})})}),this.map.addLayer(this.indicationLayer),n(e).append('<div class="geocoder-el"><input type="text" id="'+l+'"><button id="'+u+'">Search</button></div>'),this.theButton=document.getElementById(u),this.theInput=document.getElementById(l),this.reset();var c=n(this.theButton),d=n(this.theInput);c.click(function(e){e.preventDefault(),c.addClass(s),o.theButton.disabled=!0,o.indicationLayer.getSource().clear(),n.get("https://geocode.xyz/"+o.theInput.value+"?geoit=json",{},function(e){var t=parseFloat(e.latt),n=parseFloat(e.longt);if(0==t&&0==n||e.error)d.addClass(p),o.theInput.title="Specified Location Invalid",o.theButton.title="Specified Location Invalid";else{var r=o.map.getView(),l=new i.geom.Point([n,t]),u=new i.Feature(l);o.indicationLayer.getSource().addFeature(u),l.transform(a.proj4326,a.proj3857),r.setCenter(l.getCoordinates()),r.setZoom(13)}c.removeClass(s),o.theButton.disabled=!1},"json")}),n(this.theInput).keyup(function(e){e.preventDefault(),o.theButton.disabled=0==o.theInput.value.length,d.removeClass(p),o.theInput.title="",o.theButton.title="",o.theButton.disabled||13!=e.keyCode||c.click()})}return e.prototype.reset=function(){this.theButton.disabled=!0,this.theInput.value=""},e}();t.Geocode=l},12:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(9),a=o(0),p=o(3),s=o(1),l=a.default("olHelpers"),u=function(e){function t(){var t=e.call(this,"map move")||this;return t._arrLyrRequest=[],t._arrLyrTimeout=[],t._arrLayer=[],t._lookupLayer={},t._mapMoveCallbacks=[],t._mapMoveCallbacksLookup={},t._mapMoveCallbackDelays=[],t._mapMoveCallbackContext=[],t._mapMoveCallbackTimeout=[],t._mapExtent=void 0,t._zoomLevel=void 0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t),this.map.getView().on(["change:center","change:resolution"],function(e){o._updateMapExtent();for(var t=0;t<o._arrLayer.length;t++)o.triggerLyrLoad(o._arrLayer[t],t,e.type);for(var t=0;t<o._mapMoveCallbacks.length;t++)o.triggerMoveCallback(t,e.type)})},t.prototype._updateMapExtent=function(){var e=this.map.getView();this._zoomLevel=e.getZoom();var t=e.calculateExtent(this.map.getSize());this._mapExtent={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},Object.defineProperty(t.prototype,"mapExtent",{get:function(){return this._mapExtent||this._updateMapExtent(),this._mapExtent},enumerable:!0,configurable:!0}),t.prototype.triggerLyrLoad=function(e,t,o){if(i.undefinedOrNull(e)&&i.undefinedOrNull(t))throw"need to define lyr or index";i.definedAndNotNull(e)&&i.undefinedOrNull(t)?t=this._arrLayer.indexOf(e):i.undefinedOrNull(e)&&i.definedAndNotNull(t)&&(e=this._arrLayer[t]),null!=this._arrLyrTimeout[t]&&(clearTimeout(this._arrLyrTimeout[t]),this._arrLyrTimeout[t]=null),null!=this._arrLyrRequest[t]&&4!=this._arrLyrRequest[t]&&(this._arrLyrRequest[t].abort(),this._arrLyrRequest[t]=null);var n=function(){};if(e.mapMoveBefore(this._zoomLevel,o)){e.mapMoveMakeGetParams(this._mapExtent,this._zoomLevel);var r=this;n=function(){function o(e,t){var o=this;this._arrLyrRequest[t]=s.get(e.url,e.mapMoveParams,function(t){e.mapMoveCallback(t),e.loadCallback()},"json").fail(function(t){"abort"!=t.statusText&&(console.log("failed"),console.log(e.url),console.log(e.mapMoveParams))}).always(function(){o._arrLyrTimeout[t]=null,o._arrLyrRequest[t]=null})}o.call(r,e,t)}}else e.clear();this._arrLyrTimeout[t]=setTimeout(n,e.onDemandDelay)},t.prototype.triggerMoveCallback=function(e,t,o){if(void 0===e&&void 0===o)throw"either the function index or the id must be defined";if("number"!=typeof e&&(e=this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[o])),e<0)return void console.log("function not found");null!=this._mapMoveCallbackTimeout[e]&&(clearTimeout(this._mapMoveCallbackTimeout[e]),this._mapMoveCallbackTimeout[e]=null);var n=this._mapMoveCallbackContext[e],r=this._mapMoveCallbacks[e],i=this,a=function(){null!==n?r.call(n,i._mapExtent,i._zoomLevel,t):r(i._mapExtent,i._zoomLevel,t)};this._mapMoveCallbackTimeout[e]=setTimeout(a,this._mapMoveCallbackDelays[e])},t.prototype.addVectorLayer=function(e,t){if(void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1)return void console.log("already added "+e.name+" to map move");this._checkInit(),this._arrLyrRequest.push(null),this._arrLyrTimeout.push(null),this._arrLayer.push(e),this._lookupLayer[e.id]=e,(t="boolean"!=typeof t||t)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))},t.prototype.addCallback=function(e,t,o,n,r){if(this._mapMoveCallbacks.indexOf(e)>-1)return void console.log("this function already added to map move");this._checkInit(),r||(r=p.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=e,this._mapMoveCallbackDelays.push("number"==typeof o?o:50),this._mapMoveCallbackContext.push(i.definedAndNotNull(t)?t:null),this._mapMoveCallbackTimeout.push(null),(n="boolean"!=typeof n||n)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))},t}(r.default);t.MapMoveCls=u,l.MapMoveCls=u,t.default=u},13:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(0),a=o(2),p=o(1),s=i.default("olHelpers"),l=function(){function e(e,t,o,n,r){this.feature=e,this.layer=t,this.layerIndex=o,this.selectionLayer=n,this.popupContent="",this.esriLayerName="string"==typeof r?r:void 0}return Object.defineProperty(e.prototype,"layerName",{get:function(){return"string"==typeof this.esriLayerName?this.esriLayerName:this.layer.name},enumerable:!0,configurable:!0}),e}();t.FeatureLayerProperties=l;var u=function(e){function t(){var t=e.call(this,"map popup")||this;return t._arrPopupLayerIds=[],t._arrPopupLayers=[],t._arrPopupContentFunction=[],t._$popupContainer=void 0,t._$popupContent=void 0,t._$popupCloser=void 0,t._popupOverlay=void 0,t._selectionLayers=[],t._selectionLayerLookup={},t._mapClickFunctions=[],t._popupChangedFunctions=[],t._esriMapServiceLayers=[],t._popupOpen=!1,t._popupCoordinate=null,t._passThroughLayerFeatureArray=[],t._currentPopupIndex=-1,t._popupContentLength=0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t);var n,r=this.map.getTarget();n=p("string"==typeof r?"#"+r:r),n.append('<div class="ol-popup"><span class="ol-popup-closer">X</span><div class="popup-content"></div></div>'),this._$popupContainer=n.find(".ol-popup"),this._$popupContent=n.find(".popup-content"),this._$popupCloser=n.find(".ol-popup-closer");var i=function(e){return a.easing.inAndOut(e)};this._popupOverlay=new a.Overlay({element:this._$popupContainer[0],autoPan:!0,autoPanAnimation:{duration:250,source:t.getView().getCenter(),easing:i}}),this._map.addOverlay(this._popupOverlay),this._$popupCloser.click(function(e){o.closePopup()}),this._map.on("singleclick",function(e){if(o.closePopup(),o._popupCoordinate=e.coordinate,o._esriMapServiceLayers.length>0)for(var t={geometry:e.coordinate.join(","),geometryType:"esriGeometryPoint",layers:"all",sr:o._map.getView().getProjection().getCode().split(":")[1],mapExtent:o._map.getView().calculateExtent(o._map.getSize()).join(","),imageDisplay:o._map.getSize().join(",")+",96",returnGeometry:!0,tolerance:15,f:"pjson"},n=0,r=o._esriMapServiceLayers;n<r.length;n++){var i=r[n];i.getPopupInfo(t)}var a=o._featuresAtPixel(e.pixel);o._passThroughLayerFeatureArray=[],o._currentPopupIndex=-1;for(var p=0;p<a.length;p++){var s=a[p],l=s.feature.getProperties(),u=o._arrPopupContentFunction[s.layerIndex](l,o._$popupContent);u===!1||("string"==typeof u?(s.popupContent=u,o._passThroughLayerFeatureArray.push(s)):s.selectionLayer.getSource().addFeature(s.feature))}o._popupContentLength=o._passThroughLayerFeatureArray.length,o._currentPopupIndex=-1;var c='<div class="ol-popup-nav">';c+='<span class="previous-popup ol-popup-nav-arrow">◀</span>',c+='<span class="next-popup ol-popup-nav-arrow">▶</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span> of </span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span> - </span>",c+='<span class="current-popup-layer-name"></span>',c+="</div>",c+='<div class="ol-popup-inner">',c+="</div>",o._$popupContent.html(c),o._$popupContent.find(".previous-popup").click(function(){1!=o._popupContentLength&&(0==o._currentPopupIndex?o._currentPopupIndex=o._popupContentLength-1:o._currentPopupIndex--,o._triggerFeatSelect())});var d=o._$popupContent.find(".next-popup");d.click(function(){1==o._popupContentLength&&o._currentPopupIndex>-1||(o._currentPopupIndex==o._popupContentLength-1?o._currentPopupIndex=0:o._currentPopupIndex++,o._triggerFeatSelect())}),o._popupContentLength>0&&(d.trigger("click"),o._popupOverlay.setPosition(o._popupCoordinate),o._$popupContent.scrollTop(0),o._popupOpen=!0)}),this._map.on("pointermove",function(e){if(!e.dragging){var t=o.map.getEventPixel(e.originalEvent),n=!1;o.map.forEachFeatureAtPixel(t,function(e,t){if(!n)for(var r=0,i=o._arrPopupLayers;r<i.length;r++){var a=i[r];if(a.olLayer==t){n=!0;break}}});o.map.getTargetElement().style.cursor=n?"pointer":""}})},t.prototype._triggerFeatSelect=function(){var e=this._$popupContent.find(".current-popup-item-number"),t=this._$popupContent.find(".ol-popup-inner"),o=this._$popupContent.find(".current-popup-layer-name");this.clearSelection();var n=this._passThroughLayerFeatureArray[this._currentPopupIndex];e.html((this._currentPopupIndex+1).toFixed()),o.html(n.layerName),t.html(n.popupContent),n.selectionLayer.getSource().addFeature(n.feature);for(var r=0,i=this._popupChangedFunctions;r<i.length;r++){(0,i[r])(this._$popupContent)}},t.prototype.addMapServicePopupContent=function(e,t,o,n){var r=new l(e,t,this._popupContentLength,this._selectionLayerLookup[t.id],n);r.popupContent=o,this._passThroughLayerFeatureArray.push(r),this._popupContentLength++,p(".popup-content-length").html(this._popupContentLength.toFixed()),this._popupOpen||(this._$popupContent.find(".next-popup").trigger("click"),this._popupOverlay.setPosition(this._popupCoordinate),this._$popupContent.scrollTop(0),this._popupOpen=!0)},t.prototype._featuresAtPixel=function(e){var t=this,o=[];return this.map.forEachFeatureAtPixel(e,function(e,n){var r,i=!1,a=null;for(r=0;r<t._arrPopupLayers.length;r++)if(a=t._arrPopupLayers[r],a.olLayer===n){i=!0;break}i&&o.push(new l(e,a,r,t._selectionLayers[r]))}),o},t.prototype.closePopup=function(){return this._checkInit(),this._popupOpen=!1,this._popupOverlay.setPosition(void 0),this._$popupCloser[0].blur(),this.clearSelection(),this._$popupContent.html(""),!1},t.prototype.addPopupChangedFunction=function(e){this._popupChangedFunctions.push(e)},t.prototype._addPopupLayer=function(e,t){this._checkInit(),t=t||{},t.color=t.color||"rgba(255,170,0,0.5)",t.width=t.width||10;var o;o=t.olStyle?t.olStyle:new a.style.Style({stroke:new a.style.Stroke({color:t.color,width:t.width}),image:new a.style.Circle({radius:7,fill:new a.style.Fill({color:t.color}),stroke:new a.style.Stroke({color:t.color,width:1})}),fill:new a.style.Fill({color:t.color})});var n=new a.layer.Vector({source:new a.source.Vector,style:o});return n.setZIndex(100),this._selectionLayers.push(n),this._selectionLayerLookup[e.id]=n,this.map.addLayer(n),n},t.prototype.addVectorPopup=function(e,t,o){var n=this._addPopupLayer(e,o);return this._arrPopupLayerIds.push(e.id),this._arrPopupLayers.push(e),this._arrPopupContentFunction.push(t),n},t.prototype.removeVectorPopup=function(e){var t=this._arrPopupLayerIds.indexOf(e.id);t>-1&&(this._arrPopupLayerIds.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupContentFunction.splice(t,1),this._selectionLayers.splice(t,1),delete this._selectionLayerLookup[e.id])},t.prototype.addMapServicePopup=function(e,t){var o=this._addPopupLayer(e,t);return this._esriMapServiceLayers.push(e),o},t.prototype.clearSelection=function(){this._checkInit();for(var e=0;e<this._selectionLayers.length;e++)this._selectionLayers[e].getSource().clear();for(var t=0,o=this._mapClickFunctions;t<o.length;t++){(0,o[t])()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,t.default=u},14:function(e,t,o){"use strict";function n(e){void 0===e&&(e={}),e.divId=e.divId||"map",e.center=e.center||{x:-10018378,y:5574910},e.zoom="number"==typeof e.zoom?e.zoom:7,e.baseSwitcher="boolean"!=typeof e.baseSwitcher||e.baseSwitcher,e.fullScreen="boolean"==typeof e.fullScreen&&e.fullScreen,e.addGeocode=e.addGeocode||!1,a("#"+e.divId).css("position","relative");var t=new i.layer.Tile({source:new i.source.OSM});if(e.baseSwitcher,e.zoom<0||e.zoom>28)throw"zoom out of range";if(e.center.x>=-180&&e.center.x<=180&&e.center.y>=-90&&e.center.y<=90){var o=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),o.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var n=o.getCoordinates();e.center.x=n[0],e.center.y=n[1]}var r=i.control.defaults({attributionOptions:{collapsible:!1}}),s=new i.View({center:[e.center.x,e.center.y],zoom:e.zoom,minZoom:e.minZoom,maxZoom:e.maxZoom}),l=new i.Map({layers:[t],target:e.divId,controls:r,view:s});return e.fullScreen&&l.addControl(new i.control.FullScreen({})),e.addGeocode&&new p.Geocode(document.getElementById(e.divId),l),l}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(2),a=o(1),p=o(11),s=r.default("olHelpers");t.quickMapBase=n,s.quickMapBase=n,t.default=n},17:function(e,t,o){"use strict";function n(e){return"number"==typeof e?e%1==0&&e>=0&&e<=28?p[e]:void console.log("invalid zoom level provided: "+e):void 0}function r(e){for(var t=0;t<p.length;t++)if(e>=p[t])return t;return 0}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("olHelpers.zoomResolutionConvert"),p=[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,.5971642834779395,.29858214173896974,.14929107086948487,.07464553543474244,.03732276771737122,.01866138385868561,.009330691929342804,.004665345964671402,.002332672982335701,.0011663364911678506,.0005831682455839253];t.zoomToResolution=n,a.zoomToResolution=n,t.resolutionToZoom=r,a.resolutionToZoom=r},2:function(e,t){e.exports=ol},3:function(e,t,o){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=r.default("util");t.makeGuid=n,i.makeGuid=n,t.default=n},4:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);t.mapPopup=new n.default,t.default=t.mapPopup},44:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(10),i=o(7),a=o(0),p=o(2),s=o(1),l=a.default("layers"),u=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return o=o,""==n.url.trim()&&(n._loaded=!0),n._style=void 0===o.style?void 0:o.style,n.visible?n._autoLoad=!0:n._autoLoad="boolean"==typeof o.autoLoad&&o.autoLoad,n._onDemand="boolean"==typeof o.onDemand&&o.onDemand,n._onDemandDelay="number"==typeof o.onDemandDelay?o.onDemandDelay:300,o.mapMoveObj?n._mapMove=o.mapMoveObj:n._mapMove=n._onDemand?i.default:void 0,n._mapMoveMakeGetParams="function"==typeof o.mapMoveMakeGetParams?o.mapMoveMakeGetParams:function(){return{}},n._onDemand&&(n._loaded=!0,n._mapMoveParams={},n._mapMove.checkInit(),n._mapMove.addVectorLayer(n)),n._source=new p.source.Vector,n._olLayer=new p.layer.Vector({source:n._source,visible:n.visible,style:n.style,minResolution:n._minResolution,maxResolution:n._maxResolution,renderOrder:o.renderOrder}),n.olLayer.setZIndex(n._zIndex),n._projectionMap=null,n._projection4326=new p.proj.Projection({code:"EPSG:4326"}),n._olLayer.setOpacity(n.opacity),n}return n(t,e),t.prototype.addFeatures=function(e){console.log("Layer vector base addFeatures is a placeholder and does nothing")},t.prototype.mapMoveBefore=function(e,t){return!(void 0!==this.minZoom&&e<this.minZoom)&&(!(void 0!==this.maxZoom&&e>this.maxZoom)&&this.visible)},t.prototype.mapMoveMakeGetParams=function(e,t){this._mapMoveParams={},s.extend(this._mapMoveParams,this.params),s.extend(this._mapMoveParams,this._mapMoveMakeGetParams(this,e,t))},t.prototype.mapMoveCallback=function(e){this.source&&this._source.clear()},t.prototype.clear=function(){this._source&&this._source.clear()},Object.defineProperty(t.prototype,"onDemandDelay",{get:function(){return this._onDemandDelay},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"autoLoad",{get:function(){return this._autoLoad},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"style",{get:function(){return this._style},set:function(e){this._style=e,this.olLayer.setStyle(this._style)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapCrs",{get:function(){return null==this.mapProj?null:this.mapProj.getCode()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapProj",{get:function(){return null!=this._projectionMap?this._projectionMap:this._mapMove?(this._projectionMap=this._mapMove.map.getView().getProjection(),this._projectionMap):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapMove",{get:function(){return this._mapMove},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mapMoveParams",{get:function(){return this._mapMoveParams},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return this._visible},set:function(t){e.prototype.setVisible.call(this,t),this._onDemand&&this.mapMove.triggerLyrLoad(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"features",{get:function(){return this.source.getFeatures()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"olLayer",{get:function(){return e.prototype.getOlLayer.call(this)},enumerable:!0,configurable:!0}),t.prototype.setZIndex=function(e){this.olLayer.setZIndex(e)},t}(r.LayerBase);t.LayerBaseVector=u,l.LayerBaseVector=u,t.default=u},48:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(44),i=o(0),a=o(2),p=o(1),s=o(8),l=o(8),u=i.default("layers"),c=function(e){function t(t,o){void 0===o&&(o={});var n=this;return t="string"==typeof t?t:"",n=e.call(this,t,o)||this,n._geoJsonFormat=new a.format.GeoJSON,n._transform=o.transform||{},n._transform.dataProjection=n._transform.dataProjection||s.proj4326,n._transform.featureProjection=n._transform.featureProjection||l.proj3857,(n.autoLoad||n.visible)&&n._load(),n}return n(t,e),t.prototype.addFeatures=function(e){this.source.addFeatures(this._geoJsonFormat.readFeatures(e,{dataProjection:this._transform.dataProjection,featureProjection:this._transform.featureProjection}))},t.prototype._load=function(){var t=this;return!!e.prototype._load.call(this)||(p.get(this._url,this._params,function(e){t.addFeatures(e),t.loadCallback(t)},"json").fail(function(){this._loaded=!1}),!1)},t.prototype.mapMoveCallback=function(t){e.prototype.mapMoveCallback.call(this,t),this._source.addFeatures(this._geoJsonFormat.readFeatures(t,{featureProjection:this._transform.featureProjection,dataProjection:this._transform.dataProjection}))},t}(r.LayerBaseVector);t.LayerBaseVectorGeoJson=c,u.LayerBaseVectorGeoJson=c,t.default=c},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=n.default("olHelpers"),i=function(){function e(e){this._map=null,this._initialized=!1,this._subtype=e}return e.prototype.init=function(e){this._initialized||(this._map=e,this._initialized=!0)},Object.defineProperty(e.prototype,"map",{get:function(){return this._map},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),e.prototype._checkInit=function(){if(!this.initialized){var e=this._subtype+" object not initialized";throw alert(e),console.log(e),e}},e.prototype.checkInit=function(){this._checkInit()},e}();t.MapInteractionBase=i,r.MapInteractionBase=i,t.default=i},6:function(e,t,o){"use strict";function n(e){void 0===e&&(e={});var t=r.quickMapBase(e);return a.default.init(t),p.default.init(t),t}Object.defineProperty(t,"__esModule",{value:!0});var r=o(14),i=o(0),a=o(7),p=o(4),s=i.default("olHelpers");t.quickMap=n,s.quickMap=n,t.default=n},7:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12);t.mapMove=new n.default,t.default=t.mapMove},73:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(6),r=o(48),i=o(2),a=o(4),p={type:"FeatureCollection",crs:{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}},features:[{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[-91.4232,43.9834],[-91.3246,43.9834],[-91.3465,44.0162],[-91.3082,44.0655],[-91.2205,44.0546],[-91.1767,44.0874],[-91.1493,44.0819],[-90.9741,44.071],[-90.9741,44.071],[-90.9796,44.1312],[-90.9084,44.1586],[-90.4921,44.1586],[-90.3114,44.1531],[-90.3114,44.2463],[-90.0813,44.2463],[-89.9006,44.2517],[-89.928,44.197],[-89.9061,44.1805],[-89.928,44.1531],[-89.9718,44.1696],[-90.0266,44.071],[-89.9608,43.9779],[-89.9499,43.9231],[-89.9828,43.9122],[-89.9608,43.8629],[-89.8513,43.7698],[-89.7856,43.6383],[-89.5994,43.6438],[-89.2434,43.6438],[-89.0079,43.6328],[-88.8874,43.6328],[-88.3999,43.6328],[-88.3999,43.5452],[-88.4163,43.1947],[-88.5368,43.1947],[-88.5423,42.8442],[-88.5478,42.8442],[-88.7778,42.8442],[-88.7778,42.4936],[-88.9421,42.4936],[-89.3639,42.4991],[-89.4022,42.4991],[-89.8404,42.5046],[-89.928,42.5046],[-90.4264,42.5046],[-90.64,42.5101],[-90.7112,42.636],[-90.8974,42.6744],[-91.0672,42.7511],[-91.1548,42.9866],[-91.1767,43.0797],[-91.1767,43.1344],[-91.0562,43.2549],[-91.1055,43.3152],[-91.2041,43.3535],[-91.2041,43.4247],[-91.2315,43.4576],[-91.2151,43.5014],[-91.2698,43.6164],[-91.2589,43.7259],[-91.2424,43.7752],[-91.2863,43.8464]]]}}]},s={type:"FeatureCollection",crs:{type:"name",properties:{name:"urn:ogc:def:crs:OGC:1.3:CRS84"}},features:[{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[[[-93,45],[-94,45],[-94,46],[-93,46],[-93,45]]]}}]},l=n.default({addGeocode:!0}),u=new r.LayerBaseVectorGeoJson("",{minZoom:6,maxZoom:12,name:"WisDOT Regions",style:new i.style.Style({fill:new i.style.Fill({color:"blue"}),stroke:new i.style.Stroke({color:"yellow",width:5})})}),c=new r.LayerBaseVectorGeoJson("",{minZoom:6,maxZoom:12,name:"WisDOT Regions",style:new i.style.Style({fill:new i.style.Fill({color:"red"}),stroke:new i.style.Stroke({color:"yellow",width:5})})});u.addFeatures(p),c.addFeatures(s),l.addLayer(u.olLayer),l.addLayer(c.olLayer),a.mapPopup.addVectorPopup(c,function(e){return"cats"}),window.map=l,console.log("it works")},8:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2);t.proj4326=new n.proj.Projection({code:"EPSG:4326"}),t.proj3857=new n.proj.Projection({code:"EPSG:3857"}),t.proj3070=new n.proj.Projection({code:"EPSG:3070"})},9:function(e,t,o){"use strict";function n(e){return void 0===e||null===e}function r(e){return!n(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("util.checkDefined");t.undefinedOrNull=n,a.undefinedOrNull=n,t.definedAndNotNull=r,a.definedAndNotNull=r}}); //# sourceMappingURL=mapPopup.js.map \ No newline at end of file diff --git a/test/serve/js/mapPopup.js.map b/test/serve/js/mapPopup.js.map index 6057e89ea00f8348084b3c581e7705a301da97cd..bdf59b0fb3dfcfd2571f41ce82b333b2c48eaad9 100644 --- a/test/serve/js/mapPopup.js.map +++ b/test/serve/js/mapPopup.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 7bb55fd41bd308ae26ba?4c44***","webpack:///./src/util/provide.ts?5c82***","webpack:///external \"$\"?57aa***","webpack:///./src/layers/LayerBase.ts?bf94***","webpack:///./src/olHelpers/geocode.ts?5a2f***","webpack:///./src/olHelpers/mapMoveCls.ts?cd45***","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7***","webpack:///./src/olHelpers/quickMapBase.ts?fb65***","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b***","webpack:///external \"ol\"?81ed***","webpack:///./src/util/makeGuid.ts?e80e***","webpack:///./src/olHelpers/mapInteractionBase.ts?f419***","webpack:///./src/layers/LayerBaseVector.ts?c105*","webpack:///./src/layers/LayerBaseVectorGeoJson.ts?8158","webpack:///./src/olHelpers/quickMap.ts?1069***","webpack:///./src/olHelpers/mapMove.ts?6a2b***","webpack:///./src/olHelpers/mapPopup.ts?5d6c***","webpack:///./src/_tests/demos/mapPopup.ts","webpack:///./src/olHelpers/projections.ts?804b***","webpack:///./src/util/checkDefined.ts?bcd7***"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;A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;;;;;;;;ACRpE,uCAAgC;AAChC,IAAI,EAAE,GAAG,iBAAO,CAAC,mBAAmB,CAAC,CAAC;AAEtC;;;;GAIG;AACH,yBAAiC,KAAU;IACvC,YAAY,CAAC;IAEb,MAAM,CAAC,CAAC,OAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;AAC5D,CAAC;AAJD,0CAIC;AAED,EAAE,CAAC,eAAe,GAAG,eAAe,CAAC;AAGrC;;;;GAIG;AACH,2BAAmC,KAAU;IACzC,YAAY,CAAC;IAEb,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,CAAC;AAJD,8CAIC;AAED,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,CAAC","file":"mapPopup.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 74);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7bb55fd41bd308ae26ba","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachLayerAtPixel(pixel, (lyr) => {\r\n if (hit){\r\n return;\r\n }\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == lyr){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new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u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw4scxNysnHxU7nSspTRcJjCZGL3IsjsYJMMg5mwgx7gaIOLBFCogAgBBoNa9w+DE6I+Bs7FTgwwrJbHjWDgpYo2KwtBTcY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eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHjKTHPPBo8CSJISqqq4wGGOcWylIGlgvgNX1Gd8vF5f+IUIwb30ng+Gg2QfBRIMvy0jG8SVkYo4N0zvUXVRztbJ/L6xL7lUZEXBEHkuZqlS6gEAUgKJurnhFtfpACOYd8b/hVbJPqwi44a6KA0sPVjIi/SIyxb3u8KlAJ0S8jRVgrlW+nVHPdrhiXCxu42d86ByksDc80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S2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","import {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport mapMove from '../olHelpers/mapMove';\r\nimport MapMoveCls from '../olHelpers/mapMoveCls'\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\nexport interface makeMapMoveParams {\r\n /**\r\n *\r\n * @param lyr\r\n * @param extent\r\n * @param zoomLevel\r\n */\r\n (lyr: LayerBaseVector, extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel?: number): any\r\n}\r\n\r\n\r\n\r\nexport interface LayerBaseVectorOptions extends LayerBaseOptions{\r\n autoLoad?: boolean;\r\n style?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n onDemand?: boolean;\r\n onDemandDelay?: number;\r\n mapMoveMakeGetParams?: makeMapMoveParams;\r\n mapMoveObj?: MapMoveCls;\r\n renderOrder?: (a: ol.Feature, b: ol.Feature) => number;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nexport class LayerBaseVector extends LayerBase {\r\n _olLayer: ol.layer.Vector;\r\n _source: ol.source.Vector;\r\n _style: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n _autoLoad: boolean;\r\n _onDemand: boolean;\r\n _onDemandDelay: number;\r\n _mapMoveMakeGetParams: makeMapMoveParams;\r\n _mapMoveParams: any;\r\n _mapMove: MapMoveCls;\r\n _projectionMap: ol.proj.Projection;\r\n _projection4326: ol.proj.Projection;\r\n\r\n\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n constructor(url: string, options: LayerBaseVectorOptions = {}) {\r\n super(url, options);\r\n\r\n options = options as LayerBaseVectorOptions;\r\n\r\n //prevent regular load if no url has been provided\r\n if (this.url.trim() == '') {\r\n this._loaded = true;\r\n }\r\n\r\n this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\r\n if (this.visible) {\r\n this._autoLoad = true;\r\n } else {\r\n this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n\r\n this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\r\n if (options.mapMoveObj) {\r\n this._mapMove = options.mapMoveObj;\r\n } else {\r\n this._mapMove = this._onDemand ? mapMove : undefined;\r\n }\r\n\r\n\r\n this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () {return {};};\r\n\r\n if (this._onDemand) {\r\n this._loaded = true;\r\n this._mapMoveParams = {};\r\n this._mapMove.checkInit();\r\n this._mapMove.addVectorLayer(this);\r\n }\r\n\r\n this._source = new ol.source.Vector();\r\n\r\n\r\n this._olLayer = new ol.layer.Vector(\r\n {\r\n source: this._source,\r\n visible: this.visible,\r\n style: this.style,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution,\r\n renderOrder: options.renderOrder\r\n }\r\n );\r\n\r\n this.olLayer.setZIndex(this._zIndex);\r\n\r\n this._projectionMap = null;\r\n this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\r\n this._olLayer.setOpacity(this.opacity)\r\n }\r\n\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n addFeatures(featureCollection: Object) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n return this.visible;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * clear features in the layer\r\n */\r\n clear() {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get onDemandDelay(): number {\r\n return this._onDemandDelay;\r\n }\r\n\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get autoLoad(): boolean {\r\n return this._autoLoad;\r\n }\r\n\r\n /**\r\n * get the style definition\r\n */\r\n get style(): ol.StyleFunction|Array<ol.style.Style>|ol.style.Style {\r\n return this._style;\r\n }\r\n\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set style(style: ol.StyleFunction|Array<ol.style.Style>|ol.style.Style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style as ol.style.Style);\r\n }\r\n\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get mapCrs(): string {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n }\r\n\r\n get mapProj(): ol.proj.Projection{\r\n if (this._projectionMap != null){\r\n return this._projectionMap;\r\n }\r\n\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get mapMove(): MapMoveCls {\r\n return this._mapMove;\r\n }\r\n\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get mapMoveParams() {\r\n return this._mapMoveParams;\r\n }\r\n\r\n get visible(): boolean{\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set visible(visibility) {\r\n super.setVisible(visibility);\r\n\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n }\r\n\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get source(): ol.source.Vector {\r\n return this.getSource() as ol.source.Vector;\r\n }\r\n\r\n /**\r\n * array of ol features\r\n */\r\n get features(): Array<ol.Feature> {\r\n return this.source.getFeatures();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n get olLayer(): ol.layer.Vector {\r\n return super.getOlLayer() as ol.layer.Vector;\r\n }\r\n\r\n protected setZIndex(newZ: number) {\r\n this.olLayer.setZIndex(newZ);\r\n }\r\n}\r\n\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexport default LayerBaseVector;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVector.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport {proj3857} from \"../olHelpers/projections\";\r\n\r\nlet nm = provide('layers');\r\n\r\nexport interface crsTransform {\r\n dataProjection?: ol.proj.Projection;\r\n featureProjection?: ol.proj.Projection;\r\n}\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions {\r\n transform?: crsTransform;\r\n mapMoveObj?: MapMoveCls;\r\n}\r\n\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorGeoJson extends LayerBaseVector {\r\n _geoJsonFormat: ol.format.GeoJSON;\r\n _transform: crsTransform;\r\n\r\n /**\r\n * @param {string|null} url - resource url, set to '' to make blank layer\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n *\r\n * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n */\r\n constructor(url?: string, options: LayerBaseVectorGeoJsonOptions = {}) {\r\n url = typeof url == 'string' ? url : '';\r\n super(url, options);\r\n\r\n this._geoJsonFormat = new ol.format.GeoJSON();\r\n\r\n this._transform = options.transform || {};\r\n this._transform.dataProjection = this._transform.dataProjection || proj.proj4326;\r\n this._transform.featureProjection = this._transform.featureProjection || proj3857;\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n }\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - as geojson object\r\n */\r\n addFeatures(featureCollection: any) {\r\n this.source.addFeatures(\r\n this._geoJsonFormat.readFeatures(featureCollection,\r\n {dataProjection: this._transform.dataProjection,\r\n featureProjection: this._transform.featureProjection}\r\n )\r\n );\r\n }\r\n\r\n\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n\r\n if (super._load()) {\r\n return true;\r\n }\r\n\r\n $.get(this._url,\r\n this._params,\r\n (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(\r\n function () {\r\n this._loaded = false;\r\n }\r\n );\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d the json response\r\n * @override\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this._source.addFeatures(this._geoJsonFormat.readFeatures(d,\r\n {featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection}));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexport default LayerBaseVectorGeoJson;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVectorGeoJson.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\n\r\nimport ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\nimport {LayerBaseVectorGeoJson} from '../../layers/LayerBaseVectorGeoJson';\r\nimport ol = require(\"custom-ol\");\r\nimport {mapPopup} from '../../olHelpers/mapPopup';\r\n\r\n\r\n\r\nconst reg = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": {\"type\": \"name\", \"properties\": {\"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\"}},\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-91.4232, 43.9834], [-91.3246, 43.9834], [-91.3465, 44.0162], [-91.3082, 44.0655], [-91.2205, 44.0546], [-91.1767, 44.0874], [-91.1493, 44.0819], [-90.9741, 44.071], [-90.9741, 44.071], [-90.9796, 44.1312], [-90.9084, 44.1586], [-90.4921, 44.1586], [-90.3114, 44.1531], [-90.3114, 44.2463], [-90.0813, 44.2463], [-89.9006, 44.2517], [-89.928, 44.197], [-89.9061, 44.1805], [-89.928, 44.1531], [-89.9718, 44.1696], [-90.0266, 44.071], [-89.9608, 43.9779], [-89.9499, 43.9231], [-89.9828, 43.9122], [-89.9608, 43.8629], [-89.8513, 43.7698], [-89.7856, 43.6383], [-89.5994, 43.6438], [-89.2434, 43.6438], [-89.0079, 43.6328], [-88.8874, 43.6328], [-88.3999, 43.6328], [-88.3999, 43.5452], [-88.4163, 43.1947], [-88.5368, 43.1947], [-88.5423, 42.8442], [-88.5478, 42.8442], [-88.7778, 42.8442], [-88.7778, 42.4936], [-88.9421, 42.4936], [-89.3639, 42.4991], [-89.4022, 42.4991], [-89.8404, 42.5046], [-89.928, 42.5046], [-90.4264, 42.5046], [-90.64, 42.5101], [-90.7112, 42.636], [-90.8974, 42.6744], [-91.0672, 42.7511], [-91.1548, 42.9866], [-91.1767, 43.0797], [-91.1767, 43.1344], [-91.0562, 43.2549], [-91.1055, 43.3152], [-91.2041, 43.3535], [-91.2041, 43.4247], [-91.2315, 43.4576], [-91.2151, 43.5014], [-91.2698, 43.6164], [-91.2589, 43.7259], [-91.2424, 43.7752], [-91.2863, 43.8464]]]\r\n }\r\n }\r\n ]\r\n};\r\n\r\nconst reg2 = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": {\"type\": \"name\", \"properties\": {\"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\"}},\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-93.0, 45.0], [-94.0, 45.0], [-94.0, 46.0], [-93.0, 46.0], [-93.0, 45.0]]]\r\n }\r\n }\r\n ]\r\n};\r\n\r\nlet map = quickMap({addGeocode: true});\r\n\r\n\r\n\r\n\r\n\r\nlet regionLayer = new LayerBaseVectorGeoJson(\r\n '',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'blue'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n });\r\n\r\nlet regionLayer2 = new LayerBaseVectorGeoJson(\r\n '',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'red'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n });\r\n\r\nregionLayer.addFeatures(reg);\r\nregionLayer2.addFeatures(reg2);\r\n\r\nmap.addLayer(regionLayer.olLayer);\r\nmap.addLayer(regionLayer2.olLayer);\r\n\r\nmapPopup.addVectorPopup(regionLayer2, (p) => {return 'cats'});\r\n\r\n\r\nwindow['map'] = map;\r\n//\r\n// let itsLayerCollection = new ItsLayerCollection(map);\r\n//\r\n// let layerArray = [\r\n// {\r\n// groupName: 'ITS Inventory Layers',\r\n// collapse: false,\r\n// addCheck: true,\r\n// items: itsLayerCollection.layers\r\n// }\r\n// ];\r\n\r\n// let legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\nconsole.log('it works');\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/mapPopup.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///mapPopup.js","webpack:///webpack/bootstrap 99693f14fcb3e83c98ca?ad23***","webpack:///./src/util/provide.ts?5c82***","webpack:///external \"$\"?57aa***","webpack:///./src/layers/LayerBase.ts?bf94***","webpack:///./src/olHelpers/geocode.ts?5a2f***","webpack:///./src/olHelpers/mapMoveCls.ts?cd45***","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7***","webpack:///./src/olHelpers/quickMapBase.ts?fb65***","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b***","webpack:///external \"ol\"?81ed***","webpack:///./src/util/makeGuid.ts?e80e***","webpack:///./src/olHelpers/mapPopup.ts?5d6c***","webpack:///./src/layers/LayerBaseVector.ts?c105*","webpack:///./src/layers/LayerBaseVectorGeoJson.ts?8158","webpack:///./src/olHelpers/mapInteractionBase.ts?f419***","webpack:///./src/olHelpers/quickMap.ts?1069***","webpack:///./src/olHelpers/mapMove.ts?6a2b***","webpack:///./src/_tests/demos/mapPopup.ts","webpack:///./src/olHelpers/projections.ts?804b***","webpack:///./src/util/checkDefined.ts?bcd7***"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","1","$","10","zoomResolutionConvert","provide_1","makeGuid_1","nm","LayerBase","url","options","this","_url","_params","params","_legendCollapse","legendCollapse","_legendCheckbox","legendCheckbox","id","_name","animate","_opacity","opacity","_visible","visible","_source","undefined","_olLayer","_loaded","_maxResolution","zoomToResolution","minZoom","_minResolution","maxZoom","_minZoom","_maxZoom","_zIndex","zIndex","loadCallback","_legendContent","_$legendDiv","_applyCollapseCalled","_addLegendContent","legendContent","_load","loaded","getLegendDiv","additionalContent","indexOf","append","applyCollapse","addLegendContent","console","log","$expander","find","click","$this","siblings","slideToggle","hasClass","removeClass","html","addClass","trigger","refresh","source","_id","set","newId","_animate","newVal","newParams","visibility","setVisible","olLayer","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","11","ol","projections_1","invalidClass","geocoderLoadingClass","Geocode","mapDiv","map","_this","inputGuid","makeGuid","buttonGuid","indicationLayer","layer","Vector","style","Style","image","Circle","radius","fill","Fill","color","stroke","Stroke","width","addLayer","theButton","document","getElementById","theInput","reset","$theButton","$theInput","evt","preventDefault","disabled","clear","lat","parseFloat","lon","title","v","getView","geom","Point","feat","Feature","addFeature","transform","proj4326","proj3857","setCenter","getCoordinates","setZoom","keyup","keyCode","12","__extends","extendStatics","setPrototypeOf","__proto__","Array","b","__","constructor","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","init","theMap","on","e","_updateMapExtent","triggerLyrLoad","type","triggerMoveCallback","theView","getZoom","extentArray","calculateExtent","getSize","minX","minY","maxX","maxY","lyr","index","eventType","undefinedOrNull","definedAndNotNull","clearTimeout","abort","callbackFunc","mapMoveBefore","mapMoveMakeGetParams","__this_1","innerFunction","theLayer","theIndex","_innerThis","mapMoveParams","mapMoveCallback","fail","jqXHR","statusText","always","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","_checkInit","push","addCallback","func","context","delay","13","FeatureLayerProperties","feature","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","_map","addOverlay","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","forEachFeatureAtPixel","vLyr","getTargetElement","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","j","hasLyr","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","theStyle","olStyle","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","14","quickMapBase","divId","center","x","y","zoom","baseSwitcher","fullScreen","addGeocode","css","osmLayer","Tile","OSM","proj","Projection","code","coordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","geocode_1","17","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","2","3","replace","r","Math","random","toString","4","mapPopupCls_1","mapPopup","44","LayerBase_1","mapMove_1","LayerBaseVector","trim","_style","_autoLoad","_onDemand","onDemand","_onDemandDelay","mapMoveObj","_mapMove","_mapMoveMakeGetParams","_mapMoveParams","checkInit","minResolution","maxResolution","renderOrder","_projectionMap","_projection4326","addFeatures","featureCollection","evtType","extent","extend","setStyle","mapProj","mapMove","getFeatures","48","LayerBaseVector_1","LayerBaseVectorGeoJson","_geoJsonFormat","format","GeoJSON","_transform","dataProjection","featureProjection","autoLoad","readFeatures","5","MapInteractionBase","subtype","_initialized","_subtype","initialized","msg","alert","6","quickMap","quickMapBase_1","mapPopup_1","7","mapMoveCls_1","73","quickMap_1","LayerBaseVectorGeoJson_1","reg","crs","properties","features","reg2","regionLayer","regionLayer2","8","proj3070","9","input"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,EAAAC,IAGtDvB,EAAA0B,EAAA,GAGA1B,IAAA2B,EAAA,MDMMC,EACA,SAAUxB,EAAQD,EAASH,GAEjC,YE/DA,SAAA6B,GAAi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OAASpP,EAAgBoP,GpB4pE7Bpc,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GoBrrEtD,IAAAiC,GAAA3C,EAAA,GACI6C,EAAKF,EAAAL,QAAQ,oBAOjBnC,GAAA4N,kBAMAlL,EAAGkL,gBAAkBA,EAQrB5N,EAAA6N,oBAMAnL,EAAGmL,kBAAoBA","file":"mapPopup.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 73);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar zoomResolutionConvert = __webpack_require__(17);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nvar LayerBase = (function () {\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n function LayerBase(url, options) {\r\n if (options === void 0) { options = {}; }\r\n options = options || {};\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n this.id = options.id || makeGuid_1.default();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n }\r\n else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n this._source = undefined;\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n this._legendContent = '';\r\n if (this._legendCheckbox) {\r\n this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n else {\r\n this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBase.prototype._load = function () {\r\n if (this.loaded == true) {\r\n return true;\r\n }\r\n else {\r\n this._loaded = true;\r\n return false;\r\n }\r\n };\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n LayerBase.prototype.getLegendDiv = function () {\r\n return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n };\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n if (additionalContent === void 0) { additionalContent = ''; }\r\n var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n this._legendContent += additionalContent;\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n };\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n this._addLegendContent(additionalContent);\r\n };\r\n LayerBase.prototype.applyCollapse = function () {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n return undefined;\r\n }\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n var $expander = this._$legendDiv.find('.legend-items-expander');\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n $expander.click(function () {\r\n var $this = $(this);\r\n $this.siblings('ul').slideToggle();\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n }\r\n else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * trick to refresh the layer\r\n */\r\n LayerBase.prototype.refresh = function () {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"id\", {\r\n get: function () {\r\n return this._id;\r\n },\r\n set: function (newId) {\r\n this._id = newId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n get: function () {\r\n return this._animate;\r\n },\r\n set: function (animate) {\r\n this._animate = animate;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._legendContent;\r\n },\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set: function (newVal) {\r\n this._legendContent = newVal;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"params\", {\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._params;\r\n },\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set: function (newParams) {\r\n this._params = newParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"url\", {\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._url;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set: function (visibility) {\r\n this.setVisible(visibility);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setVisible = function (visibility) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get: function () {\r\n return this._opacity;\r\n },\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set: function (opacity) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"name\", {\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._name;\r\n },\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set: function (newName) {\r\n this._name = newName;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._loaded;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"source\", {\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getSource = function () {\r\n return this._source;\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n /**\r\n * get the z index\r\n */\r\n get: function () {\r\n return this._zIndex;\r\n },\r\n /**\r\n * set the z index\r\n */\r\n set: function (newZ) {\r\n this._zIndex = newZ;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setZIndex = function (newZ) {\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n /**\r\n * the the ol layer\r\n */\r\n get: function () {\r\n return this.getOlLayer();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getOlLayer = function () {\r\n return this._olLayer;\r\n };\r\n return LayerBase;\r\n}());\r\nexports.LayerBase = LayerBase;\r\nnm.LayerBase = LayerBase;\r\nexports.default = LayerBase;\r\n\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar ol = __webpack_require__(2);\r\nvar projections_1 = __webpack_require__(8);\r\nvar invalidClass = 'geocoder-invalid';\r\nvar geocoderLoadingClass = 'geocoder-loading';\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\nvar Geocode = (function () {\r\n function Geocode(mapDiv, map) {\r\n var _this = this;\r\n var inputGuid = makeGuid_1.makeGuid();\r\n var buttonGuid = makeGuid_1.makeGuid();\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }),\r\n stroke: new ol.style.Stroke({ color: 'red', width: 1 })\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n (\"<input type=\\\"text\\\" id=\\\"\" + inputGuid + \"\\\">\") +\r\n (\"<button id=\\\"\" + buttonGuid + \"\\\">Search</button>\") +\r\n '</div>');\r\n this.theButton = document.getElementById(buttonGuid);\r\n this.theInput = document.getElementById(inputGuid);\r\n this.reset();\r\n var $theButton = $(this.theButton);\r\n var $theInput = $(this.theInput);\r\n $theButton.click(function (evt) {\r\n evt.preventDefault();\r\n $theButton.addClass(geocoderLoadingClass);\r\n _this.theButton.disabled = true;\r\n _this.indicationLayer.getSource().clear();\r\n $.get(\"https://geocode.xyz/\" + _this.theInput.value + \"?geoit=json\", {}, function (d) {\r\n var lat = parseFloat(d['latt']);\r\n var lon = parseFloat(d['longt']);\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n _this.theInput.title = 'Specified Location Invalid';\r\n _this.theButton.title = 'Specified Location Invalid';\r\n }\r\n else {\r\n var v = _this.map.getView();\r\n var p = new ol.geom.Point([lon, lat]);\r\n var feat = new ol.Feature(p);\r\n _this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(projections_1.proj4326, projections_1.proj3857);\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n $theButton.removeClass(geocoderLoadingClass);\r\n _this.theButton.disabled = false;\r\n }, 'json');\r\n });\r\n $(this.theInput).keyup(function (evt) {\r\n evt.preventDefault();\r\n _this.theButton.disabled = _this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n _this.theInput.title = '';\r\n _this.theButton.title = '';\r\n if (!_this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n });\r\n }\r\n Geocode.prototype.reset = function () {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n };\r\n return Geocode;\r\n}());\r\nexports.Geocode = Geocode;\r\n\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar checkDefined = __webpack_require__(9);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nvar MapMoveCls = (function (_super) {\r\n __extends(MapMoveCls, _super);\r\n /**\r\n * constructor called implicitly\r\n */\r\n function MapMoveCls() {\r\n var _this = _super.call(this, 'map move') || this;\r\n _this._arrLyrRequest = [];\r\n _this._arrLyrTimeout = [];\r\n _this._arrLayer = [];\r\n _this._lookupLayer = {};\r\n _this._mapMoveCallbacks = [];\r\n _this._mapMoveCallbacksLookup = {};\r\n _this._mapMoveCallbackDelays = [];\r\n _this._mapMoveCallbackContext = [];\r\n _this._mapMoveCallbackTimeout = [];\r\n _this._mapExtent = undefined;\r\n _this._zoomLevel = undefined;\r\n return _this;\r\n }\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n MapMoveCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n _this._updateMapExtent();\r\n // trigger the layer updates\r\n for (var i = 0; i < _this._arrLayer.length; i++) {\r\n _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n }\r\n // trigger the map callbacks\r\n for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n _this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n };\r\n MapMoveCls.prototype._updateMapExtent = function () {\r\n var theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n var extentArray = theView.calculateExtent(this.map.getSize());\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n };\r\n Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n /**\r\n * return the map extent\r\n */\r\n get: function () {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n return this._mapExtent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n }\r\n else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n }\r\n else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n // dummy callback used if before load returns false\r\n var callbackFunc = function () { };\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n var __this_1 = this;\r\n callbackFunc = function () {\r\n function innerFunction(theLayer, theIndex) {\r\n var _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this_1, lyr, index);\r\n };\r\n }\r\n else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n };\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n throw 'either the function index or the id must be defined';\r\n }\r\n if (typeof ind !== 'number') {\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n if (ind < 0) {\r\n console.log('function not found');\r\n return;\r\n }\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n var ctx = this._mapMoveCallbackContext[ind];\r\n var theFunc = this._mapMoveCallbacks[ind];\r\n var __this = this;\r\n var f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n };\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n };\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId) {\r\n functionId = makeGuid_1.default();\r\n }\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n };\r\n return MapMoveCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapMoveCls = MapMoveCls;\r\nnm.MapMoveCls = MapMoveCls;\r\nexports.default = MapMoveCls;\r\n\n\n/***/ }),\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\nvar FeatureLayerProperties = (function () {\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n get: function () {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n }\r\n else {\r\n return this.layer.name;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FeatureLayerProperties;\r\n}());\r\nexports.FeatureLayerProperties = FeatureLayerProperties;\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nvar MapPopupCls = (function (_super) {\r\n __extends(MapPopupCls, _super);\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n /**\r\n * map popup constructor\r\n */\r\n function MapPopupCls() {\r\n var _this = _super.call(this, 'map popup') || this;\r\n _this._arrPopupLayerIds = [];\r\n _this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n _this._arrPopupContentFunction = [];\r\n _this._$popupContainer = undefined;\r\n _this._$popupContent = undefined;\r\n _this._$popupCloser = undefined;\r\n _this._popupOverlay = undefined;\r\n _this._selectionLayers = [];\r\n _this._selectionLayerLookup = {};\r\n _this._mapClickFunctions = [];\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n _this._popupChangedFunctions = [];\r\n _this._esriMapServiceLayers = [];\r\n _this._popupOpen = false;\r\n _this._popupCoordinate = null;\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n _this._popupContentLength = 0;\r\n return _this;\r\n }\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n MapPopupCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n var $map;\r\n var target = this.map.getTarget();\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n $map.append('<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>');\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n var _ease = function (n) {\r\n return ol.easing.inAndOut(n);\r\n };\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n this._map.addOverlay(this._popupOverlay);\r\n this._$popupCloser.click(function (evt) {\r\n _this.closePopup();\r\n });\r\n // display popup on click\r\n this._map.on('singleclick', function (evt) {\r\n _this.closePopup();\r\n _this._popupCoordinate = evt['coordinate'];\r\n // esri map service layers\r\n if (_this._esriMapServiceLayers.length > 0) {\r\n var queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n imageDisplay: _this._map.getSize().join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n var l = _a[_i];\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n var featObj = layerFeatureObjectArray[i];\r\n var props = featObj.feature.getProperties();\r\n var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n }\r\n else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse;\r\n _this._passThroughLayerFeatureArray.push(featObj);\r\n }\r\n else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n _this._currentPopupIndex = -1;\r\n var popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n popupHtml += \"<span> of </span>\";\r\n popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n popupHtml += \"<span> - </span>\";\r\n popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n popupHtml += '</div>';\r\n _this._$popupContent.html(popupHtml);\r\n _this._$popupContent.find('.previous-popup').click(function () {\r\n if (_this._popupContentLength == 1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == 0) {\r\n _this._currentPopupIndex = _this._popupContentLength - 1;\r\n }\r\n else {\r\n _this._currentPopupIndex--;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n var nextPopup = _this._$popupContent.find('.next-popup');\r\n nextPopup.click(function () {\r\n if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n _this._currentPopupIndex = 0;\r\n }\r\n else {\r\n _this._currentPopupIndex++;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n if (_this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n _this._$popupContent.scrollTop(0);\r\n _this._popupOpen = true;\r\n }\r\n });\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', function (evt) {\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n var hit = false;\r\n _this.map.forEachFeatureAtPixel(pixel, function (f, l) {\r\n if (hit) {\r\n return;\r\n }\r\n for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) {\r\n var vLyr = _a[_i];\r\n if (vLyr.olLayer == l) {\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n var mapElement = _this.map.getTargetElement();\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n };\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n MapPopupCls.prototype._triggerFeatSelect = function () {\r\n var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f(this._$popupContent);\r\n }\r\n };\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n featLayerObject.popupContent = popupContent;\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n };\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n var _this = this;\r\n var layerFeatureObjectArray = [];\r\n this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n var hasLyr = false;\r\n var j;\r\n var lyr = null;\r\n for (j = 0; j < _this._arrPopupLayers.length; j++) {\r\n lyr = _this._arrPopupLayers[j];\r\n if (lyr.olLayer === layer) {\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j]));\r\n }\r\n });\r\n return layerFeatureObjectArray;\r\n };\r\n MapPopupCls.prototype.closePopup = function () {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n return false;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n };\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n this._checkInit();\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n var theStyle;\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n }\r\n else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n var selectionLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n });\r\n selectionLayer.setZIndex(100);\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n return selectionLayer;\r\n };\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n return selectionLayer;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n };\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n return selectionLayer;\r\n };\r\n MapPopupCls.prototype.clearSelection = function () {\r\n this._checkInit();\r\n for (var i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f();\r\n }\r\n };\r\n ;\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n this._mapClickFunctions.push(func);\r\n };\r\n return MapPopupCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapPopupCls = MapPopupCls;\r\nnm.MapPopupCls = MapPopupCls;\r\nexports.default = MapPopupCls;\r\n\n\n/***/ }),\n\n/***/ 14:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar geocode_1 = __webpack_require__(11);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nfunction quickMapBase(options) {\r\n if (options === void 0) { options = {}; }\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || { x: -10018378, y: 5574910 };\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n var $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n var osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac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lSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB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5ErkJggg==')\";\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n var coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n var controls = ol.control.defaults({\r\n attributionOptions: { collapsible: false }\r\n });\r\n var view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n var map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n if (options.addGeocode) {\r\n new geocode_1.Geocode(document.getElementById(options.divId), map);\r\n }\r\n return map;\r\n}\r\nexports.quickMapBase = quickMapBase;\r\nnm.quickMapBase = quickMapBase;\r\nexports.default = quickMapBase;\r\n\n\n/***/ }),\n\n/***/ 17:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\nvar _zoomResLookup = [\r\n 156543.03392804097,\r\n 78271.51696402048,\r\n 39135.75848201024,\r\n 19567.87924100512,\r\n 9783.93962050256,\r\n 4891.96981025128,\r\n 2445.98490512564,\r\n 1222.99245256282,\r\n 611.49622628141,\r\n 305.748113140705,\r\n 152.8740565703525,\r\n 76.43702828517625,\r\n 38.21851414258813,\r\n 19.109257071294063,\r\n 9.554628535647032,\r\n 4.777314267823516,\r\n 2.388657133911758,\r\n 1.194328566955879,\r\n 0.5971642834779395,\r\n 0.29858214173896974,\r\n 0.14929107086948487,\r\n 0.07464553543474244,\r\n 0.03732276771737122,\r\n 0.01866138385868561,\r\n 0.009330691929342804,\r\n 0.004665345964671402,\r\n 0.002332672982335701,\r\n 0.0011663364911678506,\r\n 0.0005831682455839253 //28\r\n];\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nfunction zoomToResolution(zoomLevel) {\r\n \"use strict\";\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n }\r\n else {\r\n console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n return undefined;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.zoomToResolution = zoomToResolution;\r\nnm.zoomToResolution = zoomToResolution;\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nfunction resolutionToZoom(resolution) {\r\n for (var i = 0; i < _zoomResLookup.length; i++) {\r\n if (resolution >= _zoomResLookup[i]) {\r\n return i;\r\n }\r\n }\r\n return 0;\r\n}\r\nexports.resolutionToZoom = resolutionToZoom;\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports) {\n\nmodule.exports = ol;\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapPopupCls_1 = __webpack_require__(13);\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexports.mapPopup = new mapPopupCls_1.default();\r\nexports.default = exports.mapPopup;\r\n\n\n/***/ }),\n\n/***/ 44:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBase_1 = __webpack_require__(10);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nvar LayerBaseVector = (function (_super) {\r\n __extends(LayerBaseVector, _super);\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n function LayerBaseVector(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, url, options) || this;\r\n options = options;\r\n //prevent regular load if no url has been provided\r\n if (_this.url.trim() == '') {\r\n _this._loaded = true;\r\n }\r\n _this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n if (_this.visible) {\r\n _this._autoLoad = true;\r\n }\r\n else {\r\n _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n if (options.mapMoveObj) {\r\n _this._mapMove = options.mapMoveObj;\r\n }\r\n else {\r\n _this._mapMove = _this._onDemand ? mapMove_1.default : undefined;\r\n }\r\n _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () { return {}; };\r\n if (_this._onDemand) {\r\n _this._loaded = true;\r\n _this._mapMoveParams = {};\r\n _this._mapMove.checkInit();\r\n _this._mapMove.addVectorLayer(_this);\r\n }\r\n _this._source = new ol.source.Vector();\r\n _this._olLayer = new ol.layer.Vector({\r\n source: _this._source,\r\n visible: _this.visible,\r\n style: _this.style,\r\n minResolution: _this._minResolution,\r\n maxResolution: _this._maxResolution,\r\n renderOrder: options.renderOrder\r\n });\r\n _this.olLayer.setZIndex(_this._zIndex);\r\n _this._projectionMap = null;\r\n _this._projection4326 = new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n _this._olLayer.setOpacity(_this.opacity);\r\n return _this;\r\n }\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n LayerBaseVector.prototype.addFeatures = function (featureCollection) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n };\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n return this.visible;\r\n };\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n };\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n LayerBaseVector.prototype.mapMoveCallback = function (d) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n };\r\n /**\r\n * clear features in the layer\r\n */\r\n LayerBaseVector.prototype.clear = function () {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n };\r\n Object.defineProperty(LayerBaseVector.prototype, \"onDemandDelay\", {\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get: function () {\r\n return this._onDemandDelay;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"autoLoad\", {\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get: function () {\r\n return this._autoLoad;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"style\", {\r\n /**\r\n * get the style definition\r\n */\r\n get: function () {\r\n return this._style;\r\n },\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set: function (style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapCrs\", {\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get: function () {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapProj\", {\r\n get: function () {\r\n if (this._projectionMap != null) {\r\n return this._projectionMap;\r\n }\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n }\r\n else {\r\n return null;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapMove\", {\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get: function () {\r\n return this._mapMove;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"mapMoveParams\", {\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._mapMoveParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"visible\", {\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set: function (visibility) {\r\n _super.prototype.setVisible.call(this, visibility);\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"source\", {\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"features\", {\r\n /**\r\n * array of ol features\r\n */\r\n get: function () {\r\n return this.source.getFeatures();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBaseVector.prototype, \"olLayer\", {\r\n /**\r\n *\r\n */\r\n get: function () {\r\n return _super.prototype.getOlLayer.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBaseVector.prototype.setZIndex = function (newZ) {\r\n this.olLayer.setZIndex(newZ);\r\n };\r\n return LayerBaseVector;\r\n}(LayerBase_1.LayerBase));\r\nexports.LayerBaseVector = LayerBaseVector;\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexports.default = LayerBaseVector;\r\n\n\n/***/ }),\n\n/***/ 48:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar LayerBaseVector_1 = __webpack_require__(44);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar proj = __webpack_require__(8);\r\nvar projections_1 = __webpack_require__(8);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nvar LayerBaseVectorGeoJson = (function (_super) {\r\n __extends(LayerBaseVectorGeoJson, _super);\r\n /**\r\n * @param {string|null} url - resource url, set to '' to make blank layer\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n *\r\n * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n */\r\n function LayerBaseVectorGeoJson(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = this;\r\n url = typeof url == 'string' ? url : '';\r\n _this = _super.call(this, url, options) || this;\r\n _this._geoJsonFormat = new ol.format.GeoJSON();\r\n _this._transform = options.transform || {};\r\n _this._transform.dataProjection = _this._transform.dataProjection || proj.proj4326;\r\n _this._transform.featureProjection = _this._transform.featureProjection || projections_1.proj3857;\r\n if (_this.autoLoad || _this.visible) {\r\n _this._load();\r\n }\r\n return _this;\r\n }\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - as geojson object\r\n */\r\n LayerBaseVectorGeoJson.prototype.addFeatures = function (featureCollection) {\r\n this.source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, { dataProjection: this._transform.dataProjection,\r\n featureProjection: this._transform.featureProjection }));\r\n };\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBaseVectorGeoJson.prototype._load = function () {\r\n var _this = this;\r\n if (_super.prototype._load.call(this)) {\r\n return true;\r\n }\r\n $.get(this._url, this._params, function (d) {\r\n _this.addFeatures(d);\r\n _this.loadCallback(_this);\r\n }, 'json').fail(function () {\r\n this._loaded = false;\r\n });\r\n return false;\r\n };\r\n /**\r\n * callback function on map move\r\n * @param {object} d the json response\r\n * @override\r\n */\r\n LayerBaseVectorGeoJson.prototype.mapMoveCallback = function (d) {\r\n _super.prototype.mapMoveCallback.call(this, d);\r\n this._source.addFeatures(this._geoJsonFormat.readFeatures(d, { featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection }));\r\n };\r\n return LayerBaseVectorGeoJson;\r\n}(LayerBaseVector_1.LayerBaseVector));\r\nexports.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexports.default = LayerBaseVectorGeoJson;\r\n\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * base interaction\r\n */\r\nvar MapInteractionBase = (function () {\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n function MapInteractionBase(subtype) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n MapInteractionBase.prototype.init = function (theMap) {\r\n if (!this._initialized) {\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n };\r\n Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get: function () {\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get: function () {\r\n return this._initialized;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n MapInteractionBase.prototype._checkInit = function () {\r\n if (!this.initialized) {\r\n var msg = this._subtype + \" object not initialized\";\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n };\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n MapInteractionBase.prototype.checkInit = function () {\r\n this._checkInit();\r\n };\r\n return MapInteractionBase;\r\n}());\r\nexports.MapInteractionBase = MapInteractionBase;\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexports.default = MapInteractionBase;\r\n\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMapBase_1 = __webpack_require__(14);\r\nvar provide_1 = __webpack_require__(0);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nfunction quickMap(options) {\r\n if (options === void 0) { options = {}; }\r\n var m = quickMapBase_1.quickMapBase(options);\r\n mapMove_1.default.init(m);\r\n mapPopup_1.default.init(m);\r\n return m;\r\n}\r\nexports.quickMap = quickMap;\r\nnm.quickMap = quickMap;\r\nexports.default = quickMap;\r\n\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapMoveCls_1 = __webpack_require__(12);\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\nexports.mapMove = new mapMoveCls_1.default();\r\nexports.default = exports.mapMove;\r\n\n\n/***/ }),\n\n/***/ 73:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMap_1 = __webpack_require__(6);\r\nvar LayerBaseVectorGeoJson_1 = __webpack_require__(48);\r\nvar ol = __webpack_require__(2);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar reg = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": { \"type\": \"name\", \"properties\": { \"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\" } },\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-91.4232, 43.9834], [-91.3246, 43.9834], [-91.3465, 44.0162], [-91.3082, 44.0655], [-91.2205, 44.0546], [-91.1767, 44.0874], [-91.1493, 44.0819], [-90.9741, 44.071], [-90.9741, 44.071], [-90.9796, 44.1312], [-90.9084, 44.1586], [-90.4921, 44.1586], [-90.3114, 44.1531], [-90.3114, 44.2463], [-90.0813, 44.2463], [-89.9006, 44.2517], [-89.928, 44.197], [-89.9061, 44.1805], [-89.928, 44.1531], [-89.9718, 44.1696], [-90.0266, 44.071], [-89.9608, 43.9779], [-89.9499, 43.9231], [-89.9828, 43.9122], [-89.9608, 43.8629], [-89.8513, 43.7698], [-89.7856, 43.6383], [-89.5994, 43.6438], [-89.2434, 43.6438], [-89.0079, 43.6328], [-88.8874, 43.6328], [-88.3999, 43.6328], [-88.3999, 43.5452], [-88.4163, 43.1947], [-88.5368, 43.1947], [-88.5423, 42.8442], [-88.5478, 42.8442], [-88.7778, 42.8442], [-88.7778, 42.4936], [-88.9421, 42.4936], [-89.3639, 42.4991], [-89.4022, 42.4991], [-89.8404, 42.5046], [-89.928, 42.5046], [-90.4264, 42.5046], [-90.64, 42.5101], [-90.7112, 42.636], [-90.8974, 42.6744], [-91.0672, 42.7511], [-91.1548, 42.9866], [-91.1767, 43.0797], [-91.1767, 43.1344], [-91.0562, 43.2549], [-91.1055, 43.3152], [-91.2041, 43.3535], [-91.2041, 43.4247], [-91.2315, 43.4576], [-91.2151, 43.5014], [-91.2698, 43.6164], [-91.2589, 43.7259], [-91.2424, 43.7752], [-91.2863, 43.8464]]]\r\n }\r\n }\r\n ]\r\n};\r\nvar reg2 = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": { \"type\": \"name\", \"properties\": { \"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\" } },\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-93.0, 45.0], [-94.0, 45.0], [-94.0, 46.0], [-93.0, 46.0], [-93.0, 45.0]]]\r\n }\r\n }\r\n ]\r\n};\r\nvar map = quickMap_1.default({ addGeocode: true });\r\nvar regionLayer = new LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson('', {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'blue'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n});\r\nvar regionLayer2 = new LayerBaseVectorGeoJson_1.LayerBaseVectorGeoJson('', {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'red'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n});\r\nregionLayer.addFeatures(reg);\r\nregionLayer2.addFeatures(reg2);\r\nmap.addLayer(regionLayer.olLayer);\r\nmap.addLayer(regionLayer2.olLayer);\r\nmapPopup_1.mapPopup.addVectorPopup(regionLayer2, function (p) { return 'cats'; });\r\nwindow['map'] = map;\r\n//\r\n// let itsLayerCollection = new ItsLayerCollection(map);\r\n//\r\n// let layerArray = [\r\n// {\r\n// groupName: 'ITS Inventory Layers',\r\n// collapse: false,\r\n// addCheck: true,\r\n// items: itsLayerCollection.layers\r\n// }\r\n// ];\r\n// let legend = new LayerLegend(layerArray, 'legend-container', {});\r\nconsole.log('it works');\r\n\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nvar ol = __webpack_require__(2);\r\nexports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' });\r\nexports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' });\r\nexports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' });\r\n\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util.checkDefined');\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nfunction undefinedOrNull(input) {\r\n \"use strict\";\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\nexports.undefinedOrNull = undefinedOrNull;\r\nnm.undefinedOrNull = undefinedOrNull;\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nfunction definedAndNotNull(input) {\r\n \"use strict\";\r\n return !(undefinedOrNull(input));\r\n}\r\nexports.definedAndNotNull = definedAndNotNull;\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// mapPopup.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 73);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 99693f14fcb3e83c98ca","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (f, l) => {\r\n if (hit) {\r\n return;\r\n }\r\n\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == l){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss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v6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw4scxNysnHxU7nSspTRcJjCZGL3IsjsYJMMg5mwgx7gaIOLBFCogAgBBoNa9w+DE6I+Bs7FTgwwrJbHjWDgpYo2KwtBTcYEDuloC9geQw+k2RGnPGpTaOlq7AS+YICUz4DZ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AAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHjKTHPPBo8CSJISqqq4wGGOcWylIGlgvgNX1Gd8vF5f+IUIwb30ng+Gg2QfBRIMvy0jG8SVkYo4N0zvUXVRztbJ/L6xL7lUZEXBEHkuZqlS6gEAUgKJurnhFtfpACOYd8b/hVbJPqwi44a6KA0sPVjIi/SIyxb3u8KlAJ0S8jRVgrlW+nVHPdrhiXCxu42d86ByksDc80P3MkJFBFQ8Ho1lQegpWJRWFGsDsRwwv7p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3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","import {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport mapMove from '../olHelpers/mapMove';\r\nimport MapMoveCls from '../olHelpers/mapMoveCls'\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\nexport interface makeMapMoveParams {\r\n /**\r\n *\r\n * @param lyr\r\n * @param extent\r\n * @param zoomLevel\r\n */\r\n (lyr: LayerBaseVector, extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel?: number): any\r\n}\r\n\r\n\r\n\r\nexport interface LayerBaseVectorOptions extends LayerBaseOptions{\r\n autoLoad?: boolean;\r\n style?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n onDemand?: boolean;\r\n onDemandDelay?: number;\r\n mapMoveMakeGetParams?: makeMapMoveParams;\r\n mapMoveObj?: MapMoveCls;\r\n renderOrder?: (a: ol.Feature, b: ol.Feature) => number;\r\n\r\n}\r\n\r\n\r\n\r\n/**\r\n * The Vector layer base\r\n * @augments LayerBase\r\n * @abstract\r\n */\r\nexport class LayerBaseVector extends LayerBase {\r\n _olLayer: ol.layer.Vector;\r\n _source: ol.source.Vector;\r\n _style: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n _autoLoad: boolean;\r\n _onDemand: boolean;\r\n _onDemandDelay: number;\r\n _mapMoveMakeGetParams: makeMapMoveParams;\r\n _mapMoveParams: any;\r\n _mapMove: MapMoveCls;\r\n _projectionMap: ol.proj.Projection;\r\n _projection4326: ol.proj.Projection;\r\n\r\n\r\n\r\n /**\r\n * The base vector layer\r\n * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n *\r\n */\r\n constructor(url: string, options: LayerBaseVectorOptions = {}) {\r\n super(url, options);\r\n\r\n options = options as LayerBaseVectorOptions;\r\n\r\n //prevent regular load if no url has been provided\r\n if (this.url.trim() == '') {\r\n this._loaded = true;\r\n }\r\n\r\n this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\r\n if (this.visible) {\r\n this._autoLoad = true;\r\n } else {\r\n this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n }\r\n\r\n this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\r\n if (options.mapMoveObj) {\r\n this._mapMove = options.mapMoveObj;\r\n } else {\r\n this._mapMove = this._onDemand ? mapMove : undefined;\r\n }\r\n\r\n\r\n this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n function () {return {};};\r\n\r\n if (this._onDemand) {\r\n this._loaded = true;\r\n this._mapMoveParams = {};\r\n this._mapMove.checkInit();\r\n this._mapMove.addVectorLayer(this);\r\n }\r\n\r\n this._source = new ol.source.Vector();\r\n\r\n\r\n this._olLayer = new ol.layer.Vector(\r\n {\r\n source: this._source,\r\n visible: this.visible,\r\n style: this.style,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution,\r\n renderOrder: options.renderOrder\r\n }\r\n );\r\n\r\n this.olLayer.setZIndex(this._zIndex);\r\n\r\n this._projectionMap = null;\r\n this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\r\n this._olLayer.setOpacity(this.opacity)\r\n }\r\n\r\n /**\r\n * dummy to be overridden\r\n * @param {object} featureCollection - geojson or esrijson object\r\n */\r\n addFeatures(featureCollection: Object) {\r\n console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n }\r\n\r\n /**\r\n * Before call to map move callback, can prevent call by returning false\r\n * @param {number} zoom - zoom level\r\n * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n * @returns {boolean} if the call should proceed\r\n */\r\n mapMoveBefore(zoom: number, evtType: string) {\r\n if (this.minZoom !== undefined) {\r\n if (zoom < this.minZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n if (this.maxZoom !== undefined) {\r\n if (zoom > this.maxZoom) {\r\n return false;\r\n }\r\n }\r\n\r\n return this.visible;\r\n }\r\n\r\n /**\r\n * callback to generate the parameters passed in the get request\r\n * @param {object} extent - extent object\r\n * @param {number} extent.minX - minX\r\n * @param {number} extent.minY - minY\r\n * @param {number} extent.maxX - maxX\r\n * @param {number} extent.maxY - maxY\r\n * @param {number} zoomLevel - zoom level\r\n */\r\n mapMoveMakeGetParams(extent: {minX: number, minY: number, maxX: number, maxY: number}, zoomLevel: number) {\r\n this._mapMoveParams = {};\r\n $.extend(this._mapMoveParams, this.params);\r\n $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d - the json response\r\n */\r\n mapMoveCallback(d: Object) {\r\n if (this.source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * clear features in the layer\r\n */\r\n clear() {\r\n if (this._source) {\r\n this._source.clear();\r\n }\r\n }\r\n\r\n /**\r\n * get on demand delay in miliseconds\r\n */\r\n get onDemandDelay(): number {\r\n return this._onDemandDelay;\r\n }\r\n\r\n /**\r\n * get if the layer is autoloaded\r\n */\r\n get autoLoad(): boolean {\r\n return this._autoLoad;\r\n }\r\n\r\n /**\r\n * get the style definition\r\n */\r\n get style(): ol.StyleFunction|Array<ol.style.Style>|ol.style.Style {\r\n return this._style;\r\n }\r\n\r\n /**\r\n * set the style\r\n * @param style - the style or function\r\n */\r\n set style(style: ol.StyleFunction|Array<ol.style.Style>|ol.style.Style) {\r\n this._style = style;\r\n this.olLayer.setStyle(this._style as ol.style.Style);\r\n }\r\n\r\n /**\r\n * get the map CRS if it is defined by the map move object\r\n */\r\n get mapCrs(): string {\r\n return this.mapProj == null ? null : this.mapProj.getCode();\r\n }\r\n\r\n get mapProj(): ol.proj.Projection{\r\n if (this._projectionMap != null){\r\n return this._projectionMap;\r\n }\r\n\r\n if (this._mapMove) {\r\n this._projectionMap = this._mapMove.map.getView().getProjection();\r\n return this._projectionMap;\r\n } else {\r\n return null;\r\n }\r\n\r\n }\r\n\r\n /**\r\n * get the map move object\r\n * @type {MapMoveCls|*}\r\n */\r\n get mapMove(): MapMoveCls {\r\n return this._mapMove;\r\n }\r\n\r\n /**\r\n * map move params\r\n * @type {object}\r\n */\r\n get mapMoveParams() {\r\n return this._mapMoveParams;\r\n }\r\n\r\n get visible(): boolean{\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * Set the layer visibility\r\n * @type {boolean}\r\n * @override\r\n */\r\n set visible(visibility) {\r\n super.setVisible(visibility);\r\n\r\n if (this._onDemand) {\r\n this.mapMove.triggerLyrLoad(this);\r\n }\r\n }\r\n\r\n /**\r\n * get the layer vector source\r\n * @override\r\n */\r\n get source(): ol.source.Vector {\r\n return this.getSource() as ol.source.Vector;\r\n }\r\n\r\n /**\r\n * array of ol features\r\n */\r\n get features(): Array<ol.Feature> {\r\n return this.source.getFeatures();\r\n }\r\n\r\n /**\r\n *\r\n */\r\n get olLayer(): ol.layer.Vector {\r\n return super.getOlLayer() as ol.layer.Vector;\r\n }\r\n\r\n protected setZIndex(newZ: number) {\r\n this.olLayer.setZIndex(newZ);\r\n }\r\n}\r\n\r\nnm.LayerBaseVector = LayerBaseVector;\r\nexport default LayerBaseVector;\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVector.ts","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport {LayerBaseVector, LayerBaseVectorOptions} from './LayerBaseVector';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport {proj3857} from \"../olHelpers/projections\";\r\n\r\nlet nm = provide('layers');\r\n\r\nexport interface crsTransform {\r\n dataProjection?: ol.proj.Projection;\r\n featureProjection?: ol.proj.Projection;\r\n}\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions {\r\n transform?: crsTransform;\r\n mapMoveObj?: MapMoveCls;\r\n}\r\n\r\n/**\r\n * The Vector GeoJson Layer\r\n * @augments LayerBaseVector\r\n */\r\nexport class LayerBaseVectorGeoJson extends LayerBaseVector {\r\n _geoJsonFormat: ol.format.GeoJSON;\r\n _transform: crsTransform;\r\n\r\n /**\r\n * @param {string|null} url - resource url, set to '' to make blank layer\r\n * @param {object} options - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n *\r\n * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n *\r\n * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n */\r\n constructor(url?: string, options: LayerBaseVectorGeoJsonOptions = {}) {\r\n url = typeof url == 'string' ? url : '';\r\n super(url, options);\r\n\r\n this._geoJsonFormat = new ol.format.GeoJSON();\r\n\r\n this._transform = options.transform || {};\r\n this._transform.dataProjection = this._transform.dataProjection || proj.proj4326;\r\n this._transform.featureProjection = this._transform.featureProjection || proj3857;\r\n\r\n if (this.autoLoad || this.visible) {\r\n this._load();\r\n }\r\n }\r\n\r\n /**\r\n * add feature collection\r\n * @param {object} featureCollection - as geojson object\r\n */\r\n addFeatures(featureCollection: any) {\r\n this.source.addFeatures(\r\n this._geoJsonFormat.readFeatures(featureCollection,\r\n {dataProjection: this._transform.dataProjection,\r\n featureProjection: this._transform.featureProjection}\r\n )\r\n );\r\n }\r\n\r\n\r\n /**\r\n * trigger load features\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n\r\n if (super._load()) {\r\n return true;\r\n }\r\n\r\n $.get(this._url,\r\n this._params,\r\n (d) => {\r\n this.addFeatures(d);\r\n this.loadCallback(this);\r\n }, 'json').fail(\r\n function () {\r\n this._loaded = false;\r\n }\r\n );\r\n\r\n return false;\r\n }\r\n\r\n /**\r\n * callback function on map move\r\n * @param {object} d the json response\r\n * @override\r\n */\r\n mapMoveCallback(d: Object) {\r\n super.mapMoveCallback(d);\r\n this._source.addFeatures(this._geoJsonFormat.readFeatures(d,\r\n {featureProjection: this._transform.featureProjection, dataProjection: this._transform.dataProjection}));\r\n }\r\n}\r\n\r\nnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\nexport default LayerBaseVectorGeoJson;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBaseVectorGeoJson.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 12/18/2015.\r\n */\r\n\r\n\r\nimport ItsLayerCollection from '../../collections/ItsLayerCollection';\r\nimport LayerLegend from '../../collections/LayerLegend';\r\nimport quickMap from '../../olHelpers/quickMap';\r\nimport {LayerBaseVectorGeoJson} from '../../layers/LayerBaseVectorGeoJson';\r\nimport ol = require(\"custom-ol\");\r\nimport {mapPopup} from '../../olHelpers/mapPopup';\r\n\r\n\r\n\r\nconst reg = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": {\"type\": \"name\", \"properties\": {\"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\"}},\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-91.4232, 43.9834], [-91.3246, 43.9834], [-91.3465, 44.0162], [-91.3082, 44.0655], [-91.2205, 44.0546], [-91.1767, 44.0874], [-91.1493, 44.0819], [-90.9741, 44.071], [-90.9741, 44.071], [-90.9796, 44.1312], [-90.9084, 44.1586], [-90.4921, 44.1586], [-90.3114, 44.1531], [-90.3114, 44.2463], [-90.0813, 44.2463], [-89.9006, 44.2517], [-89.928, 44.197], [-89.9061, 44.1805], [-89.928, 44.1531], [-89.9718, 44.1696], [-90.0266, 44.071], [-89.9608, 43.9779], [-89.9499, 43.9231], [-89.9828, 43.9122], [-89.9608, 43.8629], [-89.8513, 43.7698], [-89.7856, 43.6383], [-89.5994, 43.6438], [-89.2434, 43.6438], [-89.0079, 43.6328], [-88.8874, 43.6328], [-88.3999, 43.6328], [-88.3999, 43.5452], [-88.4163, 43.1947], [-88.5368, 43.1947], [-88.5423, 42.8442], [-88.5478, 42.8442], [-88.7778, 42.8442], [-88.7778, 42.4936], [-88.9421, 42.4936], [-89.3639, 42.4991], [-89.4022, 42.4991], [-89.8404, 42.5046], [-89.928, 42.5046], [-90.4264, 42.5046], [-90.64, 42.5101], [-90.7112, 42.636], [-90.8974, 42.6744], [-91.0672, 42.7511], [-91.1548, 42.9866], [-91.1767, 43.0797], [-91.1767, 43.1344], [-91.0562, 43.2549], [-91.1055, 43.3152], [-91.2041, 43.3535], [-91.2041, 43.4247], [-91.2315, 43.4576], [-91.2151, 43.5014], [-91.2698, 43.6164], [-91.2589, 43.7259], [-91.2424, 43.7752], [-91.2863, 43.8464]]]\r\n }\r\n }\r\n ]\r\n};\r\n\r\nconst reg2 = {\r\n \"type\": \"FeatureCollection\",\r\n \"crs\": {\"type\": \"name\", \"properties\": {\"name\": \"urn:ogc:def:crs:OGC:1.3:CRS84\"}},\r\n \"features\": [\r\n {\r\n \"type\": \"Feature\",\r\n \"properties\": {},\r\n \"geometry\": {\r\n \"type\": \"Polygon\",\r\n \"coordinates\": [[[-93.0, 45.0], [-94.0, 45.0], [-94.0, 46.0], [-93.0, 46.0], [-93.0, 45.0]]]\r\n }\r\n }\r\n ]\r\n};\r\n\r\nlet map = quickMap({addGeocode: true});\r\n\r\n\r\n\r\n\r\n\r\nlet regionLayer = new LayerBaseVectorGeoJson(\r\n '',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'blue'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n });\r\n\r\nlet regionLayer2 = new LayerBaseVectorGeoJson(\r\n '',\r\n {\r\n minZoom: 6,\r\n maxZoom: 12,\r\n name: 'WisDOT Regions',\r\n style: new ol.style.Style({\r\n fill: new ol.style.Fill({\r\n color: 'red'\r\n }),\r\n stroke: new ol.style.Stroke({\r\n color: 'yellow',\r\n width: 5\r\n })\r\n })\r\n });\r\n\r\nregionLayer.addFeatures(reg);\r\nregionLayer2.addFeatures(reg2);\r\n\r\nmap.addLayer(regionLayer.olLayer);\r\nmap.addLayer(regionLayer2.olLayer);\r\n\r\nmapPopup.addVectorPopup(regionLayer2, (p) => {return 'cats'});\r\n\r\n\r\nwindow['map'] = map;\r\n//\r\n// let itsLayerCollection = new ItsLayerCollection(map);\r\n//\r\n// let layerArray = [\r\n// {\r\n// groupName: 'ITS Inventory Layers',\r\n// collapse: false,\r\n// addCheck: true,\r\n// items: itsLayerCollection.layers\r\n// }\r\n// ];\r\n\r\n// let legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\nconsole.log('it works');\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/mapPopup.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/my_little_test.js b/test/serve/js/my_little_test.js index d9615aec0b547713468280d7cc51fa52af8d6ade..ee8670784723ff5f6b3626ce8487d79e09baa730 100644 --- a/test/serve/js/my_little_test.js +++ b/test/serve/js/my_little_test.js @@ -1,482 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 75); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), - -/***/ 48: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/2/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var range_change_1 = __webpack_require__(52); -var $ = __webpack_require__(1); -var nm = provide_1.default('domUtil'); -/** - * @callback mediaCallback - * @param {number} tm - */ -function timeToLocalDateString(tm) { - "use strict"; - var d = new Date(tm); - var p1 = d.toLocaleTimeString().split(' '); - var p2 = p1[0].split(':'); - p2 = p2.slice(0, 2); - return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1]; -} -var MediaControl = (function () { - /** - * - * @param element - * @param changeFunc - * @param mediaConfig - */ - function MediaControl(element, changeFunc, mediaConfig) { - if (changeFunc === void 0) { changeFunc = function () { - return; - }; } - if (mediaConfig === void 0) { mediaConfig = {}; } - var _this = this; - mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0; - mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100; - mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0; - mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5; - mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500; - mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false; - if (typeof element == 'string') { - this._container = $('#' + element); - } - else if (typeof element.style !== 'undefined') { - this._container = $(element); - } - else { - this._container = element; - } - this._container.addClass('media-control-container'); - this._playInterval = mediaConfig.playInterval; - this._changeFunc = changeFunc; - this._showAsDate = mediaConfig.showAsDate; - this._currentValue = undefined; - this._min = undefined; - this._max = undefined; - this._step = undefined; - this._playing = false; - var htmlStr = '<span class="media-player-button media-back"></span>' + - '<span class="media-player-button media-play"></span>' + - '<span class="media-player-button media-pause media-disabled"></span>' + - '<span class="media-player-button media-stop media-disabled" ></span>' + - '<span class="media-player-button media-ahead"></span>' + - "<input type=\"range\">" + - "<div class=\"media-control-value-label-container\">" + - "<span class=\"media-control-value-label-min\"></span>" + - "<span class=\"media-control-value-label-val\"></span>" + - "<span class=\"media-control-value-label-max\"></span>" + - "</div>"; - this._container.append(htmlStr); - // let btnPause = this._container.find('.media-pause'); - var btnPlay = this._container.find('.media-play'); - this._$btnStop = this._container.find('.media-stop'); - var btnAhead = this._container.find('.media-ahead'); - var btnBack = this._container.find('.media-back'); - this._$slider = this._container.find('input[type=range]'); - this._$valLabelMin = this._container.find('.media-control-value-label-min'); - this._$valLabelVal = this._container.find('.media-control-value-label-val'); - this._$valLabelMax = this._container.find('.media-control-value-label-max'); - this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step); - range_change_1.rangeChange(this._$slider, function (newVal) { - _this.currentValue = newVal; - }, 100); - var ___this = this; - btnPlay.click(function () { - var $this = $(this); - $this.addClass('media-disabled'); - ___this._$btnStop.removeClass('media-disabled'); - btnAhead.addClass('media-locked'); - btnBack.addClass('media-locked'); - ___this._$slider.prop('disabled', true); - ___this._playing = true; - ___this._interval = setInterval(function () { - ___this.currentValue += ___this._step; - }, ___this._playInterval); - }); - this._$btnStop.click(function () { - clearInterval(___this._interval); - var $this = $(this); - $this.addClass('media-disabled'); - btnPlay.removeClass('media-disabled'); - btnAhead.removeClass('media-locked'); - btnBack.removeClass('media-locked'); - ___this._$slider.prop('disabled', false); - ___this._playing = false; - }); - btnAhead.click(function () { - ___this.currentValue = ___this.currentValue + ___this._step; - }); - btnBack.click(function () { - ___this.currentValue = ___this.currentValue - ___this._step; - }); - } - MediaControl.prototype.stopPlaying = function () { - if (this._playing) { - this._$btnStop.trigger('click'); - } - }; - Object.defineProperty(MediaControl.prototype, "playing", { - get: function () { - return this._playing; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "min", { - get: function () { - return this._min; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "max", { - get: function () { - return this._max; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "step", { - get: function () { - return this._step; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MediaControl.prototype, "currentValue", { - get: function () { - return this._currentValue; - }, - set: function (newValue) { - if (newValue > this._max) { - newValue = this._min; - } - else if (newValue < this._min) { - newValue = this._max; - } - this._currentValue = newValue; - this._$slider.val(this._currentValue.toFixed(2)); - if (this._showAsDate) { - this._$valLabelVal.html(timeToLocalDateString(this.currentValue)); - } - else { - this._$valLabelVal.html(this.currentValue.toString()); - } - this._changeFunc(newValue); - }, - enumerable: true, - configurable: true - }); - /** - * set min and max value with step - * @param {number} newMin the new min - * @param {number} newMax the new mas - * @param {number} [newValue=newMin] the value to set - * @param {number} [newStep=(newMax-newMin)/20] step value - */ - MediaControl.prototype.setMinMaxValueStep = function (newMin, newMax, newValue, newStep) { - this._min = newMin; - this._max = newMax; - newValue = typeof newValue == 'number' ? newValue : newMin; - newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20; - this._currentValue = newValue; - this._step = newStep; - this._$slider.prop('min', this.min.toString()); - this._$slider.prop('max', this.max.toString()); - this._$slider.prop('step', this.step.toString()); - this._$slider.val(this.currentValue.toString()); - if (this._showAsDate) { - this._$valLabelMin.html(timeToLocalDateString(this._min)); - this._$valLabelVal.html(timeToLocalDateString(this.currentValue)); - this._$valLabelMax.html(timeToLocalDateString(this._max)); - } - else { - this._$valLabelMin.html(this._min.toString()); - this._$valLabelVal.html(this.currentValue.toString()); - this._$valLabelMax.html(this._max.toString()); - } - }; - Object.defineProperty(MediaControl.prototype, "changeFunction", { - /** - * - * @param {mediaCallback} newFunc the callback on change - */ - set: function (newFunc) { - this._changeFunc = newFunc; - }, - enumerable: true, - configurable: true - }); - return MediaControl; -}()); -exports.MediaControl = MediaControl; -nm.MediaControl = MediaControl; - - -/***/ }), - -/***/ 52: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('domUtil'); -var mouseIn = false; -var mouseDown = false; -var timeout = null; -var dragged = false; -var lastVal; -/** - * Created by gavorhes on 11/2/2015. - */ -function triggerCallback(callback, evt) { - "use strict"; - var val = parseFloat(this.value); - var min = parseFloat(this.min); - var max = parseFloat(this.max); - var step = parseFloat(this.step); - if (max - val < step) { - val = max; - } - var percent = (val - min) / (max - min); - if (typeof lastVal == 'number' && val == lastVal) { - return; - } - lastVal = val; - callback(val, percent, evt); -} -/** - * Add a variety of listeners for range inputs applied to a common callback - * @param $slider - jquery reference to the slider - * @param {rangeChangeCallback} callback - the callback - * @param {number} [changeTimeout=75] before the callback is called - * @this {jQuery} - * @returns {jQuery} the jQuery object - */ -function rangeChange($slider, callback, changeTimeout) { - changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75; - $slider.mouseenter(function () { - mouseIn = true; - }); - $slider.mouseleave(function () { - mouseIn = false; - mouseDown = false; - }); - $slider.mousedown(function () { - mouseDown = true; - }); - $slider.mouseup(function () { - mouseDown = false; - }); - $slider.mousemove( - /** - * - * @param {object} evt - event properties - * @this {HTMLElement} - */ - function (evt) { - if (!(mouseIn && mouseDown)) { - return; - } - dragged = true; - if (lastVal == this['value']) { - return; - } - lastVal = this['value']; - if (timeout != null) { - clearTimeout(timeout); - } - var _this = this; - timeout = setTimeout(function () { - triggerCallback.call(_this, callback, evt); - timeout = null; - }, changeTimeout); - }); - $slider.keyup( - /** - * - * @param {object} evt - event properties - */ - function (evt) { - if (evt.keyCode == 37 || evt.keyCode == 39) { - triggerCallback.call(this, callback, evt); - } - }); - $slider.change(function (evt) { - if (dragged) { - dragged = false; - return; - } - triggerCallback.call(this, callback, evt); - }); - return this; -} -exports.rangeChange = rangeChange; -nm.rangeChange = rangeChange; - - -/***/ }), - -/***/ 75: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -// let g = new -var media_control_1 = __webpack_require__(48); -// -// -console.log('eat this fish'); -console.log('eat this fish'); -console.log('eat this bird'); -// -// let g = new ol3.source.Vector(); -// -// console.log(olx); -console.log('i am here5'); -function me(eat) { - if (eat === void 0) { eat = 1; } - console.log(eat, 'one'); -} -me(1); -var control = new media_control_1.MediaControl('map'); -// -// -// console.log(ol3); -// -// -// console.log(definedAndNotNull("fish")); -// console.log(definedAndNotNull("fish")); -// console.log(definedAndNotNull("fish")); -// console.log(definedAndNotNull("fish")); -// console.log(definedAndNotNull("fish")); -// console.log('here'); -// - - -/***/ }) - -/******/ }); +!function(e){function t(n){if(i[n])return i[n].exports;var a=i[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}var i={};t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=74)}({0:function(e,t,i){"use strict";function n(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),i=window.gv,n=0;n<t.length;n++){void 0===i[t[n]]&&(i[t[n]]={}),i=i[t[n]]}return i}Object.defineProperty(t,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,t.default=n},1:function(e,t){e.exports=$},47:function(e,t,i){"use strict";function n(e){var t=new Date(e),i=t.toLocaleTimeString().split(" "),n=i[0].split(":");return n=n.slice(0,2),t.toLocaleDateString()+"<br>"+n.join(":")+" "+i[1]}Object.defineProperty(t,"__esModule",{value:!0});var a=i(0),l=i(51),s=i(1),o=a.default("domUtil"),r=function(){function e(e,t,i){void 0===t&&(t=function(){}),void 0===i&&(i={});var n=this;i.min="number"==typeof i.min?i.min:0,i.max="number"==typeof i.max?i.max:100,i.val="number"==typeof i.val?i.val:0,i.step="number"==typeof i.step?i.step:5,i.playInterval="number"==typeof i.playInterval?i.playInterval:500,i.showAsDate="boolean"==typeof i.showAsDate&&i.showAsDate,"string"==typeof e?this._container=s("#"+e):void 0!==e.style?this._container=s(e):this._container=e,this._container.addClass("media-control-container"),this._playInterval=i.playInterval,this._changeFunc=t,this._showAsDate=i.showAsDate,this._currentValue=void 0,this._min=void 0,this._max=void 0,this._step=void 0,this._playing=!1,this._container.append('<span class="media-player-button media-back"></span><span class="media-player-button media-play"></span><span class="media-player-button media-pause media-disabled"></span><span class="media-player-button media-stop media-disabled" ></span><span class="media-player-button media-ahead"></span><input type="range"><div class="media-control-value-label-container"><span class="media-control-value-label-min"></span><span class="media-control-value-label-val"></span><span class="media-control-value-label-max"></span></div>');var a=this._container.find(".media-play");this._$btnStop=this._container.find(".media-stop");var o=this._container.find(".media-ahead"),r=this._container.find(".media-back");this._$slider=this._container.find("input[type=range]"),this._$valLabelMin=this._container.find(".media-control-value-label-min"),this._$valLabelVal=this._container.find(".media-control-value-label-val"),this._$valLabelMax=this._container.find(".media-control-value-label-max"),this.setMinMaxValueStep(i.min,i.max,i.val,i.step),l.rangeChange(this._$slider,function(e){n.currentValue=e},100);var u=this;a.click(function(){s(this).addClass("media-disabled"),u._$btnStop.removeClass("media-disabled"),o.addClass("media-locked"),r.addClass("media-locked"),u._$slider.prop("disabled",!0),u._playing=!0,u._interval=setInterval(function(){u.currentValue+=u._step},u._playInterval)}),this._$btnStop.click(function(){clearInterval(u._interval),s(this).addClass("media-disabled"),a.removeClass("media-disabled"),o.removeClass("media-locked"),r.removeClass("media-locked"),u._$slider.prop("disabled",!1),u._playing=!1}),o.click(function(){u.currentValue=u.currentValue+u._step}),r.click(function(){u.currentValue=u.currentValue-u._step})}return e.prototype.stopPlaying=function(){this._playing&&this._$btnStop.trigger("click")},Object.defineProperty(e.prototype,"playing",{get:function(){return this._playing},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"step",{get:function(){return this._step},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentValue",{get:function(){return this._currentValue},set:function(e){e>this._max?e=this._min:e<this._min&&(e=this._max),this._currentValue=e,this._$slider.val(this._currentValue.toFixed(2)),this._showAsDate?this._$valLabelVal.html(n(this.currentValue)):this._$valLabelVal.html(this.currentValue.toString()),this._changeFunc(e)},enumerable:!0,configurable:!0}),e.prototype.setMinMaxValueStep=function(e,t,i,a){this._min=e,this._max=t,i="number"==typeof i?i:e,a="number"==typeof a?a:(t-e)/20,this._currentValue=i,this._step=a,this._$slider.prop("min",this.min.toString()),this._$slider.prop("max",this.max.toString()),this._$slider.prop("step",this.step.toString()),this._$slider.val(this.currentValue.toString()),this._showAsDate?(this._$valLabelMin.html(n(this._min)),this._$valLabelVal.html(n(this.currentValue)),this._$valLabelMax.html(n(this._max))):(this._$valLabelMin.html(this._min.toString()),this._$valLabelVal.html(this.currentValue.toString()),this._$valLabelMax.html(this._max.toString()))},Object.defineProperty(e.prototype,"changeFunction",{set:function(e){this._changeFunc=e},enumerable:!0,configurable:!0}),e}();t.MediaControl=r,o.MediaControl=r},51:function(e,t,i){"use strict";function n(e,t){var i=parseFloat(this.value),n=parseFloat(this.min),a=parseFloat(this.max);a-i<parseFloat(this.step)&&(i=a);var s=(i-n)/(a-n);"number"==typeof l&&i==l||(l=i,e(i,s,t))}function a(e,t,i){return i="number"==typeof i?i:75,e.mouseenter(function(){r=!0}),e.mouseleave(function(){r=!1,u=!1}),e.mousedown(function(){u=!0}),e.mouseup(function(){u=!1}),e.mousemove(function(e){if(r&&u&&(p=!0,l!=this.value)){l=this.value,null!=c&&clearTimeout(c);var a=this;c=setTimeout(function(){n.call(a,t,e),c=null},i)}}),e.keyup(function(e){37!=e.keyCode&&39!=e.keyCode||n.call(this,t,e)}),e.change(function(e){if(p)return void(p=!1);n.call(this,t,e)}),this}Object.defineProperty(t,"__esModule",{value:!0});var l,s=i(0),o=s.default("domUtil"),r=!1,u=!1,c=null,p=!1;t.rangeChange=a,o.rangeChange=a},74:function(e,t,i){"use strict";function n(e){void 0===e&&(e=1),console.log(e,"one")}Object.defineProperty(t,"__esModule",{value:!0});var a=i(47);console.log("eat this fish"),console.log("eat this fish"),console.log("eat this bird"),console.log("i am here5"),n(1);new a.MediaControl("map")}}); //# sourceMappingURL=my_little_test.js.map \ No newline at end of file diff --git a/test/serve/js/my_little_test.js.map b/test/serve/js/my_little_test.js.map index 21b8deac27108df98167ba4ccd55271142682781..51baef2435ca699db23c21975c48fb2d573eac46 100644 --- a/test/serve/js/my_little_test.js.map +++ b/test/serve/js/my_little_test.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc********","webpack:///./src/util/provide.ts?5c82*******","webpack:///external \"$\"?57aa*******","webpack:///./src/domUtil/media-control.ts?660c","webpack:///./src/domUtil/range-change.ts?b7cd","webpack:///./src/_tests/demos/my_little_test.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;AChEA;;GAEG;;;AAGH;;;;GAIG;AACH,iBAAiB,SAAiB;IAC9B,YAAY,CAAC;IACb,EAAE,CAAC,CAAC,OAAa,MAAO,CAAC,EAAE,IAAI,WAAW,CAAC,EAAC;QAClC,MAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,SAAS,GAAS,MAAO,CAAC,EAAE,CAAC;IAEjC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAC,CAAC,EAAE,CAAC,GAAE,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAC,CAAC;QAChC,IAAI,SA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IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,IAAI,CAAC;AAChB,CAAC;AAzED,kCAyEC;AAED,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC;;;;;;;;;;;AChJ7B,cAAc;AAKd,8CAAwD;AACxD,EAAE;AACF,EAAE;AAGF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAC7B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAC7B,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAE7B,EAAE;AACF,mCAAmC;AACnC,EAAE;AACF,oBAAoB;AAGpB,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAI1B,YAAa,GAAe;IAAf,6BAAe;IACxB,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;AAC5B,CAAC;AAED,EAAE,CAAC,CAAC,CAAC,CAAC;AAEN,IAAI,OAAO,GAAG,IAAI,4BAAY,CAAC,KAAK,CAAC,CAAC;AAEtC,EAAE;AACF,EAAE;AACF,oBAAoB;AACpB,EAAE;AACF,EAAE;AACF,0CAA0C;AAC1C,0CAA0C;AAC1C,0CAA0C;AAC1C,0CAA0C;AAC1C,0CAA0C;AAC1C,uBAAuB;AACvB,EAAE","file":"my_little_test.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 75);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport {rangeChange} from './range-change';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('domUtil');\r\n\r\n/**\r\n * @callback mediaCallback\r\n * @param {number} tm\r\n */\r\n\r\nfunction timeToLocalDateString(tm: number) {\r\n \"use strict\";\r\n let d = new Date(tm);\r\n let p1 = d.toLocaleTimeString().split(' ');\r\n let p2 = p1[0].split(':');\r\n p2 = p2.slice(0, 2);\r\n\r\n return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n}\r\n\r\nexport interface changeFunction {\r\n (newVal?: number): void;\r\n}\r\n\r\nexport interface mediaRangeConfig {\r\n min?: number;\r\n max?: number;\r\n val?: number;\r\n step?: number;\r\n playInterval?: number;\r\n showAsDate?: boolean;\r\n}\r\n\r\n\r\nexport class MediaControl {\r\n _container: JQuery;\r\n _min: number;\r\n _max: number;\r\n _playInterval: number;\r\n _step: number;\r\n _currentValue: number;\r\n\r\n _playing: boolean;\r\n\r\n _$btnStop: JQuery;\r\n _$slider: JQuery;\r\n _$valLabelVal: JQuery;\r\n _$valLabelMin: JQuery;\r\n _$valLabelMax: JQuery;\r\n _interval: number;\r\n _showAsDate: boolean;\r\n\r\n _changeFunc: changeFunction;\r\n\r\n /**\r\n *\r\n * @param element\r\n * @param changeFunc\r\n * @param mediaConfig\r\n */\r\n constructor(element: JQuery | HTMLElement | string,\r\n changeFunc: changeFunction = (): void => {\r\n return;\r\n },\r\n mediaConfig: mediaRangeConfig = {}) {\r\n\r\n mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n\r\n if (typeof element == 'string') {\r\n this._container = $('#' + element);\r\n }\r\n else if (typeof (element as HTMLElement).style !== 'undefined') {\r\n this._container = $(element);\r\n } else {\r\n this._container = element as JQuery;\r\n }\r\n\r\n this._container.addClass('media-control-container');\r\n this._playInterval = mediaConfig.playInterval;\r\n this._changeFunc = changeFunc;\r\n\r\n this._showAsDate = mediaConfig.showAsDate;\r\n\r\n this._currentValue = undefined;\r\n this._min = undefined;\r\n this._max = undefined;\r\n this._step = undefined;\r\n this._playing = false;\r\n\r\n let htmlStr =\r\n '<span class=\"media-player-button media-back\"></span>' +\r\n '<span class=\"media-player-button media-play\"></span>' +\r\n '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n '<span class=\"media-player-button media-ahead\"></span>' +\r\n `<input type=\"range\">` +\r\n `<div class=\"media-control-value-label-container\">` +\r\n `<span class=\"media-control-value-label-min\"></span>` +\r\n `<span class=\"media-control-value-label-val\"></span>` +\r\n `<span class=\"media-control-value-label-max\"></span>` +\r\n `</div>`;\r\n\r\n this._container.append(htmlStr);\r\n\r\n // let btnPause = this._container.find('.media-pause');\r\n let btnPlay = this._container.find('.media-play');\r\n this._$btnStop = this._container.find('.media-stop');\r\n let btnAhead = this._container.find('.media-ahead');\r\n let btnBack = this._container.find('.media-back');\r\n this._$slider = this._container.find('input[type=range]');\r\n\r\n this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n\r\n this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n\r\n rangeChange(this._$slider, (newVal) => {\r\n this.currentValue = newVal;\r\n }, 100);\r\n\r\n let ___this = this;\r\n\r\n btnPlay.click(function () {\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n ___this._$btnStop.removeClass('media-disabled');\r\n btnAhead.addClass('media-locked');\r\n btnBack.addClass('media-locked');\r\n ___this._$slider.prop('disabled', true);\r\n ___this._playing = true;\r\n\r\n ___this._interval = setInterval(function () {\r\n ___this.currentValue += ___this._step;\r\n }, ___this._playInterval);\r\n });\r\n\r\n this._$btnStop.click(function () {\r\n clearInterval(___this._interval);\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n btnPlay.removeClass('media-disabled');\r\n btnAhead.removeClass('media-locked');\r\n btnBack.removeClass('media-locked');\r\n ___this._$slider.prop('disabled', false);\r\n ___this._playing = false;\r\n });\r\n\r\n btnAhead.click(function () {\r\n ___this.currentValue = ___this.currentValue + ___this._step;\r\n });\r\n\r\n btnBack.click(function () {\r\n ___this.currentValue = ___this.currentValue - ___this._step;\r\n });\r\n }\r\n\r\n stopPlaying() {\r\n if (this._playing) {\r\n this._$btnStop.trigger('click');\r\n }\r\n }\r\n\r\n get playing() {\r\n return this._playing;\r\n }\r\n\r\n get min() {\r\n return this._min;\r\n }\r\n\r\n get max() {\r\n return this._max;\r\n }\r\n\r\n get step() {\r\n return this._step;\r\n }\r\n\r\n get currentValue() {\r\n return this._currentValue;\r\n }\r\n\r\n set currentValue(newValue) {\r\n if (newValue > this._max) {\r\n newValue = this._min;\r\n } else if (newValue < this._min) {\r\n newValue = this._max;\r\n }\r\n this._currentValue = newValue;\r\n this._$slider.val(this._currentValue.toFixed(2));\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n } else {\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n }\r\n\r\n this._changeFunc(newValue);\r\n }\r\n\r\n /**\r\n * set min and max value with step\r\n * @param {number} newMin the new min\r\n * @param {number} newMax the new mas\r\n * @param {number} [newValue=newMin] the value to set\r\n * @param {number} [newStep=(newMax-newMin)/20] step value\r\n */\r\n setMinMaxValueStep(newMin: number, newMax: number, newValue: number, newStep: number) {\r\n this._min = newMin;\r\n this._max = newMax;\r\n\r\n newValue = typeof newValue == 'number' ? newValue : newMin;\r\n newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n\r\n this._currentValue = newValue;\r\n this._step = newStep;\r\n\r\n this._$slider.prop('min', this.min.toString());\r\n this._$slider.prop('max', this.max.toString());\r\n this._$slider.prop('step', this.step.toString());\r\n this._$slider.val(this.currentValue.toString());\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n } else {\r\n this._$valLabelMin.html(this._min.toString());\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n this._$valLabelMax.html(this._max.toString());\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {mediaCallback} newFunc the callback on change\r\n */\r\n set changeFunction(newFunc: changeFunction) {\r\n this._changeFunc = newFunc;\r\n }\r\n}\r\n\r\nnm.MediaControl = MediaControl;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/media-control.ts","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport {ChangeEvent} from \"react\";\r\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout: number = null;\r\nlet dragged = false;\r\nlet lastVal: number;\r\n\r\n\r\n/**\r\n * callback on range change interaction, context of this is the firing dom element\r\n * @callback rangeChangeCallback\r\n * @param {number} newValue\r\n * @param {number} ratio value from 0 to 1 relative of the value to the min and max\r\n * @param {object} evt\r\n */\r\n\r\n/***\r\n * callback funcion after the slider has been moved\r\n */\r\nexport interface rangeChangedCallback{\r\n /**\r\n *\r\n * @param newValue new value of the slider\r\n * @param ratio ratio from low to high, 0 to 1\r\n * @param evt the original event\r\n */\r\n (newValue: number, ratio: number, evt: ChangeEvent<HTMLInputElement>): any\r\n}\r\n\r\n\r\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nfunction triggerCallback(callback: rangeChangedCallback, evt: ChangeEvent<HTMLInputElement>) {\r\n \"use strict\";\r\n\r\n let val = parseFloat(this.value);\r\n let min = parseFloat(this.min);\r\n let max = parseFloat(this.max);\r\n let step = parseFloat(this.step);\r\n\r\n if (max - val < step){\r\n val = max;\r\n }\r\n\r\n let percent = (val - min) / (max - min);\r\n\r\n if (typeof lastVal == 'number' && val == lastVal){\r\n return;\r\n }\r\n lastVal = val;\r\n callback(val, percent, evt);\r\n}\r\n\r\n\r\n\r\n/**\r\n * Add a variety of listeners for range inputs applied to a common callback\r\n * @param $slider - jquery reference to the slider\r\n * @param {rangeChangeCallback} callback - the callback\r\n * @param {number} [changeTimeout=75] before the callback is called\r\n * @this {jQuery}\r\n * @returns {jQuery} the jQuery object\r\n */\r\nexport function rangeChange ($slider: JQuery, callback: rangeChangedCallback, changeTimeout: number) {\r\n\r\n changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n\r\n $slider.mouseenter(function () {\r\n mouseIn = true;\r\n });\r\n\r\n $slider.mouseleave(function () {\r\n mouseIn = false;\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n\r\n $slider.mouseup(function () {\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousemove(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n * @this {HTMLElement}\r\n */\r\n function (evt) {\r\n if (!(mouseIn && mouseDown)) {\r\n return;\r\n }\r\n\r\n dragged = true;\r\n\r\n if (lastVal == this['value']) {\r\n return;\r\n }\r\n lastVal = this['value'];\r\n\r\n if (timeout != null) {\r\n clearTimeout(timeout);\r\n }\r\n\r\n let _this = this;\r\n\r\n timeout = setTimeout(function () {\r\n triggerCallback.call(_this, callback, evt);\r\n timeout = null;\r\n\r\n }, changeTimeout);\r\n });\r\n\r\n $slider.keyup(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n */\r\n function (evt) {\r\n if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n triggerCallback.call(this, callback, evt);\r\n }\r\n });\r\n\r\n $slider.change(function (evt) {\r\n if (dragged) {\r\n dragged = false;\r\n\r\n return;\r\n }\r\n triggerCallback.call(this, callback, evt);\r\n });\r\n\r\n return this;\r\n}\r\n\r\nnm.rangeChange = rangeChange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/range-change.ts","import ol = require('custom-ol');\r\n// let g = new\r\n\r\n\r\n\r\n\r\nimport {MediaControl} from '../../domUtil/media-control'\r\n//\r\n//\r\n\r\n\r\nconsole.log('eat this fish');\r\nconsole.log('eat this fish');\r\nconsole.log('eat this bird');\r\n\r\n//\r\n// let g = new ol3.source.Vector();\r\n//\r\n// console.log(olx);\r\n\r\n\r\nconsole.log('i am here5');\r\n\r\n\r\n\r\nfunction me (eat: number = 1){\r\n console.log(eat, 'one');\r\n}\r\n\r\nme(1);\r\n\r\nvar control = new MediaControl('map');\r\n\r\n//\r\n//\r\n// console.log(ol3);\r\n//\r\n//\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log('here');\r\n//\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/my_little_test.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///my_little_test.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d********","webpack:///./src/util/provide.ts?5c82*******","webpack:///external \"$\"?57aa*******","webpack:///./src/domUtil/media-control.ts?660c","webpack:///./src/domUtil/range-change.ts?b7cd","webpack:///./src/_tests/demos/my_little_test.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","1","$","47","timeToLocalDateString","tm","Date","p1","toLocaleTimeString","p2","slice","toLocaleDateString","join","provide_1","range_change_1","nm","MediaControl","element","changeFunc","mediaConfig","_this","this","min","max","val","step","playInterval","showAsDate","_container","style","addClass","_playInterval","_changeFunc","_showAsDate","_currentValue","undefined","_min","_max","_step","_playing","append","btnPlay","find","_$btnStop","btnAhead","btnBack","_$slider","_$valLabelMin","_$valLabelVal","_$valLabelMax","setMinMaxValueStep","rangeChange","newVal","currentValue","___this","click","removeClass","prop","_interval","setInterval","clearInterval","stopPlaying","trigger","set","newValue","toFixed","html","toString","newMin","newMax","newStep","newFunc","51","triggerCallback","callback","evt","parseFloat","percent","lastVal","$slider","changeTimeout","mouseenter","mouseIn","mouseleave","mouseDown","mousedown","mouseup","mousemove","dragged","timeout","clearTimeout","setTimeout","keyup","keyCode","change","74","me","eat","console","log","media_control_1"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OA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GAAU,EAIdf,GAAgBxG,KAAKoD,KAAMqD,EAAUC,KAGlCtD,KLuMX5C,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GKrVtD,IAUI0G,GAVJjE,EAAAnD,EAAA,GAIMqD,EAAKF,EAAAb,QAAQ,WAEfkF,GAAU,EACVE,GAAY,EACZK,EAAkB,KAClBD,GAAU,CA6Dd3H,GAAAsF,cA2EApC,EAAGoC,YAAcA,GLuSX4C,GACA,SAAUjI,EAAQD,EAASH,GAEjC,YMlaA,SAAAsI,GAAaC,GAAA,SAAAA,MAAA,GACTC,QAAQC,IAAIF,EAAK,ONmarBxH,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GMvbtD,IAAAgI,GAAA1I,EAAA,GAKAwI,SAAQC,IAAI,iBACZD,QAAQC,IAAI,iBACZD,QAAQC,IAAI,iBAQZD,QAAQC,IAAI,cAQZH,EAAG,EAEW,IAAII,GAAApF,aAAa","file":"my_little_test.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 74);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n\n/***/ 47:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar range_change_1 = __webpack_require__(51);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('domUtil');\r\n/**\r\n * @callback mediaCallback\r\n * @param {number} tm\r\n */\r\nfunction timeToLocalDateString(tm) {\r\n \"use strict\";\r\n var d = new Date(tm);\r\n var p1 = d.toLocaleTimeString().split(' ');\r\n var p2 = p1[0].split(':');\r\n p2 = p2.slice(0, 2);\r\n return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n}\r\nvar MediaControl = (function () {\r\n /**\r\n *\r\n * @param element\r\n * @param changeFunc\r\n * @param mediaConfig\r\n */\r\n function MediaControl(element, changeFunc, mediaConfig) {\r\n if (changeFunc === void 0) { changeFunc = function () {\r\n return;\r\n }; }\r\n if (mediaConfig === void 0) { mediaConfig = {}; }\r\n var _this = this;\r\n mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n if (typeof element == 'string') {\r\n this._container = $('#' + element);\r\n }\r\n else if (typeof element.style !== 'undefined') {\r\n this._container = $(element);\r\n }\r\n else {\r\n this._container = element;\r\n }\r\n this._container.addClass('media-control-container');\r\n this._playInterval = mediaConfig.playInterval;\r\n this._changeFunc = changeFunc;\r\n this._showAsDate = mediaConfig.showAsDate;\r\n this._currentValue = undefined;\r\n this._min = undefined;\r\n this._max = undefined;\r\n this._step = undefined;\r\n this._playing = false;\r\n var htmlStr = '<span class=\"media-player-button media-back\"></span>' +\r\n '<span class=\"media-player-button media-play\"></span>' +\r\n '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n '<span class=\"media-player-button media-ahead\"></span>' +\r\n \"<input type=\\\"range\\\">\" +\r\n \"<div class=\\\"media-control-value-label-container\\\">\" +\r\n \"<span class=\\\"media-control-value-label-min\\\"></span>\" +\r\n \"<span class=\\\"media-control-value-label-val\\\"></span>\" +\r\n \"<span class=\\\"media-control-value-label-max\\\"></span>\" +\r\n \"</div>\";\r\n this._container.append(htmlStr);\r\n // let btnPause = this._container.find('.media-pause');\r\n var btnPlay = this._container.find('.media-play');\r\n this._$btnStop = this._container.find('.media-stop');\r\n var btnAhead = this._container.find('.media-ahead');\r\n var btnBack = this._container.find('.media-back');\r\n this._$slider = this._container.find('input[type=range]');\r\n this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n range_change_1.rangeChange(this._$slider, function (newVal) {\r\n _this.currentValue = newVal;\r\n }, 100);\r\n var ___this = this;\r\n btnPlay.click(function () {\r\n var $this = $(this);\r\n $this.addClass('media-disabled');\r\n ___this._$btnStop.removeClass('media-disabled');\r\n btnAhead.addClass('media-locked');\r\n btnBack.addClass('media-locked');\r\n ___this._$slider.prop('disabled', true);\r\n ___this._playing = true;\r\n ___this._interval = setInterval(function () {\r\n ___this.currentValue += ___this._step;\r\n }, ___this._playInterval);\r\n });\r\n this._$btnStop.click(function () {\r\n clearInterval(___this._interval);\r\n var $this = $(this);\r\n $this.addClass('media-disabled');\r\n btnPlay.removeClass('media-disabled');\r\n btnAhead.removeClass('media-locked');\r\n btnBack.removeClass('media-locked');\r\n ___this._$slider.prop('disabled', false);\r\n ___this._playing = false;\r\n });\r\n btnAhead.click(function () {\r\n ___this.currentValue = ___this.currentValue + ___this._step;\r\n });\r\n btnBack.click(function () {\r\n ___this.currentValue = ___this.currentValue - ___this._step;\r\n });\r\n }\r\n MediaControl.prototype.stopPlaying = function () {\r\n if (this._playing) {\r\n this._$btnStop.trigger('click');\r\n }\r\n };\r\n Object.defineProperty(MediaControl.prototype, \"playing\", {\r\n get: function () {\r\n return this._playing;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"min\", {\r\n get: function () {\r\n return this._min;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"max\", {\r\n get: function () {\r\n return this._max;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"step\", {\r\n get: function () {\r\n return this._step;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MediaControl.prototype, \"currentValue\", {\r\n get: function () {\r\n return this._currentValue;\r\n },\r\n set: function (newValue) {\r\n if (newValue > this._max) {\r\n newValue = this._min;\r\n }\r\n else if (newValue < this._min) {\r\n newValue = this._max;\r\n }\r\n this._currentValue = newValue;\r\n this._$slider.val(this._currentValue.toFixed(2));\r\n if (this._showAsDate) {\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n }\r\n else {\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n }\r\n this._changeFunc(newValue);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * set min and max value with step\r\n * @param {number} newMin the new min\r\n * @param {number} newMax the new mas\r\n * @param {number} [newValue=newMin] the value to set\r\n * @param {number} [newStep=(newMax-newMin)/20] step value\r\n */\r\n MediaControl.prototype.setMinMaxValueStep = function (newMin, newMax, newValue, newStep) {\r\n this._min = newMin;\r\n this._max = newMax;\r\n newValue = typeof newValue == 'number' ? newValue : newMin;\r\n newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n this._currentValue = newValue;\r\n this._step = newStep;\r\n this._$slider.prop('min', this.min.toString());\r\n this._$slider.prop('max', this.max.toString());\r\n this._$slider.prop('step', this.step.toString());\r\n this._$slider.val(this.currentValue.toString());\r\n if (this._showAsDate) {\r\n this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n }\r\n else {\r\n this._$valLabelMin.html(this._min.toString());\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n this._$valLabelMax.html(this._max.toString());\r\n }\r\n };\r\n Object.defineProperty(MediaControl.prototype, \"changeFunction\", {\r\n /**\r\n *\r\n * @param {mediaCallback} newFunc the callback on change\r\n */\r\n set: function (newFunc) {\r\n this._changeFunc = newFunc;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return MediaControl;\r\n}());\r\nexports.MediaControl = MediaControl;\r\nnm.MediaControl = MediaControl;\r\n\n\n/***/ }),\n\n/***/ 51:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('domUtil');\r\nvar mouseIn = false;\r\nvar mouseDown = false;\r\nvar timeout = null;\r\nvar dragged = false;\r\nvar lastVal;\r\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\nfunction triggerCallback(callback, evt) {\r\n \"use strict\";\r\n var val = parseFloat(this.value);\r\n var min = parseFloat(this.min);\r\n var max = parseFloat(this.max);\r\n var step = parseFloat(this.step);\r\n if (max - val < step) {\r\n val = max;\r\n }\r\n var percent = (val - min) / (max - min);\r\n if (typeof lastVal == 'number' && val == lastVal) {\r\n return;\r\n }\r\n lastVal = val;\r\n callback(val, percent, evt);\r\n}\r\n/**\r\n * Add a variety of listeners for range inputs applied to a common callback\r\n * @param $slider - jquery reference to the slider\r\n * @param {rangeChangeCallback} callback - the callback\r\n * @param {number} [changeTimeout=75] before the callback is called\r\n * @this {jQuery}\r\n * @returns {jQuery} the jQuery object\r\n */\r\nfunction rangeChange($slider, callback, changeTimeout) {\r\n changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n $slider.mouseenter(function () {\r\n mouseIn = true;\r\n });\r\n $slider.mouseleave(function () {\r\n mouseIn = false;\r\n mouseDown = false;\r\n });\r\n $slider.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n $slider.mouseup(function () {\r\n mouseDown = false;\r\n });\r\n $slider.mousemove(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n * @this {HTMLElement}\r\n */\r\n function (evt) {\r\n if (!(mouseIn && mouseDown)) {\r\n return;\r\n }\r\n dragged = true;\r\n if (lastVal == this['value']) {\r\n return;\r\n }\r\n lastVal = this['value'];\r\n if (timeout != null) {\r\n clearTimeout(timeout);\r\n }\r\n var _this = this;\r\n timeout = setTimeout(function () {\r\n triggerCallback.call(_this, callback, evt);\r\n timeout = null;\r\n }, changeTimeout);\r\n });\r\n $slider.keyup(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n */\r\n function (evt) {\r\n if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n triggerCallback.call(this, callback, evt);\r\n }\r\n });\r\n $slider.change(function (evt) {\r\n if (dragged) {\r\n dragged = false;\r\n return;\r\n }\r\n triggerCallback.call(this, callback, evt);\r\n });\r\n return this;\r\n}\r\nexports.rangeChange = rangeChange;\r\nnm.rangeChange = rangeChange;\r\n\n\n/***/ }),\n\n/***/ 74:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n// let g = new\r\nvar media_control_1 = __webpack_require__(47);\r\n//\r\n//\r\nconsole.log('eat this fish');\r\nconsole.log('eat this fish');\r\nconsole.log('eat this bird');\r\n//\r\n// let g = new ol3.source.Vector();\r\n//\r\n// console.log(olx);\r\nconsole.log('i am here5');\r\nfunction me(eat) {\r\n if (eat === void 0) { eat = 1; }\r\n console.log(eat, 'one');\r\n}\r\nme(1);\r\nvar control = new media_control_1.MediaControl('map');\r\n//\r\n//\r\n// console.log(ol3);\r\n//\r\n//\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log('here');\r\n//\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// my_little_test.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 74);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport {rangeChange} from './range-change';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('domUtil');\r\n\r\n/**\r\n * @callback mediaCallback\r\n * @param {number} tm\r\n */\r\n\r\nfunction timeToLocalDateString(tm: number) {\r\n \"use strict\";\r\n let d = new Date(tm);\r\n let p1 = d.toLocaleTimeString().split(' ');\r\n let p2 = p1[0].split(':');\r\n p2 = p2.slice(0, 2);\r\n\r\n return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n}\r\n\r\nexport interface changeFunction {\r\n (newVal?: number): void;\r\n}\r\n\r\nexport interface mediaRangeConfig {\r\n min?: number;\r\n max?: number;\r\n val?: number;\r\n step?: number;\r\n playInterval?: number;\r\n showAsDate?: boolean;\r\n}\r\n\r\n\r\nexport class MediaControl {\r\n _container: JQuery;\r\n _min: number;\r\n _max: number;\r\n _playInterval: number;\r\n _step: number;\r\n _currentValue: number;\r\n\r\n _playing: boolean;\r\n\r\n _$btnStop: JQuery;\r\n _$slider: JQuery;\r\n _$valLabelVal: JQuery;\r\n _$valLabelMin: JQuery;\r\n _$valLabelMax: JQuery;\r\n _interval: number;\r\n _showAsDate: boolean;\r\n\r\n _changeFunc: changeFunction;\r\n\r\n /**\r\n *\r\n * @param element\r\n * @param changeFunc\r\n * @param mediaConfig\r\n */\r\n constructor(element: JQuery | HTMLElement | string,\r\n changeFunc: changeFunction = (): void => {\r\n return;\r\n },\r\n mediaConfig: mediaRangeConfig = {}) {\r\n\r\n mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n\r\n if (typeof element == 'string') {\r\n this._container = $('#' + element);\r\n }\r\n else if (typeof (element as HTMLElement).style !== 'undefined') {\r\n this._container = $(element);\r\n } else {\r\n this._container = element as JQuery;\r\n }\r\n\r\n this._container.addClass('media-control-container');\r\n this._playInterval = mediaConfig.playInterval;\r\n this._changeFunc = changeFunc;\r\n\r\n this._showAsDate = mediaConfig.showAsDate;\r\n\r\n this._currentValue = undefined;\r\n this._min = undefined;\r\n this._max = undefined;\r\n this._step = undefined;\r\n this._playing = false;\r\n\r\n let htmlStr =\r\n '<span class=\"media-player-button media-back\"></span>' +\r\n '<span class=\"media-player-button media-play\"></span>' +\r\n '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n '<span class=\"media-player-button media-ahead\"></span>' +\r\n `<input type=\"range\">` +\r\n `<div class=\"media-control-value-label-container\">` +\r\n `<span class=\"media-control-value-label-min\"></span>` +\r\n `<span class=\"media-control-value-label-val\"></span>` +\r\n `<span class=\"media-control-value-label-max\"></span>` +\r\n `</div>`;\r\n\r\n this._container.append(htmlStr);\r\n\r\n // let btnPause = this._container.find('.media-pause');\r\n let btnPlay = this._container.find('.media-play');\r\n this._$btnStop = this._container.find('.media-stop');\r\n let btnAhead = this._container.find('.media-ahead');\r\n let btnBack = this._container.find('.media-back');\r\n this._$slider = this._container.find('input[type=range]');\r\n\r\n this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n\r\n this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n\r\n rangeChange(this._$slider, (newVal) => {\r\n this.currentValue = newVal;\r\n }, 100);\r\n\r\n let ___this = this;\r\n\r\n btnPlay.click(function () {\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n ___this._$btnStop.removeClass('media-disabled');\r\n btnAhead.addClass('media-locked');\r\n btnBack.addClass('media-locked');\r\n ___this._$slider.prop('disabled', true);\r\n ___this._playing = true;\r\n\r\n ___this._interval = setInterval(function () {\r\n ___this.currentValue += ___this._step;\r\n }, ___this._playInterval);\r\n });\r\n\r\n this._$btnStop.click(function () {\r\n clearInterval(___this._interval);\r\n let $this = $(this);\r\n $this.addClass('media-disabled');\r\n btnPlay.removeClass('media-disabled');\r\n btnAhead.removeClass('media-locked');\r\n btnBack.removeClass('media-locked');\r\n ___this._$slider.prop('disabled', false);\r\n ___this._playing = false;\r\n });\r\n\r\n btnAhead.click(function () {\r\n ___this.currentValue = ___this.currentValue + ___this._step;\r\n });\r\n\r\n btnBack.click(function () {\r\n ___this.currentValue = ___this.currentValue - ___this._step;\r\n });\r\n }\r\n\r\n stopPlaying() {\r\n if (this._playing) {\r\n this._$btnStop.trigger('click');\r\n }\r\n }\r\n\r\n get playing() {\r\n return this._playing;\r\n }\r\n\r\n get min() {\r\n return this._min;\r\n }\r\n\r\n get max() {\r\n return this._max;\r\n }\r\n\r\n get step() {\r\n return this._step;\r\n }\r\n\r\n get currentValue() {\r\n return this._currentValue;\r\n }\r\n\r\n set currentValue(newValue) {\r\n if (newValue > this._max) {\r\n newValue = this._min;\r\n } else if (newValue < this._min) {\r\n newValue = this._max;\r\n }\r\n this._currentValue = newValue;\r\n this._$slider.val(this._currentValue.toFixed(2));\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n } else {\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n }\r\n\r\n this._changeFunc(newValue);\r\n }\r\n\r\n /**\r\n * set min and max value with step\r\n * @param {number} newMin the new min\r\n * @param {number} newMax the new mas\r\n * @param {number} [newValue=newMin] the value to set\r\n * @param {number} [newStep=(newMax-newMin)/20] step value\r\n */\r\n setMinMaxValueStep(newMin: number, newMax: number, newValue: number, newStep: number) {\r\n this._min = newMin;\r\n this._max = newMax;\r\n\r\n newValue = typeof newValue == 'number' ? newValue : newMin;\r\n newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n\r\n this._currentValue = newValue;\r\n this._step = newStep;\r\n\r\n this._$slider.prop('min', this.min.toString());\r\n this._$slider.prop('max', this.max.toString());\r\n this._$slider.prop('step', this.step.toString());\r\n this._$slider.val(this.currentValue.toString());\r\n\r\n if (this._showAsDate) {\r\n this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n } else {\r\n this._$valLabelMin.html(this._min.toString());\r\n this._$valLabelVal.html(this.currentValue.toString());\r\n this._$valLabelMax.html(this._max.toString());\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {mediaCallback} newFunc the callback on change\r\n */\r\n set changeFunction(newFunc: changeFunction) {\r\n this._changeFunc = newFunc;\r\n }\r\n}\r\n\r\nnm.MediaControl = MediaControl;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/media-control.ts","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport {ChangeEvent} from \"react\";\r\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout: number = null;\r\nlet dragged = false;\r\nlet lastVal: number;\r\n\r\n\r\n/**\r\n * callback on range change interaction, context of this is the firing dom element\r\n * @callback rangeChangeCallback\r\n * @param {number} newValue\r\n * @param {number} ratio value from 0 to 1 relative of the value to the min and max\r\n * @param {object} evt\r\n */\r\n\r\n/***\r\n * callback funcion after the slider has been moved\r\n */\r\nexport interface rangeChangedCallback{\r\n /**\r\n *\r\n * @param newValue new value of the slider\r\n * @param ratio ratio from low to high, 0 to 1\r\n * @param evt the original event\r\n */\r\n (newValue: number, ratio: number, evt: ChangeEvent<HTMLInputElement>): any\r\n}\r\n\r\n\r\n/**\r\n * Created by gavorhes on 11/2/2015.\r\n */\r\n\r\nfunction triggerCallback(callback: rangeChangedCallback, evt: ChangeEvent<HTMLInputElement>) {\r\n \"use strict\";\r\n\r\n let val = parseFloat(this.value);\r\n let min = parseFloat(this.min);\r\n let max = parseFloat(this.max);\r\n let step = parseFloat(this.step);\r\n\r\n if (max - val < step){\r\n val = max;\r\n }\r\n\r\n let percent = (val - min) / (max - min);\r\n\r\n if (typeof lastVal == 'number' && val == lastVal){\r\n return;\r\n }\r\n lastVal = val;\r\n callback(val, percent, evt);\r\n}\r\n\r\n\r\n\r\n/**\r\n * Add a variety of listeners for range inputs applied to a common callback\r\n * @param $slider - jquery reference to the slider\r\n * @param {rangeChangeCallback} callback - the callback\r\n * @param {number} [changeTimeout=75] before the callback is called\r\n * @this {jQuery}\r\n * @returns {jQuery} the jQuery object\r\n */\r\nexport function rangeChange ($slider: JQuery, callback: rangeChangedCallback, changeTimeout: number) {\r\n\r\n changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n\r\n $slider.mouseenter(function () {\r\n mouseIn = true;\r\n });\r\n\r\n $slider.mouseleave(function () {\r\n mouseIn = false;\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousedown(function () {\r\n mouseDown = true;\r\n });\r\n\r\n $slider.mouseup(function () {\r\n mouseDown = false;\r\n });\r\n\r\n $slider.mousemove(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n * @this {HTMLElement}\r\n */\r\n function (evt) {\r\n if (!(mouseIn && mouseDown)) {\r\n return;\r\n }\r\n\r\n dragged = true;\r\n\r\n if (lastVal == this['value']) {\r\n return;\r\n }\r\n lastVal = this['value'];\r\n\r\n if (timeout != null) {\r\n clearTimeout(timeout);\r\n }\r\n\r\n let _this = this;\r\n\r\n timeout = setTimeout(function () {\r\n triggerCallback.call(_this, callback, evt);\r\n timeout = null;\r\n\r\n }, changeTimeout);\r\n });\r\n\r\n $slider.keyup(\r\n /**\r\n *\r\n * @param {object} evt - event properties\r\n */\r\n function (evt) {\r\n if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n triggerCallback.call(this, callback, evt);\r\n }\r\n });\r\n\r\n $slider.change(function (evt) {\r\n if (dragged) {\r\n dragged = false;\r\n\r\n return;\r\n }\r\n triggerCallback.call(this, callback, evt);\r\n });\r\n\r\n return this;\r\n}\r\n\r\nnm.rangeChange = rangeChange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/range-change.ts","import ol = require('custom-ol');\r\n// let g = new\r\n\r\n\r\n\r\n\r\nimport {MediaControl} from '../../domUtil/media-control'\r\n//\r\n//\r\n\r\n\r\nconsole.log('eat this fish');\r\nconsole.log('eat this fish');\r\nconsole.log('eat this bird');\r\n\r\n//\r\n// let g = new ol3.source.Vector();\r\n//\r\n// console.log(olx);\r\n\r\n\r\nconsole.log('i am here5');\r\n\r\n\r\n\r\nfunction me (eat: number = 1){\r\n console.log(eat, 'one');\r\n}\r\n\r\nme(1);\r\n\r\nvar control = new MediaControl('map');\r\n\r\n//\r\n//\r\n// console.log(ol3);\r\n//\r\n//\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log(definedAndNotNull(\"fish\"));\r\n// console.log('here');\r\n//\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/my_little_test.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/range_media.js b/test/serve/js/range_media.js index feb07dc466dbe1696e049db5ef1bbc9379795e6e..b550de9527a7bb545529dc67d6935fa04acedf33 100644 --- a/test/serve/js/range_media.js +++ b/test/serve/js/range_media.js @@ -1,233 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 76); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), - -/***/ 58: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var $ = __webpack_require__(1); -__webpack_require__(1); -var nm = provide_1.default('domUtil'); -var DayRange = (function () { - /** - * constructor for the date range - * @param {number} dayRange number of days - * @param {jQuery|HTMLElement|*} jQueryRef reference to the jquery element - */ - function DayRange(jQueryRef, dayRange) { - this._workingDayRange = dayRange - 1; - var pickerHtml = '<label for="start-date" style="width: 78px; display: inline-block; margin:5px;">Start Date</label>' + - '<input type="text" readonly id="start-date" class="date-pick" style="width: 90px;">' + - '<br><label for="end-date" style="width: 78px; display: inline-block; margin:5px;">End Date</label>' + - '<input type="text" readonly id="end-date" class="date-pick" style="width: 90px;">'; - jQueryRef.append(pickerHtml); - this._$startDate = $('#start-date'); - this._$endDate = $('#end-date'); - this._$startDate.datepicker(); - this._$endDate.datepicker(); - this._startDate = null; - this._endDate = null; - var dte1 = new Date(); - dte1.setHours(0, 0, 0, 0); - var dte2 = new Date(dte1.getTime()); - dte2.setDate(dte2.getDate() + dayRange); - dte2.setHours(23, 59, 59, 0); - this._maxDateRange = dte2.getTime() - dte1.getTime(); - var _this = this; - //add event listeners - this._$startDate.change(function () { - _this.startDate = this.value; - }); - this._$endDate.change(function () { - _this.endDate = this.value; - }); - // initialize - this.endDate = new Date(); - } - Object.defineProperty(DayRange.prototype, "startDate", { - get: function () { - return this._startDate; - }, - /** - * - * @param val - */ - set: function (val) { - if (typeof val == 'string') { - val = new Date(val); - } - this._startDate = val; - this._startDate.setHours(0, 0, 0, 0); - this._$startDate.val(this._startDate.toLocaleDateString()); - if (this.endDate == null || - this._endDate.getTime() - this._startDate.getTime() > this._maxDateRange || - this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) { - var tmpDate = new Date(this._startDate.getTime()); - tmpDate.setDate(tmpDate.getDate() + this._workingDayRange); - this.endDate = new Date(tmpDate.getTime()); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DayRange.prototype, "endDate", { - get: function () { - return this._endDate; - }, - set: function (val) { - if (typeof val == 'string') { - val = new Date(val); - } - this._endDate = val; - this._endDate.setHours(23, 59, 59, 0); - this._$endDate.val(this._endDate.toLocaleDateString()); - if (this._startDate == null || this._endDate.getTime() - this.startDate.getTime() > this._maxDateRange || this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) { - var tmpDate = new Date(this._endDate.getTime()); - tmpDate.setDate(tmpDate.getDate() - this._workingDayRange); - this.startDate = new Date(tmpDate.getTime()); - } - }, - enumerable: true, - configurable: true - }); - return DayRange; -}()); -exports.DayRange = DayRange; -nm.DayRange = DayRange; -exports.default = DayRange; - - -/***/ }), - -/***/ 76: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 10/10/2016. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var day_range_1 = __webpack_require__(58); -var $ = __webpack_require__(1); -var dayRange = new day_range_1.DayRange($('#day-range'), 10); - - -/***/ }) - -/******/ }); +!function(t){function e(n){if(a[n])return a[n].exports;var i=a[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var a={};e.m=t,e.c=a,e.i=function(t){return t},e.d=function(t,a,n){e.o(t,a)||Object.defineProperty(t,a,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(a,"a",a),a},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=75)}({0:function(t,e,a){"use strict";function n(t){void 0===window.gv&&(window.gv={});for(var e=t.split("."),a=window.gv,n=0;n<e.length;n++){void 0===a[e[n]]&&(a[e[n]]={}),a=a[e[n]]}return a}Object.defineProperty(e,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,e.default=n},1:function(t,e){t.exports=$},57:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(0),i=a(1);a(1);var r=n.default("domUtil"),s=function(){function t(t,e){this._workingDayRange=e-1,t.append('<label for="start-date" style="width: 78px; display: inline-block; margin:5px;">Start Date</label><input type="text" readonly id="start-date" class="date-pick" style="width: 90px;"><br><label for="end-date" style="width: 78px; display: inline-block; margin:5px;">End Date</label><input type="text" readonly id="end-date" class="date-pick" style="width: 90px;">'),this._$startDate=i("#start-date"),this._$endDate=i("#end-date"),this._$startDate.datepicker(),this._$endDate.datepicker(),this._startDate=null,this._endDate=null;var a=new Date;a.setHours(0,0,0,0);var n=new Date(a.getTime());n.setDate(n.getDate()+e),n.setHours(23,59,59,0),this._maxDateRange=n.getTime()-a.getTime();var r=this;this._$startDate.change(function(){r.startDate=this.value}),this._$endDate.change(function(){r.endDate=this.value}),this.endDate=new Date}return Object.defineProperty(t.prototype,"startDate",{get:function(){return this._startDate},set:function(t){if("string"==typeof t&&(t=new Date(t)),this._startDate=t,this._startDate.setHours(0,0,0,0),this._$startDate.val(this._startDate.toLocaleDateString()),null==this.endDate||this._endDate.getTime()-this._startDate.getTime()>this._maxDateRange||this._endDate.getTime()-this._startDate.getTime()<864e5){var e=new Date(this._startDate.getTime());e.setDate(e.getDate()+this._workingDayRange),this.endDate=new Date(e.getTime())}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"endDate",{get:function(){return this._endDate},set:function(t){if("string"==typeof t&&(t=new Date(t)),this._endDate=t,this._endDate.setHours(23,59,59,0),this._$endDate.val(this._endDate.toLocaleDateString()),null==this._startDate||this._endDate.getTime()-this.startDate.getTime()>this._maxDateRange||this._endDate.getTime()-this._startDate.getTime()<864e5){var e=new Date(this._endDate.getTime());e.setDate(e.getDate()-this._workingDayRange),this.startDate=new Date(e.getTime())}},enumerable:!0,configurable:!0}),t}();e.DayRange=s,r.DayRange=s,e.default=s},75:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a(57),i=a(1);new n.DayRange(i("#day-range"),10)}}); //# sourceMappingURL=range_media.js.map \ No newline at end of file diff --git a/test/serve/js/range_media.js.map b/test/serve/js/range_media.js.map index 29372438016bfe2847e1d68f3d7dfa02c088d2c3..aed47cdf47a72c339b36e3f706873ad206e9f668 100644 --- a/test/serve/js/range_media.js.map +++ b/test/serve/js/range_media.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc**********","webpack:///./src/util/provide.ts?5c82*********","webpack:///external \"$\"?57aa*********","webpack:///./src/domUtil/day-range.ts","webpack:///./src/_tests/demos/range_media.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;AChEA;;GAEG;;;AAGH;;;;GAIG;AACH,iBAAiB,SAAiB;IAC9B,YAAY,CAAC;IACb,EAAE,CAAC,CAAC,OAAa,MAAO,CAAC,EAAE,IAAI,WAAW,CAAC,EAAC;QAClC,MAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,SAAS,GAAS,MAAO,CAAC,EAAE,CAAC;IA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C,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;gBAClL,IAAI,OAAO,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;gBAChD,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBAC3D,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;YACjD,CAAC;QACL,CAAC;;;OAhBA;IAiBL,eAAC;AAAD,CAAC;AApGY,4BAAQ;AAsGrB,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAEvB,kBAAe,QAAQ,CAAC;;;;;;;;;AC9GxB;;GAEG;;;AAEH,0CAAiD;AACjD,+BAA6B;AAE7B,IAAI,QAAQ,GAAG,IAAI,oBAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC","file":"range_media.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 76);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\n\r\nlet nm = provide('domUtil');\r\n\r\nexport class DayRange {\r\n _workingDayRange: number;\r\n _$startDate: JQuery;\r\n _$endDate: JQuery;\r\n _maxDateRange: number;\r\n _startDate: Date;\r\n _endDate: Date;\r\n\r\n /**\r\n * constructor for the date range\r\n * @param {number} dayRange number of days\r\n * @param {jQuery|HTMLElement|*} jQueryRef reference to the jquery element\r\n */\r\n constructor(jQueryRef: JQuery, dayRange: number) {\r\n this._workingDayRange = dayRange - 1;\r\n\r\n let pickerHtml = '<label for=\"start-date\" style=\"width: 78px; display: inline-block; margin:5px;\">Start Date</label>' +\r\n '<input type=\"text\" readonly id=\"start-date\" class=\"date-pick\" style=\"width: 90px;\">' +\r\n '<br><label for=\"end-date\" style=\"width: 78px; display: inline-block; margin:5px;\">End Date</label>' +\r\n '<input type=\"text\" readonly id=\"end-date\" class=\"date-pick\" style=\"width: 90px;\">';\r\n\r\n jQueryRef.append(pickerHtml);\r\n\r\n this._$startDate = $('#start-date');\r\n this._$endDate = $('#end-date');\r\n\r\n this._$startDate.datepicker();\r\n this._$endDate.datepicker();\r\n\r\n this._startDate = null;\r\n this._endDate = null;\r\n\r\n let dte1 = new Date();\r\n dte1.setHours(0, 0, 0, 0);\r\n let dte2 = new Date(dte1.getTime());\r\n dte2.setDate(dte2.getDate() + dayRange);\r\n dte2.setHours(23, 59, 59, 0);\r\n this._maxDateRange = dte2.getTime() - dte1.getTime();\r\n\r\n let _this = this;\r\n\r\n //add event listeners\r\n this._$startDate.change(function () {\r\n _this.startDate = this.value;\r\n });\r\n\r\n this._$endDate.change(function () {\r\n _this.endDate = this.value;\r\n });\r\n\r\n // initialize\r\n this.endDate = new Date();\r\n }\r\n\r\n get startDate(): Date {\r\n return this._startDate;\r\n }\r\n\r\n /**\r\n *\r\n * @param val\r\n */\r\n set startDate(val: Date) {\r\n if (typeof val == 'string') {\r\n val = new Date(val as string);\r\n }\r\n\r\n this._startDate = val;\r\n this._startDate.setHours(0, 0, 0, 0);\r\n this._$startDate.val(this._startDate.toLocaleDateString());\r\n\r\n if (\r\n this.endDate == null ||\r\n this._endDate.getTime() - this._startDate.getTime() > this._maxDateRange ||\r\n this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n let tmpDate = new Date(this._startDate.getTime());\r\n tmpDate.setDate(tmpDate.getDate() + this._workingDayRange);\r\n this.endDate = new Date(tmpDate.getTime());\r\n }\r\n }\r\n\r\n get endDate(): Date {\r\n return this._endDate;\r\n }\r\n\r\n\r\n set endDate(val: Date) {\r\n if (typeof val == 'string') {\r\n val = new Date(val as string);\r\n }\r\n\r\n this._endDate = val;\r\n this._endDate.setHours(23, 59, 59, 0);\r\n this._$endDate.val(this._endDate.toLocaleDateString());\r\n if (this._startDate == null || this._endDate.getTime() - this.startDate.getTime() > this._maxDateRange || this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n let tmpDate = new Date(this._endDate.getTime());\r\n tmpDate.setDate(tmpDate.getDate() - this._workingDayRange);\r\n this.startDate = new Date(tmpDate.getTime());\r\n }\r\n }\r\n}\r\n\r\nnm.DayRange = DayRange;\r\n\r\nexport default DayRange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/day-range.ts","/**\r\n * Created by gavorhes on 10/10/2016.\r\n */\r\n\r\nimport {DayRange} from '../../domUtil/day-range';\r\nimport $ = require('jquery');\r\n\r\nlet dayRange = new DayRange($('#day-range'), 10);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/range_media.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///range_media.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d**********","webpack:///./src/util/provide.ts?5c82*********","webpack:///external \"$\"?57aa*********","webpack:///./src/domUtil/day-range.ts","webpack:///./src/_tests/demos/range_media.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","1","$","57","provide_1","nm","DayRange","jQueryRef","dayRange","this","_workingDayRange","append","_$startDate","_$endDate","datepicker","_startDate","_endDate","dte1","Date","setHours","dte2","getTime","setDate","getDate","_maxDateRange","_this","change","startDate","endDate","set","val","toLocaleDateString","tmpDate","75","day_range_1"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KA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D,KAAKkB,UAAY,GAAIT,MAAKc,EAAQX,aJoGtCzC,YAAY,EACZD,cAAc,IIlGtB2B,IApGazC,GAAAyC,WAsGbD,EAAGC,SAAWA,EAEdzC,EAAAmC,QAAeM,GJyGT2B,GACA,SAAUnE,EAAQD,EAASH,GAEjC,YAKAe,QAAOC,eAAeb,EAAS,cAAgBO,OAAO,GK3NtD,IAAA8D,GAAAxE,EAAA,IACAwC,EAAAxC,EAAA,EAEe,IAAIwE,GAAA5B,SAASJ,EAAE,cAAe","file":"range_media.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 75);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n\n/***/ 57:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar $ = __webpack_require__(1);\r\n__webpack_require__(1);\r\nvar nm = provide_1.default('domUtil');\r\nvar DayRange = (function () {\r\n /**\r\n * constructor for the date range\r\n * @param {number} dayRange number of days\r\n * @param {jQuery|HTMLElement|*} jQueryRef reference to the jquery element\r\n */\r\n function DayRange(jQueryRef, dayRange) {\r\n this._workingDayRange = dayRange - 1;\r\n var pickerHtml = '<label for=\"start-date\" style=\"width: 78px; display: inline-block; margin:5px;\">Start Date</label>' +\r\n '<input type=\"text\" readonly id=\"start-date\" class=\"date-pick\" style=\"width: 90px;\">' +\r\n '<br><label for=\"end-date\" style=\"width: 78px; display: inline-block; margin:5px;\">End Date</label>' +\r\n '<input type=\"text\" readonly id=\"end-date\" class=\"date-pick\" style=\"width: 90px;\">';\r\n jQueryRef.append(pickerHtml);\r\n this._$startDate = $('#start-date');\r\n this._$endDate = $('#end-date');\r\n this._$startDate.datepicker();\r\n this._$endDate.datepicker();\r\n this._startDate = null;\r\n this._endDate = null;\r\n var dte1 = new Date();\r\n dte1.setHours(0, 0, 0, 0);\r\n var dte2 = new Date(dte1.getTime());\r\n dte2.setDate(dte2.getDate() + dayRange);\r\n dte2.setHours(23, 59, 59, 0);\r\n this._maxDateRange = dte2.getTime() - dte1.getTime();\r\n var _this = this;\r\n //add event listeners\r\n this._$startDate.change(function () {\r\n _this.startDate = this.value;\r\n });\r\n this._$endDate.change(function () {\r\n _this.endDate = this.value;\r\n });\r\n // initialize\r\n this.endDate = new Date();\r\n }\r\n Object.defineProperty(DayRange.prototype, \"startDate\", {\r\n get: function () {\r\n return this._startDate;\r\n },\r\n /**\r\n *\r\n * @param val\r\n */\r\n set: function (val) {\r\n if (typeof val == 'string') {\r\n val = new Date(val);\r\n }\r\n this._startDate = val;\r\n this._startDate.setHours(0, 0, 0, 0);\r\n this._$startDate.val(this._startDate.toLocaleDateString());\r\n if (this.endDate == null ||\r\n this._endDate.getTime() - this._startDate.getTime() > this._maxDateRange ||\r\n this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n var tmpDate = new Date(this._startDate.getTime());\r\n tmpDate.setDate(tmpDate.getDate() + this._workingDayRange);\r\n this.endDate = new Date(tmpDate.getTime());\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DayRange.prototype, \"endDate\", {\r\n get: function () {\r\n return this._endDate;\r\n },\r\n set: function (val) {\r\n if (typeof val == 'string') {\r\n val = new Date(val);\r\n }\r\n this._endDate = val;\r\n this._endDate.setHours(23, 59, 59, 0);\r\n this._$endDate.val(this._endDate.toLocaleDateString());\r\n if (this._startDate == null || this._endDate.getTime() - this.startDate.getTime() > this._maxDateRange || this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n var tmpDate = new Date(this._endDate.getTime());\r\n tmpDate.setDate(tmpDate.getDate() - this._workingDayRange);\r\n this.startDate = new Date(tmpDate.getTime());\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return DayRange;\r\n}());\r\nexports.DayRange = DayRange;\r\nnm.DayRange = DayRange;\r\nexports.default = DayRange;\r\n\n\n/***/ }),\n\n/***/ 75:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 10/10/2016.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar day_range_1 = __webpack_require__(57);\r\nvar $ = __webpack_require__(1);\r\nvar dayRange = new day_range_1.DayRange($('#day-range'), 10);\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// range_media.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 75);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\n\r\nlet nm = provide('domUtil');\r\n\r\nexport class DayRange {\r\n _workingDayRange: number;\r\n _$startDate: JQuery;\r\n _$endDate: JQuery;\r\n _maxDateRange: number;\r\n _startDate: Date;\r\n _endDate: Date;\r\n\r\n /**\r\n * constructor for the date range\r\n * @param {number} dayRange number of days\r\n * @param {jQuery|HTMLElement|*} jQueryRef reference to the jquery element\r\n */\r\n constructor(jQueryRef: JQuery, dayRange: number) {\r\n this._workingDayRange = dayRange - 1;\r\n\r\n let pickerHtml = '<label for=\"start-date\" style=\"width: 78px; display: inline-block; margin:5px;\">Start Date</label>' +\r\n '<input type=\"text\" readonly id=\"start-date\" class=\"date-pick\" style=\"width: 90px;\">' +\r\n '<br><label for=\"end-date\" style=\"width: 78px; display: inline-block; margin:5px;\">End Date</label>' +\r\n '<input type=\"text\" readonly id=\"end-date\" class=\"date-pick\" style=\"width: 90px;\">';\r\n\r\n jQueryRef.append(pickerHtml);\r\n\r\n this._$startDate = $('#start-date');\r\n this._$endDate = $('#end-date');\r\n\r\n this._$startDate.datepicker();\r\n this._$endDate.datepicker();\r\n\r\n this._startDate = null;\r\n this._endDate = null;\r\n\r\n let dte1 = new Date();\r\n dte1.setHours(0, 0, 0, 0);\r\n let dte2 = new Date(dte1.getTime());\r\n dte2.setDate(dte2.getDate() + dayRange);\r\n dte2.setHours(23, 59, 59, 0);\r\n this._maxDateRange = dte2.getTime() - dte1.getTime();\r\n\r\n let _this = this;\r\n\r\n //add event listeners\r\n this._$startDate.change(function () {\r\n _this.startDate = this.value;\r\n });\r\n\r\n this._$endDate.change(function () {\r\n _this.endDate = this.value;\r\n });\r\n\r\n // initialize\r\n this.endDate = new Date();\r\n }\r\n\r\n get startDate(): Date {\r\n return this._startDate;\r\n }\r\n\r\n /**\r\n *\r\n * @param val\r\n */\r\n set startDate(val: Date) {\r\n if (typeof val == 'string') {\r\n val = new Date(val as string);\r\n }\r\n\r\n this._startDate = val;\r\n this._startDate.setHours(0, 0, 0, 0);\r\n this._$startDate.val(this._startDate.toLocaleDateString());\r\n\r\n if (\r\n this.endDate == null ||\r\n this._endDate.getTime() - this._startDate.getTime() > this._maxDateRange ||\r\n this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n let tmpDate = new Date(this._startDate.getTime());\r\n tmpDate.setDate(tmpDate.getDate() + this._workingDayRange);\r\n this.endDate = new Date(tmpDate.getTime());\r\n }\r\n }\r\n\r\n get endDate(): Date {\r\n return this._endDate;\r\n }\r\n\r\n\r\n set endDate(val: Date) {\r\n if (typeof val == 'string') {\r\n val = new Date(val as string);\r\n }\r\n\r\n this._endDate = val;\r\n this._endDate.setHours(23, 59, 59, 0);\r\n this._$endDate.val(this._endDate.toLocaleDateString());\r\n if (this._startDate == null || this._endDate.getTime() - this.startDate.getTime() > this._maxDateRange || this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n let tmpDate = new Date(this._endDate.getTime());\r\n tmpDate.setDate(tmpDate.getDate() - this._workingDayRange);\r\n this.startDate = new Date(tmpDate.getTime());\r\n }\r\n }\r\n}\r\n\r\nnm.DayRange = DayRange;\r\n\r\nexport default DayRange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/day-range.ts","/**\r\n * Created by gavorhes on 10/10/2016.\r\n */\r\n\r\nimport {DayRange} from '../../domUtil/day-range';\r\nimport $ = require('jquery');\r\n\r\nlet dayRange = new DayRange($('#day-range'), 10);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/range_media.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/reacttst.js b/test/serve/js/reacttst.js index 2edafc0d85165d0819df0a021f028bc873744e2b..bbfc9ee24529a310db71a35e55847ad13d58ee35 100644 --- a/test/serve/js/reacttst.js +++ b/test/serve/js/reacttst.js @@ -1,1877 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 77); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), -/* 2 */, -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), -/* 4 */, -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */, -/* 10 */, -/* 11 */, -/* 12 */, -/* 13 */, -/* 14 */, -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by glenn on 6/12/2017. - */ -exports.React = __webpack_require__(53); -exports.ReactDom = __webpack_require__(54); -exports.ReactRedux = __webpack_require__(55); -exports.Redux = __webpack_require__(27); -exports.connect = exports.ReactRedux.connect; -exports.Provider = exports.ReactRedux.Provider; -exports.combineReducers = exports.Redux.combineReducers; -exports.createStore = exports.Redux.createStore; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SET_ONE_DATE = 'set one date'; -exports.SET_TWO_DATES = 'set two dates'; - - -/***/ }), -/* 17 */, -/* 18 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(36); - - -/** Built-in value references. */ -var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; - -/* harmony default export */ __webpack_exports__["a"] = Symbol; - - -/***/ }), -/* 19 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(30); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(32); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(37); - - - - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { - return false; - } - var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -/* harmony default export */ __webpack_exports__["a"] = isPlainObject; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = compose; -/** - * Composes single-argument functions from right to left. The rightmost - * function can take multiple arguments as it provides the signature for - * the resulting composite function. - * - * @param {...Function} funcs The functions to compose. - * @returns {Function} A function obtained by composing the argument functions - * from right to left. For example, compose(f, g, h) is identical to doing - * (...args) => f(g(h(...args))). - */ - -function compose() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - - if (funcs.length === 0) { - return function (arg) { - return arg; - }; - } - - if (funcs.length === 1) { - return funcs[0]; - } - - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(undefined, arguments)); - }; - }); -} - -/***/ }), -/* 22 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ActionTypes; }); -/* harmony export (immutable) */ __webpack_exports__["a"] = createStore; - - - -/** - * These are private action types reserved by Redux. - * For any unknown actions, you must return the current state. - * If the current state is undefined, you must return the initial state. - * Do not reference these action types directly in your code. - */ -var ActionTypes = { - INIT: '@@redux/INIT' - - /** - * Creates a Redux store that holds the state tree. - * The only way to change the data in the store is to call `dispatch()` on it. - * - * There should only be a single store in your app. To specify how different - * parts of the state tree respond to actions, you may combine several reducers - * into a single reducer function by using `combineReducers`. - * - * @param {Function} reducer A function that returns the next state tree, given - * the current state tree and the action to handle. - * - * @param {any} [preloadedState] The initial state. You may optionally specify it - * to hydrate the state from the server in universal apps, or to restore a - * previously serialized user session. - * If you use `combineReducers` to produce the root reducer function, this must be - * an object with the same shape as `combineReducers` keys. - * - * @param {Function} [enhancer] The store enhancer. You may optionally specify it - * to enhance the store with third-party capabilities such as middleware, - * time travel, persistence, etc. The only store enhancer that ships with Redux - * is `applyMiddleware()`. - * - * @returns {Store} A Redux store that lets you read the state, dispatch actions - * and subscribe to changes. - */ -};function createStore(reducer, preloadedState, enhancer) { - var _ref2; - - if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { - enhancer = preloadedState; - preloadedState = undefined; - } - - if (typeof enhancer !== 'undefined') { - if (typeof enhancer !== 'function') { - throw new Error('Expected the enhancer to be a function.'); - } - - return enhancer(createStore)(reducer, preloadedState); - } - - if (typeof reducer !== 'function') { - throw new Error('Expected the reducer to be a function.'); - } - - var currentReducer = reducer; - var currentState = preloadedState; - var currentListeners = []; - var nextListeners = currentListeners; - var isDispatching = false; - - function ensureCanMutateNextListeners() { - if (nextListeners === currentListeners) { - nextListeners = currentListeners.slice(); - } - } - - /** - * Reads the state tree managed by the store. - * - * @returns {any} The current state tree of your application. - */ - function getState() { - return currentState; - } - - /** - * Adds a change listener. It will be called any time an action is dispatched, - * and some part of the state tree may potentially have changed. You may then - * call `getState()` to read the current state tree inside the callback. - * - * You may call `dispatch()` from a change listener, with the following - * caveats: - * - * 1. The subscriptions are snapshotted just before every `dispatch()` call. - * If you subscribe or unsubscribe while the listeners are being invoked, this - * will not have any effect on the `dispatch()` that is currently in progress. - * However, the next `dispatch()` call, whether nested or not, will use a more - * recent snapshot of the subscription list. - * - * 2. The listener should not expect to see all state changes, as the state - * might have been updated multiple times during a nested `dispatch()` before - * the listener is called. It is, however, guaranteed that all subscribers - * registered before the `dispatch()` started will be called with the latest - * state by the time it exits. - * - * @param {Function} listener A callback to be invoked on every dispatch. - * @returns {Function} A function to remove this change listener. - */ - function subscribe(listener) { - if (typeof listener !== 'function') { - throw new Error('Expected listener to be a function.'); - } - - var isSubscribed = true; - - ensureCanMutateNextListeners(); - nextListeners.push(listener); - - return function unsubscribe() { - if (!isSubscribed) { - return; - } - - isSubscribed = false; - - ensureCanMutateNextListeners(); - var index = nextListeners.indexOf(listener); - nextListeners.splice(index, 1); - }; - } - - /** - * Dispatches an action. It is the only way to trigger a state change. - * - * The `reducer` function, used to create the store, will be called with the - * current state tree and the given `action`. Its return value will - * be considered the **next** state of the tree, and the change listeners - * will be notified. - * - * The base implementation only supports plain object actions. If you want to - * dispatch a Promise, an Observable, a thunk, or something else, you need to - * wrap your store creating function into the corresponding middleware. For - * example, see the documentation for the `redux-thunk` package. Even the - * middleware will eventually dispatch plain object actions using this method. - * - * @param {Object} action A plain object representing “what changed”. It is - * a good idea to keep actions serializable so you can record and replay user - * sessions, or use the time travelling `redux-devtools`. An action must have - * a `type` property which may not be `undefined`. It is a good idea to use - * string constants for action types. - * - * @returns {Object} For convenience, the same action object you dispatched. - * - * Note that, if you use a custom middleware, it may wrap `dispatch()` to - * return something else (for example, a Promise you can await). - */ - function dispatch(action) { - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) { - throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); - } - - if (typeof action.type === 'undefined') { - throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); - } - - if (isDispatching) { - throw new Error('Reducers may not dispatch actions.'); - } - - try { - isDispatching = true; - currentState = currentReducer(currentState, action); - } finally { - isDispatching = false; - } - - var listeners = currentListeners = nextListeners; - for (var i = 0; i < listeners.length; i++) { - var listener = listeners[i]; - listener(); - } - - return action; - } - - /** - * Replaces the reducer currently used by the store to calculate the state. - * - * You might need this if your app implements code splitting and you want to - * load some of the reducers dynamically. You might also need this if you - * implement a hot reloading mechanism for Redux. - * - * @param {Function} nextReducer The reducer for the store to use instead. - * @returns {void} - */ - function replaceReducer(nextReducer) { - if (typeof nextReducer !== 'function') { - throw new Error('Expected the nextReducer to be a function.'); - } - - currentReducer = nextReducer; - dispatch({ type: ActionTypes.INIT }); - } - - /** - * Interoperability point for observable/reactive libraries. - * @returns {observable} A minimal observable of state changes. - * For more information, see the observable proposal: - * https://github.com/tc39/proposal-observable - */ - function observable() { - var _ref; - - var outerSubscribe = subscribe; - return _ref = { - /** - * The minimal observable subscription method. - * @param {Object} observer Any object that can be used as an observer. - * The observer object should have a `next` method. - * @returns {subscription} An object with an `unsubscribe` method that can - * be used to unsubscribe the observable from the store, and prevent further - * emission of values from the observable. - */ - subscribe: function subscribe(observer) { - if (typeof observer !== 'object') { - throw new TypeError('Expected the observer to be an object.'); - } - - function observeState() { - if (observer.next) { - observer.next(getState()); - } - } - - observeState(); - var unsubscribe = outerSubscribe(observeState); - return { unsubscribe: unsubscribe }; - } - }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { - return this; - }, _ref; - } - - // When a store is created, an "INIT" action is dispatched so that every - // reducer returns their initial state. This effectively populates - // the initial state tree. - dispatch({ type: ActionTypes.INIT }); - - return _ref2 = { - dispatch: dispatch, - subscribe: subscribe, - getState: getState, - replaceReducer: replaceReducer - }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; -} - -/***/ }), -/* 23 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = warning; -/** - * Prints a warning in the console if it exists. - * - * @param {String} message The warning message. - * @returns {void} - */ -function warning(message) { - /* eslint-disable no-console */ - if (typeof console !== 'undefined' && typeof console.error === 'function') { - console.error(message); - } - /* eslint-enable no-console */ - try { - // This error was thrown as a convenience so that if you enable - // "break on all exceptions" in your console, - // it would pause the execution at this line. - throw new Error(message); - /* eslint-disable no-empty */ - } catch (e) {} - /* eslint-enable no-empty */ -} - -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by glenn on 6/14/2017. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var reactAndRedux_1 = __webpack_require__(15); -var $ = __webpack_require__(1); -__webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var dateFormat_1 = __webpack_require__(46); -/** - * params label, id, initialDate, change callback with value as string - */ -var DatePick = (function (_super) { - __extends(DatePick, _super); - function DatePick(props, context) { - var _this = _super.call(this, props, context) || this; - _this.elId = _this.props.id || makeGuid_1.default(); - return _this; - } - DatePick.prototype.componentDidMount = function () { - var _this = this; - var $el = $('#' + this.elId); - $el.datepicker({ - onSelect: function () { - _this.props.change(dateFormat_1.stringToDate($el.val())); - } - }); - }; - DatePick.prototype.render = function () { - var params = { - id: this.elId, - type: 'text', - style: { margin: "0 10px 0 5px", width: '73px', textAlign: 'center' }, - readOnly: true - }; - if (this.props.val) { - params['value'] = dateFormat_1.dateToString(this.props.val); - } - else { - params['defaultValue'] = dateFormat_1.dateToString(this.props.initialDate || new Date()); - } - return reactAndRedux_1.React.createElement("span", { className: "date-pick" }, - reactAndRedux_1.React.createElement("label", { htmlFor: this.elId }, this.props.label), - reactAndRedux_1.React.createElement("input", __assign({}, params))); - }; - return DatePick; -}(reactAndRedux_1.React.Component)); -exports.DatePick = DatePick; -exports.default = DatePick; - - -/***/ }), -/* 26 */, -/* 27 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(22); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(40); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(38); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(21); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(23); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; }); - - - - - - - -/* -* This is a dummy function to check if the function name has been altered by minification. -* If the function has been minified and NODE_ENV !== 'production', warn the user. -*/ -function isCrushed() {} - -if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); -} - - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(20))) - -/***/ }), -/* 28 */, -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by glenn on 6/12/2017. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var reactAndRedux_1 = __webpack_require__(15); -__webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var fixDate = __webpack_require__(46); -var DatePick_1 = __webpack_require__(25); -function stringToDate(dte) { - if (dte.getTime) { - return dte; - } - else { - return new Date(dte); - } -} -var DateRange = (function (_super) { - __extends(DateRange, _super); - function DateRange(props, context) { - var _this = _super.call(this, props, context) || this; - _this.startId = makeGuid_1.default(); - _this.endId = makeGuid_1.default(); - _this.versionTwoStart = new Date(2017, 1, 1); - _this.maxRange = Math.round(_this.props.maxRange) - 1; - _this.minRange = typeof _this.props['minRange'] == 'number' ? Math.round(_this.props['minRange']) : 1; - if (_this.minRange > _this.maxRange) { - throw "DateRange component: Max range must be greater than min range"; - } - if (_this.props.initialEnd) { - _this.end = stringToDate(_this.props.initialEnd); - } - else { - _this.end = new Date(); - } - _this.end.setHours(0, 0, 0); - _this.start = new Date(_this.end); - _this.start.setDate(_this.start.getDate() - _this.maxRange); - _this.setNumDays(); - return _this; - } - DateRange.prototype.setNumDays = function () { - this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1; - }; - DateRange.prototype.componentDidMount = function () { - this.startInput = document.getElementById(this.startId); - this.endInput = document.getElementById(this.endId); - this.props.callback(this.start, this.end, this.version); - }; - Object.defineProperty(DateRange.prototype, "needReset", { - get: function () { - return this.numDays > this.maxRange || this.numDays < this.minRange; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DateRange.prototype, "versionSpan", { - get: function () { - if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart) { - return true; - } - else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart) { - return true; - } - return false; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DateRange.prototype, "version", { - get: function () { - if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)) { - return 2; - } - else if (this.start >= this.versionTwoStart) { - return 2; - } - return 1; - }, - enumerable: true, - configurable: true - }); - DateRange.prototype.finalizeChange = function () { - if (this.props.npmrds) { - if (this.versionSpan) { - this.start = this.previousStart; - this.end = this.previousEnd; - this.startInput.value = fixDate.dateToString(this.start); - this.endInput.value = fixDate.dateToString(this.end); - this.setNumDays(); - alert("Start and End dates must not span version break: " + fixDate.dateToString(this.versionTwoStart)); - return; - } - } - this.props.callback(this.start, this.end, this.version); - }; - DateRange.prototype.setStart = function (s) { - this.previousStart = new Date(this.start); - this.previousEnd = new Date(this.end); - this.start = s; - this.setNumDays(); - if (this.needReset) { - this.end = new Date(this.start); - if (this.numDays > this.maxRange) { - this.end.setDate(this.end.getDate() + this.maxRange); - } - else { - this.end.setDate(this.end.getDate() + this.minRange - 1); - } - this.endInput.value = fixDate.dateToString(this.end); - this.setNumDays(); - } - this.finalizeChange(); - }; - DateRange.prototype.setEnd = function (s) { - this.previousStart = new Date(this.start); - this.previousEnd = new Date(this.end); - this.end = s; - this.setNumDays(); - if (this.needReset) { - this.start = new Date(this.end); - if (this.numDays > this.maxRange) { - this.start.setDate(this.start.getDate() - this.maxRange); - } - else { - this.start.setDate(this.start.getDate() - this.minRange + 1); - } - this.startInput.value = fixDate.dateToString(this.start); - this.setNumDays(); - } - this.finalizeChange(); - }; - DateRange.prototype.render = function () { - var _this = this; - return reactAndRedux_1.React.createElement("div", { className: "date-range" }, - reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.startId, label: "Start", initialDate: this.start, change: function (s) { _this.setStart(s); } }), - reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.endId, label: "End", initialDate: this.end, change: function (s) { _this.setEnd(s); } })); - }; - return DateRange; -}(reactAndRedux_1.React.Component)); -exports.DateRange = DateRange; - - -/***/ }), -/* 30 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(34); - - - - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value) - : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value); -} - -/* harmony default export */ __webpack_exports__["a"] = baseGetTag; - - -/***/ }), -/* 31 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/* harmony default export */ __webpack_exports__["a"] = freeGlobal; - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(24))) - -/***/ }), -/* 32 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(35); - - -/** Built-in value references. */ -var getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object); - -/* harmony default export */ __webpack_exports__["a"] = getPrototype; - - -/***/ }), -/* 33 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18); - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = getRawTag; - - -/***/ }), -/* 34 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -/* harmony default export */ __webpack_exports__["a"] = objectToString; - - -/***/ }), -/* 35 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/* harmony default export */ __webpack_exports__["a"] = overArg; - - -/***/ }), -/* 36 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(31); - - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')(); - -/* harmony default export */ __webpack_exports__["a"] = root; - - -/***/ }), -/* 37 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -/* harmony default export */ __webpack_exports__["a"] = isObjectLike; - - -/***/ }), -/* 38 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(21); -/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - - -/** - * Creates a store enhancer that applies middleware to the dispatch method - * of the Redux store. This is handy for a variety of tasks, such as expressing - * asynchronous actions in a concise manner, or logging every action payload. - * - * See `redux-thunk` package as an example of the Redux middleware. - * - * Because middleware is potentially asynchronous, this should be the first - * store enhancer in the composition chain. - * - * Note that each middleware will be given the `dispatch` and `getState` functions - * as named arguments. - * - * @param {...Function} middlewares The middleware chain to be applied. - * @returns {Function} A store enhancer applying the middleware. - */ -function applyMiddleware() { - for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { - middlewares[_key] = arguments[_key]; - } - - return function (createStore) { - return function (reducer, preloadedState, enhancer) { - var store = createStore(reducer, preloadedState, enhancer); - var _dispatch = store.dispatch; - var chain = []; - - var middlewareAPI = { - getState: store.getState, - dispatch: function dispatch(action) { - return _dispatch(action); - } - }; - chain = middlewares.map(function (middleware) { - return middleware(middlewareAPI); - }); - _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); - - return _extends({}, store, { - dispatch: _dispatch - }); - }; - }; -} - -/***/ }), -/* 39 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; -function bindActionCreator(actionCreator, dispatch) { - return function () { - return dispatch(actionCreator.apply(undefined, arguments)); - }; -} - -/** - * Turns an object whose values are action creators, into an object with the - * same keys, but with every function wrapped into a `dispatch` call so they - * may be invoked directly. This is just a convenience method, as you can call - * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. - * - * For convenience, you can also pass a single function as the first argument, - * and get a function in return. - * - * @param {Function|Object} actionCreators An object whose values are action - * creator functions. One handy way to obtain it is to use ES6 `import * as` - * syntax. You may also pass a single function. - * - * @param {Function} dispatch The `dispatch` function available on your Redux - * store. - * - * @returns {Function|Object} The object mimicking the original object, but with - * every action creator wrapped into the `dispatch` call. If you passed a - * function as `actionCreators`, the return value will also be a single - * function. - */ -function bindActionCreators(actionCreators, dispatch) { - if (typeof actionCreators === 'function') { - return bindActionCreator(actionCreators, dispatch); - } - - if (typeof actionCreators !== 'object' || actionCreators === null) { - throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); - } - - var keys = Object.keys(actionCreators); - var boundActionCreators = {}; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var actionCreator = actionCreators[key]; - if (typeof actionCreator === 'function') { - boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); - } - } - return boundActionCreators; -} - -/***/ }), -/* 40 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(22); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(23); -/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; - - - - -function getUndefinedStateErrorMessage(key, action) { - var actionType = action && action.type; - var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; - - return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.'; -} - -function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { - var reducerKeys = Object.keys(reducers); - var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; - - if (reducerKeys.length === 0) { - return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; - } - - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) { - return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); - } - - var unexpectedKeys = Object.keys(inputState).filter(function (key) { - return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; - }); - - unexpectedKeys.forEach(function (key) { - unexpectedKeyCache[key] = true; - }); - - if (unexpectedKeys.length > 0) { - return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); - } -} - -function assertReducerShape(reducers) { - Object.keys(reducers).forEach(function (key) { - var reducer = reducers[key]; - var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT }); - - if (typeof initialState === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.'); - } - - var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); - if (typeof reducer(undefined, { type: type }) === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.'); - } - }); -} - -/** - * Turns an object whose values are different reducer functions, into a single - * reducer function. It will call every child reducer, and gather their results - * into a single state object, whose keys correspond to the keys of the passed - * reducer functions. - * - * @param {Object} reducers An object whose values correspond to different - * reducer functions that need to be combined into one. One handy way to obtain - * it is to use ES6 `import * as reducers` syntax. The reducers may never return - * undefined for any action. Instead, they should return their initial state - * if the state passed to them was undefined, and the current state for any - * unrecognized action. - * - * @returns {Function} A reducer function that invokes every reducer inside the - * passed object, and builds a state object with the same shape. - */ -function combineReducers(reducers) { - var reducerKeys = Object.keys(reducers); - var finalReducers = {}; - for (var i = 0; i < reducerKeys.length; i++) { - var key = reducerKeys[i]; - - if (process.env.NODE_ENV !== 'production') { - if (typeof reducers[key] === 'undefined') { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])('No reducer provided for key "' + key + '"'); - } - } - - if (typeof reducers[key] === 'function') { - finalReducers[key] = reducers[key]; - } - } - var finalReducerKeys = Object.keys(finalReducers); - - var unexpectedKeyCache = void 0; - if (process.env.NODE_ENV !== 'production') { - unexpectedKeyCache = {}; - } - - var shapeAssertionError = void 0; - try { - assertReducerShape(finalReducers); - } catch (e) { - shapeAssertionError = e; - } - - return function combination() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var action = arguments[1]; - - if (shapeAssertionError) { - throw shapeAssertionError; - } - - if (process.env.NODE_ENV !== 'production') { - var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); - if (warningMessage) { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])(warningMessage); - } - } - - var hasChanged = false; - var nextState = {}; - for (var _i = 0; _i < finalReducerKeys.length; _i++) { - var _key = finalReducerKeys[_i]; - var reducer = finalReducers[_key]; - var previousStateForKey = state[_key]; - var nextStateForKey = reducer(previousStateForKey, action); - if (typeof nextStateForKey === 'undefined') { - var errorMessage = getUndefinedStateErrorMessage(_key, action); - throw new Error(errorMessage); - } - nextState[_key] = nextStateForKey; - hasChanged = hasChanged || nextStateForKey !== previousStateForKey; - } - return hasChanged ? nextState : state; - }; -} -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(20))) - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(42); - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global, module) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _ponyfill = __webpack_require__(43); - -var _ponyfill2 = _interopRequireDefault(_ponyfill); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var root; /* global window */ - - -if (typeof self !== 'undefined') { - root = self; -} else if (typeof window !== 'undefined') { - root = window; -} else if (typeof global !== 'undefined') { - root = global; -} else if (true) { - root = module; -} else { - root = Function('return this')(); -} - -var result = (0, _ponyfill2['default'])(root); -exports['default'] = result; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24), __webpack_require__(44)(module))) - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports['default'] = symbolObservablePonyfill; -function symbolObservablePonyfill(root) { - var result; - var _Symbol = root.Symbol; - - if (typeof _Symbol === 'function') { - if (_Symbol.observable) { - result = _Symbol.observable; - } else { - result = _Symbol('observable'); - _Symbol.observable = result; - } - } else { - result = '@@observable'; - } - - return result; -}; - -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 45 */, -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by glenn on 6/13/2017. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -function stringToDate(dateStr) { - var parts = dateStr.split('/'); - var mn = parseInt(parts[0]) - 1; - var d = parseInt(parts[1]); - var y = parseInt(parts[2]); - var dte = new Date(y, mn, d); - dte.setHours(0, 0, 0); - return dte; -} -exports.stringToDate = stringToDate; -function dateToString(dte, zeroPad) { - if (zeroPad === void 0) { zeroPad = true; } - var mn = (dte.getMonth() + 1).toString(); - var d = dte.getDate().toString(); - if (zeroPad) { - mn = mn.length == 1 ? '0' + mn : mn; - d = d.length == 1 ? '0' + d : d; - } - return mn + "/" + d + "/" + dte.getFullYear(); -} -exports.dateToString = dateToString; - - -/***/ }), -/* 47 */, -/* 48 */, -/* 49 */, -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var reactAndRedux_1 = __webpack_require__(15); -var DatePick_1 = __webpack_require__(25); -var DateRange_1 = __webpack_require__(29); -var actions = __webpack_require__(16); -exports.DatePickConnected = reactAndRedux_1.connect(function (state) { - return { - label: 'Date Picker Connected', - change: function (v) { - console.log(v); - }, - val: state.oneDate - }; -}, function (dispatch) { - return { - change: function (v) { - dispatch({ type: actions.SET_ONE_DATE, d: v }); - } - }; -})(DatePick_1.DatePick); -exports.DateRangeConnected = reactAndRedux_1.connect(function (state) { - return { - maxRange: 10, - start: state.twoDates.start, - end: state.twoDates.end, - initialEnd: state.twoDates.end, - npmrds: true - }; -}, function (dispatch) { - return { - callback: function (s, e, version) { - dispatch({ type: actions.SET_TWO_DATES, start: s, end: e, version: version }); - } - }; -})(DateRange_1.DateRange); - - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var actions = __webpack_require__(16); -var Redux = __webpack_require__(27); -function oneDate(state, action) { - if (state === void 0) { state = new Date(); } - if (action.type == actions.SET_ONE_DATE) { - return action.d; - } - else { - return state; - } -} -var start = new Date('12/31/2017'); -var end = new Date('12/31/2017'); -start.setDate(start.getDate() - 10); -function twoDates(state, action) { - if (state === void 0) { state = { start: start, end: end, version: 2 }; } - if (action.type == actions.SET_TWO_DATES) { - return { - start: action.start, - end: action.end, - version: action.version - }; - } - else { - return state; - } -} -exports.theStore = Redux.createStore(Redux.combineReducers({ oneDate: oneDate, twoDates: twoDates })); -function getState() { - return exports.theStore.getState(); -} -exports.getState = getState; -exports.default = exports.theStore; - - -/***/ }), -/* 52 */, -/* 53 */ -/***/ (function(module, exports) { - -module.exports = React; - -/***/ }), -/* 54 */ -/***/ (function(module, exports) { - -module.exports = ReactDOM; - -/***/ }), -/* 55 */ -/***/ (function(module, exports) { - -module.exports = ReactRedux; - -/***/ }), -/* 56 */, -/* 57 */, -/* 58 */, -/* 59 */, -/* 60 */, -/* 61 */, -/* 62 */, -/* 63 */, -/* 64 */, -/* 65 */, -/* 66 */, -/* 67 */, -/* 68 */, -/* 69 */, -/* 70 */, -/* 71 */, -/* 72 */, -/* 73 */, -/* 74 */, -/* 75 */, -/* 76 */, -/* 77 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 9/22/2016. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var reactAndRedux_1 = __webpack_require__(15); -var DatePick_1 = __webpack_require__(25); -var DateRange_1 = __webpack_require__(29); -var reacttst_connect_1 = __webpack_require__(50); -var s = __webpack_require__(51); -var Demo = (function (_super) { - __extends(Demo, _super); - function Demo() { - return _super !== null && _super.apply(this, arguments) || this; - } - Demo.prototype.render = function () { - return reactAndRedux_1.React.createElement("div", null, - reactAndRedux_1.React.createElement("h1", null, "Date Pick"), - reactAndRedux_1.React.createElement(DatePick_1.DatePick, { label: 'Date Picker', change: function (v) { - console.log(v); - } }), - reactAndRedux_1.React.createElement("h1", null, "Date Pick Connected"), - reactAndRedux_1.React.createElement(reacttst_connect_1.DatePickConnected, null), - reactAndRedux_1.React.createElement("h1", null, "Date Range"), - reactAndRedux_1.React.createElement(DateRange_1.DateRange, { maxRange: 10, initialEnd: new Date(), minRange: 1, callback: function (start, end) { - console.log(start, end); - } }), - reactAndRedux_1.React.createElement("h1", null, "Date Range Connected"), - reactAndRedux_1.React.createElement(reacttst_connect_1.DateRangeConnected, null)); - }; - return Demo; -}(reactAndRedux_1.React.Component)); -reactAndRedux_1.ReactDom.render(reactAndRedux_1.React.createElement(reactAndRedux_1.Provider, { store: s.theStore }, - reactAndRedux_1.React.createElement(Demo, null)), document.getElementById("example")); -s.theStore.subscribe(function () { - console.log(s.getState()); -}); -setInterval(function () { - var state = s.getState(); - // console.log(state.oneDate); - // s.store.dispatch({type: s.ACTION_SET_ONE_DATE, d: state.oneDate.setDate(state.oneDate.getDate() - 1)}); -}, 1000); - - -/***/ }) -/******/ ]); +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=76)}([function(t,e,n){"use strict";function r(t){void 0===window.gv&&(window.gv={});for(var e=t.split("."),n=window.gv,r=0;r<e.length;r++){void 0===n[e[r]]&&(n[e[r]]={}),n=n[e[r]]}return n}Object.defineProperty(e,"__esModule",{value:!0}),r("util"),window.gv.util.provide=r,e.default=r},function(t,e){t.exports=$},,function(t,e,n){"use strict";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=o.default("util");e.makeGuid=r,i.makeGuid=r,e.default=r},,,,,,,,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.React=n(52),e.ReactDom=n(53),e.ReactRedux=n(54),e.Redux=n(26),e.connect=e.ReactRedux.connect,e.Provider=e.ReactRedux.Provider,e.combineReducers=e.Redux.combineReducers,e.createStore=e.Redux.createStore},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SET_ONE_DATE="set one date",e.SET_TWO_DATES="set two dates"},,function(t,e,n){"use strict";var r=n(35),o=r.a.Symbol;e.a=o},function(t,e,n){"use strict";function r(t){if(!n.i(a.a)(t)||n.i(o.a)(t)!=u)return!1;var e=n.i(i.a)(t);if(null===e)return!0;var r=f.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&d.call(r)==l}var o=n(29),i=n(31),a=n(36),u="[object Object]",c=Function.prototype,s=Object.prototype,d=c.toString,f=s.hasOwnProperty,l=d.call(Object);e.a=r},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}e.a=r},function(t,e,n){"use strict";function r(t,e,i){function c(){b===g&&(b=g.slice())}function s(){return y}function d(t){if("function"!=typeof t)throw new Error("Expected listener to be a function.");var e=!0;return c(),b.push(t),function(){if(e){e=!1,c();var n=b.indexOf(t);b.splice(n,1)}}}function f(t){if(!n.i(o.a)(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,y=v(y,t)}finally{m=!1}for(var e=g=b,r=0;r<e.length;r++){(0,e[r])()}return t}function l(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");v=t,f({type:u.INIT})}function p(){var t,e=d;return t={subscribe:function(t){function n(){t.next&&t.next(s())}if("object"!=typeof t)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:e(n)}}},t[a.a]=function(){return this},t}var h;if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error("Expected the enhancer to be a function.");return i(r)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var v=t,y=e,g=[],b=g,m=!1;return f({type:u.INIT}),h={dispatch:f,subscribe:d,getState:s,replaceReducer:l},h[a.a]=p,h}var o=n(19),i=n(40),a=n.n(i);n.d(e,"b",function(){return u}),e.a=r;var u={INIT:"@@redux/INIT"}},function(t,e,n){"use strict"},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,"__esModule",{value:!0});var i=n(15),a=n(1);n(1);var u=n(3),c=n(45),s=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.elId=r.props.id||u.default(),r}return r(e,t),e.prototype.componentDidMount=function(){var t=this,e=a("#"+this.elId);e.datepicker({onSelect:function(){t.props.change(c.stringToDate(e.val()))}})},e.prototype.render=function(){var t={id:this.elId,type:"text",style:{margin:"0 10px 0 5px",width:"73px",textAlign:"center"},readOnly:!0};return this.props.val?t.value=c.dateToString(this.props.val):t.defaultValue=c.dateToString(this.props.initialDate||new Date),i.React.createElement("span",{className:"date-pick"},i.React.createElement("label",{htmlFor:this.elId},this.props.label),i.React.createElement("input",o({},t)))},e}(i.React.Component);e.DatePick=s,e.default=s},,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(21),o=n(39),i=n(38),a=n(37),u=n(20);n(22);n.d(e,"createStore",function(){return r.a}),n.d(e,"combineReducers",function(){return o.a}),n.d(e,"bindActionCreators",function(){return i.a}),n.d(e,"applyMiddleware",function(){return a.a}),n.d(e,"compose",function(){return u.a})},,function(t,e,n){"use strict";function r(t){return t.getTime?t:new Date(t)}var o=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var i=n(15);n(1);var a=n(3),u=n(45),c=n(24),s=function(t){function e(e,n){var o=t.call(this,e,n)||this;if(o.startId=a.default(),o.endId=a.default(),o.versionTwoStart=new Date(2017,1,1),o.maxRange=Math.round(o.props.maxRange)-1,o.minRange="number"==typeof o.props.minRange?Math.round(o.props.minRange):1,o.minRange>o.maxRange)throw"DateRange component: Max range must be greater than min range";return o.props.initialEnd?o.end=r(o.props.initialEnd):o.end=new Date,o.end.setHours(0,0,0),o.start=new Date(o.end),o.start.setDate(o.start.getDate()-o.maxRange),o.setNumDays(),o}return o(e,t),e.prototype.setNumDays=function(){this.numDays=Math.round((this.end.getTime()-this.start.getTime())/864e5)+1},e.prototype.componentDidMount=function(){this.startInput=document.getElementById(this.startId),this.endInput=document.getElementById(this.endId),this.props.callback(this.start,this.end,this.version)},Object.defineProperty(e.prototype,"needReset",{get:function(){return this.numDays>this.maxRange||this.numDays<this.minRange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"versionSpan",{get:function(){return this.start<this.versionTwoStart&&this.end>=this.versionTwoStart||u.dateToString(this.versionTwoStart)===u.dateToString(this.end)&&this.start<this.versionTwoStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return u.dateToString(this.start)==u.dateToString(this.versionTwoStart)?2:this.start>=this.versionTwoStart?2:1},enumerable:!0,configurable:!0}),e.prototype.finalizeChange=function(){if(this.props.npmrds&&this.versionSpan)return this.start=this.previousStart,this.end=this.previousEnd,this.startInput.value=u.dateToString(this.start),this.endInput.value=u.dateToString(this.end),this.setNumDays(),void alert("Start and End dates must not span version break: "+u.dateToString(this.versionTwoStart));this.props.callback(this.start,this.end,this.version)},e.prototype.setStart=function(t){this.previousStart=new Date(this.start),this.previousEnd=new Date(this.end),this.start=t,this.setNumDays(),this.needReset&&(this.end=new Date(this.start),this.numDays>this.maxRange?this.end.setDate(this.end.getDate()+this.maxRange):this.end.setDate(this.end.getDate()+this.minRange-1),this.endInput.value=u.dateToString(this.end),this.setNumDays()),this.finalizeChange()},e.prototype.setEnd=function(t){this.previousStart=new Date(this.start),this.previousEnd=new Date(this.end),this.end=t,this.setNumDays(),this.needReset&&(this.start=new Date(this.end),this.numDays>this.maxRange?this.start.setDate(this.start.getDate()-this.maxRange):this.start.setDate(this.start.getDate()-this.minRange+1),this.startInput.value=u.dateToString(this.start),this.setNumDays()),this.finalizeChange()},e.prototype.render=function(){var t=this;return i.React.createElement("div",{className:"date-range"},i.React.createElement(c.default,{id:this.startId,label:"Start",initialDate:this.start,change:function(e){t.setStart(e)}}),i.React.createElement(c.default,{id:this.endId,label:"End",initialDate:this.end,change:function(e){t.setEnd(e)}}))},e}(i.React.Component);e.DateRange=s},function(t,e,n){"use strict";function r(t){return null==t?void 0===t?c:u:s&&s in Object(t)?n.i(i.a)(t):n.i(a.a)(t)}var o=n(18),i=n(32),a=n(33),u="[object Null]",c="[object Undefined]",s=o.a?o.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(e,n(23))},function(t,e,n){"use strict";var r=n(34),o=n.i(r.a)(Object.getPrototypeOf,Object);e.a=o},function(t,e,n){"use strict";function r(t){var e=a.call(t,c),n=t[c];try{t[c]=void 0;var r=!0}catch(t){}var o=u.call(t);return r&&(e?t[c]=n:delete t[c]),o}var o=n(18),i=Object.prototype,a=i.hasOwnProperty,u=i.toString,c=o.a?o.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";function r(t){return i.call(t)}var o=Object.prototype,i=o.toString;e.a=r},function(t,e,n){"use strict";function r(t,e){return function(n){return t(e(n))}}e.a=r},function(t,e,n){"use strict";var r=n(30),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}e.a=r},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(n,r,a){var u=t(n,r,a),c=u.dispatch,s=[],d={getState:u.getState,dispatch:function(t){return c(t)}};return s=e.map(function(t){return t(d)}),c=o.a.apply(void 0,s)(u.dispatch),i({},u,{dispatch:c})}}}var o=n(20);e.a=r;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){"use strict";function r(t,e){return function(){return e(t.apply(void 0,arguments))}}function o(t,e){if("function"==typeof t)return r(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),o={},i=0;i<n.length;i++){var a=n[i],u=t[a];"function"==typeof u&&(o[a]=r(u,e))}return o}e.a=o},function(t,e,n){"use strict";function r(t,e){var n=e&&e.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function o(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:a.b.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+a.b.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function i(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var a=e[i];"function"==typeof t[a]&&(n[a]=t[a])}var u=Object.keys(n),c=void 0;try{o(n)}catch(t){c=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(c)throw c;for(var o=!1,i={},a=0;a<u.length;a++){var s=u[a],d=n[s],f=t[s],l=d(f,e);if(void 0===l){var p=r(s,e);throw new Error(p)}i[s]=l,o=o||l!==f}return o?i:t}}var a=n(21);n(19),n(22);e.a=i},function(t,e,n){t.exports=n(41)},function(t,e,n){"use strict";(function(t,r){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i,a=n(42),u=o(a);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:r;var c=(0,u.default)(i);e.default=c}).call(e,n(23),n(43)(t))},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},,function(t,e,n){"use strict";function r(t){var e=t.split("/"),n=parseInt(e[0])-1,r=parseInt(e[1]),o=parseInt(e[2]),i=new Date(o,n,r);return i.setHours(0,0,0),i}function o(t,e){void 0===e&&(e=!0);var n=(t.getMonth()+1).toString(),r=t.getDate().toString();return e&&(n=1==n.length?"0"+n:n,r=1==r.length?"0"+r:r),n+"/"+r+"/"+t.getFullYear()}Object.defineProperty(e,"__esModule",{value:!0}),e.stringToDate=r,e.dateToString=o},,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),o=n(24),i=n(28),a=n(16);e.DatePickConnected=r.connect(function(t){return{label:"Date Picker Connected",change:function(t){console.log(t)},val:t.oneDate}},function(t){return{change:function(e){t({type:a.SET_ONE_DATE,d:e})}}})(o.DatePick),e.DateRangeConnected=r.connect(function(t){return{maxRange:10,start:t.twoDates.start,end:t.twoDates.end,initialEnd:t.twoDates.end,npmrds:!0}},function(t){return{callback:function(e,n,r){t({type:a.SET_TWO_DATES,start:e,end:n,version:r})}}})(i.DateRange)},function(t,e,n){"use strict";function r(t,e){return void 0===t&&(t=new Date),e.type==a.SET_ONE_DATE?e.d:t}function o(t,e){return void 0===t&&(t={start:c,end:s,version:2}),e.type==a.SET_TWO_DATES?{start:e.start,end:e.end,version:e.version}:t}function i(){return e.theStore.getState()}Object.defineProperty(e,"__esModule",{value:!0});var a=n(16),u=n(26),c=new Date("12/31/2017"),s=new Date("12/31/2017");c.setDate(c.getDate()-10),e.theStore=u.createStore(u.combineReducers({oneDate:r,twoDates:o})),e.getState=i,e.default=e.theStore},,function(t,e){t.exports=React},function(t,e){t.exports=ReactDOM},function(t,e){t.exports=ReactRedux},,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(15),i=n(24),a=n(28),u=n(49),c=n(50),s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.render=function(){return o.React.createElement("div",null,o.React.createElement("h1",null,"Date Pick"),o.React.createElement(i.DatePick,{label:"Date Picker",change:function(t){console.log(t)}}),o.React.createElement("h1",null,"Date Pick Connected"),o.React.createElement(u.DatePickConnected,null),o.React.createElement("h1",null,"Date Range"),o.React.createElement(a.DateRange,{maxRange:10,initialEnd:new Date,minRange:1,callback:function(t,e){console.log(t,e)}}),o.React.createElement("h1",null,"Date Range Connected"),o.React.createElement(u.DateRangeConnected,null))},e}(o.React.Component);o.ReactDom.render(o.React.createElement(o.Provider,{store:c.theStore},o.React.createElement(s,null)),document.getElementById("example")),c.theStore.subscribe(function(){console.log(c.getState())}),setInterval(function(){c.getState()},1e3)}]); //# sourceMappingURL=reacttst.js.map \ No newline at end of file diff --git a/test/serve/js/reacttst.js.map b/test/serve/js/reacttst.js.map index 8178bafa8e1388cb80bff6581044e69ad8cf7694..30d6dbac99a5aeecd5a217a3bfc8afdf11c79a37 100644 --- a/test/serve/js/reacttst.js.map +++ b/test/serve/js/reacttst.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc","webpack:///./src/util/provide.ts?5c82","webpack:///external \"$\"?57aa","webpack:///./src/util/makeGuid.ts","webpack:///./src/reactComponents/reactAndRedux.ts","webpack:///./src/_tests/demos/reacttst_actions.ts","webpack:///./~/lodash-es/_Symbol.js","webpack:///./~/lodash-es/isPlainObject.js","webpack:///./~/process/browser.js","webpack:///./~/redux/es/compose.js","webpack:///./~/redux/es/createStore.js","webpack:///./~/redux/es/utils/warning.js","webpack:///(webpack)/buildin/global.js","webpack:///./src/reactComponents/DatePick.tsx","webpack:///./~/redux/es/index.js","webpack:///./src/reactComponents/DateRange.tsx","webpack:///./~/lodash-es/_baseGetTag.js","webpack:///./~/lodash-es/_freeGlobal.js","webpack:///./~/lodash-es/_getPrototype.js","webpack:///./~/lodash-es/_getRawTag.js","webpack:///./~/lodash-es/_objectToString.js","webpack:///./~/lodash-es/_overArg.js","webpack:///./~/lodash-es/_root.js","webpack:///./~/lodash-es/isObjectLike.js","webpack:///./~/redux/es/applyMiddleware.js","webpack:///./~/redux/es/bindActionCreators.js","webpack:///./~/redux/es/combineReducers.js","webpack:///./~/symbol-observable/index.js","webpack:///./~/symbol-observable/lib/index.js","webpack:///./~/symbol-observable/lib/ponyfill.js","webpack:///(webpack)/buildin/module.js","webpack:///./src/reactComponents/helpers/dateFormat.ts","webpack:///./src/_tests/demos/reacttst_connect.ts","webpack:///./src/_tests/demos/reacttst_store.ts","webpack:///external \"React\"","webpack:///external \"ReactDOM\"","webpack:///external \"ReactRedux\"","webpack:///./src/_tests/demos/reacttst.tsx"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;AChEA;;GAEG;;;AAGH;;;;GAIG;AACH,iBAAiB,SAAiB;IAC9B,YAAY,CAAC;IACb,EAAE,CAAC,CAAC,OAAa,MAAO,CAAC,EAAE,IAAI,WAAW,CAAC,EAAC;QAClC,MAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,SAAS,GAAS,MAAO,CAAC,EAAE,CAAC;IAEjC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAC,CAAC,EAAE,CAAC,GAAE,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAC,CAAC;QAChC,IAAI,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;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GAAG,cAAc,CAAC;AAC9B,qBAAa,GAAG,eAAe,CAAC;;;;;;;;;;ACH7C;;AAEA;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7DA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;ACnLtC;AAAA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA,kEAAkE,aAAa;AAC/E;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;;;;;;AC/BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,yBAAyB;AACvC;;AAEA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,YAAY,yBAAyB;;AAErC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;ACvPA;AAAA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,C;;;;;;ACpBA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;ACpBA;;GAEG;;;;;;;;;;;;;;;;;;;;;AAGH,8CAAsC;AACtC,+BAA6B;AAC7B,uBAAmB;AACnB,wCAAwC;AAExC,2CAAgE;AAUhE;;GAEG;AACH;IAA8B,4BAAgC;IAG1D,kBAAY,KAAgB,EAAE,OAAe;QAA7C,YACI,kBAAM,KAAK,EAAE,OAAO,CAAC,SAExB;QADG,KAAI,CAAC,IAAI,GAAG,KAAI,CAAC,KAAK,CAAC,EAAE,IAAI,kBAAQ,EAAE,CAAC;;IAC5C,CAAC;IAED,oCAAiB,GAAjB;QAAA,iBAUC;QATG,IAAI,GAAG,GAAG,CAAC,CAAC,GAAG,GAAG,IAAI,CAAC,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E,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,KAAK,EAAC,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,UAAC,CAAC,IAAM,KAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAC,GAAG,CAC7F,CAAC;IACX,CAAC;IACL,gBAAC;AAAD,CAAC,CApJ8B,qBAAK,CAAC,SAAS,GAoJ7C;AApJY,8BAAS;;;;;;;;;;;AChCtB;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC3BA;AACA;;AAEA;;;;;;;;;;ACHA;;AAEA;AACA;;AAEA;;;;;;;;;ACLA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACdA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC5BA;AAAA,mDAAmD,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe;;AAE9P;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa,SAAS;AACtB;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,wBAAwB;AACxB;AACA,OAAO;AACP;AACA;AACA,C;;;;;;;AC/CA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;AC9CsB;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,+EAAyB;;AAEpE;AACA;AACA;;AAEA;AACA,mCAAmC,aAAa;AAChD;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA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AAK,EAAE,CAAC,CAAC,QAAQ;IACvB,oCAAC,IAAI,OAAE,CACA,EACX,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CACrC,CAAC;AAEF,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;IACjB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC9B,CAAC,CAAC,CAAC;AAEH,WAAW,CACP;IACI,IAAI,KAAK,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;IACzB,8BAA8B;IAE9B,0GAA0G;AAC9G,CAAC,EACD,IAAI,CAAC,CAAC","file":"reacttst.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 77);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\nexport import React = require('react');\r\nexport import ReactDom = require('react-dom');\r\nexport import ReactRedux = require('react-redux');\r\nexport import Redux = require('redux');\r\n\r\nexport const connect = ReactRedux.connect;\r\nexport const Provider = ReactRedux.Provider;\r\nexport const combineReducers = Redux.combineReducers;\r\nexport const createStore = Redux.createStore;\r\n\r\nexport interface iAction extends Redux.Action{\r\n}\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/reactAndRedux.ts","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_Symbol.js\n// module id = 18\n// module chunks = 0 1 3","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isPlainObject.js\n// module id = 19\n// module chunks = 0 1 3","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 20\n// module chunks = 0 1 3","/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport default function compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/compose.js\n// module id = 21\n// module chunks = 0 1 3","import isPlainObject from 'lodash-es/isPlainObject';\nimport $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nexport var ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};export default function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/createStore.js\n// module id = 22\n// module chunks = 0 1 3","/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/utils/warning.js\n// module id = 23\n// module chunks = 0 1 3","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 24\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\n\r\nimport {dateToString, stringToDate} from './helpers/dateFormat';\r\n\r\nexport interface iDatePick{\r\n label: string;\r\n id?: string;\r\n initialDate?: Date;\r\n change: (val: Date) => any;\r\n val?: Date\r\n}\r\n\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nexport class DatePick extends React.Component<iDatePick, null> {\r\n private elId: string;\r\n\r\n constructor(props: iDatePick, context: Object){\r\n super(props, context);\r\n this.elId = this.props.id || makeGuid();\r\n }\r\n\r\n componentDidMount() {\r\n let $el = $('#' + this.elId);\r\n\r\n $el.datepicker(\r\n {\r\n onSelect: () => {\r\n this.props.change(stringToDate($el.val()));\r\n }\r\n }\r\n );\r\n }\r\n\r\n render() {\r\n let params = {\r\n id: this.elId,\r\n type: 'text',\r\n style: {margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'},\r\n readOnly: true\r\n };\r\n\r\n if (this.props.val){\r\n params['value'] = dateToString(this.props.val);\r\n } else {\r\n params['defaultValue'] = dateToString(this.props.initialDate || new Date());\r\n }\r\n\r\n\r\n return <span className=\"date-pick\">\r\n <label htmlFor={this.elId}>{this.props.label}</label>\r\n {/*<input id={this.elId} type=\"text\"*/}\r\n {/*style={{margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'}}*/}\r\n {/*defaultValue={dateToString(this.props.initialDate || new Date())}*/}\r\n {/*readOnly={true}*/}\r\n {/*/>*/}\r\n <input {...params}/>\r\n </span>\r\n }\r\n}\r\n\r\nexport default DatePick;\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DatePick.tsx","import createStore from './createStore';\nimport combineReducers from './combineReducers';\nimport bindActionCreators from './bindActionCreators';\nimport applyMiddleware from './applyMiddleware';\nimport compose from './compose';\nimport warning from './utils/warning';\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== 'production', warn the user.\n*/\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \\'production\\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/index.js\n// module id = 27\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\nimport * as fixDate from './helpers/dateFormat';\r\nimport DatePick from './DatePick';\r\n\r\nfunction stringToDate(dte: string|Date){\r\n if ((dte as Date).getTime){\r\n return dte as Date;\r\n } else {\r\n return new Date(dte);\r\n }\r\n}\r\n\r\nexport interface iDateRange{\r\n maxRange: number;\r\n callback: (start: Date, end: Date, version?: number) => any;\r\n minRange?: number;\r\n maxDate?: Date;\r\n minDate?: Date;\r\n initialEnd?: Date;\r\n start?: Date;\r\n end?: Date;\r\n npmrds?: boolean;\r\n}\r\n\r\n\r\nexport class DateRange extends React.Component<iDateRange, null> {\r\n startId = makeGuid();\r\n endId = makeGuid();\r\n startInput: HTMLInputElement;\r\n endInput: HTMLInputElement;\r\n start: Date;\r\n end: Date;\r\n maxRange: number;\r\n minRange: number;\r\n numDays: number;\r\n versionTwoStart: Date;\r\n previousStart: Date;\r\n previousEnd: Date;\r\n\r\n constructor(props: iDateRange, context: Object) {\r\n super(props, context);\r\n\r\n this.versionTwoStart = new Date(2017, 1, 1);\r\n\r\n this.maxRange = Math.round(this.props.maxRange) - 1;\r\n this.minRange = typeof this.props['minRange'] == 'number' ? Math.round(this.props['minRange']) : 1;\r\n\r\n if (this.minRange > this.maxRange) {\r\n throw \"DateRange component: Max range must be greater than min range\";\r\n }\r\n\r\n if (this.props.initialEnd){\r\n this.end = stringToDate(this.props.initialEnd)\r\n } else {\r\n this.end = new Date();\r\n }\r\n\r\n this.end.setHours(0, 0, 0);\r\n this.start = new Date(this.end);\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n this.setNumDays();\r\n }\r\n\r\n setNumDays() {\r\n this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1;\r\n }\r\n\r\n\r\n componentDidMount() {\r\n this.startInput = document.getElementById(this.startId) as HTMLInputElement;\r\n this.endInput = document.getElementById(this.endId) as HTMLInputElement;\r\n\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private get needReset(): boolean {\r\n return this.numDays > this.maxRange || this.numDays < this.minRange;\r\n }\r\n\r\n private get versionSpan(): boolean{\r\n\r\n if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart){\r\n return true;\r\n } else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart){\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private get version(): number{\r\n\r\n if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)){\r\n return 2;\r\n } else if (this.start >= this.versionTwoStart){\r\n return 2;\r\n }\r\n return 1;\r\n }\r\n\r\n private finalizeChange(){\r\n\r\n if (this.props.npmrds){\r\n if (this.versionSpan){\r\n this.start = this.previousStart;\r\n this.end = this.previousEnd;\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n alert(\"Start and End dates must not span version break: \" + fixDate.dateToString(this.versionTwoStart));\r\n return;\r\n }\r\n }\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private setStart(s: Date) {\r\n\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.start = s;\r\n\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.end = new Date(this.start);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.end.setDate(this.end.getDate() + this.maxRange);\r\n } else {\r\n this.end.setDate(this.end.getDate() + this.minRange - 1);\r\n }\r\n\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n private setEnd(s: Date) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.end = s;\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.start = new Date(this.end);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n } else {\r\n this.start.setDate(this.start.getDate() - this.minRange + 1);\r\n }\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n render() {\r\n return <div className=\"date-range\">\r\n <DatePick id={this.startId} label=\"Start\" initialDate={this.start} change={(s) => {this.setStart(s)}}/>\r\n <DatePick id={this.endId} label=\"End\" initialDate={this.end} change={(s) => {this.setEnd(s)}}/>\r\n </div>;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DateRange.tsx","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_baseGetTag.js\n// module id = 30\n// module chunks = 0 1 3","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_freeGlobal.js\n// module id = 31\n// module chunks = 0 1 3","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getPrototype.js\n// module id = 32\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getRawTag.js\n// module id = 33\n// module chunks = 0 1 3","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_objectToString.js\n// module id = 34\n// module chunks = 0 1 3","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_overArg.js\n// module id = 35\n// module chunks = 0 1 3","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_root.js\n// module id = 36\n// module chunks = 0 1 3","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isObjectLike.js\n// module id = 37\n// module chunks = 0 1 3","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport compose from './compose';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nexport default function applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/applyMiddleware.js\n// module id = 38\n// module chunks = 0 1 3","function bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/bindActionCreators.js\n// module id = 39\n// module chunks = 0 1 3","import { ActionTypes } from './createStore';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './utils/warning';\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nexport default function combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/combineReducers.js\n// module id = 40\n// module chunks = 0 1 3","module.exports = require('./lib/index');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/index.js\n// module id = 41\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = require('./ponyfill');\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/index.js\n// module id = 42\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/ponyfill.js\n// module id = 43\n// module chunks = 0 1 3","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 44\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/13/2017.\r\n */\r\n\r\nexport function stringToDate(dateStr: string): Date {\r\n let parts = dateStr.split('/');\r\n\r\n let mn = parseInt(parts[0]) - 1;\r\n let d = parseInt(parts[1]);\r\n let y = parseInt(parts[2]);\r\n\r\n let dte = new Date(y, mn, d);\r\n dte.setHours(0, 0, 0);\r\n\r\n return dte;\r\n}\r\n\r\nexport function dateToString(dte: Date, zeroPad:boolean = true): string {\r\n let mn = (dte.getMonth() + 1).toString();\r\n let d = dte.getDate().toString();\r\n\r\n if (zeroPad){\r\n mn = mn.length == 1 ? '0' + mn : mn;\r\n d = d.length == 1 ? '0' + d : d ;\r\n }\r\n\r\n return `${mn}/${d}/${dte.getFullYear()}`;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/helpers/dateFormat.ts","import {connect} from '../../reactComponents/reactAndRedux';\r\nimport {iState} from './reacttst_store';\r\nimport {DatePick} from '../../reactComponents/DatePick';\r\nimport {DateRange} from '../../reactComponents/DateRange';\r\nimport * as actions from './reacttst_actions';\r\n\r\n\r\nexport const DatePickConnected = connect(\r\n (state: iState) => {\r\n return {\r\n label: 'Date Picker Connected',\r\n change: (v) => {\r\n console.log(v);\r\n },\r\n val: state.oneDate\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n change: (v) => {\r\n dispatch({type: actions.SET_ONE_DATE, d: v});\r\n }\r\n }\r\n }\r\n)(DatePick);\r\n\r\n\r\nexport const DateRangeConnected = connect(\r\n (state: iState) => {\r\n return {\r\n maxRange: 10,\r\n start: state.twoDates.start,\r\n end: state.twoDates.end,\r\n initialEnd: state.twoDates.end,\r\n npmrds: true\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n callback: (s: Date, e: Date, version: number) => {\r\n dispatch({type: actions.SET_TWO_DATES, start: s, end: e, version: version});\r\n }\r\n }\r\n }\r\n)(DateRange);\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_connect.ts","import * as actions from './reacttst_actions';\r\nimport Redux = require('redux');\r\n\r\n\r\nfunction oneDate(state = new Date(), action: {type: string, d: Date}) {\r\n if (action.type == actions.SET_ONE_DATE) {\r\n return action.d;\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\nlet start = new Date('12/31/2017');\r\nlet end = new Date('12/31/2017');\r\nstart.setDate(start.getDate() - 10);\r\n\r\nfunction twoDates(state = {start: start, end: end, version: 2}, action: {type: string, start: Date, end: Date, version: number}){\r\n if (action.type == actions.SET_TWO_DATES){\r\n return {\r\n start: action.start,\r\n end: action.end,\r\n version: action.version\r\n }\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\n\r\n\r\nexport const theStore = Redux.createStore(\r\n Redux.combineReducers({oneDate, twoDates})\r\n);\r\n\r\n\r\nexport interface iState {\r\n oneDate: Date;\r\n twoDates: {start: Date, end: Date, version: number}\r\n}\r\n\r\n\r\nexport function getState(): iState{\r\n return theStore.getState() as iState;\r\n}\r\n\r\nexport default theStore;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_store.ts","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 53\n// module chunks = 0 1","module.exports = ReactDOM;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactDOM\"\n// module id = 54\n// module chunks = 0 1","module.exports = ReactRedux;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactRedux\"\n// module id = 55\n// module chunks = 0 1","/**\r\n * Created by gavorhes on 9/22/2016.\r\n */\r\n\r\nimport {React, ReactDom as reactDom, Provider} from '../../reactComponents/reactAndRedux';\r\nimport {DatePick} from '../../reactComponents/DatePick';\r\nimport {DateRange} from '../../reactComponents/DateRange';\r\nimport {DatePickConnected, DateRangeConnected} from './reacttst_connect';\r\nimport * as s from './reacttst_store'\r\nimport {set} from \"d3-collection\";\r\n\r\n\r\nclass Demo extends React.Component<null, null> {\r\n\r\n\r\n render() {\r\n return <div>\r\n <h1>Date Pick</h1>\r\n <DatePick label={'Date Picker'} change={(v) => {\r\n console.log(v)\r\n }}/>\r\n <h1>Date Pick Connected</h1>\r\n <DatePickConnected/>\r\n <h1>Date Range</h1>\r\n <DateRange maxRange={10} initialEnd={new Date()} minRange={1} callback={(start, end) => {\r\n console.log(start, end);\r\n }}/>\r\n <h1>Date Range Connected</h1>\r\n <DateRangeConnected/>\r\n </div>\r\n }\r\n\r\n}\r\n\r\nreactDom.render(\r\n <Provider store={s.theStore}>\r\n <Demo/>\r\n </Provider>,\r\n document.getElementById(\"example\")\r\n);\r\n\r\ns.theStore.subscribe(() => {\r\n console.log(s.getState());\r\n});\r\n\r\nsetInterval(\r\n () => {\r\n let state = s.getState();\r\n // console.log(state.oneDate);\r\n\r\n // s.store.dispatch({type: s.ACTION_SET_ONE_DATE, d: state.oneDate.setDate(state.oneDate.getDate() - 1)});\r\n },\r\n 1000);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst.tsx"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///reacttst.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d","webpack:///./src/util/provide.ts?5c82","webpack:///external \"$\"?57aa","webpack:///./src/util/makeGuid.ts","webpack:///./src/reactComponents/reactAndRedux.ts","webpack:///./src/_tests/demos/reacttst_actions.ts","webpack:///./~/lodash-es/_Symbol.js","webpack:///./~/lodash-es/isPlainObject.js","webpack:///./~/redux/es/compose.js","webpack:///./~/redux/es/createStore.js","webpack:///(webpack)/buildin/global.js","webpack:///./src/reactComponents/DatePick.tsx","webpack:///./src/reactComponents/DateRange.tsx","webpack:///./~/lodash-es/_baseGetTag.js","webpack:///./~/lodash-es/_freeGlobal.js","webpack:///./~/lodash-es/_getPrototype.js","webpack:///./~/lodash-es/_getRawTag.js","webpack:///./~/lodash-es/_objectToString.js","webpack:///./~/lodash-es/_overArg.js","webpack:///./~/lodash-es/_root.js","webpack:///./~/lodash-es/isObjectLike.js","webpack:///./~/redux/es/applyMiddleware.js","webpack:///./~/redux/es/bindActionCreators.js","webpack:///./~/redux/es/combineReducers.js","webpack:///./~/symbol-observable/index.js","webpack:///./~/symbol-observable/lib/index.js","webpack:///./~/symbol-observable/lib/ponyfill.js","webpack:///(webpack)/buildin/module.js","webpack:///./src/reactComponents/helpers/dateFormat.ts","webpack:///./src/_tests/demos/reacttst_connect.ts","webpack:///./src/_tests/demos/reacttst_store.ts","webpack:///external \"React\"","webpack:///external \"ReactDOM\"","webpack:///external \"ReactRedux\"","webpack:///./src/_tests/demos/reacttst.tsx"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","$","makeGuid","replace","r","Math","random","toString","provide_1","nm","React","ReactDom","ReactRedux","Redux","connect","Provider","combineReducers","createStore","SET_ONE_DATE","SET_TWO_DATES","__webpack_exports__","__WEBPACK_IMPORTED_MODULE_0__root_js__","Symbol","isPlainObject","__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__","__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__","objectTag","proto","__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__","Ctor","constructor","funcToString","objectCtorString","funcProto","Function","objectProto","compose","_len","arguments","funcs","Array","_key","arg","reduce","a","b","apply","undefined","reducer","preloadedState","enhancer","ensureCanMutateNextListeners","nextListeners","currentListeners","slice","getState","currentState","subscribe","listener","Error","isSubscribed","push","index","indexOf","splice","dispatch","action","__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__","type","isDispatching","currentReducer","listeners","replaceReducer","nextReducer","ActionTypes","INIT","observable","_ref","outerSubscribe","observer","observeState","next","TypeError","unsubscribe","__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default","this","_ref2","__WEBPACK_IMPORTED_MODULE_1_symbol_observable__","g","eval","e","__extends","extendStatics","setPrototypeOf","__proto__","__","create","__assign","assign","t","reactAndRedux_1","makeGuid_1","dateFormat_1","DatePick","_super","props","context","_this","elId","id","componentDidMount","$el","datepicker","onSelect","change","stringToDate","val","render","params","style","margin","width","textAlign","readOnly","dateToString","initialDate","Date","createElement","className","htmlFor","label","Component","__WEBPACK_IMPORTED_MODULE_0__createStore__","__WEBPACK_IMPORTED_MODULE_1__combineReducers__","__WEBPACK_IMPORTED_MODULE_2__bindActionCreators__","__WEBPACK_IMPORTED_MODULE_3__applyMiddleware__","__WEBPACK_IMPORTED_MODULE_4__compose__","dte","getTime","fixDate","DatePick_1","DateRange","startId","endId","versionTwoStart","maxRange","round","minRange","initialEnd","end","setHours","start","setDate","getDate","setNumDays","numDays","startInput","document","getElementById","endInput","callback","version","finalizeChange","npmrds","versionSpan","previousStart","previousEnd","alert","setStart","needReset","setEnd","baseGetTag","undefinedTag","nullTag","symToStringTag","__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__","__WEBPACK_IMPORTED_MODULE_2__objectToString_js__","__WEBPACK_IMPORTED_MODULE_0__Symbol_js__","toStringTag","global","freeGlobal","__WEBPACK_IMPORTED_MODULE_0__overArg_js__","getPrototype","getPrototypeOf","getRawTag","isOwn","tag","unmasked","result","nativeObjectToString","objectToString","overArg","func","transform","__WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__","freeSelf","self","root","isObjectLike","applyMiddleware","middlewares","store","_dispatch","chain","middlewareAPI","map","middleware","__WEBPACK_IMPORTED_MODULE_0__compose__","_extends","target","source","key","bindActionCreator","actionCreator","bindActionCreators","actionCreators","keys","boundActionCreators","getUndefinedStateErrorMessage","actionType","assertReducerShape","reducers","forEach","substring","join","reducerKeys","finalReducers","finalReducerKeys","shapeAssertionError","state","hasChanged","nextState","_i","previousStateForKey","nextStateForKey","errorMessage","_interopRequireDefault","obj","_ponyfill","_ponyfill2","symbolObservablePonyfill","_Symbol","webpackPolyfill","deprecate","paths","children","dateStr","mn","parseInt","y","zeroPad","getMonth","getFullYear","DateRange_1","actions","DatePickConnected","v","console","log","oneDate","DateRangeConnected","twoDates","theStore","ReactDOM","reacttst_connect_1","Demo","setInterval"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAA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3B,EAAA1F,MAAAqH,cAACyI,EAAAT,kBAAiB,MAClB3J,EAAA1F,MAAAqH,cAAA,wBACA3B,EAAA1F,MAAAqH,cAAC8H,EAAAhH,WAAUI,SAAU,GAAIG,WAAY,GAAItB,MAAQqB,SAAU,EAAGa,SAAU,SAACT,EAAOF,GAC5E4G,QAAQC,IAAI3G,EAAOF,MAEvBjD,EAAA1F,MAAAqH,cAAA,kCACA3B,EAAA1F,MAAAqH,cAACyI,EAAAJ,mBAAkB,QAI/BK,GApBmBrK,EAAA1F,MAAMyH,UAsBzB/B,GAAAzF,SAAS0G,OACLjB,EAAA1F,MAAAqH,cAAC3B,EAAArF,UAAS0L,MAAOnN,EAAEgR,UACflK,EAAA1F,MAAAqH,cAAC0I,EAAI,OAET5G,SAASC,eAAe,YAG5BxK,EAAEgR,SAAS7M,UAAU,WACjBwM,QAAQC,IAAI5Q,EAAEiE,cAGlBmN,YACI,WACgBpR,EAAEiE,YAKlB","file":"reacttst.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 76);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n/* 2 */,\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */,\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\nexports.React = __webpack_require__(52);\r\nexports.ReactDom = __webpack_require__(53);\r\nexports.ReactRedux = __webpack_require__(54);\r\nexports.Redux = __webpack_require__(26);\r\nexports.connect = exports.ReactRedux.connect;\r\nexports.Provider = exports.ReactRedux.Provider;\r\nexports.combineReducers = exports.Redux.combineReducers;\r\nexports.createStore = exports.Redux.createStore;\r\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SET_ONE_DATE = 'set one date';\r\nexports.SET_TWO_DATES = 'set two dates';\r\n\n\n/***/ }),\n/* 17 */,\n/* 18 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(35);\n\n\n/** Built-in value references. */\nvar Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__[\"a\" /* default */].Symbol;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = Symbol;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(36);\n\n\n\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__[\"a\" /* default */])(value) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__[\"a\" /* default */])(value) != objectTag) {\n return false;\n }\n var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__[\"a\" /* default */])(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = isPlainObject;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = compose;\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(40);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ActionTypes; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createStore;\n\n\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__[\"a\" /* default */])(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2;\n}\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export default */\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar reactAndRedux_1 = __webpack_require__(15);\r\nvar $ = __webpack_require__(1);\r\n__webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar dateFormat_1 = __webpack_require__(45);\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nvar DatePick = (function (_super) {\r\n __extends(DatePick, _super);\r\n function DatePick(props, context) {\r\n var _this = _super.call(this, props, context) || this;\r\n _this.elId = _this.props.id || makeGuid_1.default();\r\n return _this;\r\n }\r\n DatePick.prototype.componentDidMount = function () {\r\n var _this = this;\r\n var $el = $('#' + this.elId);\r\n $el.datepicker({\r\n onSelect: function () {\r\n _this.props.change(dateFormat_1.stringToDate($el.val()));\r\n }\r\n });\r\n };\r\n DatePick.prototype.render = function () {\r\n var params = {\r\n id: this.elId,\r\n type: 'text',\r\n style: { margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center' },\r\n readOnly: true\r\n };\r\n if (this.props.val) {\r\n params['value'] = dateFormat_1.dateToString(this.props.val);\r\n }\r\n else {\r\n params['defaultValue'] = dateFormat_1.dateToString(this.props.initialDate || new Date());\r\n }\r\n return reactAndRedux_1.React.createElement(\"span\", { className: \"date-pick\" },\r\n reactAndRedux_1.React.createElement(\"label\", { htmlFor: this.elId }, this.props.label),\r\n reactAndRedux_1.React.createElement(\"input\", __assign({}, params)));\r\n };\r\n return DatePick;\r\n}(reactAndRedux_1.React.Component));\r\nexports.DatePick = DatePick;\r\nexports.default = DatePick;\r\n\n\n/***/ }),\n/* 25 */,\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(39);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(38);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(37);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"createStore\", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"combineReducers\", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"bindActionCreators\", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"applyMiddleware\", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__[\"a\"]; });\n\n\n\n\n\n\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== 'production', warn the user.\n*/\nfunction isCrushed() {}\n\nif (false) {\n warning('You are currently using minified code outside of NODE_ENV === \\'production\\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\n\n\n/***/ }),\n/* 27 */,\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar reactAndRedux_1 = __webpack_require__(15);\r\n__webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar fixDate = __webpack_require__(45);\r\nvar DatePick_1 = __webpack_require__(24);\r\nfunction stringToDate(dte) {\r\n if (dte.getTime) {\r\n return dte;\r\n }\r\n else {\r\n return new Date(dte);\r\n }\r\n}\r\nvar DateRange = (function (_super) {\r\n __extends(DateRange, _super);\r\n function DateRange(props, context) {\r\n var _this = _super.call(this, props, context) || this;\r\n _this.startId = makeGuid_1.default();\r\n _this.endId = makeGuid_1.default();\r\n _this.versionTwoStart = new Date(2017, 1, 1);\r\n _this.maxRange = Math.round(_this.props.maxRange) - 1;\r\n _this.minRange = typeof _this.props['minRange'] == 'number' ? Math.round(_this.props['minRange']) : 1;\r\n if (_this.minRange > _this.maxRange) {\r\n throw \"DateRange component: Max range must be greater than min range\";\r\n }\r\n if (_this.props.initialEnd) {\r\n _this.end = stringToDate(_this.props.initialEnd);\r\n }\r\n else {\r\n _this.end = new Date();\r\n }\r\n _this.end.setHours(0, 0, 0);\r\n _this.start = new Date(_this.end);\r\n _this.start.setDate(_this.start.getDate() - _this.maxRange);\r\n _this.setNumDays();\r\n return _this;\r\n }\r\n DateRange.prototype.setNumDays = function () {\r\n this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1;\r\n };\r\n DateRange.prototype.componentDidMount = function () {\r\n this.startInput = document.getElementById(this.startId);\r\n this.endInput = document.getElementById(this.endId);\r\n this.props.callback(this.start, this.end, this.version);\r\n };\r\n Object.defineProperty(DateRange.prototype, \"needReset\", {\r\n get: function () {\r\n return this.numDays > this.maxRange || this.numDays < this.minRange;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateRange.prototype, \"versionSpan\", {\r\n get: function () {\r\n if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart) {\r\n return true;\r\n }\r\n else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateRange.prototype, \"version\", {\r\n get: function () {\r\n if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)) {\r\n return 2;\r\n }\r\n else if (this.start >= this.versionTwoStart) {\r\n return 2;\r\n }\r\n return 1;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n DateRange.prototype.finalizeChange = function () {\r\n if (this.props.npmrds) {\r\n if (this.versionSpan) {\r\n this.start = this.previousStart;\r\n this.end = this.previousEnd;\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n alert(\"Start and End dates must not span version break: \" + fixDate.dateToString(this.versionTwoStart));\r\n return;\r\n }\r\n }\r\n this.props.callback(this.start, this.end, this.version);\r\n };\r\n DateRange.prototype.setStart = function (s) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n this.start = s;\r\n this.setNumDays();\r\n if (this.needReset) {\r\n this.end = new Date(this.start);\r\n if (this.numDays > this.maxRange) {\r\n this.end.setDate(this.end.getDate() + this.maxRange);\r\n }\r\n else {\r\n this.end.setDate(this.end.getDate() + this.minRange - 1);\r\n }\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n }\r\n this.finalizeChange();\r\n };\r\n DateRange.prototype.setEnd = function (s) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n this.end = s;\r\n this.setNumDays();\r\n if (this.needReset) {\r\n this.start = new Date(this.end);\r\n if (this.numDays > this.maxRange) {\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n }\r\n else {\r\n this.start.setDate(this.start.getDate() - this.minRange + 1);\r\n }\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.setNumDays();\r\n }\r\n this.finalizeChange();\r\n };\r\n DateRange.prototype.render = function () {\r\n var _this = this;\r\n return reactAndRedux_1.React.createElement(\"div\", { className: \"date-range\" },\r\n reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.startId, label: \"Start\", initialDate: this.start, change: function (s) { _this.setStart(s); } }),\r\n reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.endId, label: \"End\", initialDate: this.end, change: function (s) { _this.setEnd(s); } }));\r\n };\r\n return DateRange;\r\n}(reactAndRedux_1.React.Component));\r\nexports.DateRange = DateRange;\r\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(33);\n\n\n\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */].toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__[\"a\" /* default */])(value)\n : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__[\"a\" /* default */])(value);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = baseGetTag;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(23)))\n\n/***/ }),\n/* 31 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(34);\n\n\n/** Built-in value references. */\nvar getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__[\"a\" /* default */])(Object.getPrototypeOf, Object);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = getPrototype;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18);\n\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */].toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = getRawTag;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = objectToString;\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = overArg;\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(30);\n\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__[\"a\" /* default */] || freeSelf || Function('return this')();\n\n/* harmony default export */ __webpack_exports__[\"a\"] = root;\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = isObjectLike;\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(20);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = applyMiddleware;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__[\"a\" /* default */].apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/***/ }),\n/* 38 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = bindActionCreators;\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(22);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = combineReducers;\n\n\n\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__[\"a\" /* default */])(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (false) {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(41);\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = __webpack_require__(42);\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(23), __webpack_require__(43)(module)))\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports) {\n\nmodule.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n/***/ }),\n/* 44 */,\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by glenn on 6/13/2017.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nfunction stringToDate(dateStr) {\r\n var parts = dateStr.split('/');\r\n var mn = parseInt(parts[0]) - 1;\r\n var d = parseInt(parts[1]);\r\n var y = parseInt(parts[2]);\r\n var dte = new Date(y, mn, d);\r\n dte.setHours(0, 0, 0);\r\n return dte;\r\n}\r\nexports.stringToDate = stringToDate;\r\nfunction dateToString(dte, zeroPad) {\r\n if (zeroPad === void 0) { zeroPad = true; }\r\n var mn = (dte.getMonth() + 1).toString();\r\n var d = dte.getDate().toString();\r\n if (zeroPad) {\r\n mn = mn.length == 1 ? '0' + mn : mn;\r\n d = d.length == 1 ? '0' + d : d;\r\n }\r\n return mn + \"/\" + d + \"/\" + dte.getFullYear();\r\n}\r\nexports.dateToString = dateToString;\r\n\n\n/***/ }),\n/* 46 */,\n/* 47 */,\n/* 48 */,\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar reactAndRedux_1 = __webpack_require__(15);\r\nvar DatePick_1 = __webpack_require__(24);\r\nvar DateRange_1 = __webpack_require__(28);\r\nvar actions = __webpack_require__(16);\r\nexports.DatePickConnected = reactAndRedux_1.connect(function (state) {\r\n return {\r\n label: 'Date Picker Connected',\r\n change: function (v) {\r\n console.log(v);\r\n },\r\n val: state.oneDate\r\n };\r\n}, function (dispatch) {\r\n return {\r\n change: function (v) {\r\n dispatch({ type: actions.SET_ONE_DATE, d: v });\r\n }\r\n };\r\n})(DatePick_1.DatePick);\r\nexports.DateRangeConnected = reactAndRedux_1.connect(function (state) {\r\n return {\r\n maxRange: 10,\r\n start: state.twoDates.start,\r\n end: state.twoDates.end,\r\n initialEnd: state.twoDates.end,\r\n npmrds: true\r\n };\r\n}, function (dispatch) {\r\n return {\r\n callback: function (s, e, version) {\r\n dispatch({ type: actions.SET_TWO_DATES, start: s, end: e, version: version });\r\n }\r\n };\r\n})(DateRange_1.DateRange);\r\n\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar actions = __webpack_require__(16);\r\nvar Redux = __webpack_require__(26);\r\nfunction oneDate(state, action) {\r\n if (state === void 0) { state = new Date(); }\r\n if (action.type == actions.SET_ONE_DATE) {\r\n return action.d;\r\n }\r\n else {\r\n return state;\r\n }\r\n}\r\nvar start = new Date('12/31/2017');\r\nvar end = new Date('12/31/2017');\r\nstart.setDate(start.getDate() - 10);\r\nfunction twoDates(state, action) {\r\n if (state === void 0) { state = { start: start, end: end, version: 2 }; }\r\n if (action.type == actions.SET_TWO_DATES) {\r\n return {\r\n start: action.start,\r\n end: action.end,\r\n version: action.version\r\n };\r\n }\r\n else {\r\n return state;\r\n }\r\n}\r\nexports.theStore = Redux.createStore(Redux.combineReducers({ oneDate: oneDate, twoDates: twoDates }));\r\nfunction getState() {\r\n return exports.theStore.getState();\r\n}\r\nexports.getState = getState;\r\nexports.default = exports.theStore;\r\n\n\n/***/ }),\n/* 51 */,\n/* 52 */\n/***/ (function(module, exports) {\n\nmodule.exports = React;\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nmodule.exports = ReactDOM;\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\nmodule.exports = ReactRedux;\n\n/***/ }),\n/* 55 */,\n/* 56 */,\n/* 57 */,\n/* 58 */,\n/* 59 */,\n/* 60 */,\n/* 61 */,\n/* 62 */,\n/* 63 */,\n/* 64 */,\n/* 65 */,\n/* 66 */,\n/* 67 */,\n/* 68 */,\n/* 69 */,\n/* 70 */,\n/* 71 */,\n/* 72 */,\n/* 73 */,\n/* 74 */,\n/* 75 */,\n/* 76 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 9/22/2016.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar reactAndRedux_1 = __webpack_require__(15);\r\nvar DatePick_1 = __webpack_require__(24);\r\nvar DateRange_1 = __webpack_require__(28);\r\nvar reacttst_connect_1 = __webpack_require__(49);\r\nvar s = __webpack_require__(50);\r\nvar Demo = (function (_super) {\r\n __extends(Demo, _super);\r\n function Demo() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n Demo.prototype.render = function () {\r\n return reactAndRedux_1.React.createElement(\"div\", null,\r\n reactAndRedux_1.React.createElement(\"h1\", null, \"Date Pick\"),\r\n reactAndRedux_1.React.createElement(DatePick_1.DatePick, { label: 'Date Picker', change: function (v) {\r\n console.log(v);\r\n } }),\r\n reactAndRedux_1.React.createElement(\"h1\", null, \"Date Pick Connected\"),\r\n reactAndRedux_1.React.createElement(reacttst_connect_1.DatePickConnected, null),\r\n reactAndRedux_1.React.createElement(\"h1\", null, \"Date Range\"),\r\n reactAndRedux_1.React.createElement(DateRange_1.DateRange, { maxRange: 10, initialEnd: new Date(), minRange: 1, callback: function (start, end) {\r\n console.log(start, end);\r\n } }),\r\n reactAndRedux_1.React.createElement(\"h1\", null, \"Date Range Connected\"),\r\n reactAndRedux_1.React.createElement(reacttst_connect_1.DateRangeConnected, null));\r\n };\r\n return Demo;\r\n}(reactAndRedux_1.React.Component));\r\nreactAndRedux_1.ReactDom.render(reactAndRedux_1.React.createElement(reactAndRedux_1.Provider, { store: s.theStore },\r\n reactAndRedux_1.React.createElement(Demo, null)), document.getElementById(\"example\"));\r\ns.theStore.subscribe(function () {\r\n console.log(s.getState());\r\n});\r\nsetInterval(function () {\r\n var state = s.getState();\r\n // console.log(state.oneDate);\r\n // s.store.dispatch({type: s.ACTION_SET_ONE_DATE, d: state.oneDate.setDate(state.oneDate.getDate() - 1)});\r\n}, 1000);\r\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// reacttst.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 76);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\nexport import React = require('react');\r\nexport import ReactDom = require('react-dom');\r\nexport import ReactRedux = require('react-redux');\r\nexport import Redux = require('redux');\r\n\r\nexport const connect = ReactRedux.connect;\r\nexport const Provider = ReactRedux.Provider;\r\nexport const combineReducers = Redux.combineReducers;\r\nexport const createStore = Redux.createStore;\r\n\r\nexport interface iAction extends Redux.Action{\r\n}\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/reactAndRedux.ts","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_Symbol.js\n// module id = 18\n// module chunks = 0 1 3","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isPlainObject.js\n// module id = 19\n// module chunks = 0 1 3","/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport default function compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/compose.js\n// module id = 20\n// module chunks = 0 1 3","import isPlainObject from 'lodash-es/isPlainObject';\nimport $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nexport var ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};export default function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/createStore.js\n// module id = 21\n// module chunks = 0 1 3","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 23\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\n\r\nimport {dateToString, stringToDate} from './helpers/dateFormat';\r\n\r\nexport interface iDatePick{\r\n label: string;\r\n id?: string;\r\n initialDate?: Date;\r\n change: (val: Date) => any;\r\n val?: Date\r\n}\r\n\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nexport class DatePick extends React.Component<iDatePick, null> {\r\n private elId: string;\r\n\r\n constructor(props: iDatePick, context: Object){\r\n super(props, context);\r\n this.elId = this.props.id || makeGuid();\r\n }\r\n\r\n componentDidMount() {\r\n let $el = $('#' + this.elId);\r\n\r\n $el.datepicker(\r\n {\r\n onSelect: () => {\r\n this.props.change(stringToDate($el.val()));\r\n }\r\n }\r\n );\r\n }\r\n\r\n render() {\r\n let params = {\r\n id: this.elId,\r\n type: 'text',\r\n style: {margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'},\r\n readOnly: true\r\n };\r\n\r\n if (this.props.val){\r\n params['value'] = dateToString(this.props.val);\r\n } else {\r\n params['defaultValue'] = dateToString(this.props.initialDate || new Date());\r\n }\r\n\r\n\r\n return <span className=\"date-pick\">\r\n <label htmlFor={this.elId}>{this.props.label}</label>\r\n {/*<input id={this.elId} type=\"text\"*/}\r\n {/*style={{margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'}}*/}\r\n {/*defaultValue={dateToString(this.props.initialDate || new Date())}*/}\r\n {/*readOnly={true}*/}\r\n {/*/>*/}\r\n <input {...params}/>\r\n </span>\r\n }\r\n}\r\n\r\nexport default DatePick;\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DatePick.tsx","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\nimport * as fixDate from './helpers/dateFormat';\r\nimport DatePick from './DatePick';\r\n\r\nfunction stringToDate(dte: string|Date){\r\n if ((dte as Date).getTime){\r\n return dte as Date;\r\n } else {\r\n return new Date(dte);\r\n }\r\n}\r\n\r\nexport interface iDateRange{\r\n maxRange: number;\r\n callback: (start: Date, end: Date, version?: number) => any;\r\n minRange?: number;\r\n maxDate?: Date;\r\n minDate?: Date;\r\n initialEnd?: Date;\r\n start?: Date;\r\n end?: Date;\r\n npmrds?: boolean;\r\n}\r\n\r\n\r\nexport class DateRange extends React.Component<iDateRange, null> {\r\n startId = makeGuid();\r\n endId = makeGuid();\r\n startInput: HTMLInputElement;\r\n endInput: HTMLInputElement;\r\n start: Date;\r\n end: Date;\r\n maxRange: number;\r\n minRange: number;\r\n numDays: number;\r\n versionTwoStart: Date;\r\n previousStart: Date;\r\n previousEnd: Date;\r\n\r\n constructor(props: iDateRange, context: Object) {\r\n super(props, context);\r\n\r\n this.versionTwoStart = new Date(2017, 1, 1);\r\n\r\n this.maxRange = Math.round(this.props.maxRange) - 1;\r\n this.minRange = typeof this.props['minRange'] == 'number' ? Math.round(this.props['minRange']) : 1;\r\n\r\n if (this.minRange > this.maxRange) {\r\n throw \"DateRange component: Max range must be greater than min range\";\r\n }\r\n\r\n if (this.props.initialEnd){\r\n this.end = stringToDate(this.props.initialEnd)\r\n } else {\r\n this.end = new Date();\r\n }\r\n\r\n this.end.setHours(0, 0, 0);\r\n this.start = new Date(this.end);\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n this.setNumDays();\r\n }\r\n\r\n setNumDays() {\r\n this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1;\r\n }\r\n\r\n\r\n componentDidMount() {\r\n this.startInput = document.getElementById(this.startId) as HTMLInputElement;\r\n this.endInput = document.getElementById(this.endId) as HTMLInputElement;\r\n\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private get needReset(): boolean {\r\n return this.numDays > this.maxRange || this.numDays < this.minRange;\r\n }\r\n\r\n private get versionSpan(): boolean{\r\n\r\n if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart){\r\n return true;\r\n } else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart){\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private get version(): number{\r\n\r\n if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)){\r\n return 2;\r\n } else if (this.start >= this.versionTwoStart){\r\n return 2;\r\n }\r\n return 1;\r\n }\r\n\r\n private finalizeChange(){\r\n\r\n if (this.props.npmrds){\r\n if (this.versionSpan){\r\n this.start = this.previousStart;\r\n this.end = this.previousEnd;\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n alert(\"Start and End dates must not span version break: \" + fixDate.dateToString(this.versionTwoStart));\r\n return;\r\n }\r\n }\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private setStart(s: Date) {\r\n\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.start = s;\r\n\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.end = new Date(this.start);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.end.setDate(this.end.getDate() + this.maxRange);\r\n } else {\r\n this.end.setDate(this.end.getDate() + this.minRange - 1);\r\n }\r\n\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n private setEnd(s: Date) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.end = s;\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.start = new Date(this.end);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n } else {\r\n this.start.setDate(this.start.getDate() - this.minRange + 1);\r\n }\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n render() {\r\n return <div className=\"date-range\">\r\n <DatePick id={this.startId} label=\"Start\" initialDate={this.start} change={(s) => {this.setStart(s)}}/>\r\n <DatePick id={this.endId} label=\"End\" initialDate={this.end} change={(s) => {this.setEnd(s)}}/>\r\n </div>;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DateRange.tsx","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_baseGetTag.js\n// module id = 29\n// module chunks = 0 1 3","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_freeGlobal.js\n// module id = 30\n// module chunks = 0 1 3","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getPrototype.js\n// module id = 31\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getRawTag.js\n// module id = 32\n// module chunks = 0 1 3","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_objectToString.js\n// module id = 33\n// module chunks = 0 1 3","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_overArg.js\n// module id = 34\n// module chunks = 0 1 3","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_root.js\n// module id = 35\n// module chunks = 0 1 3","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isObjectLike.js\n// module id = 36\n// module chunks = 0 1 3","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport compose from './compose';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nexport default function applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/applyMiddleware.js\n// module id = 37\n// module chunks = 0 1 3","function bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/bindActionCreators.js\n// module id = 38\n// module chunks = 0 1 3","import { ActionTypes } from './createStore';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './utils/warning';\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nexport default function combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/combineReducers.js\n// module id = 39\n// module chunks = 0 1 3","module.exports = require('./lib/index');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/index.js\n// module id = 40\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = require('./ponyfill');\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/index.js\n// module id = 41\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/ponyfill.js\n// module id = 42\n// module chunks = 0 1 3","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 43\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/13/2017.\r\n */\r\n\r\nexport function stringToDate(dateStr: string): Date {\r\n let parts = dateStr.split('/');\r\n\r\n let mn = parseInt(parts[0]) - 1;\r\n let d = parseInt(parts[1]);\r\n let y = parseInt(parts[2]);\r\n\r\n let dte = new Date(y, mn, d);\r\n dte.setHours(0, 0, 0);\r\n\r\n return dte;\r\n}\r\n\r\nexport function dateToString(dte: Date, zeroPad:boolean = true): string {\r\n let mn = (dte.getMonth() + 1).toString();\r\n let d = dte.getDate().toString();\r\n\r\n if (zeroPad){\r\n mn = mn.length == 1 ? '0' + mn : mn;\r\n d = d.length == 1 ? '0' + d : d ;\r\n }\r\n\r\n return `${mn}/${d}/${dte.getFullYear()}`;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/helpers/dateFormat.ts","import {connect} from '../../reactComponents/reactAndRedux';\r\nimport {iState} from './reacttst_store';\r\nimport {DatePick} from '../../reactComponents/DatePick';\r\nimport {DateRange} from '../../reactComponents/DateRange';\r\nimport * as actions from './reacttst_actions';\r\n\r\n\r\nexport const DatePickConnected = connect(\r\n (state: iState) => {\r\n return {\r\n label: 'Date Picker Connected',\r\n change: (v) => {\r\n console.log(v);\r\n },\r\n val: state.oneDate\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n change: (v) => {\r\n dispatch({type: actions.SET_ONE_DATE, d: v});\r\n }\r\n }\r\n }\r\n)(DatePick);\r\n\r\n\r\nexport const DateRangeConnected = connect(\r\n (state: iState) => {\r\n return {\r\n maxRange: 10,\r\n start: state.twoDates.start,\r\n end: state.twoDates.end,\r\n initialEnd: state.twoDates.end,\r\n npmrds: true\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n callback: (s: Date, e: Date, version: number) => {\r\n dispatch({type: actions.SET_TWO_DATES, start: s, end: e, version: version});\r\n }\r\n }\r\n }\r\n)(DateRange);\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_connect.ts","import * as actions from './reacttst_actions';\r\nimport Redux = require('redux');\r\n\r\n\r\nfunction oneDate(state = new Date(), action: {type: string, d: Date}) {\r\n if (action.type == actions.SET_ONE_DATE) {\r\n return action.d;\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\nlet start = new Date('12/31/2017');\r\nlet end = new Date('12/31/2017');\r\nstart.setDate(start.getDate() - 10);\r\n\r\nfunction twoDates(state = {start: start, end: end, version: 2}, action: {type: string, start: Date, end: Date, version: number}){\r\n if (action.type == actions.SET_TWO_DATES){\r\n return {\r\n start: action.start,\r\n end: action.end,\r\n version: action.version\r\n }\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\n\r\n\r\nexport const theStore = Redux.createStore(\r\n Redux.combineReducers({oneDate, twoDates})\r\n);\r\n\r\n\r\nexport interface iState {\r\n oneDate: Date;\r\n twoDates: {start: Date, end: Date, version: number}\r\n}\r\n\r\n\r\nexport function getState(): iState{\r\n return theStore.getState() as iState;\r\n}\r\n\r\nexport default theStore;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_store.ts","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 52\n// module chunks = 0 1","module.exports = ReactDOM;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactDOM\"\n// module id = 53\n// module chunks = 0 1","module.exports = ReactRedux;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactRedux\"\n// module id = 54\n// module chunks = 0 1","/**\r\n * Created by gavorhes on 9/22/2016.\r\n */\r\n\r\nimport {React, ReactDom as reactDom, Provider} from '../../reactComponents/reactAndRedux';\r\nimport {DatePick} from '../../reactComponents/DatePick';\r\nimport {DateRange} from '../../reactComponents/DateRange';\r\nimport {DatePickConnected, DateRangeConnected} from './reacttst_connect';\r\nimport * as s from './reacttst_store'\r\nimport {set} from \"d3-collection\";\r\n\r\n\r\nclass Demo extends React.Component<null, null> {\r\n\r\n\r\n render() {\r\n return <div>\r\n <h1>Date Pick</h1>\r\n <DatePick label={'Date Picker'} change={(v) => {\r\n console.log(v)\r\n }}/>\r\n <h1>Date Pick Connected</h1>\r\n <DatePickConnected/>\r\n <h1>Date Range</h1>\r\n <DateRange maxRange={10} initialEnd={new Date()} minRange={1} callback={(start, end) => {\r\n console.log(start, end);\r\n }}/>\r\n <h1>Date Range Connected</h1>\r\n <DateRangeConnected/>\r\n </div>\r\n }\r\n\r\n}\r\n\r\nreactDom.render(\r\n <Provider store={s.theStore}>\r\n <Demo/>\r\n </Provider>,\r\n document.getElementById(\"example\")\r\n);\r\n\r\ns.theStore.subscribe(() => {\r\n console.log(s.getState());\r\n});\r\n\r\nsetInterval(\r\n () => {\r\n let state = s.getState();\r\n // console.log(state.oneDate);\r\n\r\n // s.store.dispatch({type: s.ACTION_SET_ONE_DATE, d: state.oneDate.setDate(state.oneDate.getDate() - 1)});\r\n },\r\n 1000);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst.tsx"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/reacttst_actions.js b/test/serve/js/reacttst_actions.js index 9c6e73399c73b3e76fecba275bd01cc51431a538..ed4d14e5bb958b36d19ecdb6f30367ba17db2039 100644 --- a/test/serve/js/reacttst_actions.js +++ b/test/serve/js/reacttst_actions.js @@ -1,84 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 16); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 16: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SET_ONE_DATE = 'set one date'; -exports.SET_TWO_DATES = 'set two dates'; - - -/***/ }) - -/******/ }); +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=16)}({16:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SET_ONE_DATE="set one date",t.SET_TWO_DATES="set two dates"}}); //# sourceMappingURL=reacttst_actions.js.map \ No newline at end of file diff --git a/test/serve/js/reacttst_actions.js.map b/test/serve/js/reacttst_actions.js.map index c392b3537d19c2cf7000c8ed7793129cbe70c55d..1e31c9b44ab47c5476446d3a3f1f475502e94f04 100644 --- a/test/serve/js/reacttst_actions.js.map +++ b/test/serve/js/reacttst_actions.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc***********","webpack:///./src/_tests/demos/reacttst_actions.ts?2a10**"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;AC9Da,oBAAY,GAAG,cAAc,CAAC;AAC9B,qBAAa,GAAG,eAAe,CAAC","file":"reacttst_actions.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///reacttst_actions.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d***********","webpack:///./src/_tests/demos/reacttst_actions.ts?2a10**"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","16","SET_ONE_DATE","SET_TWO_DATES"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,EAAAC,IAGtDvB,EAAA0B,EAAA,GAGA1B,IAAA2B,EAAA,MDMMC,GACA,SAAUxB,EAAQD,EAASH,GAEjC,YAEAe,QAAOC,eAAeb,EAAS,cAAgBO,OAAO,IEzEzCP,EAAA0B,aAAe,eACf1B,EAAA2B,cAAgB","file":"reacttst_actions.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 16);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 16:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SET_ONE_DATE = 'set one date';\r\nexports.SET_TWO_DATES = 'set two dates';\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// reacttst_actions.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 16);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/reacttst_connect.js b/test/serve/js/reacttst_connect.js index 17e846dea0bb7558ba8605004e8afcadf0827c57..7759de48b9c8b98b9a1048e501b0e7ffeab630b0 100644 --- a/test/serve/js/reacttst_connect.js +++ b/test/serve/js/reacttst_connect.js @@ -1,1756 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 50); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), -/* 2 */, -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), -/* 4 */, -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */, -/* 10 */, -/* 11 */, -/* 12 */, -/* 13 */, -/* 14 */, -/* 15 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by glenn on 6/12/2017. - */ -exports.React = __webpack_require__(53); -exports.ReactDom = __webpack_require__(54); -exports.ReactRedux = __webpack_require__(55); -exports.Redux = __webpack_require__(27); -exports.connect = exports.ReactRedux.connect; -exports.Provider = exports.ReactRedux.Provider; -exports.combineReducers = exports.Redux.combineReducers; -exports.createStore = exports.Redux.createStore; - - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SET_ONE_DATE = 'set one date'; -exports.SET_TWO_DATES = 'set two dates'; - - -/***/ }), -/* 17 */, -/* 18 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(36); - - -/** Built-in value references. */ -var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; - -/* harmony default export */ __webpack_exports__["a"] = Symbol; - - -/***/ }), -/* 19 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(30); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(32); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(37); - - - - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { - return false; - } - var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -/* harmony default export */ __webpack_exports__["a"] = isPlainObject; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = compose; -/** - * Composes single-argument functions from right to left. The rightmost - * function can take multiple arguments as it provides the signature for - * the resulting composite function. - * - * @param {...Function} funcs The functions to compose. - * @returns {Function} A function obtained by composing the argument functions - * from right to left. For example, compose(f, g, h) is identical to doing - * (...args) => f(g(h(...args))). - */ - -function compose() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - - if (funcs.length === 0) { - return function (arg) { - return arg; - }; - } - - if (funcs.length === 1) { - return funcs[0]; - } - - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(undefined, arguments)); - }; - }); -} - -/***/ }), -/* 22 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ActionTypes; }); -/* harmony export (immutable) */ __webpack_exports__["a"] = createStore; - - - -/** - * These are private action types reserved by Redux. - * For any unknown actions, you must return the current state. - * If the current state is undefined, you must return the initial state. - * Do not reference these action types directly in your code. - */ -var ActionTypes = { - INIT: '@@redux/INIT' - - /** - * Creates a Redux store that holds the state tree. - * The only way to change the data in the store is to call `dispatch()` on it. - * - * There should only be a single store in your app. To specify how different - * parts of the state tree respond to actions, you may combine several reducers - * into a single reducer function by using `combineReducers`. - * - * @param {Function} reducer A function that returns the next state tree, given - * the current state tree and the action to handle. - * - * @param {any} [preloadedState] The initial state. You may optionally specify it - * to hydrate the state from the server in universal apps, or to restore a - * previously serialized user session. - * If you use `combineReducers` to produce the root reducer function, this must be - * an object with the same shape as `combineReducers` keys. - * - * @param {Function} [enhancer] The store enhancer. You may optionally specify it - * to enhance the store with third-party capabilities such as middleware, - * time travel, persistence, etc. The only store enhancer that ships with Redux - * is `applyMiddleware()`. - * - * @returns {Store} A Redux store that lets you read the state, dispatch actions - * and subscribe to changes. - */ -};function createStore(reducer, preloadedState, enhancer) { - var _ref2; - - if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { - enhancer = preloadedState; - preloadedState = undefined; - } - - if (typeof enhancer !== 'undefined') { - if (typeof enhancer !== 'function') { - throw new Error('Expected the enhancer to be a function.'); - } - - return enhancer(createStore)(reducer, preloadedState); - } - - if (typeof reducer !== 'function') { - throw new Error('Expected the reducer to be a function.'); - } - - var currentReducer = reducer; - var currentState = preloadedState; - var currentListeners = []; - var nextListeners = currentListeners; - var isDispatching = false; - - function ensureCanMutateNextListeners() { - if (nextListeners === currentListeners) { - nextListeners = currentListeners.slice(); - } - } - - /** - * Reads the state tree managed by the store. - * - * @returns {any} The current state tree of your application. - */ - function getState() { - return currentState; - } - - /** - * Adds a change listener. It will be called any time an action is dispatched, - * and some part of the state tree may potentially have changed. You may then - * call `getState()` to read the current state tree inside the callback. - * - * You may call `dispatch()` from a change listener, with the following - * caveats: - * - * 1. The subscriptions are snapshotted just before every `dispatch()` call. - * If you subscribe or unsubscribe while the listeners are being invoked, this - * will not have any effect on the `dispatch()` that is currently in progress. - * However, the next `dispatch()` call, whether nested or not, will use a more - * recent snapshot of the subscription list. - * - * 2. The listener should not expect to see all state changes, as the state - * might have been updated multiple times during a nested `dispatch()` before - * the listener is called. It is, however, guaranteed that all subscribers - * registered before the `dispatch()` started will be called with the latest - * state by the time it exits. - * - * @param {Function} listener A callback to be invoked on every dispatch. - * @returns {Function} A function to remove this change listener. - */ - function subscribe(listener) { - if (typeof listener !== 'function') { - throw new Error('Expected listener to be a function.'); - } - - var isSubscribed = true; - - ensureCanMutateNextListeners(); - nextListeners.push(listener); - - return function unsubscribe() { - if (!isSubscribed) { - return; - } - - isSubscribed = false; - - ensureCanMutateNextListeners(); - var index = nextListeners.indexOf(listener); - nextListeners.splice(index, 1); - }; - } - - /** - * Dispatches an action. It is the only way to trigger a state change. - * - * The `reducer` function, used to create the store, will be called with the - * current state tree and the given `action`. Its return value will - * be considered the **next** state of the tree, and the change listeners - * will be notified. - * - * The base implementation only supports plain object actions. If you want to - * dispatch a Promise, an Observable, a thunk, or something else, you need to - * wrap your store creating function into the corresponding middleware. For - * example, see the documentation for the `redux-thunk` package. Even the - * middleware will eventually dispatch plain object actions using this method. - * - * @param {Object} action A plain object representing “what changed”. It is - * a good idea to keep actions serializable so you can record and replay user - * sessions, or use the time travelling `redux-devtools`. An action must have - * a `type` property which may not be `undefined`. It is a good idea to use - * string constants for action types. - * - * @returns {Object} For convenience, the same action object you dispatched. - * - * Note that, if you use a custom middleware, it may wrap `dispatch()` to - * return something else (for example, a Promise you can await). - */ - function dispatch(action) { - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) { - throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); - } - - if (typeof action.type === 'undefined') { - throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); - } - - if (isDispatching) { - throw new Error('Reducers may not dispatch actions.'); - } - - try { - isDispatching = true; - currentState = currentReducer(currentState, action); - } finally { - isDispatching = false; - } - - var listeners = currentListeners = nextListeners; - for (var i = 0; i < listeners.length; i++) { - var listener = listeners[i]; - listener(); - } - - return action; - } - - /** - * Replaces the reducer currently used by the store to calculate the state. - * - * You might need this if your app implements code splitting and you want to - * load some of the reducers dynamically. You might also need this if you - * implement a hot reloading mechanism for Redux. - * - * @param {Function} nextReducer The reducer for the store to use instead. - * @returns {void} - */ - function replaceReducer(nextReducer) { - if (typeof nextReducer !== 'function') { - throw new Error('Expected the nextReducer to be a function.'); - } - - currentReducer = nextReducer; - dispatch({ type: ActionTypes.INIT }); - } - - /** - * Interoperability point for observable/reactive libraries. - * @returns {observable} A minimal observable of state changes. - * For more information, see the observable proposal: - * https://github.com/tc39/proposal-observable - */ - function observable() { - var _ref; - - var outerSubscribe = subscribe; - return _ref = { - /** - * The minimal observable subscription method. - * @param {Object} observer Any object that can be used as an observer. - * The observer object should have a `next` method. - * @returns {subscription} An object with an `unsubscribe` method that can - * be used to unsubscribe the observable from the store, and prevent further - * emission of values from the observable. - */ - subscribe: function subscribe(observer) { - if (typeof observer !== 'object') { - throw new TypeError('Expected the observer to be an object.'); - } - - function observeState() { - if (observer.next) { - observer.next(getState()); - } - } - - observeState(); - var unsubscribe = outerSubscribe(observeState); - return { unsubscribe: unsubscribe }; - } - }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { - return this; - }, _ref; - } - - // When a store is created, an "INIT" action is dispatched so that every - // reducer returns their initial state. This effectively populates - // the initial state tree. - dispatch({ type: ActionTypes.INIT }); - - return _ref2 = { - dispatch: dispatch, - subscribe: subscribe, - getState: getState, - replaceReducer: replaceReducer - }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; -} - -/***/ }), -/* 23 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = warning; -/** - * Prints a warning in the console if it exists. - * - * @param {String} message The warning message. - * @returns {void} - */ -function warning(message) { - /* eslint-disable no-console */ - if (typeof console !== 'undefined' && typeof console.error === 'function') { - console.error(message); - } - /* eslint-enable no-console */ - try { - // This error was thrown as a convenience so that if you enable - // "break on all exceptions" in your console, - // it would pause the execution at this line. - throw new Error(message); - /* eslint-disable no-empty */ - } catch (e) {} - /* eslint-enable no-empty */ -} - -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by glenn on 6/14/2017. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -var __assign = (this && this.__assign) || Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; -}; -Object.defineProperty(exports, "__esModule", { value: true }); -var reactAndRedux_1 = __webpack_require__(15); -var $ = __webpack_require__(1); -__webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var dateFormat_1 = __webpack_require__(46); -/** - * params label, id, initialDate, change callback with value as string - */ -var DatePick = (function (_super) { - __extends(DatePick, _super); - function DatePick(props, context) { - var _this = _super.call(this, props, context) || this; - _this.elId = _this.props.id || makeGuid_1.default(); - return _this; - } - DatePick.prototype.componentDidMount = function () { - var _this = this; - var $el = $('#' + this.elId); - $el.datepicker({ - onSelect: function () { - _this.props.change(dateFormat_1.stringToDate($el.val())); - } - }); - }; - DatePick.prototype.render = function () { - var params = { - id: this.elId, - type: 'text', - style: { margin: "0 10px 0 5px", width: '73px', textAlign: 'center' }, - readOnly: true - }; - if (this.props.val) { - params['value'] = dateFormat_1.dateToString(this.props.val); - } - else { - params['defaultValue'] = dateFormat_1.dateToString(this.props.initialDate || new Date()); - } - return reactAndRedux_1.React.createElement("span", { className: "date-pick" }, - reactAndRedux_1.React.createElement("label", { htmlFor: this.elId }, this.props.label), - reactAndRedux_1.React.createElement("input", __assign({}, params))); - }; - return DatePick; -}(reactAndRedux_1.React.Component)); -exports.DatePick = DatePick; -exports.default = DatePick; - - -/***/ }), -/* 26 */, -/* 27 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(22); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(40); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(38); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(21); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(23); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; }); - - - - - - - -/* -* This is a dummy function to check if the function name has been altered by minification. -* If the function has been minified and NODE_ENV !== 'production', warn the user. -*/ -function isCrushed() {} - -if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); -} - - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(20))) - -/***/ }), -/* 28 */, -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by glenn on 6/12/2017. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var reactAndRedux_1 = __webpack_require__(15); -__webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var fixDate = __webpack_require__(46); -var DatePick_1 = __webpack_require__(25); -function stringToDate(dte) { - if (dte.getTime) { - return dte; - } - else { - return new Date(dte); - } -} -var DateRange = (function (_super) { - __extends(DateRange, _super); - function DateRange(props, context) { - var _this = _super.call(this, props, context) || this; - _this.startId = makeGuid_1.default(); - _this.endId = makeGuid_1.default(); - _this.versionTwoStart = new Date(2017, 1, 1); - _this.maxRange = Math.round(_this.props.maxRange) - 1; - _this.minRange = typeof _this.props['minRange'] == 'number' ? Math.round(_this.props['minRange']) : 1; - if (_this.minRange > _this.maxRange) { - throw "DateRange component: Max range must be greater than min range"; - } - if (_this.props.initialEnd) { - _this.end = stringToDate(_this.props.initialEnd); - } - else { - _this.end = new Date(); - } - _this.end.setHours(0, 0, 0); - _this.start = new Date(_this.end); - _this.start.setDate(_this.start.getDate() - _this.maxRange); - _this.setNumDays(); - return _this; - } - DateRange.prototype.setNumDays = function () { - this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1; - }; - DateRange.prototype.componentDidMount = function () { - this.startInput = document.getElementById(this.startId); - this.endInput = document.getElementById(this.endId); - this.props.callback(this.start, this.end, this.version); - }; - Object.defineProperty(DateRange.prototype, "needReset", { - get: function () { - return this.numDays > this.maxRange || this.numDays < this.minRange; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DateRange.prototype, "versionSpan", { - get: function () { - if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart) { - return true; - } - else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart) { - return true; - } - return false; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(DateRange.prototype, "version", { - get: function () { - if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)) { - return 2; - } - else if (this.start >= this.versionTwoStart) { - return 2; - } - return 1; - }, - enumerable: true, - configurable: true - }); - DateRange.prototype.finalizeChange = function () { - if (this.props.npmrds) { - if (this.versionSpan) { - this.start = this.previousStart; - this.end = this.previousEnd; - this.startInput.value = fixDate.dateToString(this.start); - this.endInput.value = fixDate.dateToString(this.end); - this.setNumDays(); - alert("Start and End dates must not span version break: " + fixDate.dateToString(this.versionTwoStart)); - return; - } - } - this.props.callback(this.start, this.end, this.version); - }; - DateRange.prototype.setStart = function (s) { - this.previousStart = new Date(this.start); - this.previousEnd = new Date(this.end); - this.start = s; - this.setNumDays(); - if (this.needReset) { - this.end = new Date(this.start); - if (this.numDays > this.maxRange) { - this.end.setDate(this.end.getDate() + this.maxRange); - } - else { - this.end.setDate(this.end.getDate() + this.minRange - 1); - } - this.endInput.value = fixDate.dateToString(this.end); - this.setNumDays(); - } - this.finalizeChange(); - }; - DateRange.prototype.setEnd = function (s) { - this.previousStart = new Date(this.start); - this.previousEnd = new Date(this.end); - this.end = s; - this.setNumDays(); - if (this.needReset) { - this.start = new Date(this.end); - if (this.numDays > this.maxRange) { - this.start.setDate(this.start.getDate() - this.maxRange); - } - else { - this.start.setDate(this.start.getDate() - this.minRange + 1); - } - this.startInput.value = fixDate.dateToString(this.start); - this.setNumDays(); - } - this.finalizeChange(); - }; - DateRange.prototype.render = function () { - var _this = this; - return reactAndRedux_1.React.createElement("div", { className: "date-range" }, - reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.startId, label: "Start", initialDate: this.start, change: function (s) { _this.setStart(s); } }), - reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.endId, label: "End", initialDate: this.end, change: function (s) { _this.setEnd(s); } })); - }; - return DateRange; -}(reactAndRedux_1.React.Component)); -exports.DateRange = DateRange; - - -/***/ }), -/* 30 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(34); - - - - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value) - : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value); -} - -/* harmony default export */ __webpack_exports__["a"] = baseGetTag; - - -/***/ }), -/* 31 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/* harmony default export */ __webpack_exports__["a"] = freeGlobal; - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(24))) - -/***/ }), -/* 32 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(35); - - -/** Built-in value references. */ -var getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object); - -/* harmony default export */ __webpack_exports__["a"] = getPrototype; - - -/***/ }), -/* 33 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18); - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = getRawTag; - - -/***/ }), -/* 34 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -/* harmony default export */ __webpack_exports__["a"] = objectToString; - - -/***/ }), -/* 35 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/* harmony default export */ __webpack_exports__["a"] = overArg; - - -/***/ }), -/* 36 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(31); - - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')(); - -/* harmony default export */ __webpack_exports__["a"] = root; - - -/***/ }), -/* 37 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -/* harmony default export */ __webpack_exports__["a"] = isObjectLike; - - -/***/ }), -/* 38 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(21); -/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - - -/** - * Creates a store enhancer that applies middleware to the dispatch method - * of the Redux store. This is handy for a variety of tasks, such as expressing - * asynchronous actions in a concise manner, or logging every action payload. - * - * See `redux-thunk` package as an example of the Redux middleware. - * - * Because middleware is potentially asynchronous, this should be the first - * store enhancer in the composition chain. - * - * Note that each middleware will be given the `dispatch` and `getState` functions - * as named arguments. - * - * @param {...Function} middlewares The middleware chain to be applied. - * @returns {Function} A store enhancer applying the middleware. - */ -function applyMiddleware() { - for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { - middlewares[_key] = arguments[_key]; - } - - return function (createStore) { - return function (reducer, preloadedState, enhancer) { - var store = createStore(reducer, preloadedState, enhancer); - var _dispatch = store.dispatch; - var chain = []; - - var middlewareAPI = { - getState: store.getState, - dispatch: function dispatch(action) { - return _dispatch(action); - } - }; - chain = middlewares.map(function (middleware) { - return middleware(middlewareAPI); - }); - _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); - - return _extends({}, store, { - dispatch: _dispatch - }); - }; - }; -} - -/***/ }), -/* 39 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; -function bindActionCreator(actionCreator, dispatch) { - return function () { - return dispatch(actionCreator.apply(undefined, arguments)); - }; -} - -/** - * Turns an object whose values are action creators, into an object with the - * same keys, but with every function wrapped into a `dispatch` call so they - * may be invoked directly. This is just a convenience method, as you can call - * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. - * - * For convenience, you can also pass a single function as the first argument, - * and get a function in return. - * - * @param {Function|Object} actionCreators An object whose values are action - * creator functions. One handy way to obtain it is to use ES6 `import * as` - * syntax. You may also pass a single function. - * - * @param {Function} dispatch The `dispatch` function available on your Redux - * store. - * - * @returns {Function|Object} The object mimicking the original object, but with - * every action creator wrapped into the `dispatch` call. If you passed a - * function as `actionCreators`, the return value will also be a single - * function. - */ -function bindActionCreators(actionCreators, dispatch) { - if (typeof actionCreators === 'function') { - return bindActionCreator(actionCreators, dispatch); - } - - if (typeof actionCreators !== 'object' || actionCreators === null) { - throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); - } - - var keys = Object.keys(actionCreators); - var boundActionCreators = {}; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var actionCreator = actionCreators[key]; - if (typeof actionCreator === 'function') { - boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); - } - } - return boundActionCreators; -} - -/***/ }), -/* 40 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(22); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(23); -/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; - - - - -function getUndefinedStateErrorMessage(key, action) { - var actionType = action && action.type; - var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; - - return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.'; -} - -function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { - var reducerKeys = Object.keys(reducers); - var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; - - if (reducerKeys.length === 0) { - return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; - } - - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) { - return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); - } - - var unexpectedKeys = Object.keys(inputState).filter(function (key) { - return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; - }); - - unexpectedKeys.forEach(function (key) { - unexpectedKeyCache[key] = true; - }); - - if (unexpectedKeys.length > 0) { - return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); - } -} - -function assertReducerShape(reducers) { - Object.keys(reducers).forEach(function (key) { - var reducer = reducers[key]; - var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT }); - - if (typeof initialState === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.'); - } - - var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); - if (typeof reducer(undefined, { type: type }) === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.'); - } - }); -} - -/** - * Turns an object whose values are different reducer functions, into a single - * reducer function. It will call every child reducer, and gather their results - * into a single state object, whose keys correspond to the keys of the passed - * reducer functions. - * - * @param {Object} reducers An object whose values correspond to different - * reducer functions that need to be combined into one. One handy way to obtain - * it is to use ES6 `import * as reducers` syntax. The reducers may never return - * undefined for any action. Instead, they should return their initial state - * if the state passed to them was undefined, and the current state for any - * unrecognized action. - * - * @returns {Function} A reducer function that invokes every reducer inside the - * passed object, and builds a state object with the same shape. - */ -function combineReducers(reducers) { - var reducerKeys = Object.keys(reducers); - var finalReducers = {}; - for (var i = 0; i < reducerKeys.length; i++) { - var key = reducerKeys[i]; - - if (process.env.NODE_ENV !== 'production') { - if (typeof reducers[key] === 'undefined') { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])('No reducer provided for key "' + key + '"'); - } - } - - if (typeof reducers[key] === 'function') { - finalReducers[key] = reducers[key]; - } - } - var finalReducerKeys = Object.keys(finalReducers); - - var unexpectedKeyCache = void 0; - if (process.env.NODE_ENV !== 'production') { - unexpectedKeyCache = {}; - } - - var shapeAssertionError = void 0; - try { - assertReducerShape(finalReducers); - } catch (e) { - shapeAssertionError = e; - } - - return function combination() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var action = arguments[1]; - - if (shapeAssertionError) { - throw shapeAssertionError; - } - - if (process.env.NODE_ENV !== 'production') { - var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); - if (warningMessage) { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])(warningMessage); - } - } - - var hasChanged = false; - var nextState = {}; - for (var _i = 0; _i < finalReducerKeys.length; _i++) { - var _key = finalReducerKeys[_i]; - var reducer = finalReducers[_key]; - var previousStateForKey = state[_key]; - var nextStateForKey = reducer(previousStateForKey, action); - if (typeof nextStateForKey === 'undefined') { - var errorMessage = getUndefinedStateErrorMessage(_key, action); - throw new Error(errorMessage); - } - nextState[_key] = nextStateForKey; - hasChanged = hasChanged || nextStateForKey !== previousStateForKey; - } - return hasChanged ? nextState : state; - }; -} -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(20))) - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(42); - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global, module) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _ponyfill = __webpack_require__(43); - -var _ponyfill2 = _interopRequireDefault(_ponyfill); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var root; /* global window */ - - -if (typeof self !== 'undefined') { - root = self; -} else if (typeof window !== 'undefined') { - root = window; -} else if (typeof global !== 'undefined') { - root = global; -} else if (true) { - root = module; -} else { - root = Function('return this')(); -} - -var result = (0, _ponyfill2['default'])(root); -exports['default'] = result; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24), __webpack_require__(44)(module))) - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports['default'] = symbolObservablePonyfill; -function symbolObservablePonyfill(root) { - var result; - var _Symbol = root.Symbol; - - if (typeof _Symbol === 'function') { - if (_Symbol.observable) { - result = _Symbol.observable; - } else { - result = _Symbol('observable'); - _Symbol.observable = result; - } - } else { - result = '@@observable'; - } - - return result; -}; - -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 45 */, -/* 46 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by glenn on 6/13/2017. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -function stringToDate(dateStr) { - var parts = dateStr.split('/'); - var mn = parseInt(parts[0]) - 1; - var d = parseInt(parts[1]); - var y = parseInt(parts[2]); - var dte = new Date(y, mn, d); - dte.setHours(0, 0, 0); - return dte; -} -exports.stringToDate = stringToDate; -function dateToString(dte, zeroPad) { - if (zeroPad === void 0) { zeroPad = true; } - var mn = (dte.getMonth() + 1).toString(); - var d = dte.getDate().toString(); - if (zeroPad) { - mn = mn.length == 1 ? '0' + mn : mn; - d = d.length == 1 ? '0' + d : d; - } - return mn + "/" + d + "/" + dte.getFullYear(); -} -exports.dateToString = dateToString; - - -/***/ }), -/* 47 */, -/* 48 */, -/* 49 */, -/* 50 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var reactAndRedux_1 = __webpack_require__(15); -var DatePick_1 = __webpack_require__(25); -var DateRange_1 = __webpack_require__(29); -var actions = __webpack_require__(16); -exports.DatePickConnected = reactAndRedux_1.connect(function (state) { - return { - label: 'Date Picker Connected', - change: function (v) { - console.log(v); - }, - val: state.oneDate - }; -}, function (dispatch) { - return { - change: function (v) { - dispatch({ type: actions.SET_ONE_DATE, d: v }); - } - }; -})(DatePick_1.DatePick); -exports.DateRangeConnected = reactAndRedux_1.connect(function (state) { - return { - maxRange: 10, - start: state.twoDates.start, - end: state.twoDates.end, - initialEnd: state.twoDates.end, - npmrds: true - }; -}, function (dispatch) { - return { - callback: function (s, e, version) { - dispatch({ type: actions.SET_TWO_DATES, start: s, end: e, version: version }); - } - }; -})(DateRange_1.DateRange); - - -/***/ }), -/* 51 */, -/* 52 */, -/* 53 */ -/***/ (function(module, exports) { - -module.exports = React; - -/***/ }), -/* 54 */ -/***/ (function(module, exports) { - -module.exports = ReactDOM; - -/***/ }), -/* 55 */ -/***/ (function(module, exports) { - -module.exports = ReactRedux; - -/***/ }) -/******/ ]); +!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=49)}([function(t,e,n){"use strict";function r(t){void 0===window.gv&&(window.gv={});for(var e=t.split("."),n=window.gv,r=0;r<e.length;r++){void 0===n[e[r]]&&(n[e[r]]={}),n=n[e[r]]}return n}Object.defineProperty(e,"__esModule",{value:!0}),r("util"),window.gv.util.provide=r,e.default=r},function(t,e){t.exports=$},,function(t,e,n){"use strict";function r(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})}Object.defineProperty(e,"__esModule",{value:!0});var i=n(0),o=i.default("util");e.makeGuid=r,o.makeGuid=r,e.default=r},,,,,,,,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.React=n(52),e.ReactDom=n(53),e.ReactRedux=n(54),e.Redux=n(26),e.connect=e.ReactRedux.connect,e.Provider=e.ReactRedux.Provider,e.combineReducers=e.Redux.combineReducers,e.createStore=e.Redux.createStore},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SET_ONE_DATE="set one date",e.SET_TWO_DATES="set two dates"},,function(t,e,n){"use strict";var r=n(35),i=r.a.Symbol;e.a=i},function(t,e,n){"use strict";function r(t){if(!n.i(a.a)(t)||n.i(i.a)(t)!=u)return!1;var e=n.i(o.a)(t);if(null===e)return!0;var r=f.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&d.call(r)==l}var i=n(29),o=n(31),a=n(36),u="[object Object]",s=Function.prototype,c=Object.prototype,d=s.toString,f=c.hasOwnProperty,l=d.call(Object);e.a=r},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}e.a=r},function(t,e,n){"use strict";function r(t,e,o){function s(){g===b&&(g=b.slice())}function c(){return y}function d(t){if("function"!=typeof t)throw new Error("Expected listener to be a function.");var e=!0;return s(),g.push(t),function(){if(e){e=!1,s();var n=g.indexOf(t);g.splice(n,1)}}}function f(t){if(!n.i(i.a)(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(m)throw new Error("Reducers may not dispatch actions.");try{m=!0,y=v(y,t)}finally{m=!1}for(var e=b=g,r=0;r<e.length;r++){(0,e[r])()}return t}function l(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");v=t,f({type:u.INIT})}function p(){var t,e=d;return t={subscribe:function(t){function n(){t.next&&t.next(c())}if("object"!=typeof t)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:e(n)}}},t[a.a]=function(){return this},t}var h;if("function"==typeof e&&void 0===o&&(o=e,e=void 0),void 0!==o){if("function"!=typeof o)throw new Error("Expected the enhancer to be a function.");return o(r)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var v=t,y=e,b=[],g=b,m=!1;return f({type:u.INIT}),h={dispatch:f,subscribe:d,getState:c,replaceReducer:l},h[a.a]=p,h}var i=n(19),o=n(40),a=n.n(o);n.d(e,"b",function(){return u}),e.a=r;var u={INIT:"@@redux/INIT"}},function(t,e,n){"use strict"},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}return t};Object.defineProperty(e,"__esModule",{value:!0});var o=n(15),a=n(1);n(1);var u=n(3),s=n(45),c=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.elId=r.props.id||u.default(),r}return r(e,t),e.prototype.componentDidMount=function(){var t=this,e=a("#"+this.elId);e.datepicker({onSelect:function(){t.props.change(s.stringToDate(e.val()))}})},e.prototype.render=function(){var t={id:this.elId,type:"text",style:{margin:"0 10px 0 5px",width:"73px",textAlign:"center"},readOnly:!0};return this.props.val?t.value=s.dateToString(this.props.val):t.defaultValue=s.dateToString(this.props.initialDate||new Date),o.React.createElement("span",{className:"date-pick"},o.React.createElement("label",{htmlFor:this.elId},this.props.label),o.React.createElement("input",i({},t)))},e}(o.React.Component);e.DatePick=c,e.default=c},,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(21),i=n(39),o=n(38),a=n(37),u=n(20);n(22);n.d(e,"createStore",function(){return r.a}),n.d(e,"combineReducers",function(){return i.a}),n.d(e,"bindActionCreators",function(){return o.a}),n.d(e,"applyMiddleware",function(){return a.a}),n.d(e,"compose",function(){return u.a})},,function(t,e,n){"use strict";function r(t){return t.getTime?t:new Date(t)}var i=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0});var o=n(15);n(1);var a=n(3),u=n(45),s=n(24),c=function(t){function e(e,n){var i=t.call(this,e,n)||this;if(i.startId=a.default(),i.endId=a.default(),i.versionTwoStart=new Date(2017,1,1),i.maxRange=Math.round(i.props.maxRange)-1,i.minRange="number"==typeof i.props.minRange?Math.round(i.props.minRange):1,i.minRange>i.maxRange)throw"DateRange component: Max range must be greater than min range";return i.props.initialEnd?i.end=r(i.props.initialEnd):i.end=new Date,i.end.setHours(0,0,0),i.start=new Date(i.end),i.start.setDate(i.start.getDate()-i.maxRange),i.setNumDays(),i}return i(e,t),e.prototype.setNumDays=function(){this.numDays=Math.round((this.end.getTime()-this.start.getTime())/864e5)+1},e.prototype.componentDidMount=function(){this.startInput=document.getElementById(this.startId),this.endInput=document.getElementById(this.endId),this.props.callback(this.start,this.end,this.version)},Object.defineProperty(e.prototype,"needReset",{get:function(){return this.numDays>this.maxRange||this.numDays<this.minRange},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"versionSpan",{get:function(){return this.start<this.versionTwoStart&&this.end>=this.versionTwoStart||u.dateToString(this.versionTwoStart)===u.dateToString(this.end)&&this.start<this.versionTwoStart},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return u.dateToString(this.start)==u.dateToString(this.versionTwoStart)?2:this.start>=this.versionTwoStart?2:1},enumerable:!0,configurable:!0}),e.prototype.finalizeChange=function(){if(this.props.npmrds&&this.versionSpan)return this.start=this.previousStart,this.end=this.previousEnd,this.startInput.value=u.dateToString(this.start),this.endInput.value=u.dateToString(this.end),this.setNumDays(),void alert("Start and End dates must not span version break: "+u.dateToString(this.versionTwoStart));this.props.callback(this.start,this.end,this.version)},e.prototype.setStart=function(t){this.previousStart=new Date(this.start),this.previousEnd=new Date(this.end),this.start=t,this.setNumDays(),this.needReset&&(this.end=new Date(this.start),this.numDays>this.maxRange?this.end.setDate(this.end.getDate()+this.maxRange):this.end.setDate(this.end.getDate()+this.minRange-1),this.endInput.value=u.dateToString(this.end),this.setNumDays()),this.finalizeChange()},e.prototype.setEnd=function(t){this.previousStart=new Date(this.start),this.previousEnd=new Date(this.end),this.end=t,this.setNumDays(),this.needReset&&(this.start=new Date(this.end),this.numDays>this.maxRange?this.start.setDate(this.start.getDate()-this.maxRange):this.start.setDate(this.start.getDate()-this.minRange+1),this.startInput.value=u.dateToString(this.start),this.setNumDays()),this.finalizeChange()},e.prototype.render=function(){var t=this;return o.React.createElement("div",{className:"date-range"},o.React.createElement(s.default,{id:this.startId,label:"Start",initialDate:this.start,change:function(e){t.setStart(e)}}),o.React.createElement(s.default,{id:this.endId,label:"End",initialDate:this.end,change:function(e){t.setEnd(e)}}))},e}(o.React.Component);e.DateRange=c},function(t,e,n){"use strict";function r(t){return null==t?void 0===t?s:u:c&&c in Object(t)?n.i(o.a)(t):n.i(a.a)(t)}var i=n(18),o=n(32),a=n(33),u="[object Null]",s="[object Undefined]",c=i.a?i.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(e,n(23))},function(t,e,n){"use strict";var r=n(34),i=n.i(r.a)(Object.getPrototypeOf,Object);e.a=i},function(t,e,n){"use strict";function r(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(e?t[s]=n:delete t[s]),i}var i=n(18),o=Object.prototype,a=o.hasOwnProperty,u=o.toString,s=i.a?i.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";function r(t){return o.call(t)}var i=Object.prototype,o=i.toString;e.a=r},function(t,e,n){"use strict";function r(t,e){return function(n){return t(e(n))}}e.a=r},function(t,e,n){"use strict";var r=n(30),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();e.a=o},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}e.a=r},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(n,r,a){var u=t(n,r,a),s=u.dispatch,c=[],d={getState:u.getState,dispatch:function(t){return s(t)}};return c=e.map(function(t){return t(d)}),s=i.a.apply(void 0,c)(u.dispatch),o({},u,{dispatch:s})}}}var i=n(20);e.a=r;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){"use strict";function r(t,e){return function(){return e(t.apply(void 0,arguments))}}function i(t,e){if("function"==typeof t)return r(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),i={},o=0;o<n.length;o++){var a=n[o],u=t[a];"function"==typeof u&&(i[a]=r(u,e))}return i}e.a=i},function(t,e,n){"use strict";function r(t,e){var n=e&&e.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function i(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:a.b.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+a.b.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function o(t){for(var e=Object.keys(t),n={},o=0;o<e.length;o++){var a=e[o];"function"==typeof t[a]&&(n[a]=t[a])}var u=Object.keys(n),s=void 0;try{i(n)}catch(t){s=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(s)throw s;for(var i=!1,o={},a=0;a<u.length;a++){var c=u[a],d=n[c],f=t[c],l=d(f,e);if(void 0===l){var p=r(c,e);throw new Error(p)}o[c]=l,i=i||l!==f}return i?o:t}}var a=n(21);n(19),n(22);e.a=o},function(t,e,n){t.exports=n(41)},function(t,e,n){"use strict";(function(t,r){function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o,a=n(42),u=i(a);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:r;var s=(0,u.default)(o);e.default=s}).call(e,n(23),n(43)(t))},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},,function(t,e,n){"use strict";function r(t){var e=t.split("/"),n=parseInt(e[0])-1,r=parseInt(e[1]),i=parseInt(e[2]),o=new Date(i,n,r);return o.setHours(0,0,0),o}function i(t,e){void 0===e&&(e=!0);var n=(t.getMonth()+1).toString(),r=t.getDate().toString();return e&&(n=1==n.length?"0"+n:n,r=1==r.length?"0"+r:r),n+"/"+r+"/"+t.getFullYear()}Object.defineProperty(e,"__esModule",{value:!0}),e.stringToDate=r,e.dateToString=i},,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),i=n(24),o=n(28),a=n(16);e.DatePickConnected=r.connect(function(t){return{label:"Date Picker Connected",change:function(t){console.log(t)},val:t.oneDate}},function(t){return{change:function(e){t({type:a.SET_ONE_DATE,d:e})}}})(i.DatePick),e.DateRangeConnected=r.connect(function(t){return{maxRange:10,start:t.twoDates.start,end:t.twoDates.end,initialEnd:t.twoDates.end,npmrds:!0}},function(t){return{callback:function(e,n,r){t({type:a.SET_TWO_DATES,start:e,end:n,version:r})}}})(o.DateRange)},,,function(t,e){t.exports=React},function(t,e){t.exports=ReactDOM},function(t,e){t.exports=ReactRedux}]); //# sourceMappingURL=reacttst_connect.js.map \ No newline at end of file diff --git a/test/serve/js/reacttst_connect.js.map b/test/serve/js/reacttst_connect.js.map index 48e5cecfc25d96eb721fe5062819368ebc5230de..74d5b0cb1302205a36d3d8267360f8e54e407c15 100644 --- a/test/serve/js/reacttst_connect.js.map +++ b/test/serve/js/reacttst_connect.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc*","webpack:///./src/util/provide.ts?5c82*","webpack:///external \"$\"?57aa*","webpack:///./src/util/makeGuid.ts?e80e","webpack:///./src/reactComponents/reactAndRedux.ts?5359","webpack:///./src/_tests/demos/reacttst_actions.ts?2a10","webpack:///./~/lodash-es/_Symbol.js?eec2","webpack:///./~/lodash-es/isPlainObject.js?3f96","webpack:///./~/process/browser.js?b777","webpack:///./~/redux/es/compose.js?c271","webpack:///./~/redux/es/createStore.js?732e","webpack:///./~/redux/es/utils/warning.js?a530","webpack:///(webpack)/buildin/global.js?9e04","webpack:///./src/reactComponents/DatePick.tsx?4f14","webpack:///./~/redux/es/index.js?10ac","webpack:///./src/reactComponents/DateRange.tsx?3742","webpack:///./~/lodash-es/_baseGetTag.js?7715","webpack:///./~/lodash-es/_freeGlobal.js?f5ff","webpack:///./~/lodash-es/_getPrototype.js?51c7","webpack:///./~/lodash-es/_getRawTag.js?dc49","webpack:///./~/lodash-es/_objectToString.js?b181","webpack:///./~/lodash-es/_overArg.js?d6db","webpack:///./~/lodash-es/_root.js?490e","webpack:///./~/lodash-es/isObjectLike.js?bb06","webpack:///./~/redux/es/applyMiddleware.js?83f5","webpack:///./~/redux/es/bindActionCreators.js?f699","webpack:///./~/redux/es/combineReducers.js?5dc8","webpack:///./~/symbol-observable/index.js?8c2f","webpack:///./~/symbol-observable/lib/index.js?5723","webpack:///./~/symbol-observable/lib/ponyfill.js?f7ae","webpack:///(webpack)/buildin/module.js?5171","webpack:///./src/reactComponents/helpers/dateFormat.ts?15b3","webpack:///./src/_tests/demos/reacttst_connect.ts?a84f","webpack:///external \"React\"?9de9","webpack:///external \"ReactDOM\"?4ab4","webpack:///external \"ReactRedux\"?b564"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;A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S;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;ACnLtC;AAAA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA,kEAAkE,aAAa;AAC/E;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;;;;;;AC/BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,yBAAyB;AACvC;;AAEA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,YAAY,yBAAyB;;AAErC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;ACvPA;AAAA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa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ACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACdA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC5BA;AAAA,mDAAmD,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe;;AAE9P;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa,SAAS;AACtB;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,wBAAwB;AACxB;AACA,OAAO;AACP;AACA;AACA,C;;;;;;;AC/CA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;AC9CsB;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,+EAAyB;;AAEpE;AACA;AACA;;AAEA;AACA,mCAAmC,aAAa;AAChD;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;ACjIA;;;;;;;;sDCAA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA,sCAAsC,uCAAuC,kBAAkB;;AAE/F,SAAS;;;AAGT;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA;;AAEA;AACA,4B;;;;;;;;AC5BA;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA,E;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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xD,0CAA0D;AAC1D,sCAA8C;AAGjC,yBAAiB,GAAG,uBAAO,CACpC,UAAC,KAAa;IACV,MAAM,CAAC;QACH,KAAK,EAAE,uBAAuB;QAC9B,MAAM,EAAE,UAAC,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC;QACD,GAAG,EAAE,KAAK,CAAC,OAAO;KACrB;AACL,CAAC,EACD,UAAC,QAAQ;IACL,MAAM,CAAC;QACH,MAAM,EAAE,UAAC,CAAC;YACN,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,CAAC,YAAY,EAAE,CAAC,EAAE,CAAC,EAAC,CAAC,CAAC;QACjD,CAAC;KACJ;AACL,CAAC,CACJ,CAAC,mBAAQ,CAAC,CAAC;AAGC,0BAAkB,GAAG,uBAAO,CACrC,UAAC,KAAa;IACV,MAAM,CAAC;QACH,QAAQ,EAAE,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK;QAC3B,GAAG,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG;QACvB,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG;QAC9B,MAAM,EAAE,IAAI;KACf;AACL,CAAC,EACD,UAAC,QAAQ;IACL,MAAM,CAAC;QACH,QAAQ,EAAE,UAAC,CAAO,EAAE,CAAO,EAAE,OAAe;YACxC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAC,CAAC,CAAC;QAChF,CAAC;KACJ;AACL,CAAC,CACJ,CAAC,qBAAS,CAAC,CAAC;;;;;;;;;AC5Cb,uB;;;;;;ACAA,0B;;;;;;ACAA,4B","file":"reacttst_connect.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 50);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\nexport import React = require('react');\r\nexport import ReactDom = require('react-dom');\r\nexport import ReactRedux = require('react-redux');\r\nexport import Redux = require('redux');\r\n\r\nexport const connect = ReactRedux.connect;\r\nexport const Provider = ReactRedux.Provider;\r\nexport const combineReducers = Redux.combineReducers;\r\nexport const createStore = Redux.createStore;\r\n\r\nexport interface iAction extends Redux.Action{\r\n}\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/reactAndRedux.ts","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_Symbol.js\n// module id = 18\n// module chunks = 0 1 3","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isPlainObject.js\n// module id = 19\n// module chunks = 0 1 3","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 20\n// module chunks = 0 1 3","/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport default function compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/compose.js\n// module id = 21\n// module chunks = 0 1 3","import isPlainObject from 'lodash-es/isPlainObject';\nimport $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nexport var ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};export default function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/createStore.js\n// module id = 22\n// module chunks = 0 1 3","/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/utils/warning.js\n// module id = 23\n// module chunks = 0 1 3","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 24\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\n\r\nimport {dateToString, stringToDate} from './helpers/dateFormat';\r\n\r\nexport interface iDatePick{\r\n label: string;\r\n id?: string;\r\n initialDate?: Date;\r\n change: (val: Date) => any;\r\n val?: Date\r\n}\r\n\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nexport class DatePick extends React.Component<iDatePick, null> {\r\n private elId: string;\r\n\r\n constructor(props: iDatePick, context: Object){\r\n super(props, context);\r\n this.elId = this.props.id || makeGuid();\r\n }\r\n\r\n componentDidMount() {\r\n let $el = $('#' + this.elId);\r\n\r\n $el.datepicker(\r\n {\r\n onSelect: () => {\r\n this.props.change(stringToDate($el.val()));\r\n }\r\n }\r\n );\r\n }\r\n\r\n render() {\r\n let params = {\r\n id: this.elId,\r\n type: 'text',\r\n style: {margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'},\r\n readOnly: true\r\n };\r\n\r\n if (this.props.val){\r\n params['value'] = dateToString(this.props.val);\r\n } else {\r\n params['defaultValue'] = dateToString(this.props.initialDate || new Date());\r\n }\r\n\r\n\r\n return <span className=\"date-pick\">\r\n <label htmlFor={this.elId}>{this.props.label}</label>\r\n {/*<input id={this.elId} type=\"text\"*/}\r\n {/*style={{margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'}}*/}\r\n {/*defaultValue={dateToString(this.props.initialDate || new Date())}*/}\r\n {/*readOnly={true}*/}\r\n {/*/>*/}\r\n <input {...params}/>\r\n </span>\r\n }\r\n}\r\n\r\nexport default DatePick;\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DatePick.tsx","import createStore from './createStore';\nimport combineReducers from './combineReducers';\nimport bindActionCreators from './bindActionCreators';\nimport applyMiddleware from './applyMiddleware';\nimport compose from './compose';\nimport warning from './utils/warning';\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== 'production', warn the user.\n*/\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \\'production\\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/index.js\n// module id = 27\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\nimport * as fixDate from './helpers/dateFormat';\r\nimport DatePick from './DatePick';\r\n\r\nfunction stringToDate(dte: string|Date){\r\n if ((dte as Date).getTime){\r\n return dte as Date;\r\n } else {\r\n return new Date(dte);\r\n }\r\n}\r\n\r\nexport interface iDateRange{\r\n maxRange: number;\r\n callback: (start: Date, end: Date, version?: number) => any;\r\n minRange?: number;\r\n maxDate?: Date;\r\n minDate?: Date;\r\n initialEnd?: Date;\r\n start?: Date;\r\n end?: Date;\r\n npmrds?: boolean;\r\n}\r\n\r\n\r\nexport class DateRange extends React.Component<iDateRange, null> {\r\n startId = makeGuid();\r\n endId = makeGuid();\r\n startInput: HTMLInputElement;\r\n endInput: HTMLInputElement;\r\n start: Date;\r\n end: Date;\r\n maxRange: number;\r\n minRange: number;\r\n numDays: number;\r\n versionTwoStart: Date;\r\n previousStart: Date;\r\n previousEnd: Date;\r\n\r\n constructor(props: iDateRange, context: Object) {\r\n super(props, context);\r\n\r\n this.versionTwoStart = new Date(2017, 1, 1);\r\n\r\n this.maxRange = Math.round(this.props.maxRange) - 1;\r\n this.minRange = typeof this.props['minRange'] == 'number' ? Math.round(this.props['minRange']) : 1;\r\n\r\n if (this.minRange > this.maxRange) {\r\n throw \"DateRange component: Max range must be greater than min range\";\r\n }\r\n\r\n if (this.props.initialEnd){\r\n this.end = stringToDate(this.props.initialEnd)\r\n } else {\r\n this.end = new Date();\r\n }\r\n\r\n this.end.setHours(0, 0, 0);\r\n this.start = new Date(this.end);\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n this.setNumDays();\r\n }\r\n\r\n setNumDays() {\r\n this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1;\r\n }\r\n\r\n\r\n componentDidMount() {\r\n this.startInput = document.getElementById(this.startId) as HTMLInputElement;\r\n this.endInput = document.getElementById(this.endId) as HTMLInputElement;\r\n\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private get needReset(): boolean {\r\n return this.numDays > this.maxRange || this.numDays < this.minRange;\r\n }\r\n\r\n private get versionSpan(): boolean{\r\n\r\n if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart){\r\n return true;\r\n } else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart){\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private get version(): number{\r\n\r\n if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)){\r\n return 2;\r\n } else if (this.start >= this.versionTwoStart){\r\n return 2;\r\n }\r\n return 1;\r\n }\r\n\r\n private finalizeChange(){\r\n\r\n if (this.props.npmrds){\r\n if (this.versionSpan){\r\n this.start = this.previousStart;\r\n this.end = this.previousEnd;\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n alert(\"Start and End dates must not span version break: \" + fixDate.dateToString(this.versionTwoStart));\r\n return;\r\n }\r\n }\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private setStart(s: Date) {\r\n\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.start = s;\r\n\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.end = new Date(this.start);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.end.setDate(this.end.getDate() + this.maxRange);\r\n } else {\r\n this.end.setDate(this.end.getDate() + this.minRange - 1);\r\n }\r\n\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n private setEnd(s: Date) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.end = s;\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.start = new Date(this.end);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n } else {\r\n this.start.setDate(this.start.getDate() - this.minRange + 1);\r\n }\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n render() {\r\n return <div className=\"date-range\">\r\n <DatePick id={this.startId} label=\"Start\" initialDate={this.start} change={(s) => {this.setStart(s)}}/>\r\n <DatePick id={this.endId} label=\"End\" initialDate={this.end} change={(s) => {this.setEnd(s)}}/>\r\n </div>;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DateRange.tsx","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_baseGetTag.js\n// module id = 30\n// module chunks = 0 1 3","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_freeGlobal.js\n// module id = 31\n// module chunks = 0 1 3","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getPrototype.js\n// module id = 32\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getRawTag.js\n// module id = 33\n// module chunks = 0 1 3","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_objectToString.js\n// module id = 34\n// module chunks = 0 1 3","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_overArg.js\n// module id = 35\n// module chunks = 0 1 3","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_root.js\n// module id = 36\n// module chunks = 0 1 3","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isObjectLike.js\n// module id = 37\n// module chunks = 0 1 3","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport compose from './compose';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nexport default function applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/applyMiddleware.js\n// module id = 38\n// module chunks = 0 1 3","function bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/bindActionCreators.js\n// module id = 39\n// module chunks = 0 1 3","import { ActionTypes } from './createStore';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './utils/warning';\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nexport default function combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/combineReducers.js\n// module id = 40\n// module chunks = 0 1 3","module.exports = require('./lib/index');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/index.js\n// module id = 41\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = require('./ponyfill');\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/index.js\n// module id = 42\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/ponyfill.js\n// module id = 43\n// module chunks = 0 1 3","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 44\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/13/2017.\r\n */\r\n\r\nexport function stringToDate(dateStr: string): Date {\r\n let parts = dateStr.split('/');\r\n\r\n let mn = parseInt(parts[0]) - 1;\r\n let d = parseInt(parts[1]);\r\n let y = parseInt(parts[2]);\r\n\r\n let dte = new Date(y, mn, d);\r\n dte.setHours(0, 0, 0);\r\n\r\n return dte;\r\n}\r\n\r\nexport function dateToString(dte: Date, zeroPad:boolean = true): string {\r\n let mn = (dte.getMonth() + 1).toString();\r\n let d = dte.getDate().toString();\r\n\r\n if (zeroPad){\r\n mn = mn.length == 1 ? '0' + mn : mn;\r\n d = d.length == 1 ? '0' + d : d ;\r\n }\r\n\r\n return `${mn}/${d}/${dte.getFullYear()}`;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/helpers/dateFormat.ts","import {connect} from '../../reactComponents/reactAndRedux';\r\nimport {iState} from './reacttst_store';\r\nimport {DatePick} from '../../reactComponents/DatePick';\r\nimport {DateRange} from '../../reactComponents/DateRange';\r\nimport * as actions from './reacttst_actions';\r\n\r\n\r\nexport const DatePickConnected = connect(\r\n (state: iState) => {\r\n return {\r\n label: 'Date Picker Connected',\r\n change: (v) => {\r\n console.log(v);\r\n },\r\n val: state.oneDate\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n change: (v) => {\r\n dispatch({type: actions.SET_ONE_DATE, d: v});\r\n }\r\n }\r\n }\r\n)(DatePick);\r\n\r\n\r\nexport const DateRangeConnected = connect(\r\n (state: iState) => {\r\n return {\r\n maxRange: 10,\r\n start: state.twoDates.start,\r\n end: state.twoDates.end,\r\n initialEnd: state.twoDates.end,\r\n npmrds: true\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n callback: (s: Date, e: Date, version: number) => {\r\n dispatch({type: actions.SET_TWO_DATES, start: s, end: e, version: version});\r\n }\r\n }\r\n }\r\n)(DateRange);\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_connect.ts","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 53\n// module chunks = 0 1","module.exports = ReactDOM;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactDOM\"\n// module id = 54\n// module chunks = 0 1","module.exports = ReactRedux;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactRedux\"\n// module id = 55\n// module chunks = 0 1"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///reacttst_connect.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d*","webpack:///./src/util/provide.ts?5c82*","webpack:///external \"$\"?57aa*","webpack:///./src/util/makeGuid.ts?e80e","webpack:///./src/reactComponents/reactAndRedux.ts?5359","webpack:///./src/_tests/demos/reacttst_actions.ts?2a10","webpack:///./~/lodash-es/_Symbol.js?eec2","webpack:///./~/lodash-es/isPlainObject.js?3f96","webpack:///./~/redux/es/compose.js?c271","webpack:///./~/redux/es/createStore.js?732e","webpack:///(webpack)/buildin/global.js?9e04","webpack:///./src/reactComponents/DatePick.tsx?4f14","webpack:///./src/reactComponents/DateRange.tsx?3742","webpack:///./~/lodash-es/_baseGetTag.js?7715","webpack:///./~/lodash-es/_freeGlobal.js?f5ff","webpack:///./~/lodash-es/_getPrototype.js?51c7","webpack:///./~/lodash-es/_getRawTag.js?dc49","webpack:///./~/lodash-es/_objectToString.js?b181","webpack:///./~/lodash-es/_overArg.js?d6db","webpack:///./~/lodash-es/_root.js?490e","webpack:///./~/lodash-es/isObjectLike.js?bb06","webpack:///./~/redux/es/applyMiddleware.js?83f5","webpack:///./~/redux/es/bindActionCreators.js?f699","webpack:///./~/redux/es/combineReducers.js?5dc8","webpack:///./~/symbol-observable/index.js?8c2f","webpack:///./~/symbol-observable/lib/index.js?5723","webpack:///./~/symbol-observable/lib/ponyfill.js?f7ae","webpack:///(webpack)/buildin/module.js?5171","webpack:///./src/reactComponents/helpers/dateFormat.ts?15b3","webpack:///./src/_tests/demos/reacttst_connect.ts?a84f","webpack:///external \"React\"?9de9","webpack:///external \"ReactDOM\"?4ab4","webpack:///external \"ReactRedux\"?b564"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","$","makeGuid","replace","r","Math","random","toString","provide_1","nm","React","ReactDom","ReactRedux","Redux","connect","Provider","combineReducers","createStore","SET_ONE_DATE","SET_TWO_DATES","__webpack_exports__","__WEBPACK_IMPORTED_MODULE_0__root_js__","Symbol","isPlainObject","__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__","__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__","objectTag","proto","__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__","Ctor","constructor","funcToString","objectCtorString","funcProto","Function","objectProto","compose","_len","arguments","funcs","Array","_key","arg","reduce","a","b","apply","undefined","reducer","preloadedState","enhancer","ensureCanMutateNextListeners","nextListeners","currentListeners","slice","getState","currentState","subscribe","listener","Error","isSubscribed","push","index","indexOf","splice","dispatch","action","__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__","type","isDispatching","currentReducer","listeners","replaceReducer","nextReducer","ActionTypes","INIT","observable","_ref","outerSubscribe","observer","observeState","next","TypeError","unsubscribe","__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default","this","_ref2","__WEBPACK_IMPORTED_MODULE_1_symbol_observable__","g","eval","e","__extends","extendStatics","setPrototypeOf","__proto__","__","create","__assign","assign","t","reactAndRedux_1","makeGuid_1","dateFormat_1","DatePick","_super","props","context","_this","elId","id","componentDidMount","$el","datepicker","onSelect","change","stringToDate","val","render","params","style","margin","width","textAlign","readOnly","dateToString","initialDate","Date","createElement","className","htmlFor","label","Component","__WEBPACK_IMPORTED_MODULE_0__createStore__","__WEBPACK_IMPORTED_MODULE_1__combineReducers__","__WEBPACK_IMPORTED_MODULE_2__bindActionCreators__","__WEBPACK_IMPORTED_MODULE_3__applyMiddleware__","__WEBPACK_IMPORTED_MODULE_4__compose__","dte","getTime","fixDate","DatePick_1","DateRange","startId","endId","versionTwoStart","maxRange","round","minRange","initialEnd","end","setHours","start","setDate","getDate","setNumDays","numDays","startInput","document","getElementById","endInput","callback","version","finalizeChange","npmrds","versionSpan","previousStart","previousEnd","alert","setStart","needReset","setEnd","baseGetTag","undefinedTag","nullTag","symToStringTag","__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__","__WEBPACK_IMPORTED_MODULE_2__objectToString_js__","__WEBPACK_IMPORTED_MODULE_0__Symbol_js__","toStringTag","global","freeGlobal","__WEBPACK_IMPORTED_MODULE_0__overArg_js__","getPrototype","getPrototypeOf","getRawTag","isOwn","tag","unmasked","result","nativeObjectToString","objectToString","overArg","func","transform","__WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__","freeSelf","self","root","isObjectLike","applyMiddleware","middlewares","store","_dispatch","chain","middlewareAPI","map","middleware","__WEBPACK_IMPORTED_MODULE_0__compose__","_extends","target","source","key","bindActionCreator","actionCreator","bindActionCreators","actionCreators","keys","boundActionCreators","getUndefinedStateErrorMessage","actionType","assertReducerShape","reducers","forEach","substring","join","reducerKeys","finalReducers","finalReducerKeys","shapeAssertionError","state","hasChanged","nextState","_i","previousStateForKey","nextStateForKey","errorMessage","_interopRequireDefault","obj","_ponyfill","_ponyfill2","symbolObservablePonyfill","_Symbol","webpackPolyfill","deprecate","paths","children","dateStr","mn","parseInt","y","zeroPad","getMonth","getFullYear","DateRange_1","actions","DatePickConnected","v","console","log","oneDate","DateRangeConnected","twoDates","ReactDOM"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,EAAAC,IAGtDvB,EAAA0B,EAAA,GAGA1B,IAAA2B,EAAA,MDMM,SAAUvB,EAAQD,EAASH,GAEjC,YE9DA,SAAA4B,GAAiBC,GAEkB,SAAdC,OAAQC,KACfD,OAAQC,MAMlB,KAAK,GAHDC,GAAQH,EAAUI,MAAM,KACxBC,EAAkBJ,OAAQC,GAErB1B,EAAE,EAAGA,EAAG2B,EAAMG,OA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AaArJ,EAAA8J,gB7B28CQ,CACA,CACA,CAEF,SAAU7J,EAAQD,EAASH,GAEjC,YAEAe,QAAOC,eAAeb,EAAS,cAAgBO,OAAO,G8Bp+CtD,IAAA+H,GAAAzI,EAAA,IAEAiL,EAAAjL,EAAA,IACAkS,EAAAlS,EAAA,IACAmS,EAAAnS,EAAA,GAGaG,GAAAiS,kBAAoB3J,EAAAtF,QAC7B,SAACuN,GACG,OACInG,MAAO,wBACPhB,OAAQ,SAAC8I,GACLC,QAAQC,IAAIF,IAEhB5I,IAAKiH,EAAM8B,UAGnB,SAAClM,GACG,OACIiD,OAAQ,SAAC8I,GACL/L,GAAUG,KAAM0L,EAAQ5O,aAAc5C,EAAG0R,QAIvDpH,EAAArC,UAGWzI,EAAAsS,mBAAqBhK,EAAAtF,QAC9B,SAACuN,GACG,OACIpF,SAAU,GACVM,MAAO8E,EAAMgC,SAAS9G,MACtBF,IAAKgF,EAAMgC,SAAShH,IACpBD,WAAYiF,EAAMgC,SAAShH,IAC3Bc,QAAQ,IAGhB,SAAClG,GACG,OACI+F,SAAU,SAAC1K,EAASoG,EAASuE,GACzBhG,GAAUG,KAAM0L,EAAQ3O,cAAeoI,MAAOjK,EAAG+J,IAAK3D,EAAGuE,QAASA,QAIhF4F,EAAAhH,Y9B89CM,CACA,CAEF,SAAU9K,EAAQD,G+B7gDxBC,EAAAD,QAAA4C,O/BmhDM,SAAU3C,EAAQD,GgCnhDxBC,EAAAD,QAAAwS,UhCyhDM,SAAUvS,EAAQD,GiCzhDxBC,EAAAD,QAAA8C","file":"reacttst_connect.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 49);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n/* 2 */,\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */,\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\nexports.React = __webpack_require__(52);\r\nexports.ReactDom = __webpack_require__(53);\r\nexports.ReactRedux = __webpack_require__(54);\r\nexports.Redux = __webpack_require__(26);\r\nexports.connect = exports.ReactRedux.connect;\r\nexports.Provider = exports.ReactRedux.Provider;\r\nexports.combineReducers = exports.Redux.combineReducers;\r\nexports.createStore = exports.Redux.createStore;\r\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SET_ONE_DATE = 'set one date';\r\nexports.SET_TWO_DATES = 'set two dates';\r\n\n\n/***/ }),\n/* 17 */,\n/* 18 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(35);\n\n\n/** Built-in value references. */\nvar Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__[\"a\" /* default */].Symbol;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = Symbol;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(36);\n\n\n\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__[\"a\" /* default */])(value) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__[\"a\" /* default */])(value) != objectTag) {\n return false;\n }\n var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__[\"a\" /* default */])(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = isPlainObject;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = compose;\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(40);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ActionTypes; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createStore;\n\n\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__[\"a\" /* default */])(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2;\n}\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export default */\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nvar __assign = (this && this.__assign) || Object.assign || function(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\r\n t[p] = s[p];\r\n }\r\n return t;\r\n};\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar reactAndRedux_1 = __webpack_require__(15);\r\nvar $ = __webpack_require__(1);\r\n__webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar dateFormat_1 = __webpack_require__(45);\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nvar DatePick = (function (_super) {\r\n __extends(DatePick, _super);\r\n function DatePick(props, context) {\r\n var _this = _super.call(this, props, context) || this;\r\n _this.elId = _this.props.id || makeGuid_1.default();\r\n return _this;\r\n }\r\n DatePick.prototype.componentDidMount = function () {\r\n var _this = this;\r\n var $el = $('#' + this.elId);\r\n $el.datepicker({\r\n onSelect: function () {\r\n _this.props.change(dateFormat_1.stringToDate($el.val()));\r\n }\r\n });\r\n };\r\n DatePick.prototype.render = function () {\r\n var params = {\r\n id: this.elId,\r\n type: 'text',\r\n style: { margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center' },\r\n readOnly: true\r\n };\r\n if (this.props.val) {\r\n params['value'] = dateFormat_1.dateToString(this.props.val);\r\n }\r\n else {\r\n params['defaultValue'] = dateFormat_1.dateToString(this.props.initialDate || new Date());\r\n }\r\n return reactAndRedux_1.React.createElement(\"span\", { className: \"date-pick\" },\r\n reactAndRedux_1.React.createElement(\"label\", { htmlFor: this.elId }, this.props.label),\r\n reactAndRedux_1.React.createElement(\"input\", __assign({}, params)));\r\n };\r\n return DatePick;\r\n}(reactAndRedux_1.React.Component));\r\nexports.DatePick = DatePick;\r\nexports.default = DatePick;\r\n\n\n/***/ }),\n/* 25 */,\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(39);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(38);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(37);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"createStore\", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"combineReducers\", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"bindActionCreators\", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"applyMiddleware\", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__[\"a\"]; });\n\n\n\n\n\n\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== 'production', warn the user.\n*/\nfunction isCrushed() {}\n\nif (false) {\n warning('You are currently using minified code outside of NODE_ENV === \\'production\\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\n\n\n/***/ }),\n/* 27 */,\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar reactAndRedux_1 = __webpack_require__(15);\r\n__webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar fixDate = __webpack_require__(45);\r\nvar DatePick_1 = __webpack_require__(24);\r\nfunction stringToDate(dte) {\r\n if (dte.getTime) {\r\n return dte;\r\n }\r\n else {\r\n return new Date(dte);\r\n }\r\n}\r\nvar DateRange = (function (_super) {\r\n __extends(DateRange, _super);\r\n function DateRange(props, context) {\r\n var _this = _super.call(this, props, context) || this;\r\n _this.startId = makeGuid_1.default();\r\n _this.endId = makeGuid_1.default();\r\n _this.versionTwoStart = new Date(2017, 1, 1);\r\n _this.maxRange = Math.round(_this.props.maxRange) - 1;\r\n _this.minRange = typeof _this.props['minRange'] == 'number' ? Math.round(_this.props['minRange']) : 1;\r\n if (_this.minRange > _this.maxRange) {\r\n throw \"DateRange component: Max range must be greater than min range\";\r\n }\r\n if (_this.props.initialEnd) {\r\n _this.end = stringToDate(_this.props.initialEnd);\r\n }\r\n else {\r\n _this.end = new Date();\r\n }\r\n _this.end.setHours(0, 0, 0);\r\n _this.start = new Date(_this.end);\r\n _this.start.setDate(_this.start.getDate() - _this.maxRange);\r\n _this.setNumDays();\r\n return _this;\r\n }\r\n DateRange.prototype.setNumDays = function () {\r\n this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1;\r\n };\r\n DateRange.prototype.componentDidMount = function () {\r\n this.startInput = document.getElementById(this.startId);\r\n this.endInput = document.getElementById(this.endId);\r\n this.props.callback(this.start, this.end, this.version);\r\n };\r\n Object.defineProperty(DateRange.prototype, \"needReset\", {\r\n get: function () {\r\n return this.numDays > this.maxRange || this.numDays < this.minRange;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateRange.prototype, \"versionSpan\", {\r\n get: function () {\r\n if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart) {\r\n return true;\r\n }\r\n else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DateRange.prototype, \"version\", {\r\n get: function () {\r\n if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)) {\r\n return 2;\r\n }\r\n else if (this.start >= this.versionTwoStart) {\r\n return 2;\r\n }\r\n return 1;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n DateRange.prototype.finalizeChange = function () {\r\n if (this.props.npmrds) {\r\n if (this.versionSpan) {\r\n this.start = this.previousStart;\r\n this.end = this.previousEnd;\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n alert(\"Start and End dates must not span version break: \" + fixDate.dateToString(this.versionTwoStart));\r\n return;\r\n }\r\n }\r\n this.props.callback(this.start, this.end, this.version);\r\n };\r\n DateRange.prototype.setStart = function (s) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n this.start = s;\r\n this.setNumDays();\r\n if (this.needReset) {\r\n this.end = new Date(this.start);\r\n if (this.numDays > this.maxRange) {\r\n this.end.setDate(this.end.getDate() + this.maxRange);\r\n }\r\n else {\r\n this.end.setDate(this.end.getDate() + this.minRange - 1);\r\n }\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n }\r\n this.finalizeChange();\r\n };\r\n DateRange.prototype.setEnd = function (s) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n this.end = s;\r\n this.setNumDays();\r\n if (this.needReset) {\r\n this.start = new Date(this.end);\r\n if (this.numDays > this.maxRange) {\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n }\r\n else {\r\n this.start.setDate(this.start.getDate() - this.minRange + 1);\r\n }\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.setNumDays();\r\n }\r\n this.finalizeChange();\r\n };\r\n DateRange.prototype.render = function () {\r\n var _this = this;\r\n return reactAndRedux_1.React.createElement(\"div\", { className: \"date-range\" },\r\n reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.startId, label: \"Start\", initialDate: this.start, change: function (s) { _this.setStart(s); } }),\r\n reactAndRedux_1.React.createElement(DatePick_1.default, { id: this.endId, label: \"End\", initialDate: this.end, change: function (s) { _this.setEnd(s); } }));\r\n };\r\n return DateRange;\r\n}(reactAndRedux_1.React.Component));\r\nexports.DateRange = DateRange;\r\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(33);\n\n\n\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */].toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__[\"a\" /* default */])(value)\n : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__[\"a\" /* default */])(value);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = baseGetTag;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(23)))\n\n/***/ }),\n/* 31 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(34);\n\n\n/** Built-in value references. */\nvar getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__[\"a\" /* default */])(Object.getPrototypeOf, Object);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = getPrototype;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18);\n\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */].toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = getRawTag;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = objectToString;\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = overArg;\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(30);\n\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__[\"a\" /* default */] || freeSelf || Function('return this')();\n\n/* harmony default export */ __webpack_exports__[\"a\"] = root;\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = isObjectLike;\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(20);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = applyMiddleware;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__[\"a\" /* default */].apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/***/ }),\n/* 38 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = bindActionCreators;\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(22);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = combineReducers;\n\n\n\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__[\"a\" /* default */])(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (false) {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(41);\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = __webpack_require__(42);\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(23), __webpack_require__(43)(module)))\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports) {\n\nmodule.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n/***/ }),\n/* 44 */,\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by glenn on 6/13/2017.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nfunction stringToDate(dateStr) {\r\n var parts = dateStr.split('/');\r\n var mn = parseInt(parts[0]) - 1;\r\n var d = parseInt(parts[1]);\r\n var y = parseInt(parts[2]);\r\n var dte = new Date(y, mn, d);\r\n dte.setHours(0, 0, 0);\r\n return dte;\r\n}\r\nexports.stringToDate = stringToDate;\r\nfunction dateToString(dte, zeroPad) {\r\n if (zeroPad === void 0) { zeroPad = true; }\r\n var mn = (dte.getMonth() + 1).toString();\r\n var d = dte.getDate().toString();\r\n if (zeroPad) {\r\n mn = mn.length == 1 ? '0' + mn : mn;\r\n d = d.length == 1 ? '0' + d : d;\r\n }\r\n return mn + \"/\" + d + \"/\" + dte.getFullYear();\r\n}\r\nexports.dateToString = dateToString;\r\n\n\n/***/ }),\n/* 46 */,\n/* 47 */,\n/* 48 */,\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar reactAndRedux_1 = __webpack_require__(15);\r\nvar DatePick_1 = __webpack_require__(24);\r\nvar DateRange_1 = __webpack_require__(28);\r\nvar actions = __webpack_require__(16);\r\nexports.DatePickConnected = reactAndRedux_1.connect(function (state) {\r\n return {\r\n label: 'Date Picker Connected',\r\n change: function (v) {\r\n console.log(v);\r\n },\r\n val: state.oneDate\r\n };\r\n}, function (dispatch) {\r\n return {\r\n change: function (v) {\r\n dispatch({ type: actions.SET_ONE_DATE, d: v });\r\n }\r\n };\r\n})(DatePick_1.DatePick);\r\nexports.DateRangeConnected = reactAndRedux_1.connect(function (state) {\r\n return {\r\n maxRange: 10,\r\n start: state.twoDates.start,\r\n end: state.twoDates.end,\r\n initialEnd: state.twoDates.end,\r\n npmrds: true\r\n };\r\n}, function (dispatch) {\r\n return {\r\n callback: function (s, e, version) {\r\n dispatch({ type: actions.SET_TWO_DATES, start: s, end: e, version: version });\r\n }\r\n };\r\n})(DateRange_1.DateRange);\r\n\n\n/***/ }),\n/* 50 */,\n/* 51 */,\n/* 52 */\n/***/ (function(module, exports) {\n\nmodule.exports = React;\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports) {\n\nmodule.exports = ReactDOM;\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\nmodule.exports = ReactRedux;\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// reacttst_connect.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\nexport import React = require('react');\r\nexport import ReactDom = require('react-dom');\r\nexport import ReactRedux = require('react-redux');\r\nexport import Redux = require('redux');\r\n\r\nexport const connect = ReactRedux.connect;\r\nexport const Provider = ReactRedux.Provider;\r\nexport const combineReducers = Redux.combineReducers;\r\nexport const createStore = Redux.createStore;\r\n\r\nexport interface iAction extends Redux.Action{\r\n}\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/reactAndRedux.ts","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_Symbol.js\n// module id = 18\n// module chunks = 0 1 3","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isPlainObject.js\n// module id = 19\n// module chunks = 0 1 3","/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport default function compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/compose.js\n// module id = 20\n// module chunks = 0 1 3","import isPlainObject from 'lodash-es/isPlainObject';\nimport $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nexport var ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};export default function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/createStore.js\n// module id = 21\n// module chunks = 0 1 3","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 23\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/14/2017.\r\n */\r\n\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\n\r\nimport {dateToString, stringToDate} from './helpers/dateFormat';\r\n\r\nexport interface iDatePick{\r\n label: string;\r\n id?: string;\r\n initialDate?: Date;\r\n change: (val: Date) => any;\r\n val?: Date\r\n}\r\n\r\n/**\r\n * params label, id, initialDate, change callback with value as string\r\n */\r\nexport class DatePick extends React.Component<iDatePick, null> {\r\n private elId: string;\r\n\r\n constructor(props: iDatePick, context: Object){\r\n super(props, context);\r\n this.elId = this.props.id || makeGuid();\r\n }\r\n\r\n componentDidMount() {\r\n let $el = $('#' + this.elId);\r\n\r\n $el.datepicker(\r\n {\r\n onSelect: () => {\r\n this.props.change(stringToDate($el.val()));\r\n }\r\n }\r\n );\r\n }\r\n\r\n render() {\r\n let params = {\r\n id: this.elId,\r\n type: 'text',\r\n style: {margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'},\r\n readOnly: true\r\n };\r\n\r\n if (this.props.val){\r\n params['value'] = dateToString(this.props.val);\r\n } else {\r\n params['defaultValue'] = dateToString(this.props.initialDate || new Date());\r\n }\r\n\r\n\r\n return <span className=\"date-pick\">\r\n <label htmlFor={this.elId}>{this.props.label}</label>\r\n {/*<input id={this.elId} type=\"text\"*/}\r\n {/*style={{margin: \"0 10px 0 5px\", width: '73px', textAlign: 'center'}}*/}\r\n {/*defaultValue={dateToString(this.props.initialDate || new Date())}*/}\r\n {/*readOnly={true}*/}\r\n {/*/>*/}\r\n <input {...params}/>\r\n </span>\r\n }\r\n}\r\n\r\nexport default DatePick;\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DatePick.tsx","/**\r\n * Created by glenn on 6/12/2017.\r\n */\r\n\r\nimport {React} from './reactAndRedux';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\nimport makeGuid from '../util/makeGuid';\r\nimport * as fixDate from './helpers/dateFormat';\r\nimport DatePick from './DatePick';\r\n\r\nfunction stringToDate(dte: string|Date){\r\n if ((dte as Date).getTime){\r\n return dte as Date;\r\n } else {\r\n return new Date(dte);\r\n }\r\n}\r\n\r\nexport interface iDateRange{\r\n maxRange: number;\r\n callback: (start: Date, end: Date, version?: number) => any;\r\n minRange?: number;\r\n maxDate?: Date;\r\n minDate?: Date;\r\n initialEnd?: Date;\r\n start?: Date;\r\n end?: Date;\r\n npmrds?: boolean;\r\n}\r\n\r\n\r\nexport class DateRange extends React.Component<iDateRange, null> {\r\n startId = makeGuid();\r\n endId = makeGuid();\r\n startInput: HTMLInputElement;\r\n endInput: HTMLInputElement;\r\n start: Date;\r\n end: Date;\r\n maxRange: number;\r\n minRange: number;\r\n numDays: number;\r\n versionTwoStart: Date;\r\n previousStart: Date;\r\n previousEnd: Date;\r\n\r\n constructor(props: iDateRange, context: Object) {\r\n super(props, context);\r\n\r\n this.versionTwoStart = new Date(2017, 1, 1);\r\n\r\n this.maxRange = Math.round(this.props.maxRange) - 1;\r\n this.minRange = typeof this.props['minRange'] == 'number' ? Math.round(this.props['minRange']) : 1;\r\n\r\n if (this.minRange > this.maxRange) {\r\n throw \"DateRange component: Max range must be greater than min range\";\r\n }\r\n\r\n if (this.props.initialEnd){\r\n this.end = stringToDate(this.props.initialEnd)\r\n } else {\r\n this.end = new Date();\r\n }\r\n\r\n this.end.setHours(0, 0, 0);\r\n this.start = new Date(this.end);\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n this.setNumDays();\r\n }\r\n\r\n setNumDays() {\r\n this.numDays = Math.round((this.end.getTime() - this.start.getTime()) / (1000 * 60 * 60 * 24)) + 1;\r\n }\r\n\r\n\r\n componentDidMount() {\r\n this.startInput = document.getElementById(this.startId) as HTMLInputElement;\r\n this.endInput = document.getElementById(this.endId) as HTMLInputElement;\r\n\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private get needReset(): boolean {\r\n return this.numDays > this.maxRange || this.numDays < this.minRange;\r\n }\r\n\r\n private get versionSpan(): boolean{\r\n\r\n if (this.start < this.versionTwoStart && this.end >= this.versionTwoStart){\r\n return true;\r\n } else if (fixDate.dateToString(this.versionTwoStart) === fixDate.dateToString(this.end) && this.start < this.versionTwoStart){\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private get version(): number{\r\n\r\n if (fixDate.dateToString(this.start) == fixDate.dateToString(this.versionTwoStart)){\r\n return 2;\r\n } else if (this.start >= this.versionTwoStart){\r\n return 2;\r\n }\r\n return 1;\r\n }\r\n\r\n private finalizeChange(){\r\n\r\n if (this.props.npmrds){\r\n if (this.versionSpan){\r\n this.start = this.previousStart;\r\n this.end = this.previousEnd;\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n alert(\"Start and End dates must not span version break: \" + fixDate.dateToString(this.versionTwoStart));\r\n return;\r\n }\r\n }\r\n\r\n this.props.callback(this.start, this.end, this.version);\r\n }\r\n\r\n private setStart(s: Date) {\r\n\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.start = s;\r\n\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.end = new Date(this.start);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.end.setDate(this.end.getDate() + this.maxRange);\r\n } else {\r\n this.end.setDate(this.end.getDate() + this.minRange - 1);\r\n }\r\n\r\n this.endInput.value = fixDate.dateToString(this.end);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n private setEnd(s: Date) {\r\n this.previousStart = new Date(this.start);\r\n this.previousEnd = new Date(this.end);\r\n\r\n this.end = s;\r\n this.setNumDays();\r\n\r\n if (this.needReset) {\r\n this.start = new Date(this.end);\r\n\r\n if (this.numDays > this.maxRange) {\r\n this.start.setDate(this.start.getDate() - this.maxRange);\r\n } else {\r\n this.start.setDate(this.start.getDate() - this.minRange + 1);\r\n }\r\n\r\n this.startInput.value = fixDate.dateToString(this.start);\r\n this.setNumDays();\r\n }\r\n\r\n this.finalizeChange();\r\n }\r\n\r\n render() {\r\n return <div className=\"date-range\">\r\n <DatePick id={this.startId} label=\"Start\" initialDate={this.start} change={(s) => {this.setStart(s)}}/>\r\n <DatePick id={this.endId} label=\"End\" initialDate={this.end} change={(s) => {this.setEnd(s)}}/>\r\n </div>;\r\n }\r\n}\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/DateRange.tsx","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_baseGetTag.js\n// module id = 29\n// module chunks = 0 1 3","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_freeGlobal.js\n// module id = 30\n// module chunks = 0 1 3","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getPrototype.js\n// module id = 31\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getRawTag.js\n// module id = 32\n// module chunks = 0 1 3","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_objectToString.js\n// module id = 33\n// module chunks = 0 1 3","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_overArg.js\n// module id = 34\n// module chunks = 0 1 3","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_root.js\n// module id = 35\n// module chunks = 0 1 3","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isObjectLike.js\n// module id = 36\n// module chunks = 0 1 3","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport compose from './compose';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nexport default function applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/applyMiddleware.js\n// module id = 37\n// module chunks = 0 1 3","function bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/bindActionCreators.js\n// module id = 38\n// module chunks = 0 1 3","import { ActionTypes } from './createStore';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './utils/warning';\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nexport default function combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/combineReducers.js\n// module id = 39\n// module chunks = 0 1 3","module.exports = require('./lib/index');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/index.js\n// module id = 40\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = require('./ponyfill');\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/index.js\n// module id = 41\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/ponyfill.js\n// module id = 42\n// module chunks = 0 1 3","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 43\n// module chunks = 0 1 3","/**\r\n * Created by glenn on 6/13/2017.\r\n */\r\n\r\nexport function stringToDate(dateStr: string): Date {\r\n let parts = dateStr.split('/');\r\n\r\n let mn = parseInt(parts[0]) - 1;\r\n let d = parseInt(parts[1]);\r\n let y = parseInt(parts[2]);\r\n\r\n let dte = new Date(y, mn, d);\r\n dte.setHours(0, 0, 0);\r\n\r\n return dte;\r\n}\r\n\r\nexport function dateToString(dte: Date, zeroPad:boolean = true): string {\r\n let mn = (dte.getMonth() + 1).toString();\r\n let d = dte.getDate().toString();\r\n\r\n if (zeroPad){\r\n mn = mn.length == 1 ? '0' + mn : mn;\r\n d = d.length == 1 ? '0' + d : d ;\r\n }\r\n\r\n return `${mn}/${d}/${dte.getFullYear()}`;\r\n}\n\n\n// WEBPACK FOOTER //\n// ./src/reactComponents/helpers/dateFormat.ts","import {connect} from '../../reactComponents/reactAndRedux';\r\nimport {iState} from './reacttst_store';\r\nimport {DatePick} from '../../reactComponents/DatePick';\r\nimport {DateRange} from '../../reactComponents/DateRange';\r\nimport * as actions from './reacttst_actions';\r\n\r\n\r\nexport const DatePickConnected = connect(\r\n (state: iState) => {\r\n return {\r\n label: 'Date Picker Connected',\r\n change: (v) => {\r\n console.log(v);\r\n },\r\n val: state.oneDate\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n change: (v) => {\r\n dispatch({type: actions.SET_ONE_DATE, d: v});\r\n }\r\n }\r\n }\r\n)(DatePick);\r\n\r\n\r\nexport const DateRangeConnected = connect(\r\n (state: iState) => {\r\n return {\r\n maxRange: 10,\r\n start: state.twoDates.start,\r\n end: state.twoDates.end,\r\n initialEnd: state.twoDates.end,\r\n npmrds: true\r\n }\r\n },\r\n (dispatch) => {\r\n return {\r\n callback: (s: Date, e: Date, version: number) => {\r\n dispatch({type: actions.SET_TWO_DATES, start: s, end: e, version: version});\r\n }\r\n }\r\n }\r\n)(DateRange);\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_connect.ts","module.exports = React;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"React\"\n// module id = 52\n// module chunks = 0 1","module.exports = ReactDOM;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactDOM\"\n// module id = 53\n// module chunks = 0 1","module.exports = ReactRedux;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ReactRedux\"\n// module id = 54\n// module chunks = 0 1"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/reacttst_store.js b/test/serve/js/reacttst_store.js index b1fad6543d7f0764158b8c01f02313254ee29c0b..681d2419c1ddfc982a53bebffaf1b966da6a6bc3 100644 --- a/test/serve/js/reacttst_store.js +++ b/test/serve/js/reacttst_store.js @@ -1,1386 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 51); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */, -/* 1 */, -/* 2 */, -/* 3 */, -/* 4 */, -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */, -/* 10 */, -/* 11 */, -/* 12 */, -/* 13 */, -/* 14 */, -/* 15 */, -/* 16 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SET_ONE_DATE = 'set one date'; -exports.SET_TWO_DATES = 'set two dates'; - - -/***/ }), -/* 17 */, -/* 18 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(36); - - -/** Built-in value references. */ -var Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__["a" /* default */].Symbol; - -/* harmony default export */ __webpack_exports__["a"] = Symbol; - - -/***/ }), -/* 19 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(30); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(32); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(37); - - - - -/** `Object#toString` result references. */ -var objectTag = '[object Object]'; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to infer the `Object` constructor. */ -var objectCtorString = funcToString.call(Object); - -/** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. - * - * @static - * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. - * @example - * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true - * - * _.isPlainObject(Object.create(null)); - * // => true - */ -function isPlainObject(value) { - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__["a" /* default */])(value) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__["a" /* default */])(value) != objectTag) { - return false; - } - var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__["a" /* default */])(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; -} - -/* harmony default export */ __webpack_exports__["a"] = isPlainObject; - - -/***/ }), -/* 20 */ -/***/ (function(module, exports) { - -// shim for using process in browser -var process = module.exports = {}; - -// cached from whatever global is present so that test runners that stub it -// don't break things. But we need to wrap it in a try catch in case it is -// wrapped in strict mode code which doesn't define any globals. It's inside a -// function because try/catches deoptimize in certain engines. - -var cachedSetTimeout; -var cachedClearTimeout; - -function defaultSetTimout() { - throw new Error('setTimeout has not been defined'); -} -function defaultClearTimeout () { - throw new Error('clearTimeout has not been defined'); -} -(function () { - try { - if (typeof setTimeout === 'function') { - cachedSetTimeout = setTimeout; - } else { - cachedSetTimeout = defaultSetTimout; - } - } catch (e) { - cachedSetTimeout = defaultSetTimout; - } - try { - if (typeof clearTimeout === 'function') { - cachedClearTimeout = clearTimeout; - } else { - cachedClearTimeout = defaultClearTimeout; - } - } catch (e) { - cachedClearTimeout = defaultClearTimeout; - } -} ()) -function runTimeout(fun) { - if (cachedSetTimeout === setTimeout) { - //normal enviroments in sane situations - return setTimeout(fun, 0); - } - // if setTimeout wasn't available but was latter defined - if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { - cachedSetTimeout = setTimeout; - return setTimeout(fun, 0); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedSetTimeout(fun, 0); - } catch(e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedSetTimeout.call(null, fun, 0); - } catch(e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error - return cachedSetTimeout.call(this, fun, 0); - } - } - - -} -function runClearTimeout(marker) { - if (cachedClearTimeout === clearTimeout) { - //normal enviroments in sane situations - return clearTimeout(marker); - } - // if clearTimeout wasn't available but was latter defined - if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { - cachedClearTimeout = clearTimeout; - return clearTimeout(marker); - } - try { - // when when somebody has screwed with setTimeout but no I.E. maddness - return cachedClearTimeout(marker); - } catch (e){ - try { - // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally - return cachedClearTimeout.call(null, marker); - } catch (e){ - // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. - // Some versions of I.E. have different rules for clearTimeout vs setTimeout - return cachedClearTimeout.call(this, marker); - } - } - - - -} -var queue = []; -var draining = false; -var currentQueue; -var queueIndex = -1; - -function cleanUpNextTick() { - if (!draining || !currentQueue) { - return; - } - draining = false; - if (currentQueue.length) { - queue = currentQueue.concat(queue); - } else { - queueIndex = -1; - } - if (queue.length) { - drainQueue(); - } -} - -function drainQueue() { - if (draining) { - return; - } - var timeout = runTimeout(cleanUpNextTick); - draining = true; - - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - while (++queueIndex < len) { - if (currentQueue) { - currentQueue[queueIndex].run(); - } - } - queueIndex = -1; - len = queue.length; - } - currentQueue = null; - draining = false; - runClearTimeout(timeout); -} - -process.nextTick = function (fun) { - var args = new Array(arguments.length - 1); - if (arguments.length > 1) { - for (var i = 1; i < arguments.length; i++) { - args[i - 1] = arguments[i]; - } - } - queue.push(new Item(fun, args)); - if (queue.length === 1 && !draining) { - runTimeout(drainQueue); - } -}; - -// v8 likes predictible objects -function Item(fun, array) { - this.fun = fun; - this.array = array; -} -Item.prototype.run = function () { - this.fun.apply(null, this.array); -}; -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - - -/***/ }), -/* 21 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = compose; -/** - * Composes single-argument functions from right to left. The rightmost - * function can take multiple arguments as it provides the signature for - * the resulting composite function. - * - * @param {...Function} funcs The functions to compose. - * @returns {Function} A function obtained by composing the argument functions - * from right to left. For example, compose(f, g, h) is identical to doing - * (...args) => f(g(h(...args))). - */ - -function compose() { - for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) { - funcs[_key] = arguments[_key]; - } - - if (funcs.length === 0) { - return function (arg) { - return arg; - }; - } - - if (funcs.length === 1) { - return funcs[0]; - } - - return funcs.reduce(function (a, b) { - return function () { - return a(b.apply(undefined, arguments)); - }; - }); -} - -/***/ }), -/* 22 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(41); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ActionTypes; }); -/* harmony export (immutable) */ __webpack_exports__["a"] = createStore; - - - -/** - * These are private action types reserved by Redux. - * For any unknown actions, you must return the current state. - * If the current state is undefined, you must return the initial state. - * Do not reference these action types directly in your code. - */ -var ActionTypes = { - INIT: '@@redux/INIT' - - /** - * Creates a Redux store that holds the state tree. - * The only way to change the data in the store is to call `dispatch()` on it. - * - * There should only be a single store in your app. To specify how different - * parts of the state tree respond to actions, you may combine several reducers - * into a single reducer function by using `combineReducers`. - * - * @param {Function} reducer A function that returns the next state tree, given - * the current state tree and the action to handle. - * - * @param {any} [preloadedState] The initial state. You may optionally specify it - * to hydrate the state from the server in universal apps, or to restore a - * previously serialized user session. - * If you use `combineReducers` to produce the root reducer function, this must be - * an object with the same shape as `combineReducers` keys. - * - * @param {Function} [enhancer] The store enhancer. You may optionally specify it - * to enhance the store with third-party capabilities such as middleware, - * time travel, persistence, etc. The only store enhancer that ships with Redux - * is `applyMiddleware()`. - * - * @returns {Store} A Redux store that lets you read the state, dispatch actions - * and subscribe to changes. - */ -};function createStore(reducer, preloadedState, enhancer) { - var _ref2; - - if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { - enhancer = preloadedState; - preloadedState = undefined; - } - - if (typeof enhancer !== 'undefined') { - if (typeof enhancer !== 'function') { - throw new Error('Expected the enhancer to be a function.'); - } - - return enhancer(createStore)(reducer, preloadedState); - } - - if (typeof reducer !== 'function') { - throw new Error('Expected the reducer to be a function.'); - } - - var currentReducer = reducer; - var currentState = preloadedState; - var currentListeners = []; - var nextListeners = currentListeners; - var isDispatching = false; - - function ensureCanMutateNextListeners() { - if (nextListeners === currentListeners) { - nextListeners = currentListeners.slice(); - } - } - - /** - * Reads the state tree managed by the store. - * - * @returns {any} The current state tree of your application. - */ - function getState() { - return currentState; - } - - /** - * Adds a change listener. It will be called any time an action is dispatched, - * and some part of the state tree may potentially have changed. You may then - * call `getState()` to read the current state tree inside the callback. - * - * You may call `dispatch()` from a change listener, with the following - * caveats: - * - * 1. The subscriptions are snapshotted just before every `dispatch()` call. - * If you subscribe or unsubscribe while the listeners are being invoked, this - * will not have any effect on the `dispatch()` that is currently in progress. - * However, the next `dispatch()` call, whether nested or not, will use a more - * recent snapshot of the subscription list. - * - * 2. The listener should not expect to see all state changes, as the state - * might have been updated multiple times during a nested `dispatch()` before - * the listener is called. It is, however, guaranteed that all subscribers - * registered before the `dispatch()` started will be called with the latest - * state by the time it exits. - * - * @param {Function} listener A callback to be invoked on every dispatch. - * @returns {Function} A function to remove this change listener. - */ - function subscribe(listener) { - if (typeof listener !== 'function') { - throw new Error('Expected listener to be a function.'); - } - - var isSubscribed = true; - - ensureCanMutateNextListeners(); - nextListeners.push(listener); - - return function unsubscribe() { - if (!isSubscribed) { - return; - } - - isSubscribed = false; - - ensureCanMutateNextListeners(); - var index = nextListeners.indexOf(listener); - nextListeners.splice(index, 1); - }; - } - - /** - * Dispatches an action. It is the only way to trigger a state change. - * - * The `reducer` function, used to create the store, will be called with the - * current state tree and the given `action`. Its return value will - * be considered the **next** state of the tree, and the change listeners - * will be notified. - * - * The base implementation only supports plain object actions. If you want to - * dispatch a Promise, an Observable, a thunk, or something else, you need to - * wrap your store creating function into the corresponding middleware. For - * example, see the documentation for the `redux-thunk` package. Even the - * middleware will eventually dispatch plain object actions using this method. - * - * @param {Object} action A plain object representing “what changed”. It is - * a good idea to keep actions serializable so you can record and replay user - * sessions, or use the time travelling `redux-devtools`. An action must have - * a `type` property which may not be `undefined`. It is a good idea to use - * string constants for action types. - * - * @returns {Object} For convenience, the same action object you dispatched. - * - * Note that, if you use a custom middleware, it may wrap `dispatch()` to - * return something else (for example, a Promise you can await). - */ - function dispatch(action) { - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__["a" /* default */])(action)) { - throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.'); - } - - if (typeof action.type === 'undefined') { - throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); - } - - if (isDispatching) { - throw new Error('Reducers may not dispatch actions.'); - } - - try { - isDispatching = true; - currentState = currentReducer(currentState, action); - } finally { - isDispatching = false; - } - - var listeners = currentListeners = nextListeners; - for (var i = 0; i < listeners.length; i++) { - var listener = listeners[i]; - listener(); - } - - return action; - } - - /** - * Replaces the reducer currently used by the store to calculate the state. - * - * You might need this if your app implements code splitting and you want to - * load some of the reducers dynamically. You might also need this if you - * implement a hot reloading mechanism for Redux. - * - * @param {Function} nextReducer The reducer for the store to use instead. - * @returns {void} - */ - function replaceReducer(nextReducer) { - if (typeof nextReducer !== 'function') { - throw new Error('Expected the nextReducer to be a function.'); - } - - currentReducer = nextReducer; - dispatch({ type: ActionTypes.INIT }); - } - - /** - * Interoperability point for observable/reactive libraries. - * @returns {observable} A minimal observable of state changes. - * For more information, see the observable proposal: - * https://github.com/tc39/proposal-observable - */ - function observable() { - var _ref; - - var outerSubscribe = subscribe; - return _ref = { - /** - * The minimal observable subscription method. - * @param {Object} observer Any object that can be used as an observer. - * The observer object should have a `next` method. - * @returns {subscription} An object with an `unsubscribe` method that can - * be used to unsubscribe the observable from the store, and prevent further - * emission of values from the observable. - */ - subscribe: function subscribe(observer) { - if (typeof observer !== 'object') { - throw new TypeError('Expected the observer to be an object.'); - } - - function observeState() { - if (observer.next) { - observer.next(getState()); - } - } - - observeState(); - var unsubscribe = outerSubscribe(observeState); - return { unsubscribe: unsubscribe }; - } - }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () { - return this; - }, _ref; - } - - // When a store is created, an "INIT" action is dispatched so that every - // reducer returns their initial state. This effectively populates - // the initial state tree. - dispatch({ type: ActionTypes.INIT }); - - return _ref2 = { - dispatch: dispatch, - subscribe: subscribe, - getState: getState, - replaceReducer: replaceReducer - }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2; -} - -/***/ }), -/* 23 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = warning; -/** - * Prints a warning in the console if it exists. - * - * @param {String} message The warning message. - * @returns {void} - */ -function warning(message) { - /* eslint-disable no-console */ - if (typeof console !== 'undefined' && typeof console.error === 'function') { - console.error(message); - } - /* eslint-enable no-console */ - try { - // This error was thrown as a convenience so that if you enable - // "break on all exceptions" in your console, - // it would pause the execution at this line. - throw new Error(message); - /* eslint-disable no-empty */ - } catch (e) {} - /* eslint-enable no-empty */ -} - -/***/ }), -/* 24 */ -/***/ (function(module, exports) { - -var g; - -// This works in non-strict mode -g = (function() { - return this; -})(); - -try { - // This works if eval is allowed (see CSP) - g = g || Function("return this")() || (1,eval)("this"); -} catch(e) { - // This works if the window reference is available - if(typeof window === "object") - g = window; -} - -// g can still be undefined, but nothing to do about it... -// We return undefined, instead of nothing here, so it's -// easier to handle this case. if(!global) { ...} - -module.exports = g; - - -/***/ }), -/* 25 */, -/* 26 */, -/* 27 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(22); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(40); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(39); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(38); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(21); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(23); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__["a"]; }); -/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__["a"]; }); - - - - - - - -/* -* This is a dummy function to check if the function name has been altered by minification. -* If the function has been minified and NODE_ENV !== 'production', warn the user. -*/ -function isCrushed() {} - -if (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_5__utils_warning__["a" /* default */])('You are currently using minified code outside of NODE_ENV === \'production\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.'); -} - - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(20))) - -/***/ }), -/* 28 */, -/* 29 */, -/* 30 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(34); - - - - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__["a" /* default */])(value) - : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__["a" /* default */])(value); -} - -/* harmony default export */ __webpack_exports__["a"] = baseGetTag; - - -/***/ }), -/* 31 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -/* harmony default export */ __webpack_exports__["a"] = freeGlobal; - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(24))) - -/***/ }), -/* 32 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(35); - - -/** Built-in value references. */ -var getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__["a" /* default */])(Object.getPrototypeOf, Object); - -/* harmony default export */ __webpack_exports__["a"] = getPrototype; - - -/***/ }), -/* 33 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18); - - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__["a" /* default */].toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -/* harmony default export */ __webpack_exports__["a"] = getRawTag; - - -/***/ }), -/* 34 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -/* harmony default export */ __webpack_exports__["a"] = objectToString; - - -/***/ }), -/* 35 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ -function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; -} - -/* harmony default export */ __webpack_exports__["a"] = overArg; - - -/***/ }), -/* 36 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(31); - - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__["a" /* default */] || freeSelf || Function('return this')(); - -/* harmony default export */ __webpack_exports__["a"] = root; - - -/***/ }), -/* 37 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -/* harmony default export */ __webpack_exports__["a"] = isObjectLike; - - -/***/ }), -/* 38 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(21); -/* harmony export (immutable) */ __webpack_exports__["a"] = applyMiddleware; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - - - -/** - * Creates a store enhancer that applies middleware to the dispatch method - * of the Redux store. This is handy for a variety of tasks, such as expressing - * asynchronous actions in a concise manner, or logging every action payload. - * - * See `redux-thunk` package as an example of the Redux middleware. - * - * Because middleware is potentially asynchronous, this should be the first - * store enhancer in the composition chain. - * - * Note that each middleware will be given the `dispatch` and `getState` functions - * as named arguments. - * - * @param {...Function} middlewares The middleware chain to be applied. - * @returns {Function} A store enhancer applying the middleware. - */ -function applyMiddleware() { - for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) { - middlewares[_key] = arguments[_key]; - } - - return function (createStore) { - return function (reducer, preloadedState, enhancer) { - var store = createStore(reducer, preloadedState, enhancer); - var _dispatch = store.dispatch; - var chain = []; - - var middlewareAPI = { - getState: store.getState, - dispatch: function dispatch(action) { - return _dispatch(action); - } - }; - chain = middlewares.map(function (middleware) { - return middleware(middlewareAPI); - }); - _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__["a" /* default */].apply(undefined, chain)(store.dispatch); - - return _extends({}, store, { - dispatch: _dispatch - }); - }; - }; -} - -/***/ }), -/* 39 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = bindActionCreators; -function bindActionCreator(actionCreator, dispatch) { - return function () { - return dispatch(actionCreator.apply(undefined, arguments)); - }; -} - -/** - * Turns an object whose values are action creators, into an object with the - * same keys, but with every function wrapped into a `dispatch` call so they - * may be invoked directly. This is just a convenience method, as you can call - * `store.dispatch(MyActionCreators.doSomething())` yourself just fine. - * - * For convenience, you can also pass a single function as the first argument, - * and get a function in return. - * - * @param {Function|Object} actionCreators An object whose values are action - * creator functions. One handy way to obtain it is to use ES6 `import * as` - * syntax. You may also pass a single function. - * - * @param {Function} dispatch The `dispatch` function available on your Redux - * store. - * - * @returns {Function|Object} The object mimicking the original object, but with - * every action creator wrapped into the `dispatch` call. If you passed a - * function as `actionCreators`, the return value will also be a single - * function. - */ -function bindActionCreators(actionCreators, dispatch) { - if (typeof actionCreators === 'function') { - return bindActionCreator(actionCreators, dispatch); - } - - if (typeof actionCreators !== 'object' || actionCreators === null) { - throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?'); - } - - var keys = Object.keys(actionCreators); - var boundActionCreators = {}; - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var actionCreator = actionCreators[key]; - if (typeof actionCreator === 'function') { - boundActionCreators[key] = bindActionCreator(actionCreator, dispatch); - } - } - return boundActionCreators; -} - -/***/ }), -/* 40 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(process) {/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(22); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(19); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(23); -/* harmony export (immutable) */ __webpack_exports__["a"] = combineReducers; - - - - -function getUndefinedStateErrorMessage(key, action) { - var actionType = action && action.type; - var actionName = actionType && '"' + actionType.toString() + '"' || 'an action'; - - return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.'; -} - -function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) { - var reducerKeys = Object.keys(reducers); - var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer'; - - if (reducerKeys.length === 0) { - return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.'; - } - - if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__["a" /* default */])(inputState)) { - return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"'); - } - - var unexpectedKeys = Object.keys(inputState).filter(function (key) { - return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key]; - }); - - unexpectedKeys.forEach(function (key) { - unexpectedKeyCache[key] = true; - }); - - if (unexpectedKeys.length > 0) { - return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.'); - } -} - -function assertReducerShape(reducers) { - Object.keys(reducers).forEach(function (key) { - var reducer = reducers[key]; - var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT }); - - if (typeof initialState === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.'); - } - - var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.'); - if (typeof reducer(undefined, { type: type }) === 'undefined') { - throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__["b" /* ActionTypes */].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.'); - } - }); -} - -/** - * Turns an object whose values are different reducer functions, into a single - * reducer function. It will call every child reducer, and gather their results - * into a single state object, whose keys correspond to the keys of the passed - * reducer functions. - * - * @param {Object} reducers An object whose values correspond to different - * reducer functions that need to be combined into one. One handy way to obtain - * it is to use ES6 `import * as reducers` syntax. The reducers may never return - * undefined for any action. Instead, they should return their initial state - * if the state passed to them was undefined, and the current state for any - * unrecognized action. - * - * @returns {Function} A reducer function that invokes every reducer inside the - * passed object, and builds a state object with the same shape. - */ -function combineReducers(reducers) { - var reducerKeys = Object.keys(reducers); - var finalReducers = {}; - for (var i = 0; i < reducerKeys.length; i++) { - var key = reducerKeys[i]; - - if (process.env.NODE_ENV !== 'production') { - if (typeof reducers[key] === 'undefined') { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])('No reducer provided for key "' + key + '"'); - } - } - - if (typeof reducers[key] === 'function') { - finalReducers[key] = reducers[key]; - } - } - var finalReducerKeys = Object.keys(finalReducers); - - var unexpectedKeyCache = void 0; - if (process.env.NODE_ENV !== 'production') { - unexpectedKeyCache = {}; - } - - var shapeAssertionError = void 0; - try { - assertReducerShape(finalReducers); - } catch (e) { - shapeAssertionError = e; - } - - return function combination() { - var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var action = arguments[1]; - - if (shapeAssertionError) { - throw shapeAssertionError; - } - - if (process.env.NODE_ENV !== 'production') { - var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache); - if (warningMessage) { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__utils_warning__["a" /* default */])(warningMessage); - } - } - - var hasChanged = false; - var nextState = {}; - for (var _i = 0; _i < finalReducerKeys.length; _i++) { - var _key = finalReducerKeys[_i]; - var reducer = finalReducers[_key]; - var previousStateForKey = state[_key]; - var nextStateForKey = reducer(previousStateForKey, action); - if (typeof nextStateForKey === 'undefined') { - var errorMessage = getUndefinedStateErrorMessage(_key, action); - throw new Error(errorMessage); - } - nextState[_key] = nextStateForKey; - hasChanged = hasChanged || nextStateForKey !== previousStateForKey; - } - return hasChanged ? nextState : state; - }; -} -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(20))) - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(42); - - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(global, module) { - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _ponyfill = __webpack_require__(43); - -var _ponyfill2 = _interopRequireDefault(_ponyfill); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } - -var root; /* global window */ - - -if (typeof self !== 'undefined') { - root = self; -} else if (typeof window !== 'undefined') { - root = window; -} else if (typeof global !== 'undefined') { - root = global; -} else if (true) { - root = module; -} else { - root = Function('return this')(); -} - -var result = (0, _ponyfill2['default'])(root); -exports['default'] = result; -/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(24), __webpack_require__(44)(module))) - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports['default'] = symbolObservablePonyfill; -function symbolObservablePonyfill(root) { - var result; - var _Symbol = root.Symbol; - - if (typeof _Symbol === 'function') { - if (_Symbol.observable) { - result = _Symbol.observable; - } else { - result = _Symbol('observable'); - _Symbol.observable = result; - } - } else { - result = '@@observable'; - } - - return result; -}; - -/***/ }), -/* 44 */ -/***/ (function(module, exports) { - -module.exports = function(module) { - if(!module.webpackPolyfill) { - module.deprecate = function() {}; - module.paths = []; - // module.parent = undefined by default - if(!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - - -/***/ }), -/* 45 */, -/* 46 */, -/* 47 */, -/* 48 */, -/* 49 */, -/* 50 */, -/* 51 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var actions = __webpack_require__(16); -var Redux = __webpack_require__(27); -function oneDate(state, action) { - if (state === void 0) { state = new Date(); } - if (action.type == actions.SET_ONE_DATE) { - return action.d; - } - else { - return state; - } -} -var start = new Date('12/31/2017'); -var end = new Date('12/31/2017'); -start.setDate(start.getDate() - 10); -function twoDates(state, action) { - if (state === void 0) { state = { start: start, end: end, version: 2 }; } - if (action.type == actions.SET_TWO_DATES) { - return { - start: action.start, - end: action.end, - version: action.version - }; - } - else { - return state; - } -} -exports.theStore = Redux.createStore(Redux.combineReducers({ oneDate: oneDate, twoDates: twoDates })); -function getState() { - return exports.theStore.getState(); -} -exports.getState = getState; -exports.default = exports.theStore; - - -/***/ }) -/******/ ]); +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=50)}([,,,,,,,,,,,,,,,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SET_ONE_DATE="set one date",e.SET_TWO_DATES="set two dates"},,function(t,e,n){"use strict";var r=n(35),o=r.a.Symbol;e.a=o},function(t,e,n){"use strict";function r(t){if(!n.i(u.a)(t)||n.i(o.a)(t)!=c)return!1;var e=n.i(i.a)(t);if(null===e)return!0;var r=d.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==l}var o=n(29),i=n(31),u=n(36),c="[object Object]",a=Function.prototype,f=Object.prototype,s=a.toString,d=f.hasOwnProperty,l=s.call(Object);e.a=r},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce(function(t,e){return function(){return t(e.apply(void 0,arguments))}})}e.a=r},function(t,e,n){"use strict";function r(t,e,i){function a(){w===h&&(w=h.slice())}function f(){return b}function s(t){if("function"!=typeof t)throw new Error("Expected listener to be a function.");var e=!0;return a(),w.push(t),function(){if(e){e=!1,a();var n=w.indexOf(t);w.splice(n,1)}}}function d(t){if(!n.i(o.a)(t))throw new Error("Actions must be plain objects. Use custom middleware for async actions.");if(void 0===t.type)throw new Error('Actions may not have an undefined "type" property. Have you misspelled a constant?');if(j)throw new Error("Reducers may not dispatch actions.");try{j=!0,b=y(b,t)}finally{j=!1}for(var e=h=w,r=0;r<e.length;r++){(0,e[r])()}return t}function l(t){if("function"!=typeof t)throw new Error("Expected the nextReducer to be a function.");y=t,d({type:c.INIT})}function p(){var t,e=s;return t={subscribe:function(t){function n(){t.next&&t.next(f())}if("object"!=typeof t)throw new TypeError("Expected the observer to be an object.");return n(),{unsubscribe:e(n)}}},t[u.a]=function(){return this},t}var v;if("function"==typeof e&&void 0===i&&(i=e,e=void 0),void 0!==i){if("function"!=typeof i)throw new Error("Expected the enhancer to be a function.");return i(r)(t,e)}if("function"!=typeof t)throw new Error("Expected the reducer to be a function.");var y=t,b=e,h=[],w=h,j=!1;return d({type:c.INIT}),v={dispatch:d,subscribe:s,getState:f,replaceReducer:l},v[u.a]=p,v}var o=n(19),i=n(40),u=n.n(i);n.d(e,"b",function(){return c}),e.a=r;var c={INIT:"@@redux/INIT"}},function(t,e,n){"use strict"},function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},,,function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(21),o=n(39),i=n(38),u=n(37),c=n(20);n(22);n.d(e,"createStore",function(){return r.a}),n.d(e,"combineReducers",function(){return o.a}),n.d(e,"bindActionCreators",function(){return i.a}),n.d(e,"applyMiddleware",function(){return u.a}),n.d(e,"compose",function(){return c.a})},,,function(t,e,n){"use strict";function r(t){return null==t?void 0===t?a:c:f&&f in Object(t)?n.i(i.a)(t):n.i(u.a)(t)}var o=n(18),i=n(32),u=n(33),c="[object Null]",a="[object Undefined]",f=o.a?o.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.a=n}).call(e,n(23))},function(t,e,n){"use strict";var r=n(34),o=n.i(r.a)(Object.getPrototypeOf,Object);e.a=o},function(t,e,n){"use strict";function r(t){var e=u.call(t,a),n=t[a];try{t[a]=void 0;var r=!0}catch(t){}var o=c.call(t);return r&&(e?t[a]=n:delete t[a]),o}var o=n(18),i=Object.prototype,u=i.hasOwnProperty,c=i.toString,a=o.a?o.a.toStringTag:void 0;e.a=r},function(t,e,n){"use strict";function r(t){return i.call(t)}var o=Object.prototype,i=o.toString;e.a=r},function(t,e,n){"use strict";function r(t,e){return function(n){return t(e(n))}}e.a=r},function(t,e,n){"use strict";var r=n(30),o="object"==typeof self&&self&&self.Object===Object&&self,i=r.a||o||Function("return this")();e.a=i},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}e.a=r},function(t,e,n){"use strict";function r(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(n,r,u){var c=t(n,r,u),a=c.dispatch,f=[],s={getState:c.getState,dispatch:function(t){return a(t)}};return f=e.map(function(t){return t(s)}),a=o.a.apply(void 0,f)(c.dispatch),i({},c,{dispatch:a})}}}var o=n(20);e.a=r;var i=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){"use strict";function r(t,e){return function(){return e(t.apply(void 0,arguments))}}function o(t,e){if("function"==typeof t)return r(t,e);if("object"!=typeof t||null===t)throw new Error("bindActionCreators expected an object or a function, instead received "+(null===t?"null":typeof t)+'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');for(var n=Object.keys(t),o={},i=0;i<n.length;i++){var u=n[i],c=t[u];"function"==typeof c&&(o[u]=r(c,e))}return o}e.a=o},function(t,e,n){"use strict";function r(t,e){var n=e&&e.type;return"Given action "+(n&&'"'+n.toString()+'"'||"an action")+', reducer "'+t+'" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.'}function o(t){Object.keys(t).forEach(function(e){var n=t[e];if(void 0===n(void 0,{type:u.b.INIT}))throw new Error('Reducer "'+e+"\" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(void 0===n(void 0,{type:"@@redux/PROBE_UNKNOWN_ACTION_"+Math.random().toString(36).substring(7).split("").join(".")}))throw new Error('Reducer "'+e+"\" returned undefined when probed with a random type. Don't try to handle "+u.b.INIT+' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.')})}function i(t){for(var e=Object.keys(t),n={},i=0;i<e.length;i++){var u=e[i];"function"==typeof t[u]&&(n[u]=t[u])}var c=Object.keys(n),a=void 0;try{o(n)}catch(t){a=t}return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];if(a)throw a;for(var o=!1,i={},u=0;u<c.length;u++){var f=c[u],s=n[f],d=t[f],l=s(d,e);if(void 0===l){var p=r(f,e);throw new Error(p)}i[f]=l,o=o||l!==d}return o?i:t}}var u=n(21);n(19),n(22);e.a=i},function(t,e,n){t.exports=n(41)},function(t,e,n){"use strict";(function(t,r){function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i,u=n(42),c=o(u);i="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:r;var a=(0,c.default)(i);e.default=a}).call(e,n(23),n(43)(t))},function(t,e,n){"use strict";function r(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},,,,,,,function(t,e,n){"use strict";function r(t,e){return void 0===t&&(t=new Date),e.type==u.SET_ONE_DATE?e.d:t}function o(t,e){return void 0===t&&(t={start:a,end:f,version:2}),e.type==u.SET_TWO_DATES?{start:e.start,end:e.end,version:e.version}:t}function i(){return e.theStore.getState()}Object.defineProperty(e,"__esModule",{value:!0});var u=n(16),c=n(26),a=new Date("12/31/2017"),f=new Date("12/31/2017");a.setDate(a.getDate()-10),e.theStore=c.createStore(c.combineReducers({oneDate:r,twoDates:o})),e.getState=i,e.default=e.theStore}]); //# sourceMappingURL=reacttst_store.js.map \ No newline at end of file diff --git a/test/serve/js/reacttst_store.js.map b/test/serve/js/reacttst_store.js.map index 75f674b98cc3dee86ee49b658db55947ece515de..074e05a63fe9d19b9557b11878185cec15330cac 100644 --- a/test/serve/js/reacttst_store.js.map +++ b/test/serve/js/reacttst_store.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc***","webpack:///./src/_tests/demos/reacttst_actions.ts?2a10*","webpack:///./~/lodash-es/_Symbol.js?eec2*","webpack:///./~/lodash-es/isPlainObject.js?3f96*","webpack:///./~/process/browser.js?b777*","webpack:///./~/redux/es/compose.js?c271*","webpack:///./~/redux/es/createStore.js?732e*","webpack:///./~/redux/es/utils/warning.js?a530*","webpack:///(webpack)/buildin/global.js?9e04*","webpack:///./~/redux/es/index.js?10ac*","webpack:///./~/lodash-es/_baseGetTag.js?7715*","webpack:///./~/lodash-es/_freeGlobal.js?f5ff*","webpack:///./~/lodash-es/_getPrototype.js?51c7*","webpack:///./~/lodash-es/_getRawTag.js?dc49*","webpack:///./~/lodash-es/_objectToString.js?b181*","webpack:///./~/lodash-es/_overArg.js?d6db*","webpack:///./~/lodash-es/_root.js?490e*","webpack:///./~/lodash-es/isObjectLike.js?bb06*","webpack:///./~/redux/es/applyMiddleware.js?83f5*","webpack:///./~/redux/es/bindActionCreators.js?f699*","webpack:///./~/redux/es/combineReducers.js?5dc8*","webpack:///./~/symbol-observable/index.js?8c2f*","webpack:///./~/symbol-observable/lib/index.js?5723*","webpack:///./~/symbol-observable/lib/ponyfill.js?f7ae*","webpack:///(webpack)/buildin/module.js?5171*","webpack:///./src/_tests/demos/reacttst_store.ts?c703"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AC9Da,oBAAY,GAAG,cAAc,CAAC;AAC9B,qBAAa,GAAG,eAAe,CAAC;;;;;;;;;;ACH7C;;AAEA;AACA;;AAEA;;;;;;;;;;;ACLA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;AC7DA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;;;;AAIA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,2BAA2B;AAC3B;AACA;AACA;AACA,4BAA4B,UAAU;;;;;;;;ACnLtC;AAAA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa,SAAS;AACtB;AACA;AACA;;AAEA;AACA,kEAAkE,aAAa;AAC/E;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;;;;;;AC/BA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA,aAAa,IAAI;AACjB;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA,eAAe,MAAM;AACrB;AACA;AACA,EAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,IAAI;AACnB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe,SAAS;AACxB;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;;AAEA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB,eAAe;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc,yBAAyB;AACvC;;AAEA;AACA;AACA,eAAe,WAAW;AAC1B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAiB,OAAO;AACxB;AACA,mBAAmB,aAAa;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,gBAAgB;AAChB;AACA,KAAK;AACL;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA,YAAY,yBAAyB;;AAErC;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,C;;;;;;;ACvPA;AAAA;AACA;AACA;AACA,WAAW,OAAO;AAClB,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,C;;;;;;ACpBA;;AAEA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA,4CAA4C;;AAE5C;;;;;;;;;;;;;;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;ACfA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC3BA;AACA;;AAEA;;;;;;;;;;ACHA;;AAEA;AACA;;AAEA;;;;;;;;;ACLA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;AC7CA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA,WAAW,SAAS;AACpB,WAAW,SAAS;AACpB,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;ACdA;;AAEA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,EAAE;AACb,aAAa,QAAQ;AACrB;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;AC5BA;AAAA,mDAAmD,gBAAgB,sBAAsB,OAAO,2BAA2B,0BAA0B,yDAAyD,2BAA2B,EAAE,EAAE,EAAE,eAAe;;AAE9P;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,YAAY;AACvB,aAAa,SAAS;AACtB;AACA;AACA,wEAAwE,aAAa;AACrF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;;AAEA,wBAAwB;AACxB;AACA,OAAO;AACP;AACA;AACA,C;;;;;;;AC/CA;AAAA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB;AAC3B;AACA;AACA;AACA,WAAW,SAAS;AACpB;AACA;AACA,aAAa,gBAAgB;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,iBAAiB,iBAAiB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;;;;;AC9CsB;AACtB;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,mEAAmE;AACnE;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,2CAA2C,+EAAyB;;AAEpE;AACA;AACA;;AAEA;AACA,mCAAmC,aAAa;AAChD;AACA;AACA,GAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,OAAO;AAClB;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA,iBAAiB,wBAAwB;AACzC;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAoB,8BAA8B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,C;;;;;;;ACjIA;;;;;;;;sDCAA;;AAEA;AACA;AACA,CAAC;;AAED;;AAEA;;AAEA,sCAAsC,uCAAuC,kBAAkB;;AAE/F,SAAS;;;AAGT;AACA;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA,CAAC;AACD;AACA;;AAEA;AACA,4B;;;;;;;;AC5BA;;AAEA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA;;AAEA;AACA,E;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACrBA,sCAA8C;AAC9C,oCAAgC;AAGhC,iBAAiB,KAAkB,EAAE,MAA+B;IAAnD,oCAAY,IAAI,EAAE;IAC/B,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IACpB,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAED,IAAI,KAAK,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;AACnC,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC;AACjC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;AAEpC,kBAAkB,KAA4C,EAAE,MAA+D;IAA7G,kCAAS,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAC;IAC1D,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,aAAa,CAAC,EAAC;QACtC,MAAM,CAAC;YACH,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,GAAG,EAAE,MAAM,CAAC,GAAG;YACf,OAAO,EAAE,MAAM,CAAC,OAAO;SAC1B;IACL,CAAC;IAAC,IAAI,CAAC,CAAC;QACJ,MAAM,CAAC,KAAK,CAAC;IACjB,CAAC;AACL,CAAC;AAIY,gBAAQ,GAAG,KAAK,CAAC,WAAW,CACrC,KAAK,CAAC,eAAe,CAAC,EAAC,OAAO,WAAE,QAAQ,YAAC,CAAC,CAC7C,CAAC;AASF;IACI,MAAM,CAAC,gBAAQ,CAAC,QAAQ,EAAY,CAAC;AACzC,CAAC;AAFD,4BAEC;AAED,kBAAe,gBAAQ,CAAC","file":"reacttst_store.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 51);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_Symbol.js\n// module id = 18\n// module chunks = 0 1 3","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isPlainObject.js\n// module id = 19\n// module chunks = 0 1 3","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/process/browser.js\n// module id = 20\n// module chunks = 0 1 3","/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport default function compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/compose.js\n// module id = 21\n// module chunks = 0 1 3","import isPlainObject from 'lodash-es/isPlainObject';\nimport $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nexport var ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};export default function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/createStore.js\n// module id = 22\n// module chunks = 0 1 3","/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nexport default function warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/utils/warning.js\n// module id = 23\n// module chunks = 0 1 3","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 24\n// module chunks = 0 1 3","import createStore from './createStore';\nimport combineReducers from './combineReducers';\nimport bindActionCreators from './bindActionCreators';\nimport applyMiddleware from './applyMiddleware';\nimport compose from './compose';\nimport warning from './utils/warning';\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== 'production', warn the user.\n*/\nfunction isCrushed() {}\n\nif (process.env.NODE_ENV !== 'production' && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed') {\n warning('You are currently using minified code outside of NODE_ENV === \\'production\\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\nexport { createStore, combineReducers, bindActionCreators, applyMiddleware, compose };\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/index.js\n// module id = 27\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_baseGetTag.js\n// module id = 30\n// module chunks = 0 1 3","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_freeGlobal.js\n// module id = 31\n// module chunks = 0 1 3","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getPrototype.js\n// module id = 32\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getRawTag.js\n// module id = 33\n// module chunks = 0 1 3","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_objectToString.js\n// module id = 34\n// module chunks = 0 1 3","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_overArg.js\n// module id = 35\n// module chunks = 0 1 3","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_root.js\n// module id = 36\n// module chunks = 0 1 3","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isObjectLike.js\n// module id = 37\n// module chunks = 0 1 3","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport compose from './compose';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nexport default function applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/applyMiddleware.js\n// module id = 38\n// module chunks = 0 1 3","function bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/bindActionCreators.js\n// module id = 39\n// module chunks = 0 1 3","import { ActionTypes } from './createStore';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './utils/warning';\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nexport default function combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/combineReducers.js\n// module id = 40\n// module chunks = 0 1 3","module.exports = require('./lib/index');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/index.js\n// module id = 41\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = require('./ponyfill');\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/index.js\n// module id = 42\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/ponyfill.js\n// module id = 43\n// module chunks = 0 1 3","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 44\n// module chunks = 0 1 3","import * as actions from './reacttst_actions';\r\nimport Redux = require('redux');\r\n\r\n\r\nfunction oneDate(state = new Date(), action: {type: string, d: Date}) {\r\n if (action.type == actions.SET_ONE_DATE) {\r\n return action.d;\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\nlet start = new Date('12/31/2017');\r\nlet end = new Date('12/31/2017');\r\nstart.setDate(start.getDate() - 10);\r\n\r\nfunction twoDates(state = {start: start, end: end, version: 2}, action: {type: string, start: Date, end: Date, version: number}){\r\n if (action.type == actions.SET_TWO_DATES){\r\n return {\r\n start: action.start,\r\n end: action.end,\r\n version: action.version\r\n }\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\n\r\n\r\nexport const theStore = Redux.createStore(\r\n Redux.combineReducers({oneDate, twoDates})\r\n);\r\n\r\n\r\nexport interface iState {\r\n oneDate: Date;\r\n twoDates: {start: Date, end: Date, version: number}\r\n}\r\n\r\n\r\nexport function getState(): iState{\r\n return theStore.getState() as iState;\r\n}\r\n\r\nexport default theStore;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_store.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///reacttst_store.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d***","webpack:///./src/_tests/demos/reacttst_actions.ts?2a10*","webpack:///./~/lodash-es/_Symbol.js?eec2*","webpack:///./~/lodash-es/isPlainObject.js?3f96*","webpack:///./~/redux/es/compose.js?c271*","webpack:///./~/redux/es/createStore.js?732e*","webpack:///(webpack)/buildin/global.js?9e04*","webpack:///./~/lodash-es/_baseGetTag.js?7715*","webpack:///./~/lodash-es/_freeGlobal.js?f5ff*","webpack:///./~/lodash-es/_getPrototype.js?51c7*","webpack:///./~/lodash-es/_getRawTag.js?dc49*","webpack:///./~/lodash-es/_objectToString.js?b181*","webpack:///./~/lodash-es/_overArg.js?d6db*","webpack:///./~/lodash-es/_root.js?490e*","webpack:///./~/lodash-es/isObjectLike.js?bb06*","webpack:///./~/redux/es/applyMiddleware.js?83f5*","webpack:///./~/redux/es/bindActionCreators.js?f699*","webpack:///./~/redux/es/combineReducers.js?5dc8*","webpack:///./~/symbol-observable/index.js?8c2f*","webpack:///./~/symbol-observable/lib/index.js?5723*","webpack:///./~/symbol-observable/lib/ponyfill.js?f7ae*","webpack:///(webpack)/buildin/module.js?5171*","webpack:///./src/_tests/demos/reacttst_store.ts?c703"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","SET_ONE_DATE","SET_TWO_DATES","__webpack_exports__","__WEBPACK_IMPORTED_MODULE_0__root_js__","Symbol","isPlainObject","__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__","__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__","objectTag","proto","__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__","Ctor","constructor","funcToString","objectCtorString","funcProto","Function","objectProto","toString","compose","_len","arguments","length","funcs","Array","_key","arg","reduce","a","b","apply","undefined","createStore","reducer","preloadedState","enhancer","ensureCanMutateNextListeners","nextListeners","currentListeners","slice","getState","currentState","subscribe","listener","Error","isSubscribed","push","index","indexOf","splice","dispatch","action","__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__","type","isDispatching","currentReducer","listeners","replaceReducer","nextReducer","ActionTypes","INIT","observable","_ref","outerSubscribe","observer","observeState","next","TypeError","unsubscribe","__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default","this","_ref2","__WEBPACK_IMPORTED_MODULE_1_symbol_observable__","g","eval","e","window","__WEBPACK_IMPORTED_MODULE_0__createStore__","__WEBPACK_IMPORTED_MODULE_1__combineReducers__","__WEBPACK_IMPORTED_MODULE_2__bindActionCreators__","__WEBPACK_IMPORTED_MODULE_3__applyMiddleware__","__WEBPACK_IMPORTED_MODULE_4__compose__","baseGetTag","undefinedTag","nullTag","symToStringTag","__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__","__WEBPACK_IMPORTED_MODULE_2__objectToString_js__","__WEBPACK_IMPORTED_MODULE_0__Symbol_js__","toStringTag","global","freeGlobal","__WEBPACK_IMPORTED_MODULE_0__overArg_js__","getPrototype","getPrototypeOf","getRawTag","isOwn","tag","unmasked","result","nativeObjectToString","objectToString","overArg","func","transform","__WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__","freeSelf","self","root","isObjectLike","applyMiddleware","middlewares","store","_dispatch","chain","middlewareAPI","map","middleware","__WEBPACK_IMPORTED_MODULE_0__compose__","_extends","assign","target","source","key","bindActionCreator","actionCreator","bindActionCreators","actionCreators","keys","boundActionCreators","getUndefinedStateErrorMessage","actionType","assertReducerShape","reducers","forEach","Math","random","substring","split","join","combineReducers","reducerKeys","finalReducers","finalReducerKeys","shapeAssertionError","state","hasChanged","nextState","_i","previousStateForKey","nextStateForKey","errorMessage","_interopRequireDefault","obj","default","_ponyfill","_ponyfill2","symbolObservablePonyfill","_Symbol","webpackPolyfill","deprecate","paths","children","oneDate","Date","actions","twoDates","start","end","version","theStore","Redux","setDate","getDate"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,E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,WvB6lCpBrD,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GuBvoCtD,IAAAuL,GAAAjM,EAAA,IACAuM,EAAAvM,EAAA,IAWImM,EAAQ,GAAIH,MAAK,cACjBI,EAAM,GAAIJ,MAAK,aACnBG,GAAMK,QAAQL,EAAMM,UAAY,IAgBnBtM,EAAAmM,SAAWC,EAAM3I,YAC1B2I,EAAM/B,iBAAiBuB,QAAOA,EAAEG,SAAQA,KAU5C/L,EAAAiE,WAIAjE,EAAAmL,QAAenL,EAAAmM","file":"reacttst_store.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 50);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */,\n/* 1 */,\n/* 2 */,\n/* 3 */,\n/* 4 */,\n/* 5 */,\n/* 6 */,\n/* 7 */,\n/* 8 */,\n/* 9 */,\n/* 10 */,\n/* 11 */,\n/* 12 */,\n/* 13 */,\n/* 14 */,\n/* 15 */,\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.SET_ONE_DATE = 'set one date';\r\nexports.SET_TWO_DATES = 'set two dates';\r\n\n\n/***/ }),\n/* 17 */,\n/* 18 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__root_js__ = __webpack_require__(35);\n\n\n/** Built-in value references. */\nvar Symbol = __WEBPACK_IMPORTED_MODULE_0__root_js__[\"a\" /* default */].Symbol;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = Symbol;\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__ = __webpack_require__(29);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getPrototype_js__ = __webpack_require__(31);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__ = __webpack_require__(36);\n\n\n\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__isObjectLike_js__[\"a\" /* default */])(value) || __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__baseGetTag_js__[\"a\" /* default */])(value) != objectTag) {\n return false;\n }\n var proto = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getPrototype_js__[\"a\" /* default */])(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = isPlainObject;\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = compose;\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nfunction compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n/***/ }),\n/* 21 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable__ = __webpack_require__(40);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_symbol_observable___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_symbol_observable__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ActionTypes; });\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = createStore;\n\n\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0_lodash_es_isPlainObject__[\"a\" /* default */])(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[__WEBPACK_IMPORTED_MODULE_1_symbol_observable___default.a] = observable, _ref2;\n}\n\n/***/ }),\n/* 22 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* unused harmony export default */\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n /* eslint-disable no-empty */\n } catch (e) {}\n /* eslint-enable no-empty */\n}\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports) {\n\nvar g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n/***/ }),\n/* 24 */,\n/* 25 */,\n/* 26 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__combineReducers__ = __webpack_require__(39);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__ = __webpack_require__(38);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__ = __webpack_require__(37);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__compose__ = __webpack_require__(20);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__utils_warning__ = __webpack_require__(22);\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"createStore\", function() { return __WEBPACK_IMPORTED_MODULE_0__createStore__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"combineReducers\", function() { return __WEBPACK_IMPORTED_MODULE_1__combineReducers__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"bindActionCreators\", function() { return __WEBPACK_IMPORTED_MODULE_2__bindActionCreators__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"applyMiddleware\", function() { return __WEBPACK_IMPORTED_MODULE_3__applyMiddleware__[\"a\"]; });\n/* harmony reexport (binding) */ __webpack_require__.d(__webpack_exports__, \"compose\", function() { return __WEBPACK_IMPORTED_MODULE_4__compose__[\"a\"]; });\n\n\n\n\n\n\n\n/*\n* This is a dummy function to check if the function name has been altered by minification.\n* If the function has been minified and NODE_ENV !== 'production', warn the user.\n*/\nfunction isCrushed() {}\n\nif (false) {\n warning('You are currently using minified code outside of NODE_ENV === \\'production\\'. ' + 'This means that you are running a slower development build of Redux. ' + 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + 'or DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + 'to ensure you have the correct code for your production build.');\n}\n\n\n\n/***/ }),\n/* 27 */,\n/* 28 */,\n/* 29 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__getRawTag_js__ = __webpack_require__(32);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__objectToString_js__ = __webpack_require__(33);\n\n\n\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */].toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__getRawTag_js__[\"a\" /* default */])(value)\n : __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_2__objectToString_js__[\"a\" /* default */])(value);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = baseGetTag;\n\n\n/***/ }),\n/* 30 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/* harmony default export */ __webpack_exports__[\"a\"] = freeGlobal;\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(23)))\n\n/***/ }),\n/* 31 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__overArg_js__ = __webpack_require__(34);\n\n\n/** Built-in value references. */\nvar getPrototype = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__overArg_js__[\"a\" /* default */])(Object.getPrototypeOf, Object);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = getPrototype;\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Symbol_js__ = __webpack_require__(18);\n\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */] ? __WEBPACK_IMPORTED_MODULE_0__Symbol_js__[\"a\" /* default */].toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = getRawTag;\n\n\n/***/ }),\n/* 33 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = objectToString;\n\n\n/***/ }),\n/* 34 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = overArg;\n\n\n/***/ }),\n/* 35 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__ = __webpack_require__(30);\n\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = __WEBPACK_IMPORTED_MODULE_0__freeGlobal_js__[\"a\" /* default */] || freeSelf || Function('return this')();\n\n/* harmony default export */ __webpack_exports__[\"a\"] = root;\n\n\n/***/ }),\n/* 36 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = isObjectLike;\n\n\n/***/ }),\n/* 37 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__compose__ = __webpack_require__(20);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = applyMiddleware;\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\n\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = __WEBPACK_IMPORTED_MODULE_0__compose__[\"a\" /* default */].apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/***/ }),\n/* 38 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = bindActionCreators;\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n/***/ }),\n/* 39 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__createStore__ = __webpack_require__(21);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__ = __webpack_require__(19);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__utils_warning__ = __webpack_require__(22);\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = combineReducers;\n\n\n\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_lodash_es_isPlainObject__[\"a\" /* default */])(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + __WEBPACK_IMPORTED_MODULE_0__createStore__[\"b\" /* ActionTypes */].INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (false) {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(41);\n\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, module) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = __webpack_require__(42);\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(23), __webpack_require__(43)(module)))\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports) {\n\nmodule.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n/***/ }),\n/* 44 */,\n/* 45 */,\n/* 46 */,\n/* 47 */,\n/* 48 */,\n/* 49 */,\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar actions = __webpack_require__(16);\r\nvar Redux = __webpack_require__(26);\r\nfunction oneDate(state, action) {\r\n if (state === void 0) { state = new Date(); }\r\n if (action.type == actions.SET_ONE_DATE) {\r\n return action.d;\r\n }\r\n else {\r\n return state;\r\n }\r\n}\r\nvar start = new Date('12/31/2017');\r\nvar end = new Date('12/31/2017');\r\nstart.setDate(start.getDate() - 10);\r\nfunction twoDates(state, action) {\r\n if (state === void 0) { state = { start: start, end: end, version: 2 }; }\r\n if (action.type == actions.SET_TWO_DATES) {\r\n return {\r\n start: action.start,\r\n end: action.end,\r\n version: action.version\r\n };\r\n }\r\n else {\r\n return state;\r\n }\r\n}\r\nexports.theStore = Redux.createStore(Redux.combineReducers({ oneDate: oneDate, twoDates: twoDates }));\r\nfunction getState() {\r\n return exports.theStore.getState();\r\n}\r\nexports.getState = getState;\r\nexports.default = exports.theStore;\r\n\n\n/***/ })\n/******/ ]);\n\n\n// WEBPACK FOOTER //\n// reacttst_store.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 50);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","\r\n\r\nexport const SET_ONE_DATE = 'set one date';\r\nexport const SET_TWO_DATES = 'set two dates';\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_actions.ts","import root from './_root.js';\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nexport default Symbol;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_Symbol.js\n// module id = 18\n// module chunks = 0 1 3","import baseGetTag from './_baseGetTag.js';\nimport getPrototype from './_getPrototype.js';\nimport isObjectLike from './isObjectLike.js';\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nexport default isPlainObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isPlainObject.js\n// module id = 19\n// module chunks = 0 1 3","/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\n\nexport default function compose() {\n for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(undefined, arguments));\n };\n });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/compose.js\n// module id = 20\n// module chunks = 0 1 3","import isPlainObject from 'lodash-es/isPlainObject';\nimport $$observable from 'symbol-observable';\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nexport var ActionTypes = {\n INIT: '@@redux/INIT'\n\n /**\n * Creates a Redux store that holds the state tree.\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n};export default function createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error('Expected the enhancer to be a function.');\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error('Expected the reducer to be a function.');\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n function getState() {\n return currentState;\n }\n\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error('Expected listener to be a function.');\n }\n\n var isSubscribed = true;\n\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n };\n }\n\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error('Actions may not have an undefined \"type\" property. ' + 'Have you misspelled a constant?');\n }\n\n if (isDispatching) {\n throw new Error('Reducers may not dispatch actions.');\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error('Expected the nextReducer to be a function.');\n }\n\n currentReducer = nextReducer;\n dispatch({ type: ActionTypes.INIT });\n }\n\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object') {\n throw new TypeError('Expected the observer to be an object.');\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return { unsubscribe: unsubscribe };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n }\n\n // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n dispatch({ type: ActionTypes.INIT });\n\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/createStore.js\n// module id = 21\n// module chunks = 0 1 3","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = 23\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\nimport getRawTag from './_getRawTag.js';\nimport objectToString from './_objectToString.js';\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nexport default baseGetTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_baseGetTag.js\n// module id = 29\n// module chunks = 0 1 3","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nexport default freeGlobal;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_freeGlobal.js\n// module id = 30\n// module chunks = 0 1 3","import overArg from './_overArg.js';\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nexport default getPrototype;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getPrototype.js\n// module id = 31\n// module chunks = 0 1 3","import Symbol from './_Symbol.js';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nexport default getRawTag;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_getRawTag.js\n// module id = 32\n// module chunks = 0 1 3","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nexport default objectToString;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_objectToString.js\n// module id = 33\n// module chunks = 0 1 3","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nexport default overArg;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_overArg.js\n// module id = 34\n// module chunks = 0 1 3","import freeGlobal from './_freeGlobal.js';\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nexport default root;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/_root.js\n// module id = 35\n// module chunks = 0 1 3","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nexport default isObjectLike;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash-es/isObjectLike.js\n// module id = 36\n// module chunks = 0 1 3","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nimport compose from './compose';\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\nexport default function applyMiddleware() {\n for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function (reducer, preloadedState, enhancer) {\n var store = createStore(reducer, preloadedState, enhancer);\n var _dispatch = store.dispatch;\n var chain = [];\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch(action) {\n return _dispatch(action);\n }\n };\n chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(undefined, chain)(store.dispatch);\n\n return _extends({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/applyMiddleware.js\n// module id = 37\n// module chunks = 0 1 3","function bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(undefined, arguments));\n };\n}\n\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass a single function as the first argument,\n * and get a function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\nexport default function bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write \"import ActionCreators from\" instead of \"import * as ActionCreators from\"?');\n }\n\n var keys = Object.keys(actionCreators);\n var boundActionCreators = {};\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var actionCreator = actionCreators[key];\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n return boundActionCreators;\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/bindActionCreators.js\n// module id = 38\n// module chunks = 0 1 3","import { ActionTypes } from './createStore';\nimport isPlainObject from 'lodash-es/isPlainObject';\nimport warning from './utils/warning';\n\nfunction getUndefinedStateErrorMessage(key, action) {\n var actionType = action && action.type;\n var actionName = actionType && '\"' + actionType.toString() + '\"' || 'an action';\n\n return 'Given action ' + actionName + ', reducer \"' + key + '\" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state. ' + 'If you want this reducer to hold no value, you can return null instead of undefined.';\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return 'The ' + argumentName + ' has unexpected type of \"' + {}.toString.call(inputState).match(/\\s([a-z|A-Z]+)/)[1] + '\". Expected argument to be an object with the following ' + ('keys: \"' + reducerKeys.join('\", \"') + '\"');\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n\n if (unexpectedKeys.length > 0) {\n return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('\"' + unexpectedKeys.join('\", \"') + '\" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('\"' + reducerKeys.join('\", \"') + '\". Unexpected keys will be ignored.');\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, { type: ActionTypes.INIT });\n\n if (typeof initialState === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined. If you don\\'t want to set a value for this reducer, ' + 'you can use null instead of undefined.');\n }\n\n var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');\n if (typeof reducer(undefined, { type: type }) === 'undefined') {\n throw new Error('Reducer \"' + key + '\" returned undefined when probed with a random type. ' + ('Don\\'t try to handle ' + ActionTypes.INIT + ' or other actions in \"redux/*\" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined, but can be null.');\n }\n });\n}\n\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\nexport default function combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof reducers[key] === 'undefined') {\n warning('No reducer provided for key \"' + key + '\"');\n }\n }\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n var finalReducerKeys = Object.keys(finalReducers);\n\n var unexpectedKeyCache = void 0;\n if (process.env.NODE_ENV !== 'production') {\n unexpectedKeyCache = {};\n }\n\n var shapeAssertionError = void 0;\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var action = arguments[1];\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (process.env.NODE_ENV !== 'production') {\n var warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);\n if (warningMessage) {\n warning(warningMessage);\n }\n }\n\n var hasChanged = false;\n var nextState = {};\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n return hasChanged ? nextState : state;\n };\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/redux/es/combineReducers.js\n// module id = 39\n// module chunks = 0 1 3","module.exports = require('./lib/index');\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/index.js\n// module id = 40\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _ponyfill = require('./ponyfill');\n\nvar _ponyfill2 = _interopRequireDefault(_ponyfill);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar root; /* global window */\n\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (typeof module !== 'undefined') {\n root = module;\n} else {\n root = Function('return this')();\n}\n\nvar result = (0, _ponyfill2['default'])(root);\nexports['default'] = result;\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/index.js\n// module id = 41\n// module chunks = 0 1 3","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n\tvalue: true\n});\nexports['default'] = symbolObservablePonyfill;\nfunction symbolObservablePonyfill(root) {\n\tvar result;\n\tvar _Symbol = root.Symbol;\n\n\tif (typeof _Symbol === 'function') {\n\t\tif (_Symbol.observable) {\n\t\t\tresult = _Symbol.observable;\n\t\t} else {\n\t\t\tresult = _Symbol('observable');\n\t\t\t_Symbol.observable = result;\n\t\t}\n\t} else {\n\t\tresult = '@@observable';\n\t}\n\n\treturn result;\n};\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/symbol-observable/lib/ponyfill.js\n// module id = 42\n// module chunks = 0 1 3","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = 43\n// module chunks = 0 1 3","import * as actions from './reacttst_actions';\r\nimport Redux = require('redux');\r\n\r\n\r\nfunction oneDate(state = new Date(), action: {type: string, d: Date}) {\r\n if (action.type == actions.SET_ONE_DATE) {\r\n return action.d;\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\nlet start = new Date('12/31/2017');\r\nlet end = new Date('12/31/2017');\r\nstart.setDate(start.getDate() - 10);\r\n\r\nfunction twoDates(state = {start: start, end: end, version: 2}, action: {type: string, start: Date, end: Date, version: number}){\r\n if (action.type == actions.SET_TWO_DATES){\r\n return {\r\n start: action.start,\r\n end: action.end,\r\n version: action.version\r\n }\r\n } else {\r\n return state;\r\n }\r\n}\r\n\r\n\r\n\r\nexport const theStore = Redux.createStore(\r\n Redux.combineReducers({oneDate, twoDates})\r\n);\r\n\r\n\r\nexport interface iState {\r\n oneDate: Date;\r\n twoDates: {start: Date, end: Date, version: number}\r\n}\r\n\r\n\r\nexport function getState(): iState{\r\n return theStore.getState() as iState;\r\n}\r\n\r\nexport default theStore;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/reacttst_store.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/simple_map.js b/test/serve/js/simple_map.js index 49296ae0b83ca372036ae497a442e0094591c761..a4b84f7a3e6499db622fc7c55a6faa66d4de13b9 100644 --- a/test/serve/js/simple_map.js +++ b/test/serve/js/simple_map.js @@ -1,2629 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 78); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), - -/***/ 10: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var zoomResolutionConvert = __webpack_require__(17); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * The base layer class - * @abstract - */ -var LayerBase = (function () { - /** - * The base layer for all others - * @param {string} url - url for source - * @param {object} options - config - * @param {string} [options.id=makeGuid()] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] - the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] - the z index for the layer - * @param {function} [options.loadCallback] - function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend - */ - function LayerBase(url, options) { - if (options === void 0) { options = {}; } - options = options || {}; - if (typeof url !== 'string') { - throw 'Invalid URL'; - } - this._url = url; - this._params = typeof options.params == 'object' ? options.params : {}; - this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false; - this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true; - this.id = options.id || makeGuid_1.default(); - this._name = options.name || 'Unnamed Layer'; - this.animate = false; - this._opacity = typeof options.opacity == 'number' ? options.opacity : 1; - if (this._opacity > 1) { - this._opacity = 1; - } - else if (this._opacity < 0) { - this._opacity = 0; - } - this._visible = typeof options.visible === 'boolean' ? options.visible : true; - this._source = undefined; - /** - * - * @protected - */ - this._olLayer = undefined; - this._loaded = false; - this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom); - if (typeof this._maxResolution !== 'undefined') { - this._maxResolution += 0.00001; - } - this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom); - this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined; - this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined; - this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0; - this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () { - }; - this._legendContent = ''; - if (this._legendCheckbox) { - this._legendContent += "<input type=\"checkbox\" " + (this.visible ? 'checked' : '') + " " + - ("class=\"legend-check\" id=\"" + this.id + "-legend-layer-check\"><span></span>"); - this._legendContent += "<label for=\"" + this.id + "-legend-layer-check\" class=\"legend-layer-name\">" + this.name + "</label>"; - } - else { - this._legendContent += "<label class=\"legend-layer-name\">" + this.name + "</label>"; - } - this._$legendDiv = null; - this._applyCollapseCalled = false; - this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined); - } - /** - * base load function, sets _loaded = true if it is not already - * @protected - * @returns {boolean} if already loaded - */ - LayerBase.prototype._load = function () { - if (this.loaded == true) { - return true; - } - else { - this._loaded = true; - return false; - } - }; - /** - * Get the legend html, be sure to only add to the DOM once - * @returns {string} html for layer wrapped in a div - */ - LayerBase.prototype.getLegendDiv = function () { - return "<div class=\"legend-layer-div\" id=\"" + this.id + "-legend-layer-div\">" + this._legendContent + "</div>"; - }; - /** - * - * @param additionalContent - additional content to add to legend - * @private - */ - LayerBase.prototype._addLegendContent = function (additionalContent) { - if (additionalContent === void 0) { additionalContent = ''; } - var addCollapse = additionalContent.indexOf('<ul>') > -1; - if (addCollapse) { - additionalContent = '<span class="legend-items-expander" title="Expand/Collapse">▼</span>' + additionalContent; - } - this._legendContent += additionalContent; - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - this._$legendDiv.append(additionalContent); - this.applyCollapse(); - } - }; - /** - * add additional content to the legend - * @param {string} [additionalContent=] - additonal content to add - */ - LayerBase.prototype.addLegendContent = function (additionalContent) { - this._addLegendContent(additionalContent); - }; - LayerBase.prototype.applyCollapse = function () { - if (this._applyCollapseCalled) { - console.log('collapse already applied'); - return undefined; - } - this._$legendDiv = $("#" + this.id + "-legend-layer-div"); - if (this._$legendDiv.length > 0) { - var $expander = this._$legendDiv.find('.legend-items-expander'); - if ($expander.length > 0) { - this._applyCollapseCalled = true; - $expander.click(function () { - var $this = $(this); - $this.siblings('ul').slideToggle(); - if ($this.hasClass('legend-layer-group-collapsed')) { - $this.removeClass('legend-layer-group-collapsed'); - $this.html('▼'); - } - else { - $this.addClass('legend-layer-group-collapsed'); - $this.html('▶'); - } - }); - if (this._legendCollapse) { - $expander.trigger('click'); - } - } - } - }; - /** - * trick to refresh the layer - */ - LayerBase.prototype.refresh = function () { - if (this.source) { - this.source.refresh(); - } - }; - Object.defineProperty(LayerBase.prototype, "id", { - get: function () { - return this._id; - }, - set: function (newId) { - this._id = newId; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "animate", { - get: function () { - return this._animate; - }, - set: function (animate) { - this._animate = animate; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "legendContent", { - /** - * get the legend content - * @type {string} - */ - get: function () { - return this._legendContent; - }, - /** - * set the legend content directly - * @param {string} newVal - new content - * @protected - */ - set: function (newVal) { - this._legendContent = newVal; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "params", { - /** - * get the map get params - * @type {object} - */ - get: function () { - return this._params; - }, - /** - * set the map get params - * @param {object} newParams - new get params - * @protected - */ - set: function (newParams) { - this._params = newParams; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minResolution", { - /** - * get the minimum resolution - * @type {number|*} - */ - get: function () { - return this._minResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxResolution", { - /** - * get the maximum resolution - * @type {number|*} - */ - get: function () { - return this._maxResolution; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "minZoom", { - /** - * get min zoom - * @type {number|*} - */ - get: function () { - return this._minZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "maxZoom", { - /** - * get max zoom - * @type {number|*} - */ - get: function () { - return this._maxZoom; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "url", { - /** - * get the url - * @type {string} - */ - get: function () { - return this._url; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "visible", { - /** - * Get the layer visibility - * @type {boolean} - */ - get: function () { - return this._visible; - }, - /** - * set the visibility - * @param visibility - */ - set: function (visibility) { - this.setVisible(visibility); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setVisible = function (visibility) { - this._visible = visibility; - if (this.olLayer) { - this.olLayer.setVisible(this._visible); - if (visibility && !this._loaded) { - this._load(); - } - } - }; - Object.defineProperty(LayerBase.prototype, "opacity", { - /** - * Get the layer opacity - * @type {number} - */ - get: function () { - return this._opacity; - }, - /** - * Set the layer opacity - * @param {number} opacity - layer opacity - */ - set: function (opacity) { - this._opacity = opacity; - if (this.olLayer) { - this.olLayer.setOpacity(this._opacity); - } - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "name", { - /** - * Get the layer name - * @type {string} - */ - get: function () { - return this._name; - }, - /** - * set the layer name - * @param {string} newName - the new name - */ - set: function (newName) { - this._name = newName; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "loaded", { - /** - * Check if the layer is loaded - * @type {boolean} - */ - get: function () { - return this._loaded; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerBase.prototype, "source", { - /** - * get the layer source - * @type {*} - */ - get: function () { - return this.getSource(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getSource = function () { - return this._source; - }; - Object.defineProperty(LayerBase.prototype, "zIndex", { - /** - * get the z index - */ - get: function () { - return this._zIndex; - }, - /** - * set the z index - */ - set: function (newZ) { - this._zIndex = newZ; - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.setZIndex = function (newZ) { - }; - Object.defineProperty(LayerBase.prototype, "olLayer", { - /** - * the the ol layer - */ - get: function () { - return this.getOlLayer(); - }, - enumerable: true, - configurable: true - }); - LayerBase.prototype.getOlLayer = function () { - return this._olLayer; - }; - return LayerBase; -}()); -exports.LayerBase = LayerBase; -nm.LayerBase = LayerBase; -exports.default = LayerBase; - - -/***/ }), - -/***/ 11: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var $ = __webpack_require__(1); -var makeGuid_1 = __webpack_require__(3); -var ol = __webpack_require__(2); -var projections_1 = __webpack_require__(8); -var invalidClass = 'geocoder-invalid'; -var geocoderLoadingClass = 'geocoder-loading'; -// let testAddress = '65 7th Street, Prairie du Sac, WI'; -var Geocode = (function () { - function Geocode(mapDiv, map) { - var _this = this; - var inputGuid = makeGuid_1.makeGuid(); - var buttonGuid = makeGuid_1.makeGuid(); - this.map = map; - this.indicationLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: new ol.style.Style({ - image: new ol.style.Circle({ - radius: 12, - fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }), - stroke: new ol.style.Stroke({ color: 'red', width: 1 }) - }) - }) - }); - this.map.addLayer(this.indicationLayer); - $(mapDiv).append('<div class="geocoder-el">' + - ("<input type=\"text\" id=\"" + inputGuid + "\">") + - ("<button id=\"" + buttonGuid + "\">Search</button>") + - '</div>'); - this.theButton = document.getElementById(buttonGuid); - this.theInput = document.getElementById(inputGuid); - this.reset(); - var $theButton = $(this.theButton); - var $theInput = $(this.theInput); - $theButton.click(function (evt) { - evt.preventDefault(); - $theButton.addClass(geocoderLoadingClass); - _this.theButton.disabled = true; - _this.indicationLayer.getSource().clear(); - $.get("https://geocode.xyz/" + _this.theInput.value + "?geoit=json", {}, function (d) { - var lat = parseFloat(d['latt']); - var lon = parseFloat(d['longt']); - if ((lat == 0 && lon == 0) || d['error']) { - $theInput.addClass(invalidClass); - _this.theInput.title = 'Specified Location Invalid'; - _this.theButton.title = 'Specified Location Invalid'; - } - else { - var v = _this.map.getView(); - var p = new ol.geom.Point([lon, lat]); - var feat = new ol.Feature(p); - _this.indicationLayer.getSource().addFeature(feat); - p.transform(projections_1.proj4326, projections_1.proj3857); - v.setCenter(p.getCoordinates()); - v.setZoom(13); - } - $theButton.removeClass(geocoderLoadingClass); - _this.theButton.disabled = false; - }, 'json'); - }); - $(this.theInput).keyup(function (evt) { - evt.preventDefault(); - _this.theButton.disabled = _this.theInput.value.length == 0; - $theInput.removeClass(invalidClass); - _this.theInput.title = ''; - _this.theButton.title = ''; - if (!_this.theButton.disabled && evt.keyCode == 13) { - $theButton.click(); - } - }); - } - Geocode.prototype.reset = function () { - this.theButton.disabled = true; - this.theInput.value = ''; - }; - return Geocode; -}()); -exports.Geocode = Geocode; - - -/***/ }), - -/***/ 12: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var checkDefined = __webpack_require__(9); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -/** - * assists with map move interactions, trigger callback functions - * @augments MapInteractionBase - */ -var MapMoveCls = (function (_super) { - __extends(MapMoveCls, _super); - /** - * constructor called implicitly - */ - function MapMoveCls() { - var _this = _super.call(this, 'map move') || this; - _this._arrLyrRequest = []; - _this._arrLyrTimeout = []; - _this._arrLayer = []; - _this._lookupLayer = {}; - _this._mapMoveCallbacks = []; - _this._mapMoveCallbacksLookup = {}; - _this._mapMoveCallbackDelays = []; - _this._mapMoveCallbackContext = []; - _this._mapMoveCallbackTimeout = []; - _this._mapExtent = undefined; - _this._zoomLevel = undefined; - return _this; - } - /** - * initialize the map move object - * @param theMap - the ol map - */ - MapMoveCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - this.map.getView().on(['change:center', 'change:resolution'], function (e) { - _this._updateMapExtent(); - // trigger the layer updates - for (var i = 0; i < _this._arrLayer.length; i++) { - _this.triggerLyrLoad(_this._arrLayer[i], i, e.type); - } - // trigger the map callbacks - for (var i = 0; i < _this._mapMoveCallbacks.length; i++) { - _this.triggerMoveCallback(i, e.type); - } - }); - }; - MapMoveCls.prototype._updateMapExtent = function () { - var theView = this.map.getView(); - this._zoomLevel = theView.getZoom(); - var extentArray = theView.calculateExtent(this.map.getSize()); - this._mapExtent = { - minX: extentArray[0], - minY: extentArray[1], - maxX: extentArray[2], - maxY: extentArray[3] - }; - }; - Object.defineProperty(MapMoveCls.prototype, "mapExtent", { - /** - * return the map extent - */ - get: function () { - if (!this._mapExtent) { - this._updateMapExtent(); - } - return this._mapExtent; - }, - enumerable: true, - configurable: true - }); - /** - * Trigger the layer load - * @param lyr the layer being acted on - * @param index index of the layer - * @param eventType the event triggering the load, as 'change:center' or 'change:resolution' - */ - MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) { - if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) { - throw 'need to define lyr or index'; - } - else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) { - index = this._arrLayer.indexOf(lyr); - } - else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) { - lyr = this._arrLayer[index]; - } - // clear the timeout - if (this._arrLyrTimeout[index] != null) { - clearTimeout(this._arrLyrTimeout[index]); - this._arrLyrTimeout[index] = null; - } - // abort if necessary and clear the request - if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) { - this._arrLyrRequest[index].abort(); - this._arrLyrRequest[index] = null; - } - // dummy callback used if before load returns false - var callbackFunc = function () { }; - if (lyr.mapMoveBefore(this._zoomLevel, eventType)) { - lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel); - var __this_1 = this; - callbackFunc = function () { - function innerFunction(theLayer, theIndex) { - var _innerThis = this; - this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) { - /** - * @type {LayerBaseVector} - */ - theLayer.mapMoveCallback(d); - theLayer.loadCallback(); - }, 'json').fail(function (jqXHR) { - if (jqXHR.statusText != 'abort') { - console.log('failed'); - console.log(theLayer.url); - console.log(theLayer.mapMoveParams); - } - }).always(function () { - _innerThis._arrLyrTimeout[theIndex] = null; - _innerThis._arrLyrRequest[theIndex] = null; - }); - } - innerFunction.call(__this_1, lyr, index); - }; - } - else { - lyr.clear(); - } - this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay); - }; - /** - * trigger the map move call back at the given index - * @param ind - the index of the layer - * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution' - * @param functionId=undefined the function id used to reference the added callback function - */ - MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) { - if (typeof ind == 'undefined' && typeof functionId == 'undefined') { - throw 'either the function index or the id must be defined'; - } - if (typeof ind !== 'number') { - ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]); - } - if (ind < 0) { - console.log('function not found'); - return; - } - // clear the timeout - if (this._mapMoveCallbackTimeout[ind] != null) { - clearTimeout(this._mapMoveCallbackTimeout[ind]); - this._mapMoveCallbackTimeout[ind] = null; - } - var ctx = this._mapMoveCallbackContext[ind]; - var theFunc = this._mapMoveCallbacks[ind]; - var __this = this; - var f = function () { - if (ctx !== null) { - theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType); - } - else { - theFunc(__this._mapExtent, __this._zoomLevel, eventType); - } - }; - this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]); - }; - /** - * Add a layer to the interaction - * @param lyr - layer to add - * @param triggerOnAdd - if the layer should be loaded on add - */ - MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) { - if (triggerOnAdd === void 0) { triggerOnAdd = true; } - if (this._arrLayer.indexOf(lyr) > -1) { - console.log('already added ' + lyr.name + ' to map move'); - return; - } - this._checkInit(); - this._arrLyrRequest.push(null); - this._arrLyrTimeout.push(null); - this._arrLayer.push(lyr); - this._lookupLayer[lyr.id] = lyr; - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerLyrLoad(lyr, this._arrLayer.length - 1); - } - }; - /** - * add a callback to the map move event - * @param func - callback function - * @param context - the context to use for this function - * @param delay=50 the delay before call load - * @param triggerOnAdd if the layer should be loaded on add to mapMove - * @param functionId optional id to reference the function later for outside triggering - */ - MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) { - if (this._mapMoveCallbacks.indexOf(func) > -1) { - console.log('this function already added to map move'); - return; - } - this._checkInit(); - if (!functionId) { - functionId = makeGuid_1.default(); - } - this._mapMoveCallbacks.push(func); - this._mapMoveCallbacksLookup[functionId] = func; - this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50); - this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null); - this._mapMoveCallbackTimeout.push(null); - triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true; - if (triggerOnAdd) { - if (this._mapExtent === undefined) { - this._updateMapExtent(); - } - this.triggerMoveCallback(this._mapMoveCallbacks.length - 1); - } - }; - return MapMoveCls; -}(mapInteractionBase_1.default)); -exports.MapMoveCls = MapMoveCls; -nm.MapMoveCls = MapMoveCls; -exports.default = MapMoveCls; - - -/***/ }), - -/***/ 13: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -var mapInteractionBase_1 = __webpack_require__(4); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('olHelpers'); -var FeatureLayerProperties = (function () { - /** - * - * @param feature the feature - * @param layer - the layer in the popup - * @param layerIndex - index of the layer - * @param selectionLayer - the ol selection layer - * @param [esriLayerName=undefined] - esri layer name - */ - function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) { - this.feature = feature; - this.layer = layer; - this.layerIndex = layerIndex; - this.selectionLayer = selectionLayer; - this.popupContent = ''; - this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined; - } - Object.defineProperty(FeatureLayerProperties.prototype, "layerName", { - get: function () { - if (typeof this.esriLayerName == 'string') { - return this.esriLayerName; - } - else { - return this.layer.name; - } - }, - enumerable: true, - configurable: true - }); - return FeatureLayerProperties; -}()); -exports.FeatureLayerProperties = FeatureLayerProperties; -/** - * map popup class - * @augments MapInteractionBase - */ -var MapPopupCls = (function (_super) { - __extends(MapPopupCls, _super); - /** - * Definition for openlayers style function - * @callback olStyleFunction - * ¶m feature the openlayers vector feature - * $param - */ - /** - * map popup constructor - */ - function MapPopupCls() { - var _this = _super.call(this, 'map popup') || this; - _this._arrPopupLayerIds = []; - _this._arrPopupLayers = []; - // this._arrPopupOlLayers = []; - _this._arrPopupContentFunction = []; - _this._$popupContainer = undefined; - _this._$popupContent = undefined; - _this._$popupCloser = undefined; - _this._popupOverlay = undefined; - _this._selectionLayers = []; - _this._selectionLayerLookup = {}; - _this._mapClickFunctions = []; - //let a = function($jqueryContent){console.log($jqueryContent)}; - //this._popupChangedLookup = {'a': a}; - _this._popupChangedFunctions = []; - _this._esriMapServiceLayers = []; - _this._popupOpen = false; - _this._popupCoordinate = null; - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - _this._popupContentLength = 0; - return _this; - } - /** - * map popup initialization - * @param {ol.Map} theMap - the ol map - */ - MapPopupCls.prototype.init = function (theMap) { - var _this = this; - _super.prototype.init.call(this, theMap); - var $map; - var target = this.map.getTarget(); - if (typeof target == 'string') { - $map = $('#' + target); - } - else { - $map = $(target); - } - $map.append('<div class="ol-popup">' + - '<span class="ol-popup-closer">X</span>' + - '<div class="popup-content"></div>' + - '</div>'); - this._$popupContainer = $map.find('.ol-popup'); - this._$popupContent = $map.find('.popup-content'); - this._$popupCloser = $map.find('.ol-popup-closer'); - var _ease = function (n) { - return ol.easing.inAndOut(n); - }; - this._popupOverlay = new ol.Overlay({ - element: this._$popupContainer[0], - autoPan: true, - autoPanAnimation: { - duration: 250, - source: theMap.getView().getCenter(), - easing: _ease - } - }); - this._map.addOverlay(this._popupOverlay); - this._$popupCloser.click(function (evt) { - _this.closePopup(); - }); - // display popup on click - this._map.on('singleclick', function (evt) { - _this.closePopup(); - _this._popupCoordinate = evt['coordinate']; - // esri map service layers - if (_this._esriMapServiceLayers.length > 0) { - var queryParams = { - geometry: evt['coordinate'].join(','), - geometryType: 'esriGeometryPoint', - layers: 'all', - sr: _this._map.getView().getProjection().getCode().split(':')[1], - mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','), - imageDisplay: _this._map.getSize().join(',') + ',96', - returnGeometry: true, - tolerance: 15, - f: 'pjson' - }; - for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) { - var l = _a[_i]; - l.getPopupInfo(queryParams); - } - } - var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']); - _this._passThroughLayerFeatureArray = []; - _this._currentPopupIndex = -1; - for (var i = 0; i < layerFeatureObjectArray.length; i++) { - var featObj = layerFeatureObjectArray[i]; - var props = featObj.feature.getProperties(); - var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent); - //skip if return was false - if (popupContentResponse === false) { - //continue; - } - else if (typeof popupContentResponse == 'string') { - featObj.popupContent = popupContentResponse; - _this._passThroughLayerFeatureArray.push(featObj); - } - else { - featObj.selectionLayer.getSource().addFeature(featObj.feature); - } - } - _this._popupContentLength = _this._passThroughLayerFeatureArray.length; - _this._currentPopupIndex = -1; - var popupHtml = '<div class="ol-popup-nav">'; - popupHtml += '<span class="previous-popup ol-popup-nav-arrow">◀</span>'; - popupHtml += '<span class="next-popup ol-popup-nav-arrow">▶</span>'; - popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>"; - popupHtml += "<span> of </span>"; - popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>"; - popupHtml += "<span> - </span>"; - popupHtml += "<span class=\"current-popup-layer-name\"></span>"; - popupHtml += '</div>'; - popupHtml += '<div class="ol-popup-inner">'; - popupHtml += '</div>'; - _this._$popupContent.html(popupHtml); - _this._$popupContent.find('.previous-popup').click(function () { - if (_this._popupContentLength == 1) { - return; - } - if (_this._currentPopupIndex == 0) { - _this._currentPopupIndex = _this._popupContentLength - 1; - } - else { - _this._currentPopupIndex--; - } - _this._triggerFeatSelect(); - }); - var nextPopup = _this._$popupContent.find('.next-popup'); - nextPopup.click(function () { - if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) { - return; - } - if (_this._currentPopupIndex == _this._popupContentLength - 1) { - _this._currentPopupIndex = 0; - } - else { - _this._currentPopupIndex++; - } - _this._triggerFeatSelect(); - }); - if (_this._popupContentLength > 0) { - nextPopup.trigger('click'); - _this._popupOverlay.setPosition(_this._popupCoordinate); - _this._$popupContent.scrollTop(0); - _this._popupOpen = true; - } - }); - //change mouse cursor when over marker - this._map.on('pointermove', function (evt) { - if (evt['dragging']) { - return; - } - var pixel = _this.map.getEventPixel(evt['originalEvent']); - var hit = false; - _this.map.forEachLayerAtPixel(pixel, function (lyr) { - if (hit) { - return; - } - for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) { - var vLyr = _a[_i]; - if (vLyr.olLayer == lyr) { - hit = true; - break; - } - } - }); - var mapElement = _this.map.getTargetElement(); - mapElement.style.cursor = hit ? 'pointer' : ''; - }); - }; - /** - * helper to select features - * @private - */ - MapPopupCls.prototype._triggerFeatSelect = function () { - var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number'); - var $innerPopup = this._$popupContent.find('.ol-popup-inner'); - var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name'); - this.clearSelection(); - var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex]; - $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed()); - $layerNameSpan.html(lyrFeatObj.layerName); - $innerPopup.html(lyrFeatObj.popupContent); - lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature); - for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(this._$popupContent); - } - }; - /** - * - * @param feature - the ol feature - * @param {LayerEsriMapServer} lyr - the map server layer - * @param {string} popupContent - popup content - * @param {string} esriName - esri layer name - */ - MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) { - var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName); - featLayerObject.popupContent = popupContent; - this._passThroughLayerFeatureArray.push(featLayerObject); - this._popupContentLength++; - $('.popup-content-length').html(this._popupContentLength.toFixed()); - if (!this._popupOpen) { - this._$popupContent.find('.next-popup').trigger('click'); - this._popupOverlay.setPosition(this._popupCoordinate); - this._$popupContent.scrollTop(0); - this._popupOpen = true; - } - }; - /** - * - * @param pixel - the ol pixel - * @returns feature layer properties - * @private - */ - MapPopupCls.prototype._featuresAtPixel = function (pixel) { - var _this = this; - var layerFeatureObjectArray = []; - this.map.forEachFeatureAtPixel(pixel, function (feature, layer) { - var hasLyr = false; - var j; - var lyr = null; - for (j = 0; j < _this._arrPopupLayers.length; j++) { - lyr = _this._arrPopupLayers[j]; - if (lyr.olLayer === layer) { - hasLyr = true; - break; - } - } - if (hasLyr) { - layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j])); - } - }); - return layerFeatureObjectArray; - }; - MapPopupCls.prototype.closePopup = function () { - this._checkInit(); - this._popupOpen = false; - this._popupOverlay.setPosition(undefined); - this._$popupCloser[0].blur(); - this.clearSelection(); - this._$popupContent.html(''); - return false; - }; - ; - /** - * - * @param chgFunction - popup change function - */ - MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) { - this._popupChangedFunctions.push(chgFunction); - }; - /** - * - * @param {LayerBase|*} lyr - the layer being acted on - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns the new selection layer - * @private - */ - MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) { - this._checkInit(); - selectionStyle = selectionStyle || {}; - selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)'; - selectionStyle.width = selectionStyle.width || 10; - var theStyle; - if (selectionStyle.olStyle) { - theStyle = selectionStyle.olStyle; - } - else { - theStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: selectionStyle.color, - width: selectionStyle.width - }), - image: new ol.style.Circle({ - radius: 7, - fill: new ol.style.Fill({ color: selectionStyle.color }), - stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 }) - }), - fill: new ol.style.Fill({ - color: selectionStyle.color - }) - }); - } - var selectionLayer = new ol.layer.Vector({ - source: new ol.source.Vector(), - style: theStyle - }); - selectionLayer.setZIndex(100); - this._selectionLayers.push(selectionLayer); - this._selectionLayerLookup[lyr.id] = selectionLayer; - this.map.addLayer(selectionLayer); - return selectionLayer; - }; - /** - * Add popup to the map - * @param {LayerBase|*} lyr The layer that the popup with act on - * @param {popupCallback} popupContentFunction - popup content function that makes popup info - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._arrPopupLayerIds.push(lyr.id); - this._arrPopupLayers.push(lyr); - // this._arrPopupOlLayers.push(lyr.olLayer); - this._arrPopupContentFunction.push(popupContentFunction); - return selectionLayer; - }; - ; - /** - * - * @param {LayerBase} lyr - layer - */ - MapPopupCls.prototype.removeVectorPopup = function (lyr) { - var idx = this._arrPopupLayerIds.indexOf(lyr.id); - if (idx > -1) { - this._arrPopupLayerIds.splice(idx, 1); - this._arrPopupLayers.splice(idx, 1); - // this._arrPopupOlLayers.splice(idx, 1); - this._arrPopupContentFunction.splice(idx, 1); - this._selectionLayers.splice(idx, 1); - delete this._selectionLayerLookup[lyr.id]; - } - }; - /** - * - * @param {LayerEsriMapServer} lyr - map server layer - * @param {object} [selectionStyle={}] the selection style configuration - * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color - * @param {number} [selectionStyle.width=10] the selection width for linear features - * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function - * @returns {object} a reference to the ol selection layer - */ - MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) { - var selectionLayer = this._addPopupLayer(lyr, selectionStyle); - this._esriMapServiceLayers.push(lyr); - return selectionLayer; - }; - MapPopupCls.prototype.clearSelection = function () { - this._checkInit(); - for (var i = 0; i < this._selectionLayers.length; i++) { - this._selectionLayers[i].getSource().clear(); - } - for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) { - var f = _a[_i]; - f(); - } - }; - ; - /** - * Add a function to be called when the map is clicked but before any popups are implemented - * @param {function} func - the map click function - */ - MapPopupCls.prototype.addMapClickFunction = function (func) { - this._mapClickFunctions.push(func); - }; - return MapPopupCls; -}(mapInteractionBase_1.default)); -exports.MapPopupCls = MapPopupCls; -nm.MapPopupCls = MapPopupCls; -exports.default = MapPopupCls; - - -/***/ }), - -/***/ 14: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var geocode_1 = __webpack_require__(11); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param [options={}] config options - * @param [options.divId=map] map div id - * @param [options.center={}] center config object - * @param [options.center.x=-10018378] center x, web mercator x or lon - * @param [options.center.y=5574910] center y, web mercator y or lat - * @param [options.zoom=7] zoom level - * @param [options.minZoom=undefined] min zoom - * @param [options.maxZoom=undefined] max zoom - * @param [options.baseSwitcher=true] if add base map switcher - * @param [options.fullScreen=false] if add base map switcher - * @returns the ol map - */ -function quickMapBase(options) { - if (options === void 0) { options = {}; } - options.divId = options.divId || 'map'; - options.center = options.center || { x: -10018378, y: 5574910 }; - options.zoom = typeof options.zoom == 'number' ? options.zoom : 7; - options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true; - options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false; - options.addGeocode = options.addGeocode || false; - var $mapDiv = $('#' + options.divId); - $mapDiv.css('position', 'relative'); - var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() }); - // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})}); - var osmCss = "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRT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LhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl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oVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')"; - if (options.baseSwitcher) { - // let switcherContent = '<div class="base-map-switcher" title="Toggle Base Layer" style="'; - // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; '; - // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`; - // switcherContent += '"></div>'; - // $mapDiv.append(switcherContent); - // - // $mapDiv.find('.base-map-switcher').click(function() { - // "use strict"; - // osmLayer.setVisible(!osmLayer.getVisible()); - // satLayer.setVisible(!satLayer.getVisible()); - // - // if (osmLayer.getVisible()){ - // $(this).css('background', aerialCss); - // } else { - // $(this).css('background', osmCss); - // } - // }); - } - if (options.zoom < 0 || options.zoom > 28) { - throw 'zoom out of range'; - } - if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) { - var p = new ol.geom.Point([options.center.x, options.center.y]); - new ol.proj.Projection({ code: "EPSG:4326" }); - p.transform(new ol.proj.Projection({ code: "EPSG:4326" }), new ol.proj.Projection({ code: "EPSG:3857" })); - var coordinates = p.getCoordinates(); - options.center.x = coordinates[0]; - options.center.y = coordinates[1]; - } - var controls = ol.control.defaults({ - attributionOptions: { collapsible: false } - }); - var view = new ol.View({ - center: [options.center.x, options.center.y], - zoom: options.zoom, - minZoom: options.minZoom, - maxZoom: options.maxZoom - }); - var map = new ol.Map({ - layers: [osmLayer], - target: options.divId, - controls: controls, - view: view - }); - if (options.fullScreen) { - map.addControl(new ol.control.FullScreen({})); - } - if (options.addGeocode) { - new geocode_1.Geocode(document.getElementById(options.divId), map); - } - return map; -} -exports.quickMapBase = quickMapBase; -nm.quickMapBase = quickMapBase; -exports.default = quickMapBase; - - -/***/ }), - -/***/ 17: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/14/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers.zoomResolutionConvert'); -var _zoomResLookup = [ - 156543.03392804097, - 78271.51696402048, - 39135.75848201024, - 19567.87924100512, - 9783.93962050256, - 4891.96981025128, - 2445.98490512564, - 1222.99245256282, - 611.49622628141, - 305.748113140705, - 152.8740565703525, - 76.43702828517625, - 38.21851414258813, - 19.109257071294063, - 9.554628535647032, - 4.777314267823516, - 2.388657133911758, - 1.194328566955879, - 0.5971642834779395, - 0.29858214173896974, - 0.14929107086948487, - 0.07464553543474244, - 0.03732276771737122, - 0.01866138385868561, - 0.009330691929342804, - 0.004665345964671402, - 0.002332672982335701, - 0.0011663364911678506, - 0.0005831682455839253 //28 -]; -/** - * Get the resolution given the zoom level - * @param {number} zoomLevel - the zoom level - * @returns {number|*} the map resolution - */ -function zoomToResolution(zoomLevel) { - "use strict"; - if (typeof zoomLevel == 'number') { - if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) { - return _zoomResLookup[zoomLevel]; - } - else { - console.log("invalid zoom level provided: " + zoomLevel); - return undefined; - } - } - else { - return undefined; - } -} -exports.zoomToResolution = zoomToResolution; -nm.zoomToResolution = zoomToResolution; -/** - * Get resolution from the zoom level - * @param {number} resolution - the resolution - * @returns {number|*} the zoom level - */ -function resolutionToZoom(resolution) { - for (var i = 0; i < _zoomResLookup.length; i++) { - if (resolution >= _zoomResLookup[i]) { - return i; - } - } - return 0; -} -exports.resolutionToZoom = resolutionToZoom; -nm.resolutionToZoom = resolutionToZoom; - - -/***/ }), - -/***/ 2: -/***/ (function(module, exports) { - -module.exports = ol; - -/***/ }), - -/***/ 26: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/7/2015. - */ -var LayerBase_1 = __webpack_require__(10); -var esriToOl = __webpack_require__(28); -var mapPopup_1 = __webpack_require__(7); -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var $ = __webpack_require__(1); -var nm = provide_1.default('layers'); -/** - * Helper to return the url to the service on the production server - * @param {string} folder - * @param {string} service - * @returns {string} - */ -function makeServiceUrl(folder, service) { - return "https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/" + folder + "/" + service + "/MapServer"; -} -exports.makeServiceUrl = makeServiceUrl; -function localCacheUrl(folder, service) { - var loc = window.location.href; - var url = "/mapserver/" + folder + "/" + service; - if (loc.indexOf('transportal.cee.wisc.edu') > -1) { - if (loc.toLowerCase().indexOf('webmapsstage') > -1) { - url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url; - } - else { - url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url; - } - } - return url; -} -exports.localCacheUrl = localCacheUrl; -/** - * esri mapserver layer - * @augments LayerBase - */ -var LayerEsriMapServer = (function (_super) { - __extends(LayerEsriMapServer, _super); - /** - * The base layer for all others - * @param {string} url - resource url - * @param {object} [options] - config - * @param {string} [options.id] - layer id - * @param {string} [options.name=Unnamed Layer] - layer name - * @param {number} [options.opacity=1] - opacity - * @param {boolean} [options.visible=true] - default visible - * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28 - * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28 - * @param {object} [options.params={}] the get parameters to include to retrieve the layer - * @param {number} [options.zIndex=0] the z index for the layer - * @param {function} [options.loadCallback] function to call on load, context this is the layer object - * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed - * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility - * @param {boolean} [options.legendContent] additional content to add to the legend - * @param {boolean} [options.addPopup=false] if a popup should be added - * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added - */ - function LayerEsriMapServer(url, options) { - if (options === void 0) { options = {}; } - var _this = _super.call(this, url, options) || this; - _this._source = new ol.source.TileArcGISRest({ - url: _this.url == '' ? undefined : _this.url, - params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') } - }); - _this._showLayers = options.showLayers || []; - _this._olLayer = new ol.layer.Tile({ - source: _this._source, - visible: _this.visible, - opacity: _this.opacity, - minResolution: _this._minResolution, - maxResolution: _this._maxResolution - }); - _this._olLayer.setZIndex(_this._zIndex); - options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false; - _this._esriFormat = new ol.format.EsriJSON(); - _this._popupRequest = null; - options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true; - if (options.getLegend) { - _this.addLegendContent(); - } - if (options.addPopup) { - mapPopup_1.default.addMapServicePopup(_this); - } - return _this; - } - /** - * add additional content to the legend - * @param {string} [additionalContent=''] additional content for legend - */ - LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) { - var _this = this; - var urlCopy = this.url; - if (urlCopy[urlCopy.length - 1] !== '/') { - urlCopy += '/'; - } - urlCopy += 'legend?f=pjson&callback=?'; - $.get(urlCopy, {}, function (d) { - var newHtml = esriToOl.makeMapServiceLegend(d, _this._showLayers); - _super.prototype.addLegendContent.call(_this, newHtml); - }, 'json'); - }; - LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) { - if (!this.visible) { - return; - } - var urlCopy = this.url; - if (urlCopy[urlCopy.length - 1] != '/') { - urlCopy += '/'; - } - urlCopy += 'identify?callback=?'; - var __this = this; - if (this._popupRequest != null) { - this._popupRequest.abort(); - } - this._popupRequest = $.get(urlCopy, queryParams, function (d) { - for (var _i = 0, _a = d['results']; _i < _a.length; _i++) { - var r = _a[_i]; - var popupHtml = '<table class="esri-popup-table">'; - for (var a in r['attributes']) { - if (r['attributes'].hasOwnProperty(a)) { - var attrVal = r['attributes'][a]; - if (attrVal == null || attrVal.toString().toLowerCase() == 'null') { - continue; - } - var attr = a; - if (attr.length > 14) { - attr = attr.slice(0, 11) + '...'; - } - popupHtml += "<tr><td>" + attr + "</td><td>" + attrVal + "</td></tr>"; - } - } - popupHtml += '</table>'; - mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']); - } - }, 'json'); - this._popupRequest.always(function () { - __this._popupRequest = null; - }); - }; - Object.defineProperty(LayerEsriMapServer.prototype, "source", { - /** - * - * @returns {ol.source.TileArcGISRest} the vector source - */ - get: function () { - return _super.prototype.getSource.call(this); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(LayerEsriMapServer.prototype, "olLayer", { - /** - * - * @returns the ol layer - */ - get: function () { - return _super.prototype.getOlLayer.call(this); - }, - enumerable: true, - configurable: true - }); - return LayerEsriMapServer; -}(LayerBase_1.LayerBase)); -exports.LayerEsriMapServer = LayerEsriMapServer; -nm.LayerEsriMapServer = LayerEsriMapServer; -exports.default = LayerEsriMapServer; - - -/***/ }), - -/***/ 28: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var __extends = (this && this.__extends) || (function () { - var extendStatics = Object.setPrototypeOf || - ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || - function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; - return function (d, b) { - extendStatics(d, b); - function __() { this.constructor = d; } - d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); - }; -})(); -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 1/4/2016. - */ -var provide_1 = __webpack_require__(0); -var ol = __webpack_require__(2); -var nm = provide_1.default('olHelpers.esriToOlStyle'); -/** - * - * @param {Array<number>} colorArray - input color array - * @param {number} opacity - the opacity 0 to 1 - * @returns {string} rgba string - * @private - */ -function _colorArrayToRgba(colorArray, opacity) { - "use strict"; - return "rgba(" + colorArray[0] + "," + colorArray[1] + "," + colorArray[2] + "," + opacity + ")"; -} -/** - * escape html charcters - * @param {string} str - input string - * @returns {string} escaped string - */ -function htmlEscape(str) { - return String(str) - .replace(/&/g, '&') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/</g, '<') - .replace(/>/g, '>'); -} -nm.htmlEscape = htmlEscape; -var CommonSymbol = (function () { - /** - * - * @param symbolObj - * @param {number} opacity - */ - function CommonSymbol(symbolObj, opacity) { - this.symbolObj = symbolObj; - this.opacity = opacity; - this.olStyle = undefined; - this.legendHtml = ''; - } - return CommonSymbol; -}()); -var PointSymbol = (function (_super) { - __extends(PointSymbol, _super); - function PointSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj.type) { - case 'esriSMS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity); - var outlineWidth = _this.symbolObj.outline.width; - var radius = _this.symbolObj.size; - _this.olStyle = new ol.style.Style({ - image: new ol.style.Circle({ - radius: radius, - fill: new ol.style.Fill({ - color: innerColor - }), - stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth }) - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" style=\"color: " + innerColor + "\">●</span>"; - break; - case 'esriPMS': - _this.olStyle = new ol.style.Style({ - image: new ol.style.Icon({ src: "data:image/png;base64," + _this.symbolObj['imageData'] }) - }); - _this.legendHtml = "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + _this.symbolObj['imageData'] + "\">"; - break; - default: - console.log(_this.symbolObj); - alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return PointSymbol; -}(CommonSymbol)); -var LineSymbol = (function (_super) { - __extends(LineSymbol, _super); - function LineSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj.type) { - case 'esriSLS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var lineWidth = _this.symbolObj.width; - _this.olStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: innerColor, - //lineDash: [4], - width: lineWidth - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" "; - _this.legendHtml += "style=\""; - _this.legendHtml += "background-color: " + innerColor + ";"; - _this.legendHtml += "width: 40px;"; - _this.legendHtml += "height: 4px;"; - _this.legendHtml += "position: relative;"; - _this.legendHtml += "display: inline-block;"; - _this.legendHtml += "top: -1px;"; - _this.legendHtml += "\"></span>"; - break; - default: - console.log(_this.symbolObj); - alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return LineSymbol; -}(CommonSymbol)); -var PolygonSymbol = (function (_super) { - __extends(PolygonSymbol, _super); - function PolygonSymbol(symbolObj, opacity) { - var _this = _super.call(this, symbolObj, opacity) || this; - switch (_this.symbolObj['type']) { - case 'esriSFS': - var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity); - var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity); - var outlineWidth = _this.symbolObj.outline.width; - _this.olStyle = new ol.style.Style({ - stroke: new ol.style.Stroke({ - color: outerColor, - //lineDash: [4], - width: outlineWidth - }), - fill: new ol.style.Fill({ - color: innerColor - }) - }); - _this.legendHtml = "<span class=\"legend-layer-icon\" "; - _this.legendHtml += "style=\""; - _this.legendHtml += "background-color: " + innerColor + ";"; - _this.legendHtml += "border: solid " + outerColor + " 1px;"; - _this.legendHtml += "width: 40px;"; - _this.legendHtml += "height: 9px;"; - _this.legendHtml += "position: relative;"; - _this.legendHtml += "display: inline-block;"; - _this.legendHtml += "top: 2px;"; - _this.legendHtml += "\"></span>"; - break; - default: - console.log(_this.symbolObj); - alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']); - } - return _this; - } - return PolygonSymbol; -}(CommonSymbol)); -var SymbolGenerator = (function () { - function SymbolGenerator(esriResponse) { - this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100; - this.renderer = esriResponse.drawingInfo.renderer; - this.olStyle = undefined; - this.legendHtml = ''; - } - return SymbolGenerator; -}()); -var SingleSymbol = (function (_super) { - __extends(SingleSymbol, _super); - /** - * - * @param {object} esriResponse - layer info - * @param SymbolClass - the symbol class to use - */ - function SingleSymbol(esriResponse, SymbolClass) { - var _this = _super.call(this, esriResponse) || this; - _this.symbol = _this.renderer.symbol; - var symbolObj = new SymbolClass(_this.symbol, _this.opacity); - _this.olStyle = symbolObj.olStyle; - _this.legendHtml = symbolObj.legendHtml; - return _this; - } - return SingleSymbol; -}(SymbolGenerator)); -var UniqueValueSymbol = (function (_super) { - __extends(UniqueValueSymbol, _super); - /** - * - * @param {object} esriResponse - layer info - * @param SymbolClass - the Symbol class definition - */ - function UniqueValueSymbol(esriResponse, SymbolClass) { - var _this = _super.call(this, esriResponse) || this; - _this.uniqueValueInfos = _this.renderer.uniqueValueInfos; - _this.propertyName = _this.renderer.field1; - _this.defaultSymbol = _this.renderer.defaultSymbol; - if (_this.defaultSymbol) { - var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity); - _this.defaultStyle = symbolObj.olStyle; - _this.defaultLabelHtml = "<span class=\"legend-layer-subitem\">" + htmlEscape(_this.renderer['defaultLabel']) + "</span>" + symbolObj.legendHtml; - } - else { - _this.defaultStyle = undefined; - _this.defaultLabelHtml = 'other'; - } - _this.valueArray = []; - _this.labelArray = []; - _this.legendArray = []; - _this.propertyStyleLookup = {}; - for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) { - var uniqueVal = _a[_i]; - _this.labelArray.push(uniqueVal['label']); - _this.valueArray.push(uniqueVal['value']); - var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity); - _this.legendArray.push("<span class=\"legend-layer-subitem\">" + htmlEscape(uniqueVal['label']) + "</span>" + uniqueSym.legendHtml); - _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle; - } - _this.olStyle = function (feature) { - var checkProperties = feature.getProperties(); - var checkProperty = checkProperties[_this.propertyName]; - if (_this.propertyStyleLookup[checkProperty] !== undefined) { - return [_this.propertyStyleLookup[checkProperty]]; - } - else { - return [_this.defaultStyle]; - } - }; - if (_this.defaultLabelHtml !== null) { - _this.legendArray.push(_this.defaultLabelHtml); - } - _this.legendHtml = '<ul>'; - for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) { - var h = _c[_b]; - _this.legendHtml += "<li>" + h + "</li>"; - } - _this.legendHtml += '</ul>'; - return _this; - } - return UniqueValueSymbol; -}(SymbolGenerator)); -function makeFeatureServiceLegendAndSymbol(esriResponse) { - "use strict"; - var renderer = esriResponse.drawingInfo.renderer; - var symbolLegendOut = null; - switch (renderer.type) { - case 'simple': - switch (esriResponse.geometryType) { - case 'esriGeometryPoint': - symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol); - break; - case 'esriGeometryPolyline': - symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol); - break; - case 'esriGeometryPolygon': - symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol); - break; - default: - console.log(esriResponse); - alert(esriResponse.geometryType + ' not handled'); - } - break; - case 'uniqueValue': - switch (esriResponse.geometryType) { - case 'esriGeometryPoint': - symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol); - break; - case 'esriGeometryPolyline': - symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol); - break; - case 'esriGeometryPolygon': - symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol); - break; - default: - console.log(esriResponse); - alert(esriResponse['geometryType'] + ' not handled'); - } - break; - default: - alert('not handled renderer type: ' + renderer['type']); - } - if (symbolLegendOut == null) { - return { style: undefined, legend: '' }; - } - else { - return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml }; - } -} -exports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol; -nm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol; -/** - * - * @param {object} lyrObject - the layer as defined in the response - * @param {boolean} [skipLayerNameAndExpander=false] use only icons - * @returns {string} legend html - */ -function mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) { - if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; } - skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false; - var layerName = lyrObject['layerName']; - var legendItems = lyrObject['legend']; - var legendHtml = ''; - if (!skipLayerNameAndExpander) { - legendHtml += "<span class=\"legend-layer-subitem\">" + layerName + "</span>"; - } - if (legendItems.length == 1) { - legendHtml = "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + legendItems[0]['imageData'] + "\">"; - } - else { - if (!skipLayerNameAndExpander) { - legendHtml += '<span class="legend-items-expander" title="Expand/Collapse">▼</span>'; - } - legendHtml += '<ul>'; - for (var i = 0; i < legendItems.length; i++) { - legendHtml += "<li>"; - legendHtml += "<span class=\"legend-layer-subitem\">" + htmlEscape(legendItems[i]['label']) + "</span>"; - legendHtml += "<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64," + legendItems[i]['imageData'] + "\">"; - legendHtml += "</li>"; - } - legendHtml += '</ul>'; - } - if (!skipLayerNameAndExpander) { - legendHtml = "<span class=\"legend-layer-subitem\">" + layerName + "</span>" + legendHtml; - } - return legendHtml; -} -/** - * make map service legent - * @param {object} esriResponse - layer info - * @param showLayers - limited number of layers to show in map service - * @returns {string} legend content - */ -function makeMapServiceLegend(esriResponse, showLayers) { - "use strict"; - if (showLayers === void 0) { showLayers = []; } - var newLegendHtml = ''; - var layers = esriResponse['layers']; - if (layers.length == 1) { - newLegendHtml += mapServiceLegendItem(layers[0], true); - } - else { - newLegendHtml += '<ul>'; - for (var i = 0; i < layers.length; i++) { - if (showLayers.length > 0 && showLayers.indexOf(i) < 0) { - continue; - } - newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>'; - } - newLegendHtml += '</ul>'; - } - return newLegendHtml; -} -exports.makeMapServiceLegend = makeMapServiceLegend; -nm.makeMapServiceLegend = makeMapServiceLegend; - - -/***/ }), - -/***/ 3: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util'); -/** - * guids are used to uniquely identify groups and features - * @returns {string} a new guid - */ -function makeGuid() { - return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx' - .replace(/[xy]/g, function (c) { - var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8; - return v.toString(16); - }); -} -exports.makeGuid = makeGuid; -nm.makeGuid = makeGuid; -exports.default = makeGuid; - - -/***/ }), - -/***/ 4: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 12/8/2015. - */ -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('olHelpers'); -/** - * base interaction - */ -var MapInteractionBase = (function () { - /** - * map interaction base - * @param subtype - the interaction subtype - */ - function MapInteractionBase(subtype) { - this._map = null; - this._initialized = false; - this._subtype = subtype; - } - /** - * base initializer, returns true for already initialized - * @param theMap - the ol Map - * @returns true for already initialized - */ - MapInteractionBase.prototype.init = function (theMap) { - if (!this._initialized) { - this._map = theMap; - this._initialized = true; - } - }; - Object.defineProperty(MapInteractionBase.prototype, "map", { - /** - * get reference to the ol map object - * @returns {ol.Map} the map object - */ - get: function () { - return this._map; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(MapInteractionBase.prototype, "initialized", { - /** - * get if is initialized - * @returns {boolean} is initialized - */ - get: function () { - return this._initialized; - }, - enumerable: true, - configurable: true - }); - /** - * Check the initialization status and throw exception if not valid yet - * @protected - */ - MapInteractionBase.prototype._checkInit = function () { - if (!this.initialized) { - var msg = this._subtype + " object not initialized"; - alert(msg); - console.log(msg); - throw msg; - } - }; - /** - * Check the initialization status and throw exception if not valid yet - */ - MapInteractionBase.prototype.checkInit = function () { - this._checkInit(); - }; - return MapInteractionBase; -}()); -exports.MapInteractionBase = MapInteractionBase; -nm.MapInteractionBase = MapInteractionBase; -exports.default = MapInteractionBase; - - -/***/ }), - -/***/ 47: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/16/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var makeGuid_1 = __webpack_require__(3); -var mapMove_1 = __webpack_require__(6); -var nm = provide_1.default('collections'); -var $ = __webpack_require__(1); -var LayerGroup = (function () { - /** - * - * @param {object} [groupConfig={}] - group configuration object - * @param {string} groupConfig.groupName - the group name - * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially - * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers - * @param {LayerGroup} [parent=undefined] - the parent group - */ - function LayerGroup(groupConfig, parent) { - this.groupLayers = []; - this.groupLayersLookup = {}; - this.groupGroups = []; - this.groupGroupsLookup = {}; - this.itemIdArray = []; - if (typeof groupConfig == 'undefined') { - this.parent = null; - this.groupId = 'root'; - this.groupName = 'root'; - this.allGroupLookup = { root: this }; - this.allGroupArray = [this]; - this.allLayerArray = []; - this.allLayerLookup = {}; - this.layerParentLookup = {}; - this.collapse = false; - this.addCheck = false; - } - else { - this.groupId = makeGuid_1.default(); - this.parent = parent; - this.groupName = groupConfig.groupName; - this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false; - this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true; - } - } - /** - * - * @param {object} groupConfig - configuration object - * @param {string} groupConfig.groupName - the group name - * @param {boolean} groupConfig.collapse if the group should be collapsed initially - * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers - * @param {Array<LayerGroup>} parents parent groups - * @returns {LayerGroup} the layer group just added - */ - LayerGroup.prototype.addGroup = function (groupConfig, parents) { - var parent; - if (parents.length > 0) { - parent = parents[parents.length - 1]; - } - else { - parent = 'root'; - } - /** - * @type {LayerGroup} - */ - var parentGroup = this.allGroupLookup[parent]; - var newGroup = new LayerGroup(groupConfig, parentGroup); - this.allGroupLookup[newGroup.groupId] = newGroup; - this.allGroupArray.push(newGroup); - parentGroup.groupGroups.push(newGroup); - parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup; - if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) { - console.log(newGroup.groupId); - throw 'layer and group ids must be unique'; - } - parentGroup.itemIdArray.push(newGroup.groupId); - return newGroup; - }; - /** - * - * @param {LayerBase} newLayer the layer to be added - * @param {Array} parents array - */ - LayerGroup.prototype.addLegendLayer = function (newLayer, parents) { - var parent; - if (parents.length > 0) { - parent = parents[parents.length - 1]; - } - else { - parent = 'root'; - } - this.allLayerLookup[newLayer.id] = newLayer; - this.allLayerArray.push(newLayer); - /** - * @type {LayerGroup} - */ - var parentGroup = this.allGroupLookup[parent]; - parentGroup.groupLayers.push(newLayer); - parentGroup.groupLayersLookup[newLayer.id] = newLayer; - if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) { - console.log(newLayer.id); - throw 'layer and group ids must be unique'; - } - parentGroup.itemIdArray.push(newLayer.id); - this.layerParentLookup[newLayer.id] = parentGroup; - }; - LayerGroup.prototype.getLegendHtml = function (legendId, options) { - var legendHtml = "<ul id=\"" + legendId + "\" class=\"legend-container\">"; - legendHtml += "<li>" + options.legendTitle + "<input type=\"checkbox\" checked id=\"suppress-by-extent-" + legendId + "\" class=\"suppress-by-extent\">" + - ("<label title=\"Suppress layers not visible at this zoom level\" for=\"suppress-by-extent-" + legendId + "\">") + - "<span></span>" + - "</label></li>"; - legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>'; - return legendHtml; - }; - /** - * @param {Array} itemIds the items to process - * @param {LayerGroup} theGroup new group - * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs - * @static - * @returns {string} html string - */ - LayerGroup.prototype._buildLegend = function (itemIds, theGroup, layerDivClasses) { - if (itemIds.length == 0) { - return ''; - } - var theHml = ''; - var itemId = itemIds[0]; - if (theGroup.groupLayersLookup[itemId]) { - /** - * @type {LayerBase} - */ - var lyr = theGroup.groupLayersLookup[itemId]; - theHml += "<li id=\"" + lyr.id + "-layer-li\" class=\"legend-layer-li " + layerDivClasses.join(' ') + "\">" + lyr.getLegendDiv() + '</li>'; - } - else if (theGroup.groupGroupsLookup[itemId]) { - /** - * type {LayerGroup} - */ - var otherGroup = theGroup.groupGroupsLookup[itemId]; - theHml += "<li>"; - theHml += "<div id=\"" + otherGroup.groupId + "-legend-layer-div\" " + - ("class=\"legend-layer-group " + layerDivClasses.join(' ') + "\">"); - if (otherGroup.addCheck) { - theHml += "<input type=\"checkbox\" checked id=\"" + otherGroup.groupId + "-group-chck\">" + - ("<label for=\"" + otherGroup.groupId + "-group-chck\" title=\"Click arrow to expand or collapse\">" + otherGroup.groupName + "</label>"); - } - else { - theHml += "<label title=\"Click arrow to expand or collapse\">" + otherGroup.groupName + "</label>"; - } - theHml += "<span title=\"Expand/Collapse\" class=\"layer-group-expander"; - theHml += (otherGroup.collapse ? ' legend-layer-group-initial-collapse' : '') + "\">"; - theHml += otherGroup.collapse ? '▶' : '▼'; - theHml += '</span>'; - //parents.push(groupId); - theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>'; - theHml += '</div>'; - theHml += '</li>'; - } - return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses); - }; - return LayerGroup; -}()); -/** - * a wrapper to make a legend - */ -var LayerLegend = (function () { - /**`` - * - * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}} - * @param {string} divId the div where the legend should be added - * @param {object} options for legend - * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling - * @param {string} [options.legendTitle=Legend] the legend title - * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent - */ - function LayerLegend(legendItems, divId, options) { - if (options === void 0) { options = {}; } - for (var _i = 0, legendItems_1 = legendItems; _i < legendItems_1.length; _i++) { - var i = legendItems_1[_i]; - if (typeof i == 'undefined') { - throw 'undefined item passed in array to legend constructor'; - } - } - options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend'; - options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true; - options.layerDivClasses = options.layerDivClasses || []; - // if legend display is scale dependent, make sure the mapMove object is initialized first - if (options.scaleDependent) { - mapMove_1.default.checkInit(); - } - this.$divElement = $('#' + divId); - this._legendItems = legendItems; - this.layerGroup = new LayerGroup(); - this._buildTree(legendItems); - this.legendId = makeGuid_1.default(); - this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options)); - for (var _a = 0, _b = this.layerGroup.allLayerArray; _a < _b.length; _a++) { - var l = _b[_a]; - l.applyCollapse(); - } - var _this = this; - //// if legend display is scale dependent, make sure the mapMove object is initialized first - if (options.scaleDependent) { - mapMove_1.default.checkInit(); - mapMove_1.default.addCallback(function (ext, zoom, evt) { - if (typeof evt == 'undefined' || evt == 'change:resolution') { - for (var _i = 0, _a = this.layerGroup.allLayerArray; _i < _a.length; _i++) { - var lyr = _a[_i]; - var $lyrLi = $('#' + lyr.id + '-layer-li'); - if (zoom > lyr.maxZoom || zoom < lyr.minZoom) { - $lyrLi.addClass('layer-not-visible'); - } - else { - $lyrLi.removeClass('layer-not-visible'); - } - } - } - }, this, 100, true, 'legend1'); - } - // <editor-fold desc="add event listeners"> - this.$divElement.find(".suppress-by-extent").change(function () { - var legendLayerLis = $('.legend-layer-li'); - if (this.checked) { - legendLayerLis.removeClass('layer-force-show'); - } - else { - legendLayerLis.addClass('layer-force-show'); - } - }); - this.$divElement.find('.legend-check').change(function () { - var lyrId = this.id.replace('-legend-layer-check', ''); - _this.layerGroup.allLayerLookup[lyrId].visible = this.checked; - }); - this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () { - $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change'); - }); - this.$divElement.find('.layer-group-expander').click(function () { - var $this = $(this); - $this.removeClass('legend-layer-group-initial-collapse'); - $this.siblings('ul').slideToggle(); - if ($this.hasClass('legend-layer-group-collapsed')) { - $this.removeClass('legend-layer-group-collapsed'); - $this.html('▼'); - } - else { - $this.addClass('legend-layer-group-collapsed'); - $this.html('▶'); - } - }); - this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click'); - // </editor-fold> - } - /** - * @param {Array} [legendItems=this._layerConfig] the legend items - * @param {Array} [parents=[]] the ordered list of groups in which this item is a member - * @private - */ - LayerLegend.prototype._buildTree = function (legendItems, parents) { - if (legendItems.length == 0) { - return; - } - var oneItem = legendItems[0]; - //reset the parent if the item is in the base array - if (this._legendItems.indexOf(oneItem) > -1 || typeof parents == 'undefined') { - parents = []; - } - if (typeof oneItem.groupName !== 'undefined') { - var groupItem = legendItems[0]; - var newGroup = this.layerGroup.addGroup(groupItem, parents); - parents.push(newGroup.groupId); - this._buildTree(oneItem.items, parents); - } - else { - /** - * @type {LayerBase} - */ - var layerItem = legendItems[0]; - this.layerGroup.addLegendLayer(layerItem, parents); - } - this._buildTree(legendItems.slice(1), parents); - }; - return LayerLegend; -}()); -exports.LayerLegend = LayerLegend; -nm.LayerLegend = LayerLegend; -exports.default = LayerLegend; - - -/***/ }), - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/15/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var quickMapBase_1 = __webpack_require__(14); -var provide_1 = __webpack_require__(0); -var mapMove_1 = __webpack_require__(6); -var mapPopup_1 = __webpack_require__(7); -var nm = provide_1.default('olHelpers'); -/** - * Sets up a map with some default parameters and initializes - * mapMove and mapPopup - * - * @param {object} [options={}] config options - * @param {string} [options.divId=map] map div id - * @param {object} [options.center={}] center config object - * @param {number} [options.center.x=-10018378] center x, web mercator x or lon - * @param {number} [options.center.y=5574910] center y, web mercator y or lat - * @param {number} [options.zoom=7] zoom level - * @param {number} [options.minZoom=undefined] min zoom - * @param {number} [options.maxZoom=undefined] max zoom - * @param {boolean} [options.baseSwitcher=true] if add base map switcher - * @param {boolean} [options.fullScreen=false] if add base map switcher - * @returns {ol.Map} the ol map - */ -function quickMap(options) { - if (options === void 0) { options = {}; } - var m = quickMapBase_1.quickMapBase(options); - mapMove_1.default.init(m); - mapPopup_1.default.init(m); - return m; -} -exports.quickMap = quickMap; -nm.quickMap = quickMap; -exports.default = quickMap; - - -/***/ }), - -/***/ 6: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapMoveCls_1 = __webpack_require__(12); -/** - * The single map move object catch is that it is common to multimap pages - * @type {MapMoveCls} - */ -exports.mapMove = new mapMoveCls_1.default(); -exports.default = exports.mapMove; - - -/***/ }), - -/***/ 7: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 11/3/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var mapPopupCls_1 = __webpack_require__(13); -/** - * The single popup object catch is that it is common to multimap pages - * @type {MapPopupCls} - */ -exports.mapPopup = new mapPopupCls_1.default(); -exports.default = exports.mapPopup; - - -/***/ }), - -/***/ 78: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 9/23/2016. - */ -var quickMap_1 = __webpack_require__(5); -var LayerEsriMapServer_1 = __webpack_require__(26); -var LayerLegend_1 = __webpack_require__(47); -var map = quickMap_1.quickMap(); -var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer'); -var sixYearPlan = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', { name: 'Six Year Plan', legendCollapse: true }); -map.addLayer(wisDotRegions.olLayer); -map.addLayer(sixYearPlan.olLayer); -var layerArray = [ - wisDotRegions, - sixYearPlan - // tipConfig.tipSegmentLayer, - // tipConfig.metamanagerSegments, - // { - // groupName: 'ITS Inventory Layers', - // collapse: true, - // addCheck: false, - // items: tipConfig.itsLayerCollection.layers - // } -]; -var legend = new LayerLegend_1.default(layerArray, 'legend-container', {}); - - -/***/ }), - -/***/ 8: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 10/3/2016. - */ -var ol = __webpack_require__(2); -exports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' }); -exports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' }); -exports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' }); - - -/***/ }), - -/***/ 9: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var nm = provide_1.default('util.checkDefined'); -/** - * check if the input is undefined or null - * @param input - input pointer - * @returns true undefined or null - */ -function undefinedOrNull(input) { - "use strict"; - return (typeof input === 'undefined' || input === null); -} -exports.undefinedOrNull = undefinedOrNull; -nm.undefinedOrNull = undefinedOrNull; -/** - * check if the input is defined and not null - * @param input - input pointer - * @returns true defined and not null - */ -function definedAndNotNull(input) { - "use strict"; - return !(undefinedOrNull(input)); -} -exports.definedAndNotNull = definedAndNotNull; -nm.definedAndNotNull = definedAndNotNull; - - -/***/ }) - -/******/ }); +!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var o={};t.m=e,t.c=o,t.i=function(e){return e},t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=77)}({0:function(e,t,o){"use strict";function n(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){void 0===o[t[n]]&&(o[t[n]]={}),o=o[t[n]]}return o}Object.defineProperty(t,"__esModule",{value:!0}),n("util"),window.gv.util.provide=n,t.default=n},1:function(e,t){e.exports=$},10:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(17),r=o(0),i=o(3),a=o(1),l=r.default("layers"),s=function(){function e(e,t){if(void 0===t&&(t={}),t=t||{},"string"!=typeof e)throw"Invalid URL";this._url=e,this._params="object"==typeof t.params?t.params:{},this._legendCollapse="boolean"==typeof t.legendCollapse&&t.legendCollapse,this._legendCheckbox="boolean"!=typeof t.legendCheckbox||t.legendCheckbox,this.id=t.id||i.default(),this._name=t.name||"Unnamed Layer",this.animate=!1,this._opacity="number"==typeof t.opacity?t.opacity:1,this._opacity>1?this._opacity=1:this._opacity<0&&(this._opacity=0),this._visible="boolean"!=typeof t.visible||t.visible,this._source=void 0,this._olLayer=void 0,this._loaded=!1,this._maxResolution=n.zoomToResolution(t.minZoom),void 0!==this._maxResolution&&(this._maxResolution+=1e-5),this._minResolution=n.zoomToResolution(t.maxZoom),this._minZoom="number"==typeof t.minZoom?t.minZoom:void 0,this._maxZoom="number"==typeof t.maxZoom?t.maxZoom:void 0,this._zIndex="number"==typeof t.zIndex?t.zIndex:0,this.loadCallback="function"==typeof t.loadCallback?t.loadCallback:function(){},this._legendContent="",this._legendCheckbox?(this._legendContent+='<input type="checkbox" '+(this.visible?"checked":"")+' class="legend-check" id="'+this.id+'-legend-layer-check"><span></span>',this._legendContent+='<label for="'+this.id+'-legend-layer-check" class="legend-layer-name">'+this.name+"</label>"):this._legendContent+='<label class="legend-layer-name">'+this.name+"</label>",this._$legendDiv=null,this._applyCollapseCalled=!1,this._addLegendContent("string"==typeof t.legendContent?t.legendContent:void 0)}return e.prototype._load=function(){return 1==this.loaded||(this._loaded=!0,!1)},e.prototype.getLegendDiv=function(){return'<div class="legend-layer-div" id="'+this.id+'-legend-layer-div">'+this._legendContent+"</div>"},e.prototype._addLegendContent=function(e){void 0===e&&(e=""),e.indexOf("<ul>")>-1&&(e='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'+e),this._legendContent+=e,this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0&&(this._$legendDiv.append(e),this.applyCollapse())},e.prototype.addLegendContent=function(e){this._addLegendContent(e)},e.prototype.applyCollapse=function(){if(this._applyCollapseCalled)return void console.log("collapse already applied");if(this._$legendDiv=a("#"+this.id+"-legend-layer-div"),this._$legendDiv.length>0){var e=this._$legendDiv.find(".legend-items-expander");e.length>0&&(this._applyCollapseCalled=!0,e.click(function(){var e=a(this);e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("▼")):(e.addClass("legend-layer-group-collapsed"),e.html("▶"))}),this._legendCollapse&&e.trigger("click"))}},e.prototype.refresh=function(){this.source&&this.source.refresh()},Object.defineProperty(e.prototype,"id",{get:function(){return this._id},set:function(e){this._id=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"animate",{get:function(){return this._animate},set:function(e){this._animate=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"legendContent",{get:function(){return this._legendContent},set:function(e){this._legendContent=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minResolution",{get:function(){return this._minResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxResolution",{get:function(){return this._maxResolution},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"minZoom",{get:function(){return this._minZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"maxZoom",{get:function(){return this._maxZoom},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{get:function(){return this._url},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"visible",{get:function(){return this._visible},set:function(e){this.setVisible(e)},enumerable:!0,configurable:!0}),e.prototype.setVisible=function(e){this._visible=e,this.olLayer&&(this.olLayer.setVisible(this._visible),e&&!this._loaded&&this._load())},Object.defineProperty(e.prototype,"opacity",{get:function(){return this._opacity},set:function(e){this._opacity=e,this.olLayer&&this.olLayer.setOpacity(this._opacity)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},set:function(e){this._name=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"loaded",{get:function(){return this._loaded},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"source",{get:function(){return this.getSource()},enumerable:!0,configurable:!0}),e.prototype.getSource=function(){return this._source},Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(e){this._zIndex=e},enumerable:!0,configurable:!0}),e.prototype.setZIndex=function(e){},Object.defineProperty(e.prototype,"olLayer",{get:function(){return this.getOlLayer()},enumerable:!0,configurable:!0}),e.prototype.getOlLayer=function(){return this._olLayer},e}();t.LayerBase=s,l.LayerBase=s,t.default=s},11:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(1),r=o(3),i=o(2),a=o(8),l="geocoder-invalid",s="geocoder-loading",p=function(){function e(e,t){var o=this,p=r.makeGuid(),u=r.makeGuid();this.map=t,this.indicationLayer=new i.layer.Vector({source:new i.source.Vector,style:new i.style.Style({image:new i.style.Circle({radius:12,fill:new i.style.Fill({color:"rgba(255,0,0,0.5)"}),stroke:new i.style.Stroke({color:"red",width:1})})})}),this.map.addLayer(this.indicationLayer),n(e).append('<div class="geocoder-el"><input type="text" id="'+p+'"><button id="'+u+'">Search</button></div>'),this.theButton=document.getElementById(u),this.theInput=document.getElementById(p),this.reset();var c=n(this.theButton),d=n(this.theInput);c.click(function(e){e.preventDefault(),c.addClass(s),o.theButton.disabled=!0,o.indicationLayer.getSource().clear(),n.get("https://geocode.xyz/"+o.theInput.value+"?geoit=json",{},function(e){var t=parseFloat(e.latt),n=parseFloat(e.longt);if(0==t&&0==n||e.error)d.addClass(l),o.theInput.title="Specified Location Invalid",o.theButton.title="Specified Location Invalid";else{var r=o.map.getView(),p=new i.geom.Point([n,t]),u=new i.Feature(p);o.indicationLayer.getSource().addFeature(u),p.transform(a.proj4326,a.proj3857),r.setCenter(p.getCoordinates()),r.setZoom(13)}c.removeClass(s),o.theButton.disabled=!1},"json")}),n(this.theInput).keyup(function(e){e.preventDefault(),o.theButton.disabled=0==o.theInput.value.length,d.removeClass(l),o.theInput.title="",o.theButton.title="",o.theButton.disabled||13!=e.keyCode||c.click()})}return e.prototype.reset=function(){this.theButton.disabled=!0,this.theInput.value=""},e}();t.Geocode=p},12:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(9),a=o(0),l=o(3),s=o(1),p=a.default("olHelpers"),u=function(e){function t(){var t=e.call(this,"map move")||this;return t._arrLyrRequest=[],t._arrLyrTimeout=[],t._arrLayer=[],t._lookupLayer={},t._mapMoveCallbacks=[],t._mapMoveCallbacksLookup={},t._mapMoveCallbackDelays=[],t._mapMoveCallbackContext=[],t._mapMoveCallbackTimeout=[],t._mapExtent=void 0,t._zoomLevel=void 0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t),this.map.getView().on(["change:center","change:resolution"],function(e){o._updateMapExtent();for(var t=0;t<o._arrLayer.length;t++)o.triggerLyrLoad(o._arrLayer[t],t,e.type);for(var t=0;t<o._mapMoveCallbacks.length;t++)o.triggerMoveCallback(t,e.type)})},t.prototype._updateMapExtent=function(){var e=this.map.getView();this._zoomLevel=e.getZoom();var t=e.calculateExtent(this.map.getSize());this._mapExtent={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}},Object.defineProperty(t.prototype,"mapExtent",{get:function(){return this._mapExtent||this._updateMapExtent(),this._mapExtent},enumerable:!0,configurable:!0}),t.prototype.triggerLyrLoad=function(e,t,o){if(i.undefinedOrNull(e)&&i.undefinedOrNull(t))throw"need to define lyr or index";i.definedAndNotNull(e)&&i.undefinedOrNull(t)?t=this._arrLayer.indexOf(e):i.undefinedOrNull(e)&&i.definedAndNotNull(t)&&(e=this._arrLayer[t]),null!=this._arrLyrTimeout[t]&&(clearTimeout(this._arrLyrTimeout[t]),this._arrLyrTimeout[t]=null),null!=this._arrLyrRequest[t]&&4!=this._arrLyrRequest[t]&&(this._arrLyrRequest[t].abort(),this._arrLyrRequest[t]=null);var n=function(){};if(e.mapMoveBefore(this._zoomLevel,o)){e.mapMoveMakeGetParams(this._mapExtent,this._zoomLevel);var r=this;n=function(){function o(e,t){var o=this;this._arrLyrRequest[t]=s.get(e.url,e.mapMoveParams,function(t){e.mapMoveCallback(t),e.loadCallback()},"json").fail(function(t){"abort"!=t.statusText&&(console.log("failed"),console.log(e.url),console.log(e.mapMoveParams))}).always(function(){o._arrLyrTimeout[t]=null,o._arrLyrRequest[t]=null})}o.call(r,e,t)}}else e.clear();this._arrLyrTimeout[t]=setTimeout(n,e.onDemandDelay)},t.prototype.triggerMoveCallback=function(e,t,o){if(void 0===e&&void 0===o)throw"either the function index or the id must be defined";if("number"!=typeof e&&(e=this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[o])),e<0)return void console.log("function not found");null!=this._mapMoveCallbackTimeout[e]&&(clearTimeout(this._mapMoveCallbackTimeout[e]),this._mapMoveCallbackTimeout[e]=null);var n=this._mapMoveCallbackContext[e],r=this._mapMoveCallbacks[e],i=this,a=function(){null!==n?r.call(n,i._mapExtent,i._zoomLevel,t):r(i._mapExtent,i._zoomLevel,t)};this._mapMoveCallbackTimeout[e]=setTimeout(a,this._mapMoveCallbackDelays[e])},t.prototype.addVectorLayer=function(e,t){if(void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1)return void console.log("already added "+e.name+" to map move");this._checkInit(),this._arrLyrRequest.push(null),this._arrLyrTimeout.push(null),this._arrLayer.push(e),this._lookupLayer[e.id]=e,(t="boolean"!=typeof t||t)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))},t.prototype.addCallback=function(e,t,o,n,r){if(this._mapMoveCallbacks.indexOf(e)>-1)return void console.log("this function already added to map move");this._checkInit(),r||(r=l.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=e,this._mapMoveCallbackDelays.push("number"==typeof o?o:50),this._mapMoveCallbackContext.push(i.definedAndNotNull(t)?t:null),this._mapMoveCallbackTimeout.push(null),(n="boolean"!=typeof n||n)&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))},t}(r.default);t.MapMoveCls=u,p.MapMoveCls=u,t.default=u},13:function(e,t,o){"use strict";var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var r=o(5),i=o(0),a=o(2),l=o(1),s=i.default("olHelpers"),p=function(){function e(e,t,o,n,r){this.feature=e,this.layer=t,this.layerIndex=o,this.selectionLayer=n,this.popupContent="",this.esriLayerName="string"==typeof r?r:void 0}return Object.defineProperty(e.prototype,"layerName",{get:function(){return"string"==typeof this.esriLayerName?this.esriLayerName:this.layer.name},enumerable:!0,configurable:!0}),e}();t.FeatureLayerProperties=p;var u=function(e){function t(){var t=e.call(this,"map popup")||this;return t._arrPopupLayerIds=[],t._arrPopupLayers=[],t._arrPopupContentFunction=[],t._$popupContainer=void 0,t._$popupContent=void 0,t._$popupCloser=void 0,t._popupOverlay=void 0,t._selectionLayers=[],t._selectionLayerLookup={},t._mapClickFunctions=[],t._popupChangedFunctions=[],t._esriMapServiceLayers=[],t._popupOpen=!1,t._popupCoordinate=null,t._passThroughLayerFeatureArray=[],t._currentPopupIndex=-1,t._popupContentLength=0,t}return n(t,e),t.prototype.init=function(t){var o=this;e.prototype.init.call(this,t);var n,r=this.map.getTarget();n=l("string"==typeof r?"#"+r:r),n.append('<div class="ol-popup"><span class="ol-popup-closer">X</span><div class="popup-content"></div></div>'),this._$popupContainer=n.find(".ol-popup"),this._$popupContent=n.find(".popup-content"),this._$popupCloser=n.find(".ol-popup-closer");var i=function(e){return a.easing.inAndOut(e)};this._popupOverlay=new a.Overlay({element:this._$popupContainer[0],autoPan:!0,autoPanAnimation:{duration:250,source:t.getView().getCenter(),easing:i}}),this._map.addOverlay(this._popupOverlay),this._$popupCloser.click(function(e){o.closePopup()}),this._map.on("singleclick",function(e){if(o.closePopup(),o._popupCoordinate=e.coordinate,o._esriMapServiceLayers.length>0)for(var t={geometry:e.coordinate.join(","),geometryType:"esriGeometryPoint",layers:"all",sr:o._map.getView().getProjection().getCode().split(":")[1],mapExtent:o._map.getView().calculateExtent(o._map.getSize()).join(","),imageDisplay:o._map.getSize().join(",")+",96",returnGeometry:!0,tolerance:15,f:"pjson"},n=0,r=o._esriMapServiceLayers;n<r.length;n++){var i=r[n];i.getPopupInfo(t)}var a=o._featuresAtPixel(e.pixel);o._passThroughLayerFeatureArray=[],o._currentPopupIndex=-1;for(var l=0;l<a.length;l++){var s=a[l],p=s.feature.getProperties(),u=o._arrPopupContentFunction[s.layerIndex](p,o._$popupContent);u===!1||("string"==typeof u?(s.popupContent=u,o._passThroughLayerFeatureArray.push(s)):s.selectionLayer.getSource().addFeature(s.feature))}o._popupContentLength=o._passThroughLayerFeatureArray.length,o._currentPopupIndex=-1;var c='<div class="ol-popup-nav">';c+='<span class="previous-popup ol-popup-nav-arrow">◀</span>',c+='<span class="next-popup ol-popup-nav-arrow">▶</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span> of </span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span> - </span>",c+='<span class="current-popup-layer-name"></span>',c+="</div>",c+='<div class="ol-popup-inner">',c+="</div>",o._$popupContent.html(c),o._$popupContent.find(".previous-popup").click(function(){1!=o._popupContentLength&&(0==o._currentPopupIndex?o._currentPopupIndex=o._popupContentLength-1:o._currentPopupIndex--,o._triggerFeatSelect())});var d=o._$popupContent.find(".next-popup");d.click(function(){1==o._popupContentLength&&o._currentPopupIndex>-1||(o._currentPopupIndex==o._popupContentLength-1?o._currentPopupIndex=0:o._currentPopupIndex++,o._triggerFeatSelect())}),o._popupContentLength>0&&(d.trigger("click"),o._popupOverlay.setPosition(o._popupCoordinate),o._$popupContent.scrollTop(0),o._popupOpen=!0)}),this._map.on("pointermove",function(e){if(!e.dragging){var t=o.map.getEventPixel(e.originalEvent),n=!1;o.map.forEachFeatureAtPixel(t,function(e,t){if(!n)for(var r=0,i=o._arrPopupLayers;r<i.length;r++){var a=i[r];if(a.olLayer==t){n=!0;break}}});o.map.getTargetElement().style.cursor=n?"pointer":""}})},t.prototype._triggerFeatSelect=function(){var e=this._$popupContent.find(".current-popup-item-number"),t=this._$popupContent.find(".ol-popup-inner"),o=this._$popupContent.find(".current-popup-layer-name");this.clearSelection();var n=this._passThroughLayerFeatureArray[this._currentPopupIndex];e.html((this._currentPopupIndex+1).toFixed()),o.html(n.layerName),t.html(n.popupContent),n.selectionLayer.getSource().addFeature(n.feature);for(var r=0,i=this._popupChangedFunctions;r<i.length;r++){(0,i[r])(this._$popupContent)}},t.prototype.addMapServicePopupContent=function(e,t,o,n){var r=new p(e,t,this._popupContentLength,this._selectionLayerLookup[t.id],n);r.popupContent=o,this._passThroughLayerFeatureArray.push(r),this._popupContentLength++,l(".popup-content-length").html(this._popupContentLength.toFixed()),this._popupOpen||(this._$popupContent.find(".next-popup").trigger("click"),this._popupOverlay.setPosition(this._popupCoordinate),this._$popupContent.scrollTop(0),this._popupOpen=!0)},t.prototype._featuresAtPixel=function(e){var t=this,o=[];return this.map.forEachFeatureAtPixel(e,function(e,n){var r,i=!1,a=null;for(r=0;r<t._arrPopupLayers.length;r++)if(a=t._arrPopupLayers[r],a.olLayer===n){i=!0;break}i&&o.push(new p(e,a,r,t._selectionLayers[r]))}),o},t.prototype.closePopup=function(){return this._checkInit(),this._popupOpen=!1,this._popupOverlay.setPosition(void 0),this._$popupCloser[0].blur(),this.clearSelection(),this._$popupContent.html(""),!1},t.prototype.addPopupChangedFunction=function(e){this._popupChangedFunctions.push(e)},t.prototype._addPopupLayer=function(e,t){this._checkInit(),t=t||{},t.color=t.color||"rgba(255,170,0,0.5)",t.width=t.width||10;var o;o=t.olStyle?t.olStyle:new a.style.Style({stroke:new a.style.Stroke({color:t.color,width:t.width}),image:new a.style.Circle({radius:7,fill:new a.style.Fill({color:t.color}),stroke:new a.style.Stroke({color:t.color,width:1})}),fill:new a.style.Fill({color:t.color})});var n=new a.layer.Vector({source:new a.source.Vector,style:o});return n.setZIndex(100),this._selectionLayers.push(n),this._selectionLayerLookup[e.id]=n,this.map.addLayer(n),n},t.prototype.addVectorPopup=function(e,t,o){var n=this._addPopupLayer(e,o);return this._arrPopupLayerIds.push(e.id),this._arrPopupLayers.push(e),this._arrPopupContentFunction.push(t),n},t.prototype.removeVectorPopup=function(e){var t=this._arrPopupLayerIds.indexOf(e.id);t>-1&&(this._arrPopupLayerIds.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupContentFunction.splice(t,1),this._selectionLayers.splice(t,1),delete this._selectionLayerLookup[e.id])},t.prototype.addMapServicePopup=function(e,t){var o=this._addPopupLayer(e,t);return this._esriMapServiceLayers.push(e),o},t.prototype.clearSelection=function(){this._checkInit();for(var e=0;e<this._selectionLayers.length;e++)this._selectionLayers[e].getSource().clear();for(var t=0,o=this._mapClickFunctions;t<o.length;t++){(0,o[t])()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,t.default=u},14:function(e,t,o){"use strict";function n(e){void 0===e&&(e={}),e.divId=e.divId||"map",e.center=e.center||{x:-10018378,y:5574910},e.zoom="number"==typeof e.zoom?e.zoom:7,e.baseSwitcher="boolean"!=typeof e.baseSwitcher||e.baseSwitcher,e.fullScreen="boolean"==typeof e.fullScreen&&e.fullScreen,e.addGeocode=e.addGeocode||!1,a("#"+e.divId).css("position","relative");var t=new i.layer.Tile({source:new i.source.OSM});if(e.baseSwitcher,e.zoom<0||e.zoom>28)throw"zoom out of range";if(e.center.x>=-180&&e.center.x<=180&&e.center.y>=-90&&e.center.y<=90){var o=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),o.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var n=o.getCoordinates();e.center.x=n[0],e.center.y=n[1]}var r=i.control.defaults({attributionOptions:{collapsible:!1}}),s=new i.View({center:[e.center.x,e.center.y],zoom:e.zoom,minZoom:e.minZoom,maxZoom:e.maxZoom}),p=new i.Map({layers:[t],target:e.divId,controls:r,view:s});return e.fullScreen&&p.addControl(new i.control.FullScreen({})),e.addGeocode&&new l.Geocode(document.getElementById(e.divId),p),p}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(2),a=o(1),l=o(11),s=r.default("olHelpers");t.quickMapBase=n,s.quickMapBase=n,t.default=n},17:function(e,t,o){"use strict";function n(e){return"number"==typeof e?e%1==0&&e>=0&&e<=28?l[e]:void console.log("invalid zoom level provided: "+e):void 0}function r(e){for(var t=0;t<l.length;t++)if(e>=l[t])return t;return 0}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("olHelpers.zoomResolutionConvert"),l=[156543.03392804097,78271.51696402048,39135.75848201024,19567.87924100512,9783.93962050256,4891.96981025128,2445.98490512564,1222.99245256282,611.49622628141,305.748113140705,152.8740565703525,76.43702828517625,38.21851414258813,19.109257071294063,9.554628535647032,4.777314267823516,2.388657133911758,1.194328566955879,.5971642834779395,.29858214173896974,.14929107086948487,.07464553543474244,.03732276771737122,.01866138385868561,.009330691929342804,.004665345964671402,.002332672982335701,.0011663364911678506,.0005831682455839253];t.zoomToResolution=n,a.zoomToResolution=n,t.resolutionToZoom=r,a.resolutionToZoom=r},2:function(e,t){e.exports=ol},25:function(e,t,o){"use strict";function n(e,t){return"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/"+e+"/"+t+"/MapServer"}function r(e,t){var o=window.location.href,n="/mapserver/"+e+"/"+t;return o.indexOf("transportal.cee.wisc.edu")>-1&&(n=o.toLowerCase().indexOf("webmapsstage")>-1?"https://transportal.cee.wisc.edu/gis/webmapsstage"+n:"https://transportal.cee.wisc.edu/gis/webmaps"+n),n}var i=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var a=o(10),l=o(27),s=o(4),p=o(0),u=o(2),c=o(1),d=p.default("layers");t.makeServiceUrl=n,t.localCacheUrl=r;var y=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._source=new u.source.TileArcGISRest({url:""==n.url?void 0:n.url,params:void 0===o.showLayers?void 0:{layers:"show:"+o.showLayers.join(",")}}),n._showLayers=o.showLayers||[],n._olLayer=new u.layer.Tile({source:n._source,visible:n.visible,opacity:n.opacity,minResolution:n._minResolution,maxResolution:n._maxResolution}),n._olLayer.setZIndex(n._zIndex),o.addPopup="boolean"==typeof o.addPopup&&o.addPopup,n._esriFormat=new u.format.EsriJSON,n._popupRequest=null,o.getLegend="boolean"!=typeof o.getLegend||o.getLegend,o.getLegend&&n.addLegendContent(),o.addPopup&&s.default.addMapServicePopup(n),n}return i(t,e),t.prototype.addLegendContent=function(t){var o=this,n=this.url;"/"!==n[n.length-1]&&(n+="/"),n+="legend?f=pjson&callback=?",c.get(n,{},function(t){var n=l.makeMapServiceLegend(t,o._showLayers);e.prototype.addLegendContent.call(o,n)},"json")},t.prototype.getPopupInfo=function(e){if(this.visible){var t=this.url;"/"!=t[t.length-1]&&(t+="/"),t+="identify?callback=?";var o=this;null!=this._popupRequest&&this._popupRequest.abort(),this._popupRequest=c.get(t,e,function(e){for(var t=0,n=e.results;t<n.length;t++){var r=n[t],i='<table class="esri-popup-table">';for(var a in r.attributes)if(r.attributes.hasOwnProperty(a)){var l=r.attributes[a];if(null==l||"null"==l.toString().toLowerCase())continue;var p=a;p.length>14&&(p=p.slice(0,11)+"..."),i+="<tr><td>"+p+"</td><td>"+l+"</td></tr>"}i+="</table>",s.default.addMapServicePopupContent(o._esriFormat.readFeature(r),o,i,r.layerName)}},"json"),this._popupRequest.always(function(){o._popupRequest=null})}},Object.defineProperty(t.prototype,"source",{get:function(){return e.prototype.getSource.call(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"olLayer",{get:function(){return e.prototype.getOlLayer.call(this)},enumerable:!0,configurable:!0}),t}(a.LayerBase);t.LayerEsriMapServer=y,d.LayerEsriMapServer=y,t.default=y},27:function(e,t,o){"use strict";function n(e,t){return"rgba("+e[0]+","+e[1]+","+e[2]+","+t+")"}function r(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function i(e){var t=e.drawingInfo.renderer,o=null;switch(t.type){case"simple":switch(e.geometryType){case"esriGeometryPoint":o=new m(e,y);break;case"esriGeometryPolyline":o=new m(e,h);break;case"esriGeometryPolygon":o=new m(e,f);break;default:console.log(e),alert(e.geometryType+" not handled")}break;case"uniqueValue":switch(e.geometryType){case"esriGeometryPoint":o=new v(e,y);break;case"esriGeometryPolyline":o=new v(e,h);break;case"esriGeometryPolygon":o=new v(e,f);break;default:console.log(e),alert(e.geometryType+" not handled")}break;default:alert("not handled renderer type: "+t.type)}return null==o?{style:void 0,legend:""}:{style:o.olStyle,legend:o.legendHtml}}function a(e,t){void 0===t&&(t=!1),t="boolean"==typeof t&&t;var o=e.layerName,n=e.legend,i="";if(t||(i+='<span class="legend-layer-subitem">'+o+"</span>"),1==n.length)i='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+n[0].imageData+'">';else{t||(i+='<span class="legend-items-expander" title="Expand/Collapse">▼</span>'),i+="<ul>";for(var a=0;a<n.length;a++)i+="<li>",i+='<span class="legend-layer-subitem">'+r(n[a].label)+"</span>",i+='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+n[a].imageData+'">',i+="</li>";i+="</ul>"}return t||(i='<span class="legend-layer-subitem">'+o+"</span>"+i),i}function l(e,t){void 0===t&&(t=[]);var o="",n=e.layers;if(1==n.length)o+=a(n[0],!0);else{o+="<ul>";for(var r=0;r<n.length;r++)t.length>0&&t.indexOf(r)<0||(o+="<li>"+a(n[r])+"</li>");o+="</ul>"}return o}var s=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])};return function(t,o){function n(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}();Object.defineProperty(t,"__esModule",{value:!0});var p=o(0),u=o(2),c=p.default("olHelpers.esriToOlStyle");c.htmlEscape=r;var d=function(){function e(e,t){this.symbolObj=e,this.opacity=t,this.olStyle=void 0,this.legendHtml=""}return e}(),y=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSMS":var i=n(r.symbolObj.color,r.opacity),a=n(r.symbolObj.outline.color,r.opacity),l=r.symbolObj.outline.width,s=r.symbolObj.size;r.olStyle=new u.style.Style({image:new u.style.Circle({radius:s,fill:new u.style.Fill({color:i}),stroke:new u.style.Stroke({color:a,width:l})})}),r.legendHtml='<span class="legend-layer-icon" style="color: '+i+'">●</span>';break;case"esriPMS":r.olStyle=new u.style.Style({image:new u.style.Icon({src:"data:image/png;base64,"+r.symbolObj.imageData})}),r.legendHtml='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+r.symbolObj.imageData+'">';break;default:console.log(r.symbolObj),alert("Point symbol does not handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),h=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSLS":var i=n(r.symbolObj.color,r.opacity),a=r.symbolObj.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:i,width:a})}),r.legendHtml='<span class="legend-layer-icon" ',r.legendHtml+='style="',r.legendHtml+="background-color: "+i+";",r.legendHtml+="width: 40px;",r.legendHtml+="height: 4px;",r.legendHtml+="position: relative;",r.legendHtml+="display: inline-block;",r.legendHtml+="top: -1px;",r.legendHtml+='"></span>';break;default:console.log(r.symbolObj),alert("Line symbol does not handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),f=function(e){function t(t,o){var r=e.call(this,t,o)||this;switch(r.symbolObj.type){case"esriSFS":var i=n(r.symbolObj.color,r.opacity),a=n(r.symbolObj.outline.color,r.opacity),l=r.symbolObj.outline.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:a,width:l}),fill:new u.style.Fill({color:i})}),r.legendHtml='<span class="legend-layer-icon" ',r.legendHtml+='style="',r.legendHtml+="background-color: "+i+";",r.legendHtml+="border: solid "+a+" 1px;",r.legendHtml+="width: 40px;",r.legendHtml+="height: 9px;",r.legendHtml+="position: relative;",r.legendHtml+="display: inline-block;",r.legendHtml+="top: 2px;",r.legendHtml+='"></span>';break;default:console.log(r.symbolObj),alert("Polygon symbol does handle symbol type: "+r.symbolObj.type)}return r}return s(t,e),t}(d),g=function(){function e(e){this.opacity=(100-(e.drawingInfo.transparency||0))/100,this.renderer=e.drawingInfo.renderer,this.olStyle=void 0,this.legendHtml=""}return e}(),m=function(e){function t(t,o){var n=e.call(this,t)||this;n.symbol=n.renderer.symbol;var r=new o(n.symbol,n.opacity);return n.olStyle=r.olStyle,n.legendHtml=r.legendHtml,n}return s(t,e),t}(g),v=function(e){function t(t,o){var n=e.call(this,t)||this;if(n.uniqueValueInfos=n.renderer.uniqueValueInfos,n.propertyName=n.renderer.field1,n.defaultSymbol=n.renderer.defaultSymbol,n.defaultSymbol){var i=new o(n.defaultSymbol,n.opacity);n.defaultStyle=i.olStyle,n.defaultLabelHtml='<span class="legend-layer-subitem">'+r(n.renderer.defaultLabel)+"</span>"+i.legendHtml}else n.defaultStyle=void 0,n.defaultLabelHtml="other";n.valueArray=[],n.labelArray=[],n.legendArray=[],n.propertyStyleLookup={};for(var a=0,l=n.uniqueValueInfos;a<l.length;a++){var s=l[a];n.labelArray.push(s.label),n.valueArray.push(s.value);var p=new o(s.symbol,n.opacity);n.legendArray.push('<span class="legend-layer-subitem">'+r(s.label)+"</span>"+p.legendHtml),n.propertyStyleLookup[s.value]=p.olStyle}n.olStyle=function(e){var t=e.getProperties(),o=t[n.propertyName];return void 0!==n.propertyStyleLookup[o]?[n.propertyStyleLookup[o]]:[n.defaultStyle]},null!==n.defaultLabelHtml&&n.legendArray.push(n.defaultLabelHtml),n.legendHtml="<ul>";for(var u=0,c=n.legendArray;u<c.length;u++){var d=c[u];n.legendHtml+="<li>"+d+"</li>"}return n.legendHtml+="</ul>",n}return s(t,e),t}(g);t.makeFeatureServiceLegendAndSymbol=i,c.makeFeatureServiceLegendAndSymbol=i,t.makeMapServiceLegend=l,c.makeMapServiceLegend=l},3:function(e,t,o){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})}Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=r.default("util");t.makeGuid=n,i.makeGuid=n,t.default=n},4:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(13);t.mapPopup=new n.default,t.default=t.mapPopup},46:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=o(3),i=o(7),a=n.default("collections"),l=o(1),s=function(){function e(e,t){this.groupLayers=[],this.groupLayersLookup={},this.groupGroups=[],this.groupGroupsLookup={},this.itemIdArray=[],void 0===e?(this.parent=null,this.groupId="root",this.groupName="root",this.allGroupLookup={root:this},this.allGroupArray=[this],this.allLayerArray=[],this.allLayerLookup={},this.layerParentLookup={},this.collapse=!1,this.addCheck=!1):(this.groupId=r.default(),this.parent=t,this.groupName=e.groupName,this.collapse="boolean"==typeof e.collapse&&e.collapse,this.addCheck="boolean"!=typeof e.addCheck||e.addCheck)}return e.prototype.addGroup=function(t,o){var n;n=o.length>0?o[o.length-1]:"root";var r=this.allGroupLookup[n],i=new e(t,r);if(this.allGroupLookup[i.groupId]=i,this.allGroupArray.push(i),r.groupGroups.push(i),r.groupGroupsLookup[i.groupId]=i,r.itemIdArray.indexOf(i.groupId)>0)throw console.log(i.groupId),"layer and group ids must be unique";return r.itemIdArray.push(i.groupId),i},e.prototype.addLegendLayer=function(e,t){var o;o=t.length>0?t[t.length-1]:"root",this.allLayerLookup[e.id]=e,this.allLayerArray.push(e);var n=this.allGroupLookup[o];if(n.groupLayers.push(e),n.groupLayersLookup[e.id]=e,n.itemIdArray.indexOf(e.id)>0)throw console.log(e.id),"layer and group ids must be unique";n.itemIdArray.push(e.id),this.layerParentLookup[e.id]=n},e.prototype.getLegendHtml=function(e,t){var o='<ul id="'+e+'" class="legend-container">';return o+="<li>"+t.legendTitle+'<input type="checkbox" checked id="suppress-by-extent-'+e+'" class="suppress-by-extent"><label title="Suppress layers not visible at this zoom level" for="suppress-by-extent-'+e+'"><span></span></label></li>',o+=this._buildLegend(this.itemIdArray,this,t.layerDivClasses)+"</ul>"},e.prototype._buildLegend=function(e,t,o){if(0==e.length)return"";var n="",r=e[0];if(t.groupLayersLookup[r]){var i=t.groupLayersLookup[r];n+='<li id="'+i.id+'-layer-li" class="legend-layer-li '+o.join(" ")+'">'+i.getLegendDiv()+"</li>"}else if(t.groupGroupsLookup[r]){var a=t.groupGroupsLookup[r];n+="<li>",n+='<div id="'+a.groupId+'-legend-layer-div" class="legend-layer-group '+o.join(" ")+'">',n+=a.addCheck?'<input type="checkbox" checked id="'+a.groupId+'-group-chck"><label for="'+a.groupId+'-group-chck" title="Click arrow to expand or collapse">'+a.groupName+"</label>":'<label title="Click arrow to expand or collapse">'+a.groupName+"</label>",n+='<span title="Expand/Collapse" class="layer-group-expander',n+=(a.collapse?" legend-layer-group-initial-collapse":"")+'">',n+=a.collapse?"▶":"▼",n+="</span>",n+="<ul>"+this._buildLegend(a.itemIdArray,a,o)+"</ul>",n+="</div>",n+="</li>"}return n+this._buildLegend(e.slice(1),t,o)},e}(),p=function(){function e(e,t,o){void 0===o&&(o={});for(var n=0,a=e;n<a.length;n++){if(void 0===a[n])throw"undefined item passed in array to legend constructor"}o.legendTitle="string"==typeof o.legendTitle?o.legendTitle:"Legend",o.scaleDependent="boolean"!=typeof o.scaleDependent||o.scaleDependent,o.layerDivClasses=o.layerDivClasses||[],o.scaleDependent&&i.default.checkInit(),this.$divElement=l("#"+t),this._legendItems=e,this.layerGroup=new s,this._buildTree(e),this.legendId=r.default(),this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId,o));for(var p=0,u=this.layerGroup.allLayerArray;p<u.length;p++){u[p].applyCollapse()}var c=this;o.scaleDependent&&(i.default.checkInit(),i.default.addCallback(function(e,t,o){if(void 0===o||"change:resolution"==o)for(var n=0,r=this.layerGroup.allLayerArray;n<r.length;n++){var i=r[n],a=l("#"+i.id+"-layer-li");t>i.maxZoom||t<i.minZoom?a.addClass("layer-not-visible"):a.removeClass("layer-not-visible")}},this,100,!0,"legend1")),this.$divElement.find(".suppress-by-extent").change(function(){var e=l(".legend-layer-li");this.checked?e.removeClass("layer-force-show"):e.addClass("layer-force-show")}),this.$divElement.find(".legend-check").change(function(){var e=this.id.replace("-legend-layer-check","");c.layerGroup.allLayerLookup[e].visible=this.checked}),this.$divElement.find(".legend-layer-group > input[type=checkbox]").change(function(){l(this).siblings("ul").find("input[type=checkbox]").prop("checked",this.checked).trigger("change")}),this.$divElement.find(".layer-group-expander").click(function(){var e=l(this);e.removeClass("legend-layer-group-initial-collapse"),e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("▼")):(e.addClass("legend-layer-group-collapsed"),e.html("▶"))}),this.$divElement.find(".legend-layer-group-initial-collapse").trigger("click")}return e.prototype._buildTree=function(e,t){if(0!=e.length){var o=e[0];if((this._legendItems.indexOf(o)>-1||void 0===t)&&(t=[]),void 0!==o.groupName){var n=e[0],r=this.layerGroup.addGroup(n,t);t.push(r.groupId),this._buildTree(o.items,t)}else{var i=e[0];this.layerGroup.addLegendLayer(i,t)}this._buildTree(e.slice(1),t)}},e}();t.LayerLegend=p,a.LayerLegend=p,t.default=p},5:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0),r=n.default("olHelpers"),i=function(){function e(e){this._map=null,this._initialized=!1,this._subtype=e}return e.prototype.init=function(e){this._initialized||(this._map=e,this._initialized=!0)},Object.defineProperty(e.prototype,"map",{get:function(){return this._map},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!0,configurable:!0}),e.prototype._checkInit=function(){if(!this.initialized){var e=this._subtype+" object not initialized";throw alert(e),console.log(e),e}},e.prototype.checkInit=function(){this._checkInit()},e}();t.MapInteractionBase=i,r.MapInteractionBase=i,t.default=i},6:function(e,t,o){"use strict";function n(e){void 0===e&&(e={});var t=r.quickMapBase(e);return a.default.init(t),l.default.init(t),t}Object.defineProperty(t,"__esModule",{value:!0});var r=o(14),i=o(0),a=o(7),l=o(4),s=i.default("olHelpers");t.quickMap=n,s.quickMap=n,t.default=n},7:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(12);t.mapMove=new n.default,t.default=t.mapMove},77:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(6),r=o(25),i=o(46),a=n.quickMap(),l=new r.LayerEsriMapServer("https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer"),s=new r.LayerEsriMapServer("https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer",{name:"Six Year Plan",legendCollapse:!0});a.addLayer(l.olLayer),a.addLayer(s.olLayer);var p=[l,s];new i.default(p,"legend-container",{})},8:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(2);t.proj4326=new n.proj.Projection({code:"EPSG:4326"}),t.proj3857=new n.proj.Projection({code:"EPSG:3857"}),t.proj3070=new n.proj.Projection({code:"EPSG:3070"})},9:function(e,t,o){"use strict";function n(e){return void 0===e||null===e}function r(e){return!n(e)}Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),a=i.default("util.checkDefined");t.undefinedOrNull=n,a.undefinedOrNull=n,t.definedAndNotNull=r,a.definedAndNotNull=r}}); //# sourceMappingURL=simple_map.js.map \ No newline at end of file diff --git a/test/serve/js/simple_map.js.map b/test/serve/js/simple_map.js.map index 3e60dc7a943d634aee6cb88d34664f2e716d6937..36bc36b139a7e7d490b1e58e60e652aec3e3054d 100644 --- a/test/serve/js/simple_map.js.map +++ b/test/serve/js/simple_map.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 7bb55fd41bd308ae26ba?4c44*","webpack:///./src/util/provide.ts?5c82*","webpack:///external \"$\"?57aa*","webpack:///./src/layers/LayerBase.ts?bf94*","webpack:///./src/olHelpers/geocode.ts?5a2f*","webpack:///./src/olHelpers/mapMoveCls.ts?cd45*","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7*","webpack:///./src/olHelpers/quickMapBase.ts?fb65*","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b*","webpack:///external \"ol\"?81ed*","webpack:///./src/layers/LayerEsriMapServer.ts?9c85","webpack:///./src/olHelpers/esriToOlStyle.ts?9363","webpack:///./src/util/makeGuid.ts?e80e*","webpack:///./src/olHelpers/mapInteractionBase.ts?f419*","webpack:///./src/collections/LayerLegend.ts?9de6","webpack:///./src/olHelpers/quickMap.ts?1069*","webpack:///./src/olHelpers/mapMove.ts?6a2b*","webpack:///./src/olHelpers/mapPopup.ts?5d6c*","webpack:///./src/_tests/demos/simple_map.ts","webpack:///./src/olHelpers/projections.ts?804b*","webpack:///./src/util/checkDefined.ts?bcd7*"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;A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AC;AAEtC;;;;GAIG;AACH,yBAAiC,KAAU;IACvC,YAAY,CAAC;IAEb,MAAM,CAAC,CAAC,OAAO,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC;AAC5D,CAAC;AAJD,0CAIC;AAED,EAAE,CAAC,eAAe,GAAG,eAAe,CAAC;AAGrC;;;;GAIG;AACH,2BAAmC,KAAU;IACzC,YAAY,CAAC;IAEb,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;AACrC,CAAC;AAJD,8CAIC;AAED,EAAE,CAAC,iBAAiB,GAAG,iBAAiB,CAAC","file":"simple_map.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 78);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 7bb55fd41bd308ae26ba","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachLayerAtPixel(pixel, (lyr) => {\r\n if (hit){\r\n return;\r\n }\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == lyr){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEU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38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9pFAV6GK2gPMXMX8gPk9zzxXgI1kimcAltEYr+cjio1imlKpEa9rOipLm+p+CZ6Bw//qd1/f/O+GwMxbSLpyoZEcwkyh2jIks+3hmdd2jWUw4scxNysnHxU7nSspTRcJjCZGL3IsjsYJMMg5mwgx7gaIOLBFCogAgBBoNa9w+DE6I+Bs7FTgwwrJbHjWDgpYo2KwtBTcYEDuloC9geQw+k2RGnPGpTaOlq7AS+YICUz4DZVaX2TiNDhuYfTtY4geLi0IoCm3XccwM9hx4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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHjKTHPPBo8CSJISqqq4wGGOcWylIGlgvgNX1Gd8vF5f+IUIwb30ng+Gg2QfBRIMvy0jG8SVkYo4N0zvUXVRztbJ/L6xL7lUZEXBEHkuZqlS6gEAUgKJurnhFtfpACOYd8b/hVbJPqwi44a6KA0sPVjIi/SIyxb3u8KlAJ0S8jRVgrlW+nVHPdrhiXCxu42d86ByksDc80P3MkJFBFQ8Ho1lQegpWJRWFGsDsRwwv7pIyvuQW0ZkrX6NDVFbqcvaQI8vbyqzt5A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k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer`\r\n}\r\n\r\nexport function localCacheUrl(folder: string, service: string): string{\r\n let loc = window.location.href;\r\n\r\n let url = `/mapserver/${folder}/${service}`;\r\n\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1){\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1){\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n } else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url\r\n }\r\n }\r\n\r\n\r\n return url;\r\n}\r\n\r\n\r\n\r\n\r\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n addPopup?: boolean;\r\n showLayers?: Array<number>;\r\n getLegend?: boolean;\r\n}\r\n\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nexport class LayerEsriMapServer extends LayerBase {\r\n _esriFormat: ol.format.EsriJSON;\r\n _popupRequest: JQueryXHR;\r\n _showLayers: number[];\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n constructor(url: string, options: LayerEsriMapServerOptions = {}) {\r\n\r\n super(url, options);\r\n this._source = new ol.source.TileArcGISRest(\r\n {\r\n url: this.url == '' ? undefined : this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : {layers: 'show:' + options.showLayers.join(',')}\r\n }\r\n );\r\n\r\n this._showLayers = options.showLayers || [];\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.Tile,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n });\r\n\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\r\n this._esriFormat = new ol.format.EsriJSON();\r\n this._popupRequest = null;\r\n\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n\r\n if (options.getLegend){\r\n this.addLegendContent();\r\n }\r\n\r\n if (options.addPopup) {\r\n mapPopup.addMapServicePopup(this);\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n\r\n $.get(urlCopy, {}, (d) => {\r\n let newHtml = esriToOl.makeMapServiceLegend(d, this._showLayers);\r\n super.addLegendContent(newHtml);\r\n }, 'json');\r\n }\r\n\r\n\r\n getPopupInfo(queryParams: {[s: string]: any}) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'identify?callback=?';\r\n\r\n let __this = this;\r\n\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n\r\n\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (let r of d['results']) {\r\n\r\n let popupHtml = '<table class=\"esri-popup-table\">';\r\n\r\n for (let a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n let attrVal = r['attributes'][a];\r\n\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n\r\n let attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n\r\n popupHtml += `<tr><td>${attr}</td><td>${attrVal}</td></tr>`;\r\n }\r\n }\r\n\r\n popupHtml += '</table>';\r\n\r\n mapPopup.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get source(): ol.source.TileArcGISRest {\r\n return super.getSource() as ol.source.TileArcGISRest;\r\n }\r\n\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get olLayer(): ol.layer.Tile {\r\n return super.getOlLayer() as ol.layer.Tile;\r\n }\r\n}\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexport default LayerEsriMapServer;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerEsriMapServer.ts","/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers.esriToOlStyle');\r\n\r\n\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray: [number, number, number], opacity: number): string {\r\n \"use strict\";\r\n\r\n return `rgba(${colorArray[0]},${colorArray[1]},${colorArray[2]},${opacity})`;\r\n}\r\n\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str: string): string {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface iEsriResponse{\r\n drawingInfo: {\r\n renderer: iEsriRenderer;\r\n transparency: number\r\n },\r\n geometryType: string\r\n}\r\n\r\n\r\nexport interface iEsriRenderer{\r\n type: string;\r\n symbol: iEsriSymbol;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n field1: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultLabel: string;\r\n}\r\n\r\nexport interface iEsriSymbol{\r\n size: number;\r\n type: string;\r\n outline:{\r\n color: [number, number, number];\r\n width: number;\r\n },\r\n color: [number, number, number];\r\n width: number;\r\n imageData: string\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n legendHtml: string;\r\n opacity: number;\r\n symbolObj: iEsriSymbol;\r\n olStyle: ol.style.Style;\r\n\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\ninterface ICommonSymbol{\r\n new (symbolObj: iEsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSMS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n let radius = this.symbolObj.size;\r\n\r\n\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({color: outerColor, width: outlineWidth})\r\n })\r\n });\r\n this.legendHtml = `<span class=\"legend-layer-icon\" style=\"color: ${innerColor}\">●</span>`;\r\n break;\r\n case 'esriPMS':\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({src: `data:image/png;base64,${this.symbolObj['imageData']}`})\r\n });\r\n this.legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${this.symbolObj['imageData']}\">`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass LineSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSLS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let lineWidth = this.symbolObj.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 4px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: -1px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass PolygonSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj['type']) {\r\n case 'esriSFS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `border: solid ${outerColor} 1px;`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 9px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: 2px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nexport interface iStyleFunc{\r\n (f: ol.Feature): ol.style.Style| ol.style.Style[]\r\n}\r\n\r\nclass SymbolGenerator {\r\n opacity: number;\r\n renderer: iEsriRenderer;\r\n legendHtml: string;\r\n olStyle: iStyleFunc | ol.style.Style;\r\n\r\n constructor(esriResponse: iEsriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n symbol: iEsriSymbol;\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.symbol = this.renderer.symbol;\r\n let symbolObj = new SymbolClass(this.symbol, this.opacity);\r\n this.olStyle = symbolObj.olStyle;\r\n this.legendHtml = symbolObj.legendHtml;\r\n }\r\n}\r\n\r\nclass UniqueValueSymbol extends SymbolGenerator {\r\n\r\n propertyName: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultStyle: ol.style.Style;\r\n defaultLabelHtml: string;\r\n labelArray: Array<string>;\r\n legendArray: Array<string>;\r\n propertyStyleLookup: {[s: string]: ol.style.Style};\r\n valueArray: Array<any>;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.uniqueValueInfos = this.renderer.uniqueValueInfos;\r\n this.propertyName = this.renderer.field1;\r\n this.defaultSymbol = this.renderer.defaultSymbol;\r\n\r\n\r\n if (this.defaultSymbol) {\r\n let symbolObj = new SymbolClass(this.defaultSymbol, this.opacity);\r\n this.defaultStyle = symbolObj.olStyle;\r\n this.defaultLabelHtml = `<span class=\"legend-layer-subitem\">${htmlEscape(this.renderer['defaultLabel'])}</span>` + symbolObj.legendHtml;\r\n } else {\r\n this.defaultStyle = undefined;\r\n this.defaultLabelHtml = 'other';\r\n }\r\n\r\n this.valueArray = [];\r\n this.labelArray = [];\r\n this.legendArray = [];\r\n this.propertyStyleLookup = {};\r\n\r\n for (let uniqueVal of this.uniqueValueInfos) {\r\n this.labelArray.push(uniqueVal['label']);\r\n this.valueArray.push(uniqueVal['value']);\r\n let uniqueSym = new SymbolClass(uniqueVal.symbol, this.opacity);\r\n this.legendArray.push(`<span class=\"legend-layer-subitem\">${htmlEscape(uniqueVal['label'])}</span>` + uniqueSym.legendHtml);\r\n this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n\r\n this.olStyle = (feature: ol.Feature): ol.style.Style[] => {\r\n let checkProperties = feature.getProperties();\r\n let checkProperty = checkProperties[this.propertyName];\r\n\r\n if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [this.propertyStyleLookup[checkProperty]];\r\n } else {\r\n return [this.defaultStyle];\r\n }\r\n };\r\n\r\n if (this.defaultLabelHtml !== null) {\r\n this.legendArray.push(this.defaultLabelHtml);\r\n }\r\n\r\n this.legendHtml = '<ul>';\r\n for (let h of this.legendArray) {\r\n this.legendHtml += `<li>${h}</li>`;\r\n }\r\n this.legendHtml += '</ul>';\r\n }\r\n}\r\n\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: iEsriResponse): {style: iStyleFunc | ol.style.Style, legend: string} {\r\n \"use strict\";\r\n let renderer = esriResponse.drawingInfo.renderer;\r\n let symbolLegendOut: SymbolGenerator = null;\r\n\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n\r\n if (symbolLegendOut == null) {\r\n return {style: undefined, legend: ''};\r\n } else {\r\n return {style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml};\r\n }\r\n}\r\n\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\r\n\r\nexport interface iMapServiceLegend{\r\n layerName: string;\r\n legend: {label: string, imageData: string}[]\r\n}\r\n\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject: iMapServiceLegend, skipLayerNameAndExpander: boolean = false) {\r\n\r\n\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n let layerName = lyrObject['layerName'];\r\n let legendItems = lyrObject['legend'];\r\n let legendHtml = '';\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += `<span class=\"legend-layer-subitem\">${layerName}</span>`;\r\n }\r\n\r\n if (legendItems.length == 1) {\r\n legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[0]['imageData']}\">`;\r\n } else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (let i = 0; i < legendItems.length; i++) {\r\n legendHtml += `<li>`;\r\n legendHtml += `<span class=\"legend-layer-subitem\">${htmlEscape(legendItems[i]['label'])}</span>`;\r\n legendHtml += `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[i]['imageData']}\">`;\r\n legendHtml += `</li>`;\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = `<span class=\"legend-layer-subitem\">${layerName}</span>` + legendHtml;\r\n }\r\n\r\n return legendHtml;\r\n}\r\n\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse: {layers: iMapServiceLegend[]}, showLayers: number[] = []) {\r\n \"use strict\";\r\n\r\n let newLegendHtml = '';\r\n\r\n let layers = esriResponse['layers'];\r\n\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n } else {\r\n newLegendHtml += '<ul>';\r\n for (let i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0){\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n\r\n return newLegendHtml;\r\n}\r\n\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/esriToOlStyle.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/16/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport mapMove from '../olHelpers/mapMove';\r\n\r\nlet nm = provide('collections');\r\nimport $ = require('jquery');\r\nimport {LayerBase} from \"../layers\";\r\n\r\nexport interface iLegendItem{\r\n groupName: string;\r\n collapse?: boolean;\r\n addCheck?: boolean;\r\n items: Array<iLegendItem|LayerBase>\r\n}\r\n\r\nexport interface iLegendOptions{\r\n layerDivClasses?: string[]\r\n legendTitle?: string\r\n scaleDependent?: boolean\r\n}\r\n\r\nclass LayerGroup {\r\n groupLayers: any;\r\n groupLayersLookup: any;\r\n groupGroupsLookup: any;\r\n groupGroups: any;\r\n itemIdArray: any;\r\n groupId: any;\r\n groupName: any;\r\n allLayerArray: any;\r\n parent: any;\r\n allGroupArray: any;\r\n allGroupLookup: any;\r\n allLayerLookup: any;\r\n collapse: boolean;\r\n addCheck: boolean;\r\n layerParentLookup: any;\r\n\r\n /**\r\n *\r\n * @param {object} [groupConfig={}] - group configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n * @param {LayerGroup} [parent=undefined] - the parent group\r\n */\r\n constructor(groupConfig?: iLegendItem, parent?: LayerGroup) {\r\n this.groupLayers = [];\r\n this.groupLayersLookup = {};\r\n this.groupGroups = [];\r\n this.groupGroupsLookup = {};\r\n this.itemIdArray = [];\r\n\r\n if (typeof groupConfig == 'undefined') {\r\n this.parent = null;\r\n this.groupId = 'root';\r\n this.groupName = 'root';\r\n this.allGroupLookup = {root: this};\r\n this.allGroupArray = [this];\r\n this.allLayerArray = [];\r\n this.allLayerLookup = {};\r\n this.layerParentLookup = {};\r\n this.collapse = false;\r\n this.addCheck = false;\r\n } else {\r\n this.groupId = makeGuid();\r\n this.parent = parent;\r\n this.groupName = groupConfig.groupName;\r\n this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {object} groupConfig - configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n * @param {Array<LayerGroup>} parents parent groups\r\n * @returns {LayerGroup} the layer group just added\r\n */\r\n addGroup(groupConfig: iLegendItem, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n let newGroup = new LayerGroup(groupConfig, parentGroup);\r\n this.allGroupLookup[newGroup.groupId] = newGroup;\r\n this.allGroupArray.push(newGroup);\r\n\r\n parentGroup.groupGroups.push(newGroup);\r\n parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n\r\n if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n console.log(newGroup.groupId);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newGroup.groupId);\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase} newLayer the layer to be added\r\n * @param {Array} parents array\r\n */\r\n addLegendLayer(newLayer: LayerBase, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n this.allLayerLookup[newLayer.id] = newLayer;\r\n this.allLayerArray.push(newLayer);\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n\r\n parentGroup.groupLayers.push(newLayer);\r\n parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n console.log(newLayer.id);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newLayer.id);\r\n\r\n this.layerParentLookup[newLayer.id] = parentGroup;\r\n\r\n }\r\n\r\n\r\n\r\n getLegendHtml(legendId: string, options: iLegendOptions) {\r\n\r\n\r\n let legendHtml = `<ul id=\"${legendId}\" class=\"legend-container\">`;\r\n\r\n legendHtml += `<li>${options.legendTitle}<input type=\"checkbox\" checked id=\"suppress-by-extent-${legendId}\" class=\"suppress-by-extent\">` +\r\n `<label title=\"Suppress layers not visible at this zoom level\" for=\"suppress-by-extent-${legendId}\">` +\r\n `<span></span>` +\r\n `</label></li>`;\r\n\r\n legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n\r\n return legendHtml;\r\n }\r\n\r\n /**\r\n * @param {Array} itemIds the items to process\r\n * @param {LayerGroup} theGroup new group\r\n * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n * @static\r\n * @returns {string} html string\r\n */\r\n _buildLegend(itemIds: string[], theGroup: LayerGroup, layerDivClasses: string[]): string {\r\n\r\n if (itemIds.length == 0) {\r\n return '';\r\n }\r\n\r\n let theHml = '';\r\n\r\n let itemId = itemIds[0];\r\n\r\n if (theGroup.groupLayersLookup[itemId]) {\r\n\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let lyr = theGroup.groupLayersLookup[itemId];\r\n theHml += `<li id=\"${lyr.id}-layer-li\" class=\"legend-layer-li ${layerDivClasses.join(' ')}\">` + lyr.getLegendDiv() + '</li>';\r\n\r\n\r\n } else if (theGroup.groupGroupsLookup[itemId]) {\r\n /**\r\n * type {LayerGroup}\r\n */\r\n let otherGroup = theGroup.groupGroupsLookup[itemId];\r\n\r\n theHml += `<li>`;\r\n theHml += `<div id=\"${otherGroup.groupId}-legend-layer-div\" ` +\r\n `class=\"legend-layer-group ${layerDivClasses.join(' ')}\">`;\r\n\r\n if (otherGroup.addCheck) {\r\n theHml += `<input type=\"checkbox\" checked id=\"${otherGroup.groupId}-group-chck\">` +\r\n `<label for=\"${otherGroup.groupId}-group-chck\" title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n } else {\r\n theHml += `<label title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n }\r\n\r\n theHml += `<span title=\"Expand/Collapse\" class=\"layer-group-expander`;\r\n theHml += `${otherGroup.collapse ? ' legend-layer-group-initial-collapse' : ''}\">`;\r\n theHml += otherGroup.collapse ? '▶' : '▼';\r\n theHml += '</span>';\r\n\r\n //parents.push(groupId);\r\n theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n theHml += '</div>';\r\n theHml += '</li>';\r\n }\r\n\r\n return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n }\r\n}\r\n\r\n\r\n/**\r\n * a wrapper to make a legend\r\n */\r\nexport class LayerLegend {\r\n\r\n $divElement: JQuery;\r\n _legendItems: Array<iLegendItem|LayerBase>;\r\n layerGroup: any;\r\n legendId: string;\r\n\r\n /**``\r\n *\r\n * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n * @param {string} divId the div where the legend should be added\r\n * @param {object} options for legend\r\n * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n * @param {string} [options.legendTitle=Legend] the legend title\r\n * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n */\r\n constructor(legendItems: Array<iLegendItem|LayerBase>, divId: string, options: iLegendOptions = {}) {\r\n for (let i of legendItems) {\r\n if (typeof i == 'undefined') {\r\n throw 'undefined item passed in array to legend constructor';\r\n }\r\n }\r\n\r\n options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n options.layerDivClasses = options.layerDivClasses || [];\r\n\r\n // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n }\r\n\r\n this.$divElement = $('#' + divId);\r\n\r\n this._legendItems = legendItems;\r\n\r\n this.layerGroup = new LayerGroup();\r\n\r\n this._buildTree(legendItems);\r\n\r\n this.legendId = makeGuid();\r\n\r\n this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n\r\n for (let l of this.layerGroup.allLayerArray){\r\n l.applyCollapse();\r\n }\r\n\r\n let _this = this;\r\n //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n\r\n mapMove.addCallback(function (ext, zoom, evt) {\r\n\r\n if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n for (let lyr of this.layerGroup.allLayerArray) {\r\n let $lyrLi = $('#' + lyr.id + '-layer-li');\r\n if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n $lyrLi.addClass('layer-not-visible');\r\n } else {\r\n $lyrLi.removeClass('layer-not-visible');\r\n }\r\n }\r\n }\r\n }, this, 100, true, 'legend1');\r\n }\r\n\r\n // <editor-fold desc=\"add event listeners\">\r\n\r\n this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n let legendLayerLis = $('.legend-layer-li');\r\n if (this.checked) {\r\n legendLayerLis.removeClass('layer-force-show');\r\n } else {\r\n legendLayerLis.addClass('layer-force-show');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-check').change(function () {\r\n let lyrId = this.id.replace('-legend-layer-check', '');\r\n _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n });\r\n\r\n this.$divElement.find('.layer-group-expander').click(function () {\r\n let $this = $(this);\r\n $this.removeClass('legend-layer-group-initial-collapse');\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')){\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n // </editor-fold>\r\n }\r\n\r\n\r\n /**\r\n * @param {Array} [legendItems=this._layerConfig] the legend items\r\n * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n * @private\r\n */\r\n _buildTree(legendItems: Array<iLegendItem|LayerBase>, parents?: string[]) {\r\n\r\n if (legendItems.length == 0) {\r\n return;\r\n }\r\n\r\n let oneItem = legendItems[0];\r\n\r\n //reset the parent if the item is in the base array\r\n if ((this._legendItems as Array<any>).indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n parents = [];\r\n }\r\n\r\n if (typeof (oneItem as iLegendItem).groupName !== 'undefined') {\r\n let groupItem = legendItems[0];\r\n let newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n parents.push(newGroup.groupId);\r\n this._buildTree((oneItem as iLegendItem).items, parents);\r\n } else {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let layerItem: LayerBase = legendItems[0] as LayerBase;\r\n\r\n this.layerGroup.addLegendLayer(layerItem, parents);\r\n }\r\n\r\n this._buildTree(legendItems.slice(1), parents);\r\n }\r\n}\r\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 9/23/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\nimport LayerLegend from '../../collections/LayerLegend';\r\n\r\n\r\nlet map = quickMap();\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\n\r\nlet sixYearPlan = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', {name: 'Six Year Plan', legendCollapse: true});\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(sixYearPlan.olLayer);\r\n\r\nlet layerArray = [\r\n wisDotRegions,\r\n sixYearPlan\r\n // tipConfig.tipSegmentLayer,\r\n // tipConfig.metamanagerSegments,\r\n // {\r\n // groupName: 'ITS Inventory Layers',\r\n // collapse: true,\r\n // addCheck: false,\r\n // items: tipConfig.itsLayerCollection.layers\r\n // }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/simple_map.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///simple_map.js","webpack:///webpack/bootstrap 99693f14fcb3e83c98ca?ad23*","webpack:///./src/util/provide.ts?5c82*","webpack:///external \"$\"?57aa*","webpack:///./src/layers/LayerBase.ts?bf94*","webpack:///./src/olHelpers/geocode.ts?5a2f*","webpack:///./src/olHelpers/mapMoveCls.ts?cd45*","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7*","webpack:///./src/olHelpers/quickMapBase.ts?fb65*","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b*","webpack:///external \"ol\"?81ed*","webpack:///./src/layers/LayerEsriMapServer.ts?9c85","webpack:///./src/olHelpers/esriToOlStyle.ts?9363","webpack:///./src/util/makeGuid.ts?e80e*","webpack:///./src/olHelpers/mapPopup.ts?5d6c*","webpack:///./src/collections/LayerLegend.ts?9de6","webpack:///./src/olHelpers/mapInteractionBase.ts?f419*","webpack:///./src/olHelpers/quickMap.ts?1069*","webpack:///./src/olHelpers/mapMove.ts?6a2b*","webpack:///./src/_tests/demos/simple_map.ts","webpack:///./src/olHelpers/projections.ts?804b*","webpack:///./src/util/checkDefined.ts?bcd7*"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","1","$","10","zoomResolutionConvert","provide_1","makeGuid_1","nm","LayerBase","url","options","this","_url","_params","params","_legendCollapse","legendCollapse","_legendCheckbox","legendCheckbox","id","_name","animate","_opacity","opacity","_visible","visible","_source","undefined","_olLayer","_loaded","_maxResolution","zoomToResolution","minZoom","_minResolution","maxZoom","_minZoom","_maxZoom","_zIndex","zIndex","loadCallback","_legendContent","_$legendDiv","_applyCollapseCalled","_addLegendContent","legendContent","_load","loaded","getLegendDiv","additionalContent","indexOf","append","applyCollapse","addLegendContent","console","log","$expander","find","click","$this","siblings","slideToggle","hasClass","removeClass","html","addClass","trigger","refresh","source","_id","set","newId","_animate","newVal","newParams","visibility","setVisible","olLayer","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","11","ol","projections_1","invalidClass","geocoderLoadingClass","Geocode","mapDiv","map","_this","inputGuid","makeGuid","buttonGuid","indicationLayer","layer","Vector","style","Style","image","Circle","radius","fill","Fill","color","stroke","Stroke","width","addLayer","theButton","document","getElementById","theInput","reset","$theButton","$theInput","evt","preventDefault","disabled","clear","lat","parseFloat","lon","title","v","getView","geom","Point","feat","Feature","addFeature","transform","proj4326","proj3857","setCenter","getCoordinates","setZoom","keyup","keyCode","12","__extends","extendStatics","setPrototypeOf","__proto__","Array","b","__","constructor","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","init","theMap","on","e","_updateMapExtent","triggerLyrLoad","type","triggerMoveCallback","theView","getZoom","extentArray","calculateExtent","getSize","minX","minY","maxX","maxY","lyr","index","eventType","undefinedOrNull","definedAndNotNull","clearTimeout","abort","callbackFunc","mapMoveBefore","mapMoveMakeGetParams","__this_1","innerFunction","theLayer","theIndex","_innerThis","mapMoveParams","mapMoveCallback","fail","jqXHR","statusText","always","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","_checkInit","push","addCallback","func","context","delay","13","FeatureLayerProperties","feature","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","_map","addOverlay","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","forEachFeatureAtPixel","vLyr","getTargetElement","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","j","hasLyr","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","theStyle","olStyle","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","14","quickMapBase","divId","center","x","y","zoom","baseSwitcher","fullScreen","addGeocode","css","osmLayer","Tile","OSM","proj","Projection","code","coordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","geocode_1","17","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","2","25","makeServiceUrl","folder","service","localCacheUrl","loc","location","href","toLowerCase","LayerBase_1","esriToOl","mapPopup_1","LayerEsriMapServer","TileArcGISRest","showLayers","_showLayers","minResolution","maxResolution","addPopup","_esriFormat","format","EsriJSON","_popupRequest","getLegend","urlCopy","newHtml","makeMapServiceLegend","r","a","attrVal","toString","attr","slice","readFeature","27","_colorArrayToRgba","colorArray","htmlEscape","str","String","replace","makeFeatureServiceLegendAndSymbol","esriResponse","renderer","drawingInfo","symbolLegendOut","SingleSymbol","PointSymbol","LineSymbol","PolygonSymbol","alert","UniqueValueSymbol","legend","legendHtml","mapServiceLegendItem","lyrObject","skipLayerNameAndExpander","legendItems","newLegendHtml","CommonSymbol","symbolObj","innerColor","outerColor","outline","outlineWidth","size","Icon","src","lineWidth","SymbolGenerator","SymbolClass","symbol","uniqueValueInfos","propertyName","field1","defaultSymbol","defaultStyle","defaultLabelHtml","valueArray","labelArray","legendArray","propertyStyleLookup","uniqueVal","uniqueSym","checkProperties","checkProperty","_b","_c","h","3","Math","random","4","mapPopupCls_1","mapPopup","46","mapMove_1","LayerGroup","groupConfig","parent","groupLayers","groupLayersLookup","groupGroups","groupGroupsLookup","itemIdArray","groupId","groupName","allGroupLookup","root","allGroupArray","allLayerArray","allLayerLookup","layerParentLookup","collapse","addCheck","addGroup","parents","parentGroup","newGroup","addLegendLayer","newLayer","getLegendHtml","legendId","legendTitle","_buildLegend","layerDivClasses","itemIds","theGroup","theHml","itemId","otherGroup","LayerLegend","legendItems_1","scaleDependent","checkInit","$divElement","_legendItems","layerGroup","_buildTree","ext","$lyrLi","change","legendLayerLis","checked","lyrId","prop","oneItem","groupItem","items","layerItem","5","MapInteractionBase","subtype","_initialized","_subtype","initialized","msg","6","quickMap","quickMapBase_1","7","mapMoveCls_1","mapMove","77","quickMap_1","LayerEsriMapServer_1","LayerLegend_1","wisDotRegions","sixYearPlan","layerArray","8","proj3070","9","input"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAb,EAAAoB,EAAA,SAAAhB,GACA,GAAAS,GAAAT,KAAAiB,WACA,WAA2B,MAAAjB,GAAA,SAC3B,WAAiC,MAAAA,GAEjC,OADAJ,GAAAW,EAAAE,EAAA,IAAAA,GACAA,GAIAb,EAAAc,EAAA,SAAAQ,EAAAC,GAAsD,MAAAR,QAAAS,UAAAC,eAAAlB,KAAAe,EAAAC,IAGtDvB,EAAA0B,EAAA,GAGA1B,IAAA2B,EAAA,MDMMC,EACA,SAAUxB,EAAQD,EAASH,GAEjC,YE/DA,SAAA6B,GAAiBC,G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H,GAEjC,YqB5hFA,SAAA+N,GAAiCqV,GAG7B,MAAyB,UAAVA,GAAmC,OAAVA,EAW5C,QAAApV,GAAmCoV,GAG/B,OAASrV,EAAgBqV,GrB6gF7BriB,OAAOC,eAAeb,EAAS,cAAgBO,OAAO,GqBtiFtD,IAAAiC,GAAA3C,EAAA,GACI6C,EAAKF,EAAAL,QAAQ,oBAOjBnC,GAAA4N,kBAMAlL,EAAGkL,gBAAkBA,EAQrB5N,EAAA6N,oBAMAnL,EAAGmL,kBAAoBA","file":"simple_map.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 77);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n\n/***/ 10:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar zoomResolutionConvert = __webpack_require__(17);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nvar LayerBase = (function () {\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n function LayerBase(url, options) {\r\n if (options === void 0) { options = {}; }\r\n options = options || {};\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n this.id = options.id || makeGuid_1.default();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n }\r\n else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n this._source = undefined;\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n this._legendContent = '';\r\n if (this._legendCheckbox) {\r\n this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n else {\r\n this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n }\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n LayerBase.prototype._load = function () {\r\n if (this.loaded == true) {\r\n return true;\r\n }\r\n else {\r\n this._loaded = true;\r\n return false;\r\n }\r\n };\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n LayerBase.prototype.getLegendDiv = function () {\r\n return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n };\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n if (additionalContent === void 0) { additionalContent = ''; }\r\n var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n this._legendContent += additionalContent;\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n };\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n this._addLegendContent(additionalContent);\r\n };\r\n LayerBase.prototype.applyCollapse = function () {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n return undefined;\r\n }\r\n this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n if (this._$legendDiv.length > 0) {\r\n var $expander = this._$legendDiv.find('.legend-items-expander');\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n $expander.click(function () {\r\n var $this = $(this);\r\n $this.siblings('ul').slideToggle();\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n }\r\n else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * trick to refresh the layer\r\n */\r\n LayerBase.prototype.refresh = function () {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"id\", {\r\n get: function () {\r\n return this._id;\r\n },\r\n set: function (newId) {\r\n this._id = newId;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n get: function () {\r\n return this._animate;\r\n },\r\n set: function (animate) {\r\n this._animate = animate;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._legendContent;\r\n },\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set: function (newVal) {\r\n this._legendContent = newVal;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"params\", {\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get: function () {\r\n return this._params;\r\n },\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set: function (newParams) {\r\n this._params = newParams;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxResolution;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._minZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get: function () {\r\n return this._maxZoom;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"url\", {\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._url;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._visible;\r\n },\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set: function (visibility) {\r\n this.setVisible(visibility);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setVisible = function (visibility) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get: function () {\r\n return this._opacity;\r\n },\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set: function (opacity) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"name\", {\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get: function () {\r\n return this._name;\r\n },\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set: function (newName) {\r\n this._name = newName;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get: function () {\r\n return this._loaded;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerBase.prototype, \"source\", {\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get: function () {\r\n return this.getSource();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getSource = function () {\r\n return this._source;\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n /**\r\n * get the z index\r\n */\r\n get: function () {\r\n return this._zIndex;\r\n },\r\n /**\r\n * set the z index\r\n */\r\n set: function (newZ) {\r\n this._zIndex = newZ;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.setZIndex = function (newZ) {\r\n };\r\n Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n /**\r\n * the the ol layer\r\n */\r\n get: function () {\r\n return this.getOlLayer();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n LayerBase.prototype.getOlLayer = function () {\r\n return this._olLayer;\r\n };\r\n return LayerBase;\r\n}());\r\nexports.LayerBase = LayerBase;\r\nnm.LayerBase = LayerBase;\r\nexports.default = LayerBase;\r\n\n\n/***/ }),\n\n/***/ 11:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar $ = __webpack_require__(1);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar ol = __webpack_require__(2);\r\nvar projections_1 = __webpack_require__(8);\r\nvar invalidClass = 'geocoder-invalid';\r\nvar geocoderLoadingClass = 'geocoder-loading';\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\nvar Geocode = (function () {\r\n function Geocode(mapDiv, map) {\r\n var _this = this;\r\n var inputGuid = makeGuid_1.makeGuid();\r\n var buttonGuid = makeGuid_1.makeGuid();\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({ color: 'rgba(255,0,0,0.5)' }),\r\n stroke: new ol.style.Stroke({ color: 'red', width: 1 })\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n (\"<input type=\\\"text\\\" id=\\\"\" + inputGuid + \"\\\">\") +\r\n (\"<button id=\\\"\" + buttonGuid + \"\\\">Search</button>\") +\r\n '</div>');\r\n this.theButton = document.getElementById(buttonGuid);\r\n this.theInput = document.getElementById(inputGuid);\r\n this.reset();\r\n var $theButton = $(this.theButton);\r\n var $theInput = $(this.theInput);\r\n $theButton.click(function (evt) {\r\n evt.preventDefault();\r\n $theButton.addClass(geocoderLoadingClass);\r\n _this.theButton.disabled = true;\r\n _this.indicationLayer.getSource().clear();\r\n $.get(\"https://geocode.xyz/\" + _this.theInput.value + \"?geoit=json\", {}, function (d) {\r\n var lat = parseFloat(d['latt']);\r\n var lon = parseFloat(d['longt']);\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n _this.theInput.title = 'Specified Location Invalid';\r\n _this.theButton.title = 'Specified Location Invalid';\r\n }\r\n else {\r\n var v = _this.map.getView();\r\n var p = new ol.geom.Point([lon, lat]);\r\n var feat = new ol.Feature(p);\r\n _this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(projections_1.proj4326, projections_1.proj3857);\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n $theButton.removeClass(geocoderLoadingClass);\r\n _this.theButton.disabled = false;\r\n }, 'json');\r\n });\r\n $(this.theInput).keyup(function (evt) {\r\n evt.preventDefault();\r\n _this.theButton.disabled = _this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n _this.theInput.title = '';\r\n _this.theButton.title = '';\r\n if (!_this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n });\r\n }\r\n Geocode.prototype.reset = function () {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n };\r\n return Geocode;\r\n}());\r\nexports.Geocode = Geocode;\r\n\n\n/***/ }),\n\n/***/ 12:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar checkDefined = __webpack_require__(9);\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nvar MapMoveCls = (function (_super) {\r\n __extends(MapMoveCls, _super);\r\n /**\r\n * constructor called implicitly\r\n */\r\n function MapMoveCls() {\r\n var _this = _super.call(this, 'map move') || this;\r\n _this._arrLyrRequest = [];\r\n _this._arrLyrTimeout = [];\r\n _this._arrLayer = [];\r\n _this._lookupLayer = {};\r\n _this._mapMoveCallbacks = [];\r\n _this._mapMoveCallbacksLookup = {};\r\n _this._mapMoveCallbackDelays = [];\r\n _this._mapMoveCallbackContext = [];\r\n _this._mapMoveCallbackTimeout = [];\r\n _this._mapExtent = undefined;\r\n _this._zoomLevel = undefined;\r\n return _this;\r\n }\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n MapMoveCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n _this._updateMapExtent();\r\n // trigger the layer updates\r\n for (var i = 0; i < _this._arrLayer.length; i++) {\r\n _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n }\r\n // trigger the map callbacks\r\n for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n _this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n };\r\n MapMoveCls.prototype._updateMapExtent = function () {\r\n var theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n var extentArray = theView.calculateExtent(this.map.getSize());\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n };\r\n Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n /**\r\n * return the map extent\r\n */\r\n get: function () {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n return this._mapExtent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n }\r\n else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n }\r\n else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n // dummy callback used if before load returns false\r\n var callbackFunc = function () { };\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n var __this_1 = this;\r\n callbackFunc = function () {\r\n function innerFunction(theLayer, theIndex) {\r\n var _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this_1, lyr, index);\r\n };\r\n }\r\n else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n };\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n throw 'either the function index or the id must be defined';\r\n }\r\n if (typeof ind !== 'number') {\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n if (ind < 0) {\r\n console.log('function not found');\r\n return;\r\n }\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n var ctx = this._mapMoveCallbackContext[ind];\r\n var theFunc = this._mapMoveCallbacks[ind];\r\n var __this = this;\r\n var f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n };\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n };\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId) {\r\n functionId = makeGuid_1.default();\r\n }\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n };\r\n return MapMoveCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapMoveCls = MapMoveCls;\r\nnm.MapMoveCls = MapMoveCls;\r\nexports.default = MapMoveCls;\r\n\n\n/***/ }),\n\n/***/ 13:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapInteractionBase_1 = __webpack_require__(5);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('olHelpers');\r\nvar FeatureLayerProperties = (function () {\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n get: function () {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n }\r\n else {\r\n return this.layer.name;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FeatureLayerProperties;\r\n}());\r\nexports.FeatureLayerProperties = FeatureLayerProperties;\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nvar MapPopupCls = (function (_super) {\r\n __extends(MapPopupCls, _super);\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n /**\r\n * map popup constructor\r\n */\r\n function MapPopupCls() {\r\n var _this = _super.call(this, 'map popup') || this;\r\n _this._arrPopupLayerIds = [];\r\n _this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n _this._arrPopupContentFunction = [];\r\n _this._$popupContainer = undefined;\r\n _this._$popupContent = undefined;\r\n _this._$popupCloser = undefined;\r\n _this._popupOverlay = undefined;\r\n _this._selectionLayers = [];\r\n _this._selectionLayerLookup = {};\r\n _this._mapClickFunctions = [];\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n _this._popupChangedFunctions = [];\r\n _this._esriMapServiceLayers = [];\r\n _this._popupOpen = false;\r\n _this._popupCoordinate = null;\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n _this._popupContentLength = 0;\r\n return _this;\r\n }\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n MapPopupCls.prototype.init = function (theMap) {\r\n var _this = this;\r\n _super.prototype.init.call(this, theMap);\r\n var $map;\r\n var target = this.map.getTarget();\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n $map.append('<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>');\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n var _ease = function (n) {\r\n return ol.easing.inAndOut(n);\r\n };\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n this._map.addOverlay(this._popupOverlay);\r\n this._$popupCloser.click(function (evt) {\r\n _this.closePopup();\r\n });\r\n // display popup on click\r\n this._map.on('singleclick', function (evt) {\r\n _this.closePopup();\r\n _this._popupCoordinate = evt['coordinate'];\r\n // esri map service layers\r\n if (_this._esriMapServiceLayers.length > 0) {\r\n var queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n imageDisplay: _this._map.getSize().join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n var l = _a[_i];\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n _this._passThroughLayerFeatureArray = [];\r\n _this._currentPopupIndex = -1;\r\n for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n var featObj = layerFeatureObjectArray[i];\r\n var props = featObj.feature.getProperties();\r\n var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n }\r\n else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse;\r\n _this._passThroughLayerFeatureArray.push(featObj);\r\n }\r\n else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n _this._currentPopupIndex = -1;\r\n var popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n popupHtml += \"<span> of </span>\";\r\n popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n popupHtml += \"<span> - </span>\";\r\n popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n popupHtml += '</div>';\r\n _this._$popupContent.html(popupHtml);\r\n _this._$popupContent.find('.previous-popup').click(function () {\r\n if (_this._popupContentLength == 1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == 0) {\r\n _this._currentPopupIndex = _this._popupContentLength - 1;\r\n }\r\n else {\r\n _this._currentPopupIndex--;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n var nextPopup = _this._$popupContent.find('.next-popup');\r\n nextPopup.click(function () {\r\n if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n _this._currentPopupIndex = 0;\r\n }\r\n else {\r\n _this._currentPopupIndex++;\r\n }\r\n _this._triggerFeatSelect();\r\n });\r\n if (_this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n _this._$popupContent.scrollTop(0);\r\n _this._popupOpen = true;\r\n }\r\n });\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', function (evt) {\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n var hit = false;\r\n _this.map.forEachFeatureAtPixel(pixel, function (f, l) {\r\n if (hit) {\r\n return;\r\n }\r\n for (var _i = 0, _a = _this._arrPopupLayers; _i < _a.length; _i++) {\r\n var vLyr = _a[_i];\r\n if (vLyr.olLayer == l) {\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n var mapElement = _this.map.getTargetElement();\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n };\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n MapPopupCls.prototype._triggerFeatSelect = function () {\r\n var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f(this._$popupContent);\r\n }\r\n };\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n featLayerObject.popupContent = popupContent;\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n };\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n var _this = this;\r\n var layerFeatureObjectArray = [];\r\n this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n var hasLyr = false;\r\n var j;\r\n var lyr = null;\r\n for (j = 0; j < _this._arrPopupLayers.length; j++) {\r\n lyr = _this._arrPopupLayers[j];\r\n if (lyr.olLayer === layer) {\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(new FeatureLayerProperties(feature, lyr, j, _this._selectionLayers[j]));\r\n }\r\n });\r\n return layerFeatureObjectArray;\r\n };\r\n MapPopupCls.prototype.closePopup = function () {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n return false;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n };\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n this._checkInit();\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n var theStyle;\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n }\r\n else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n var selectionLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n });\r\n selectionLayer.setZIndex(100);\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n return selectionLayer;\r\n };\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n return selectionLayer;\r\n };\r\n ;\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n };\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n return selectionLayer;\r\n };\r\n MapPopupCls.prototype.clearSelection = function () {\r\n this._checkInit();\r\n for (var i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n var f = _a[_i];\r\n f();\r\n }\r\n };\r\n ;\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n this._mapClickFunctions.push(func);\r\n };\r\n return MapPopupCls;\r\n}(mapInteractionBase_1.default));\r\nexports.MapPopupCls = MapPopupCls;\r\nnm.MapPopupCls = MapPopupCls;\r\nexports.default = MapPopupCls;\r\n\n\n/***/ }),\n\n/***/ 14:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar geocode_1 = __webpack_require__(11);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nfunction quickMapBase(options) {\r\n if (options === void 0) { options = {}; }\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || { x: -10018378, y: 5574910 };\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n var $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n var osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw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05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8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PXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n var coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n var controls = ol.control.defaults({\r\n attributionOptions: { collapsible: false }\r\n });\r\n var view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n var map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n if (options.addGeocode) {\r\n new geocode_1.Geocode(document.getElementById(options.divId), map);\r\n }\r\n return map;\r\n}\r\nexports.quickMapBase = quickMapBase;\r\nnm.quickMapBase = quickMapBase;\r\nexports.default = quickMapBase;\r\n\n\n/***/ }),\n\n/***/ 17:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\nvar _zoomResLookup = [\r\n 156543.03392804097,\r\n 78271.51696402048,\r\n 39135.75848201024,\r\n 19567.87924100512,\r\n 9783.93962050256,\r\n 4891.96981025128,\r\n 2445.98490512564,\r\n 1222.99245256282,\r\n 611.49622628141,\r\n 305.748113140705,\r\n 152.8740565703525,\r\n 76.43702828517625,\r\n 38.21851414258813,\r\n 19.109257071294063,\r\n 9.554628535647032,\r\n 4.777314267823516,\r\n 2.388657133911758,\r\n 1.194328566955879,\r\n 0.5971642834779395,\r\n 0.29858214173896974,\r\n 0.14929107086948487,\r\n 0.07464553543474244,\r\n 0.03732276771737122,\r\n 0.01866138385868561,\r\n 0.009330691929342804,\r\n 0.004665345964671402,\r\n 0.002332672982335701,\r\n 0.0011663364911678506,\r\n 0.0005831682455839253 //28\r\n];\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nfunction zoomToResolution(zoomLevel) {\r\n \"use strict\";\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n }\r\n else {\r\n console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n return undefined;\r\n }\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nexports.zoomToResolution = zoomToResolution;\r\nnm.zoomToResolution = zoomToResolution;\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nfunction resolutionToZoom(resolution) {\r\n for (var i = 0; i < _zoomResLookup.length; i++) {\r\n if (resolution >= _zoomResLookup[i]) {\r\n return i;\r\n }\r\n }\r\n return 0;\r\n}\r\nexports.resolutionToZoom = resolutionToZoom;\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ }),\n\n/***/ 2:\n/***/ (function(module, exports) {\n\nmodule.exports = ol;\n\n/***/ }),\n\n/***/ 25:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nvar LayerBase_1 = __webpack_require__(10);\r\nvar esriToOl = __webpack_require__(27);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('layers');\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nfunction makeServiceUrl(folder, service) {\r\n return \"https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/\" + folder + \"/\" + service + \"/MapServer\";\r\n}\r\nexports.makeServiceUrl = makeServiceUrl;\r\nfunction localCacheUrl(folder, service) {\r\n var loc = window.location.href;\r\n var url = \"/mapserver/\" + folder + \"/\" + service;\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1) {\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1) {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n }\r\n else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url;\r\n }\r\n }\r\n return url;\r\n}\r\nexports.localCacheUrl = localCacheUrl;\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nvar LayerEsriMapServer = (function (_super) {\r\n __extends(LayerEsriMapServer, _super);\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n function LayerEsriMapServer(url, options) {\r\n if (options === void 0) { options = {}; }\r\n var _this = _super.call(this, url, options) || this;\r\n _this._source = new ol.source.TileArcGISRest({\r\n url: _this.url == '' ? undefined : _this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') }\r\n });\r\n _this._showLayers = options.showLayers || [];\r\n _this._olLayer = new ol.layer.Tile({\r\n source: _this._source,\r\n visible: _this.visible,\r\n opacity: _this.opacity,\r\n minResolution: _this._minResolution,\r\n maxResolution: _this._maxResolution\r\n });\r\n _this._olLayer.setZIndex(_this._zIndex);\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n _this._esriFormat = new ol.format.EsriJSON();\r\n _this._popupRequest = null;\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n if (options.getLegend) {\r\n _this.addLegendContent();\r\n }\r\n if (options.addPopup) {\r\n mapPopup_1.default.addMapServicePopup(_this);\r\n }\r\n return _this;\r\n }\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) {\r\n var _this = this;\r\n var urlCopy = this.url;\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n $.get(urlCopy, {}, function (d) {\r\n var newHtml = esriToOl.makeMapServiceLegend(d, _this._showLayers);\r\n _super.prototype.addLegendContent.call(_this, newHtml);\r\n }, 'json');\r\n };\r\n LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n var urlCopy = this.url;\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n urlCopy += 'identify?callback=?';\r\n var __this = this;\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (var _i = 0, _a = d['results']; _i < _a.length; _i++) {\r\n var r = _a[_i];\r\n var popupHtml = '<table class=\"esri-popup-table\">';\r\n for (var a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n var attrVal = r['attributes'][a];\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n var attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n popupHtml += \"<tr><td>\" + attr + \"</td><td>\" + attrVal + \"</td></tr>\";\r\n }\r\n }\r\n popupHtml += '</table>';\r\n mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n };\r\n Object.defineProperty(LayerEsriMapServer.prototype, \"source\", {\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get: function () {\r\n return _super.prototype.getSource.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(LayerEsriMapServer.prototype, \"olLayer\", {\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get: function () {\r\n return _super.prototype.getOlLayer.call(this);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return LayerEsriMapServer;\r\n}(LayerBase_1.LayerBase));\r\nexports.LayerEsriMapServer = LayerEsriMapServer;\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexports.default = LayerEsriMapServer;\r\n\n\n/***/ }),\n\n/***/ 27:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar ol = __webpack_require__(2);\r\nvar nm = provide_1.default('olHelpers.esriToOlStyle');\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray, opacity) {\r\n \"use strict\";\r\n return \"rgba(\" + colorArray[0] + \",\" + colorArray[1] + \",\" + colorArray[2] + \",\" + opacity + \")\";\r\n}\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str) {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\nnm.htmlEscape = htmlEscape;\r\nvar CommonSymbol = (function () {\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n function CommonSymbol(symbolObj, opacity) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n return CommonSymbol;\r\n}());\r\nvar PointSymbol = (function (_super) {\r\n __extends(PointSymbol, _super);\r\n function PointSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj.type) {\r\n case 'esriSMS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n var outlineWidth = _this.symbolObj.outline.width;\r\n var radius = _this.symbolObj.size;\r\n _this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth })\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" style=\\\"color: \" + innerColor + \"\\\">●</span>\";\r\n break;\r\n case 'esriPMS':\r\n _this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({ src: \"data:image/png;base64,\" + _this.symbolObj['imageData'] })\r\n });\r\n _this.legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + _this.symbolObj['imageData'] + \"\\\">\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return PointSymbol;\r\n}(CommonSymbol));\r\nvar LineSymbol = (function (_super) {\r\n __extends(LineSymbol, _super);\r\n function LineSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj.type) {\r\n case 'esriSLS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var lineWidth = _this.symbolObj.width;\r\n _this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n _this.legendHtml += \"style=\\\"\";\r\n _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n _this.legendHtml += \"width: 40px;\";\r\n _this.legendHtml += \"height: 4px;\";\r\n _this.legendHtml += \"position: relative;\";\r\n _this.legendHtml += \"display: inline-block;\";\r\n _this.legendHtml += \"top: -1px;\";\r\n _this.legendHtml += \"\\\"></span>\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return LineSymbol;\r\n}(CommonSymbol));\r\nvar PolygonSymbol = (function (_super) {\r\n __extends(PolygonSymbol, _super);\r\n function PolygonSymbol(symbolObj, opacity) {\r\n var _this = _super.call(this, symbolObj, opacity) || this;\r\n switch (_this.symbolObj['type']) {\r\n case 'esriSFS':\r\n var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n var outlineWidth = _this.symbolObj.outline.width;\r\n _this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n _this.legendHtml += \"style=\\\"\";\r\n _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n _this.legendHtml += \"border: solid \" + outerColor + \" 1px;\";\r\n _this.legendHtml += \"width: 40px;\";\r\n _this.legendHtml += \"height: 9px;\";\r\n _this.legendHtml += \"position: relative;\";\r\n _this.legendHtml += \"display: inline-block;\";\r\n _this.legendHtml += \"top: 2px;\";\r\n _this.legendHtml += \"\\\"></span>\";\r\n break;\r\n default:\r\n console.log(_this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']);\r\n }\r\n return _this;\r\n }\r\n return PolygonSymbol;\r\n}(CommonSymbol));\r\nvar SymbolGenerator = (function () {\r\n function SymbolGenerator(esriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n return SymbolGenerator;\r\n}());\r\nvar SingleSymbol = (function (_super) {\r\n __extends(SingleSymbol, _super);\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n function SingleSymbol(esriResponse, SymbolClass) {\r\n var _this = _super.call(this, esriResponse) || this;\r\n _this.symbol = _this.renderer.symbol;\r\n var symbolObj = new SymbolClass(_this.symbol, _this.opacity);\r\n _this.olStyle = symbolObj.olStyle;\r\n _this.legendHtml = symbolObj.legendHtml;\r\n return _this;\r\n }\r\n return SingleSymbol;\r\n}(SymbolGenerator));\r\nvar UniqueValueSymbol = (function (_super) {\r\n __extends(UniqueValueSymbol, _super);\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n function UniqueValueSymbol(esriResponse, SymbolClass) {\r\n var _this = _super.call(this, esriResponse) || this;\r\n _this.uniqueValueInfos = _this.renderer.uniqueValueInfos;\r\n _this.propertyName = _this.renderer.field1;\r\n _this.defaultSymbol = _this.renderer.defaultSymbol;\r\n if (_this.defaultSymbol) {\r\n var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity);\r\n _this.defaultStyle = symbolObj.olStyle;\r\n _this.defaultLabelHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(_this.renderer['defaultLabel']) + \"</span>\" + symbolObj.legendHtml;\r\n }\r\n else {\r\n _this.defaultStyle = undefined;\r\n _this.defaultLabelHtml = 'other';\r\n }\r\n _this.valueArray = [];\r\n _this.labelArray = [];\r\n _this.legendArray = [];\r\n _this.propertyStyleLookup = {};\r\n for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) {\r\n var uniqueVal = _a[_i];\r\n _this.labelArray.push(uniqueVal['label']);\r\n _this.valueArray.push(uniqueVal['value']);\r\n var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity);\r\n _this.legendArray.push(\"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(uniqueVal['label']) + \"</span>\" + uniqueSym.legendHtml);\r\n _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n _this.olStyle = function (feature) {\r\n var checkProperties = feature.getProperties();\r\n var checkProperty = checkProperties[_this.propertyName];\r\n if (_this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [_this.propertyStyleLookup[checkProperty]];\r\n }\r\n else {\r\n return [_this.defaultStyle];\r\n }\r\n };\r\n if (_this.defaultLabelHtml !== null) {\r\n _this.legendArray.push(_this.defaultLabelHtml);\r\n }\r\n _this.legendHtml = '<ul>';\r\n for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) {\r\n var h = _c[_b];\r\n _this.legendHtml += \"<li>\" + h + \"</li>\";\r\n }\r\n _this.legendHtml += '</ul>';\r\n return _this;\r\n }\r\n return UniqueValueSymbol;\r\n}(SymbolGenerator));\r\nfunction makeFeatureServiceLegendAndSymbol(esriResponse) {\r\n \"use strict\";\r\n var renderer = esriResponse.drawingInfo.renderer;\r\n var symbolLegendOut = null;\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n if (symbolLegendOut == null) {\r\n return { style: undefined, legend: '' };\r\n }\r\n else {\r\n return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml };\r\n }\r\n}\r\nexports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) {\r\n if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; }\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n var layerName = lyrObject['layerName'];\r\n var legendItems = lyrObject['legend'];\r\n var legendHtml = '';\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\";\r\n }\r\n if (legendItems.length == 1) {\r\n legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[0]['imageData'] + \"\\\">\";\r\n }\r\n else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (var i = 0; i < legendItems.length; i++) {\r\n legendHtml += \"<li>\";\r\n legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(legendItems[i]['label']) + \"</span>\";\r\n legendHtml += \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[i]['imageData'] + \"\\\">\";\r\n legendHtml += \"</li>\";\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\" + legendHtml;\r\n }\r\n return legendHtml;\r\n}\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nfunction makeMapServiceLegend(esriResponse, showLayers) {\r\n \"use strict\";\r\n if (showLayers === void 0) { showLayers = []; }\r\n var newLegendHtml = '';\r\n var layers = esriResponse['layers'];\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n }\r\n else {\r\n newLegendHtml += '<ul>';\r\n for (var i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0) {\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n return newLegendHtml;\r\n}\r\nexports.makeMapServiceLegend = makeMapServiceLegend;\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n/***/ }),\n\n/***/ 3:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util');\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nfunction makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n return v.toString(16);\r\n });\r\n}\r\nexports.makeGuid = makeGuid;\r\nnm.makeGuid = makeGuid;\r\nexports.default = makeGuid;\r\n\n\n/***/ }),\n\n/***/ 4:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapPopupCls_1 = __webpack_require__(13);\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexports.mapPopup = new mapPopupCls_1.default();\r\nexports.default = exports.mapPopup;\r\n\n\n/***/ }),\n\n/***/ 46:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/16/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar makeGuid_1 = __webpack_require__(3);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar nm = provide_1.default('collections');\r\nvar $ = __webpack_require__(1);\r\nvar LayerGroup = (function () {\r\n /**\r\n *\r\n * @param {object} [groupConfig={}] - group configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n * @param {LayerGroup} [parent=undefined] - the parent group\r\n */\r\n function LayerGroup(groupConfig, parent) {\r\n this.groupLayers = [];\r\n this.groupLayersLookup = {};\r\n this.groupGroups = [];\r\n this.groupGroupsLookup = {};\r\n this.itemIdArray = [];\r\n if (typeof groupConfig == 'undefined') {\r\n this.parent = null;\r\n this.groupId = 'root';\r\n this.groupName = 'root';\r\n this.allGroupLookup = { root: this };\r\n this.allGroupArray = [this];\r\n this.allLayerArray = [];\r\n this.allLayerLookup = {};\r\n this.layerParentLookup = {};\r\n this.collapse = false;\r\n this.addCheck = false;\r\n }\r\n else {\r\n this.groupId = makeGuid_1.default();\r\n this.parent = parent;\r\n this.groupName = groupConfig.groupName;\r\n this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n }\r\n }\r\n /**\r\n *\r\n * @param {object} groupConfig - configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n * @param {Array<LayerGroup>} parents parent groups\r\n * @returns {LayerGroup} the layer group just added\r\n */\r\n LayerGroup.prototype.addGroup = function (groupConfig, parents) {\r\n var parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n }\r\n else {\r\n parent = 'root';\r\n }\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n var parentGroup = this.allGroupLookup[parent];\r\n var newGroup = new LayerGroup(groupConfig, parentGroup);\r\n this.allGroupLookup[newGroup.groupId] = newGroup;\r\n this.allGroupArray.push(newGroup);\r\n parentGroup.groupGroups.push(newGroup);\r\n parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n console.log(newGroup.groupId);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newGroup.groupId);\r\n return newGroup;\r\n };\r\n /**\r\n *\r\n * @param {LayerBase} newLayer the layer to be added\r\n * @param {Array} parents array\r\n */\r\n LayerGroup.prototype.addLegendLayer = function (newLayer, parents) {\r\n var parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n }\r\n else {\r\n parent = 'root';\r\n }\r\n this.allLayerLookup[newLayer.id] = newLayer;\r\n this.allLayerArray.push(newLayer);\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n var parentGroup = this.allGroupLookup[parent];\r\n parentGroup.groupLayers.push(newLayer);\r\n parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n console.log(newLayer.id);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newLayer.id);\r\n this.layerParentLookup[newLayer.id] = parentGroup;\r\n };\r\n LayerGroup.prototype.getLegendHtml = function (legendId, options) {\r\n var legendHtml = \"<ul id=\\\"\" + legendId + \"\\\" class=\\\"legend-container\\\">\";\r\n legendHtml += \"<li>\" + options.legendTitle + \"<input type=\\\"checkbox\\\" checked id=\\\"suppress-by-extent-\" + legendId + \"\\\" class=\\\"suppress-by-extent\\\">\" +\r\n (\"<label title=\\\"Suppress layers not visible at this zoom level\\\" for=\\\"suppress-by-extent-\" + legendId + \"\\\">\") +\r\n \"<span></span>\" +\r\n \"</label></li>\";\r\n legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n return legendHtml;\r\n };\r\n /**\r\n * @param {Array} itemIds the items to process\r\n * @param {LayerGroup} theGroup new group\r\n * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n * @static\r\n * @returns {string} html string\r\n */\r\n LayerGroup.prototype._buildLegend = function (itemIds, theGroup, layerDivClasses) {\r\n if (itemIds.length == 0) {\r\n return '';\r\n }\r\n var theHml = '';\r\n var itemId = itemIds[0];\r\n if (theGroup.groupLayersLookup[itemId]) {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n var lyr = theGroup.groupLayersLookup[itemId];\r\n theHml += \"<li id=\\\"\" + lyr.id + \"-layer-li\\\" class=\\\"legend-layer-li \" + layerDivClasses.join(' ') + \"\\\">\" + lyr.getLegendDiv() + '</li>';\r\n }\r\n else if (theGroup.groupGroupsLookup[itemId]) {\r\n /**\r\n * type {LayerGroup}\r\n */\r\n var otherGroup = theGroup.groupGroupsLookup[itemId];\r\n theHml += \"<li>\";\r\n theHml += \"<div id=\\\"\" + otherGroup.groupId + \"-legend-layer-div\\\" \" +\r\n (\"class=\\\"legend-layer-group \" + layerDivClasses.join(' ') + \"\\\">\");\r\n if (otherGroup.addCheck) {\r\n theHml += \"<input type=\\\"checkbox\\\" checked id=\\\"\" + otherGroup.groupId + \"-group-chck\\\">\" +\r\n (\"<label for=\\\"\" + otherGroup.groupId + \"-group-chck\\\" title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\");\r\n }\r\n else {\r\n theHml += \"<label title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\";\r\n }\r\n theHml += \"<span title=\\\"Expand/Collapse\\\" class=\\\"layer-group-expander\";\r\n theHml += (otherGroup.collapse ? ' legend-layer-group-initial-collapse' : '') + \"\\\">\";\r\n theHml += otherGroup.collapse ? '▶' : '▼';\r\n theHml += '</span>';\r\n //parents.push(groupId);\r\n theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n theHml += '</div>';\r\n theHml += '</li>';\r\n }\r\n return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n };\r\n return LayerGroup;\r\n}());\r\n/**\r\n * a wrapper to make a legend\r\n */\r\nvar LayerLegend = (function () {\r\n /**``\r\n *\r\n * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n * @param {string} divId the div where the legend should be added\r\n * @param {object} options for legend\r\n * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n * @param {string} [options.legendTitle=Legend] the legend title\r\n * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n */\r\n function LayerLegend(legendItems, divId, options) {\r\n if (options === void 0) { options = {}; }\r\n for (var _i = 0, legendItems_1 = legendItems; _i < legendItems_1.length; _i++) {\r\n var i = legendItems_1[_i];\r\n if (typeof i == 'undefined') {\r\n throw 'undefined item passed in array to legend constructor';\r\n }\r\n }\r\n options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n options.layerDivClasses = options.layerDivClasses || [];\r\n // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove_1.default.checkInit();\r\n }\r\n this.$divElement = $('#' + divId);\r\n this._legendItems = legendItems;\r\n this.layerGroup = new LayerGroup();\r\n this._buildTree(legendItems);\r\n this.legendId = makeGuid_1.default();\r\n this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n for (var _a = 0, _b = this.layerGroup.allLayerArray; _a < _b.length; _a++) {\r\n var l = _b[_a];\r\n l.applyCollapse();\r\n }\r\n var _this = this;\r\n //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove_1.default.checkInit();\r\n mapMove_1.default.addCallback(function (ext, zoom, evt) {\r\n if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n for (var _i = 0, _a = this.layerGroup.allLayerArray; _i < _a.length; _i++) {\r\n var lyr = _a[_i];\r\n var $lyrLi = $('#' + lyr.id + '-layer-li');\r\n if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n $lyrLi.addClass('layer-not-visible');\r\n }\r\n else {\r\n $lyrLi.removeClass('layer-not-visible');\r\n }\r\n }\r\n }\r\n }, this, 100, true, 'legend1');\r\n }\r\n // <editor-fold desc=\"add event listeners\">\r\n this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n var legendLayerLis = $('.legend-layer-li');\r\n if (this.checked) {\r\n legendLayerLis.removeClass('layer-force-show');\r\n }\r\n else {\r\n legendLayerLis.addClass('layer-force-show');\r\n }\r\n });\r\n this.$divElement.find('.legend-check').change(function () {\r\n var lyrId = this.id.replace('-legend-layer-check', '');\r\n _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n });\r\n this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n });\r\n this.$divElement.find('.layer-group-expander').click(function () {\r\n var $this = $(this);\r\n $this.removeClass('legend-layer-group-initial-collapse');\r\n $this.siblings('ul').slideToggle();\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n }\r\n else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n // </editor-fold>\r\n }\r\n /**\r\n * @param {Array} [legendItems=this._layerConfig] the legend items\r\n * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n * @private\r\n */\r\n LayerLegend.prototype._buildTree = function (legendItems, parents) {\r\n if (legendItems.length == 0) {\r\n return;\r\n }\r\n var oneItem = legendItems[0];\r\n //reset the parent if the item is in the base array\r\n if (this._legendItems.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n parents = [];\r\n }\r\n if (typeof oneItem.groupName !== 'undefined') {\r\n var groupItem = legendItems[0];\r\n var newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n parents.push(newGroup.groupId);\r\n this._buildTree(oneItem.items, parents);\r\n }\r\n else {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n var layerItem = legendItems[0];\r\n this.layerGroup.addLegendLayer(layerItem, parents);\r\n }\r\n this._buildTree(legendItems.slice(1), parents);\r\n };\r\n return LayerLegend;\r\n}());\r\nexports.LayerLegend = LayerLegend;\r\nnm.LayerLegend = LayerLegend;\r\nexports.default = LayerLegend;\r\n\n\n/***/ }),\n\n/***/ 5:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * base interaction\r\n */\r\nvar MapInteractionBase = (function () {\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n function MapInteractionBase(subtype) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n MapInteractionBase.prototype.init = function (theMap) {\r\n if (!this._initialized) {\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n };\r\n Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get: function () {\r\n return this._map;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get: function () {\r\n return this._initialized;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n MapInteractionBase.prototype._checkInit = function () {\r\n if (!this.initialized) {\r\n var msg = this._subtype + \" object not initialized\";\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n };\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n MapInteractionBase.prototype.checkInit = function () {\r\n this._checkInit();\r\n };\r\n return MapInteractionBase;\r\n}());\r\nexports.MapInteractionBase = MapInteractionBase;\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexports.default = MapInteractionBase;\r\n\n\n/***/ }),\n\n/***/ 6:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar quickMapBase_1 = __webpack_require__(14);\r\nvar provide_1 = __webpack_require__(0);\r\nvar mapMove_1 = __webpack_require__(7);\r\nvar mapPopup_1 = __webpack_require__(4);\r\nvar nm = provide_1.default('olHelpers');\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nfunction quickMap(options) {\r\n if (options === void 0) { options = {}; }\r\n var m = quickMapBase_1.quickMapBase(options);\r\n mapMove_1.default.init(m);\r\n mapPopup_1.default.init(m);\r\n return m;\r\n}\r\nexports.quickMap = quickMap;\r\nnm.quickMap = quickMap;\r\nexports.default = quickMap;\r\n\n\n/***/ }),\n\n/***/ 7:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar mapMoveCls_1 = __webpack_require__(12);\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\nexports.mapMove = new mapMoveCls_1.default();\r\nexports.default = exports.mapMove;\r\n\n\n/***/ }),\n\n/***/ 77:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 9/23/2016.\r\n */\r\nvar quickMap_1 = __webpack_require__(6);\r\nvar LayerEsriMapServer_1 = __webpack_require__(25);\r\nvar LayerLegend_1 = __webpack_require__(46);\r\nvar map = quickMap_1.quickMap();\r\nvar wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\nvar sixYearPlan = new LayerEsriMapServer_1.LayerEsriMapServer('https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', { name: 'Six Year Plan', legendCollapse: true });\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(sixYearPlan.olLayer);\r\nvar layerArray = [\r\n wisDotRegions,\r\n sixYearPlan\r\n // tipConfig.tipSegmentLayer,\r\n // tipConfig.metamanagerSegments,\r\n // {\r\n // groupName: 'ITS Inventory Layers',\r\n // collapse: true,\r\n // addCheck: false,\r\n // items: tipConfig.itsLayerCollection.layers\r\n // }\r\n];\r\nvar legend = new LayerLegend_1.default(layerArray, 'legend-container', {});\r\n\n\n/***/ }),\n\n/***/ 8:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nvar ol = __webpack_require__(2);\r\nexports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' });\r\nexports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' });\r\nexports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' });\r\n\n\n/***/ }),\n\n/***/ 9:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar nm = provide_1.default('util.checkDefined');\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nfunction undefinedOrNull(input) {\r\n \"use strict\";\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\nexports.undefinedOrNull = undefinedOrNull;\r\nnm.undefinedOrNull = undefinedOrNull;\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nfunction definedAndNotNull(input) {\r\n \"use strict\";\r\n return !(undefinedOrNull(input));\r\n}\r\nexports.definedAndNotNull = definedAndNotNull;\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// simple_map.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 77);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 99693f14fcb3e83c98ca","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","import * as zoomResolutionConvert from '../olHelpers/zoomResolutionConvert';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport makeGuid from '../util/makeGuid';\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\nexport interface LayerBaseOptions{\r\n id?: string;\r\n name?: string;\r\n opacity?: number;\r\n visible?: boolean;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n params?: any;\r\n zIndex?: number;\r\n loadCallback?: Function;\r\n legendCollapse?: boolean;\r\n legendCheckbox?: boolean;\r\n legendContent?: string;\r\n}\r\n\r\n\r\n/**\r\n * The base layer class\r\n * @abstract\r\n */\r\nexport abstract class LayerBase {\r\n\r\n protected _legendCheckbox: boolean;\r\n protected _url: string;\r\n protected _opacity: number;\r\n protected _minZoom: number;\r\n protected _maxZoom: number;\r\n protected _visible: boolean;\r\n protected _loaded: boolean;\r\n protected _zIndex: number;\r\n protected _legendContent: string;\r\n protected _params: any;\r\n protected _id: string;\r\n protected _name: string;\r\n protected _source: ol.source.Source;\r\n protected _animate: boolean;\r\n protected _legendCollapse: boolean;\r\n protected _maxResolution: number;\r\n protected _minResolution: number;\r\n protected _$legendDiv: JQuery;\r\n loadCallback: Function;\r\n protected _olLayer: ol.layer.Layer;\r\n protected _applyCollapseCalled: boolean;\r\n\r\n\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - url for source\r\n * @param {object} options - config\r\n * @param {string} [options.id=makeGuid()] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] - the z index for the layer\r\n * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n */\r\n constructor(url: string, options: LayerBaseOptions = {}) {\r\n options = options || {} as LayerBaseOptions;\r\n\r\n if (typeof url !== 'string') {\r\n throw 'Invalid URL';\r\n }\r\n this._url = url;\r\n\r\n\r\n this._params = typeof options.params == 'object' ? options.params : {};\r\n this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\r\n this.id = options.id || makeGuid();\r\n this._name = options.name || 'Unnamed Layer';\r\n this.animate = false;\r\n this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\r\n if (this._opacity > 1) {\r\n this._opacity = 1;\r\n } else if (this._opacity < 0) {\r\n this._opacity = 0;\r\n }\r\n\r\n this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\r\n this._source = undefined;\r\n\r\n /**\r\n *\r\n * @protected\r\n */\r\n this._olLayer = undefined;\r\n this._loaded = false;\r\n\r\n this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n if (typeof this._maxResolution !== 'undefined') {\r\n this._maxResolution += 0.00001;\r\n }\r\n this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\r\n this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\r\n this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n };\r\n\r\n\r\n this._legendContent = '';\r\n\r\n if (this._legendCheckbox) {\r\n this._legendContent += `<input type=\"checkbox\" ${this.visible ? 'checked' : ''} ` +\r\n `class=\"legend-check\" id=\"${this.id}-legend-layer-check\"><span></span>`;\r\n this._legendContent += `<label for=\"${this.id}-legend-layer-check\" class=\"legend-layer-name\">${this.name}</label>`;\r\n } else {\r\n this._legendContent += `<label class=\"legend-layer-name\">${this.name}</label>`;\r\n }\r\n\r\n this._$legendDiv = null;\r\n this._applyCollapseCalled = false;\r\n this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n }\r\n\r\n /**\r\n * base load function, sets _loaded = true if it is not already\r\n * @protected\r\n * @returns {boolean} if already loaded\r\n */\r\n _load() {\r\n if (this.loaded == true) {\r\n return true;\r\n } else {\r\n this._loaded = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n /**\r\n * Get the legend html, be sure to only add to the DOM once\r\n * @returns {string} html for layer wrapped in a div\r\n */\r\n getLegendDiv() {\r\n return `<div class=\"legend-layer-div\" id=\"${this.id}-legend-layer-div\">${this._legendContent}</div>`;\r\n }\r\n\r\n /**\r\n *\r\n * @param additionalContent - additional content to add to legend\r\n * @private\r\n */\r\n _addLegendContent(additionalContent='') {\r\n\r\n let addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\r\n if (addCollapse) {\r\n additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>' + additionalContent;\r\n }\r\n\r\n this._legendContent += additionalContent;\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n this._$legendDiv.append(additionalContent);\r\n this.applyCollapse();\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=] - additonal content to add\r\n */\r\n addLegendContent(additionalContent: string) {\r\n this._addLegendContent(additionalContent);\r\n }\r\n\r\n applyCollapse(): void {\r\n if (this._applyCollapseCalled) {\r\n console.log('collapse already applied');\r\n\r\n return undefined;\r\n }\r\n\r\n this._$legendDiv = $(`#${this.id}-legend-layer-div`);\r\n\r\n if (this._$legendDiv.length > 0) {\r\n\r\n let $expander = this._$legendDiv.find('.legend-items-expander');\r\n\r\n if ($expander.length > 0) {\r\n this._applyCollapseCalled = true;\r\n\r\n $expander.click(function () {\r\n let $this = $(this);\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')) {\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n if (this._legendCollapse) {\r\n $expander.trigger('click');\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * trick to refresh the layer\r\n */\r\n refresh() {\r\n if (this.source) {\r\n this.source.refresh();\r\n }\r\n }\r\n\r\n get id(): string{\r\n return this._id;\r\n }\r\n\r\n set id(newId: string){\r\n this._id = newId;\r\n }\r\n\r\n get animate(): boolean{\r\n return this._animate;\r\n }\r\n\r\n set animate(animate: boolean){\r\n this._animate = animate;\r\n }\r\n\r\n /**\r\n * get the legend content\r\n * @type {string}\r\n */\r\n get legendContent(): string {\r\n return this._legendContent;\r\n }\r\n\r\n /**\r\n * set the legend content directly\r\n * @param {string} newVal - new content\r\n * @protected\r\n */\r\n set legendContent(newVal: string) {\r\n this._legendContent = newVal;\r\n }\r\n\r\n /**\r\n * get the map get params\r\n * @type {object}\r\n */\r\n get params(): {[s: string]: any} {\r\n return this._params;\r\n }\r\n\r\n /**\r\n * set the map get params\r\n * @param {object} newParams - new get params\r\n * @protected\r\n */\r\n set params(newParams: {[s: string]: any}) {\r\n this._params = newParams;\r\n }\r\n\r\n /**\r\n * get the minimum resolution\r\n * @type {number|*}\r\n */\r\n get minResolution(): number {\r\n return this._minResolution;\r\n }\r\n\r\n /**\r\n * get the maximum resolution\r\n * @type {number|*}\r\n */\r\n get maxResolution(): number {\r\n return this._maxResolution;\r\n }\r\n\r\n /**\r\n * get min zoom\r\n * @type {number|*}\r\n */\r\n get minZoom(): number {\r\n return this._minZoom;\r\n }\r\n\r\n /**\r\n * get max zoom\r\n * @type {number|*}\r\n */\r\n get maxZoom(): number {\r\n return this._maxZoom;\r\n }\r\n\r\n /**\r\n * get the url\r\n * @type {string}\r\n */\r\n get url(): string {\r\n return this._url;\r\n }\r\n\r\n /**\r\n * Get the layer visibility\r\n * @type {boolean}\r\n */\r\n get visible(): boolean {\r\n return this._visible;\r\n }\r\n\r\n /**\r\n * set the visibility\r\n * @param visibility\r\n */\r\n set visible(visibility: boolean) {\r\n this.setVisible(visibility);\r\n }\r\n\r\n protected setVisible(visibility: boolean) {\r\n this._visible = visibility;\r\n if (this.olLayer) {\r\n this.olLayer.setVisible(this._visible);\r\n if (visibility && !this._loaded) {\r\n this._load();\r\n }\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Get the layer opacity\r\n * @type {number}\r\n */\r\n get opacity(): number {\r\n return this._opacity;\r\n }\r\n\r\n /**\r\n * Set the layer opacity\r\n * @param {number} opacity - layer opacity\r\n */\r\n set opacity(opacity: number) {\r\n this._opacity = opacity;\r\n if (this.olLayer) {\r\n this.olLayer.setOpacity(this._opacity);\r\n }\r\n }\r\n\r\n /**\r\n * Get the layer name\r\n * @type {string}\r\n */\r\n get name(): string {\r\n return this._name;\r\n }\r\n\r\n /**\r\n * set the layer name\r\n * @param {string} newName - the new name\r\n */\r\n set name(newName: string) {\r\n this._name = newName;\r\n }\r\n\r\n /**\r\n * Check if the layer is loaded\r\n * @type {boolean}\r\n */\r\n get loaded():boolean {\r\n return this._loaded;\r\n }\r\n\r\n /**\r\n * get the layer source\r\n * @type {*}\r\n */\r\n get source(): ol.source.Source {\r\n return this.getSource();\r\n }\r\n\r\n\r\n protected getSource(): ol.source.Source{\r\n return this._source;\r\n }\r\n\r\n /**\r\n * get the z index\r\n */\r\n get zIndex(): number {\r\n return this._zIndex;\r\n }\r\n\r\n /**\r\n * set the z index\r\n */\r\n set zIndex(newZ: number) {\r\n this._zIndex = newZ;\r\n }\r\n\r\n protected setZIndex(newZ: number){\r\n\r\n }\r\n\r\n /**\r\n * the the ol layer\r\n */\r\n get olLayer(): ol.layer.Layer {\r\n return this.getOlLayer();\r\n }\r\n\r\n protected getOlLayer(): ol.layer.Layer{\r\n return this._olLayer;\r\n }\r\n}\r\n\r\nnm.LayerBase = LayerBase;\r\nexport default LayerBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerBase.ts","import $ = require('jquery')\r\nimport {makeGuid} from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport {proj3857, proj4326} from './projections';\r\n\r\n\r\nlet invalidClass = 'geocoder-invalid';\r\nlet geocoderLoadingClass = 'geocoder-loading';\r\n\r\n// let testAddress = '65 7th Street, Prairie du Sac, WI';\r\n\r\n\r\nexport class Geocode {\r\n private theButton: HTMLButtonElement;\r\n private theInput: HTMLInputElement;\r\n private map: ol.Map;\r\n private indicationLayer;\r\n\r\n constructor(mapDiv: HTMLDivElement, map: ol.Map) {\r\n let inputGuid = makeGuid();\r\n let buttonGuid = makeGuid();\r\n\r\n this.map = map;\r\n this.indicationLayer = new ol.layer.Vector({\r\n source: new ol.source.Vector(),\r\n style: new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: 12,\r\n fill: new ol.style.Fill({color: 'rgba(255,0,0,0.5)'}),\r\n stroke: new ol.style.Stroke({color: 'red', width: 1})\r\n })\r\n })\r\n });\r\n this.map.addLayer(this.indicationLayer);\r\n\r\n $(mapDiv).append('<div class=\"geocoder-el\">' +\r\n `<input type=\"text\" id=\"${inputGuid}\">` +\r\n `<button id=\"${buttonGuid}\">Search</button>` +\r\n '</div>');\r\n\r\n this.theButton = document.getElementById(buttonGuid) as HTMLButtonElement;\r\n this.theInput = document.getElementById(inputGuid) as HTMLInputElement;\r\n\r\n this.reset();\r\n\r\n let $theButton = $(this.theButton);\r\n let $theInput = $(this.theInput);\r\n\r\n $theButton.click((evt) => {\r\n\r\n evt.preventDefault();\r\n\r\n $theButton.addClass(geocoderLoadingClass);\r\n this.theButton.disabled = true;\r\n this.indicationLayer.getSource().clear();\r\n\r\n $.get(\r\n `https://geocode.xyz/${this.theInput.value}?geoit=json`,\r\n {},\r\n (d) => {\r\n let lat = parseFloat(d['latt']);\r\n let lon = parseFloat(d['longt']);\r\n\r\n if ((lat == 0 && lon == 0) || d['error']) {\r\n $theInput.addClass(invalidClass);\r\n this.theInput.title = 'Specified Location Invalid';\r\n this.theButton.title = 'Specified Location Invalid';\r\n\r\n } else {\r\n let v = this.map.getView();\r\n let p = new ol.geom.Point([lon, lat]);\r\n let feat = new ol.Feature(p);\r\n this.indicationLayer.getSource().addFeature(feat);\r\n p.transform(proj4326, proj3857);\r\n\r\n v.setCenter(p.getCoordinates());\r\n v.setZoom(13);\r\n }\r\n\r\n $theButton.removeClass(geocoderLoadingClass);\r\n this.theButton.disabled = false;\r\n },\r\n 'json');\r\n });\r\n\r\n $(this.theInput).keyup((evt) => {\r\n evt.preventDefault();\r\n this.theButton.disabled = this.theInput.value.length == 0;\r\n $theInput.removeClass(invalidClass);\r\n this.theInput.title = '';\r\n this.theButton.title = '';\r\n\r\n if (!this.theButton.disabled && evt.keyCode == 13) {\r\n $theButton.click();\r\n }\r\n })\r\n }\r\n\r\n private reset() {\r\n this.theButton.disabled = true;\r\n this.theInput.value = '';\r\n }\r\n\r\n\r\n// https://geocode.xyz/65%2075h%20street%20prairie%20du%20sac%20wi?geoit=json\r\n\r\n// error\r\n// geocoder-invalid\r\n\r\n}\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/geocode.ts","import LayerBaseVector from \"../layers/LayerBaseVector\";\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport * as checkDefined from '../util/checkDefined';\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\nexport interface extentObject{\r\n minX: number;\r\n minY: number;\r\n maxX: number;\r\n maxY: number;\r\n}\r\n\r\nexport interface mapMoveCallbackFunction{\r\n /**\r\n *\r\n * @param extent extent as predefined object minX, minX, maxX, maxY\r\n * @param zoomLevel current zoom level\r\n * @param evtType the event type 'change:center', 'change:resolution'\r\n */\r\n (extent: extentObject, zoomLevel: number, evtType?: string): any\r\n}\r\n\r\n\r\n/**\r\n * assists with map move interactions, trigger callback functions\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapMoveCls extends MapInteractionBase {\r\n _mapExtent: extentObject;\r\n _zoomLevel: number;\r\n _lookupLayer: {[s: string]: LayerBaseVector};\r\n _arrLayer: Array<LayerBaseVector>;\r\n _arrLyrTimeout: Array<number>;\r\n _mapMoveCallbackTimeout: Array<number>;\r\n _mapMoveCallbackDelays: Array<number>;\r\n _mapMoveCallbacksLookup: {[s: string]: mapMoveCallbackFunction};\r\n _mapMoveCallbackContext: Array<Object>;\r\n _mapMoveCallbacks: Array<mapMoveCallbackFunction>;\r\n _arrLyrRequest: Array<any>;\r\n\r\n /**\r\n * constructor called implicitly\r\n */\r\n constructor() {\r\n super('map move');\r\n this._arrLyrRequest = [];\r\n this._arrLyrTimeout = [];\r\n this._arrLayer = [];\r\n this._lookupLayer = {};\r\n\r\n this._mapMoveCallbacks = [];\r\n this._mapMoveCallbacksLookup = {};\r\n this._mapMoveCallbackDelays = [];\r\n this._mapMoveCallbackContext = [];\r\n this._mapMoveCallbackTimeout = [];\r\n\r\n this._mapExtent = undefined;\r\n this._zoomLevel = undefined;\r\n\r\n }\r\n\r\n /**\r\n * initialize the map move object\r\n * @param theMap - the ol map\r\n */\r\n init(theMap: ol.Map){\r\n super.init(theMap);\r\n\r\n this.map.getView().on(['change:center', 'change:resolution'], (e: {type: string}) =>{\r\n\r\n this._updateMapExtent();\r\n\r\n // trigger the layer updates\r\n for (let i = 0; i < this._arrLayer.length; i++) {\r\n this.triggerLyrLoad(this._arrLayer[i], i, e.type);\r\n }\r\n\r\n // trigger the map callbacks\r\n for (let i = 0; i < this._mapMoveCallbacks.length; i++) {\r\n this.triggerMoveCallback(i, e.type);\r\n }\r\n });\r\n }\r\n\r\n _updateMapExtent() {\r\n let theView = this.map.getView();\r\n this._zoomLevel = theView.getZoom();\r\n\r\n let extentArray = theView.calculateExtent(this.map.getSize());\r\n\r\n this._mapExtent = {\r\n minX: extentArray[0],\r\n minY: extentArray[1],\r\n maxX: extentArray[2],\r\n maxY: extentArray[3]\r\n };\r\n }\r\n\r\n /**\r\n * return the map extent\r\n */\r\n get mapExtent() {\r\n if (!this._mapExtent) {\r\n this._updateMapExtent();\r\n }\r\n\r\n return this._mapExtent;\r\n }\r\n\r\n /**\r\n * Trigger the layer load\r\n * @param lyr the layer being acted on\r\n * @param index index of the layer\r\n * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n */\r\n triggerLyrLoad(lyr: LayerBaseVector, index?: number, eventType?: string) {\r\n\r\n if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n throw 'need to define lyr or index';\r\n } else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n index = this._arrLayer.indexOf(lyr);\r\n } else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n lyr = this._arrLayer[index];\r\n }\r\n\r\n // clear the timeout\r\n if (this._arrLyrTimeout[index] != null) {\r\n clearTimeout(this._arrLyrTimeout[index]);\r\n this._arrLyrTimeout[index] = null;\r\n }\r\n\r\n // abort if necessary and clear the request\r\n if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n this._arrLyrRequest[index].abort();\r\n this._arrLyrRequest[index] = null;\r\n }\r\n\r\n // dummy callback used if before load returns false\r\n let callbackFunc = function () {};\r\n\r\n if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\r\n let __this = this;\r\n\r\n callbackFunc = function () {\r\n function innerFunction(theLayer: LayerBaseVector, theIndex: number) {\r\n let _innerThis = this;\r\n this._arrLyrRequest[theIndex] = $.get(\r\n theLayer.url,\r\n theLayer.mapMoveParams,\r\n function (d) {\r\n /**\r\n * @type {LayerBaseVector}\r\n */\r\n theLayer.mapMoveCallback(d);\r\n theLayer.loadCallback();\r\n }, 'json').fail(\r\n function (jqXHR) {\r\n if (jqXHR.statusText != 'abort') {\r\n console.log('failed');\r\n console.log(theLayer.url);\r\n console.log(theLayer.mapMoveParams);\r\n }\r\n }).always(\r\n function () {\r\n _innerThis._arrLyrTimeout[theIndex] = null;\r\n _innerThis._arrLyrRequest[theIndex] = null;\r\n });\r\n }\r\n innerFunction.call(__this, lyr, index);\r\n };\r\n } else {\r\n lyr.clear();\r\n }\r\n this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n }\r\n\r\n /**\r\n * trigger the map move call back at the given index\r\n * @param ind - the index of the layer\r\n * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n * @param functionId=undefined the function id used to reference the added callback function\r\n */\r\n triggerMoveCallback(ind: number, eventType?: string, functionId?: string) {\r\n\r\n if (typeof ind == 'undefined' && typeof functionId == 'undefined'){\r\n throw 'either the function index or the id must be defined';\r\n }\r\n\r\n if (typeof ind !== 'number'){\r\n ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n }\r\n\r\n if (ind < 0){\r\n console.log('function not found');\r\n\r\n return;\r\n }\r\n\r\n // clear the timeout\r\n if (this._mapMoveCallbackTimeout[ind] != null) {\r\n clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n this._mapMoveCallbackTimeout[ind] = null;\r\n }\r\n\r\n let ctx = this._mapMoveCallbackContext[ind];\r\n let theFunc = this._mapMoveCallbacks[ind];\r\n\r\n let __this = this;\r\n\r\n let f = function () {\r\n if (ctx !== null) {\r\n theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n } else {\r\n theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n }\r\n };\r\n\r\n this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n }\r\n\r\n /**\r\n * Add a layer to the interaction\r\n * @param lyr - layer to add\r\n * @param triggerOnAdd - if the layer should be loaded on add\r\n */\r\n addVectorLayer(lyr: LayerBaseVector, triggerOnAdd: boolean = true) {\r\n if (this._arrLayer.indexOf(lyr) > -1) {\r\n console.log('already added ' + lyr.name + ' to map move');\r\n\r\n return;\r\n }\r\n this._checkInit();\r\n\r\n this._arrLyrRequest.push(null);\r\n this._arrLyrTimeout.push(null);\r\n this._arrLayer.push(lyr);\r\n this._lookupLayer[lyr.id] = lyr;\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * add a callback to the map move event\r\n * @param func - callback function\r\n * @param context - the context to use for this function\r\n * @param delay=50 the delay before call load\r\n * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n * @param functionId optional id to reference the function later for outside triggering\r\n */\r\n addCallback(func: mapMoveCallbackFunction, context?: any, delay?: number, triggerOnAdd? : boolean, functionId?: string) {\r\n\r\n if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n console.log('this function already added to map move');\r\n return;\r\n }\r\n this._checkInit();\r\n if (!functionId){\r\n functionId = makeGuid();\r\n }\r\n\r\n this._mapMoveCallbacks.push(func);\r\n this._mapMoveCallbacksLookup[functionId] = func;\r\n this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n this._mapMoveCallbackTimeout.push(null);\r\n\r\n triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\r\n if (triggerOnAdd) {\r\n if (this._mapExtent === undefined) {\r\n this._updateMapExtent();\r\n }\r\n this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n }\r\n }\r\n}\r\n\r\nnm.MapMoveCls = MapMoveCls;\r\nexport default MapMoveCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMoveCls.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapInteractionBase from './mapInteractionBase';\r\nimport propertiesZoomStyle from '../olHelpers/propertiesZoomStyle';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport {LayerBaseVector} from \"../layers/LayerBaseVector\";\r\nimport {LayerBase} from \"../layers/LayerBase\";\r\nimport LayerEsriMapServer from \"../layers/LayerEsriMapServer\";\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface popupChangedFunction {\r\n ($popContent: JQuery): any;\r\n}\r\n\r\n/**\r\n *\r\n */\r\nexport interface popupCallback {\r\n /**\r\n * Callback function for the popup\r\n * @param featureProperties\r\n * @param jqRef\r\n */\r\n (featureProperties: Object, jqRef?: JQuery): string | boolean;\r\n}\r\n\r\ninterface mapEvent {\r\n coordinate: ol.Coordinate;\r\n pixel: ol.Pixel;\r\n dragging: boolean|any;\r\n originalEvent: Event;\r\n}\r\n\r\n\r\nexport class FeatureLayerProperties {\r\n\r\n feature: ol.Feature;\r\n layer: LayerBaseVector|LayerEsriMapServer;\r\n layerIndex: number;\r\n selectionLayer: ol.layer.Vector;\r\n popupContent: string;\r\n esriLayerName: string;\r\n\r\n /**\r\n *\r\n * @param feature the feature\r\n * @param layer - the layer in the popup\r\n * @param layerIndex - index of the layer\r\n * @param selectionLayer - the ol selection layer\r\n * @param [esriLayerName=undefined] - esri layer name\r\n */\r\n constructor(feature: ol.Feature, layer: LayerBaseVector|LayerEsriMapServer, layerIndex: number, selectionLayer: ol.layer.Vector, esriLayerName?: string) {\r\n this.feature = feature;\r\n this.layer = layer;\r\n this.layerIndex = layerIndex;\r\n this.selectionLayer = selectionLayer;\r\n this.popupContent = '';\r\n this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n }\r\n\r\n get layerName() {\r\n if (typeof this.esriLayerName == 'string') {\r\n return this.esriLayerName;\r\n } else {\r\n return this.layer.name;\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * map popup class\r\n * @augments MapInteractionBase\r\n */\r\nexport class MapPopupCls extends MapInteractionBase {\r\n private _popupOpen: boolean;\r\n private _passThroughLayerFeatureArray: Array<FeatureLayerProperties>;\r\n private _currentPopupIndex: number;\r\n private _popupContentLength: number;\r\n private _esriMapServiceLayers: Array<LayerEsriMapServer>;\r\n private _$popupCloser: JQuery;\r\n private _$popupContent: JQuery;\r\n private _$popupContainer: JQuery;\r\n private _popupOverlay: ol.Overlay;\r\n private _arrPopupLayers: Array<LayerBaseVector>;\r\n private _popupCoordinate: ol.Coordinate;\r\n private _popupChangedFunctions: Array<popupChangedFunction>;\r\n private _mapClickFunctions: Array<Function>;\r\n private _selectionLayerLookup: {[s: string]: ol.layer.Vector};\r\n private _arrPopupLayerIds: Array<string>;\r\n // private _arrPopupOlLayers: Array<ol.layer.Vector>;\r\n private _arrPopupContentFunction: Array<popupCallback>;\r\n private _selectionLayers: Array<ol.layer.Vector>;\r\n\r\n /**\r\n * Definition for openlayers style function\r\n * @callback olStyleFunction\r\n * ¶m feature the openlayers vector feature\r\n * $param\r\n */\r\n\r\n\r\n /**\r\n * map popup constructor\r\n */\r\n constructor() {\r\n super('map popup');\r\n this._arrPopupLayerIds = [];\r\n this._arrPopupLayers = [];\r\n // this._arrPopupOlLayers = [];\r\n this._arrPopupContentFunction = [];\r\n this._$popupContainer = undefined;\r\n this._$popupContent = undefined;\r\n this._$popupCloser = undefined;\r\n this._popupOverlay = undefined;\r\n this._selectionLayers = [];\r\n this._selectionLayerLookup = {};\r\n this._mapClickFunctions = [];\r\n\r\n //let a = function($jqueryContent){console.log($jqueryContent)};\r\n //this._popupChangedLookup = {'a': a};\r\n this._popupChangedFunctions = [];\r\n this._esriMapServiceLayers = [];\r\n\r\n this._popupOpen = false;\r\n this._popupCoordinate = null;\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n\r\n this._currentPopupIndex = -1;\r\n this._popupContentLength = 0;\r\n\r\n }\r\n\r\n /**\r\n * map popup initialization\r\n * @param {ol.Map} theMap - the ol map\r\n */\r\n init(theMap: ol.Map) {\r\n super.init(theMap);\r\n\r\n let $map;\r\n let target = this.map.getTarget();\r\n\r\n if (typeof target == 'string') {\r\n $map = $('#' + target);\r\n }\r\n else {\r\n $map = $(target);\r\n }\r\n\r\n $map.append(\r\n '<div class=\"ol-popup\">' +\r\n '<span class=\"ol-popup-closer\">X</span>' +\r\n '<div class=\"popup-content\"></div>' +\r\n '</div>'\r\n );\r\n\r\n this._$popupContainer = $map.find('.ol-popup');\r\n this._$popupContent = $map.find('.popup-content');\r\n this._$popupCloser = $map.find('.ol-popup-closer');\r\n\r\n let _ease = (n: number): number => {\r\n return ol.easing.inAndOut(n);\r\n };\r\n\r\n\r\n this._popupOverlay = new ol.Overlay({\r\n element: this._$popupContainer[0],\r\n autoPan: true,\r\n autoPanAnimation: {\r\n duration: 250,\r\n source: theMap.getView().getCenter(),\r\n easing: _ease\r\n }\r\n });\r\n\r\n this._map.addOverlay(this._popupOverlay);\r\n\r\n this._$popupCloser.click((evt) => {\r\n this.closePopup();\r\n });\r\n\r\n // display popup on click\r\n this._map.on('singleclick', (evt: {coordinate: [number, number], pixel: ol.Pixel}) => {\r\n\r\n this.closePopup();\r\n this._popupCoordinate = evt['coordinate'];\r\n\r\n // esri map service layers\r\n if (this._esriMapServiceLayers.length > 0) {\r\n\r\n let queryParams = {\r\n geometry: evt['coordinate'].join(','),\r\n geometryType: 'esriGeometryPoint',\r\n layers: 'all',\r\n sr: this._map.getView().getProjection().getCode().split(':')[1],\r\n mapExtent: (this._map.getView().calculateExtent(this._map.getSize()) as number[]).join(','),\r\n imageDisplay: (this._map.getSize() as number[]).join(',') + ',96',\r\n returnGeometry: true,\r\n tolerance: 15,\r\n f: 'pjson'\r\n };\r\n\r\n for (let l of this._esriMapServiceLayers) {\r\n l.getPopupInfo(queryParams);\r\n }\r\n }\r\n\r\n let layerFeatureObjectArray = this._featuresAtPixel(evt['pixel']);\r\n\r\n this._passThroughLayerFeatureArray = [];\r\n this._currentPopupIndex = -1;\r\n\r\n for (let i = 0; i < layerFeatureObjectArray.length; i++) {\r\n let featObj = layerFeatureObjectArray[i];\r\n\r\n let props = featObj.feature.getProperties();\r\n\r\n let popupContentResponse = this._arrPopupContentFunction[featObj.layerIndex](props, this._$popupContent);\r\n\r\n //skip if return was false\r\n if (popupContentResponse === false) {\r\n //continue;\r\n } else if (typeof popupContentResponse == 'string') {\r\n featObj.popupContent = popupContentResponse as string;\r\n this._passThroughLayerFeatureArray.push(featObj);\r\n } else {\r\n featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n }\r\n }\r\n\r\n this._popupContentLength = this._passThroughLayerFeatureArray.length;\r\n\r\n this._currentPopupIndex = -1;\r\n\r\n let popupHtml = '<div class=\"ol-popup-nav\">';\r\n popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">◀</span>';\r\n popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">▶</span>';\r\n popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n popupHtml += `<span> of </span>`;\r\n popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n popupHtml += `<span> - </span>`;\r\n popupHtml += `<span class=\"current-popup-layer-name\"></span>`;\r\n popupHtml += '</div>';\r\n popupHtml += '<div class=\"ol-popup-inner\">';\r\n\r\n popupHtml += '</div>';\r\n\r\n this._$popupContent.html(popupHtml);\r\n\r\n this._$popupContent.find('.previous-popup').click(() => {\r\n if (this._popupContentLength == 1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == 0) {\r\n this._currentPopupIndex = this._popupContentLength - 1;\r\n } else {\r\n this._currentPopupIndex--;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n let nextPopup = this._$popupContent.find('.next-popup');\r\n\r\n nextPopup.click(() => {\r\n if (this._popupContentLength == 1 && this._currentPopupIndex > -1) {\r\n return;\r\n }\r\n\r\n if (this._currentPopupIndex == this._popupContentLength - 1) {\r\n this._currentPopupIndex = 0;\r\n } else {\r\n this._currentPopupIndex++;\r\n }\r\n this._triggerFeatSelect();\r\n });\r\n\r\n\r\n if (this._popupContentLength > 0) {\r\n nextPopup.trigger('click');\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n });\r\n\r\n //change mouse cursor when over marker\r\n this._map.on('pointermove', (evt) => {\r\n\r\n if (evt['dragging']) {\r\n return;\r\n }\r\n let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n\r\n let hit = false;\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (f, l) => {\r\n if (hit) {\r\n return;\r\n }\r\n\r\n for (let vLyr of this._arrPopupLayers){\r\n if (vLyr.olLayer == l){\r\n hit = true;\r\n break;\r\n }\r\n }\r\n });\r\n\r\n let mapElement = this.map.getTargetElement() as HTMLElement;\r\n mapElement.style.cursor = hit ? 'pointer' : '';\r\n });\r\n }\r\n\r\n /**\r\n * helper to select features\r\n * @private\r\n */\r\n _triggerFeatSelect() {\r\n let $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n let $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n let $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n this.clearSelection();\r\n let lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n $layerNameSpan.html(lyrFeatObj.layerName);\r\n $innerPopup.html(lyrFeatObj.popupContent);\r\n lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n for (let f of this._popupChangedFunctions) {\r\n f(this._$popupContent);\r\n }\r\n }\r\n\r\n\r\n /**\r\n *\r\n * @param feature - the ol feature\r\n * @param {LayerEsriMapServer} lyr - the map server layer\r\n * @param {string} popupContent - popup content\r\n * @param {string} esriName - esri layer name\r\n */\r\n addMapServicePopupContent(feature: ol.Feature, lyr: LayerEsriMapServer, popupContent: string, esriName: string) {\r\n\r\n let featLayerObject = new FeatureLayerProperties(\r\n feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName\r\n );\r\n featLayerObject.popupContent = popupContent;\r\n\r\n this._passThroughLayerFeatureArray.push(featLayerObject);\r\n this._popupContentLength++;\r\n\r\n $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\r\n if (!this._popupOpen) {\r\n this._$popupContent.find('.next-popup').trigger('click');\r\n\r\n this._popupOverlay.setPosition(this._popupCoordinate);\r\n this._$popupContent.scrollTop(0);\r\n this._popupOpen = true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param pixel - the ol pixel\r\n * @returns feature layer properties\r\n * @private\r\n */\r\n _featuresAtPixel(pixel: ol.Pixel): Array<FeatureLayerProperties> {\r\n let layerFeatureObjectArray: FeatureLayerProperties[] = [];\r\n\r\n this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n let hasLyr = false;\r\n\r\n let j;\r\n let lyr = null;\r\n\r\n for (j = 0; j < this._arrPopupLayers.length; j++){\r\n lyr = this._arrPopupLayers[j];\r\n\r\n if (lyr.olLayer === layer){\r\n hasLyr = true;\r\n break;\r\n }\r\n }\r\n\r\n if (hasLyr) {\r\n layerFeatureObjectArray.push(\r\n new FeatureLayerProperties(\r\n feature, lyr, j, this._selectionLayers[j]));\r\n }\r\n });\r\n\r\n return layerFeatureObjectArray;\r\n }\r\n\r\n closePopup() {\r\n this._checkInit();\r\n this._popupOpen = false;\r\n this._popupOverlay.setPosition(undefined);\r\n this._$popupCloser[0].blur();\r\n this.clearSelection();\r\n this._$popupContent.html('');\r\n\r\n return false;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param chgFunction - popup change function\r\n */\r\n addPopupChangedFunction(chgFunction: popupChangedFunction) {\r\n this._popupChangedFunctions.push(chgFunction);\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase|*} lyr - the layer being acted on\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns the new selection layer\r\n * @private\r\n */\r\n _addPopupLayer(lyr: LayerBaseVector|LayerEsriMapServer, selectionStyle: {color?: string, width?: number, olStyle?: ol.style.Style}): ol.layer.Vector {\r\n this._checkInit();\r\n\r\n selectionStyle = selectionStyle || {};\r\n selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n selectionStyle.width = selectionStyle.width || 10;\r\n\r\n let theStyle;\r\n\r\n if (selectionStyle.olStyle) {\r\n theStyle = selectionStyle.olStyle;\r\n } else {\r\n theStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: selectionStyle.color,\r\n width: selectionStyle.width\r\n }),\r\n image: new ol.style.Circle({\r\n radius: 7,\r\n fill: new ol.style.Fill({color: selectionStyle.color}),\r\n stroke: new ol.style.Stroke({color: selectionStyle.color, width: 1})\r\n }),\r\n fill: new ol.style.Fill({\r\n color: selectionStyle.color\r\n })\r\n });\r\n }\r\n\r\n let selectionLayer = new ol.layer.Vector(\r\n {\r\n source: new ol.source.Vector(),\r\n style: theStyle\r\n }\r\n );\r\n\r\n selectionLayer.setZIndex(100);\r\n\r\n this._selectionLayers.push(selectionLayer);\r\n this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n this.map.addLayer(selectionLayer);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n\r\n /**\r\n * Add popup to the map\r\n * @param {LayerBase|*} lyr The layer that the popup with act on\r\n * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addVectorPopup(lyr: LayerBaseVector, popupContentFunction: popupCallback,\r\n selectionStyle?: {color?: string, width?: number, olStyle?: ol.style.Style}) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._arrPopupLayerIds.push(lyr.id);\r\n this._arrPopupLayers.push(lyr);\r\n // this._arrPopupOlLayers.push(lyr.olLayer);\r\n this._arrPopupContentFunction.push(popupContentFunction);\r\n\r\n return selectionLayer;\r\n };\r\n\r\n\r\n /**\r\n *\r\n * @param {LayerBase} lyr - layer\r\n */\r\n removeVectorPopup(lyr: LayerBaseVector) {\r\n let idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\r\n if (idx > -1) {\r\n this._arrPopupLayerIds.splice(idx, 1);\r\n this._arrPopupLayers.splice(idx, 1);\r\n // this._arrPopupOlLayers.splice(idx, 1);\r\n this._arrPopupContentFunction.splice(idx, 1);\r\n this._selectionLayers.splice(idx, 1);\r\n delete this._selectionLayerLookup[lyr.id];\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerEsriMapServer} lyr - map server layer\r\n * @param {object} [selectionStyle={}] the selection style configuration\r\n * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n * @returns {object} a reference to the ol selection layer\r\n */\r\n addMapServicePopup(lyr: LayerEsriMapServer, selectionStyle?: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction) {\r\n let selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n this._esriMapServiceLayers.push(lyr);\r\n\r\n return selectionLayer;\r\n }\r\n\r\n clearSelection() {\r\n this._checkInit();\r\n for (let i = 0; i < this._selectionLayers.length; i++) {\r\n this._selectionLayers[i].getSource().clear();\r\n }\r\n for (let f of this._mapClickFunctions) {\r\n f();\r\n }\r\n };\r\n\r\n /**\r\n * Add a function to be called when the map is clicked but before any popups are implemented\r\n * @param {function} func - the map click function\r\n */\r\n addMapClickFunction(func: Function) {\r\n this._mapClickFunctions.push(func);\r\n }\r\n}\r\nnm.MapPopupCls = MapPopupCls;\r\nexport default MapPopupCls;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopupCls.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\nimport {Geocode} from './geocode';\r\nconst nm = provide('olHelpers');\r\n\r\nexport interface quickMapOptions {\r\n divId?: string;\r\n center?: {x: number, y: number};\r\n zoom?: number;\r\n minZoom?: number;\r\n maxZoom?: number;\r\n baseSwitcher?: boolean;\r\n fullScreen?: boolean;\r\n addGeocode?: boolean;\r\n}\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param [options={}] config options\r\n * @param [options.divId=map] map div id\r\n * @param [options.center={}] center config object\r\n * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param [options.center.y=5574910] center y, web mercator y or lat\r\n * @param [options.zoom=7] zoom level\r\n * @param [options.minZoom=undefined] min zoom\r\n * @param [options.maxZoom=undefined] max zoom\r\n * @param [options.baseSwitcher=true] if add base map switcher\r\n * @param [options.fullScreen=false] if add base map switcher\r\n * @returns the ol map\r\n */\r\nexport function quickMapBase(options: quickMapOptions = {}): ol.Map {\r\n options.divId = options.divId || 'map';\r\n options.center = options.center || {x: -10018378, y: 5574910};\r\n options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n options.addGeocode = options.addGeocode || false;\r\n\r\n\r\n let $mapDiv = $('#' + options.divId);\r\n $mapDiv.css('position', 'relative');\r\n\r\n let osmLayer = new ol.layer.Tile({source: new ol.source.OSM()});\r\n // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\r\n let osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADQ1NDk5OURFREtLS1FHSFlZWGJRVGJiYWdmZWxsbHRmaXBpanN0c3V0dHp5eX5+fIVzd4F3eeV0jud5juZ8k4aHhomHhoyGh5eGj5OVlJiVlZiYl5qZmJydnKOTlaKZmqKdnaOioaqqqKuzsbOvrrSysLa3tbW4uLm6ub27ub+/vbGXwbCZwbCgxLKlxrOqyLStybO3yrSxyrWzzbW2y7a1zbK4y7W6zbW8y760yrTAzbTFzrPKzrLOzrTJzrTOzr7CwbXC0LXK0LTO0L3I0bPQz7TQz7PS0bXQ0LnR0brW1bzT0r7U077V1Lzc2dqNqteUsdyXscaquuOHneaGmueHnOeJnuiBleiKn+eNoOiOoOWUpOiRo+iSpeiUpeqYpumaqOmdrPSynemgruSqtOmisOmlsuuqtequuOW1vOuxu+uxvOq1ve+xvPK0pvW3o/W5pfO5qvS7qfCwvMOuwc2/wNenxNyyzNe/0Nq31Nq51dy72Oy3wOu4wOu+xey4wO+6xO2+xfTAr/TCsvfFtPHLvvTJuMPDwMfHxcXKyc3DxMvFyMvLyM3PzcDV08DV1MTX1cbY1s7X1sjZ1sra2Mnd3M7b2c7c2tfH1tnB1t7F2d7M29fX1tLY1tDd2tHe3NTf3NnS19rZ1tva2Nnf3t3d28rh3tXg3Nnh3tzj393k39ni4N7k4N7n5uXDyOfLz+zAxu3CyOzEyezKzeDJ3eLM3uvP0u3P0ePf2+7R0u7Q1u/U0+7U1ezc0+7a2e/d2+3f3vbFzvLOwfHN0PPQw/TUx/LWyvLYzPDQ1fPe0ubc4vve4uHh3+nh3+/h2u/h3vHj2vHl3uHm4eTn4uDp5ebo4+Xo5ODq6ebq6OTv6+nl4+/j4O7l4e7n5ujp4+np5Ozq5e7s5urt6O7t6Orw6u7x6u3x7vPj5PDl4fDo4vDq5fDt5vDu6PDv7PTv6fDx6vHx7fH17fXw6fXy7fb07/bz8fT18vn38vr39fr48/r59Pr6+P3++//+/gAAALNTSk0AAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAFNElEQVRIS1VVCZxVUxi/9l0UIUT2bMnY43bVI2c0Y01kSWIaS0j2JEtkN41piomZrPPKQ2aQ7JKImOZlnm2493TJzDufuU1Zi+v/fee+mZ//793vnPOd7zvfes5zDBEZkBBjAcIjb+Iiotqgdhat8AMK0vl7/R9N7GiWtshqIr+EZ5gYKibyUsXY1l/mfFpssvUlWQ0FkU3gy4+RB/+kwYcO8pRSnldcOU/r2lAHARSwk2ORgEmOdC1EsuRiYSqMPwwroMIraZk5V2fYJQjCKfZrRmh3gSAZi2i4b7wSylWu8EqZwS59JkFUaW96JbNSc+CEUmt4rorwuZmWdDaoc+uZETuQlTCU5xYzR7muUnVUVo+BcRhre/VwUpasgJwhH7JkYIYA0sNxhmCwUK+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcdauRGzQSNtA7EHUYhXyEwhhgjFUqRuO+rauhF1awFpzCsmwUbjIFBR0u1bKtyGpulW/H/cVVzkyGaIWTIR9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tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl7W36n/1Ep9KBPG/S+Py0PkjU/gPKQGqwTHryiWYFAXSvMairsio7SjyNsnCzh0qKImV9/7mhfHQZx2yN1O+7rXUm33MUPaboOkAJHaoIdXfJj2xWeyD8jMFEXkvIu5qzpU988gWB5zl+GS+sFe55trEVPdWZB2miq8bBVkNFO2R0qnrfkiXhcJhtDNXE6tbW97/s9O9/7ZfVhx86/CwrROpfvvxboMqeLsuqPr1j44qEwDNMOBximUiYoU8sw7BC/a7T72uEnyJDlGxZ9KcglZRyuqqrv/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQeC3LsUxoxVKW14l3BX2WcoUYPiZyLLe8teZ+iuT4GGhvV5KpKWkpyzxEr2MZgQ1xdRjfRBoH+2k6lIHj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92iO0BuX3bCfItl0PEwvYLqpwXG2MHlGsQ4S8pMJZv1JGmHiEoHQDdOjwmVlEP/nE9ADKjI8xLI0OOGITfy0SbeG/C2jKUDGSlDhM9I3IpK9iup6XnbRNC7yqueNsJCCIiXzdQhnaGN+46umnEdy5U5UbUJ48LFM9GkJo8BdDOiAZ7ZIQbKhYLMqvhU2wmNxjEAsS2AI7y4nWF64duePbk7YV3zvAVLEMD9AxJRNa3KDUibV7DjnkuprMEYjScFNcaR2ceP2u9R/5k1052Ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+LPa1U9fvPi9qlA4XEUBJc3dFlpsR457IDl1iPqLp7o81NQgyV19iYU38uTiv975Pd3SiwQcsGjx+v4/6fl5T7EOOMTCtpbKxfemsQq/3olQZcminADAAI0cuGLHaHOFxbuGvRk/Z9u7CULqoVR6NE0yx1avj30oRhc/jWUoIALGxkz0dg1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+1KyCWKjC3W/8dF1d666+RaabBVTFTHacjoojBNDh0NDxk+IPTlwfqJkWpbnpFHXIbLbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\r\n if (options.baseSwitcher) {\r\n // let switcherContent = '<div class=\"base-map-switcher\" title=\"Toggle Base Layer\" style=\"';\r\n // switcherContent += 'position: absolute; top: 70px; left: 4px; border: solid black 1px; ';\r\n // switcherContent += `height: 50px; width: 50px; z-index: 10; border-radius: 4px; background: ${aerialCss};`;\r\n // switcherContent += '\"></div>';\r\n // $mapDiv.append(switcherContent);\r\n //\r\n // $mapDiv.find('.base-map-switcher').click(function() {\r\n // \"use strict\";\r\n // osmLayer.setVisible(!osmLayer.getVisible());\r\n // satLayer.setVisible(!satLayer.getVisible());\r\n //\r\n // if (osmLayer.getVisible()){\r\n // $(this).css('background', aerialCss);\r\n // } else {\r\n // $(this).css('background', osmCss);\r\n // }\r\n // });\r\n }\r\n\r\n if (options.zoom < 0 || options.zoom > 28) {\r\n throw 'zoom out of range';\r\n }\r\n\r\n if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n let p = new ol.geom.Point([options.center.x, options.center.y]);\r\n new ol.proj.Projection({code: \"EPSG:4326\"});\r\n\r\n p.transform(new ol.proj.Projection({code: \"EPSG:4326\"}), new ol.proj.Projection({code: \"EPSG:3857\"}));\r\n let coordinates = p.getCoordinates();\r\n options.center.x = coordinates[0];\r\n options.center.y = coordinates[1];\r\n }\r\n\r\n const controls = ol.control.defaults({\r\n attributionOptions: {collapsible: false}\r\n }\r\n );\r\n\r\n const view = new ol.View({\r\n center: [options.center.x, options.center.y],\r\n zoom: options.zoom,\r\n minZoom: options.minZoom,\r\n maxZoom: options.maxZoom\r\n });\r\n\r\n let map = new ol.Map({\r\n layers: [osmLayer],\r\n target: options.divId,\r\n controls: controls,\r\n view: view\r\n });\r\n\r\n if (options.fullScreen) {\r\n map.addControl(new ol.control.FullScreen({}));\r\n }\r\n\r\n if (options.addGeocode){\r\n new Geocode(document.getElementById(options.divId) as HTMLDivElement, map);\r\n }\r\n\r\n return map;\r\n}\r\n\r\nnm.quickMapBase = quickMapBase;\r\nexport default quickMapBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMapBase.ts","/**\r\n * Created by gavorhes on 12/14/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nconst nm = provide('olHelpers.zoomResolutionConvert');\r\n\r\nlet _zoomResLookup = [\r\n 156543.03392804097, //0\r\n 78271.51696402048, //1\r\n 39135.75848201024, //2\r\n 19567.87924100512, //3\r\n 9783.93962050256, //4\r\n 4891.96981025128, //5\r\n 2445.98490512564, //6\r\n 1222.99245256282, //7\r\n 611.49622628141, //8\r\n 305.748113140705, //9\r\n 152.8740565703525, //10\r\n 76.43702828517625, //11\r\n 38.21851414258813, //12\r\n 19.109257071294063, //13\r\n 9.554628535647032, //14\r\n 4.777314267823516, //15\r\n 2.388657133911758, //16\r\n 1.194328566955879, //17\r\n 0.5971642834779395, //18\r\n 0.29858214173896974, //19\r\n 0.14929107086948487, //20\r\n 0.07464553543474244, //21\r\n 0.03732276771737122, //22\r\n 0.01866138385868561, //23\r\n 0.009330691929342804, //24\r\n 0.004665345964671402, //25\r\n 0.002332672982335701, //26\r\n 0.0011663364911678506, //27\r\n 0.0005831682455839253 //28\r\n];\r\n\r\n/**\r\n * Get the resolution given the zoom level\r\n * @param {number} zoomLevel - the zoom level\r\n * @returns {number|*} the map resolution\r\n */\r\nexport function zoomToResolution(zoomLevel: number): number {\r\n \"use strict\";\r\n\r\n if (typeof zoomLevel == 'number') {\r\n if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n return _zoomResLookup[zoomLevel];\r\n } else {\r\n console.log(`invalid zoom level provided: ${zoomLevel}`);\r\n\r\n return undefined;\r\n }\r\n } else {\r\n return undefined;\r\n }\r\n}\r\nnm.zoomToResolution = zoomToResolution;\r\n\r\n\r\n/**\r\n * Get resolution from the zoom level\r\n * @param {number} resolution - the resolution\r\n * @returns {number|*} the zoom level\r\n */\r\nexport function resolutionToZoom(resolution: number): number{\r\n for (let i = 0; i < _zoomResLookup.length; i++){\r\n if (resolution >= _zoomResLookup[i] ){\r\n return i;\r\n }\r\n }\r\n\r\n return 0;\r\n}\r\n\r\nnm.resolutionToZoom = resolutionToZoom;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/zoomResolutionConvert.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 2\n// module chunks = 2 4 5 6 7 8","/**\r\n * Created by gavorhes on 12/7/2015.\r\n */\r\nimport {LayerBase, LayerBaseOptions} from './LayerBase';\r\nimport * as esriToOl from '../olHelpers/esriToOlStyle';\r\nimport mapPopup from '../olHelpers/mapPopup';\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\r\n\r\nconst nm = provide('layers');\r\n\r\n\r\n\r\n/**\r\n * Helper to return the url to the service on the production server\r\n * @param {string} folder\r\n * @param {string} service\r\n * @returns {string}\r\n */\r\nexport function makeServiceUrl(folder: string, service: string): string{\r\n return `https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/${folder}/${service}/MapServer`\r\n}\r\n\r\nexport function localCacheUrl(folder: string, service: string): string{\r\n let loc = window.location.href;\r\n\r\n let url = `/mapserver/${folder}/${service}`;\r\n\r\n if (loc.indexOf('transportal.cee.wisc.edu') > -1){\r\n if (loc.toLowerCase().indexOf('webmapsstage') > -1){\r\n url = 'https://transportal.cee.wisc.edu/gis/webmapsstage' + url;\r\n } else {\r\n url = 'https://transportal.cee.wisc.edu/gis/webmaps' + url\r\n }\r\n }\r\n\r\n\r\n return url;\r\n}\r\n\r\n\r\n\r\n\r\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n addPopup?: boolean;\r\n showLayers?: Array<number>;\r\n getLegend?: boolean;\r\n}\r\n\r\n/**\r\n * esri mapserver layer\r\n * @augments LayerBase\r\n */\r\nexport class LayerEsriMapServer extends LayerBase {\r\n _esriFormat: ol.format.EsriJSON;\r\n _popupRequest: JQueryXHR;\r\n _showLayers: number[];\r\n\r\n /**\r\n * The base layer for all others\r\n * @param {string} url - resource url\r\n * @param {object} [options] - config\r\n * @param {string} [options.id] - layer id\r\n * @param {string} [options.name=Unnamed Layer] - layer name\r\n * @param {number} [options.opacity=1] - opacity\r\n * @param {boolean} [options.visible=true] - default visible\r\n * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n * @param {number} [options.zIndex=0] the z index for the layer\r\n * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n * @param {boolean} [options.legendContent] additional content to add to the legend\r\n * @param {boolean} [options.addPopup=false] if a popup should be added\r\n * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n */\r\n constructor(url: string, options: LayerEsriMapServerOptions = {}) {\r\n\r\n super(url, options);\r\n this._source = new ol.source.TileArcGISRest(\r\n {\r\n url: this.url == '' ? undefined : this.url,\r\n params: typeof options.showLayers == 'undefined' ? undefined : {layers: 'show:' + options.showLayers.join(',')}\r\n }\r\n );\r\n\r\n this._showLayers = options.showLayers || [];\r\n\r\n this._olLayer = new ol.layer.Tile({\r\n source: this._source as ol.source.Tile,\r\n visible: this.visible,\r\n opacity: this.opacity,\r\n minResolution: this._minResolution,\r\n maxResolution: this._maxResolution\r\n });\r\n\r\n\r\n this._olLayer.setZIndex(this._zIndex);\r\n\r\n options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\r\n this._esriFormat = new ol.format.EsriJSON();\r\n this._popupRequest = null;\r\n\r\n options.getLegend = typeof options.getLegend === 'boolean' ? options.getLegend : true;\r\n\r\n if (options.getLegend){\r\n this.addLegendContent();\r\n }\r\n\r\n if (options.addPopup) {\r\n mapPopup.addMapServicePopup(this);\r\n }\r\n }\r\n\r\n /**\r\n * add additional content to the legend\r\n * @param {string} [additionalContent=''] additional content for legend\r\n */\r\n addLegendContent(additionalContent?: string) {\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] !== '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'legend?f=pjson&callback=?';\r\n\r\n $.get(urlCopy, {}, (d) => {\r\n let newHtml = esriToOl.makeMapServiceLegend(d, this._showLayers);\r\n super.addLegendContent(newHtml);\r\n }, 'json');\r\n }\r\n\r\n\r\n getPopupInfo(queryParams: {[s: string]: any}) {\r\n if (!this.visible) {\r\n return;\r\n }\r\n\r\n let urlCopy = this.url;\r\n\r\n if (urlCopy[urlCopy.length - 1] != '/') {\r\n urlCopy += '/';\r\n }\r\n\r\n urlCopy += 'identify?callback=?';\r\n\r\n let __this = this;\r\n\r\n if (this._popupRequest != null) {\r\n this._popupRequest.abort();\r\n }\r\n\r\n\r\n this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n for (let r of d['results']) {\r\n\r\n let popupHtml = '<table class=\"esri-popup-table\">';\r\n\r\n for (let a in r['attributes']) {\r\n if (r['attributes'].hasOwnProperty(a)) {\r\n let attrVal = r['attributes'][a];\r\n\r\n if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n continue;\r\n }\r\n\r\n let attr = a;\r\n if (attr.length > 14) {\r\n attr = attr.slice(0, 11) + '...';\r\n }\r\n\r\n popupHtml += `<tr><td>${attr}</td><td>${attrVal}</td></tr>`;\r\n }\r\n }\r\n\r\n popupHtml += '</table>';\r\n\r\n mapPopup.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n }\r\n }, 'json');\r\n\r\n this._popupRequest.always(function () {\r\n __this._popupRequest = null;\r\n });\r\n\r\n }\r\n\r\n /**\r\n *\r\n * @returns {ol.source.TileArcGISRest} the vector source\r\n */\r\n get source(): ol.source.TileArcGISRest {\r\n return super.getSource() as ol.source.TileArcGISRest;\r\n }\r\n\r\n /**\r\n *\r\n * @returns the ol layer\r\n */\r\n get olLayer(): ol.layer.Tile {\r\n return super.getOlLayer() as ol.layer.Tile;\r\n }\r\n}\r\nnm.LayerEsriMapServer = LayerEsriMapServer;\r\nexport default LayerEsriMapServer;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/layers/LayerEsriMapServer.ts","/**\r\n * Created by gavorhes on 1/4/2016.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers.esriToOlStyle');\r\n\r\n\r\n/**\r\n *\r\n * @param {Array<number>} colorArray - input color array\r\n * @param {number} opacity - the opacity 0 to 1\r\n * @returns {string} rgba string\r\n * @private\r\n */\r\nfunction _colorArrayToRgba(colorArray: [number, number, number], opacity: number): string {\r\n \"use strict\";\r\n\r\n return `rgba(${colorArray[0]},${colorArray[1]},${colorArray[2]},${opacity})`;\r\n}\r\n\r\n/**\r\n * escape html charcters\r\n * @param {string} str - input string\r\n * @returns {string} escaped string\r\n */\r\nfunction htmlEscape(str: string): string {\r\n return String(str)\r\n .replace(/&/g, '&')\r\n .replace(/\"/g, '"')\r\n .replace(/'/g, ''')\r\n .replace(/</g, '<')\r\n .replace(/>/g, '>');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface iEsriResponse{\r\n drawingInfo: {\r\n renderer: iEsriRenderer;\r\n transparency: number\r\n },\r\n geometryType: string\r\n}\r\n\r\n\r\nexport interface iEsriRenderer{\r\n type: string;\r\n symbol: iEsriSymbol;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n field1: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultLabel: string;\r\n}\r\n\r\nexport interface iEsriSymbol{\r\n size: number;\r\n type: string;\r\n outline:{\r\n color: [number, number, number];\r\n width: number;\r\n },\r\n color: [number, number, number];\r\n width: number;\r\n imageData: string\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n legendHtml: string;\r\n opacity: number;\r\n symbolObj: iEsriSymbol;\r\n olStyle: ol.style.Style;\r\n\r\n /**\r\n *\r\n * @param symbolObj\r\n * @param {number} opacity\r\n */\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n this.symbolObj = symbolObj;\r\n this.opacity = opacity;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\ninterface ICommonSymbol{\r\n new (symbolObj: iEsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSMS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n let radius = this.symbolObj.size;\r\n\r\n\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Circle({\r\n radius: radius,\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n }),\r\n stroke: new ol.style.Stroke({color: outerColor, width: outlineWidth})\r\n })\r\n });\r\n this.legendHtml = `<span class=\"legend-layer-icon\" style=\"color: ${innerColor}\">●</span>`;\r\n break;\r\n case 'esriPMS':\r\n this.olStyle = new ol.style.Style({\r\n image: new ol.style.Icon({src: `data:image/png;base64,${this.symbolObj['imageData']}`})\r\n });\r\n this.legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${this.symbolObj['imageData']}\">`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Point symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass LineSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj.type) {\r\n case 'esriSLS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let lineWidth = this.symbolObj.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: innerColor,\r\n //lineDash: [4],\r\n width: lineWidth\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 4px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: -1px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Line symbol does not handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nclass PolygonSymbol extends CommonSymbol {\r\n constructor(symbolObj: iEsriSymbol, opacity: number) {\r\n super(symbolObj, opacity);\r\n switch (this.symbolObj['type']) {\r\n case 'esriSFS':\r\n let innerColor = _colorArrayToRgba(this.symbolObj.color, this.opacity);\r\n let outerColor = _colorArrayToRgba(this.symbolObj.outline.color, this.opacity);\r\n let outlineWidth = this.symbolObj.outline.width;\r\n\r\n this.olStyle = new ol.style.Style({\r\n stroke: new ol.style.Stroke({\r\n color: outerColor,\r\n //lineDash: [4],\r\n width: outlineWidth\r\n }),\r\n fill: new ol.style.Fill({\r\n color: innerColor\r\n })\r\n });\r\n\r\n this.legendHtml = `<span class=\"legend-layer-icon\" `;\r\n this.legendHtml += `style=\"`;\r\n this.legendHtml += `background-color: ${innerColor};`;\r\n this.legendHtml += `border: solid ${outerColor} 1px;`;\r\n this.legendHtml += `width: 40px;`;\r\n this.legendHtml += `height: 9px;`;\r\n this.legendHtml += `position: relative;`;\r\n this.legendHtml += `display: inline-block;`;\r\n this.legendHtml += `top: 2px;`;\r\n this.legendHtml += `\"></span>`;\r\n break;\r\n\r\n default:\r\n console.log(this.symbolObj);\r\n alert('Polygon symbol does handle symbol type: ' + this.symbolObj['type']);\r\n }\r\n }\r\n}\r\n\r\nexport interface iStyleFunc{\r\n (f: ol.Feature): ol.style.Style| ol.style.Style[]\r\n}\r\n\r\nclass SymbolGenerator {\r\n opacity: number;\r\n renderer: iEsriRenderer;\r\n legendHtml: string;\r\n olStyle: iStyleFunc | ol.style.Style;\r\n\r\n constructor(esriResponse: iEsriResponse) {\r\n this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n this.renderer = esriResponse.drawingInfo.renderer;\r\n this.olStyle = undefined;\r\n this.legendHtml = '';\r\n }\r\n}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n symbol: iEsriSymbol;\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the symbol class to use\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.symbol = this.renderer.symbol;\r\n let symbolObj = new SymbolClass(this.symbol, this.opacity);\r\n this.olStyle = symbolObj.olStyle;\r\n this.legendHtml = symbolObj.legendHtml;\r\n }\r\n}\r\n\r\nclass UniqueValueSymbol extends SymbolGenerator {\r\n\r\n propertyName: string;\r\n defaultSymbol: iEsriSymbol;\r\n defaultStyle: ol.style.Style;\r\n defaultLabelHtml: string;\r\n labelArray: Array<string>;\r\n legendArray: Array<string>;\r\n propertyStyleLookup: {[s: string]: ol.style.Style};\r\n valueArray: Array<any>;\r\n uniqueValueInfos: Array<{label: string, value: any, symbol: iEsriSymbol}>;\r\n\r\n /**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @param SymbolClass - the Symbol class definition\r\n */\r\n constructor(esriResponse: iEsriResponse, SymbolClass: ICommonSymbol) {\r\n super(esriResponse);\r\n this.uniqueValueInfos = this.renderer.uniqueValueInfos;\r\n this.propertyName = this.renderer.field1;\r\n this.defaultSymbol = this.renderer.defaultSymbol;\r\n\r\n\r\n if (this.defaultSymbol) {\r\n let symbolObj = new SymbolClass(this.defaultSymbol, this.opacity);\r\n this.defaultStyle = symbolObj.olStyle;\r\n this.defaultLabelHtml = `<span class=\"legend-layer-subitem\">${htmlEscape(this.renderer['defaultLabel'])}</span>` + symbolObj.legendHtml;\r\n } else {\r\n this.defaultStyle = undefined;\r\n this.defaultLabelHtml = 'other';\r\n }\r\n\r\n this.valueArray = [];\r\n this.labelArray = [];\r\n this.legendArray = [];\r\n this.propertyStyleLookup = {};\r\n\r\n for (let uniqueVal of this.uniqueValueInfos) {\r\n this.labelArray.push(uniqueVal['label']);\r\n this.valueArray.push(uniqueVal['value']);\r\n let uniqueSym = new SymbolClass(uniqueVal.symbol, this.opacity);\r\n this.legendArray.push(`<span class=\"legend-layer-subitem\">${htmlEscape(uniqueVal['label'])}</span>` + uniqueSym.legendHtml);\r\n this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n }\r\n\r\n this.olStyle = (feature: ol.Feature): ol.style.Style[] => {\r\n let checkProperties = feature.getProperties();\r\n let checkProperty = checkProperties[this.propertyName];\r\n\r\n if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n return [this.propertyStyleLookup[checkProperty]];\r\n } else {\r\n return [this.defaultStyle];\r\n }\r\n };\r\n\r\n if (this.defaultLabelHtml !== null) {\r\n this.legendArray.push(this.defaultLabelHtml);\r\n }\r\n\r\n this.legendHtml = '<ul>';\r\n for (let h of this.legendArray) {\r\n this.legendHtml += `<li>${h}</li>`;\r\n }\r\n this.legendHtml += '</ul>';\r\n }\r\n}\r\n\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: iEsriResponse): {style: iStyleFunc | ol.style.Style, legend: string} {\r\n \"use strict\";\r\n let renderer = esriResponse.drawingInfo.renderer;\r\n let symbolLegendOut: SymbolGenerator = null;\r\n\r\n switch (renderer.type) {\r\n case 'simple':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse.geometryType + ' not handled');\r\n }\r\n break;\r\n case 'uniqueValue':\r\n switch (esriResponse.geometryType) {\r\n case 'esriGeometryPoint':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n break;\r\n case 'esriGeometryPolyline':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n break;\r\n case 'esriGeometryPolygon':\r\n symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n break;\r\n default:\r\n console.log(esriResponse);\r\n alert(esriResponse['geometryType'] + ' not handled');\r\n }\r\n break;\r\n default:\r\n alert('not handled renderer type: ' + renderer['type']);\r\n }\r\n\r\n if (symbolLegendOut == null) {\r\n return {style: undefined, legend: ''};\r\n } else {\r\n return {style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml};\r\n }\r\n}\r\n\r\nnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\r\n\r\nexport interface iMapServiceLegend{\r\n layerName: string;\r\n legend: {label: string, imageData: string}[]\r\n}\r\n\r\n/**\r\n *\r\n * @param {object} lyrObject - the layer as defined in the response\r\n * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n * @returns {string} legend html\r\n */\r\nfunction mapServiceLegendItem(lyrObject: iMapServiceLegend, skipLayerNameAndExpander: boolean = false) {\r\n\r\n\r\n skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n let layerName = lyrObject['layerName'];\r\n let legendItems = lyrObject['legend'];\r\n let legendHtml = '';\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += `<span class=\"legend-layer-subitem\">${layerName}</span>`;\r\n }\r\n\r\n if (legendItems.length == 1) {\r\n legendHtml = `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[0]['imageData']}\">`;\r\n } else {\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">▼</span>';\r\n }\r\n legendHtml += '<ul>';\r\n for (let i = 0; i < legendItems.length; i++) {\r\n legendHtml += `<li>`;\r\n legendHtml += `<span class=\"legend-layer-subitem\">${htmlEscape(legendItems[i]['label'])}</span>`;\r\n legendHtml += `<img class=\"legend-layer-icon\" height=\"17\" src=\"data:image/png;base64,${legendItems[i]['imageData']}\">`;\r\n legendHtml += `</li>`;\r\n }\r\n legendHtml += '</ul>';\r\n }\r\n\r\n if (!skipLayerNameAndExpander) {\r\n legendHtml = `<span class=\"legend-layer-subitem\">${layerName}</span>` + legendHtml;\r\n }\r\n\r\n return legendHtml;\r\n}\r\n\r\n/**\r\n * make map service legent\r\n * @param {object} esriResponse - layer info\r\n * @param showLayers - limited number of layers to show in map service\r\n * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse: {layers: iMapServiceLegend[]}, showLayers: number[] = []) {\r\n \"use strict\";\r\n\r\n let newLegendHtml = '';\r\n\r\n let layers = esriResponse['layers'];\r\n\r\n if (layers.length == 1) {\r\n newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n } else {\r\n newLegendHtml += '<ul>';\r\n for (let i = 0; i < layers.length; i++) {\r\n if (showLayers.length > 0 && showLayers.indexOf(i) < 0){\r\n continue;\r\n }\r\n newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n }\r\n newLegendHtml += '</ul>';\r\n }\r\n\r\n return newLegendHtml;\r\n}\r\n\r\nnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/esriToOlStyle.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport provide from './provide';\r\nlet nm = provide('util');\r\n\r\n\r\n/**\r\n * guids are used to uniquely identify groups and features\r\n * @returns {string} a new guid\r\n */\r\nexport function makeGuid() {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n .replace(/[xy]/g, function (c) {\r\n let r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\r\n return v.toString(16);\r\n });\r\n\r\n}\r\nnm.makeGuid = makeGuid;\r\nexport default makeGuid;\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/makeGuid.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapPopupCls from './mapPopupCls';\r\n\r\n/**\r\n * The single popup object catch is that it is common to multimap pages\r\n * @type {MapPopupCls}\r\n */\r\nexport const mapPopup = new MapPopupCls() as MapPopupCls;\r\nexport default mapPopup;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapPopup.ts","/**\r\n * Created by gavorhes on 12/16/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport makeGuid from '../util/makeGuid';\r\nimport mapMove from '../olHelpers/mapMove';\r\n\r\nlet nm = provide('collections');\r\nimport $ = require('jquery');\r\nimport {LayerBase} from \"../layers\";\r\n\r\nexport interface iLegendItem{\r\n groupName: string;\r\n collapse?: boolean;\r\n addCheck?: boolean;\r\n items: Array<iLegendItem|LayerBase>\r\n}\r\n\r\nexport interface iLegendOptions{\r\n layerDivClasses?: string[]\r\n legendTitle?: string\r\n scaleDependent?: boolean\r\n}\r\n\r\nclass LayerGroup {\r\n groupLayers: any;\r\n groupLayersLookup: any;\r\n groupGroupsLookup: any;\r\n groupGroups: any;\r\n itemIdArray: any;\r\n groupId: any;\r\n groupName: any;\r\n allLayerArray: any;\r\n parent: any;\r\n allGroupArray: any;\r\n allGroupLookup: any;\r\n allLayerLookup: any;\r\n collapse: boolean;\r\n addCheck: boolean;\r\n layerParentLookup: any;\r\n\r\n /**\r\n *\r\n * @param {object} [groupConfig={}] - group configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n * @param {LayerGroup} [parent=undefined] - the parent group\r\n */\r\n constructor(groupConfig?: iLegendItem, parent?: LayerGroup) {\r\n this.groupLayers = [];\r\n this.groupLayersLookup = {};\r\n this.groupGroups = [];\r\n this.groupGroupsLookup = {};\r\n this.itemIdArray = [];\r\n\r\n if (typeof groupConfig == 'undefined') {\r\n this.parent = null;\r\n this.groupId = 'root';\r\n this.groupName = 'root';\r\n this.allGroupLookup = {root: this};\r\n this.allGroupArray = [this];\r\n this.allLayerArray = [];\r\n this.allLayerLookup = {};\r\n this.layerParentLookup = {};\r\n this.collapse = false;\r\n this.addCheck = false;\r\n } else {\r\n this.groupId = makeGuid();\r\n this.parent = parent;\r\n this.groupName = groupConfig.groupName;\r\n this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n }\r\n }\r\n\r\n /**\r\n *\r\n * @param {object} groupConfig - configuration object\r\n * @param {string} groupConfig.groupName - the group name\r\n * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n * @param {Array<LayerGroup>} parents parent groups\r\n * @returns {LayerGroup} the layer group just added\r\n */\r\n addGroup(groupConfig: iLegendItem, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n let newGroup = new LayerGroup(groupConfig, parentGroup);\r\n this.allGroupLookup[newGroup.groupId] = newGroup;\r\n this.allGroupArray.push(newGroup);\r\n\r\n parentGroup.groupGroups.push(newGroup);\r\n parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n\r\n if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n console.log(newGroup.groupId);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newGroup.groupId);\r\n\r\n return newGroup;\r\n }\r\n\r\n /**\r\n *\r\n * @param {LayerBase} newLayer the layer to be added\r\n * @param {Array} parents array\r\n */\r\n addLegendLayer(newLayer: LayerBase, parents: string[]) {\r\n let parent;\r\n if (parents.length > 0) {\r\n parent = parents[parents.length - 1];\r\n } else {\r\n parent = 'root';\r\n }\r\n\r\n this.allLayerLookup[newLayer.id] = newLayer;\r\n this.allLayerArray.push(newLayer);\r\n\r\n /**\r\n * @type {LayerGroup}\r\n */\r\n let parentGroup = this.allGroupLookup[parent];\r\n\r\n parentGroup.groupLayers.push(newLayer);\r\n parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n console.log(newLayer.id);\r\n throw 'layer and group ids must be unique';\r\n }\r\n parentGroup.itemIdArray.push(newLayer.id);\r\n\r\n this.layerParentLookup[newLayer.id] = parentGroup;\r\n\r\n }\r\n\r\n\r\n\r\n getLegendHtml(legendId: string, options: iLegendOptions) {\r\n\r\n\r\n let legendHtml = `<ul id=\"${legendId}\" class=\"legend-container\">`;\r\n\r\n legendHtml += `<li>${options.legendTitle}<input type=\"checkbox\" checked id=\"suppress-by-extent-${legendId}\" class=\"suppress-by-extent\">` +\r\n `<label title=\"Suppress layers not visible at this zoom level\" for=\"suppress-by-extent-${legendId}\">` +\r\n `<span></span>` +\r\n `</label></li>`;\r\n\r\n legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n\r\n return legendHtml;\r\n }\r\n\r\n /**\r\n * @param {Array} itemIds the items to process\r\n * @param {LayerGroup} theGroup new group\r\n * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n * @static\r\n * @returns {string} html string\r\n */\r\n _buildLegend(itemIds: string[], theGroup: LayerGroup, layerDivClasses: string[]): string {\r\n\r\n if (itemIds.length == 0) {\r\n return '';\r\n }\r\n\r\n let theHml = '';\r\n\r\n let itemId = itemIds[0];\r\n\r\n if (theGroup.groupLayersLookup[itemId]) {\r\n\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let lyr = theGroup.groupLayersLookup[itemId];\r\n theHml += `<li id=\"${lyr.id}-layer-li\" class=\"legend-layer-li ${layerDivClasses.join(' ')}\">` + lyr.getLegendDiv() + '</li>';\r\n\r\n\r\n } else if (theGroup.groupGroupsLookup[itemId]) {\r\n /**\r\n * type {LayerGroup}\r\n */\r\n let otherGroup = theGroup.groupGroupsLookup[itemId];\r\n\r\n theHml += `<li>`;\r\n theHml += `<div id=\"${otherGroup.groupId}-legend-layer-div\" ` +\r\n `class=\"legend-layer-group ${layerDivClasses.join(' ')}\">`;\r\n\r\n if (otherGroup.addCheck) {\r\n theHml += `<input type=\"checkbox\" checked id=\"${otherGroup.groupId}-group-chck\">` +\r\n `<label for=\"${otherGroup.groupId}-group-chck\" title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n } else {\r\n theHml += `<label title=\"Click arrow to expand or collapse\">${otherGroup.groupName}</label>`;\r\n }\r\n\r\n theHml += `<span title=\"Expand/Collapse\" class=\"layer-group-expander`;\r\n theHml += `${otherGroup.collapse ? ' legend-layer-group-initial-collapse' : ''}\">`;\r\n theHml += otherGroup.collapse ? '▶' : '▼';\r\n theHml += '</span>';\r\n\r\n //parents.push(groupId);\r\n theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n theHml += '</div>';\r\n theHml += '</li>';\r\n }\r\n\r\n return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n }\r\n}\r\n\r\n\r\n/**\r\n * a wrapper to make a legend\r\n */\r\nexport class LayerLegend {\r\n\r\n $divElement: JQuery;\r\n _legendItems: Array<iLegendItem|LayerBase>;\r\n layerGroup: any;\r\n legendId: string;\r\n\r\n /**``\r\n *\r\n * @param {Array} legendItems array of layers or objects with {groupName: {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n * @param {string} divId the div where the legend should be added\r\n * @param {object} options for legend\r\n * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n * @param {string} [options.legendTitle=Legend] the legend title\r\n * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n */\r\n constructor(legendItems: Array<iLegendItem|LayerBase>, divId: string, options: iLegendOptions = {}) {\r\n for (let i of legendItems) {\r\n if (typeof i == 'undefined') {\r\n throw 'undefined item passed in array to legend constructor';\r\n }\r\n }\r\n\r\n options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n options.layerDivClasses = options.layerDivClasses || [];\r\n\r\n // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n }\r\n\r\n this.$divElement = $('#' + divId);\r\n\r\n this._legendItems = legendItems;\r\n\r\n this.layerGroup = new LayerGroup();\r\n\r\n this._buildTree(legendItems);\r\n\r\n this.legendId = makeGuid();\r\n\r\n this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n\r\n for (let l of this.layerGroup.allLayerArray){\r\n l.applyCollapse();\r\n }\r\n\r\n let _this = this;\r\n //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n if (options.scaleDependent) {\r\n mapMove.checkInit();\r\n\r\n mapMove.addCallback(function (ext, zoom, evt) {\r\n\r\n if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n for (let lyr of this.layerGroup.allLayerArray) {\r\n let $lyrLi = $('#' + lyr.id + '-layer-li');\r\n if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n $lyrLi.addClass('layer-not-visible');\r\n } else {\r\n $lyrLi.removeClass('layer-not-visible');\r\n }\r\n }\r\n }\r\n }, this, 100, true, 'legend1');\r\n }\r\n\r\n // <editor-fold desc=\"add event listeners\">\r\n\r\n this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n let legendLayerLis = $('.legend-layer-li');\r\n if (this.checked) {\r\n legendLayerLis.removeClass('layer-force-show');\r\n } else {\r\n legendLayerLis.addClass('layer-force-show');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-check').change(function () {\r\n let lyrId = this.id.replace('-legend-layer-check', '');\r\n _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n });\r\n\r\n this.$divElement.find('.layer-group-expander').click(function () {\r\n let $this = $(this);\r\n $this.removeClass('legend-layer-group-initial-collapse');\r\n\r\n $this.siblings('ul').slideToggle();\r\n\r\n if ($this.hasClass('legend-layer-group-collapsed')){\r\n $this.removeClass('legend-layer-group-collapsed');\r\n $this.html('▼');\r\n } else {\r\n $this.addClass('legend-layer-group-collapsed');\r\n $this.html('▶');\r\n }\r\n });\r\n\r\n this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n // </editor-fold>\r\n }\r\n\r\n\r\n /**\r\n * @param {Array} [legendItems=this._layerConfig] the legend items\r\n * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n * @private\r\n */\r\n _buildTree(legendItems: Array<iLegendItem|LayerBase>, parents?: string[]) {\r\n\r\n if (legendItems.length == 0) {\r\n return;\r\n }\r\n\r\n let oneItem = legendItems[0];\r\n\r\n //reset the parent if the item is in the base array\r\n if ((this._legendItems as Array<any>).indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n parents = [];\r\n }\r\n\r\n if (typeof (oneItem as iLegendItem).groupName !== 'undefined') {\r\n let groupItem = legendItems[0];\r\n let newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n parents.push(newGroup.groupId);\r\n this._buildTree((oneItem as iLegendItem).items, parents);\r\n } else {\r\n /**\r\n * @type {LayerBase}\r\n */\r\n let layerItem: LayerBase = legendItems[0] as LayerBase;\r\n\r\n this.layerGroup.addLegendLayer(layerItem, parents);\r\n }\r\n\r\n this._buildTree(legendItems.slice(1), parents);\r\n }\r\n}\r\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.ts","/**\r\n * Created by gavorhes on 12/8/2015.\r\n */\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nconst nm = provide('olHelpers');\r\n\r\n\r\n\r\n/**\r\n * base interaction\r\n */\r\nexport class MapInteractionBase {\r\n _map: ol.Map;\r\n _initialized: boolean;\r\n _subtype: string;\r\n\r\n /**\r\n * map interaction base\r\n * @param subtype - the interaction subtype\r\n */\r\n constructor(subtype: string) {\r\n this._map = null;\r\n this._initialized = false;\r\n this._subtype = subtype;\r\n }\r\n\r\n /**\r\n * base initializer, returns true for already initialized\r\n * @param theMap - the ol Map\r\n * @returns true for already initialized\r\n */\r\n init(theMap: ol.Map){\r\n if (!this._initialized){\r\n this._map = theMap;\r\n this._initialized = true;\r\n }\r\n }\r\n\r\n /**\r\n * get reference to the ol map object\r\n * @returns {ol.Map} the map object\r\n */\r\n get map() {\r\n return this._map;\r\n }\r\n\r\n /**\r\n * get if is initialized\r\n * @returns {boolean} is initialized\r\n */\r\n get initialized() {\r\n return this._initialized;\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n * @protected\r\n */\r\n _checkInit() {\r\n if (!this.initialized) {\r\n let msg = `${this._subtype} object not initialized`;\r\n alert(msg);\r\n console.log(msg);\r\n throw msg;\r\n }\r\n }\r\n\r\n /**\r\n * Check the initialization status and throw exception if not valid yet\r\n */\r\n checkInit(){\r\n this._checkInit();\r\n }\r\n}\r\n\r\nnm.MapInteractionBase = MapInteractionBase;\r\nexport default MapInteractionBase;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapInteractionBase.ts","/**\r\n * Created by gavorhes on 12/15/2015.\r\n */\r\n\r\nimport {quickMapOptions, quickMapBase} from './quickMapBase';\r\nimport provide from '../util/provide';\r\nimport mapMove from './mapMove';\r\nimport mapPopup from './mapPopup';\r\nimport ol = require('custom-ol');\r\nlet nm = provide('olHelpers');\r\n\r\nexport {quickMapOptions} from './quickMapBase';\r\n\r\n/**\r\n * Sets up a map with some default parameters and initializes\r\n * mapMove and mapPopup\r\n *\r\n * @param {object} [options={}] config options\r\n * @param {string} [options.divId=map] map div id\r\n * @param {object} [options.center={}] center config object\r\n * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n * @param {number} [options.zoom=7] zoom level\r\n * @param {number} [options.minZoom=undefined] min zoom\r\n * @param {number} [options.maxZoom=undefined] max zoom\r\n * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n * @returns {ol.Map} the ol map\r\n */\r\nexport function quickMap(options : quickMapOptions = {}): ol.Map {\r\n let m = quickMapBase(options);\r\n mapMove.init(m);\r\n mapPopup.init(m);\r\n return m;\r\n}\r\n\r\n\r\nnm.quickMap = quickMap;\r\nexport default quickMap;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/quickMap.ts","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\n\r\nimport MapMoveCls from './mapMoveCls';\r\n\r\n/**\r\n * The single map move object catch is that it is common to multimap pages\r\n * @type {MapMoveCls}\r\n */\r\n\r\nexport const mapMove = new MapMoveCls();\r\nexport default mapMove;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/mapMove.ts","/**\r\n * Created by gavorhes on 9/23/2016.\r\n */\r\nimport {quickMap} from '../../olHelpers/quickMap';\r\nimport {LayerEsriMapServer} from \"../../layers/LayerEsriMapServer\";\r\nimport LayerLegend from '../../collections/LayerLegend';\r\n\r\n\r\nlet map = quickMap();\r\n\r\nlet wisDotRegions = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\n\r\nlet sixYearPlan = new LayerEsriMapServer(\r\n 'https://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', {name: 'Six Year Plan', legendCollapse: true});\r\n\r\nmap.addLayer(wisDotRegions.olLayer);\r\nmap.addLayer(sixYearPlan.olLayer);\r\n\r\nlet layerArray = [\r\n wisDotRegions,\r\n sixYearPlan\r\n // tipConfig.tipSegmentLayer,\r\n // tipConfig.metamanagerSegments,\r\n // {\r\n // groupName: 'ITS Inventory Layers',\r\n // collapse: true,\r\n // addCheck: false,\r\n // items: tipConfig.itsLayerCollection.layers\r\n // }\r\n];\r\n\r\nlet legend = new LayerLegend(layerArray, 'legend-container', {});\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/simple_map.ts","/**\r\n * Created by gavorhes on 10/3/2016.\r\n */\r\nimport ol = require('custom-ol');\r\n\r\n\r\nexport const proj4326 = new ol.proj.Projection({code: 'EPSG:4326'});\r\nexport const proj3857 = new ol.proj.Projection({code: 'EPSG:3857'});\r\nexport const proj3070 = new ol.proj.Projection({code: 'EPSG:3070'});\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/olHelpers/projections.ts","import provide from './provide';\r\nlet nm = provide('util.checkDefined');\r\n\r\n/**\r\n * check if the input is undefined or null\r\n * @param input - input pointer\r\n * @returns true undefined or null\r\n */\r\nexport function undefinedOrNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return (typeof input === 'undefined' || input === null);\r\n}\r\n\r\nnm.undefinedOrNull = undefinedOrNull;\r\n\r\n\r\n/**\r\n * check if the input is defined and not null\r\n * @param input - input pointer\r\n * @returns true defined and not null\r\n */\r\nexport function definedAndNotNull (input: any): boolean{\r\n \"use strict\";\r\n\r\n return !(undefinedOrNull(input));\r\n}\r\n\r\nnm.definedAndNotNull = definedAndNotNull;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/checkDefined.ts"],"sourceRoot":""} \ No newline at end of file diff --git a/test/serve/js/slider-test.js b/test/serve/js/slider-test.js index 78047743ff0f60f7d9433fc6dcf65934a52a8776..554e20347e6dd21ea592428d64e977b3f6484ffd 100644 --- a/test/serve/js/slider-test.js +++ b/test/serve/js/slider-test.js @@ -1,838 +1,2 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 79); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 0: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * create a namespace on the gv object - * @param {string} namespace to create - * @returns {object} object representing the namespace - */ -function provide(namespace) { - "use strict"; - if (typeof window.gv == 'undefined') { - window.gv = {}; - } - var parts = namespace.split('.'); - var nameSpace = window.gv; - for (var i = 0; i < parts.length; i++) { - var newObject = nameSpace[parts[i]]; - if (typeof newObject == 'undefined') { - nameSpace[parts[i]] = {}; - } - nameSpace = nameSpace[parts[i]]; - } - return nameSpace; -} -provide('util'); -window.gv.util.provide = provide; -exports.default = provide; - - -/***/ }), - -/***/ 1: -/***/ (function(module, exports) { - -module.exports = $; - -/***/ }), - -/***/ 57: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/** - * Created by gavorhes on 12/10/2015. - */ - -Object.defineProperty(exports, "__esModule", { value: true }); -var provide_1 = __webpack_require__(0); -var $ = __webpack_require__(1); -var nm = provide_1.default('collections'); -var TipPresets = (function () { - function TipPresets(conf) { - this.label = conf.label; - this.presets = conf.presets; - this.domId = this.label.replace(/ /g, '').toLowerCase(); - var theSum = 0; - for (var _i = 0, _a = this.presets; _i < _a.length; _i++) { - var pr = _a[_i]; - theSum += pr.value; - } - if (theSum != 100) { - throw 'preset sum does note equal 100'; - } - } - return TipPresets; -}()); -var _Slider = (function () { - /** - * Slider constructor - * @param sliderConfig - the configuration - - */ - function _Slider(sliderConfig) { - this._dropdownSelection = null; - this._weight = null; - this.name = sliderConfig.label; - this.domId = this.name.toLowerCase().replace(/ /g, '-'); - this._locked = false; - this._min = 0.0; - this._max = 100; - this.labelLow = null; - this.labelHigh = null; - this.labelVal = null; - this.slider = null; - this.chk = null; - this.atMin = false; - this.atMax = false; - var sel = "<select class=\"" + (sliderConfig.yearOptions.length == 1 ? 'hidden-select' : 'show-select') + "\" id=\"" + this.domId + "_chg\">"; - for (var i = 0; i < sliderConfig.yearOptions.length; i++) { - var itm = sliderConfig.yearOptions[i]; - sel += "<option value=\"" + itm.column + "\">" + itm.label + "</option>"; - } - sel += '</select>'; - this.selectedParamDefault = this.selectedParam; - this.html = '<div class="slider-div">' + - ("<label for=\"" + this.domId + "_chk\" class=\"slider-label\">" + this.name + "</label>") + - sel + "<br>" + - ("<input id=\"" + this.domId + "_chk\" type=\"checkbox\" title=\"Lock/Unlock Slider\">") + - ("<label id=\"" + this.domId + "_low\" class=\"low-high\"></label>") + - ("<input id=\"" + this.domId + "\" type=\"range\" value=\"50\" min=\"0\" max=\"100\" step=\"0.1\">") + - ("<label id=\"" + this.domId + "_high\" class=\"low-high\"></label>") + - ("<label id=\"" + this.domId + "_lbl\" for=\"" + this.domId + "\" class=\"percent-label\"></label></div>"); - } - /** - * add html to dom - * @param {jQuery} $container - container element - */ - _Slider.prototype.addToDom = function ($container) { - $container.append(this.html); - this.labelLow = $("#" + this.domId + "_low"); - this.labelHigh = $("#" + this.domId + "_high"); - this.labelVal = $("#" + this.domId + "_lbl"); - this.slider = $("#" + this.domId); - this.selectionBox = $("#" + this.domId + "_chg"); - this.chk = $("#" + this.domId + "_chk"); - }; - /** - * increment the slider - * @param {number} delta change delta - * @returns {number} the remainder not able to be allocated to this slider - */ - _Slider.prototype.increment = function (delta) { - var remainder = 0; - delta = Number(delta.toFixed(1)); - this._weight += delta; - if (this._weight < this._min) { - remainder = this._min - this._weight; - this._weight = this._min; - this.atMin = true; - } - else if (this._weight > this._max) { - remainder = this._max - this._weight; - this._weight = this._max; - this.atMax = true; - } - else { - this.atMin = false; - this.atMax = false; - } - this.slider.val(this._weight.toFixed(1)); - this.labelVal.html(this._weight.toFixed(1) + '%'); - return remainder; - }; - /** - * set the value and drop down - * @param {number} newVal the new value - * @param {string} selectedParam the selected parameter - */ - _Slider.prototype.setValAndDropDown = function (newVal, selectedParam) { - this.min = 0; - this.max = 100; - this.weight = newVal; - this.slider.val(newVal.toFixed(1)); - this.selectionBox.val(selectedParam); - this.selectedParam = selectedParam; - this.locked = true; - }; - Object.defineProperty(_Slider.prototype, "locked", { - /** - * - * @returns {boolean} if locked - */ - get: function () { - return this._locked; - }, - /** - * - * @param {boolean} val if locked - */ - set: function (val) { - this._locked = val; - this.slider.prop('disabled', this._locked); - this.selectionBox.prop('disabled', this._locked); - this.chk.prop('checked', !this._locked); - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(_Slider.prototype, "min", { - /** - * - * @returns {number} the minimum - */ - get: function () { - return this._min; - }, - /** - * - * @param {number} newVal new minimum - */ - set: function (newVal) { - this._min = Number(newVal.toFixed(1)); - if (this._min < 0) { - this._min = 0; - } - this.labelLow.html(this._min.toFixed(1)); - this.slider.attr('min', this._min.toFixed(1)); - this.atMin = this._weight == this._min; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(_Slider.prototype, "max", { - /** - * - * @returns {number} the maximum - */ - get: function () { - return this._max; - }, - /** - * - * @param {number} newVal the maximum - */ - set: function (newVal) { - this._max = Number(newVal.toFixed(1)); - if (this._max > 100) { - this._max = 100.0; - } - this.labelHigh.html(this._max.toFixed(1)); - this.slider.attr('max', this._max.toFixed(1)); - this.atMax = this._weight == this._max; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(_Slider.prototype, "weight", { - /** - * - * @returns {number} the weight - */ - get: function () { - return this._weight; - }, - /** - * - * @param {number} newVal the weight - */ - set: function (newVal) { - this._weight = Number(newVal.toFixed(1)); - this.labelVal.html(this._weight.toFixed(1) + '%'); - if (this._weight <= this._min) { - this.atMin = true; - this.atMax = false; - } - else if (this._weight >= this._max) { - this.atMin = false; - this.atMax = true; - } - else { - this.atMin = false; - this.atMax = false; - } - }, - enumerable: true, - configurable: true - }); - return _Slider; -}()); -nm._Slider = _Slider; -/** - * class to keep track of the sliders - */ -var TipSliders = (function () { - /** - * - * @param sliderConfigs - * @param presetConfig - * @param divId - * @param presetSelector - * @param regionSelector - * @param versionSelector - * @param chgCallback - */ - function TipSliders(sliderConfigs, presetConfig, divId, presetSelector, regionSelector, versionSelector, chgCallback) { - var _this = this; - this.resetting = false; - this.reservedPercent = 0.0; - this.$container = $('#' + divId); - this.$container.addClass('slider-container'); - this._changedCallback = typeof chgCallback == 'function' ? chgCallback : function () { }; - this._$presetSelector = presetSelector; - this._$regionSelector = regionSelector; - this._$versionSelector = versionSelector; - this._sliderList = []; - this._sliderLookup = {}; - for (var i = 0; i < sliderConfigs.length; i++) { - var sld = new _Slider(sliderConfigs[i]); - this._sliderList.push(sld); - this._sliderLookup[sld.domId] = sld; - sld.addToDom(this.$container); - } - this._presetArray = []; - this._presetLookup = {}; - for (var i = 0; i < presetConfig.length; i++) { - var preset = new TipPresets(presetConfig[i]); - var idx = (i + 1).toFixed(); - this._presetLookup[idx] = preset; - this._presetArray.push(preset); - this._$presetSelector.append("<option value=\"" + idx + "\">" + preset.label + "</option>"); - } - this._lockedList = []; - this._inRangeList = []; - this._atMinList = []; - this._atMaxList = []; - this.lockedCount = 10; - this.notLockedCount = 0; - this._splitSliderArray(); - this._$presetSelector.change(function () { - _this.setPresetValues(); - _this._runChangedCallback(); - }); - this._$regionSelector.change(function () { - _this._runChangedCallback(); - }); - this._$versionSelector.change(function () { - _this._runChangedCallback(); - }); - this._$presetSelector.trigger('change'); - this._addEventListeners(); - } - TipSliders.prototype._runChangedCallback = function () { - this._changedCallback(this.paramWeightsRegionVersion); - }; - Object.defineProperty(TipSliders.prototype, "changedCallback", { - get: function () { - return this._changedCallback; - }, - set: function (chg) { - this._changedCallback = chg; - this._runChangedCallback(); - }, - enumerable: true, - configurable: true - }); - TipSliders.prototype.setPresetValues = function () { - var idx = this._$presetSelector.val() || '1'; - var thePreset = this._presetLookup[idx]; - for (var i = 0; i < thePreset.presets.length; i++) { - var presetValues = thePreset.presets[i]; - var theSlider = this._sliderList[i]; - theSlider.locked = true; - theSlider.setValAndDropDown(presetValues.value, presetValues.column); - } - }; - /** - * split array into subarrays holding the sliders - * @private - */ - TipSliders.prototype._splitSliderArray = function () { - this._lockedList = []; - this._inRangeList = []; - this._atMinList = []; - this._atMaxList = []; - for (var i = 0; i < this._sliderList.length; i++) { - var sld = this._sliderList[i]; - if (sld.locked) { - this._lockedList.push(sld); - } - else if (sld.atMin) { - this._atMinList.push(sld); - } - else if (sld.atMax) { - this._atMaxList.push(sld); - } - else { - this._inRangeList.push(sld); - } - } - this.lockedCount = this._lockedList.length; - this.notLockedCount = this._sliderList.length - this.lockedCount; - }; - /** - * handle remainder, recursive to take care of min max overshoots - * @param {number} remain the remainder - * @param {string} skipDomId - this dom id - * @private - */ - TipSliders.prototype._handleRemainder = function (remain, skipDomId) { - remain = Number(remain.toFixed(1)); - if (remain == 0) { - return; - } - this._splitSliderArray(); - var canChangeArray = []; - for (var i = 0; i < this._inRangeList.length; i++) { - var sld = this._inRangeList[i]; - if (sld.domId == skipDomId) { - continue; - } - canChangeArray.push(sld); - } - if (remain > 0) { - for (var i = 0; i < this._atMaxList.length; i++) { - var sld = this._atMaxList[i]; - if (sld.domId == skipDomId) { - continue; - } - canChangeArray.push(sld); - } - } - else { - for (var i = 0; i < this._atMinList.length; i++) { - var sld = this._atMinList[i]; - if (sld.domId == skipDomId) { - continue; - } - canChangeArray.push(sld); - } - } - if (canChangeArray.length == 0) { - return; - } - var inc = -1 * Number((remain / canChangeArray.length).toFixed(1)); - var newRemainder = 0; - for (var i = 0; i < canChangeArray.length; i++) { - newRemainder += canChangeArray[i].increment(inc); - } - this._handleRemainder(newRemainder, skipDomId); - }; - /** - * - * @param {object} keyValList key and value list - */ - TipSliders.prototype.setValues = function (keyValList) { - this.resetting = true; - for (var k in keyValList) { - if (keyValList.hasOwnProperty(k)) { - this._sliderLookup[k].setValAndDropDown(keyValList[k][0], keyValList[k][1]); - } - } - this.resetting = false; - }; - /** - * get the weight sum - * @returns {number} the weight sum - */ - TipSliders.prototype.getSum = function () { - var total = 0; - for (var i = 0; i < this._sliderList.length; i++) { - var sld = this._sliderList[i]; - total += Number(sld.weight.toFixed(1)); - } - return total; - }; - /** - * get the parameter weights - * @returns {object} lookup with parameter weights - */ - TipSliders.prototype.getParams = function () { - var paramWeights = {}; - for (var i = 0; i < this._sliderList.length; i++) { - var sld = this._sliderList[i]; - paramWeights[sld.selectedParam] = Number(sld.weight.toFixed(1)); - } - return paramWeights; - }; - TipSliders.prototype._addEventListeners = function () { - var ___this = this; - //change function - this.$container.find('input[type="range"]').change(function () { - if (___this.resetting) { - return; - } - var $this = $(this); - var domId = this['id']; - var sldr = ___this._sliderLookup[domId]; - var newValue = parseFloat($this.val()); - var oldValue = sldr.weight; - var diff = newValue - oldValue; - diff = Number(diff.toFixed(1)); - sldr.weight = Number(newValue.toFixed(1)); - ___this._handleRemainder(diff, domId); - //cleanup, make sure the sum is still 100 - var sum = Number(___this.getSum().toFixed(1)); - if (sum > 100) { - loop1: while (true) { - for (var i = 0; i < ___this._sliderList.length; i++) { - var sld = ___this._sliderList[i]; - if (sld.domId == domId || sld.locked || sld.atMin) { - continue; - } - sld.increment(-0.1); - sum -= 0.1; - if (sum.toFixed(1) == '100.0') { - break loop1; - } - } - } - } - else if (sum < 100) { - loop1: while (true) { - for (var i = 0; i < ___this._sliderList.length; i++) { - var sld = ___this._sliderList[i]; - if (sld.domId == domId || sld.locked || sld.atMax) { - continue; - } - sld.increment(0.1); - sum += 0.1; - if (sum.toFixed(1) == '100.0') { - break loop1; - } - } - } - } - ___this._$presetSelector.val('0'); - ___this._runChangedCallback(); - }); - //update the selected parameter when the selection is changed - $('.show-select').change(function () { - if (___this.resetting) { - return; - } - ___this._sliderLookup[this['id'].replace('_chg', '')].selectedParam = $(this).val(); - ___this._$presetSelector.val('0'); - ___this._runChangedCallback(); - }); - //lock the slider and update the reserved percent - this.$container.find('input[type="checkbox"]').change(function () { - var domEl = this; - ___this._sliderLookup[domEl.id.replace('_chk', '')].locked = !domEl.checked; - ___this.reservedPercent = 0.0; - ___this.notLockedCount = 0; - var notLockedSliders = []; - for (var i = 0; i < ___this._sliderList.length; i++) { - var sld = ___this._sliderList[i]; - if (sld.locked) { - ___this.reservedPercent += sld.weight; - continue; - } - notLockedSliders.push(sld); - ___this.notLockedCount++; - } - for (var i = 0; i < ___this._sliderList.length; i++) { - var sld = ___this._sliderList[i]; - if (sld.locked) { - continue; - } - sld.max = 100 - ___this.reservedPercent; - } - if (notLockedSliders.length == 1) { - notLockedSliders[0].min = notLockedSliders[0].weight; - } - else { - for (var i = 0; i < notLockedSliders.length; i++) { - notLockedSliders[i].min = 0; - } - } - }); - }; - Object.defineProperty(TipSliders.prototype, "paramWeightsRegionVersion", { - get: function () { - return { paramWeights: this.getParams(), - region: this._$regionSelector.val(), mmVersion: this._$versionSelector.val() }; - }, - enumerable: true, - configurable: true - }); - return TipSliders; -}()); -exports.TipSliders = TipSliders; -nm.Sliders = TipSliders; -exports.default = TipSliders; - - -/***/ }), - -/***/ 79: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -/** - * Created by gavorhes on 6/22/2016. - */ -var Sliders_1 = __webpack_require__(57); -var $ = __webpack_require__(1); -__webpack_require__(1); -exports.tipConfig = { - $loadingGif: $('#loading-gif'), - $presetSelector: $('#preset-selector'), - $regionSelector: $('#region-selector'), - $versionSelector: $('#version-selector'), - tipSegmentLayerMinZoom: 10, - slidersConfig: [ - { - label: 'AADT', - yearOptions: [ - { label: '1', column: 'aadtyr_1' } - ] - }, - { - label: 'AADT Future', - yearOptions: [ - { label: '5', column: 'aadtyr_5' }, - { label: '10', column: 'aadtyr_10' }, - { label: '15', column: 'aadtyr_15' }, - { label: '20', column: 'aadtyr_20' } - ] - }, - { - label: 'Growth', - yearOptions: [ - { label: '5', column: 'growth_5' }, - { label: '10', column: 'growth_10' }, - { label: '15', column: 'growth_15' }, - { label: '20', column: 'growth_20' } - ] - }, - { - label: 'Truck', - yearOptions: [ - { label: '1', column: 'trkdyr_1' }, - { label: '20', column: 'trkdyr_20' } - ] - }, - { - label: 'LOS', - yearOptions: [ - { label: '1', column: 'losyr_1' } - ] - }, - { - label: 'LOS Future', - yearOptions: [ - { label: '5', column: 'losyr_5' }, - { label: '10', column: 'losyr_10' }, - { label: '15', column: 'losyr_15' }, - { label: '20', column: 'losyr_20' } - ] - }, - { - label: 'Crash Rate', - yearOptions: [ - { label: 1, column: 'crash_rate' } - ] - }, - { - label: 'Severity', - yearOptions: [ - { label: 1, column: 'crash_severity' } - ] - }, - { - label: 'Weather', - yearOptions: [ - { label: 1, column: 'weather' } - ] - }, - { - label: 'Event', - yearOptions: [ - { label: 1, column: 'event' } - ] - } - ], - presetConfig: [ - { - label: 'Default TIP', - presets: [ - { column: 'aadtyr_1', value: 10.0 }, - { column: 'aadtyr_20', value: 7.0 }, - { column: 'growth_20', value: 7.0 }, - { column: 'trkdyr_1', value: 4.0 }, - { column: 'losyr_1', value: 12.0 }, - { column: 'losyr_20', value: 12.0 }, - { column: 'crash_rate', value: 15.0 }, - { column: 'crash_severity', value: 13.0 }, - { column: 'weather', value: 9.0 }, - { column: 'event', value: 11.0 } - ] - }, - { - label: 'Safety', - presets: [ - { column: 'aadtyr_1', value: 20.0 }, - { column: 'aadtyr_20', value: 0.0 }, - { column: 'growth_20', value: 0.0 }, - { column: 'trkdyr_1', value: 0.0 }, - { column: 'losyr_1', value: 0.0 }, - { column: 'losyr_20', value: 0.0 }, - { column: 'crash_rate', value: 40.0 }, - { column: 'crash_severity', value: 40.0 }, - { column: 'weather', value: 0.0 }, - { column: 'event', value: 0.0 } - ] - }, - { - label: 'Mobility Present', - presets: [ - { column: 'aadtyr_1', value: 25.0 }, - { column: 'aadtyr_20', value: 25.0 }, - { column: 'growth_20', value: 0.0 }, - { column: 'trkdyr_1', value: 25.0 }, - { column: 'losyr_1', value: 25.0 }, - { column: 'losyr_20', value: 0.0 }, - { column: 'crash_rate', value: 0.0 }, - { column: 'crash_severity', value: 0.0 }, - { column: 'weather', value: 0.0 }, - { column: 'event', value: 0.0 } - ] - }, - { - label: 'Mobility Future', - presets: [ - { column: 'aadtyr_1', value: 0.0 }, - { column: 'aadtyr_20', value: 25.0 }, - { column: 'growth_20', value: 25.0 }, - { column: 'trkdyr_1', value: 25.0 }, - { column: 'losyr_1', value: 0.0 }, - { column: 'losyr_20', value: 25.0 }, - { column: 'crash_rate', value: 0.0 }, - { column: 'crash_severity', value: 0.0 }, - { column: 'weather', value: 0.0 }, - { column: 'event', value: 0.0 } - ] - }, - { - label: 'Service', - presets: [ - { column: 'aadtyr_1', value: 30.0 }, - { column: 'aadtyr_20', value: 0.0 }, - { column: 'growth_20', value: 10.0 }, - { column: 'trkdyr_1', value: 0.0 }, - { column: 'losyr_1', value: 30.0 }, - { column: 'losyr_20', value: 30.0 }, - { column: 'crash_rate', value: 0.0 }, - { column: 'crash_severity', value: 0.0 }, - { column: 'weather', value: 0.0 }, - { column: 'event', value: 0.0 } - ] - }, - { - label: 'Freight Performance', - presets: [ - { column: 'aadtyr_1', value: 20.0 }, - { column: 'aadtyr_20', value: 0.0 }, - { column: 'growth_20', value: 0.0 }, - { column: 'trkdyr_1', value: 60.0 }, - { column: 'losyr_1', value: 20.0 }, - { column: 'losyr_20', value: 0.0 }, - { column: 'crash_rate', value: 0.0 }, - { column: 'crash_severity', value: 0.0 }, - { column: 'weather', value: 0.0 }, - { column: 'event', value: 0.0 } - ] - } - ] -}; -exports.tipConfig.$presetSelector.append('<option value="0" disabled=>Custom</option>'); -var sliders = new Sliders_1.TipSliders(exports.tipConfig.slidersConfig, exports.tipConfig.presetConfig, 'slider-container', exports.tipConfig.$presetSelector, exports.tipConfig.$regionSelector, exports.tipConfig.$regionSelector, function (chg) { console.log(chg); }); -// sliders.changedCallback = (chg) => {console.log(chg)}; -window['glob'] = sliders; -window['hat'] = sliders; -window['bird'] = sliders; - - -/***/ }) - -/******/ }); +!function(e){function t(l){if(i[l])return i[l].exports;var r=i[l]={i:l,l:!1,exports:{}};return e[l].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var i={};t.m=e,t.c=i,t.i=function(e){return e},t.d=function(e,i,l){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:l})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=78)}({0:function(e,t,i){"use strict";function l(e){void 0===window.gv&&(window.gv={});for(var t=e.split("."),i=window.gv,l=0;l<t.length;l++){void 0===i[t[l]]&&(i[t[l]]={}),i=i[t[l]]}return i}Object.defineProperty(t,"__esModule",{value:!0}),l("util"),window.gv.util.provide=l,t.default=l},1:function(e,t){e.exports=$},56:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i(0),r=i(1),o=l.default("collections"),s=function(){function e(e){this.label=e.label,this.presets=e.presets,this.domId=this.label.replace(/ /g,"").toLowerCase();for(var t=0,i=0,l=this.presets;i<l.length;i++){t+=l[i].value}if(100!=t)throw"preset sum does note equal 100"}return e}(),a=function(){function e(e){this._dropdownSelection=null,this._weight=null,this.name=e.label,this.domId=this.name.toLowerCase().replace(/ /g,"-"),this._locked=!1,this._min=0,this._max=100,this.labelLow=null,this.labelHigh=null,this.labelVal=null,this.slider=null,this.chk=null,this.atMin=!1,this.atMax=!1;for(var t='<select class="'+(1==e.yearOptions.length?"hidden-select":"show-select")+'" id="'+this.domId+'_chg">',i=0;i<e.yearOptions.length;i++){var l=e.yearOptions[i];t+='<option value="'+l.column+'">'+l.label+"</option>"}t+="</select>",this.selectedParamDefault=this.selectedParam,this.html='<div class="slider-div"><label for="'+this.domId+'_chk" class="slider-label">'+this.name+"</label>"+t+'<br><input id="'+this.domId+'_chk" type="checkbox" title="Lock/Unlock Slider"><label id="'+this.domId+'_low" class="low-high"></label><input id="'+this.domId+'" type="range" value="50" min="0" max="100" step="0.1"><label id="'+this.domId+'_high" class="low-high"></label><label id="'+this.domId+'_lbl" for="'+this.domId+'" class="percent-label"></label></div>'}return e.prototype.addToDom=function(e){e.append(this.html),this.labelLow=r("#"+this.domId+"_low"),this.labelHigh=r("#"+this.domId+"_high"),this.labelVal=r("#"+this.domId+"_lbl"),this.slider=r("#"+this.domId),this.selectionBox=r("#"+this.domId+"_chg"),this.chk=r("#"+this.domId+"_chk")},e.prototype.increment=function(e){var t=0;return e=Number(e.toFixed(1)),this._weight+=e,this._weight<this._min?(t=this._min-this._weight,this._weight=this._min,this.atMin=!0):this._weight>this._max?(t=this._max-this._weight,this._weight=this._max,this.atMax=!0):(this.atMin=!1,this.atMax=!1),this.slider.val(this._weight.toFixed(1)),this.labelVal.html(this._weight.toFixed(1)+"%"),t},e.prototype.setValAndDropDown=function(e,t){this.min=0,this.max=100,this.weight=e,this.slider.val(e.toFixed(1)),this.selectionBox.val(t),this.selectedParam=t,this.locked=!0},Object.defineProperty(e.prototype,"locked",{get:function(){return this._locked},set:function(e){this._locked=e,this.slider.prop("disabled",this._locked),this.selectionBox.prop("disabled",this._locked),this.chk.prop("checked",!this._locked)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},set:function(e){this._min=Number(e.toFixed(1)),this._min<0&&(this._min=0),this.labelLow.html(this._min.toFixed(1)),this.slider.attr("min",this._min.toFixed(1)),this.atMin=this._weight==this._min},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},set:function(e){this._max=Number(e.toFixed(1)),this._max>100&&(this._max=100),this.labelHigh.html(this._max.toFixed(1)),this.slider.attr("max",this._max.toFixed(1)),this.atMax=this._weight==this._max},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"weight",{get:function(){return this._weight},set:function(e){this._weight=Number(e.toFixed(1)),this.labelVal.html(this._weight.toFixed(1)+"%"),this._weight<=this._min?(this.atMin=!0,this.atMax=!1):this._weight>=this._max?(this.atMin=!1,this.atMax=!0):(this.atMin=!1,this.atMax=!1)},enumerable:!0,configurable:!0}),e}();o._Slider=a;var n=function(){function e(e,t,i,l,o,n,h){var u=this;this.resetting=!1,this.reservedPercent=0,this.$container=r("#"+i),this.$container.addClass("slider-container"),this._changedCallback="function"==typeof h?h:function(){},this._$presetSelector=l,this._$regionSelector=o,this._$versionSelector=n,this._sliderList=[],this._sliderLookup={};for(var c=0;c<e.length;c++){var d=new a(e[c]);this._sliderList.push(d),this._sliderLookup[d.domId]=d,d.addToDom(this.$container)}this._presetArray=[],this._presetLookup={};for(var c=0;c<t.length;c++){var _=new s(t[c]),m=(c+1).toFixed();this._presetLookup[m]=_,this._presetArray.push(_),this._$presetSelector.append('<option value="'+m+'">'+_.label+"</option>")}this._lockedList=[],this._inRangeList=[],this._atMinList=[],this._atMaxList=[],this.lockedCount=10,this.notLockedCount=0,this._splitSliderArray(),this._$presetSelector.change(function(){u.setPresetValues(),u._runChangedCallback()}),this._$regionSelector.change(function(){u._runChangedCallback()}),this._$versionSelector.change(function(){u._runChangedCallback()}),this._$presetSelector.trigger("change"),this._addEventListeners()}return e.prototype._runChangedCallback=function(){this._changedCallback(this.paramWeightsRegionVersion)},Object.defineProperty(e.prototype,"changedCallback",{get:function(){return this._changedCallback},set:function(e){this._changedCallback=e,this._runChangedCallback()},enumerable:!0,configurable:!0}),e.prototype.setPresetValues=function(){for(var e=this._$presetSelector.val()||"1",t=this._presetLookup[e],i=0;i<t.presets.length;i++){var l=t.presets[i],r=this._sliderList[i];r.locked=!0,r.setValAndDropDown(l.value,l.column)}},e.prototype._splitSliderArray=function(){this._lockedList=[],this._inRangeList=[],this._atMinList=[],this._atMaxList=[];for(var e=0;e<this._sliderList.length;e++){var t=this._sliderList[e];t.locked?this._lockedList.push(t):t.atMin?this._atMinList.push(t):t.atMax?this._atMaxList.push(t):this._inRangeList.push(t)}this.lockedCount=this._lockedList.length,this.notLockedCount=this._sliderList.length-this.lockedCount},e.prototype._handleRemainder=function(e,t){if(0!=(e=Number(e.toFixed(1)))){this._splitSliderArray();for(var i=[],l=0;l<this._inRangeList.length;l++){var r=this._inRangeList[l];r.domId!=t&&i.push(r)}if(e>0)for(var l=0;l<this._atMaxList.length;l++){var r=this._atMaxList[l];r.domId!=t&&i.push(r)}else for(var l=0;l<this._atMinList.length;l++){var r=this._atMinList[l];r.domId!=t&&i.push(r)}if(0!=i.length){for(var o=-1*Number((e/i.length).toFixed(1)),s=0,l=0;l<i.length;l++)s+=i[l].increment(o);this._handleRemainder(s,t)}}},e.prototype.setValues=function(e){this.resetting=!0;for(var t in e)e.hasOwnProperty(t)&&this._sliderLookup[t].setValAndDropDown(e[t][0],e[t][1]);this.resetting=!1},e.prototype.getSum=function(){for(var e=0,t=0;t<this._sliderList.length;t++){var i=this._sliderList[t];e+=Number(i.weight.toFixed(1))}return e},e.prototype.getParams=function(){for(var e={},t=0;t<this._sliderList.length;t++){var i=this._sliderList[t];e[i.selectedParam]=Number(i.weight.toFixed(1))}return e},e.prototype._addEventListeners=function(){var e=this;this.$container.find('input[type="range"]').change(function(){if(!e.resetting){var t=r(this),i=this.id,l=e._sliderLookup[i],o=parseFloat(t.val()),s=l.weight,a=o-s;a=Number(a.toFixed(1)),l.weight=Number(o.toFixed(1)),e._handleRemainder(a,i);var n=Number(e.getSum().toFixed(1));if(n>100)e:for(;;)for(var h=0;h<e._sliderList.length;h++){var u=e._sliderList[h];if(u.domId!=i&&!u.locked&&!u.atMin&&(u.increment(-.1),n-=.1,"100.0"==n.toFixed(1)))break e}else if(n<100)e:for(;;)for(var h=0;h<e._sliderList.length;h++){var u=e._sliderList[h];if(u.domId!=i&&!u.locked&&!u.atMax&&(u.increment(.1),n+=.1,"100.0"==n.toFixed(1)))break e}e._$presetSelector.val("0"),e._runChangedCallback()}}),r(".show-select").change(function(){e.resetting||(e._sliderLookup[this.id.replace("_chg","")].selectedParam=r(this).val(),e._$presetSelector.val("0"),e._runChangedCallback())}),this.$container.find('input[type="checkbox"]').change(function(){var t=this;e._sliderLookup[t.id.replace("_chk","")].locked=!t.checked,e.reservedPercent=0,e.notLockedCount=0;for(var i=[],l=0;l<e._sliderList.length;l++){var r=e._sliderList[l];r.locked?e.reservedPercent+=r.weight:(i.push(r),e.notLockedCount++)}for(var l=0;l<e._sliderList.length;l++){var r=e._sliderList[l];r.locked||(r.max=100-e.reservedPercent)}if(1==i.length)i[0].min=i[0].weight;else for(var l=0;l<i.length;l++)i[l].min=0})},Object.defineProperty(e.prototype,"paramWeightsRegionVersion",{get:function(){return{paramWeights:this.getParams(),region:this._$regionSelector.val(),mmVersion:this._$versionSelector.val()}},enumerable:!0,configurable:!0}),e}();t.TipSliders=n,o.Sliders=n,t.default=n},78:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i(56),r=i(1);i(1),t.tipConfig={$loadingGif:r("#loading-gif"),$presetSelector:r("#preset-selector"),$regionSelector:r("#region-selector"),$versionSelector:r("#version-selector"),tipSegmentLayerMinZoom:10,slidersConfig:[{label:"AADT",yearOptions:[{label:"1",column:"aadtyr_1"}]},{label:"AADT Future",yearOptions:[{label:"5",column:"aadtyr_5"},{label:"10",column:"aadtyr_10"},{label:"15",column:"aadtyr_15"},{label:"20",column:"aadtyr_20"}]},{label:"Growth",yearOptions:[{label:"5",column:"growth_5"},{label:"10",column:"growth_10"},{label:"15",column:"growth_15"},{label:"20",column:"growth_20"}]},{label:"Truck",yearOptions:[{label:"1",column:"trkdyr_1"},{label:"20",column:"trkdyr_20"}]},{label:"LOS",yearOptions:[{label:"1",column:"losyr_1"}]},{label:"LOS Future",yearOptions:[{label:"5",column:"losyr_5"},{label:"10",column:"losyr_10"},{label:"15",column:"losyr_15"},{label:"20",column:"losyr_20"}]},{label:"Crash Rate",yearOptions:[{label:1,column:"crash_rate"}]},{label:"Severity",yearOptions:[{label:1,column:"crash_severity"}]},{label:"Weather",yearOptions:[{label:1,column:"weather"}]},{label:"Event",yearOptions:[{label:1,column:"event"}]}],presetConfig:[{label:"Default TIP",presets:[{column:"aadtyr_1",value:10},{column:"aadtyr_20",value:7},{column:"growth_20",value:7},{column:"trkdyr_1",value:4},{column:"losyr_1",value:12},{column:"losyr_20",value:12},{column:"crash_rate",value:15},{column:"crash_severity",value:13},{column:"weather",value:9},{column:"event",value:11}]},{label:"Safety",presets:[{column:"aadtyr_1",value:20},{column:"aadtyr_20",value:0},{column:"growth_20",value:0},{column:"trkdyr_1",value:0},{column:"losyr_1",value:0},{column:"losyr_20",value:0},{column:"crash_rate",value:40},{column:"crash_severity",value:40},{column:"weather",value:0},{column:"event",value:0}]},{label:"Mobility Present",presets:[{column:"aadtyr_1",value:25},{column:"aadtyr_20",value:25},{column:"growth_20",value:0},{column:"trkdyr_1",value:25},{column:"losyr_1",value:25},{column:"losyr_20",value:0},{column:"crash_rate",value:0},{column:"crash_severity",value:0},{column:"weather",value:0},{column:"event",value:0}]},{label:"Mobility Future",presets:[{column:"aadtyr_1",value:0},{column:"aadtyr_20",value:25},{column:"growth_20",value:25},{column:"trkdyr_1",value:25},{column:"losyr_1",value:0},{column:"losyr_20",value:25},{column:"crash_rate",value:0},{column:"crash_severity",value:0},{column:"weather",value:0},{column:"event",value:0}]},{label:"Service",presets:[{column:"aadtyr_1",value:30},{column:"aadtyr_20",value:0},{column:"growth_20",value:10},{column:"trkdyr_1",value:0},{column:"losyr_1",value:30},{column:"losyr_20",value:30},{column:"crash_rate",value:0},{column:"crash_severity",value:0},{column:"weather",value:0},{column:"event",value:0}]},{label:"Freight Performance",presets:[{column:"aadtyr_1",value:20},{column:"aadtyr_20",value:0},{column:"growth_20",value:0},{column:"trkdyr_1",value:60},{column:"losyr_1",value:20},{column:"losyr_20",value:0},{column:"crash_rate",value:0},{column:"crash_severity",value:0},{column:"weather",value:0},{column:"event",value:0}]}]},t.tipConfig.$presetSelector.append('<option value="0" disabled=>Custom</option>');var o=new l.TipSliders(t.tipConfig.slidersConfig,t.tipConfig.presetConfig,"slider-container",t.tipConfig.$presetSelector,t.tipConfig.$regionSelector,t.tipConfig.$regionSelector,function(e){console.log(e)});window.glob=o,window.hat=o,window.bird=o}}); //# sourceMappingURL=slider-test.js.map \ No newline at end of file diff --git a/test/serve/js/slider-test.js.map b/test/serve/js/slider-test.js.map index 00680b5cdadf9f0a88655e8112e60fa4cf01d5c9..0101f6159645a324f7dfef6075f11035eb83bfa4 100644 --- a/test/serve/js/slider-test.js.map +++ b/test/serve/js/slider-test.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap 24312a3d6c9f267d6ea9?a2cc*********","webpack:///./src/util/provide.ts?5c82********","webpack:///external \"$\"?57aa********","webpack:///./src/collections/Sliders.ts","webpack:///./src/_tests/demos/slider-test.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA,mDAA2C,cAAc;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;AAEA;AACA;;;;;;;;;AChEA;;GAEG;;;AAGH;;;;GAIG;AACH,iBAAiB,SAAiB;IAC9B,YAAY,CAAC;IACb,EAAE,CAAC,CAAC,OAAa,MAAO,CAAC,EAAE,IAAI,WAAW,CAAC,EAAC;QAClC,MAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAC1B,CAAC;IAED,IAAI,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACjC,IAAI,SAAS,GAAS,MAAO,CAAC,EAAE,CAAC;IAEjC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAC,CAAC,EAAE,CAAC,GA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AM,CAAC,GAAG,OAAO,CAAC","file":"slider-test.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 79);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 24312a3d6c9f267d6ea9","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('collections');\r\n\r\nexport interface TipSliderConfig {\r\n label: string;\r\n yearOptions: Array<{column: string, label: string}>\r\n}\r\n\r\nexport interface TipPresetConfig {\r\n label: string;\r\n presets: Array<{column: string, value: number}>\r\n}\r\n\r\nexport interface ChangeResponse{\r\n paramWeights: Object;\r\n region: string;\r\n mmVersion: string;\r\n}\r\n\r\nexport interface ChangeCallback{\r\n (chg: ChangeResponse): any\r\n}\r\n\r\n\r\nclass TipPresets implements TipPresetConfig {\r\n label: string;\r\n presets: Array<{column: string, value: number}>;\r\n domId: string;\r\n\r\n constructor(conf: TipPresetConfig) {\r\n this.label = conf.label;\r\n this.presets = conf.presets;\r\n this.domId = this.label.replace(/ /g, '').toLowerCase();\r\n\r\n let theSum = 0;\r\n\r\n for (let pr of this.presets){\r\n theSum += pr.value;\r\n }\r\n\r\n if (theSum != 100){\r\n throw 'preset sum does note equal 100';\r\n }\r\n }\r\n}\r\n\r\n\r\nclass _Slider {\r\n _min: number;\r\n _max: number;\r\n _locked: boolean;\r\n atMin: boolean;\r\n atMax: boolean;\r\n _weightDefault: number;\r\n _weight: number;\r\n html: string;\r\n domId: string;\r\n name: string;\r\n\r\n labelLow: JQuery;\r\n labelHigh: JQuery;\r\n labelVal: JQuery;\r\n slider: JQuery;\r\n selectionBox: JQuery;\r\n chk: JQuery;\r\n\r\n selectedParam: any;\r\n selectedParamDefault: any;\r\n _dropdownSelection: string;\r\n\r\n /**\r\n * Slider constructor\r\n * @param sliderConfig - the configuration\r\n\r\n */\r\n constructor(sliderConfig: TipSliderConfig) {\r\n this._dropdownSelection = null;\r\n this._weight = null;\r\n this.name = sliderConfig.label;\r\n this.domId = this.name.toLowerCase().replace(/ /g, '-');\r\n\r\n this._locked = false;\r\n\r\n this._min = 0.0;\r\n this._max = 100;\r\n\r\n this.labelLow = null;\r\n this.labelHigh = null;\r\n this.labelVal = null;\r\n this.slider = null;\r\n this.chk = null;\r\n\r\n this.atMin = false;\r\n this.atMax = false;\r\n\r\n\r\n let sel = `<select class=\"${sliderConfig.yearOptions.length == 1 ? 'hidden-select' : 'show-select'}\" id=\"${this.domId}_chg\">`;\r\n\r\n for (let i = 0; i < sliderConfig.yearOptions.length; i++) {\r\n let itm = sliderConfig.yearOptions[i];\r\n sel += `<option value=\"${itm.column}\">${itm.label}</option>`;\r\n }\r\n sel += '</select>';\r\n\r\n this.selectedParamDefault = this.selectedParam;\r\n\r\n this.html = '<div class=\"slider-div\">' +\r\n `<label for=\"${this.domId}_chk\" class=\"slider-label\">${this.name}</label>` +\r\n sel + `<br>` +\r\n `<input id=\"${this.domId}_chk\" type=\"checkbox\" title=\"Lock/Unlock Slider\">` +\r\n `<label id=\"${this.domId}_low\" class=\"low-high\"></label>` +\r\n `<input id=\"${this.domId}\" type=\"range\" value=\"50\" min=\"0\" max=\"100\" step=\"0.1\">` +\r\n `<label id=\"${this.domId}_high\" class=\"low-high\"></label>` +\r\n `<label id=\"${this.domId}_lbl\" for=\"${this.domId}\" class=\"percent-label\"></label></div>`;\r\n }\r\n\r\n /**\r\n * add html to dom\r\n * @param {jQuery} $container - container element\r\n */\r\n addToDom($container: JQuery) {\r\n $container.append(this.html);\r\n this.labelLow = $(`#${this.domId}_low`);\r\n this.labelHigh = $(`#${this.domId}_high`);\r\n this.labelVal = $(`#${this.domId}_lbl`);\r\n this.slider = $(`#${this.domId}`);\r\n this.selectionBox = $(`#${this.domId}_chg`);\r\n this.chk = $(`#${this.domId}_chk`);\r\n }\r\n\r\n /**\r\n * increment the slider\r\n * @param {number} delta change delta\r\n * @returns {number} the remainder not able to be allocated to this slider\r\n */\r\n increment(delta: number): number {\r\n let remainder = 0;\r\n delta = Number(delta.toFixed(1));\r\n\r\n this._weight += delta;\r\n if (this._weight < this._min) {\r\n remainder = this._min - this._weight;\r\n this._weight = this._min;\r\n this.atMin = true;\r\n } else if (this._weight > this._max) {\r\n remainder = this._max - this._weight;\r\n this._weight = this._max;\r\n this.atMax = true;\r\n } else {\r\n this.atMin = false;\r\n this.atMax = false;\r\n }\r\n\r\n this.slider.val(this._weight.toFixed(1));\r\n this.labelVal.html(this._weight.toFixed(1) + '%');\r\n\r\n return remainder;\r\n }\r\n\r\n /**\r\n * set the value and drop down\r\n * @param {number} newVal the new value\r\n * @param {string} selectedParam the selected parameter\r\n */\r\n setValAndDropDown(newVal: number, selectedParam: string) {\r\n this.min = 0;\r\n this.max = 100;\r\n this.weight = newVal;\r\n this.slider.val(newVal.toFixed(1));\r\n this.selectionBox.val(selectedParam);\r\n this.selectedParam = selectedParam;\r\n this.locked = true;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {boolean} if locked\r\n */\r\n get locked() {\r\n return this._locked;\r\n }\r\n\r\n /**\r\n *\r\n * @param {boolean} val if locked\r\n */\r\n set locked(val) {\r\n this._locked = val;\r\n this.slider.prop('disabled', this._locked);\r\n this.selectionBox.prop('disabled', this._locked);\r\n this.chk.prop('checked', !this._locked);\r\n }\r\n\r\n /**\r\n *\r\n * @returns {number} the minimum\r\n */\r\n get min() {\r\n return this._min;\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} newVal new minimum\r\n */\r\n set min(newVal) {\r\n this._min = Number(newVal.toFixed(1));\r\n if (this._min < 0) {\r\n this._min = 0;\r\n }\r\n this.labelLow.html(this._min.toFixed(1));\r\n this.slider.attr('min', this._min.toFixed(1));\r\n this.atMin = this._weight == this._min;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {number} the maximum\r\n */\r\n get max() {\r\n return this._max;\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} newVal the maximum\r\n */\r\n set max(newVal) {\r\n this._max = Number(newVal.toFixed(1));\r\n if (this._max > 100) {\r\n this._max = 100.0;\r\n }\r\n this.labelHigh.html(this._max.toFixed(1));\r\n this.slider.attr('max', this._max.toFixed(1));\r\n this.atMax = this._weight == this._max;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {number} the weight\r\n */\r\n get weight() {\r\n return this._weight;\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} newVal the weight\r\n */\r\n set weight(newVal) {\r\n this._weight = Number(newVal.toFixed(1));\r\n this.labelVal.html(this._weight.toFixed(1) + '%');\r\n if (this._weight <= this._min) {\r\n this.atMin = true;\r\n this.atMax = false;\r\n } else if (this._weight >= this._max) {\r\n this.atMin = false;\r\n this.atMax = true;\r\n } else {\r\n this.atMin = false;\r\n this.atMax = false;\r\n }\r\n }\r\n}\r\n\r\nnm._Slider = _Slider;\r\n\r\n\r\n/**\r\n * class to keep track of the sliders\r\n */\r\nexport class TipSliders {\r\n $container: JQuery;\r\n reservedPercent: number;\r\n lockedCount: number;\r\n notLockedCount: number;\r\n private _sliderList: Array<_Slider>;\r\n private _sliderLookup: {[s: string]: _Slider};\r\n private resetting: boolean;\r\n private _changedCallback: ChangeCallback;\r\n\r\n private _lockedList: Array<_Slider>;\r\n private _inRangeList: Array<_Slider>;\r\n private _atMinList: Array<_Slider>;\r\n private _atMaxList: Array<_Slider>;\r\n\r\n private _presetArray: Array<TipPresets>;\r\n private _presetLookup: {[s: string]: TipPresets};\r\n\r\n private _$presetSelector: JQuery;\r\n private _$regionSelector: JQuery;\r\n private _$versionSelector: JQuery;\r\n\r\n /**\r\n *\r\n * @param sliderConfigs\r\n * @param presetConfig\r\n * @param divId\r\n * @param presetSelector\r\n * @param regionSelector\r\n * @param versionSelector\r\n * @param chgCallback\r\n */\r\n constructor(sliderConfigs: Array<TipSliderConfig>, presetConfig: Array<TipPresetConfig>,\r\n divId: string, presetSelector: JQuery, regionSelector: JQuery, versionSelector: JQuery,\r\n chgCallback?: ChangeCallback) {\r\n\r\n this.resetting = false;\r\n this.reservedPercent = 0.0;\r\n this.$container = $('#' + divId);\r\n this.$container.addClass('slider-container');\r\n\r\n this._changedCallback = typeof chgCallback == 'function' ? chgCallback : () => {};\r\n\r\n this._$presetSelector = presetSelector;\r\n this._$regionSelector = regionSelector;\r\n this._$versionSelector = versionSelector;\r\n\r\n this._sliderList = [];\r\n this._sliderLookup = {};\r\n\r\n for (let i = 0; i < sliderConfigs.length; i++) {\r\n let sld = new _Slider(sliderConfigs[i]);\r\n this._sliderList.push(sld);\r\n this._sliderLookup[sld.domId] = sld;\r\n sld.addToDom(this.$container);\r\n }\r\n\r\n this._presetArray = [];\r\n this._presetLookup = {};\r\n\r\n for (let i = 0; i < presetConfig.length; i++) {\r\n let preset = new TipPresets(presetConfig[i]);\r\n\r\n let idx = (i + 1).toFixed();\r\n\r\n this._presetLookup[idx] = preset;\r\n this._presetArray.push(preset);\r\n this._$presetSelector.append(`<option value=\"${idx}\">${preset.label}</option>`);\r\n }\r\n\r\n\r\n this._lockedList = [];\r\n this._inRangeList = [];\r\n this._atMinList = [];\r\n this._atMaxList = [];\r\n\r\n this.lockedCount = 10;\r\n this.notLockedCount = 0;\r\n\r\n this._splitSliderArray();\r\n\r\n\r\n this._$presetSelector.change(() => {\r\n this.setPresetValues();\r\n this._runChangedCallback();\r\n });\r\n\r\n this._$regionSelector.change(() => {\r\n this._runChangedCallback();\r\n });\r\n\r\n this._$versionSelector.change(() => {\r\n this._runChangedCallback();\r\n });\r\n\r\n this._$presetSelector.trigger('change');\r\n\r\n this._addEventListeners();\r\n }\r\n\r\n _runChangedCallback(){\r\n this._changedCallback(this.paramWeightsRegionVersion);\r\n }\r\n\r\n get changedCallback(): ChangeCallback{\r\n return this._changedCallback\r\n }\r\n\r\n set changedCallback(chg: ChangeCallback){\r\n this._changedCallback = chg;\r\n this._runChangedCallback();\r\n }\r\n\r\n setPresetValues() {\r\n let idx = this._$presetSelector.val() || '1';\r\n\r\n let thePreset = this._presetLookup[idx];\r\n\r\n for (let i = 0; i < thePreset.presets.length; i++) {\r\n let presetValues = thePreset.presets[i];\r\n let theSlider = this._sliderList[i];\r\n\r\n theSlider.locked = true;\r\n theSlider.setValAndDropDown(presetValues.value, presetValues.column);\r\n }\r\n }\r\n\r\n /**\r\n * split array into subarrays holding the sliders\r\n * @private\r\n */\r\n _splitSliderArray() {\r\n this._lockedList = [];\r\n this._inRangeList = [];\r\n this._atMinList = [];\r\n this._atMaxList = [];\r\n\r\n for (let i = 0; i < this._sliderList.length; i++) {\r\n let sld = this._sliderList[i];\r\n\r\n if (sld.locked) {\r\n this._lockedList.push(sld);\r\n } else if (sld.atMin) {\r\n this._atMinList.push(sld);\r\n } else if (sld.atMax) {\r\n this._atMaxList.push(sld);\r\n } else {\r\n this._inRangeList.push(sld);\r\n }\r\n }\r\n this.lockedCount = this._lockedList.length;\r\n this.notLockedCount = this._sliderList.length - this.lockedCount;\r\n }\r\n\r\n /**\r\n * handle remainder, recursive to take care of min max overshoots\r\n * @param {number} remain the remainder\r\n * @param {string} skipDomId - this dom id\r\n * @private\r\n */\r\n _handleRemainder(remain: number, skipDomId: string) {\r\n\r\n remain = Number(remain.toFixed(1));\r\n if (remain == 0) {\r\n return;\r\n }\r\n\r\n this._splitSliderArray();\r\n\r\n let canChangeArray = [];\r\n for (let i = 0; i < this._inRangeList.length; i++) {\r\n let sld = this._inRangeList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n\r\n if (remain > 0) {\r\n for (let i = 0; i < this._atMaxList.length; i++) {\r\n let sld = this._atMaxList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n } else {\r\n for (let i = 0; i < this._atMinList.length; i++) {\r\n let sld = this._atMinList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n }\r\n\r\n if (canChangeArray.length == 0) {\r\n return;\r\n }\r\n\r\n let inc = -1 * Number((remain / canChangeArray.length).toFixed(1));\r\n\r\n let newRemainder = 0;\r\n for (let i = 0; i < canChangeArray.length; i++) {\r\n newRemainder += canChangeArray[i].increment(inc);\r\n }\r\n\r\n this._handleRemainder(newRemainder, skipDomId);\r\n }\r\n\r\n /**\r\n *\r\n * @param {object} keyValList key and value list\r\n */\r\n setValues(keyValList: {[s:string]: [number, string]}) {\r\n this.resetting = true;\r\n for (let k in keyValList) {\r\n if (keyValList.hasOwnProperty(k)) {\r\n this._sliderLookup[k].setValAndDropDown(keyValList[k][0], keyValList[k][1]);\r\n }\r\n }\r\n this.resetting = false;\r\n }\r\n\r\n /**\r\n * get the weight sum\r\n * @returns {number} the weight sum\r\n */\r\n getSum() {\r\n let total = 0;\r\n for (let i = 0; i < this._sliderList.length; i++) {\r\n let sld = this._sliderList[i];\r\n total += Number(sld.weight.toFixed(1));\r\n }\r\n\r\n return total;\r\n }\r\n\r\n /**\r\n * get the parameter weights\r\n * @returns {object} lookup with parameter weights\r\n */\r\n getParams() {\r\n let paramWeights: {[s: string]: number} = {};\r\n for (let i = 0; i < this._sliderList.length; i++) {\r\n let sld = this._sliderList[i];\r\n paramWeights[sld.selectedParam] = Number(sld.weight.toFixed(1));\r\n }\r\n\r\n return paramWeights;\r\n }\r\n\r\n _addEventListeners() {\r\n let ___this = this;\r\n\r\n\r\n //change function\r\n this.$container.find('input[type=\"range\"]').change(function () {\r\n if (___this.resetting) {\r\n return;\r\n }\r\n\r\n let $this = $(this);\r\n let domId = this['id'];\r\n let sldr = ___this._sliderLookup[domId];\r\n\r\n let newValue = parseFloat($this.val());\r\n\r\n let oldValue = sldr.weight;\r\n let diff = newValue - oldValue;\r\n diff = Number(diff.toFixed(1));\r\n\r\n sldr.weight = Number(newValue.toFixed(1));\r\n\r\n ___this._handleRemainder(diff, domId);\r\n\r\n //cleanup, make sure the sum is still 100\r\n let sum = Number(___this.getSum().toFixed(1));\r\n\r\n if (sum > 100) {\r\n loop1:\r\n while (true) {\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.domId == domId || sld.locked || sld.atMin) {\r\n continue;\r\n }\r\n sld.increment(-0.1);\r\n sum -= 0.1;\r\n if (sum.toFixed(1) == '100.0') {\r\n break loop1;\r\n }\r\n }\r\n }\r\n } else if (sum < 100) {\r\n loop1:\r\n while (true) {\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.domId == domId || sld.locked || sld.atMax) {\r\n continue;\r\n }\r\n sld.increment(0.1);\r\n sum += 0.1;\r\n if (sum.toFixed(1) == '100.0') {\r\n break loop1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n ___this._$presetSelector.val('0');\r\n ___this._runChangedCallback();\r\n }\r\n );\r\n\r\n //update the selected parameter when the selection is changed\r\n $('.show-select').change(function () {\r\n if (___this.resetting) {\r\n return;\r\n }\r\n ___this._sliderLookup[this['id'].replace('_chg', '')].selectedParam = $(this).val();\r\n\r\n ___this._$presetSelector.val('0');\r\n\r\n ___this._runChangedCallback();\r\n\r\n });\r\n\r\n //lock the slider and update the reserved percent\r\n this.$container.find('input[type=\"checkbox\"]').change(function () {\r\n let domEl = this;\r\n\r\n ___this._sliderLookup[domEl.id.replace('_chk', '')].locked = !domEl.checked;\r\n ___this.reservedPercent = 0.0;\r\n ___this.notLockedCount = 0;\r\n\r\n let notLockedSliders = [];\r\n\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.locked) {\r\n ___this.reservedPercent += sld.weight;\r\n continue;\r\n }\r\n notLockedSliders.push(sld);\r\n ___this.notLockedCount++;\r\n }\r\n\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.locked) {\r\n continue;\r\n }\r\n sld.max = 100 - ___this.reservedPercent;\r\n }\r\n\r\n if (notLockedSliders.length == 1) {\r\n notLockedSliders[0].min = notLockedSliders[0].weight;\r\n } else {\r\n for (let i = 0; i < notLockedSliders.length; i++) {\r\n notLockedSliders[i].min = 0;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n get paramWeightsRegionVersion(): ChangeResponse{\r\n return {paramWeights: this.getParams(),\r\n region: this._$regionSelector.val() as string, mmVersion: this._$versionSelector.val() as string}\r\n }\r\n}\r\n\r\nnm.Sliders = TipSliders;\r\nexport default TipSliders;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/Sliders.ts","/**\r\n * Created by gavorhes on 6/22/2016.\r\n */\r\nimport {TipSliders, TipPresetConfig, TipSliderConfig} from '../../collections/Sliders';\r\nimport $ = require('jquery');\r\nimport ol = require('custom-ol');\r\nimport 'jquery-ui';\r\n\r\n\r\n\r\nexport interface ITipConfig{\r\n slidersConfig: Array<TipSliderConfig>;\r\n presetConfig: Array<TipPresetConfig>;\r\n tipSegmentLayerMinZoom: number;\r\n sliders: TipSliders;\r\n _map: ol.Map;\r\n $loadingGif: JQuery;\r\n $presetSelector: JQuery;\r\n $regionSelector: JQuery;\r\n $versionSelector: JQuery;\r\n itsLayerCollection: any;\r\n tipSegmentLayer: any;\r\n metamanagerSegments: any;\r\n}\r\n\r\nexport const tipConfig = {\r\n $loadingGif: $('#loading-gif'),\r\n $presetSelector: $('#preset-selector'),\r\n $regionSelector: $('#region-selector'),\r\n $versionSelector: $('#version-selector'),\r\n tipSegmentLayerMinZoom: 10,\r\n slidersConfig: [\r\n {\r\n label: 'AADT',\r\n yearOptions: [\r\n {label: '1', column: 'aadtyr_1'}\r\n ]\r\n },\r\n {\r\n label: 'AADT Future',\r\n yearOptions: [\r\n {label: '5', column: 'aadtyr_5'},\r\n {label: '10', column: 'aadtyr_10'},\r\n {label: '15', column: 'aadtyr_15'},\r\n {label: '20', column: 'aadtyr_20'}\r\n ]\r\n },\r\n {\r\n label: 'Growth',\r\n yearOptions: [\r\n {label: '5', column: 'growth_5'},\r\n {label: '10', column: 'growth_10'},\r\n {label: '15', column: 'growth_15'},\r\n {label: '20', column: 'growth_20'}\r\n ]\r\n },\r\n {\r\n label: 'Truck',\r\n yearOptions: [\r\n {label: '1', column: 'trkdyr_1'},\r\n {label: '20', column: 'trkdyr_20'}\r\n ]\r\n },\r\n {\r\n label: 'LOS',\r\n yearOptions: [\r\n {label: '1', column: 'losyr_1'}\r\n ]\r\n },\r\n {\r\n label: 'LOS Future',\r\n yearOptions: [\r\n {label: '5', column: 'losyr_5'},\r\n {label: '10', column: 'losyr_10'},\r\n {label: '15', column: 'losyr_15'},\r\n {label: '20', column: 'losyr_20'}\r\n ]\r\n },\r\n {\r\n label: 'Crash Rate',\r\n yearOptions: [\r\n {label: 1, column: 'crash_rate'}\r\n ]\r\n },\r\n {\r\n label: 'Severity',\r\n yearOptions: [\r\n {label: 1, column: 'crash_severity'}\r\n ]\r\n },\r\n {\r\n label: 'Weather',\r\n yearOptions: [\r\n {label: 1, column: 'weather'}\r\n ]\r\n },\r\n {\r\n label: 'Event',\r\n yearOptions: [\r\n {label: 1, column: 'event'}\r\n ]\r\n }\r\n ] as Array<TipSliderConfig>,\r\n presetConfig: [\r\n {\r\n label: 'Default TIP',\r\n presets: [\r\n {column: 'aadtyr_1', value: 10.0},\r\n {column: 'aadtyr_20', value: 7.0},\r\n {column: 'growth_20', value: 7.0},\r\n {column: 'trkdyr_1', value: 4.0},\r\n {column: 'losyr_1', value: 12.0},\r\n {column: 'losyr_20', value: 12.0},\r\n {column: 'crash_rate', value: 15.0},\r\n {column: 'crash_severity', value: 13.0},\r\n {column: 'weather', value: 9.0},\r\n {column: 'event', value: 11.0}\r\n ]\r\n },\r\n {\r\n label: 'Safety',\r\n presets: [\r\n {column: 'aadtyr_1', value: 20.0},\r\n {column: 'aadtyr_20', value: 0.0},\r\n {column: 'growth_20', value: 0.0},\r\n {column: 'trkdyr_1', value: 0.0},\r\n {column: 'losyr_1', value: 0.0},\r\n {column: 'losyr_20', value: 0.0},\r\n {column: 'crash_rate', value: 40.0},\r\n {column: 'crash_severity', value: 40.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Mobility Present',\r\n presets: [\r\n {column: 'aadtyr_1', value: 25.0},\r\n {column: 'aadtyr_20', value: 25.0},\r\n {column: 'growth_20', value: 0.0},\r\n {column: 'trkdyr_1', value: 25.0},\r\n {column: 'losyr_1', value: 25.0},\r\n {column: 'losyr_20', value: 0.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Mobility Future',\r\n presets: [\r\n {column: 'aadtyr_1', value: 0.0},\r\n {column: 'aadtyr_20', value: 25.0},\r\n {column: 'growth_20', value: 25.0},\r\n {column: 'trkdyr_1', value: 25.0},\r\n {column: 'losyr_1', value: 0.0},\r\n {column: 'losyr_20', value: 25.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Service',\r\n presets: [\r\n {column: 'aadtyr_1', value: 30.0},\r\n {column: 'aadtyr_20', value: 0.0},\r\n {column: 'growth_20', value: 10.0},\r\n {column: 'trkdyr_1', value: 0.0},\r\n {column: 'losyr_1', value: 30.0},\r\n {column: 'losyr_20', value: 30.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Freight Performance',\r\n presets: [\r\n {column: 'aadtyr_1', value: 20.0},\r\n {column: 'aadtyr_20', value: 0.0},\r\n {column: 'growth_20', value: 0.0},\r\n {column: 'trkdyr_1', value: 60.0},\r\n {column: 'losyr_1', value: 20.0},\r\n {column: 'losyr_20', value: 0.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n }\r\n ] as Array<TipPresetConfig>\r\n\r\n} as ITipConfig;\r\n\r\ntipConfig.$presetSelector.append('<option value=\"0\" disabled=>Custom</option>');\r\n\r\nlet sliders = new TipSliders(tipConfig.slidersConfig, tipConfig.presetConfig, 'slider-container',\r\n tipConfig.$presetSelector, tipConfig.$regionSelector, tipConfig.$regionSelector, (chg) => {console.log(chg)});\r\n\r\n// sliders.changedCallback = (chg) => {console.log(chg)};\r\n\r\nwindow['glob'] = sliders;\r\nwindow['hat'] = sliders;\r\nwindow['bird'] = sliders;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/slider-test.ts"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///slider-test.js","webpack:///webpack/bootstrap b0ebb0fd1b4953354d93?697d*********","webpack:///./src/util/provide.ts?5c82********","webpack:///external \"$\"?57aa********","webpack:///./src/collections/Sliders.ts","webpack:///./src/_tests/demos/slider-test.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","i","l","call","m","c","value","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","n","__esModule","object","property","prototype","hasOwnProperty","p","s","0","provide","namespace","window","gv","parts","split","nameSpace","length","util","default","1","$","56","provide_1","nm","TipPresets","conf","this","label","presets","domId","replace","toLowerCase","theSum","_i","_a","_Slider","sliderConfig","_dropdownSelection","_weight","_locked","_min","_max","labelLow","labelHigh","labelVal","slider","chk","atMin","atMax","sel","yearOptions","itm","column","selectedParamDefault","selectedParam","html","addToDom","$container","append","selectionBox","increment","delta","remainder","Number","toFixed","val","setValAndDropDown","newVal","min","max","weight","locked","set","prop","attr","TipSliders","sliderConfigs","presetConfig","divId","presetSelector","regionSelector","versionSelector","chgCallback","_this","resetting","reservedPercent","addClass","_changedCallback","_$presetSelector","_$regionSelector","_$versionSelector","_sliderList","_sliderLookup","sld","push","_presetArray","_presetLookup","preset","idx","_lockedList","_inRangeList","_atMinList","_atMaxList","lockedCount","notLockedCount","_splitSliderArray","change","setPresetValues","_runChangedCallback","trigger","_addEventListeners","paramWeightsRegionVersion","chg","thePreset","presetValues","theSlider","_handleRemainder","remain","skipDomId","canChangeArray","inc","newRemainder","setValues","keyValList","k","getSum","total","getParams","paramWeights","___this","find","$this","sldr","newValue","parseFloat","oldValue","diff","sum","loop1","domEl","id","checked","notLockedSliders","region","mmVersion","Sliders","78","Sliders_1","tipConfig","$loadingGif","$presetSelector","$regionSelector","$versionSelector","tipSegmentLayerMinZoom","slidersConfig","sliders","console","log"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAI,EAAAJ,EACAK,GAAA,EACAH,WAUA,OANAJ,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,GAAA,EAGAF,EAAAD,QAvBA,GAAAD,KA4BAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAK,EAAA,SAAAK,GAA2C,MAAAA,IAG3CV,EAAAW,EAAA,SAAAR,EAAAS,EAAAC,GACAb,EAAAc,EAAA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MAAO,IAC7B8D,OAAQ,iBAAkB9D,MAAO,IACjC8D,OAAQ,UAAW9D,MAAO,IAC1B8D,OAAQ,QAAS9D,MAAO,MAI7BqC,MAAO,UACPC,UACKwB,OAAQ,WAAY9D,MAAO,KAC3B8D,OAAQ,YAAa9D,MAAO,IAC5B8D,OAAQ,YAAa9D,MAAO,KAC5B8D,OAAQ,WAAY9D,MAAO,IAC3B8D,OAAQ,UAAW9D,MAAO,KAC1B8D,OAAQ,WAAY9D,MAAO,KAC3B8D,OAAQ,aAAc9D,MAAO,IAC7B8D,OAAQ,iBAAkB9D,MAAO,IACjC8D,OAAQ,UAAW9D,MAAO,IAC1B8D,OAAQ,QAAS9D,MAAO,MAI7BqC,MAAO,sBACPC,UACKwB,OAAQ,WAAY9D,MAAO,KAC3B8D,OAAQ,YAAa9D,MAAO,IAC5B8D,OAAQ,YAAa9D,MAAO,IAC5B8D,OAAQ,WAAY9D,MAAO,KAC3B8D,OAAQ,UAAW9D,MAAO,KAC1B8D,OAAQ,WAAY9D,MAAO,IAC3B8D,OAAQ,aAAc9D,MAAO,IAC7B8D,OAAQ,iBAAkB9D,MAAO,IACjC8D,OAAQ,UAAW9D,MAAO,IAC1B8D,OAAQ,QAAS9D,MAAO,OAO7CP,EAAAqK,UAAUE,gBAAgB5F,OAAO,8CAEjC,IAAIiG,GAAU,GAAIR,GAAAxE,WAAW5F,EAAAqK,UAAUM,cAAe3K,EAAAqK,UAAUvE,aAAc,mBAC1E9F,EAAAqK,UAAUE,gBAAiBvK,EAAAqK,UAAUG,gBAAiBxK,EAAAqK,UAAUG,gBAAiB,SAACvC,GAAS4C,QAAQC,IAAI7C,IAI3GrG,QAAa,KAAIgJ,EACjBhJ,OAAY,IAAIgJ,EAChBhJ,OAAa,KAAIgJ","file":"slider-test.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// identity function for calling harmony imports with the correct context\n/******/ \t__webpack_require__.i = function(value) { return value; };\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 78);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace) {\r\n \"use strict\";\r\n if (typeof window.gv == 'undefined') {\r\n window.gv = {};\r\n }\r\n var parts = namespace.split('.');\r\n var nameSpace = window.gv;\r\n for (var i = 0; i < parts.length; i++) {\r\n var newObject = nameSpace[parts[i]];\r\n if (typeof newObject == 'undefined') {\r\n nameSpace[parts[i]] = {};\r\n }\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n return nameSpace;\r\n}\r\nprovide('util');\r\nwindow.gv.util.provide = provide;\r\nexports.default = provide;\r\n\n\n/***/ }),\n\n/***/ 1:\n/***/ (function(module, exports) {\n\nmodule.exports = $;\n\n/***/ }),\n\n/***/ 56:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar provide_1 = __webpack_require__(0);\r\nvar $ = __webpack_require__(1);\r\nvar nm = provide_1.default('collections');\r\nvar TipPresets = (function () {\r\n function TipPresets(conf) {\r\n this.label = conf.label;\r\n this.presets = conf.presets;\r\n this.domId = this.label.replace(/ /g, '').toLowerCase();\r\n var theSum = 0;\r\n for (var _i = 0, _a = this.presets; _i < _a.length; _i++) {\r\n var pr = _a[_i];\r\n theSum += pr.value;\r\n }\r\n if (theSum != 100) {\r\n throw 'preset sum does note equal 100';\r\n }\r\n }\r\n return TipPresets;\r\n}());\r\nvar _Slider = (function () {\r\n /**\r\n * Slider constructor\r\n * @param sliderConfig - the configuration\r\n\r\n */\r\n function _Slider(sliderConfig) {\r\n this._dropdownSelection = null;\r\n this._weight = null;\r\n this.name = sliderConfig.label;\r\n this.domId = this.name.toLowerCase().replace(/ /g, '-');\r\n this._locked = false;\r\n this._min = 0.0;\r\n this._max = 100;\r\n this.labelLow = null;\r\n this.labelHigh = null;\r\n this.labelVal = null;\r\n this.slider = null;\r\n this.chk = null;\r\n this.atMin = false;\r\n this.atMax = false;\r\n var sel = \"<select class=\\\"\" + (sliderConfig.yearOptions.length == 1 ? 'hidden-select' : 'show-select') + \"\\\" id=\\\"\" + this.domId + \"_chg\\\">\";\r\n for (var i = 0; i < sliderConfig.yearOptions.length; i++) {\r\n var itm = sliderConfig.yearOptions[i];\r\n sel += \"<option value=\\\"\" + itm.column + \"\\\">\" + itm.label + \"</option>\";\r\n }\r\n sel += '</select>';\r\n this.selectedParamDefault = this.selectedParam;\r\n this.html = '<div class=\"slider-div\">' +\r\n (\"<label for=\\\"\" + this.domId + \"_chk\\\" class=\\\"slider-label\\\">\" + this.name + \"</label>\") +\r\n sel + \"<br>\" +\r\n (\"<input id=\\\"\" + this.domId + \"_chk\\\" type=\\\"checkbox\\\" title=\\\"Lock/Unlock Slider\\\">\") +\r\n (\"<label id=\\\"\" + this.domId + \"_low\\\" class=\\\"low-high\\\"></label>\") +\r\n (\"<input id=\\\"\" + this.domId + \"\\\" type=\\\"range\\\" value=\\\"50\\\" min=\\\"0\\\" max=\\\"100\\\" step=\\\"0.1\\\">\") +\r\n (\"<label id=\\\"\" + this.domId + \"_high\\\" class=\\\"low-high\\\"></label>\") +\r\n (\"<label id=\\\"\" + this.domId + \"_lbl\\\" for=\\\"\" + this.domId + \"\\\" class=\\\"percent-label\\\"></label></div>\");\r\n }\r\n /**\r\n * add html to dom\r\n * @param {jQuery} $container - container element\r\n */\r\n _Slider.prototype.addToDom = function ($container) {\r\n $container.append(this.html);\r\n this.labelLow = $(\"#\" + this.domId + \"_low\");\r\n this.labelHigh = $(\"#\" + this.domId + \"_high\");\r\n this.labelVal = $(\"#\" + this.domId + \"_lbl\");\r\n this.slider = $(\"#\" + this.domId);\r\n this.selectionBox = $(\"#\" + this.domId + \"_chg\");\r\n this.chk = $(\"#\" + this.domId + \"_chk\");\r\n };\r\n /**\r\n * increment the slider\r\n * @param {number} delta change delta\r\n * @returns {number} the remainder not able to be allocated to this slider\r\n */\r\n _Slider.prototype.increment = function (delta) {\r\n var remainder = 0;\r\n delta = Number(delta.toFixed(1));\r\n this._weight += delta;\r\n if (this._weight < this._min) {\r\n remainder = this._min - this._weight;\r\n this._weight = this._min;\r\n this.atMin = true;\r\n }\r\n else if (this._weight > this._max) {\r\n remainder = this._max - this._weight;\r\n this._weight = this._max;\r\n this.atMax = true;\r\n }\r\n else {\r\n this.atMin = false;\r\n this.atMax = false;\r\n }\r\n this.slider.val(this._weight.toFixed(1));\r\n this.labelVal.html(this._weight.toFixed(1) + '%');\r\n return remainder;\r\n };\r\n /**\r\n * set the value and drop down\r\n * @param {number} newVal the new value\r\n * @param {string} selectedParam the selected parameter\r\n */\r\n _Slider.prototype.setValAndDropDown = function (newVal, selectedParam) {\r\n this.min = 0;\r\n this.max = 100;\r\n this.weight = newVal;\r\n this.slider.val(newVal.toFixed(1));\r\n this.selectionBox.val(selectedParam);\r\n this.selectedParam = selectedParam;\r\n this.locked = true;\r\n };\r\n Object.defineProperty(_Slider.prototype, \"locked\", {\r\n /**\r\n *\r\n * @returns {boolean} if locked\r\n */\r\n get: function () {\r\n return this._locked;\r\n },\r\n /**\r\n *\r\n * @param {boolean} val if locked\r\n */\r\n set: function (val) {\r\n this._locked = val;\r\n this.slider.prop('disabled', this._locked);\r\n this.selectionBox.prop('disabled', this._locked);\r\n this.chk.prop('checked', !this._locked);\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(_Slider.prototype, \"min\", {\r\n /**\r\n *\r\n * @returns {number} the minimum\r\n */\r\n get: function () {\r\n return this._min;\r\n },\r\n /**\r\n *\r\n * @param {number} newVal new minimum\r\n */\r\n set: function (newVal) {\r\n this._min = Number(newVal.toFixed(1));\r\n if (this._min < 0) {\r\n this._min = 0;\r\n }\r\n this.labelLow.html(this._min.toFixed(1));\r\n this.slider.attr('min', this._min.toFixed(1));\r\n this.atMin = this._weight == this._min;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(_Slider.prototype, \"max\", {\r\n /**\r\n *\r\n * @returns {number} the maximum\r\n */\r\n get: function () {\r\n return this._max;\r\n },\r\n /**\r\n *\r\n * @param {number} newVal the maximum\r\n */\r\n set: function (newVal) {\r\n this._max = Number(newVal.toFixed(1));\r\n if (this._max > 100) {\r\n this._max = 100.0;\r\n }\r\n this.labelHigh.html(this._max.toFixed(1));\r\n this.slider.attr('max', this._max.toFixed(1));\r\n this.atMax = this._weight == this._max;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(_Slider.prototype, \"weight\", {\r\n /**\r\n *\r\n * @returns {number} the weight\r\n */\r\n get: function () {\r\n return this._weight;\r\n },\r\n /**\r\n *\r\n * @param {number} newVal the weight\r\n */\r\n set: function (newVal) {\r\n this._weight = Number(newVal.toFixed(1));\r\n this.labelVal.html(this._weight.toFixed(1) + '%');\r\n if (this._weight <= this._min) {\r\n this.atMin = true;\r\n this.atMax = false;\r\n }\r\n else if (this._weight >= this._max) {\r\n this.atMin = false;\r\n this.atMax = true;\r\n }\r\n else {\r\n this.atMin = false;\r\n this.atMax = false;\r\n }\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return _Slider;\r\n}());\r\nnm._Slider = _Slider;\r\n/**\r\n * class to keep track of the sliders\r\n */\r\nvar TipSliders = (function () {\r\n /**\r\n *\r\n * @param sliderConfigs\r\n * @param presetConfig\r\n * @param divId\r\n * @param presetSelector\r\n * @param regionSelector\r\n * @param versionSelector\r\n * @param chgCallback\r\n */\r\n function TipSliders(sliderConfigs, presetConfig, divId, presetSelector, regionSelector, versionSelector, chgCallback) {\r\n var _this = this;\r\n this.resetting = false;\r\n this.reservedPercent = 0.0;\r\n this.$container = $('#' + divId);\r\n this.$container.addClass('slider-container');\r\n this._changedCallback = typeof chgCallback == 'function' ? chgCallback : function () { };\r\n this._$presetSelector = presetSelector;\r\n this._$regionSelector = regionSelector;\r\n this._$versionSelector = versionSelector;\r\n this._sliderList = [];\r\n this._sliderLookup = {};\r\n for (var i = 0; i < sliderConfigs.length; i++) {\r\n var sld = new _Slider(sliderConfigs[i]);\r\n this._sliderList.push(sld);\r\n this._sliderLookup[sld.domId] = sld;\r\n sld.addToDom(this.$container);\r\n }\r\n this._presetArray = [];\r\n this._presetLookup = {};\r\n for (var i = 0; i < presetConfig.length; i++) {\r\n var preset = new TipPresets(presetConfig[i]);\r\n var idx = (i + 1).toFixed();\r\n this._presetLookup[idx] = preset;\r\n this._presetArray.push(preset);\r\n this._$presetSelector.append(\"<option value=\\\"\" + idx + \"\\\">\" + preset.label + \"</option>\");\r\n }\r\n this._lockedList = [];\r\n this._inRangeList = [];\r\n this._atMinList = [];\r\n this._atMaxList = [];\r\n this.lockedCount = 10;\r\n this.notLockedCount = 0;\r\n this._splitSliderArray();\r\n this._$presetSelector.change(function () {\r\n _this.setPresetValues();\r\n _this._runChangedCallback();\r\n });\r\n this._$regionSelector.change(function () {\r\n _this._runChangedCallback();\r\n });\r\n this._$versionSelector.change(function () {\r\n _this._runChangedCallback();\r\n });\r\n this._$presetSelector.trigger('change');\r\n this._addEventListeners();\r\n }\r\n TipSliders.prototype._runChangedCallback = function () {\r\n this._changedCallback(this.paramWeightsRegionVersion);\r\n };\r\n Object.defineProperty(TipSliders.prototype, \"changedCallback\", {\r\n get: function () {\r\n return this._changedCallback;\r\n },\r\n set: function (chg) {\r\n this._changedCallback = chg;\r\n this._runChangedCallback();\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n TipSliders.prototype.setPresetValues = function () {\r\n var idx = this._$presetSelector.val() || '1';\r\n var thePreset = this._presetLookup[idx];\r\n for (var i = 0; i < thePreset.presets.length; i++) {\r\n var presetValues = thePreset.presets[i];\r\n var theSlider = this._sliderList[i];\r\n theSlider.locked = true;\r\n theSlider.setValAndDropDown(presetValues.value, presetValues.column);\r\n }\r\n };\r\n /**\r\n * split array into subarrays holding the sliders\r\n * @private\r\n */\r\n TipSliders.prototype._splitSliderArray = function () {\r\n this._lockedList = [];\r\n this._inRangeList = [];\r\n this._atMinList = [];\r\n this._atMaxList = [];\r\n for (var i = 0; i < this._sliderList.length; i++) {\r\n var sld = this._sliderList[i];\r\n if (sld.locked) {\r\n this._lockedList.push(sld);\r\n }\r\n else if (sld.atMin) {\r\n this._atMinList.push(sld);\r\n }\r\n else if (sld.atMax) {\r\n this._atMaxList.push(sld);\r\n }\r\n else {\r\n this._inRangeList.push(sld);\r\n }\r\n }\r\n this.lockedCount = this._lockedList.length;\r\n this.notLockedCount = this._sliderList.length - this.lockedCount;\r\n };\r\n /**\r\n * handle remainder, recursive to take care of min max overshoots\r\n * @param {number} remain the remainder\r\n * @param {string} skipDomId - this dom id\r\n * @private\r\n */\r\n TipSliders.prototype._handleRemainder = function (remain, skipDomId) {\r\n remain = Number(remain.toFixed(1));\r\n if (remain == 0) {\r\n return;\r\n }\r\n this._splitSliderArray();\r\n var canChangeArray = [];\r\n for (var i = 0; i < this._inRangeList.length; i++) {\r\n var sld = this._inRangeList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n if (remain > 0) {\r\n for (var i = 0; i < this._atMaxList.length; i++) {\r\n var sld = this._atMaxList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n }\r\n else {\r\n for (var i = 0; i < this._atMinList.length; i++) {\r\n var sld = this._atMinList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n }\r\n if (canChangeArray.length == 0) {\r\n return;\r\n }\r\n var inc = -1 * Number((remain / canChangeArray.length).toFixed(1));\r\n var newRemainder = 0;\r\n for (var i = 0; i < canChangeArray.length; i++) {\r\n newRemainder += canChangeArray[i].increment(inc);\r\n }\r\n this._handleRemainder(newRemainder, skipDomId);\r\n };\r\n /**\r\n *\r\n * @param {object} keyValList key and value list\r\n */\r\n TipSliders.prototype.setValues = function (keyValList) {\r\n this.resetting = true;\r\n for (var k in keyValList) {\r\n if (keyValList.hasOwnProperty(k)) {\r\n this._sliderLookup[k].setValAndDropDown(keyValList[k][0], keyValList[k][1]);\r\n }\r\n }\r\n this.resetting = false;\r\n };\r\n /**\r\n * get the weight sum\r\n * @returns {number} the weight sum\r\n */\r\n TipSliders.prototype.getSum = function () {\r\n var total = 0;\r\n for (var i = 0; i < this._sliderList.length; i++) {\r\n var sld = this._sliderList[i];\r\n total += Number(sld.weight.toFixed(1));\r\n }\r\n return total;\r\n };\r\n /**\r\n * get the parameter weights\r\n * @returns {object} lookup with parameter weights\r\n */\r\n TipSliders.prototype.getParams = function () {\r\n var paramWeights = {};\r\n for (var i = 0; i < this._sliderList.length; i++) {\r\n var sld = this._sliderList[i];\r\n paramWeights[sld.selectedParam] = Number(sld.weight.toFixed(1));\r\n }\r\n return paramWeights;\r\n };\r\n TipSliders.prototype._addEventListeners = function () {\r\n var ___this = this;\r\n //change function\r\n this.$container.find('input[type=\"range\"]').change(function () {\r\n if (___this.resetting) {\r\n return;\r\n }\r\n var $this = $(this);\r\n var domId = this['id'];\r\n var sldr = ___this._sliderLookup[domId];\r\n var newValue = parseFloat($this.val());\r\n var oldValue = sldr.weight;\r\n var diff = newValue - oldValue;\r\n diff = Number(diff.toFixed(1));\r\n sldr.weight = Number(newValue.toFixed(1));\r\n ___this._handleRemainder(diff, domId);\r\n //cleanup, make sure the sum is still 100\r\n var sum = Number(___this.getSum().toFixed(1));\r\n if (sum > 100) {\r\n loop1: while (true) {\r\n for (var i = 0; i < ___this._sliderList.length; i++) {\r\n var sld = ___this._sliderList[i];\r\n if (sld.domId == domId || sld.locked || sld.atMin) {\r\n continue;\r\n }\r\n sld.increment(-0.1);\r\n sum -= 0.1;\r\n if (sum.toFixed(1) == '100.0') {\r\n break loop1;\r\n }\r\n }\r\n }\r\n }\r\n else if (sum < 100) {\r\n loop1: while (true) {\r\n for (var i = 0; i < ___this._sliderList.length; i++) {\r\n var sld = ___this._sliderList[i];\r\n if (sld.domId == domId || sld.locked || sld.atMax) {\r\n continue;\r\n }\r\n sld.increment(0.1);\r\n sum += 0.1;\r\n if (sum.toFixed(1) == '100.0') {\r\n break loop1;\r\n }\r\n }\r\n }\r\n }\r\n ___this._$presetSelector.val('0');\r\n ___this._runChangedCallback();\r\n });\r\n //update the selected parameter when the selection is changed\r\n $('.show-select').change(function () {\r\n if (___this.resetting) {\r\n return;\r\n }\r\n ___this._sliderLookup[this['id'].replace('_chg', '')].selectedParam = $(this).val();\r\n ___this._$presetSelector.val('0');\r\n ___this._runChangedCallback();\r\n });\r\n //lock the slider and update the reserved percent\r\n this.$container.find('input[type=\"checkbox\"]').change(function () {\r\n var domEl = this;\r\n ___this._sliderLookup[domEl.id.replace('_chk', '')].locked = !domEl.checked;\r\n ___this.reservedPercent = 0.0;\r\n ___this.notLockedCount = 0;\r\n var notLockedSliders = [];\r\n for (var i = 0; i < ___this._sliderList.length; i++) {\r\n var sld = ___this._sliderList[i];\r\n if (sld.locked) {\r\n ___this.reservedPercent += sld.weight;\r\n continue;\r\n }\r\n notLockedSliders.push(sld);\r\n ___this.notLockedCount++;\r\n }\r\n for (var i = 0; i < ___this._sliderList.length; i++) {\r\n var sld = ___this._sliderList[i];\r\n if (sld.locked) {\r\n continue;\r\n }\r\n sld.max = 100 - ___this.reservedPercent;\r\n }\r\n if (notLockedSliders.length == 1) {\r\n notLockedSliders[0].min = notLockedSliders[0].weight;\r\n }\r\n else {\r\n for (var i = 0; i < notLockedSliders.length; i++) {\r\n notLockedSliders[i].min = 0;\r\n }\r\n }\r\n });\r\n };\r\n Object.defineProperty(TipSliders.prototype, \"paramWeightsRegionVersion\", {\r\n get: function () {\r\n return { paramWeights: this.getParams(),\r\n region: this._$regionSelector.val(), mmVersion: this._$versionSelector.val() };\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return TipSliders;\r\n}());\r\nexports.TipSliders = TipSliders;\r\nnm.Sliders = TipSliders;\r\nexports.default = TipSliders;\r\n\n\n/***/ }),\n\n/***/ 78:\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Created by gavorhes on 6/22/2016.\r\n */\r\nvar Sliders_1 = __webpack_require__(56);\r\nvar $ = __webpack_require__(1);\r\n__webpack_require__(1);\r\nexports.tipConfig = {\r\n $loadingGif: $('#loading-gif'),\r\n $presetSelector: $('#preset-selector'),\r\n $regionSelector: $('#region-selector'),\r\n $versionSelector: $('#version-selector'),\r\n tipSegmentLayerMinZoom: 10,\r\n slidersConfig: [\r\n {\r\n label: 'AADT',\r\n yearOptions: [\r\n { label: '1', column: 'aadtyr_1' }\r\n ]\r\n },\r\n {\r\n label: 'AADT Future',\r\n yearOptions: [\r\n { label: '5', column: 'aadtyr_5' },\r\n { label: '10', column: 'aadtyr_10' },\r\n { label: '15', column: 'aadtyr_15' },\r\n { label: '20', column: 'aadtyr_20' }\r\n ]\r\n },\r\n {\r\n label: 'Growth',\r\n yearOptions: [\r\n { label: '5', column: 'growth_5' },\r\n { label: '10', column: 'growth_10' },\r\n { label: '15', column: 'growth_15' },\r\n { label: '20', column: 'growth_20' }\r\n ]\r\n },\r\n {\r\n label: 'Truck',\r\n yearOptions: [\r\n { label: '1', column: 'trkdyr_1' },\r\n { label: '20', column: 'trkdyr_20' }\r\n ]\r\n },\r\n {\r\n label: 'LOS',\r\n yearOptions: [\r\n { label: '1', column: 'losyr_1' }\r\n ]\r\n },\r\n {\r\n label: 'LOS Future',\r\n yearOptions: [\r\n { label: '5', column: 'losyr_5' },\r\n { label: '10', column: 'losyr_10' },\r\n { label: '15', column: 'losyr_15' },\r\n { label: '20', column: 'losyr_20' }\r\n ]\r\n },\r\n {\r\n label: 'Crash Rate',\r\n yearOptions: [\r\n { label: 1, column: 'crash_rate' }\r\n ]\r\n },\r\n {\r\n label: 'Severity',\r\n yearOptions: [\r\n { label: 1, column: 'crash_severity' }\r\n ]\r\n },\r\n {\r\n label: 'Weather',\r\n yearOptions: [\r\n { label: 1, column: 'weather' }\r\n ]\r\n },\r\n {\r\n label: 'Event',\r\n yearOptions: [\r\n { label: 1, column: 'event' }\r\n ]\r\n }\r\n ],\r\n presetConfig: [\r\n {\r\n label: 'Default TIP',\r\n presets: [\r\n { column: 'aadtyr_1', value: 10.0 },\r\n { column: 'aadtyr_20', value: 7.0 },\r\n { column: 'growth_20', value: 7.0 },\r\n { column: 'trkdyr_1', value: 4.0 },\r\n { column: 'losyr_1', value: 12.0 },\r\n { column: 'losyr_20', value: 12.0 },\r\n { column: 'crash_rate', value: 15.0 },\r\n { column: 'crash_severity', value: 13.0 },\r\n { column: 'weather', value: 9.0 },\r\n { column: 'event', value: 11.0 }\r\n ]\r\n },\r\n {\r\n label: 'Safety',\r\n presets: [\r\n { column: 'aadtyr_1', value: 20.0 },\r\n { column: 'aadtyr_20', value: 0.0 },\r\n { column: 'growth_20', value: 0.0 },\r\n { column: 'trkdyr_1', value: 0.0 },\r\n { column: 'losyr_1', value: 0.0 },\r\n { column: 'losyr_20', value: 0.0 },\r\n { column: 'crash_rate', value: 40.0 },\r\n { column: 'crash_severity', value: 40.0 },\r\n { column: 'weather', value: 0.0 },\r\n { column: 'event', value: 0.0 }\r\n ]\r\n },\r\n {\r\n label: 'Mobility Present',\r\n presets: [\r\n { column: 'aadtyr_1', value: 25.0 },\r\n { column: 'aadtyr_20', value: 25.0 },\r\n { column: 'growth_20', value: 0.0 },\r\n { column: 'trkdyr_1', value: 25.0 },\r\n { column: 'losyr_1', value: 25.0 },\r\n { column: 'losyr_20', value: 0.0 },\r\n { column: 'crash_rate', value: 0.0 },\r\n { column: 'crash_severity', value: 0.0 },\r\n { column: 'weather', value: 0.0 },\r\n { column: 'event', value: 0.0 }\r\n ]\r\n },\r\n {\r\n label: 'Mobility Future',\r\n presets: [\r\n { column: 'aadtyr_1', value: 0.0 },\r\n { column: 'aadtyr_20', value: 25.0 },\r\n { column: 'growth_20', value: 25.0 },\r\n { column: 'trkdyr_1', value: 25.0 },\r\n { column: 'losyr_1', value: 0.0 },\r\n { column: 'losyr_20', value: 25.0 },\r\n { column: 'crash_rate', value: 0.0 },\r\n { column: 'crash_severity', value: 0.0 },\r\n { column: 'weather', value: 0.0 },\r\n { column: 'event', value: 0.0 }\r\n ]\r\n },\r\n {\r\n label: 'Service',\r\n presets: [\r\n { column: 'aadtyr_1', value: 30.0 },\r\n { column: 'aadtyr_20', value: 0.0 },\r\n { column: 'growth_20', value: 10.0 },\r\n { column: 'trkdyr_1', value: 0.0 },\r\n { column: 'losyr_1', value: 30.0 },\r\n { column: 'losyr_20', value: 30.0 },\r\n { column: 'crash_rate', value: 0.0 },\r\n { column: 'crash_severity', value: 0.0 },\r\n { column: 'weather', value: 0.0 },\r\n { column: 'event', value: 0.0 }\r\n ]\r\n },\r\n {\r\n label: 'Freight Performance',\r\n presets: [\r\n { column: 'aadtyr_1', value: 20.0 },\r\n { column: 'aadtyr_20', value: 0.0 },\r\n { column: 'growth_20', value: 0.0 },\r\n { column: 'trkdyr_1', value: 60.0 },\r\n { column: 'losyr_1', value: 20.0 },\r\n { column: 'losyr_20', value: 0.0 },\r\n { column: 'crash_rate', value: 0.0 },\r\n { column: 'crash_severity', value: 0.0 },\r\n { column: 'weather', value: 0.0 },\r\n { column: 'event', value: 0.0 }\r\n ]\r\n }\r\n ]\r\n};\r\nexports.tipConfig.$presetSelector.append('<option value=\"0\" disabled=>Custom</option>');\r\nvar sliders = new Sliders_1.TipSliders(exports.tipConfig.slidersConfig, exports.tipConfig.presetConfig, 'slider-container', exports.tipConfig.$presetSelector, exports.tipConfig.$regionSelector, exports.tipConfig.$regionSelector, function (chg) { console.log(chg); });\r\n// sliders.changedCallback = (chg) => {console.log(chg)};\r\nwindow['glob'] = sliders;\r\nwindow['hat'] = sliders;\r\nwindow['bird'] = sliders;\r\n\n\n/***/ })\n\n/******/ });\n\n\n// WEBPACK FOOTER //\n// slider-test.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 78);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap b0ebb0fd1b4953354d93","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\ndeclare const window: Window;\r\n/**\r\n * create a namespace on the gv object\r\n * @param {string} namespace to create\r\n * @returns {object} object representing the namespace\r\n */\r\nfunction provide(namespace: string){\r\n \"use strict\";\r\n if (typeof (<any>window).gv == 'undefined'){\r\n (<any>window).gv = {};\r\n }\r\n\r\n let parts = namespace.split('.');\r\n let nameSpace = (<any>window).gv;\r\n\r\n for (let i=0; i< parts.length; i++){\r\n let newObject = nameSpace[parts[i]];\r\n\r\n if (typeof newObject == 'undefined'){\r\n nameSpace[parts[i]] = {};\r\n }\r\n\r\n nameSpace = nameSpace[parts[i]];\r\n }\r\n\r\n return nameSpace;\r\n}\r\n\r\nprovide('util');\r\n(<any>window).gv.util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 1\n// module chunks = 0 1 2 4 5 6 7 8 9 10 11","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('collections');\r\n\r\nexport interface TipSliderConfig {\r\n label: string;\r\n yearOptions: Array<{column: string, label: string}>\r\n}\r\n\r\nexport interface TipPresetConfig {\r\n label: string;\r\n presets: Array<{column: string, value: number}>\r\n}\r\n\r\nexport interface ChangeResponse{\r\n paramWeights: Object;\r\n region: string;\r\n mmVersion: string;\r\n}\r\n\r\nexport interface ChangeCallback{\r\n (chg: ChangeResponse): any\r\n}\r\n\r\n\r\nclass TipPresets implements TipPresetConfig {\r\n label: string;\r\n presets: Array<{column: string, value: number}>;\r\n domId: string;\r\n\r\n constructor(conf: TipPresetConfig) {\r\n this.label = conf.label;\r\n this.presets = conf.presets;\r\n this.domId = this.label.replace(/ /g, '').toLowerCase();\r\n\r\n let theSum = 0;\r\n\r\n for (let pr of this.presets){\r\n theSum += pr.value;\r\n }\r\n\r\n if (theSum != 100){\r\n throw 'preset sum does note equal 100';\r\n }\r\n }\r\n}\r\n\r\n\r\nclass _Slider {\r\n _min: number;\r\n _max: number;\r\n _locked: boolean;\r\n atMin: boolean;\r\n atMax: boolean;\r\n _weightDefault: number;\r\n _weight: number;\r\n html: string;\r\n domId: string;\r\n name: string;\r\n\r\n labelLow: JQuery;\r\n labelHigh: JQuery;\r\n labelVal: JQuery;\r\n slider: JQuery;\r\n selectionBox: JQuery;\r\n chk: JQuery;\r\n\r\n selectedParam: any;\r\n selectedParamDefault: any;\r\n _dropdownSelection: string;\r\n\r\n /**\r\n * Slider constructor\r\n * @param sliderConfig - the configuration\r\n\r\n */\r\n constructor(sliderConfig: TipSliderConfig) {\r\n this._dropdownSelection = null;\r\n this._weight = null;\r\n this.name = sliderConfig.label;\r\n this.domId = this.name.toLowerCase().replace(/ /g, '-');\r\n\r\n this._locked = false;\r\n\r\n this._min = 0.0;\r\n this._max = 100;\r\n\r\n this.labelLow = null;\r\n this.labelHigh = null;\r\n this.labelVal = null;\r\n this.slider = null;\r\n this.chk = null;\r\n\r\n this.atMin = false;\r\n this.atMax = false;\r\n\r\n\r\n let sel = `<select class=\"${sliderConfig.yearOptions.length == 1 ? 'hidden-select' : 'show-select'}\" id=\"${this.domId}_chg\">`;\r\n\r\n for (let i = 0; i < sliderConfig.yearOptions.length; i++) {\r\n let itm = sliderConfig.yearOptions[i];\r\n sel += `<option value=\"${itm.column}\">${itm.label}</option>`;\r\n }\r\n sel += '</select>';\r\n\r\n this.selectedParamDefault = this.selectedParam;\r\n\r\n this.html = '<div class=\"slider-div\">' +\r\n `<label for=\"${this.domId}_chk\" class=\"slider-label\">${this.name}</label>` +\r\n sel + `<br>` +\r\n `<input id=\"${this.domId}_chk\" type=\"checkbox\" title=\"Lock/Unlock Slider\">` +\r\n `<label id=\"${this.domId}_low\" class=\"low-high\"></label>` +\r\n `<input id=\"${this.domId}\" type=\"range\" value=\"50\" min=\"0\" max=\"100\" step=\"0.1\">` +\r\n `<label id=\"${this.domId}_high\" class=\"low-high\"></label>` +\r\n `<label id=\"${this.domId}_lbl\" for=\"${this.domId}\" class=\"percent-label\"></label></div>`;\r\n }\r\n\r\n /**\r\n * add html to dom\r\n * @param {jQuery} $container - container element\r\n */\r\n addToDom($container: JQuery) {\r\n $container.append(this.html);\r\n this.labelLow = $(`#${this.domId}_low`);\r\n this.labelHigh = $(`#${this.domId}_high`);\r\n this.labelVal = $(`#${this.domId}_lbl`);\r\n this.slider = $(`#${this.domId}`);\r\n this.selectionBox = $(`#${this.domId}_chg`);\r\n this.chk = $(`#${this.domId}_chk`);\r\n }\r\n\r\n /**\r\n * increment the slider\r\n * @param {number} delta change delta\r\n * @returns {number} the remainder not able to be allocated to this slider\r\n */\r\n increment(delta: number): number {\r\n let remainder = 0;\r\n delta = Number(delta.toFixed(1));\r\n\r\n this._weight += delta;\r\n if (this._weight < this._min) {\r\n remainder = this._min - this._weight;\r\n this._weight = this._min;\r\n this.atMin = true;\r\n } else if (this._weight > this._max) {\r\n remainder = this._max - this._weight;\r\n this._weight = this._max;\r\n this.atMax = true;\r\n } else {\r\n this.atMin = false;\r\n this.atMax = false;\r\n }\r\n\r\n this.slider.val(this._weight.toFixed(1));\r\n this.labelVal.html(this._weight.toFixed(1) + '%');\r\n\r\n return remainder;\r\n }\r\n\r\n /**\r\n * set the value and drop down\r\n * @param {number} newVal the new value\r\n * @param {string} selectedParam the selected parameter\r\n */\r\n setValAndDropDown(newVal: number, selectedParam: string) {\r\n this.min = 0;\r\n this.max = 100;\r\n this.weight = newVal;\r\n this.slider.val(newVal.toFixed(1));\r\n this.selectionBox.val(selectedParam);\r\n this.selectedParam = selectedParam;\r\n this.locked = true;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {boolean} if locked\r\n */\r\n get locked() {\r\n return this._locked;\r\n }\r\n\r\n /**\r\n *\r\n * @param {boolean} val if locked\r\n */\r\n set locked(val) {\r\n this._locked = val;\r\n this.slider.prop('disabled', this._locked);\r\n this.selectionBox.prop('disabled', this._locked);\r\n this.chk.prop('checked', !this._locked);\r\n }\r\n\r\n /**\r\n *\r\n * @returns {number} the minimum\r\n */\r\n get min() {\r\n return this._min;\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} newVal new minimum\r\n */\r\n set min(newVal) {\r\n this._min = Number(newVal.toFixed(1));\r\n if (this._min < 0) {\r\n this._min = 0;\r\n }\r\n this.labelLow.html(this._min.toFixed(1));\r\n this.slider.attr('min', this._min.toFixed(1));\r\n this.atMin = this._weight == this._min;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {number} the maximum\r\n */\r\n get max() {\r\n return this._max;\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} newVal the maximum\r\n */\r\n set max(newVal) {\r\n this._max = Number(newVal.toFixed(1));\r\n if (this._max > 100) {\r\n this._max = 100.0;\r\n }\r\n this.labelHigh.html(this._max.toFixed(1));\r\n this.slider.attr('max', this._max.toFixed(1));\r\n this.atMax = this._weight == this._max;\r\n }\r\n\r\n /**\r\n *\r\n * @returns {number} the weight\r\n */\r\n get weight() {\r\n return this._weight;\r\n }\r\n\r\n /**\r\n *\r\n * @param {number} newVal the weight\r\n */\r\n set weight(newVal) {\r\n this._weight = Number(newVal.toFixed(1));\r\n this.labelVal.html(this._weight.toFixed(1) + '%');\r\n if (this._weight <= this._min) {\r\n this.atMin = true;\r\n this.atMax = false;\r\n } else if (this._weight >= this._max) {\r\n this.atMin = false;\r\n this.atMax = true;\r\n } else {\r\n this.atMin = false;\r\n this.atMax = false;\r\n }\r\n }\r\n}\r\n\r\nnm._Slider = _Slider;\r\n\r\n\r\n/**\r\n * class to keep track of the sliders\r\n */\r\nexport class TipSliders {\r\n $container: JQuery;\r\n reservedPercent: number;\r\n lockedCount: number;\r\n notLockedCount: number;\r\n private _sliderList: Array<_Slider>;\r\n private _sliderLookup: {[s: string]: _Slider};\r\n private resetting: boolean;\r\n private _changedCallback: ChangeCallback;\r\n\r\n private _lockedList: Array<_Slider>;\r\n private _inRangeList: Array<_Slider>;\r\n private _atMinList: Array<_Slider>;\r\n private _atMaxList: Array<_Slider>;\r\n\r\n private _presetArray: Array<TipPresets>;\r\n private _presetLookup: {[s: string]: TipPresets};\r\n\r\n private _$presetSelector: JQuery;\r\n private _$regionSelector: JQuery;\r\n private _$versionSelector: JQuery;\r\n\r\n /**\r\n *\r\n * @param sliderConfigs\r\n * @param presetConfig\r\n * @param divId\r\n * @param presetSelector\r\n * @param regionSelector\r\n * @param versionSelector\r\n * @param chgCallback\r\n */\r\n constructor(sliderConfigs: Array<TipSliderConfig>, presetConfig: Array<TipPresetConfig>,\r\n divId: string, presetSelector: JQuery, regionSelector: JQuery, versionSelector: JQuery,\r\n chgCallback?: ChangeCallback) {\r\n\r\n this.resetting = false;\r\n this.reservedPercent = 0.0;\r\n this.$container = $('#' + divId);\r\n this.$container.addClass('slider-container');\r\n\r\n this._changedCallback = typeof chgCallback == 'function' ? chgCallback : () => {};\r\n\r\n this._$presetSelector = presetSelector;\r\n this._$regionSelector = regionSelector;\r\n this._$versionSelector = versionSelector;\r\n\r\n this._sliderList = [];\r\n this._sliderLookup = {};\r\n\r\n for (let i = 0; i < sliderConfigs.length; i++) {\r\n let sld = new _Slider(sliderConfigs[i]);\r\n this._sliderList.push(sld);\r\n this._sliderLookup[sld.domId] = sld;\r\n sld.addToDom(this.$container);\r\n }\r\n\r\n this._presetArray = [];\r\n this._presetLookup = {};\r\n\r\n for (let i = 0; i < presetConfig.length; i++) {\r\n let preset = new TipPresets(presetConfig[i]);\r\n\r\n let idx = (i + 1).toFixed();\r\n\r\n this._presetLookup[idx] = preset;\r\n this._presetArray.push(preset);\r\n this._$presetSelector.append(`<option value=\"${idx}\">${preset.label}</option>`);\r\n }\r\n\r\n\r\n this._lockedList = [];\r\n this._inRangeList = [];\r\n this._atMinList = [];\r\n this._atMaxList = [];\r\n\r\n this.lockedCount = 10;\r\n this.notLockedCount = 0;\r\n\r\n this._splitSliderArray();\r\n\r\n\r\n this._$presetSelector.change(() => {\r\n this.setPresetValues();\r\n this._runChangedCallback();\r\n });\r\n\r\n this._$regionSelector.change(() => {\r\n this._runChangedCallback();\r\n });\r\n\r\n this._$versionSelector.change(() => {\r\n this._runChangedCallback();\r\n });\r\n\r\n this._$presetSelector.trigger('change');\r\n\r\n this._addEventListeners();\r\n }\r\n\r\n _runChangedCallback(){\r\n this._changedCallback(this.paramWeightsRegionVersion);\r\n }\r\n\r\n get changedCallback(): ChangeCallback{\r\n return this._changedCallback\r\n }\r\n\r\n set changedCallback(chg: ChangeCallback){\r\n this._changedCallback = chg;\r\n this._runChangedCallback();\r\n }\r\n\r\n setPresetValues() {\r\n let idx = this._$presetSelector.val() || '1';\r\n\r\n let thePreset = this._presetLookup[idx];\r\n\r\n for (let i = 0; i < thePreset.presets.length; i++) {\r\n let presetValues = thePreset.presets[i];\r\n let theSlider = this._sliderList[i];\r\n\r\n theSlider.locked = true;\r\n theSlider.setValAndDropDown(presetValues.value, presetValues.column);\r\n }\r\n }\r\n\r\n /**\r\n * split array into subarrays holding the sliders\r\n * @private\r\n */\r\n _splitSliderArray() {\r\n this._lockedList = [];\r\n this._inRangeList = [];\r\n this._atMinList = [];\r\n this._atMaxList = [];\r\n\r\n for (let i = 0; i < this._sliderList.length; i++) {\r\n let sld = this._sliderList[i];\r\n\r\n if (sld.locked) {\r\n this._lockedList.push(sld);\r\n } else if (sld.atMin) {\r\n this._atMinList.push(sld);\r\n } else if (sld.atMax) {\r\n this._atMaxList.push(sld);\r\n } else {\r\n this._inRangeList.push(sld);\r\n }\r\n }\r\n this.lockedCount = this._lockedList.length;\r\n this.notLockedCount = this._sliderList.length - this.lockedCount;\r\n }\r\n\r\n /**\r\n * handle remainder, recursive to take care of min max overshoots\r\n * @param {number} remain the remainder\r\n * @param {string} skipDomId - this dom id\r\n * @private\r\n */\r\n _handleRemainder(remain: number, skipDomId: string) {\r\n\r\n remain = Number(remain.toFixed(1));\r\n if (remain == 0) {\r\n return;\r\n }\r\n\r\n this._splitSliderArray();\r\n\r\n let canChangeArray = [];\r\n for (let i = 0; i < this._inRangeList.length; i++) {\r\n let sld = this._inRangeList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n\r\n if (remain > 0) {\r\n for (let i = 0; i < this._atMaxList.length; i++) {\r\n let sld = this._atMaxList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n } else {\r\n for (let i = 0; i < this._atMinList.length; i++) {\r\n let sld = this._atMinList[i];\r\n if (sld.domId == skipDomId) {\r\n continue;\r\n }\r\n canChangeArray.push(sld);\r\n }\r\n }\r\n\r\n if (canChangeArray.length == 0) {\r\n return;\r\n }\r\n\r\n let inc = -1 * Number((remain / canChangeArray.length).toFixed(1));\r\n\r\n let newRemainder = 0;\r\n for (let i = 0; i < canChangeArray.length; i++) {\r\n newRemainder += canChangeArray[i].increment(inc);\r\n }\r\n\r\n this._handleRemainder(newRemainder, skipDomId);\r\n }\r\n\r\n /**\r\n *\r\n * @param {object} keyValList key and value list\r\n */\r\n setValues(keyValList: {[s:string]: [number, string]}) {\r\n this.resetting = true;\r\n for (let k in keyValList) {\r\n if (keyValList.hasOwnProperty(k)) {\r\n this._sliderLookup[k].setValAndDropDown(keyValList[k][0], keyValList[k][1]);\r\n }\r\n }\r\n this.resetting = false;\r\n }\r\n\r\n /**\r\n * get the weight sum\r\n * @returns {number} the weight sum\r\n */\r\n getSum() {\r\n let total = 0;\r\n for (let i = 0; i < this._sliderList.length; i++) {\r\n let sld = this._sliderList[i];\r\n total += Number(sld.weight.toFixed(1));\r\n }\r\n\r\n return total;\r\n }\r\n\r\n /**\r\n * get the parameter weights\r\n * @returns {object} lookup with parameter weights\r\n */\r\n getParams() {\r\n let paramWeights: {[s: string]: number} = {};\r\n for (let i = 0; i < this._sliderList.length; i++) {\r\n let sld = this._sliderList[i];\r\n paramWeights[sld.selectedParam] = Number(sld.weight.toFixed(1));\r\n }\r\n\r\n return paramWeights;\r\n }\r\n\r\n _addEventListeners() {\r\n let ___this = this;\r\n\r\n\r\n //change function\r\n this.$container.find('input[type=\"range\"]').change(function () {\r\n if (___this.resetting) {\r\n return;\r\n }\r\n\r\n let $this = $(this);\r\n let domId = this['id'];\r\n let sldr = ___this._sliderLookup[domId];\r\n\r\n let newValue = parseFloat($this.val());\r\n\r\n let oldValue = sldr.weight;\r\n let diff = newValue - oldValue;\r\n diff = Number(diff.toFixed(1));\r\n\r\n sldr.weight = Number(newValue.toFixed(1));\r\n\r\n ___this._handleRemainder(diff, domId);\r\n\r\n //cleanup, make sure the sum is still 100\r\n let sum = Number(___this.getSum().toFixed(1));\r\n\r\n if (sum > 100) {\r\n loop1:\r\n while (true) {\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.domId == domId || sld.locked || sld.atMin) {\r\n continue;\r\n }\r\n sld.increment(-0.1);\r\n sum -= 0.1;\r\n if (sum.toFixed(1) == '100.0') {\r\n break loop1;\r\n }\r\n }\r\n }\r\n } else if (sum < 100) {\r\n loop1:\r\n while (true) {\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.domId == domId || sld.locked || sld.atMax) {\r\n continue;\r\n }\r\n sld.increment(0.1);\r\n sum += 0.1;\r\n if (sum.toFixed(1) == '100.0') {\r\n break loop1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n ___this._$presetSelector.val('0');\r\n ___this._runChangedCallback();\r\n }\r\n );\r\n\r\n //update the selected parameter when the selection is changed\r\n $('.show-select').change(function () {\r\n if (___this.resetting) {\r\n return;\r\n }\r\n ___this._sliderLookup[this['id'].replace('_chg', '')].selectedParam = $(this).val();\r\n\r\n ___this._$presetSelector.val('0');\r\n\r\n ___this._runChangedCallback();\r\n\r\n });\r\n\r\n //lock the slider and update the reserved percent\r\n this.$container.find('input[type=\"checkbox\"]').change(function () {\r\n let domEl = this;\r\n\r\n ___this._sliderLookup[domEl.id.replace('_chk', '')].locked = !domEl.checked;\r\n ___this.reservedPercent = 0.0;\r\n ___this.notLockedCount = 0;\r\n\r\n let notLockedSliders = [];\r\n\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.locked) {\r\n ___this.reservedPercent += sld.weight;\r\n continue;\r\n }\r\n notLockedSliders.push(sld);\r\n ___this.notLockedCount++;\r\n }\r\n\r\n for (let i = 0; i < ___this._sliderList.length; i++) {\r\n let sld = ___this._sliderList[i];\r\n if (sld.locked) {\r\n continue;\r\n }\r\n sld.max = 100 - ___this.reservedPercent;\r\n }\r\n\r\n if (notLockedSliders.length == 1) {\r\n notLockedSliders[0].min = notLockedSliders[0].weight;\r\n } else {\r\n for (let i = 0; i < notLockedSliders.length; i++) {\r\n notLockedSliders[i].min = 0;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n get paramWeightsRegionVersion(): ChangeResponse{\r\n return {paramWeights: this.getParams(),\r\n region: this._$regionSelector.val() as string, mmVersion: this._$versionSelector.val() as string}\r\n }\r\n}\r\n\r\nnm.Sliders = TipSliders;\r\nexport default TipSliders;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/Sliders.ts","/**\r\n * Created by gavorhes on 6/22/2016.\r\n */\r\nimport {TipSliders, TipPresetConfig, TipSliderConfig} from '../../collections/Sliders';\r\nimport $ = require('jquery');\r\nimport ol = require('custom-ol');\r\nimport 'jquery-ui';\r\n\r\n\r\n\r\nexport interface ITipConfig{\r\n slidersConfig: Array<TipSliderConfig>;\r\n presetConfig: Array<TipPresetConfig>;\r\n tipSegmentLayerMinZoom: number;\r\n sliders: TipSliders;\r\n _map: ol.Map;\r\n $loadingGif: JQuery;\r\n $presetSelector: JQuery;\r\n $regionSelector: JQuery;\r\n $versionSelector: JQuery;\r\n itsLayerCollection: any;\r\n tipSegmentLayer: any;\r\n metamanagerSegments: any;\r\n}\r\n\r\nexport const tipConfig = {\r\n $loadingGif: $('#loading-gif'),\r\n $presetSelector: $('#preset-selector'),\r\n $regionSelector: $('#region-selector'),\r\n $versionSelector: $('#version-selector'),\r\n tipSegmentLayerMinZoom: 10,\r\n slidersConfig: [\r\n {\r\n label: 'AADT',\r\n yearOptions: [\r\n {label: '1', column: 'aadtyr_1'}\r\n ]\r\n },\r\n {\r\n label: 'AADT Future',\r\n yearOptions: [\r\n {label: '5', column: 'aadtyr_5'},\r\n {label: '10', column: 'aadtyr_10'},\r\n {label: '15', column: 'aadtyr_15'},\r\n {label: '20', column: 'aadtyr_20'}\r\n ]\r\n },\r\n {\r\n label: 'Growth',\r\n yearOptions: [\r\n {label: '5', column: 'growth_5'},\r\n {label: '10', column: 'growth_10'},\r\n {label: '15', column: 'growth_15'},\r\n {label: '20', column: 'growth_20'}\r\n ]\r\n },\r\n {\r\n label: 'Truck',\r\n yearOptions: [\r\n {label: '1', column: 'trkdyr_1'},\r\n {label: '20', column: 'trkdyr_20'}\r\n ]\r\n },\r\n {\r\n label: 'LOS',\r\n yearOptions: [\r\n {label: '1', column: 'losyr_1'}\r\n ]\r\n },\r\n {\r\n label: 'LOS Future',\r\n yearOptions: [\r\n {label: '5', column: 'losyr_5'},\r\n {label: '10', column: 'losyr_10'},\r\n {label: '15', column: 'losyr_15'},\r\n {label: '20', column: 'losyr_20'}\r\n ]\r\n },\r\n {\r\n label: 'Crash Rate',\r\n yearOptions: [\r\n {label: 1, column: 'crash_rate'}\r\n ]\r\n },\r\n {\r\n label: 'Severity',\r\n yearOptions: [\r\n {label: 1, column: 'crash_severity'}\r\n ]\r\n },\r\n {\r\n label: 'Weather',\r\n yearOptions: [\r\n {label: 1, column: 'weather'}\r\n ]\r\n },\r\n {\r\n label: 'Event',\r\n yearOptions: [\r\n {label: 1, column: 'event'}\r\n ]\r\n }\r\n ] as Array<TipSliderConfig>,\r\n presetConfig: [\r\n {\r\n label: 'Default TIP',\r\n presets: [\r\n {column: 'aadtyr_1', value: 10.0},\r\n {column: 'aadtyr_20', value: 7.0},\r\n {column: 'growth_20', value: 7.0},\r\n {column: 'trkdyr_1', value: 4.0},\r\n {column: 'losyr_1', value: 12.0},\r\n {column: 'losyr_20', value: 12.0},\r\n {column: 'crash_rate', value: 15.0},\r\n {column: 'crash_severity', value: 13.0},\r\n {column: 'weather', value: 9.0},\r\n {column: 'event', value: 11.0}\r\n ]\r\n },\r\n {\r\n label: 'Safety',\r\n presets: [\r\n {column: 'aadtyr_1', value: 20.0},\r\n {column: 'aadtyr_20', value: 0.0},\r\n {column: 'growth_20', value: 0.0},\r\n {column: 'trkdyr_1', value: 0.0},\r\n {column: 'losyr_1', value: 0.0},\r\n {column: 'losyr_20', value: 0.0},\r\n {column: 'crash_rate', value: 40.0},\r\n {column: 'crash_severity', value: 40.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Mobility Present',\r\n presets: [\r\n {column: 'aadtyr_1', value: 25.0},\r\n {column: 'aadtyr_20', value: 25.0},\r\n {column: 'growth_20', value: 0.0},\r\n {column: 'trkdyr_1', value: 25.0},\r\n {column: 'losyr_1', value: 25.0},\r\n {column: 'losyr_20', value: 0.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Mobility Future',\r\n presets: [\r\n {column: 'aadtyr_1', value: 0.0},\r\n {column: 'aadtyr_20', value: 25.0},\r\n {column: 'growth_20', value: 25.0},\r\n {column: 'trkdyr_1', value: 25.0},\r\n {column: 'losyr_1', value: 0.0},\r\n {column: 'losyr_20', value: 25.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Service',\r\n presets: [\r\n {column: 'aadtyr_1', value: 30.0},\r\n {column: 'aadtyr_20', value: 0.0},\r\n {column: 'growth_20', value: 10.0},\r\n {column: 'trkdyr_1', value: 0.0},\r\n {column: 'losyr_1', value: 30.0},\r\n {column: 'losyr_20', value: 30.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n },\r\n {\r\n label: 'Freight Performance',\r\n presets: [\r\n {column: 'aadtyr_1', value: 20.0},\r\n {column: 'aadtyr_20', value: 0.0},\r\n {column: 'growth_20', value: 0.0},\r\n {column: 'trkdyr_1', value: 60.0},\r\n {column: 'losyr_1', value: 20.0},\r\n {column: 'losyr_20', value: 0.0},\r\n {column: 'crash_rate', value: 0.0},\r\n {column: 'crash_severity', value: 0.0},\r\n {column: 'weather', value: 0.0},\r\n {column: 'event', value: 0.0}\r\n ]\r\n }\r\n ] as Array<TipPresetConfig>\r\n\r\n} as ITipConfig;\r\n\r\ntipConfig.$presetSelector.append('<option value=\"0\" disabled=>Custom</option>');\r\n\r\nlet sliders = new TipSliders(tipConfig.slidersConfig, tipConfig.presetConfig, 'slider-container',\r\n tipConfig.$presetSelector, tipConfig.$regionSelector, tipConfig.$regionSelector, (chg) => {console.log(chg)});\r\n\r\n// sliders.changedCallback = (chg) => {console.log(chg)};\r\n\r\nwindow['glob'] = sliders;\r\nwindow['hat'] = sliders;\r\nwindow['bird'] = sliders;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_tests/demos/slider-test.ts"],"sourceRoot":""} \ No newline at end of file