diff --git a/dist/layers/LayerBaseVector.js b/dist/layers/LayerBaseVector.js
index b6739e82db0e8f6f72284d15e95d702198f55dd2..387a7e7a1b528a63edaa6d709d5ab3362e5fb675 100644
--- a/dist/layers/LayerBaseVector.js
+++ b/dist/layers/LayerBaseVector.js
@@ -9,7 +9,6 @@ var mapMove_1 = require("../olHelpers/mapMove");
 var provide_1 = require("../util/provide");
 var ol = require("custom-ol");
 var $ = require("jquery");
-var g = new ol.Map({});
 var nm = provide_1.default('layers');
 /**
  * The Vector layer base
diff --git a/dist/layers/LayerBaseVector.js.map b/dist/layers/LayerBaseVector.js.map
index fee955cbc8d21f3c9acdc457a706f8634f6237ab..e8bc0a225670bc13b16a1af11ad386f4d43736ec 100644
--- a/dist/layers/LayerBaseVector.js.map
+++ b/dist/layers/LayerBaseVector.js.map
@@ -1 +1 @@
-{"version":3,"file":"LayerBaseVector.js","sourceRoot":"","sources":["../../src/layers/LayerBaseVector.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAwD;AACxD,gDAA2C;AAE3C,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAE7B,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAEvB,IAAM,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AA4B7B;;;;GAIG;AACH;IAAqC,mCAAS;IAe1C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,yBAAY,GAAW,EAAE,OAAoC;QAApC,wBAAA,EAAA,YAAoC;QAA7D,YACI,kBAAM,GAAG,EAAE,OAAO,CAAC,SAwDtB;QAtDG,OAAO,GAAG,OAAiC,CAAC;QAE5C,kDAAkD;QAClD,EAAE,CAAC,CAAC,KAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACxB,KAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,CAAC;QAED,KAAI,CAAC,MAAM,GAAG,OAAO,OAA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AI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;QACrC,CAAC;;;OAAA;IAKD,sBAAI,oCAAO;QAHX;;WAEG;aACH;YACI,MAAM,CAAC,iBAAM,UAAU,WAAqB,CAAC;QACjD,CAAC;;;OAAA;IAES,mCAAS,GAAnB,UAAoB,IAAY;QAC5B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IACL,sBAAC;AAAD,CAAC,AAhRD,CAAqC,qBAAS,GAgR7C;AAhRY,0CAAe;AAkR5B,EAAE,CAAC,eAAe,GAAG,eAAe,CAAC;;AACrC,kBAAe,eAAe,CAAC"}
\ No newline at end of file
+{"version":3,"file":"LayerBaseVector.js","sourceRoot":"","sources":["../../src/layers/LayerBaseVector.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAwD;AACxD,gDAA2C;AAE3C,2CAAsC;AACtC,8BAAiC;AACjC,0BAA6B;AAE7B,IAAM,EAAE,GAAG,iBAAO,CAAC,QAAQ,CAAC,CAAC;AA4B7B;;;;GAIG;AACH;IAAqC,mCAAS;IAe1C;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,yBAAY,GAAW,EAAE,OAAoC;QAApC,wBAAA,EAAA,YAAoC;QAA7D,YACI,kBAAM,GAAG,EAAE,OAAO,CAAC,SAwDtB;QAtDG,OAAO,GAAG,OAAiC,CAAC;QAE5C,kDAAkD;QAClD,EAAE,CAAC,CAAC,KAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACxB,KAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACxB,CAAC;QAED,KAAI,CAAC,MAAM,GAAG,OAAO,OAAO,CAAC,KAAK,IAAI,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;QAE9E,EAAE,CAAC,CAAC,KAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACf,KAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QA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,GAAnB,UAAoB,IAAY;QAC5B,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IACL,sBAAC;AAAD,CAAC,AAhRD,CAAqC,qBAAS,GAgR7C;AAhRY,0CAAe;AAkR5B,EAAE,CAAC,eAAe,GAAG,eAAe,CAAC;;AACrC,kBAAe,eAAe,CAAC"}
\ No newline at end of file
diff --git a/package.json b/package.json
index 55635a3b7b96ba98f8de801775a0da9f0ae175f2..b928f2a140e72b4f70de4c871c5e689c0655a87f 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
   "scripts": {
     "test": "node node_modules\\karma\\bin\\karma start karma.conf.js",
     "lint": "eslint src/**/*.js",
-    "update-custom-ol": "npm update custom-ol",
+    "update-custom-ol": "npm update custom-ol & COPY /y node_modules\\custom-ol\\lib\\custom-ol-build.js test-html\\lib\\custom-ol-build.js",
     "serve": "cd test-html & python -m http.server 5002",
     "typedoc": "typedoc --excludePrivate --mode file --out doc src",
     "webpack": "webpack -d -w",
@@ -23,6 +23,7 @@
   "author": "TOPS Lab",
   "license": "ISC",
   "devDependencies": {
+    "@types/d3": "^4.5.0",
     "chai": "^3.5.0",
     "custom-ol": "git://github.com/glennvorhes/custom-ol.git#master",
     "expect": "^1.20.1",
diff --git a/src/layers/LayerBaseVector.ts b/src/layers/LayerBaseVector.ts
index 65336abd27ade73eb2dbf178bb3977c133233dff..f18759c63968c13c8d397781b2b7f200da6d69a9 100644
--- a/src/layers/LayerBaseVector.ts
+++ b/src/layers/LayerBaseVector.ts
@@ -5,8 +5,6 @@ import provide from '../util/provide';
 import ol = require('custom-ol');
 import $ = require('jquery');
 
-let g = new ol.Map({});
-
 const nm = provide('layers');
 
 export interface makeMapMoveParams {
diff --git a/test-html/animate.html b/test-html/animate.html
index 6591e9f0576ffaf69ca104206dcd7ac74604e07f..ee7417914002a50357d9b35255ac2531d06b9234 100644
--- a/test-html/animate.html
+++ b/test-html/animate.html
@@ -16,7 +16,8 @@
     </div>
     <div id="map"></div>
 </div>
-
+<script src="lib/jquery.min.js"></script>
+<script src="lib/custom-ol-build.js"></script>
 <script src="js/animate.js"></script>
 
 </body>
diff --git a/test-html/compare-test.html b/test-html/compare-test.html
index 43e18869afae1c7784babfeced5e6945cca933ec..5b02cf12b3d01adebad286b1cda9027540a9b925 100644
--- a/test-html/compare-test.html
+++ b/test-html/compare-test.html
@@ -3,8 +3,8 @@
 <head>
     <meta charset="UTF-8">
     <title>Title</title>
-    <link rel="stylesheet" href="_css/all-ol-style.css">
-    <link rel="stylesheet" href="_css/layer-swipe.css">
+    <link rel="stylesheet" href="css/all-ol-style.css">
+    <link rel="stylesheet" href="css/layer-swipe.css">
     <style>
         body, html{
             height:100%;
@@ -24,6 +24,8 @@
 </head>
 <body>
 <div id="map"></div>
+<script src="lib/jquery.min.js"></script>
+<script src="lib/custom-ol-build.js"></script>
 <script src="js/compare-test.js"></script>
 
 </body>
diff --git a/test-html/here.html b/test-html/here.html
index 6ea6b58cc4af20a823be4e3fe118f88a4711415e..18a3bbf664dd414fcd74f8ae1a1330ffd97d43e7 100644
--- a/test-html/here.html
+++ b/test-html/here.html
@@ -19,7 +19,8 @@
 
 </div>
 
-
+<script src="lib/jquery.min.js"></script>
+<script src="lib/custom-ol-build.js"></script>
 <script src="js/my_little_test.js"></script>
 <script src="js/another.js"></script>
 
diff --git a/test-html/itsMap.html b/test-html/itsMap.html
index be27eba93b2d6bfc8dba520f3abffa4319e7a1a2..b10b1c4189a7adc7b31a4e34d3fc930d35345259 100644
--- a/test-html/itsMap.html
+++ b/test-html/itsMap.html
@@ -36,8 +36,8 @@
     var glob = {};
 </script>
 
-<script src="js/ext/jquery.min.js"></script>
-<script src="js/ext/custom-ol-build.js"></script>
+<script src="lib/jquery.min.js"></script>
+<script src="lib/custom-ol-build.js"></script>
 <script src="js/itsMap.js"></script>
 
 </body>
diff --git a/test-html/js/animate.js b/test-html/js/animate.js
index 542b12ca75c38aa8aea0284744286c871e92fa72..fa243904ab822796f06cc31697c68c051b1558c1 100644
--- a/test-html/js/animate.js
+++ b/test-html/js/animate.js
@@ -1,3 +1,3365 @@
-!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";var n=o(12),r=o(28),a=o(18),i=o(2),l=o(24),s=o(16),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 m=new l.LayerBaseVectorEsri("http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0",{visible:!0,autoLoad:!0,name:"Coordination",useEsriStyle:!0});y.addLayer(m.olLayer);for(var f=[["Cameras","cameras33"],["HAR","HAR33"],["DMS","MessageSigns33"],["Traffic Control","TrafficControl33"],["Traffic Detection","TrafficDetectionMulti"],["Weather","Weather33"]],_=0;_<f.length;_++){var g=new s.LayerEsriMapServer("http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/"+f[_][1]+"/MapServer",{id:f[_][1],name:f[_][0],visible:!0,minZoom:7,zIndex:20,addPopup:!0,legendCollapse:!0});y.addLayer(g.olLayer)}},function(e,t){"use strict";function o(e){"undefined"==typeof window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){var r=o[t[n]];"undefined"==typeof r&&(o[t[n]]={}),o=o[t[n]]}return o}o("util"),window.gv.util.provide=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},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,o="x"==e?t:3&t|8;return o.toString(16)})}var r=o(1),a=r.default("util");a.makeGuid=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";var n=o(11);t.mapPopup=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapPopup},function(e,t,o){"use strict";var n=o(1),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a},function(e,t,o){"use strict";var n=o(10);t.mapMove=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapMove},function(e,t,o){"use strict";var n=o(14),r=o(1),a=o(4),i=o(2),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),"undefined"!=typeof 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="");var t=e.indexOf("<ul>")>-1;t&&(e='<span class="legend-items-expander" title="Expand/Collapse">&#9660;</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("&#9660;")):(e.addClass("legend-layer-group-collapsed"),e.html("&#9654;"))}),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s},function(e,t,o){"use strict";function n(e){return"undefined"==typeof e||null===e}function r(e){return!n(e)}var a=o(1),i=a.default("util.checkDefined");t.undefinedOrNull=n,i.undefinedOrNull=n,t.definedAndNotNull=r,i.definedAndNotNull=r},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),a=o(9),i=o(1),l=o(4),s=o(2),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("undefined"==typeof e&&"undefined"==typeof 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){return void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1?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(t&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))))},t.prototype.addCallback=function(e,t,o,n,r){return this._mapMoveCallbacks.indexOf(e)>-1?void console.log("this function already added to map move"):(this._checkInit(),r||(r=l.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=r,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(n&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))))},t}(r.default);t.MapMoveCls=u,p.MapMoveCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),a=o(1),i=o(3),l=o(2),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._arrPopupLayerNames=[],t._arrPopupLayers=[],t._arrPopupOlLayers=[],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)};return 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">&#9664;</span>',c+='<span class="next-popup ol-popup-nav-arrow">&#9654;</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span>&nbsp;of&nbsp;</span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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=o.map.hasFeatureAtPixel(t,function(e){for(var t=0,n=o._arrPopupOlLayers;t<n.length;t++){var r=n[t];if(e==r)return!0}return!1}),r=o.map.getTargetElement();r.style.cursor=n?"pointer":""}}),!0},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++){var i=a[r];i(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=t._arrPopupOlLayers.indexOf(n);r>-1&&o.push(new p(e,t._arrPopupLayers[r],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._arrPopupLayerNames.push(e.name),this._arrPopupLayers.push(e),this._arrPopupOlLayers.push(e.olLayer),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._arrPopupLayerNames.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupOlLayers.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++){var n=o[t];n()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";function n(e){var t=r.quickMapBase(e);return i.default.init(t),l.default.init(t),t}var r=o(13),a=o(1),i=o(7),l=o(5),s=a.default("olHelpers");t.quickMap=n,s.quickMap=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";function n(e){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;var t=i("#"+e.divId);t.css("position","relative");var o=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 n=new a.geom.Point([e.center.x,e.center.y]);new a.proj.Projection({code:"EPSG:4326"}),n.transform(new a.proj.Projection({code:"EPSG:4326"}),new a.proj.Projection({code:"EPSG:3857"}));var r=n.getCoordinates();e.center.x=r[0],e.center.y=r[1]}var l=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:[o],target:e.divId,controls:l,view:s});return e.fullScreen&&p.addControl(new a.control.FullScreen({})),p}var r=o(1),a=o(3),i=o(2),l=r.default("olHelpers");t.quickMapBase=n,l.quickMapBase=n,Object.defineProperty(t,"__esModule",{value:!0}),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}var a=o(1),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"rgba("+e[0]+","+e[1]+","+e[2]+","+t+")"}function r(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}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,m);break;default:console.log(e),alert(e.geometryType+" not handled")}break;case"uniqueValue":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,m);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">&#9660;</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){var t="",o=e.layers;if(1==o.length)t+=i(o[0],!0);else{t+="<ul>";for(var n=0;n<o.length;n++)t+="<li>"+i(o[n])+"</li>";t+="</ul>"}return t}var s=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},p=o(1),u=o(3),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+'">&#9679;</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),m=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),f=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}(f),g=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,o=e.getProperties(),r=o[n.propertyName];return t=void 0!==n.propertyStyleLookup[r]?[n.propertyStyleLookup[r]]:[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}(f);t.makeFeatureServiceLegendAndSymbol=a,c.makeFeatureServiceLegendAndSymbol=a,t.makeMapServiceLegend=l,c.makeMapServiceLegend=l},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(8),a=o(15),i=o(5),l=o(1),s=o(3),p=o(2),u=l.default("layers"),c=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._source=new s.source.TileArcGISRest({url:""==n.url?void 0:n.url,params:"undefined"==typeof o.showLayers?void 0:{layers:"show:"+o.showLayers.join(",")}}),n._olLayer=new s.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 s.format.EsriJSON,n._popupRequest=null,n.addLegendContent(),o.addPopup&&i.default.addMapServicePopup(n),n}return n(t,e),t.prototype.addLegendContent=function(t){var o=this,n=this.url;"/"!==n[n.length-1]&&(n+="/"),n+="legend?f=pjson&callback=?",p.get(n,{},function(t){var n=a.makeMapServiceLegend(t);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=p.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 l in r.attributes)if(r.attributes.hasOwnProperty(l)){var s=r.attributes[l];if(null==s||"null"==s.toString().toLowerCase())continue;var p=l;p.length>14&&(p=p.slice(0,11)+"..."),a+="<tr><td>"+p+"</td><td>"+s+"</td></tr>"}a+="</table>",i.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}(r.LayerBase);t.LayerEsriMapServer=c,u.LayerEsriMapServer=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},,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]}var r=o(1),a=o(19),i=o(2),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):"undefined"!=typeof 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;var r='<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(r);var l=this._container.find(".media-play");this._$btnStop=this._container.find(".media-stop");var s=this._container.find(".media-ahead"),p=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 u=this;l.click(function(){var e=i(this);e.addClass("media-disabled"),u._$btnStop.removeClass("media-disabled"),s.addClass("media-locked"),p.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);var e=i(this);e.addClass("media-disabled"),l.removeClass("media-disabled"),s.removeClass("media-locked"),p.removeClass("media-locked"),u._$slider.prop("disabled",!1),u._playing=!1}),s.click(function(){u.currentValue=u.currentValue+u._step}),p.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,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),i=parseFloat(this.step);r-o<i&&(o=r);var l=(o-n)/(r-n);"number"==typeof a&&o==a||(a=o,e(o,l,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){return c?void(c=!1):void n.call(this,t,e)}),this}var a,i=o(1),l=i.default("domUtil"),s=!1,p=!1,u=null,c=!1;t.rangeChange=r,l.rangeChange=r},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(8),a=o(7),i=o(1),l=o(3),s=o(2),p=(new l.Map({}),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="undefined"==typeof 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}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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},,,,function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(20),a=o(15),i=o(1),l=o(3),s=o(2),p=i.default("layers"),u=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 l.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 n(t,e),t.prototype.addLegendContent=function(t){var o=this;this._useEsriStyle?s.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=a.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)||(s.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}(r.LayerBaseVector);t.LayerBaseVectorEsri=u,p.LayerBaseVectorEsri=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},,function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(8),a=o(1),i=o(3),l=a.default("layers"),s=function(e){function t(t,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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s},,function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(26),a=o(30),i=o(1),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s},function(e,t,o){"use strict";var n=o(1),r=o(5),a=o(2),i=n.default("mixin"),l=(new Date).getTimezoneOffset(),s=function(){function e(e,t){this.lyr=e,this._products=e._products,t?this.loadCallback=t:this.loadCallback=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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(29),a=o(1),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l}]);
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!*******************************!*\
+  !*** ./dist/_test/animate.js ***!
+  \*******************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var quickMap_1 = __webpack_require__(/*! ../olHelpers/quickMap */ 1);
+	var LayerRealEarthTile_1 = __webpack_require__(/*! ../layers/LayerRealEarthTile */ 13);
+	var media_control_1 = __webpack_require__(/*! ../domUtil/media-control */ 19);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	var LayerBaseVectorEsri_1 = __webpack_require__(/*! ../layers/LayerBaseVectorEsri */ 21);
+	var LayerEsriMapServer_1 = __webpack_require__(/*! ../layers/LayerEsriMapServer */ 24);
+	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('http://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);
+	}
+
+
+/***/ },
+/* 1 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/quickMap.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var quickMapBase_1 = __webpack_require__(/*! ./quickMapBase */ 2);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var mapMove_1 = __webpack_require__(/*! ./mapMove */ 6);
+	var mapPopup_1 = __webpack_require__(/*! ./mapPopup */ 11);
+	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) {
+	    var m = quickMapBase_1.quickMapBase(options);
+	    mapMove_1.default.init(m);
+	    mapPopup_1.default.init(m);
+	    return m;
+	}
+	exports.quickMap = quickMap;
+	nm.quickMap = quickMap;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMap;
+
+
+/***/ },
+/* 2 */
+/*!****************************************!*\
+  !*** ./dist/olHelpers/quickMapBase.js ***!
+  \****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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) {
+	    options = 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;
+	    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/cVVzkyGaIWTIR9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Umt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+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+2k6lIHjKT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O0BuX3bCfItl0PEwvYLqpwXG2MHlGsQ4S8pMJZv1JGmHiEoHQDdOjwmVlEP/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) {
+	    }
+	    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({}));
+	    }
+	    return map;
+	}
+	exports.quickMapBase = quickMapBase;
+	nm.quickMapBase = quickMapBase;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMapBase;
+
+
+/***/ },
+/* 3 */
+/*!******************************!*\
+  !*** ./dist/util/provide.js ***!
+  \******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = provide;
+
+
+/***/ },
+/* 4 */
+/*!*********************!*\
+  !*** external "ol" ***!
+  \*********************/
+/***/ function(module, exports) {
+
+	module.exports = ol;
+
+/***/ },
+/* 5 */
+/*!********************!*\
+  !*** external "$" ***!
+  \********************/
+/***/ function(module, exports) {
+
+	module.exports = $;
+
+/***/ },
+/* 6 */
+/*!***********************************!*\
+  !*** ./dist/olHelpers/mapMove.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapMoveCls_1 = __webpack_require__(/*! ./mapMoveCls */ 7);
+	/**
+	 * The single map move object catch is that it is common to multimap pages
+	 * @type {MapMoveCls}
+	 */
+	exports.mapMove = new mapMoveCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapMove;
+
+
+/***/ },
+/* 7 */
+/*!**************************************!*\
+  !*** ./dist/olHelpers/mapMoveCls.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var checkDefined = __webpack_require__(/*! ../util/checkDefined */ 9);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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] = functionId;
+	        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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapMoveCls;
+
+
+/***/ },
+/* 8 */
+/*!**********************************************!*\
+  !*** ./dist/olHelpers/mapInteractionBase.js ***!
+  \**********************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 12/8/2015.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapInteractionBase;
+
+
+/***/ },
+/* 9 */
+/*!***********************************!*\
+  !*** ./dist/util/checkDefined.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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 */
+/*!*******************************!*\
+  !*** ./dist/util/makeGuid.js ***!
+  \*******************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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);
+	    });
+	}
+	nm.makeGuid = makeGuid;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = makeGuid;
+
+
+/***/ },
+/* 11 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/mapPopup.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapPopupCls_1 = __webpack_require__(/*! ./mapPopupCls */ 12);
+	/**
+	 * The single popup object catch is that it is common to multimap pages
+	 * @type {MapPopupCls}
+	 */
+	exports.mapPopup = new mapPopupCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapPopup;
+
+
+/***/ },
+/* 12 */
+/*!***************************************!*\
+  !*** ./dist/olHelpers/mapPopupCls.js ***!
+  \***************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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
+	     * &param feature the openlayers vector feature
+	     * $param
+	     */
+	    /**
+	     * map popup constructor
+	     */
+	    function MapPopupCls() {
+	        var _this = _super.call(this, 'map popup') || this;
+	        _this._arrPopupLayerIds = [];
+	        _this._arrPopupLayerNames = [];
+	        _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) {
+	                }
+	                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">&#9664;</span>';
+	            popupHtml += '<span class="next-popup ol-popup-nav-arrow">&#9654;</span>';
+	            popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>";
+	            popupHtml += "<span>&nbsp;of&nbsp;</span>";
+	            popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>";
+	            popupHtml += "<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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 = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {
+	                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {
+	                    var olLayer = _a[_i];
+	                    if (lyrCandidate == olLayer) {
+	                        return true;
+	                    }
+	                }
+	                return false;
+	            });
+	            var mapElement = _this.map.getTargetElement();
+	            mapElement.style.cursor = hit ? 'pointer' : '';
+	        });
+	        return true;
+	    };
+	    /**
+	     * 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 lyrIndex = _this._arrPopupOlLayers.indexOf(layer);
+	            if (lyrIndex > -1) {
+	                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));
+	            }
+	        });
+	        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._arrPopupLayerNames.push(lyr.name);
+	        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._arrPopupLayerNames.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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapPopupCls;
+
+
+/***/ },
+/* 13 */
+/*!*******************************************!*\
+  !*** ./dist/layers/LayerRealEarthTile.js ***!
+  \*******************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/4/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var LayerBaseXyzTile_1 = __webpack_require__(/*! ./LayerBaseXyzTile */ 14);
+	var RealEarthAnimateTile_1 = __webpack_require__(/*! ../mixin/RealEarthAnimateTile */ 17);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerRealEarthTile;
+
+
+/***/ },
+/* 14 */
+/*!*****************************************!*\
+  !*** ./dist/layers/LayerBaseXyzTile.js ***!
+  \*****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 12/4/2015.
+	 */
+	var LayerBase_1 = __webpack_require__(/*! ./LayerBase */ 15);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	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) {
+	        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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBaseXyzTile;
+
+
+/***/ },
+/* 15 */
+/*!**********************************!*\
+  !*** ./dist/layers/LayerBase.js ***!
+  \**********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var zoomResolutionConvert = __webpack_require__(/*! ../olHelpers/zoomResolutionConvert */ 16);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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">&#9660;</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('&#9660;');
+	                    }
+	                    else {
+	                        $this.addClass('legend-layer-group-collapsed');
+	                        $this.html('&#9654;');
+	                    }
+	                });
+	                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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBase;
+
+
+/***/ },
+/* 16 */
+/*!*************************************************!*\
+  !*** ./dist/olHelpers/zoomResolutionConvert.js ***!
+  \*************************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/14/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+
+
+/***/ },
+/* 17 */
+/*!********************************************!*\
+  !*** ./dist/mixin/RealEarthAnimateTile.js ***!
+  \********************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 12/4/2015.
+	 */
+	var RealEarthAnimate_1 = __webpack_require__(/*! ./RealEarthAnimate */ 18);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = RealEarthAnimateTile;
+
+
+/***/ },
+/* 18 */
+/*!****************************************!*\
+  !*** ./dist/mixin/RealEarthAnimate.js ***!
+  \****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 12/4/2015.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var mapPopup_1 = __webpack_require__(/*! ../olHelpers/mapPopup */ 11);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = RealEarthAnimate;
+
+
+/***/ },
+/* 19 */
+/*!***************************************!*\
+  !*** ./dist/domUtil/media-control.js ***!
+  \***************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/2/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var range_change_1 = __webpack_require__(/*! ./range-change */ 20);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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;
+
+
+/***/ },
+/* 20 */
+/*!**************************************!*\
+  !*** ./dist/domUtil/range-change.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+
+
+/***/ },
+/* 21 */
+/*!********************************************!*\
+  !*** ./dist/layers/LayerBaseVectorEsri.js ***!
+  \********************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/2/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var LayerBaseVector_1 = __webpack_require__(/*! ./LayerBaseVector */ 22);
+	var esriToOl = __webpack_require__(/*! ../olHelpers/esriToOlStyle */ 23);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	var nm = provide_1.default('layers');
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBaseVectorEsri;
+
+
+/***/ },
+/* 22 */
+/*!****************************************!*\
+  !*** ./dist/layers/LayerBaseVector.js ***!
+  \****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var LayerBase_1 = __webpack_require__(/*! ./LayerBase */ 15);
+	var mapMove_1 = __webpack_require__(/*! ../olHelpers/mapMove */ 6);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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" });
+	        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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBaseVector;
+
+
+/***/ },
+/* 23 */
+/*!*****************************************!*\
+  !*** ./dist/olHelpers/esriToOlStyle.js ***!
+  \*****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 1/4/2016.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var nm = provide_1.default('olHelpers.esriToOlStyle');
+	/**
+	 * This callback is displayed as part of the Requester class.
+	 * @callback styleFunc
+	 * @param {ol.Feature} feat - openlayers feature
+	 * @param {number} resolution - map resolution
+	 */
+	/**
+	 *
+	 * @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, '&amp;')
+	        .replace(/"/g, '&quot;')
+	        .replace(/'/g, '&#39;')
+	        .replace(/</g, '&lt;')
+	        .replace(/>/g, '&gt;');
+	}
+	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 + "\">&#9679;</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];
+	            var returnValue;
+	            if (_this.propertyStyleLookup[checkProperty] !== undefined) {
+	                returnValue = [_this.propertyStyleLookup[checkProperty]];
+	            }
+	            else {
+	                returnValue = [_this.defaultStyle];
+	            }
+	            return returnValue;
+	        };
+	        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));
+	/**
+	 * style and legend object
+	 * @typedef {object} styleAndLegend
+	 * @property {styleFunc} style - style function
+	 * @property {string} legend - legend content
+	 */
+	/**
+	 *
+	 * @param {object} esriResponse - layer info
+	 * @returns {styleAndLegend} style and legend object
+	 */
+	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">&#9660;</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
+	 * @returns {string} legend content
+	 */
+	function makeMapServiceLegend(esriResponse) {
+	    "use strict";
+	    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++) {
+	            newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';
+	        }
+	        newLegendHtml += '</ul>';
+	    }
+	    return newLegendHtml;
+	}
+	exports.makeMapServiceLegend = makeMapServiceLegend;
+	nm.makeMapServiceLegend = makeMapServiceLegend;
+
+
+/***/ },
+/* 24 */
+/*!*******************************************!*\
+  !*** ./dist/layers/LayerEsriMapServer.js ***!
+  \*******************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 12/7/2015.
+	 */
+	var LayerBase_1 = __webpack_require__(/*! ./LayerBase */ 15);
+	var esriToOl = __webpack_require__(/*! ../olHelpers/esriToOlStyle */ 23);
+	var mapPopup_1 = __webpack_require__(/*! ../olHelpers/mapPopup */ 11);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	var nm = provide_1.default('layers');
+	/**
+	 * 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._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;
+	        _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);
+	            _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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerEsriMapServer;
+
+
+/***/ }
+/******/ ]);
 //# sourceMappingURL=animate.js.map
\ No newline at end of file
diff --git a/test-html/js/animate.js.map b/test-html/js/animate.js.map
index 1f64aabf2f9fa3ae6d5d3c35f0d9cc42594246d0..a67b855b9591757d0671ae322ddabff4ffedcddb 100644
--- a/test-html/js/animate.js.map
+++ b/test-html/js/animate.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///animate.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f","webpack:///./src/_test/animate.ts","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/mapMove.ts","webpack:///./src/layers/LayerBase.ts","webpack:///./src/util/checkDefined.ts","webpack:///./src/olHelpers/mapMoveCls.ts","webpack:///./src/olHelpers/mapPopupCls.ts","webpack:///./src/olHelpers/quickMap.ts","webpack:///./src/olHelpers/quickMapBase.ts","webpack:///./src/olHelpers/zoomResolutionConvert.ts","webpack:///./src/olHelpers/esriToOlStyle.ts","webpack:///./src/layers/LayerEsriMapServer.ts","webpack:///./src/domUtil/media-control.ts","webpack:///./src/domUtil/range-change.ts","webpack:///./src/layers/LayerBaseVector.ts","webpack:///./src/layers/LayerBaseVectorEsri.ts","webpack:///./src/layers/LayerBaseXyzTile.ts","webpack:///./src/layers/LayerRealEarthTile.ts","webpack:///./src/mixin/RealEarthAnimate.ts","webpack:///./src/mixin/RealEarthAnimateTile.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","quickMap_1","LayerRealEarthTile_1","media_control_1","$","LayerBaseVectorEsri_1","LayerEsriMapServer_1","nexrhresStatic","default","products","opacity","animate","name","timeLoadCallback","f","console","log","d","Date","endTime","getTime","setHours","getHours","startTime","rangeStep","Math","round","map","MediaControl","v","setLayerTime","min","max","val","step","playInterval","showAsDate","quickMap","addLayer","olLayer","coordinationLayer","LayerBaseVectorEsri","visible","autoLoad","useEsriStyle","oakRidgeLayers","i","length","oakRidgeLayer","LayerEsriMapServer","minZoom","zIndex","addPopup","legendCollapse","provide","namespace","window","parts","split","nameSpace","newObject","util","Object","defineProperty","value","ol","makeGuid","replace","r","random","toString","provide_1","nm","mapPopupCls_1","mapPopup","MapInteractionBase","subtype","this","_map","_initialized","_subtype","prototype","init","theMap","get","enumerable","configurable","_checkInit","initialized","msg","alert","checkInit","mapMoveCls_1","mapMove","zoomResolutionConvert","makeGuid_1","LayerBase","url","options","_url","_params","params","_legendCollapse","_legendCheckbox","legendCheckbox","_name","_opacity","_visible","_source","undefined","_olLayer","_loaded","_maxResolution","zoomToResolution","_minResolution","maxZoom","_minZoom","_maxZoom","_zIndex","loadCallback","_legendContent","_$legendDiv","_applyCollapseCalled","_addLegendContent","legendContent","_load","getLegendDiv","additionalContent","addCollapse","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","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","undefinedOrNull","input","definedAndNotNull","__extends","b","__","constructor","hasOwnProperty","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_this","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","getView","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","clear","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","addVectorLayer","triggerOnAdd","push","addCallback","func","context","delay","FeatureLayerProperties","feature","layer","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayerNames","_arrPopupLayers","_arrPopupOlLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","n","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","addOverlay","evt","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","l","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","addFeature","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","hasFeatureAtPixel","lyrCandidate","mapElement","getTargetElement","style","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","forEachFeatureAtPixel","lyrIndex","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","color","width","theStyle","olStyle","Style","stroke","Stroke","image","Circle","radius","fill","Fill","Vector","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","quickMapBase_1","quickMapBase","mapMove_1","mapPopup_1","divId","center","x","y","zoom","baseSwitcher","fullScreen","$mapDiv","css","osmLayer","Tile","OSM","geom","Point","proj","Projection","code","transform","coordinates","getCoordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","_colorArrayToRgba","colorArray","htmlEscape","str","String","makeFeatureServiceLegendAndSymbol","esriResponse","renderer","drawingInfo","symbolLegendOut","SingleSymbol","PointSymbol","LineSymbol","PolygonSymbol","UniqueValueSymbol","legend","legendHtml","mapServiceLegendItem","lyrObject","skipLayerNameAndExpander","legendItems","makeMapServiceLegend","newLegendHtml","CommonSymbol","symbolObj","innerColor","outerColor","outline","outlineWidth","size","Icon","src","lineWidth","SymbolGenerator","SymbolClass","symbol","uniqueValueInfos","propertyName","defaultSymbol","defaultStyle","defaultLabelHtml","valueArray","labelArray","legendArray","propertyStyleLookup","uniqueVal","uniqueSym","returnValue","checkProperties","checkProperty","_b","_c","h","LayerBase_1","esriToOl","TileArcGISRest","showLayers","minResolution","maxResolution","_esriFormat","format","EsriJSON","_popupRequest","urlCopy","newHtml","a","attrVal","toLowerCase","attr","slice","readFeature","timeToLocalDateString","tm","p1","toLocaleTimeString","p2","toLocaleDateString","range_change_1","changeFunc","mediaConfig","_container","_playInterval","_changeFunc","_showAsDate","_currentValue","_min","_max","_step","_playing","htmlStr","btnPlay","_$btnStop","btnAhead","btnBack","_$slider","_$valLabelMin","_$valLabelVal","_$valLabelMax","setMinMaxValueStep","rangeChange","currentValue","___this","prop","_interval","setInterval","clearInterval","stopPlaying","newValue","newMin","newMax","newStep","newFunc","triggerCallback","callback","parseFloat","percent","lastVal","$slider","changeTimeout","mouseenter","mouseIn","mouseleave","mouseDown","mousedown","mouseup","mousemove","dragged","timeout","keyup","keyCode","change","LayerBaseVector","trim","_style","_autoLoad","_onDemand","onDemand","_onDemandDelay","mapMoveObj","_mapMove","_mapMoveMakeGetParams","_mapMoveParams","renderOrder","_projectionMap","_projection4326","addFeatures","featureCollection","evtType","extent","extend","setStyle","mapProj","getFeatures","LayerBaseVector_1","where","outFields","outSR","_outSR","_urlCopy","_useEsriStyle","newStyleAndLegend","feats","readFeatures","LayerBaseXyzTile","XYZ","LayerBaseXyzTile_1","RealEarthAnimateTile_1","LayerRealEarthTile","_products","animator","timeInit","theTime","offsetMinutes","getTimezoneOffset","RealEarthAnimate","_rawDateStrings","_localDates","localTimes","_animateEnabled","_currentTime","_currentIndex","_loadDates","_loadLatest","inString","yr","month","hr","mn","sec","rawDateStr","dteStr","newDte","setMinutes","getMinutes","newIndex","RealEarthAnimate_1","RealEarthAnimateTile","_sourceUrls","rawDte","dteProductUrl","setUrl","getZIndex"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAA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AAuBA,E1B4pGzB5gB,OAAOC,eAAetE,EAAS,cAAgBuE,OAAO,I0B3pGvDvE,EAAAe,QAAekkB","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar quickMap_1 = __webpack_require__(12);\r\n\tvar LayerRealEarthTile_1 = __webpack_require__(28);\r\n\tvar media_control_1 = __webpack_require__(18);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar LayerBaseVectorEsri_1 = __webpack_require__(24);\r\n\tvar LayerEsriMapServer_1 = __webpack_require__(16);\r\n\tvar nexrhresStatic = new LayerRealEarthTile_1.default({\r\n\t    products: 'nexrhres',\r\n\t    id: 'nexrhres-static',\r\n\t    opacity: 0.6,\r\n\t    animate: true,\r\n\t    name: 'Hybrid Reflectivity',\r\n\t    // maxZoom: 10,\r\n\t    timeLoadCallback: function (f) {\r\n\t        console.log(f);\r\n\t    }\r\n\t});\r\n\tvar d = new Date();\r\n\tvar endTime = d.getTime();\r\n\td.setHours(d.getHours() - 4);\r\n\tvar startTime = d.getTime();\r\n\tvar rangeStep = Math.round((endTime - startTime) / 8);\r\n\tvar media = new media_control_1.MediaControl($('#control'), function (v) {\r\n\t    nexrhresStatic.setLayerTime(v);\r\n\t}, {\r\n\t    min: startTime,\r\n\t    max: endTime,\r\n\t    val: endTime,\r\n\t    step: rangeStep,\r\n\t    playInterval: 750,\r\n\t    showAsDate: true\r\n\t});\r\n\tvar map = quickMap_1.quickMap();\r\n\tmap.addLayer(nexrhresStatic.olLayer);\r\n\tvar coordinationLayer = new LayerBaseVectorEsri_1.LayerBaseVectorEsri('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/GLRTOC/GlrtocCoordination/MapServer/0', {\r\n\t    visible: true,\r\n\t    autoLoad: true,\r\n\t    name: 'Coordination',\r\n\t    useEsriStyle: true\r\n\t});\r\n\tmap.addLayer(coordinationLayer.olLayer);\r\n\tvar oakRidgeLayers = [\r\n\t    ['Cameras', 'cameras33'],\r\n\t    ['HAR', 'HAR33'],\r\n\t    ['DMS', 'MessageSigns33'],\r\n\t    //['State Summary', 'statesummary'],\r\n\t    ['Traffic Control', 'TrafficControl33'],\r\n\t    ['Traffic Detection', 'TrafficDetectionMulti'],\r\n\t    ['Weather', 'Weather33']\r\n\t];\r\n\tfor (var i = 0; i < oakRidgeLayers.length; i++) {\r\n\t    var oakRidgeLayer = new LayerEsriMapServer_1.LayerEsriMapServer(\"http://itsdpro.ornl.gov/arcgis/rest/services/ITSPublic/\" + oakRidgeLayers[i][1] + \"/MapServer\", {\r\n\t        id: oakRidgeLayers[i][1],\r\n\t        name: oakRidgeLayers[i][0],\r\n\t        visible: true,\r\n\t        minZoom: 7,\r\n\t        zIndex: 20,\r\n\t        addPopup: true,\r\n\t        legendCollapse: true\r\n\t    });\r\n\t    map.addLayer(oakRidgeLayer.olLayer);\r\n\t}\r\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\t/**\r\n\t * create a namespace on the gv object\r\n\t * @param {string} namespace to create\r\n\t * @returns {object} object representing the namespace\r\n\t */\r\n\tfunction provide(namespace) {\r\n\t    \"use strict\";\r\n\t    if (typeof window['gv'] == 'undefined') {\r\n\t        window['gv'] = {};\r\n\t    }\r\n\t    var parts = namespace.split('.');\r\n\t    var nameSpace = window['gv'];\r\n\t    for (var i = 0; i < parts.length; i++) {\r\n\t        var newObject = nameSpace[parts[i]];\r\n\t        if (typeof newObject == 'undefined') {\r\n\t            nameSpace[parts[i]] = {};\r\n\t        }\r\n\t        nameSpace = nameSpace[parts[i]];\r\n\t    }\r\n\t    return nameSpace;\r\n\t}\r\n\tprovide('util');\r\n\twindow['gv'].util.provide = provide;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = provide;\r\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = $;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = ol;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util');\r\n\t/**\r\n\t * guids are used to uniquely identify groups and features\r\n\t * @returns {string} a new guid\r\n\t */\r\n\tfunction makeGuid() {\r\n\t    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n\t        .replace(/[xy]/g, function (c) {\r\n\t        var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\t        return v.toString(16);\r\n\t    });\r\n\t}\r\n\tnm.makeGuid = makeGuid;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = makeGuid;\r\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapPopupCls_1 = __webpack_require__(11);\r\n\t/**\r\n\t * The single popup object catch is that it is common to multimap pages\r\n\t * @type {MapPopupCls}\r\n\t */\r\n\texports.mapPopup = new mapPopupCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapPopup;\r\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 12/8/2015.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * base interaction\r\n\t */\r\n\tvar MapInteractionBase = (function () {\r\n\t    /**\r\n\t     * map interaction base\r\n\t     * @param subtype - the interaction subtype\r\n\t     */\r\n\t    function MapInteractionBase(subtype) {\r\n\t        this._map = null;\r\n\t        this._initialized = false;\r\n\t        this._subtype = subtype;\r\n\t    }\r\n\t    /**\r\n\t     * base initializer, returns true for already initialized\r\n\t     * @param theMap - the ol Map\r\n\t     * @returns true for already initialized\r\n\t     */\r\n\t    MapInteractionBase.prototype.init = function (theMap) {\r\n\t        if (!this._initialized) {\r\n\t            this._map = theMap;\r\n\t            this._initialized = true;\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n\t        /**\r\n\t         * get reference to the ol map object\r\n\t         * @returns {ol.Map} the map object\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._map;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n\t        /**\r\n\t         * get if is initialized\r\n\t         * @returns {boolean} is initialized\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._initialized;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     * @protected\r\n\t     */\r\n\t    MapInteractionBase.prototype._checkInit = function () {\r\n\t        if (!this.initialized) {\r\n\t            var msg = this._subtype + \" object not initialized\";\r\n\t            alert(msg);\r\n\t            console.log(msg);\r\n\t            throw msg;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     */\r\n\t    MapInteractionBase.prototype.checkInit = function () {\r\n\t        this._checkInit();\r\n\t    };\r\n\t    return MapInteractionBase;\r\n\t}());\r\n\texports.MapInteractionBase = MapInteractionBase;\r\n\tnm.MapInteractionBase = MapInteractionBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapInteractionBase;\r\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapMoveCls_1 = __webpack_require__(10);\r\n\t/**\r\n\t * The single map move object catch is that it is common to multimap pages\r\n\t * @type {MapMoveCls}\r\n\t */\r\n\texports.mapMove = new mapMoveCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapMove;\r\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar zoomResolutionConvert = __webpack_require__(14);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * The base layer class\r\n\t * @abstract\r\n\t */\r\n\tvar LayerBase = (function () {\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {string} url - url for source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id=makeGuid()] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] - the z index for the layer\r\n\t     * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n\t     */\r\n\t    function LayerBase(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        options = options || {};\r\n\t        if (typeof url !== 'string') {\r\n\t            throw 'Invalid URL';\r\n\t        }\r\n\t        this._url = url;\r\n\t        this._params = typeof options.params == 'object' ? options.params : {};\r\n\t        this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n\t        this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\t        this.id = options.id || makeGuid_1.default();\r\n\t        this._name = options.name || 'Unnamed Layer';\r\n\t        this.animate = false;\r\n\t        this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\t        if (this._opacity > 1) {\r\n\t            this._opacity = 1;\r\n\t        }\r\n\t        else if (this._opacity < 0) {\r\n\t            this._opacity = 0;\r\n\t        }\r\n\t        this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\t        this._source = undefined;\r\n\t        /**\r\n\t         *\r\n\t         * @protected\r\n\t         */\r\n\t        this._olLayer = undefined;\r\n\t        this._loaded = false;\r\n\t        this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n\t        if (typeof this._maxResolution !== 'undefined') {\r\n\t            this._maxResolution += 0.00001;\r\n\t        }\r\n\t        this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\t        this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n\t        this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n\t        this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\t        this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n\t        };\r\n\t        this._legendContent = '';\r\n\t        if (this._legendCheckbox) {\r\n\t            this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n\t                (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n\t            this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        else {\r\n\t            this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        this._$legendDiv = null;\r\n\t        this._applyCollapseCalled = false;\r\n\t        this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n\t    }\r\n\t    /**\r\n\t     * base load function, sets _loaded = true if it is not already\r\n\t     * @protected\r\n\t     * @returns {boolean} if already loaded\r\n\t     */\r\n\t    LayerBase.prototype._load = function () {\r\n\t        if (this.loaded == true) {\r\n\t            return true;\r\n\t        }\r\n\t        else {\r\n\t            this._loaded = true;\r\n\t            return false;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Get the legend html, be sure to only add to the DOM once\r\n\t     * @returns {string} html for layer wrapped in a div\r\n\t     */\r\n\t    LayerBase.prototype.getLegendDiv = function () {\r\n\t        return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param additionalContent - additional content to add to legend\r\n\t     * @private\r\n\t     */\r\n\t    LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n\t        if (additionalContent === void 0) { additionalContent = ''; }\r\n\t        var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\t        if (addCollapse) {\r\n\t            additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">&#9660;</span>' + additionalContent;\r\n\t        }\r\n\t        this._legendContent += additionalContent;\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            this._$legendDiv.append(additionalContent);\r\n\t            this.applyCollapse();\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=] - additonal content to add\r\n\t     */\r\n\t    LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n\t        this._addLegendContent(additionalContent);\r\n\t    };\r\n\t    LayerBase.prototype.applyCollapse = function () {\r\n\t        if (this._applyCollapseCalled) {\r\n\t            console.log('collapse already applied');\r\n\t            return undefined;\r\n\t        }\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            var $expander = this._$legendDiv.find('.legend-items-expander');\r\n\t            if ($expander.length > 0) {\r\n\t                this._applyCollapseCalled = true;\r\n\t                $expander.click(function () {\r\n\t                    var $this = $(this);\r\n\t                    $this.siblings('ul').slideToggle();\r\n\t                    if ($this.hasClass('legend-layer-group-collapsed')) {\r\n\t                        $this.removeClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9660;');\r\n\t                    }\r\n\t                    else {\r\n\t                        $this.addClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9654;');\r\n\t                    }\r\n\t                });\r\n\t                if (this._legendCollapse) {\r\n\t                    $expander.trigger('click');\r\n\t                }\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * trick to refresh the layer\r\n\t     */\r\n\t    LayerBase.prototype.refresh = function () {\r\n\t        if (this.source) {\r\n\t            this.source.refresh();\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"id\", {\r\n\t        get: function () {\r\n\t            return this._id;\r\n\t        },\r\n\t        set: function (newId) {\r\n\t            this._id = newId;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n\t        get: function () {\r\n\t            return this._animate;\r\n\t        },\r\n\t        set: function (animate) {\r\n\t            this._animate = animate;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n\t        /**\r\n\t         * get the legend content\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._legendContent;\r\n\t        },\r\n\t        /**\r\n\t         * set the legend content directly\r\n\t         * @param {string} newVal - new content\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newVal) {\r\n\t            this._legendContent = newVal;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"params\", {\r\n\t        /**\r\n\t         * get the map get params\r\n\t         * @type {object}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._params;\r\n\t        },\r\n\t        /**\r\n\t         * set the map get params\r\n\t         * @param {object} newParams - new get params\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newParams) {\r\n\t            this._params = newParams;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n\t        /**\r\n\t         * get the minimum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n\t        /**\r\n\t         * get the maximum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n\t        /**\r\n\t         * get min zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n\t        /**\r\n\t         * get max zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"url\", {\r\n\t        /**\r\n\t         * get the url\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._url;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n\t        /**\r\n\t         * Get the layer visibility\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._visible;\r\n\t        },\r\n\t        /**\r\n\t         * set the visibility\r\n\t         * @param visibility\r\n\t         */\r\n\t        set: function (visibility) {\r\n\t            this.setVisible(visibility);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setVisible = function (visibility) {\r\n\t        this._visible = visibility;\r\n\t        if (this.olLayer) {\r\n\t            this.olLayer.setVisible(this._visible);\r\n\t            if (visibility && !this._loaded) {\r\n\t                this._load();\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n\t        /**\r\n\t         * Get the layer opacity\r\n\t         * @type {number}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._opacity;\r\n\t        },\r\n\t        /**\r\n\t         * Set the layer opacity\r\n\t         * @param {number} opacity - layer opacity\r\n\t         */\r\n\t        set: function (opacity) {\r\n\t            this._opacity = opacity;\r\n\t            if (this.olLayer) {\r\n\t                this.olLayer.setOpacity(this._opacity);\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"name\", {\r\n\t        /**\r\n\t         * Get the layer name\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._name;\r\n\t        },\r\n\t        /**\r\n\t         * set the layer name\r\n\t         * @param {string} newName - the new name\r\n\t         */\r\n\t        set: function (newName) {\r\n\t            this._name = newName;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n\t        /**\r\n\t         * Check if the layer is loaded\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._loaded;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"source\", {\r\n\t        /**\r\n\t         * get the layer source\r\n\t         * @type {*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getSource();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getSource = function () {\r\n\t        return this._source;\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n\t        /**\r\n\t         * get the z index\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._zIndex;\r\n\t        },\r\n\t        /**\r\n\t         * set the z index\r\n\t         */\r\n\t        set: function (newZ) {\r\n\t            this._zIndex = newZ;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setZIndex = function (newZ) {\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         * the the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getOlLayer();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getOlLayer = function () {\r\n\t        return this._olLayer;\r\n\t    };\r\n\t    return LayerBase;\r\n\t}());\r\n\texports.LayerBase = LayerBase;\r\n\tnm.LayerBase = LayerBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBase;\r\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util.checkDefined');\r\n\t/**\r\n\t * check if the input is undefined or null\r\n\t * @param input - input pointer\r\n\t * @returns true undefined or null\r\n\t */\r\n\tfunction undefinedOrNull(input) {\r\n\t    \"use strict\";\r\n\t    return (typeof input === 'undefined' || input === null);\r\n\t}\r\n\texports.undefinedOrNull = undefinedOrNull;\r\n\tnm.undefinedOrNull = undefinedOrNull;\r\n\t/**\r\n\t * check if the input is defined and not null\r\n\t * @param input - input pointer\r\n\t * @returns true defined and not null\r\n\t */\r\n\tfunction definedAndNotNull(input) {\r\n\t    \"use strict\";\r\n\t    return !(undefinedOrNull(input));\r\n\t}\r\n\texports.definedAndNotNull = definedAndNotNull;\r\n\tnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar checkDefined = __webpack_require__(9);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * assists with map move interactions, trigger callback functions\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapMoveCls = (function (_super) {\r\n\t    __extends(MapMoveCls, _super);\r\n\t    /**\r\n\t     * constructor called implicitly\r\n\t     */\r\n\t    function MapMoveCls() {\r\n\t        var _this = _super.call(this, 'map move') || this;\r\n\t        _this._arrLyrRequest = [];\r\n\t        _this._arrLyrTimeout = [];\r\n\t        _this._arrLayer = [];\r\n\t        _this._lookupLayer = {};\r\n\t        _this._mapMoveCallbacks = [];\r\n\t        _this._mapMoveCallbacksLookup = {};\r\n\t        _this._mapMoveCallbackDelays = [];\r\n\t        _this._mapMoveCallbackContext = [];\r\n\t        _this._mapMoveCallbackTimeout = [];\r\n\t        _this._mapExtent = undefined;\r\n\t        _this._zoomLevel = undefined;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * initialize the map move object\r\n\t     * @param theMap - the ol map\r\n\t     */\r\n\t    MapMoveCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n\t            _this._updateMapExtent();\r\n\t            // trigger the layer updates\r\n\t            for (var i = 0; i < _this._arrLayer.length; i++) {\r\n\t                _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n\t            }\r\n\t            // trigger the map callbacks\r\n\t            for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n\t                _this.triggerMoveCallback(i, e.type);\r\n\t            }\r\n\t        });\r\n\t    };\r\n\t    MapMoveCls.prototype._updateMapExtent = function () {\r\n\t        var theView = this.map.getView();\r\n\t        this._zoomLevel = theView.getZoom();\r\n\t        var extentArray = theView.calculateExtent(this.map.getSize());\r\n\t        this._mapExtent = {\r\n\t            minX: extentArray[0],\r\n\t            minY: extentArray[1],\r\n\t            maxX: extentArray[2],\r\n\t            maxY: extentArray[3]\r\n\t        };\r\n\t    };\r\n\t    Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n\t        /**\r\n\t         * return the map extent\r\n\t         */\r\n\t        get: function () {\r\n\t            if (!this._mapExtent) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            return this._mapExtent;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Trigger the layer load\r\n\t     * @param lyr the layer being acted on\r\n\t     * @param index index of the layer\r\n\t     * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n\t        if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            throw 'need to define lyr or index';\r\n\t        }\r\n\t        else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            index = this._arrLayer.indexOf(lyr);\r\n\t        }\r\n\t        else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n\t            lyr = this._arrLayer[index];\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._arrLyrTimeout[index] != null) {\r\n\t            clearTimeout(this._arrLyrTimeout[index]);\r\n\t            this._arrLyrTimeout[index] = null;\r\n\t        }\r\n\t        // abort if necessary and clear the request\r\n\t        if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n\t            this._arrLyrRequest[index].abort();\r\n\t            this._arrLyrRequest[index] = null;\r\n\t        }\r\n\t        // dummy callback used if before load returns false\r\n\t        var callbackFunc = function () { };\r\n\t        if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n\t            lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\t            var __this_1 = this;\r\n\t            callbackFunc = function () {\r\n\t                function innerFunction(theLayer, theIndex) {\r\n\t                    var _innerThis = this;\r\n\t                    this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n\t                        /**\r\n\t                         * @type {LayerBaseVector}\r\n\t                         */\r\n\t                        theLayer.mapMoveCallback(d);\r\n\t                        theLayer.loadCallback();\r\n\t                    }, 'json').fail(function (jqXHR) {\r\n\t                        if (jqXHR.statusText != 'abort') {\r\n\t                            console.log('failed');\r\n\t                            console.log(theLayer.url);\r\n\t                            console.log(theLayer.mapMoveParams);\r\n\t                        }\r\n\t                    }).always(function () {\r\n\t                        _innerThis._arrLyrTimeout[theIndex] = null;\r\n\t                        _innerThis._arrLyrRequest[theIndex] = null;\r\n\t                    });\r\n\t                }\r\n\t                innerFunction.call(__this_1, lyr, index);\r\n\t            };\r\n\t        }\r\n\t        else {\r\n\t            lyr.clear();\r\n\t        }\r\n\t        this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n\t    };\r\n\t    /**\r\n\t     * trigger the map move call back at the given index\r\n\t     * @param ind - the index of the layer\r\n\t     * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n\t     * @param functionId=undefined the function id used to reference the added callback function\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n\t        if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n\t            throw 'either the function index or the id must be defined';\r\n\t        }\r\n\t        if (typeof ind !== 'number') {\r\n\t            ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n\t        }\r\n\t        if (ind < 0) {\r\n\t            console.log('function not found');\r\n\t            return;\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._mapMoveCallbackTimeout[ind] != null) {\r\n\t            clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n\t            this._mapMoveCallbackTimeout[ind] = null;\r\n\t        }\r\n\t        var ctx = this._mapMoveCallbackContext[ind];\r\n\t        var theFunc = this._mapMoveCallbacks[ind];\r\n\t        var __this = this;\r\n\t        var f = function () {\r\n\t            if (ctx !== null) {\r\n\t                theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t            else {\r\n\t                theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t        };\r\n\t        this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n\t    };\r\n\t    /**\r\n\t     * Add a layer to the interaction\r\n\t     * @param  lyr - layer to add\r\n\t     * @param triggerOnAdd - if the layer should be loaded on add\r\n\t     */\r\n\t    MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n\t        if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n\t        if (this._arrLayer.indexOf(lyr) > -1) {\r\n\t            console.log('already added ' + lyr.name + ' to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        this._arrLyrRequest.push(null);\r\n\t        this._arrLyrTimeout.push(null);\r\n\t        this._arrLayer.push(lyr);\r\n\t        this._lookupLayer[lyr.id] = lyr;\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add a callback to the map move event\r\n\t     * @param func - callback function\r\n\t     * @param context - the context to use for this function\r\n\t     * @param delay=50 the delay before call load\r\n\t     * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n\t     * @param functionId optional id to reference the function later for outside triggering\r\n\t     */\r\n\t    MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n\t        if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n\t            console.log('this function already added to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        if (!functionId) {\r\n\t            functionId = makeGuid_1.default();\r\n\t        }\r\n\t        this._mapMoveCallbacks.push(func);\r\n\t        this._mapMoveCallbacksLookup[functionId] = functionId;\r\n\t        this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n\t        this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n\t        this._mapMoveCallbackTimeout.push(null);\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n\t        }\r\n\t    };\r\n\t    return MapMoveCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapMoveCls = MapMoveCls;\r\n\tnm.MapMoveCls = MapMoveCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapMoveCls;\r\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\tvar FeatureLayerProperties = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param feature the feature\r\n\t     * @param layer - the layer in the popup\r\n\t     * @param layerIndex - index of the layer\r\n\t     * @param selectionLayer - the ol selection layer\r\n\t     * @param [esriLayerName=undefined] - esri layer name\r\n\t     */\r\n\t    function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n\t        this.feature = feature;\r\n\t        this.layer = layer;\r\n\t        this.layerIndex = layerIndex;\r\n\t        this.selectionLayer = selectionLayer;\r\n\t        this.popupContent = '';\r\n\t        this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n\t    }\r\n\t    Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n\t        get: function () {\r\n\t            if (typeof this.esriLayerName == 'string') {\r\n\t                return this.esriLayerName;\r\n\t            }\r\n\t            else {\r\n\t                return this.layer.name;\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return FeatureLayerProperties;\r\n\t}());\r\n\texports.FeatureLayerProperties = FeatureLayerProperties;\r\n\t/**\r\n\t * map popup class\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapPopupCls = (function (_super) {\r\n\t    __extends(MapPopupCls, _super);\r\n\t    /**\r\n\t     * Definition for openlayers style function\r\n\t     * @callback olStyleFunction\r\n\t     * &param feature the openlayers vector feature\r\n\t     * $param\r\n\t     */\r\n\t    /**\r\n\t     * map popup constructor\r\n\t     */\r\n\t    function MapPopupCls() {\r\n\t        var _this = _super.call(this, 'map popup') || this;\r\n\t        _this._arrPopupLayerIds = [];\r\n\t        _this._arrPopupLayerNames = [];\r\n\t        _this._arrPopupLayers = [];\r\n\t        _this._arrPopupOlLayers = [];\r\n\t        _this._arrPopupContentFunction = [];\r\n\t        _this._$popupContainer = undefined;\r\n\t        _this._$popupContent = undefined;\r\n\t        _this._$popupCloser = undefined;\r\n\t        _this._popupOverlay = undefined;\r\n\t        _this._selectionLayers = [];\r\n\t        _this._selectionLayerLookup = {};\r\n\t        _this._mapClickFunctions = [];\r\n\t        //let a = function($jqueryContent){console.log($jqueryContent)};\r\n\t        //this._popupChangedLookup = {'a': a};\r\n\t        _this._popupChangedFunctions = [];\r\n\t        _this._esriMapServiceLayers = [];\r\n\t        _this._popupOpen = false;\r\n\t        _this._popupCoordinate = null;\r\n\t        _this._passThroughLayerFeatureArray = [];\r\n\t        _this._currentPopupIndex = -1;\r\n\t        _this._popupContentLength = 0;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * map popup initialization\r\n\t     * @param {ol.Map} theMap - the ol map\r\n\t     */\r\n\t    MapPopupCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        var $map;\r\n\t        var target = this.map.getTarget();\r\n\t        if (typeof target == 'string') {\r\n\t            $map = $('#' + target);\r\n\t        }\r\n\t        else {\r\n\t            $map = $(target);\r\n\t        }\r\n\t        $map.append('<div class=\"ol-popup\">' +\r\n\t            '<span class=\"ol-popup-closer\">X</span>' +\r\n\t            '<div class=\"popup-content\"></div>' +\r\n\t            '</div>');\r\n\t        this._$popupContainer = $map.find('.ol-popup');\r\n\t        this._$popupContent = $map.find('.popup-content');\r\n\t        this._$popupCloser = $map.find('.ol-popup-closer');\r\n\t        var _ease = function (n) {\r\n\t            return ol.easing.inAndOut(n);\r\n\t        };\r\n\t        this._popupOverlay = new ol.Overlay({\r\n\t            element: this._$popupContainer[0],\r\n\t            autoPan: true,\r\n\t            autoPanAnimation: {\r\n\t                duration: 250,\r\n\t                source: theMap.getView().getCenter(),\r\n\t                easing: _ease\r\n\t            }\r\n\t        });\r\n\t        this._map.addOverlay(this._popupOverlay);\r\n\t        this._$popupCloser.click(function (evt) {\r\n\t            _this.closePopup();\r\n\t        });\r\n\t        // display popup on click\r\n\t        this._map.on('singleclick', function (evt) {\r\n\t            _this.closePopup();\r\n\t            _this._popupCoordinate = evt['coordinate'];\r\n\t            // esri map service layers\r\n\t            if (_this._esriMapServiceLayers.length > 0) {\r\n\t                var queryParams = {\r\n\t                    geometry: evt['coordinate'].join(','),\r\n\t                    geometryType: 'esriGeometryPoint',\r\n\t                    layers: 'all',\r\n\t                    sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n\t                    mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n\t                    imageDisplay: _this._map.getSize().join(',') + ',96',\r\n\t                    returnGeometry: true,\r\n\t                    tolerance: 15,\r\n\t                    f: 'pjson'\r\n\t                };\r\n\t                for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n\t                    var l = _a[_i];\r\n\t                    l.getPopupInfo(queryParams);\r\n\t                }\r\n\t            }\r\n\t            var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n\t            _this._passThroughLayerFeatureArray = [];\r\n\t            _this._currentPopupIndex = -1;\r\n\t            for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n\t                var featObj = layerFeatureObjectArray[i];\r\n\t                var props = featObj.feature.getProperties();\r\n\t                var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n\t                //skip if return was false\r\n\t                if (popupContentResponse === false) {\r\n\t                }\r\n\t                else if (typeof popupContentResponse == 'string') {\r\n\t                    featObj.popupContent = popupContentResponse;\r\n\t                    _this._passThroughLayerFeatureArray.push(featObj);\r\n\t                }\r\n\t                else {\r\n\t                    featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n\t                }\r\n\t            }\r\n\t            _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n\t            _this._currentPopupIndex = -1;\r\n\t            var popupHtml = '<div class=\"ol-popup-nav\">';\r\n\t            popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">&#9664;</span>';\r\n\t            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n\t            popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n\t            popupHtml += \"<span>&nbsp;of&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n\t            popupHtml += \"<span>&nbsp;&nbsp;-&nbsp;&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n\t            popupHtml += '</div>';\r\n\t            popupHtml += '<div class=\"ol-popup-inner\">';\r\n\t            popupHtml += '</div>';\r\n\t            _this._$popupContent.html(popupHtml);\r\n\t            _this._$popupContent.find('.previous-popup').click(function () {\r\n\t                if (_this._popupContentLength == 1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == 0) {\r\n\t                    _this._currentPopupIndex = _this._popupContentLength - 1;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex--;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            var nextPopup = _this._$popupContent.find('.next-popup');\r\n\t            nextPopup.click(function () {\r\n\t                if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n\t                    _this._currentPopupIndex = 0;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex++;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            if (_this._popupContentLength > 0) {\r\n\t                nextPopup.trigger('click');\r\n\t                _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n\t                _this._$popupContent.scrollTop(0);\r\n\t                _this._popupOpen = true;\r\n\t            }\r\n\t        });\r\n\t        //change mouse cursor when over marker\r\n\t        this._map.on('pointermove', function (evt) {\r\n\t            if (evt['dragging']) {\r\n\t                return;\r\n\t            }\r\n\t            var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n\t            var hit = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {\r\n\t                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {\r\n\t                    var olLayer = _a[_i];\r\n\t                    if (lyrCandidate == olLayer) {\r\n\t                        return true;\r\n\t                    }\r\n\t                }\r\n\t                return false;\r\n\t            });\r\n\t            var mapElement = _this.map.getTargetElement();\r\n\t            mapElement.style.cursor = hit ? 'pointer' : '';\r\n\t        });\r\n\t        return true;\r\n\t    };\r\n\t    /**\r\n\t     * helper to select features\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._triggerFeatSelect = function () {\r\n\t        var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n\t        var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n\t        var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n\t        this.clearSelection();\r\n\t        var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n\t        $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n\t        $layerNameSpan.html(lyrFeatObj.layerName);\r\n\t        $innerPopup.html(lyrFeatObj.popupContent);\r\n\t        lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n\t        for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f(this._$popupContent);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param feature - the ol feature\r\n\t     * @param {LayerEsriMapServer} lyr - the map server layer\r\n\t     * @param {string} popupContent - popup content\r\n\t     * @param {string} esriName - esri layer name\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n\t        var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n\t        featLayerObject.popupContent = popupContent;\r\n\t        this._passThroughLayerFeatureArray.push(featLayerObject);\r\n\t        this._popupContentLength++;\r\n\t        $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\t        if (!this._popupOpen) {\r\n\t            this._$popupContent.find('.next-popup').trigger('click');\r\n\t            this._popupOverlay.setPosition(this._popupCoordinate);\r\n\t            this._$popupContent.scrollTop(0);\r\n\t            this._popupOpen = true;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param  pixel - the ol pixel\r\n\t     * @returns  feature layer properties\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n\t        var _this = this;\r\n\t        var layerFeatureObjectArray = [];\r\n\t        this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n\t            var lyrIndex = _this._arrPopupOlLayers.indexOf(layer);\r\n\t            if (lyrIndex > -1) {\r\n\t                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));\r\n\t            }\r\n\t        });\r\n\t        return layerFeatureObjectArray;\r\n\t    };\r\n\t    MapPopupCls.prototype.closePopup = function () {\r\n\t        this._checkInit();\r\n\t        this._popupOpen = false;\r\n\t        this._popupOverlay.setPosition(undefined);\r\n\t        this._$popupCloser[0].blur();\r\n\t        this.clearSelection();\r\n\t        this._$popupContent.html('');\r\n\t        return false;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param chgFunction - popup change function\r\n\t     */\r\n\t    MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n\t        this._popupChangedFunctions.push(chgFunction);\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase|*} lyr - the layer being acted on\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns  the new selection layer\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n\t        this._checkInit();\r\n\t        selectionStyle = selectionStyle || {};\r\n\t        selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n\t        selectionStyle.width = selectionStyle.width || 10;\r\n\t        var theStyle;\r\n\t        if (selectionStyle.olStyle) {\r\n\t            theStyle = selectionStyle.olStyle;\r\n\t        }\r\n\t        else {\r\n\t            theStyle = new ol.style.Style({\r\n\t                stroke: new ol.style.Stroke({\r\n\t                    color: selectionStyle.color,\r\n\t                    width: selectionStyle.width\r\n\t                }),\r\n\t                image: new ol.style.Circle({\r\n\t                    radius: 7,\r\n\t                    fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n\t                    stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n\t                }),\r\n\t                fill: new ol.style.Fill({\r\n\t                    color: selectionStyle.color\r\n\t                })\r\n\t            });\r\n\t        }\r\n\t        var selectionLayer = new ol.layer.Vector({\r\n\t            source: new ol.source.Vector(),\r\n\t            style: theStyle\r\n\t        });\r\n\t        selectionLayer.setZIndex(100);\r\n\t        this._selectionLayers.push(selectionLayer);\r\n\t        this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n\t        this.map.addLayer(selectionLayer);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    /**\r\n\t     * Add popup to the map\r\n\t     * @param {LayerBase|*} lyr The layer that the popup with act on\r\n\t     * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._arrPopupLayerIds.push(lyr.id);\r\n\t        this._arrPopupLayerNames.push(lyr.name);\r\n\t        this._arrPopupLayers.push(lyr);\r\n\t        this._arrPopupOlLayers.push(lyr.olLayer);\r\n\t        this._arrPopupContentFunction.push(popupContentFunction);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase} lyr - layer\r\n\t     */\r\n\t    MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n\t        var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\t        if (idx > -1) {\r\n\t            this._arrPopupLayerIds.splice(idx, 1);\r\n\t            this._arrPopupLayerNames.splice(idx, 1);\r\n\t            this._arrPopupLayers.splice(idx, 1);\r\n\t            this._arrPopupOlLayers.splice(idx, 1);\r\n\t            this._arrPopupContentFunction.splice(idx, 1);\r\n\t            this._selectionLayers.splice(idx, 1);\r\n\t            delete this._selectionLayerLookup[lyr.id];\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerEsriMapServer} lyr - map server layer\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._esriMapServiceLayers.push(lyr);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    MapPopupCls.prototype.clearSelection = function () {\r\n\t        this._checkInit();\r\n\t        for (var i = 0; i < this._selectionLayers.length; i++) {\r\n\t            this._selectionLayers[i].getSource().clear();\r\n\t        }\r\n\t        for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f();\r\n\t        }\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     * Add a function to be called when the map is clicked but before any popups are implemented\r\n\t     * @param {function} func - the map click function\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n\t        this._mapClickFunctions.push(func);\r\n\t    };\r\n\t    return MapPopupCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapPopupCls = MapPopupCls;\r\n\tnm.MapPopupCls = MapPopupCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapPopupCls;\r\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar quickMapBase_1 = __webpack_require__(13);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param {object} [options={}] config options\r\n\t * @param {string} [options.divId=map] map div id\r\n\t * @param {object} [options.center={}] center config object\r\n\t * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param {number} [options.zoom=7] zoom level\r\n\t * @param {number} [options.minZoom=undefined] min zoom\r\n\t * @param {number} [options.maxZoom=undefined] max zoom\r\n\t * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n\t * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n\t * @returns {ol.Map} the ol map\r\n\t */\r\n\tfunction quickMap(options) {\r\n\t    var m = quickMapBase_1.quickMapBase(options);\r\n\t    mapMove_1.default.init(m);\r\n\t    mapPopup_1.default.init(m);\r\n\t    return m;\r\n\t}\r\n\texports.quickMap = quickMap;\r\n\tnm.quickMap = quickMap;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMap;\r\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param [options={}] config options\r\n\t * @param [options.divId=map] map div id\r\n\t * @param [options.center={}] center config object\r\n\t * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param [options.zoom=7] zoom level\r\n\t * @param [options.minZoom=undefined] min zoom\r\n\t * @param [options.maxZoom=undefined] max zoom\r\n\t * @param [options.baseSwitcher=true] if add base map switcher\r\n\t * @param [options.fullScreen=false] if add base map switcher\r\n\t * @returns the ol map\r\n\t */\r\n\tfunction quickMapBase(options) {\r\n\t    options = options || {};\r\n\t    options.divId = options.divId || 'map';\r\n\t    options.center = options.center || { x: -10018378, y: 5574910 };\r\n\t    options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n\t    options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n\t    options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n\t    var $mapDiv = $('#' + options.divId);\r\n\t    $mapDiv.css('position', 'relative');\r\n\t    var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n\t    // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\t    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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wB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wmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5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MTCtpbKxfemsQq/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\t    if (options.baseSwitcher) {\r\n\t    }\r\n\t    if (options.zoom < 0 || options.zoom > 28) {\r\n\t        throw 'zoom out of range';\r\n\t    }\r\n\t    if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n\t        var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n\t        new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n\t        p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n\t        var coordinates = p.getCoordinates();\r\n\t        options.center.x = coordinates[0];\r\n\t        options.center.y = coordinates[1];\r\n\t    }\r\n\t    var controls = ol.control.defaults({\r\n\t        attributionOptions: { collapsible: false }\r\n\t    });\r\n\t    var view = new ol.View({\r\n\t        center: [options.center.x, options.center.y],\r\n\t        zoom: options.zoom,\r\n\t        minZoom: options.minZoom,\r\n\t        maxZoom: options.maxZoom\r\n\t    });\r\n\t    var map = new ol.Map({\r\n\t        layers: [osmLayer],\r\n\t        target: options.divId,\r\n\t        controls: controls,\r\n\t        view: view\r\n\t    });\r\n\t    if (options.fullScreen) {\r\n\t        map.addControl(new ol.control.FullScreen({}));\r\n\t    }\r\n\t    return map;\r\n\t}\r\n\texports.quickMapBase = quickMapBase;\r\n\tnm.quickMapBase = quickMapBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMapBase;\r\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/14/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\n\tvar _zoomResLookup = [\r\n\t    156543.03392804097,\r\n\t    78271.51696402048,\r\n\t    39135.75848201024,\r\n\t    19567.87924100512,\r\n\t    9783.93962050256,\r\n\t    4891.96981025128,\r\n\t    2445.98490512564,\r\n\t    1222.99245256282,\r\n\t    611.49622628141,\r\n\t    305.748113140705,\r\n\t    152.8740565703525,\r\n\t    76.43702828517625,\r\n\t    38.21851414258813,\r\n\t    19.109257071294063,\r\n\t    9.554628535647032,\r\n\t    4.777314267823516,\r\n\t    2.388657133911758,\r\n\t    1.194328566955879,\r\n\t    0.5971642834779395,\r\n\t    0.29858214173896974,\r\n\t    0.14929107086948487,\r\n\t    0.07464553543474244,\r\n\t    0.03732276771737122,\r\n\t    0.01866138385868561,\r\n\t    0.009330691929342804,\r\n\t    0.004665345964671402,\r\n\t    0.002332672982335701,\r\n\t    0.0011663364911678506,\r\n\t    0.0005831682455839253 //28\r\n\t];\r\n\t/**\r\n\t * Get the resolution given the zoom level\r\n\t * @param {number} zoomLevel - the zoom level\r\n\t * @returns {number|*} the map resolution\r\n\t */\r\n\tfunction zoomToResolution(zoomLevel) {\r\n\t    \"use strict\";\r\n\t    if (typeof zoomLevel == 'number') {\r\n\t        if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n\t            return _zoomResLookup[zoomLevel];\r\n\t        }\r\n\t        else {\r\n\t            console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n\t            return undefined;\r\n\t        }\r\n\t    }\r\n\t    else {\r\n\t        return undefined;\r\n\t    }\r\n\t}\r\n\texports.zoomToResolution = zoomToResolution;\r\n\tnm.zoomToResolution = zoomToResolution;\r\n\t/**\r\n\t * Get resolution from the zoom level\r\n\t * @param {number} resolution - the resolution\r\n\t * @returns {number|*} the zoom level\r\n\t */\r\n\tfunction resolutionToZoom(resolution) {\r\n\t    for (var i = 0; i < _zoomResLookup.length; i++) {\r\n\t        if (resolution >= _zoomResLookup[i]) {\r\n\t            return i;\r\n\t        }\r\n\t    }\r\n\t    return 0;\r\n\t}\r\n\texports.resolutionToZoom = resolutionToZoom;\r\n\tnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 1/4/2016.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar nm = provide_1.default('olHelpers.esriToOlStyle');\r\n\t/**\r\n\t * This callback is displayed as part of the Requester class.\r\n\t * @callback styleFunc\r\n\t * @param {ol.Feature} feat - openlayers feature\r\n\t * @param {number} resolution - map resolution\r\n\t */\r\n\t/**\r\n\t *\r\n\t * @param {Array<number>} colorArray - input color array\r\n\t * @param {number} opacity - the opacity 0 to 1\r\n\t * @returns {string} rgba string\r\n\t * @private\r\n\t */\r\n\tfunction _colorArrayToRgba(colorArray, opacity) {\r\n\t    \"use strict\";\r\n\t    return \"rgba(\" + colorArray[0] + \",\" + colorArray[1] + \",\" + colorArray[2] + \",\" + opacity + \")\";\r\n\t}\r\n\t/**\r\n\t * escape html charcters\r\n\t * @param {string} str - input string\r\n\t * @returns {string} escaped string\r\n\t */\r\n\tfunction htmlEscape(str) {\r\n\t    return String(str)\r\n\t        .replace(/&/g, '&amp;')\r\n\t        .replace(/\"/g, '&quot;')\r\n\t        .replace(/'/g, '&#39;')\r\n\t        .replace(/</g, '&lt;')\r\n\t        .replace(/>/g, '&gt;');\r\n\t}\r\n\tnm.htmlEscape = htmlEscape;\r\n\tvar CommonSymbol = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param symbolObj\r\n\t     * @param {number} opacity\r\n\t     */\r\n\t    function CommonSymbol(symbolObj, opacity) {\r\n\t        this.symbolObj = symbolObj;\r\n\t        this.opacity = opacity;\r\n\t        this.olStyle = undefined;\r\n\t        this.legendHtml = '';\r\n\t    }\r\n\t    return CommonSymbol;\r\n\t}());\r\n\tvar PointSymbol = (function (_super) {\r\n\t    __extends(PointSymbol, _super);\r\n\t    function PointSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj.type) {\r\n\t            case 'esriSMS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n\t                var outlineWidth = _this.symbolObj.outline.width;\r\n\t                var radius = _this.symbolObj.size;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    image: new ol.style.Circle({\r\n\t                        radius: radius,\r\n\t                        fill: new ol.style.Fill({\r\n\t                            color: innerColor\r\n\t                        }),\r\n\t                        stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth })\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" style=\\\"color: \" + innerColor + \"\\\">&#9679;</span>\";\r\n\t                break;\r\n\t            case 'esriPMS':\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    image: new ol.style.Icon({ src: \"data:image/png;base64,\" + _this.symbolObj['imageData'] })\r\n\t                });\r\n\t                _this.legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + _this.symbolObj['imageData'] + \"\\\">\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return PointSymbol;\r\n\t}(CommonSymbol));\r\n\tvar LineSymbol = (function (_super) {\r\n\t    __extends(LineSymbol, _super);\r\n\t    function LineSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj.type) {\r\n\t            case 'esriSLS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var lineWidth = _this.symbolObj.width;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    stroke: new ol.style.Stroke({\r\n\t                        color: innerColor,\r\n\t                        //lineDash: [4],\r\n\t                        width: lineWidth\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n\t                _this.legendHtml += \"style=\\\"\";\r\n\t                _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n\t                _this.legendHtml += \"width: 40px;\";\r\n\t                _this.legendHtml += \"height: 4px;\";\r\n\t                _this.legendHtml += \"position: relative;\";\r\n\t                _this.legendHtml += \"display: inline-block;\";\r\n\t                _this.legendHtml += \"top: -1px;\";\r\n\t                _this.legendHtml += \"\\\"></span>\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return LineSymbol;\r\n\t}(CommonSymbol));\r\n\tvar PolygonSymbol = (function (_super) {\r\n\t    __extends(PolygonSymbol, _super);\r\n\t    function PolygonSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj['type']) {\r\n\t            case 'esriSFS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n\t                var outlineWidth = _this.symbolObj.outline.width;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    stroke: new ol.style.Stroke({\r\n\t                        color: outerColor,\r\n\t                        //lineDash: [4],\r\n\t                        width: outlineWidth\r\n\t                    }),\r\n\t                    fill: new ol.style.Fill({\r\n\t                        color: innerColor\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n\t                _this.legendHtml += \"style=\\\"\";\r\n\t                _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n\t                _this.legendHtml += \"border: solid \" + outerColor + \" 1px;\";\r\n\t                _this.legendHtml += \"width: 40px;\";\r\n\t                _this.legendHtml += \"height: 9px;\";\r\n\t                _this.legendHtml += \"position: relative;\";\r\n\t                _this.legendHtml += \"display: inline-block;\";\r\n\t                _this.legendHtml += \"top: 2px;\";\r\n\t                _this.legendHtml += \"\\\"></span>\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return PolygonSymbol;\r\n\t}(CommonSymbol));\r\n\tvar SymbolGenerator = (function () {\r\n\t    function SymbolGenerator(esriResponse) {\r\n\t        this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n\t        this.renderer = esriResponse.drawingInfo.renderer;\r\n\t        this.olStyle = undefined;\r\n\t        this.legendHtml = '';\r\n\t    }\r\n\t    return SymbolGenerator;\r\n\t}());\r\n\tvar SingleSymbol = (function (_super) {\r\n\t    __extends(SingleSymbol, _super);\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} esriResponse - layer info\r\n\t     * @param SymbolClass - the symbol class to use\r\n\t     */\r\n\t    function SingleSymbol(esriResponse, SymbolClass) {\r\n\t        var _this = _super.call(this, esriResponse) || this;\r\n\t        _this.symbol = _this.renderer.symbol;\r\n\t        var symbolObj = new SymbolClass(_this.symbol, _this.opacity);\r\n\t        _this.olStyle = symbolObj.olStyle;\r\n\t        _this.legendHtml = symbolObj.legendHtml;\r\n\t        return _this;\r\n\t    }\r\n\t    return SingleSymbol;\r\n\t}(SymbolGenerator));\r\n\tvar UniqueValueSymbol = (function (_super) {\r\n\t    __extends(UniqueValueSymbol, _super);\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} esriResponse - layer info\r\n\t     * @param SymbolClass - the Symbol class definition\r\n\t     */\r\n\t    function UniqueValueSymbol(esriResponse, SymbolClass) {\r\n\t        var _this = _super.call(this, esriResponse) || this;\r\n\t        _this.uniqueValueInfos = _this.renderer['uniqueValueInfos'];\r\n\t        _this.propertyName = _this.renderer['field1'];\r\n\t        _this.defaultSymbol = _this.renderer['defaultSymbol'];\r\n\t        if (_this.defaultSymbol) {\r\n\t            var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity);\r\n\t            _this.defaultStyle = symbolObj.olStyle;\r\n\t            _this.defaultLabelHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(_this.renderer['defaultLabel']) + \"</span>\" + symbolObj.legendHtml;\r\n\t        }\r\n\t        else {\r\n\t            _this.defaultStyle = undefined;\r\n\t            _this.defaultLabelHtml = 'other';\r\n\t        }\r\n\t        _this.valueArray = [];\r\n\t        _this.labelArray = [];\r\n\t        _this.legendArray = [];\r\n\t        _this.propertyStyleLookup = {};\r\n\t        for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) {\r\n\t            var uniqueVal = _a[_i];\r\n\t            _this.labelArray.push(uniqueVal['label']);\r\n\t            _this.valueArray.push(uniqueVal['value']);\r\n\t            var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity);\r\n\t            _this.legendArray.push(\"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(uniqueVal['label']) + \"</span>\" + uniqueSym.legendHtml);\r\n\t            _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n\t        }\r\n\t        _this.olStyle = function (feature) {\r\n\t            var checkProperties = feature.getProperties();\r\n\t            var checkProperty = checkProperties[_this.propertyName];\r\n\t            var returnValue;\r\n\t            if (_this.propertyStyleLookup[checkProperty] !== undefined) {\r\n\t                returnValue = [_this.propertyStyleLookup[checkProperty]];\r\n\t            }\r\n\t            else {\r\n\t                returnValue = [_this.defaultStyle];\r\n\t            }\r\n\t            return returnValue;\r\n\t        };\r\n\t        if (_this.defaultLabelHtml !== null) {\r\n\t            _this.legendArray.push(_this.defaultLabelHtml);\r\n\t        }\r\n\t        _this.legendHtml = '<ul>';\r\n\t        for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) {\r\n\t            var h = _c[_b];\r\n\t            _this.legendHtml += \"<li>\" + h + \"</li>\";\r\n\t        }\r\n\t        _this.legendHtml += '</ul>';\r\n\t        return _this;\r\n\t    }\r\n\t    return UniqueValueSymbol;\r\n\t}(SymbolGenerator));\r\n\t/**\r\n\t * style and legend object\r\n\t * @typedef {object} styleAndLegend\r\n\t * @property {styleFunc} style - style function\r\n\t * @property {string} legend - legend content\r\n\t */\r\n\t/**\r\n\t *\r\n\t * @param {object} esriResponse - layer info\r\n\t * @returns {styleAndLegend} style and legend object\r\n\t */\r\n\tfunction makeFeatureServiceLegendAndSymbol(esriResponse) {\r\n\t    \"use strict\";\r\n\t    var renderer = esriResponse.drawingInfo.renderer;\r\n\t    var symbolLegendOut = null;\r\n\t    switch (renderer.type) {\r\n\t        case 'simple':\r\n\t            switch (esriResponse.geometryType) {\r\n\t                case 'esriGeometryPoint':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolyline':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolygon':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n\t                    break;\r\n\t                default:\r\n\t                    console.log(esriResponse);\r\n\t                    alert(esriResponse.geometryType + ' not handled');\r\n\t            }\r\n\t            break;\r\n\t        case 'uniqueValue':\r\n\t            switch (esriResponse.geometryType) {\r\n\t                case 'esriGeometryPoint':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolyline':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolygon':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n\t                    break;\r\n\t                default:\r\n\t                    console.log(esriResponse);\r\n\t                    alert(esriResponse['geometryType'] + ' not handled');\r\n\t            }\r\n\t            break;\r\n\t        default:\r\n\t            alert('not handled renderer type: ' + renderer['type']);\r\n\t    }\r\n\t    if (symbolLegendOut == null) {\r\n\t        return { style: undefined, legend: '' };\r\n\t    }\r\n\t    else {\r\n\t        return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml };\r\n\t    }\r\n\t}\r\n\texports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\tnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\t/**\r\n\t *\r\n\t * @param {object} lyrObject - the layer as defined in the response\r\n\t * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n\t * @returns {string} legend html\r\n\t */\r\n\tfunction mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) {\r\n\t    if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; }\r\n\t    skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n\t    var layerName = lyrObject['layerName'];\r\n\t    var legendItems = lyrObject['legend'];\r\n\t    var legendHtml = '';\r\n\t    if (!skipLayerNameAndExpander) {\r\n\t        legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\";\r\n\t    }\r\n\t    if (legendItems.length == 1) {\r\n\t        legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[0]['imageData'] + \"\\\">\";\r\n\t    }\r\n\t    else {\r\n\t        if (!skipLayerNameAndExpander) {\r\n\t            legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">&#9660;</span>';\r\n\t        }\r\n\t        legendHtml += '<ul>';\r\n\t        for (var i = 0; i < legendItems.length; i++) {\r\n\t            legendHtml += \"<li>\";\r\n\t            legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(legendItems[i]['label']) + \"</span>\";\r\n\t            legendHtml += \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[i]['imageData'] + \"\\\">\";\r\n\t            legendHtml += \"</li>\";\r\n\t        }\r\n\t        legendHtml += '</ul>';\r\n\t    }\r\n\t    if (!skipLayerNameAndExpander) {\r\n\t        legendHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\" + legendHtml;\r\n\t    }\r\n\t    return legendHtml;\r\n\t}\r\n\t/**\r\n\t * make map service legent\r\n\t * @param {object} esriResponse - layer info\r\n\t * @returns {string} legend content\r\n\t */\r\n\tfunction makeMapServiceLegend(esriResponse) {\r\n\t    \"use strict\";\r\n\t    var newLegendHtml = '';\r\n\t    var layers = esriResponse['layers'];\r\n\t    if (layers.length == 1) {\r\n\t        newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n\t    }\r\n\t    else {\r\n\t        newLegendHtml += '<ul>';\r\n\t        for (var i = 0; i < layers.length; i++) {\r\n\t            newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n\t        }\r\n\t        newLegendHtml += '</ul>';\r\n\t    }\r\n\t    return newLegendHtml;\r\n\t}\r\n\texports.makeMapServiceLegend = makeMapServiceLegend;\r\n\tnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 12/7/2015.\r\n\t */\r\n\tvar LayerBase_1 = __webpack_require__(8);\r\n\tvar esriToOl = __webpack_require__(15);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * esri mapserver layer\r\n\t * @augments LayerBase\r\n\t */\r\n\tvar LayerEsriMapServer = (function (_super) {\r\n\t    __extends(LayerEsriMapServer, _super);\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {string} url - resource url\r\n\t     * @param {object} [options] - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     * @param {boolean} [options.addPopup=false] if a popup should be added\r\n\t     * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n\t     */\r\n\t    function LayerEsriMapServer(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        var _this = _super.call(this, url, options) || this;\r\n\t        _this._source = new ol.source.TileArcGISRest({\r\n\t            url: _this.url == '' ? undefined : _this.url,\r\n\t            params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') }\r\n\t        });\r\n\t        _this._olLayer = new ol.layer.Tile({\r\n\t            source: _this._source,\r\n\t            visible: _this.visible,\r\n\t            opacity: _this.opacity,\r\n\t            minResolution: _this._minResolution,\r\n\t            maxResolution: _this._maxResolution\r\n\t        });\r\n\t        _this._olLayer.setZIndex(_this._zIndex);\r\n\t        options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\t        _this._esriFormat = new ol.format.EsriJSON();\r\n\t        _this._popupRequest = null;\r\n\t        _this.addLegendContent();\r\n\t        if (options.addPopup) {\r\n\t            mapPopup_1.default.addMapServicePopup(_this);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=''] additional content for legend\r\n\t     */\r\n\t    LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) {\r\n\t        var _this = this;\r\n\t        var urlCopy = this.url;\r\n\t        if (urlCopy[urlCopy.length - 1] !== '/') {\r\n\t            urlCopy += '/';\r\n\t        }\r\n\t        urlCopy += 'legend?f=pjson&callback=?';\r\n\t        $.get(urlCopy, {}, function (d) {\r\n\t            var newHtml = esriToOl.makeMapServiceLegend(d);\r\n\t            _super.prototype.addLegendContent.call(_this, newHtml);\r\n\t        }, 'json');\r\n\t    };\r\n\t    LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) {\r\n\t        if (!this.visible) {\r\n\t            return;\r\n\t        }\r\n\t        var urlCopy = this.url;\r\n\t        if (urlCopy[urlCopy.length - 1] != '/') {\r\n\t            urlCopy += '/';\r\n\t        }\r\n\t        urlCopy += 'identify?callback=?';\r\n\t        var __this = this;\r\n\t        if (this._popupRequest != null) {\r\n\t            this._popupRequest.abort();\r\n\t        }\r\n\t        this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n\t            for (var _i = 0, _a = d['results']; _i < _a.length; _i++) {\r\n\t                var r = _a[_i];\r\n\t                var popupHtml = '<table class=\"esri-popup-table\">';\r\n\t                for (var a in r['attributes']) {\r\n\t                    if (r['attributes'].hasOwnProperty(a)) {\r\n\t                        var attrVal = r['attributes'][a];\r\n\t                        if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n\t                            continue;\r\n\t                        }\r\n\t                        var attr = a;\r\n\t                        if (attr.length > 14) {\r\n\t                            attr = attr.slice(0, 11) + '...';\r\n\t                        }\r\n\t                        popupHtml += \"<tr><td>\" + attr + \"</td><td>\" + attrVal + \"</td></tr>\";\r\n\t                    }\r\n\t                }\r\n\t                popupHtml += '</table>';\r\n\t                mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n\t            }\r\n\t        }, 'json');\r\n\t        this._popupRequest.always(function () {\r\n\t            __this._popupRequest = null;\r\n\t        });\r\n\t    };\r\n\t    Object.defineProperty(LayerEsriMapServer.prototype, \"source\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {ol.source.TileArcGISRest} the vector source\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getSource.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerEsriMapServer.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getOlLayer.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return LayerEsriMapServer;\r\n\t}(LayerBase_1.LayerBase));\r\n\texports.LayerEsriMapServer = LayerEsriMapServer;\r\n\tnm.LayerEsriMapServer = LayerEsriMapServer;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerEsriMapServer;\r\n\n\n/***/ },\n/* 17 */,\n/* 18 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/2/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar range_change_1 = __webpack_require__(19);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('domUtil');\r\n\t/**\r\n\t * @callback mediaCallback\r\n\t * @param {number} tm\r\n\t */\r\n\tfunction timeToLocalDateString(tm) {\r\n\t    \"use strict\";\r\n\t    var d = new Date(tm);\r\n\t    var p1 = d.toLocaleTimeString().split(' ');\r\n\t    var p2 = p1[0].split(':');\r\n\t    p2 = p2.slice(0, 2);\r\n\t    return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n\t}\r\n\tvar MediaControl = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param element\r\n\t     * @param changeFunc\r\n\t     * @param mediaConfig\r\n\t     */\r\n\t    function MediaControl(element, changeFunc, mediaConfig) {\r\n\t        if (changeFunc === void 0) { changeFunc = function () { return; }; }\r\n\t        if (mediaConfig === void 0) { mediaConfig = {}; }\r\n\t        var _this = this;\r\n\t        mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n\t        mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n\t        mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n\t        mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n\t        mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n\t        mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n\t        if (typeof element == 'string') {\r\n\t            this._container = $('#' + element);\r\n\t        }\r\n\t        else if (typeof element['style'] !== 'undefined') {\r\n\t            this._container = $(element);\r\n\t        }\r\n\t        else {\r\n\t            this._container = element;\r\n\t        }\r\n\t        this._container.addClass('media-control-container');\r\n\t        this._playInterval = mediaConfig.playInterval;\r\n\t        this._changeFunc = changeFunc;\r\n\t        this._showAsDate = mediaConfig.showAsDate;\r\n\t        this._currentValue = undefined;\r\n\t        this._min = undefined;\r\n\t        this._max = undefined;\r\n\t        this._step = undefined;\r\n\t        this._playing = false;\r\n\t        var htmlStr = '<span class=\"media-player-button media-back\"></span>' +\r\n\t            '<span class=\"media-player-button media-play\"></span>' +\r\n\t            '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n\t            '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n\t            '<span class=\"media-player-button media-ahead\"></span>' +\r\n\t            \"<input type=\\\"range\\\">\" +\r\n\t            \"<div class=\\\"media-control-value-label-container\\\">\" +\r\n\t            \"<span class=\\\"media-control-value-label-min\\\"></span>\" +\r\n\t            \"<span class=\\\"media-control-value-label-val\\\"></span>\" +\r\n\t            \"<span class=\\\"media-control-value-label-max\\\"></span>\" +\r\n\t            \"</div>\";\r\n\t        this._container.append(htmlStr);\r\n\t        // let btnPause = this._container.find('.media-pause');\r\n\t        var btnPlay = this._container.find('.media-play');\r\n\t        this._$btnStop = this._container.find('.media-stop');\r\n\t        var btnAhead = this._container.find('.media-ahead');\r\n\t        var btnBack = this._container.find('.media-back');\r\n\t        this._$slider = this._container.find('input[type=range]');\r\n\t        this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n\t        this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n\t        this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n\t        this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n\t        range_change_1.rangeChange(this._$slider, function (newVal) { _this.currentValue = newVal; }, 100);\r\n\t        var ___this = this;\r\n\t        btnPlay.click(function () {\r\n\t            var $this = $(this);\r\n\t            $this.addClass('media-disabled');\r\n\t            ___this._$btnStop.removeClass('media-disabled');\r\n\t            btnAhead.addClass('media-locked');\r\n\t            btnBack.addClass('media-locked');\r\n\t            ___this._$slider.prop('disabled', true);\r\n\t            ___this._playing = true;\r\n\t            ___this._interval = setInterval(function () {\r\n\t                ___this.currentValue += ___this._step;\r\n\t            }, ___this._playInterval);\r\n\t        });\r\n\t        this._$btnStop.click(function () {\r\n\t            clearInterval(___this._interval);\r\n\t            var $this = $(this);\r\n\t            $this.addClass('media-disabled');\r\n\t            btnPlay.removeClass('media-disabled');\r\n\t            btnAhead.removeClass('media-locked');\r\n\t            btnBack.removeClass('media-locked');\r\n\t            ___this._$slider.prop('disabled', false);\r\n\t            ___this._playing = false;\r\n\t        });\r\n\t        btnAhead.click(function () {\r\n\t            ___this.currentValue = ___this.currentValue + ___this._step;\r\n\t        });\r\n\t        btnBack.click(function () {\r\n\t            ___this.currentValue = ___this.currentValue - ___this._step;\r\n\t        });\r\n\t    }\r\n\t    MediaControl.prototype.stopPlaying = function () {\r\n\t        if (this._playing) {\r\n\t            this._$btnStop.trigger('click');\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MediaControl.prototype, \"playing\", {\r\n\t        get: function () {\r\n\t            return this._playing;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"min\", {\r\n\t        get: function () {\r\n\t            return this._min;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"max\", {\r\n\t        get: function () {\r\n\t            return this._max;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"step\", {\r\n\t        get: function () {\r\n\t            return this._step;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"currentValue\", {\r\n\t        get: function () {\r\n\t            return this._currentValue;\r\n\t        },\r\n\t        set: function (newValue) {\r\n\t            if (newValue > this._max) {\r\n\t                newValue = this._min;\r\n\t            }\r\n\t            else if (newValue < this._min) {\r\n\t                newValue = this._max;\r\n\t            }\r\n\t            this._currentValue = newValue;\r\n\t            this._$slider.val(this._currentValue.toFixed(2));\r\n\t            if (this._showAsDate) {\r\n\t                this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n\t            }\r\n\t            else {\r\n\t                this._$valLabelVal.html(this.currentValue.toString());\r\n\t            }\r\n\t            this._changeFunc(newValue);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * set min and max value with step\r\n\t     * @param {number} newMin the new min\r\n\t     * @param {number} newMax the new mas\r\n\t     * @param {number} [newValue=newMin] the value to set\r\n\t     * @param {number} [newStep=(newMax-newMin)/20] step value\r\n\t     */\r\n\t    MediaControl.prototype.setMinMaxValueStep = function (newMin, newMax, newValue, newStep) {\r\n\t        this._min = newMin;\r\n\t        this._max = newMax;\r\n\t        newValue = typeof newValue == 'number' ? newValue : newMin;\r\n\t        newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n\t        this._currentValue = newValue;\r\n\t        this._step = newStep;\r\n\t        this._$slider.prop('min', this.min.toString());\r\n\t        this._$slider.prop('max', this.max.toString());\r\n\t        this._$slider.prop('step', this.step.toString());\r\n\t        this._$slider.val(this.currentValue.toString());\r\n\t        if (this._showAsDate) {\r\n\t            this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n\t            this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n\t            this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n\t        }\r\n\t        else {\r\n\t            this._$valLabelMin.html(this._min.toString());\r\n\t            this._$valLabelVal.html(this.currentValue.toString());\r\n\t            this._$valLabelMax.html(this._max.toString());\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MediaControl.prototype, \"changeFunction\", {\r\n\t        /**\r\n\t         *\r\n\t         * @param {mediaCallback} newFunc the callback on change\r\n\t         */\r\n\t        set: function (newFunc) {\r\n\t            this._changeFunc = newFunc;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return MediaControl;\r\n\t}());\r\n\texports.MediaControl = MediaControl;\r\n\tnm.MediaControl = MediaControl;\r\n\n\n/***/ },\n/* 19 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('domUtil');\r\n\tvar mouseIn = false;\r\n\tvar mouseDown = false;\r\n\tvar timeout = null;\r\n\tvar dragged = false;\r\n\tvar lastVal;\r\n\t/**\r\n\t * Created by gavorhes on 11/2/2015.\r\n\t */\r\n\tfunction triggerCallback(callback, evt) {\r\n\t    \"use strict\";\r\n\t    var val = parseFloat(this.value);\r\n\t    var min = parseFloat(this.min);\r\n\t    var max = parseFloat(this.max);\r\n\t    var step = parseFloat(this.step);\r\n\t    if (max - val < step) {\r\n\t        val = max;\r\n\t    }\r\n\t    var percent = (val - min) / (max - min);\r\n\t    if (typeof lastVal == 'number' && val == lastVal) {\r\n\t        return;\r\n\t    }\r\n\t    lastVal = val;\r\n\t    callback(val, percent, evt);\r\n\t}\r\n\t/**\r\n\t * Add a variety of listeners for range inputs applied to a common callback\r\n\t * @param  $slider - jquery reference to the slider\r\n\t * @param {rangeChangeCallback} callback - the callback\r\n\t * @param {number} [changeTimeout=75] before the callback is called\r\n\t * @this {jQuery}\r\n\t * @returns {jQuery} the jQuery object\r\n\t */\r\n\tfunction rangeChange($slider, callback, changeTimeout) {\r\n\t    changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n\t    $slider.mouseenter(function () {\r\n\t        mouseIn = true;\r\n\t    });\r\n\t    $slider.mouseleave(function () {\r\n\t        mouseIn = false;\r\n\t        mouseDown = false;\r\n\t    });\r\n\t    $slider.mousedown(function () {\r\n\t        mouseDown = true;\r\n\t    });\r\n\t    $slider.mouseup(function () {\r\n\t        mouseDown = false;\r\n\t    });\r\n\t    $slider.mousemove(\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} evt - event properties\r\n\t     * @this {HTMLElement}\r\n\t     */\r\n\t    function (evt) {\r\n\t        if (!(mouseIn && mouseDown)) {\r\n\t            return;\r\n\t        }\r\n\t        dragged = true;\r\n\t        if (lastVal == this['value']) {\r\n\t            return;\r\n\t        }\r\n\t        lastVal = this['value'];\r\n\t        if (timeout != null) {\r\n\t            clearTimeout(timeout);\r\n\t        }\r\n\t        var _this = this;\r\n\t        timeout = setTimeout(function () {\r\n\t            triggerCallback.call(_this, callback, evt);\r\n\t            timeout = null;\r\n\t        }, changeTimeout);\r\n\t    });\r\n\t    $slider.keyup(\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} evt - event properties\r\n\t     */\r\n\t    function (evt) {\r\n\t        if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n\t            triggerCallback.call(this, callback, evt);\r\n\t        }\r\n\t    });\r\n\t    $slider.change(function (evt) {\r\n\t        if (dragged) {\r\n\t            dragged = false;\r\n\t            return;\r\n\t        }\r\n\t        triggerCallback.call(this, callback, evt);\r\n\t    });\r\n\t    return this;\r\n\t}\r\n\texports.rangeChange = rangeChange;\r\n\tnm.rangeChange = rangeChange;\r\n\n\n/***/ },\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar LayerBase_1 = __webpack_require__(8);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar g = new ol.Map({});\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * The Vector layer base\r\n\t * @augments LayerBase\r\n\t * @abstract\r\n\t */\r\n\tvar LayerBaseVector = (function (_super) {\r\n\t    __extends(LayerBaseVector, _super);\r\n\t    /**\r\n\t     * The base vector layer\r\n\t     * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     *\r\n\t     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n\t     * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n\t     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n\t     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n\t     * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n\t     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n\t     *\r\n\t     */\r\n\t    function LayerBaseVector(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        var _this = _super.call(this, url, options) || this;\r\n\t        options = options;\r\n\t        //prevent regular load if no url has been provided\r\n\t        if (_this.url.trim() == '') {\r\n\t            _this._loaded = true;\r\n\t        }\r\n\t        _this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\t        if (_this.visible) {\r\n\t            _this._autoLoad = true;\r\n\t        }\r\n\t        else {\r\n\t            _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n\t        }\r\n\t        _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n\t        _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\t        if (options.mapMoveObj) {\r\n\t            _this._mapMove = options.mapMoveObj;\r\n\t        }\r\n\t        else {\r\n\t            _this._mapMove = _this._onDemand ? mapMove_1.default : undefined;\r\n\t        }\r\n\t        _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n\t            function () { return {}; };\r\n\t        if (_this._onDemand) {\r\n\t            _this._loaded = true;\r\n\t            _this._mapMoveParams = {};\r\n\t            _this._mapMove.checkInit();\r\n\t            _this._mapMove.addVectorLayer(_this);\r\n\t        }\r\n\t        _this._source = new ol.source.Vector();\r\n\t        _this._olLayer = new ol.layer.Vector({\r\n\t            source: _this._source,\r\n\t            visible: _this.visible,\r\n\t            style: _this.style,\r\n\t            minResolution: _this._minResolution,\r\n\t            maxResolution: _this._maxResolution,\r\n\t            renderOrder: options.renderOrder\r\n\t        });\r\n\t        _this.olLayer.setZIndex(_this._zIndex);\r\n\t        _this._projectionMap = null;\r\n\t        _this._projection4326 = new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * dummy to be overridden\r\n\t     * @param {object} featureCollection - geojson or esrijson object\r\n\t     */\r\n\t    LayerBaseVector.prototype.addFeatures = function (featureCollection) {\r\n\t        console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n\t    };\r\n\t    /**\r\n\t     * Before call to map move callback, can prevent call by returning false\r\n\t     * @param {number} zoom - zoom level\r\n\t     * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n\t     * @returns {boolean} if the call should proceed\r\n\t     */\r\n\t    LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) {\r\n\t        if (this.minZoom !== undefined) {\r\n\t            if (zoom < this.minZoom) {\r\n\t                return false;\r\n\t            }\r\n\t        }\r\n\t        if (this.maxZoom !== undefined) {\r\n\t            if (zoom > this.maxZoom) {\r\n\t                return false;\r\n\t            }\r\n\t        }\r\n\t        return this.visible;\r\n\t    };\r\n\t    /**\r\n\t     * callback to generate the parameters passed in the get request\r\n\t     * @param {object} extent - extent object\r\n\t     * @param {number} extent.minX - minX\r\n\t     * @param {number} extent.minY - minY\r\n\t     * @param {number} extent.maxX - maxX\r\n\t     * @param {number} extent.maxY - maxY\r\n\t     * @param {number} zoomLevel - zoom level\r\n\t     */\r\n\t    LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n\t        this._mapMoveParams = {};\r\n\t        $.extend(this._mapMoveParams, this.params);\r\n\t        $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n\t    };\r\n\t    /**\r\n\t     * callback function on map move\r\n\t     * @param {object} d - the json response\r\n\t     */\r\n\t    LayerBaseVector.prototype.mapMoveCallback = function (d) {\r\n\t        if (this.source) {\r\n\t            this._source.clear();\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * clear features in the layer\r\n\t     */\r\n\t    LayerBaseVector.prototype.clear = function () {\r\n\t        if (this._source) {\r\n\t            this._source.clear();\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"onDemandDelay\", {\r\n\t        /**\r\n\t         * get on demand delay in miliseconds\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._onDemandDelay;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"autoLoad\", {\r\n\t        /**\r\n\t         * get if the layer is autoloaded\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._autoLoad;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"style\", {\r\n\t        /**\r\n\t         * get the style definition\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._style;\r\n\t        },\r\n\t        /**\r\n\t         * set the style\r\n\t         * @param style - the style or function\r\n\t         */\r\n\t        set: function (style) {\r\n\t            this._style = style;\r\n\t            this.olLayer.setStyle(this._style);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapCrs\", {\r\n\t        /**\r\n\t         * get the map CRS if it is defined by the map move object\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.mapProj == null ? null : this.mapProj.getCode();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapProj\", {\r\n\t        get: function () {\r\n\t            if (this._projectionMap != null) {\r\n\t                return this._projectionMap;\r\n\t            }\r\n\t            if (this._mapMove) {\r\n\t                this._projectionMap = this._mapMove.map.getView().getProjection();\r\n\t                return this._projectionMap;\r\n\t            }\r\n\t            else {\r\n\t                return null;\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapMove\", {\r\n\t        /**\r\n\t         * get the map move object\r\n\t         * @type {MapMoveCls|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._mapMove;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapMoveParams\", {\r\n\t        /**\r\n\t         * map move params\r\n\t         * @type {object}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._mapMoveParams;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"visible\", {\r\n\t        get: function () {\r\n\t            return this._visible;\r\n\t        },\r\n\t        /**\r\n\t         * Set the layer visibility\r\n\t         * @type {boolean}\r\n\t         * @override\r\n\t         */\r\n\t        set: function (visibility) {\r\n\t            _super.prototype.setVisible.call(this, visibility);\r\n\t            if (this._onDemand) {\r\n\t                this.mapMove.triggerLyrLoad(this);\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"source\", {\r\n\t        /**\r\n\t         * get the layer vector source\r\n\t         * @override\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getSource();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"features\", {\r\n\t        /**\r\n\t         * array of ol features\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.source.getFeatures();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         *\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getOlLayer.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBaseVector.prototype.setZIndex = function (newZ) {\r\n\t        this.olLayer.setZIndex(newZ);\r\n\t    };\r\n\t    return LayerBaseVector;\r\n\t}(LayerBase_1.LayerBase));\r\n\texports.LayerBaseVector = LayerBaseVector;\r\n\tnm.LayerBaseVector = LayerBaseVector;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBaseVector;\r\n\n\n/***/ },\n/* 21 */,\n/* 22 */,\n/* 23 */,\n/* 24 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/2/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar LayerBaseVector_1 = __webpack_require__(20);\r\n\tvar esriToOl = __webpack_require__(15);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * Base layer for esri vector layers\r\n\t * @augments LayerBaseVector\r\n\t */\r\n\tvar LayerBaseVectorEsri = (function (_super) {\r\n\t    __extends(LayerBaseVectorEsri, _super);\r\n\t    /**\r\n\t     * The base vector layer\r\n\t     * @param {string} url - url for source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     *\r\n\t     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n\t     * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n\t     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n\t     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n\t     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n\t     *\r\n\t     * @param {string} [options.where=1=1] the layer filter clause\r\n\t     * @param {string} [options.outFields=*] comma separated list of output fields, defaults to all\r\n\t     * @param {string} [options.format=pjson] the format the retrieve the data\r\n\t     * @param {number} [options.outSR=3857] the output spatial reference, defaults to web mercator\r\n\t     * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n\t     * @param {boolean} [options.collapseLegend=false] if the legend should be initially collapsed\r\n\t     * @param {number} [options.mapMoveMakeGetParams=function(extent, zoomLevel){}] function to create additional map move params\r\n\t     */\r\n\t    function LayerBaseVectorEsri(url, options) {\r\n\t        var _this = this;\r\n\t        if (typeof options.params != 'object') {\r\n\t            options.params = {};\r\n\t        }\r\n\t        options.params['where'] = options.where || '1=1';\r\n\t        options.params['outFields'] = options.outFields || '*';\r\n\t        options.params['f'] = options.format || 'pjson';\r\n\t        options.params['outSR'] = options.outSR || 3857;\r\n\t        _this = _super.call(this, url, options) || this;\r\n\t        _this._outSR = _this.params['outSR'];\r\n\t        _this._esriFormat = new ol.format.EsriJSON();\r\n\t        if (_this._url[_this._url.length - 1] !== '/') {\r\n\t            _this._url += '/';\r\n\t        }\r\n\t        _this._urlCopy = _this.url;\r\n\t        _this._url += 'query?callback=?';\r\n\t        if (_this.autoLoad || _this.visible) {\r\n\t            _this._load();\r\n\t        }\r\n\t        _this._useEsriStyle = typeof options.useEsriStyle == 'boolean' ? options.useEsriStyle : false;\r\n\t        if (_this._useEsriStyle) {\r\n\t            _this.addLegendContent();\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=''] additional content to add to legend\r\n\t     */\r\n\t    LayerBaseVectorEsri.prototype.addLegendContent = function (additionalContent) {\r\n\t        var _this = this;\r\n\t        if (!this._useEsriStyle) {\r\n\t            _super.prototype.addLegendContent.call(this, additionalContent);\r\n\t        }\r\n\t        else {\r\n\t            $.get(this._urlCopy + '?f=pjson&callback=?', {}, function (d) {\r\n\t                if (d['subLayers'].length > 0) {\r\n\t                    alert('should only use single feature layers, not groups');\r\n\t                    return;\r\n\t                }\r\n\t                var newStyleAndLegend = esriToOl.makeFeatureServiceLegendAndSymbol(d);\r\n\t                _this.style = newStyleAndLegend.style;\r\n\t                _super.prototype.addLegendContent.call(_this, newStyleAndLegend.legend);\r\n\t            }, 'json');\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add feature collection\r\n\t     * @param {object} featureCollection - features as esrijson\r\n\t     */\r\n\t    LayerBaseVectorEsri.prototype.addFeatures = function (featureCollection) {\r\n\t        var feats = this._esriFormat.readFeatures(featureCollection);\r\n\t        this.source.addFeatures(feats);\r\n\t    };\r\n\t    /**\r\n\t     * trigger load features\r\n\t     * @protected\r\n\t     * @returns {boolean} if already loaded\r\n\t     */\r\n\t    LayerBaseVectorEsri.prototype._load = function () {\r\n\t        var _this = this;\r\n\t        if (_super.prototype._load.call(this)) {\r\n\t            return true;\r\n\t        }\r\n\t        $.get(this._url, this.params, function (d) {\r\n\t            _this.addFeatures(d);\r\n\t            _this.loadCallback(_this);\r\n\t        }, 'json').fail(function () {\r\n\t            _this._loaded = false;\r\n\t        });\r\n\t        return false;\r\n\t    };\r\n\t    /**\r\n\t     * callback to generate the parameters passed in the get request\r\n\t     * @param {object} extent - extent object\r\n\t     * @param {number} extent.minX - minX\r\n\t     * @param {number} extent.minY - minY\r\n\t     * @param {number} extent.maxX - maxX\r\n\t     * @param {number} extent.maxY - maxY\r\n\t     * @param {number} zoomLevel - zoom level\r\n\t     */\r\n\t    LayerBaseVectorEsri.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n\t        _super.prototype.mapMoveMakeGetParams.call(this, extent, zoomLevel);\r\n\t        this.mapMoveParams['geometry'] = extent.minX + \",\" + extent.minY + \",\" + extent.maxX + \",\" + extent.maxY;\r\n\t        this.mapMoveParams['geometryType'] = 'esriGeometryEnvelope';\r\n\t        this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n\t        this.mapMoveParams['spatialRel'] = 'esriSpatialRelIntersects';\r\n\t        this.mapMoveParams['inSR'] = 3857;\r\n\t        if (this._outSR == 3857) {\r\n\t            this.mapMoveParams['geometryPrecision'] = 1;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Before call to map move callback, can prevent call by returning false\r\n\t     * @param {number} zoom - zoom level\r\n\t     * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n\t     * @returns {boolean} if the call should proceed\r\n\t     */\r\n\t    LayerBaseVectorEsri.prototype.mapMoveBefore = function (zoom, evtType) {\r\n\t        return _super.prototype.mapMoveBefore.call(this, zoom, evtType);\r\n\t        //if (super.mapMoveBefore(zoom, evtType)){\r\n\t        //    //place holder for additional processing\r\n\t        //    return true;\r\n\t        //} else {\r\n\t        //    return false;\r\n\t        //}\r\n\t    };\r\n\t    /**\r\n\t     * callback function on map move\r\n\t     * @param {object} d - the json response\r\n\t     */\r\n\t    LayerBaseVectorEsri.prototype.mapMoveCallback = function (d) {\r\n\t        _super.prototype.mapMoveCallback.call(this, d);\r\n\t        this.source.addFeatures(this._esriFormat.readFeatures(d));\r\n\t    };\r\n\t    return LayerBaseVectorEsri;\r\n\t}(LayerBaseVector_1.LayerBaseVector));\r\n\texports.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\n\tnm.LayerBaseVectorEsri = LayerBaseVectorEsri;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBaseVectorEsri;\r\n\n\n/***/ },\n/* 25 */,\n/* 26 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 12/4/2015.\r\n\t */\r\n\tvar LayerBase_1 = __webpack_require__(8);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * XYZ tile\r\n\t * @augments LayerBase\r\n\t */\r\n\tvar LayerBaseXyzTile = (function (_super) {\r\n\t    __extends(LayerBaseXyzTile, _super);\r\n\t    /**\r\n\t     * The XYZ tile layer\r\n\t     * @param {string} url - url for source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     * @param {boolean} [options.useEsriStyle=false] if the map service style should be used\r\n\t     */\r\n\t    function LayerBaseXyzTile(url, options) {\r\n\t        var _this = _super.call(this, url, options) || this;\r\n\t        _this._source = new ol.source.XYZ({ url: _this.url == '' ? undefined : _this.url });\r\n\t        _this._olLayer = new ol.layer.Tile({\r\n\t            source: _this._source,\r\n\t            visible: _this.visible,\r\n\t            opacity: _this.opacity,\r\n\t            minResolution: _this._minResolution,\r\n\t            maxResolution: _this._maxResolution\r\n\t        });\r\n\t        _this._olLayer.setZIndex(_this._zIndex);\r\n\t        return _this;\r\n\t    }\r\n\t    Object.defineProperty(LayerBaseXyzTile.prototype, \"source\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {ol.source.XYZ} the vector source\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._source;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseXyzTile.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {ol.layer.Tile|ol.layer.Base|undefined} the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._olLayer;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return LayerBaseXyzTile;\r\n\t}(LayerBase_1.LayerBase));\r\n\texports.LayerBaseXyzTile = LayerBaseXyzTile;\r\n\tnm.LayerBaseXyzTile = LayerBaseXyzTile;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBaseXyzTile;\r\n\n\n/***/ },\n/* 27 */,\n/* 28 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/4/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar LayerBaseXyzTile_1 = __webpack_require__(26);\r\n\tvar RealEarthAnimateTile_1 = __webpack_require__(30);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * Real earth tile\r\n\t * @augments LayerBaseXyzTile\r\n\t */\r\n\tvar LayerRealEarthTile = (function (_super) {\r\n\t    __extends(LayerRealEarthTile, _super);\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     *\r\n\t     * @param {string} options.products - the products to request\r\n\t     * @param {boolean} [options.hasTimes=false] If the layer is time dependent, fixed set of dates\r\n\t     * @param {boolean} [options.animate=false] if the layer should be animated\r\n\t     */\r\n\t    function LayerRealEarthTile(options) {\r\n\t        var _this = this;\r\n\t        options.animate = typeof options.animate == 'boolean' ? options.animate : false;\r\n\t        if (options.animate) {\r\n\t            _this = _super.call(this, '', options) || this;\r\n\t            _this._products = options.products;\r\n\t            _this.animator = new RealEarthAnimateTile_1.default(_this, options.timeLoadCallback);\r\n\t            _this.animator.timeInit();\r\n\t        }\r\n\t        else {\r\n\t            _this = _super.call(this, \"http://realearth.ssec.wisc.edu/api/image?products=\" + options.products + \"&x={x}&y={y}&z={z}\", options) || this;\r\n\t            _this._products = options.products;\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    LayerRealEarthTile.prototype.setLayerTime = function (theTime) {\r\n\t        if (this.animator) {\r\n\t            return this.animator.setLayerTime(theTime);\r\n\t        }\r\n\t        else {\r\n\t            return false;\r\n\t        }\r\n\t    };\r\n\t    LayerRealEarthTile.prototype._load = function () {\r\n\t        if (this.animator) {\r\n\t            return false;\r\n\t        }\r\n\t        return _super.prototype._load.call(this);\r\n\t    };\r\n\t    return LayerRealEarthTile;\r\n\t}(LayerBaseXyzTile_1.LayerBaseXyzTile));\r\n\texports.LayerRealEarthTile = LayerRealEarthTile;\r\n\tnm.LayerRealEarthTile = LayerRealEarthTile;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerRealEarthTile;\r\n\n\n/***/ },\n/* 29 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 12/4/2015.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('mixin');\r\n\t/**\r\n\t * The GMT offset time in minutes\r\n\t * @type {number}\r\n\t */\r\n\tvar offsetMinutes = (new Date()).getTimezoneOffset();\r\n\t/**\r\n\t * Mixin to get the product times\r\n\t * Be sure to call getTimeInit after the mixin has been applied\r\n\t */\r\n\tvar RealEarthAnimate = (function () {\r\n\t    function RealEarthAnimate(lyr, loadCallback) {\r\n\t        this.lyr = lyr;\r\n\t        this._products = lyr._products;\r\n\t        if (loadCallback) {\r\n\t            this.loadCallback = loadCallback;\r\n\t        }\r\n\t        else {\r\n\t            this.loadCallback = function () { return; };\r\n\t        }\r\n\t    }\r\n\t    /**\r\n\t     * Call this after the mixin has been applied\r\n\t     */\r\n\t    RealEarthAnimate.prototype.timeInit = function () {\r\n\t        var _this = this;\r\n\t        this._rawDateStrings = [];\r\n\t        this._localDates = [];\r\n\t        this.localTimes = [];\r\n\t        this._animateEnabled = true;\r\n\t        // this._loaded = true;\r\n\t        this._currentTime = undefined;\r\n\t        this._currentIndex = undefined;\r\n\t        $.get('http://realearth.ssec.wisc.edu/api/products', { products: this._products }, function (d) {\r\n\t            if (d.length == 0) {\r\n\t                console.log(_this._products + \" layer not available or does not have times\");\r\n\t                return;\r\n\t            }\r\n\t            d = d[0];\r\n\t            for (var i = 0; i < d['times'].length; i++) {\r\n\t                _this._loadDates.call(_this, d['times'][i]);\r\n\t            }\r\n\t            _this.loadCallback.call(_this.lyr, _this.lyr);\r\n\t            _this._loadLatest.call(_this);\r\n\t        }, 'json');\r\n\t    };\r\n\t    /**\r\n\t     * Given the raw time string, add to the arrays to keep track of dates and cache\r\n\t     * @param {string} inString - input string to parse\r\n\t     * @returns {string} the converted string\r\n\t     * @protected\r\n\t     */\r\n\t    RealEarthAnimate.prototype._loadDates = function (inString) {\r\n\t        var yr = inString.slice(0, 4);\r\n\t        var month = inString.slice(4, 6);\r\n\t        var d = inString.slice(6, 8);\r\n\t        var hr = inString.slice(9, 11);\r\n\t        var mn = inString.slice(11, 13);\r\n\t        var sec = inString.slice(13, 15);\r\n\t        var rawDateStr = inString.replace('.', '_');\r\n\t        this._rawDateStrings.push(rawDateStr);\r\n\t        var dteStr = month + \"/\" + d + \"/\" + yr + \" \" + hr + \":\" + mn + \":\" + sec;\r\n\t        var newDte = new Date(dteStr);\r\n\t        newDte.setMinutes(newDte.getMinutes() - offsetMinutes);\r\n\t        this._localDates.push(newDte);\r\n\t        this.localTimes.push(newDte.getTime());\r\n\t        return rawDateStr;\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @protected\r\n\t     * @returns {boolean} if should continue\r\n\t     */\r\n\t    RealEarthAnimate.prototype._loadLatest = function () {\r\n\t        mapPopup_1.default.closePopup();\r\n\t        if (this.localTimes.length > 0) {\r\n\t            this._currentIndex = this.localTimes.length - 1;\r\n\t            return true;\r\n\t        }\r\n\t        else {\r\n\t            return false;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {number} theTime - the time\r\n\t     * @returns {boolean} true if new index, false if the same or below lowest value\r\n\t     */\r\n\t    RealEarthAnimate.prototype.setLayerTime = function (theTime) {\r\n\t        this._currentTime = theTime;\r\n\t        var newIndex;\r\n\t        if (theTime < this.localTimes[0]) {\r\n\t            return false;\r\n\t        }\r\n\t        else if (theTime > this.localTimes[this.localTimes.length - 1]) {\r\n\t            newIndex = this.localTimes.length - 1;\r\n\t        }\r\n\t        for (var i = 0; i < this.localTimes.length; i++) {\r\n\t            if (this.localTimes[i] >= theTime) {\r\n\t                newIndex = i;\r\n\t                break;\r\n\t            }\r\n\t        }\r\n\t        if (newIndex == this._currentIndex) {\r\n\t            return false;\r\n\t        }\r\n\t        else {\r\n\t            this._currentIndex = newIndex;\r\n\t            mapPopup_1.default.closePopup();\r\n\t            return true;\r\n\t        }\r\n\t    };\r\n\t    return RealEarthAnimate;\r\n\t}());\r\n\texports.RealEarthAnimate = RealEarthAnimate;\r\n\tnm.RealEarthAnimate = RealEarthAnimate;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = RealEarthAnimate;\r\n\n\n/***/ },\n/* 30 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 12/4/2015.\r\n\t */\r\n\tvar RealEarthAnimate_1 = __webpack_require__(29);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('mixin');\r\n\t/**\r\n\t * Animate real earth tile\r\n\t * @augments RealEarthAnimate\r\n\t */\r\n\tvar RealEarthAnimateTile = (function (_super) {\r\n\t    __extends(RealEarthAnimateTile, _super);\r\n\t    function RealEarthAnimateTile(layer, loadCallback) {\r\n\t        var _this = _super.call(this, layer, loadCallback) || this;\r\n\t        _this._source = layer.source;\r\n\t        _this._olLayer = layer.olLayer;\r\n\t        return _this;\r\n\t    }\r\n\t    RealEarthAnimateTile.prototype.timeInit = function () {\r\n\t        _super.prototype.timeInit.call(this);\r\n\t        this._sourceUrls = [];\r\n\t    };\r\n\t    RealEarthAnimateTile.prototype._loadDates = function (inString) {\r\n\t        var rawDte = _super.prototype._loadDates.call(this, inString);\r\n\t        var dteProductUrl = \"http://realearth.ssec.wisc.edu/api/image?products=\" + this._products + \"_\" + rawDte + \"&x={x}&y={y}&z={z}\";\r\n\t        this._sourceUrls.push(dteProductUrl);\r\n\t        return '';\r\n\t    };\r\n\t    /**\r\n\t     * @protected\r\n\t     */\r\n\t    RealEarthAnimateTile.prototype._loadLatest = function () {\r\n\t        if (_super.prototype._loadLatest.call(this)) {\r\n\t            this._source.setUrl(this._sourceUrls[this._sourceUrls.length - 1]);\r\n\t        }\r\n\t        return true;\r\n\t    };\r\n\t    RealEarthAnimateTile.prototype.setLayerTime = function (theTime) {\r\n\t        if (_super.prototype.setLayerTime.call(this, theTime)) {\r\n\t            if (this._olLayer.getZIndex() < 0) {\r\n\t                this._olLayer.setZIndex(0);\r\n\t            }\r\n\t            this._source.setUrl(this._sourceUrls[this._currentIndex]);\r\n\t        }\r\n\t        else {\r\n\t            this._olLayer.setZIndex(-1);\r\n\t        }\r\n\t        return true;\r\n\t    };\r\n\t    return RealEarthAnimateTile;\r\n\t}(RealEarthAnimate_1.default));\r\n\tnm.RealEarthAnimateTile = RealEarthAnimateTile;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = RealEarthAnimateTile;\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","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\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    'http://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/_test/animate.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 2\n// module chunks = 0 1 2 3 4 5 6","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 3\n// module chunks = 0 1 2 3","/**\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\nfunction 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 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 * 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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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 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): 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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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 {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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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+lw6vCKBZehw01dEiyw4Q4aE0Z4ahDhKaFQsGnJ2BgqKoTBsNjFy0SlW6whRAZTdm8DBJmkBZhDi1j4xJQBk6ywrWUTymaCxac8lROcd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mTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+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/tSZErgOI4NgRBTIw9EmHAoFGZZnp6aGaJ2GTxfxYs8kKVUQh7WB5hQe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Jggg==')\";\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    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) {\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){\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 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 * This callback is displayed as part of the Requester class.\r\n * @callback styleFunc\r\n * @param {ol.Feature} feat - openlayers feature\r\n * @param {number} resolution - map resolution\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, opacity) {\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) {\r\n    return String(str)\r\n        .replace(/&/g, '&amp;')\r\n        .replace(/\"/g, '&quot;')\r\n        .replace(/'/g, '&#39;')\r\n        .replace(/</g, '&lt;')\r\n        .replace(/>/g, '&gt;');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface EsriResponse{\r\n    drawingInfo: {\r\n        renderer: EsriRenderer\r\n    },\r\n    geometryType: string\r\n}\r\n\r\nexport interface EsriRenderer{\r\n    type: string;\r\n    symbol: EsriSymbol;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\r\n}\r\n\r\nexport interface EsriSymbol{\r\n    size: number;\r\n    type: string;\r\n    outline:{\r\n        color: string;\r\n        width: number;\r\n    },\r\n    color: string;\r\n    width: number;\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n    legendHtml: string;\r\n    opacity: number;\r\n    symbolObj: EsriSymbol;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    /**\r\n     *\r\n     * @param symbolObj\r\n     * @param {number} opacity\r\n     */\r\n    constructor(symbolObj: EsriSymbol, 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: EsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n    constructor(symbolObj: EsriSymbol, 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}\">&#9679;</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: EsriSymbol, 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: EsriSymbol, 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\nclass SymbolGenerator {\r\n    opacity: number;\r\n    renderer: EsriRenderer;\r\n    legendHtml: string;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    constructor(esriResponse: 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}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n    symbol: EsriSymbol;\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, 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: EsriSymbol;\r\n    defaultStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n    defaultLabelHtml: string;\r\n    labelArray: Array<string>;\r\n    legendArray: Array<string>;\r\n    propertyStyleLookup: Object;\r\n    valueArray: Array<any>;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\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: EsriResponse, 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\r\n        this.olStyle = (feature: ol.Feature) => {\r\n            let checkProperties = feature.getProperties();\r\n            let checkProperty = checkProperties[this.propertyName];\r\n\r\n            let returnValue;\r\n            if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n                returnValue = [this.propertyStyleLookup[checkProperty]];\r\n            } else {\r\n               returnValue = [this.defaultStyle];\r\n            }\r\n\r\n            return returnValue;\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\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * style and legend object\r\n * @typedef {object} styleAndLegend\r\n * @property {styleFunc} style - style function\r\n * @property {string} legend - legend content\r\n */\r\n\r\n/**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @returns {styleAndLegend} style and legend object\r\n */\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: EsriResponse) {\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\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: 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\">&#9660;</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 * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse) {\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            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 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\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n    addPopup?: boolean;\r\n    showLayers?: Array<number>;\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\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, 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._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        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        this.addLegendContent();\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);\r\n            super.addLegendContent(newHtml);\r\n        }, 'json');\r\n    }\r\n\r\n\r\n    getPopupInfo(queryParams) {\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 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) {\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\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(\r\n        element: JQuery|HTMLElement|string,\r\n        changeFunc: changeFunction = (): void => {return;},\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['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) => { this.currentValue = newVal;}, 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, newMax, newValue, newStep) {\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\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout = null;\r\nlet dragged = false;\r\nlet lastVal;\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: Event): 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) {\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 {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\nlet g = new ol.Map({});\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: Array<number>, zoomLevel?: number): any\r\n}\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\r\n        this._projectionMap = null;\r\n        this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\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) {\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, evtType) {\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, 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    /**\r\n     * callback function on map move\r\n     * @param {object} d - the json response\r\n     */\r\n    mapMoveCallback(d) {\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 * 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\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) {\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, zoomLevel) {\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, evtType) {\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) {\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 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 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 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"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap c21684f02bf39ed965c4","webpack:///./src/_test/animate.ts","webpack:///./src/olHelpers/quickMap.ts","webpack:///./src/olHelpers/quickMapBase.ts","webpack:///./src/util/provide.ts","webpack:///external \"ol\"","webpack:///external \"$\"","webpack:///./src/olHelpers/mapMove.ts","webpack:///./src/olHelpers/mapMoveCls.ts","webpack:///./src/olHelpers/mapInteractionBase.ts","webpack:///./src/util/checkDefined.ts","webpack:///./src/util/makeGuid.ts","webpack:///./src/olHelpers/mapPopup.ts","webpack:///./src/olHelpers/mapPopupCls.ts","webpack:///./src/layers/LayerRealEarthTile.ts","webpack:///./src/layers/LayerBaseXyzTile.ts","webpack:///./src/layers/LayerBase.ts","webpack:///./src/olHelpers/zoomResolutionConvert.ts","webpack:///./src/mixin/RealEarthAnimateTile.ts","webpack:///./src/mixin/RealEarthAnimate.ts","webpack:///./src/domUtil/media-control.ts","webpack:///./src/domUtil/range-change.ts","webpack:///./src/layers/LayerBaseVectorEsri.ts","webpack:///./src/layers/LayerBaseVector.ts","webpack:///./src/olHelpers/esriToOlStyle.ts","webpack:///./src/layers/LayerEsriMapServer.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;ACtCA,sEAA+C;AAC/C,wFAA8D;AAC9D,+EAAsE;AACtE,8CAA6B;AAC7B,0FAAkE;AAClE,wFAAgE;AAGhE,KAAI,cAAc,GAAG,IAAI,4BAAkB,CAAC;KACpC,QAAQ,EAAE,UAAU;KACpB,EAAE,EAAE,iBAAiB;KACrB,OAAO,EAAE,GAAG;KACZ,OAAO,EAAE,IAAI;KACb,IAAI,EAAE,qBAAqB;KAC3B,eAAe;KACf,gBAAgB,EAAE,UAAU,CAAC;SACzB,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;KACnB,CAAC;EACJ,CACJ,CAAC;AAGF,KAAI,CAAC,GAAG,IAAI,IAAI,EAAE,CAAC;AACnB,KAAI,OAAO,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;AAC1B,EAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;AAC7B,KAAI,SAAS,GAAG,CAAC,CAAC,OAAO,EAAE,C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AAY,CAAC;qBAChE,CAAC;iBACL,CAAC;iBAED,SAAS,IAAI,UAAU,CAAC;iBAExB,kBAAQ,CAAC,yBAAyB,CAAC,MAAM,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;cAC5G;SACL,CAAC,EAAE,MAAM,CAAC,CAAC;SAEX,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC;aACtB,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC;SAChC,CAAC,CAAC,CAAC;KAEP,CAAC;KAMD,sBAAI,sCAAM;SAJV;;;YAGG;cACH;aACI,MAAM,CAAC,iBAAM,SAAS,WAA8B,CAAC;SACzD,CAAC;;;QAAA;KAMD,sBAAI,uCAAO;SAJX;;;YAGG;cACH;aACI,MAAM,CAAC,iBAAM,UAAU,WAAmB,CAAC;SAC/C,CAAC;;;QAAA;KACL,yBAAC;AAAD,EAAC,CAhJuC,qBAAS,GAgJhD;AAhJY,iDAAkB;AAiJ/B,GAAE,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;;AAC3C,mBAAe,kBAAkB,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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c21684f02bf39ed965c4","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\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    'http://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/_test/animate.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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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,iVBORw0KGgoAAAANSUhEUgAAADA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r48/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+YICUz4DZVaX2TiNDhuYfTtY4geLi0IoCm3XccwM9hx4kU28StQ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USCwoVDAwdBw8ZDgUREwYUGAYZFQYZGgkTFQoVGQsZFAwZHBMeDhIbFBEbHAwWIA4bIREcIQ4hCQwjFw4lHBgkDB8sDxUiExIiGhAoGxohFRshGRorHQcrKQsiIQwmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+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+nVHPdrhiXCxu42d86ByksDc80P3MkJFBFQ8Ho1lQegpWJRWFGsDsRwwv7pIyvuQW0ZkrX6NDVFbqcvaQI8vbyqzt5AARrsb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ryme5phAFRswlHjAudiP4dOy7CaxLgdJh9vUlU1702/+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    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/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['gv'].util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 4\n// module chunks = 0 2 3 7","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 5\n// module chunks = 0 2 3 4 5 7 8","/**\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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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 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): 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","/**\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\nfunction 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 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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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 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","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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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","/**\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) {\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){\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/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","/**\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 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) {\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\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(\r\n        element: JQuery|HTMLElement|string,\r\n        changeFunc: changeFunction = (): void => {return;},\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['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) => { this.currentValue = newVal;}, 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, newMax, newValue, newStep) {\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\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout = null;\r\nlet dragged = false;\r\nlet lastVal;\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: Event): 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) {\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\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) {\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, zoomLevel) {\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, evtType) {\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) {\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","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: Array<number>, zoomLevel?: number): any\r\n}\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\r\n        this._projectionMap = null;\r\n        this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\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) {\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, evtType) {\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, 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    /**\r\n     * callback function on map move\r\n     * @param {object} d - the json response\r\n     */\r\n    mapMoveCallback(d) {\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 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 * This callback is displayed as part of the Requester class.\r\n * @callback styleFunc\r\n * @param {ol.Feature} feat - openlayers feature\r\n * @param {number} resolution - map resolution\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, opacity) {\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) {\r\n    return String(str)\r\n        .replace(/&/g, '&amp;')\r\n        .replace(/\"/g, '&quot;')\r\n        .replace(/'/g, '&#39;')\r\n        .replace(/</g, '&lt;')\r\n        .replace(/>/g, '&gt;');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface EsriResponse{\r\n    drawingInfo: {\r\n        renderer: EsriRenderer\r\n    },\r\n    geometryType: string\r\n}\r\n\r\nexport interface EsriRenderer{\r\n    type: string;\r\n    symbol: EsriSymbol;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\r\n}\r\n\r\nexport interface EsriSymbol{\r\n    size: number;\r\n    type: string;\r\n    outline:{\r\n        color: string;\r\n        width: number;\r\n    },\r\n    color: string;\r\n    width: number;\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n    legendHtml: string;\r\n    opacity: number;\r\n    symbolObj: EsriSymbol;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    /**\r\n     *\r\n     * @param symbolObj\r\n     * @param {number} opacity\r\n     */\r\n    constructor(symbolObj: EsriSymbol, 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: EsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n    constructor(symbolObj: EsriSymbol, 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}\">&#9679;</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: EsriSymbol, 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: EsriSymbol, 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\nclass SymbolGenerator {\r\n    opacity: number;\r\n    renderer: EsriRenderer;\r\n    legendHtml: string;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    constructor(esriResponse: 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}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n    symbol: EsriSymbol;\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, 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: EsriSymbol;\r\n    defaultStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n    defaultLabelHtml: string;\r\n    labelArray: Array<string>;\r\n    legendArray: Array<string>;\r\n    propertyStyleLookup: Object;\r\n    valueArray: Array<any>;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\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: EsriResponse, 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\r\n        this.olStyle = (feature: ol.Feature) => {\r\n            let checkProperties = feature.getProperties();\r\n            let checkProperty = checkProperties[this.propertyName];\r\n\r\n            let returnValue;\r\n            if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n                returnValue = [this.propertyStyleLookup[checkProperty]];\r\n            } else {\r\n               returnValue = [this.defaultStyle];\r\n            }\r\n\r\n            return returnValue;\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\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * style and legend object\r\n * @typedef {object} styleAndLegend\r\n * @property {styleFunc} style - style function\r\n * @property {string} legend - legend content\r\n */\r\n\r\n/**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @returns {styleAndLegend} style and legend object\r\n */\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: EsriResponse) {\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\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: 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\">&#9660;</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 * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse) {\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            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 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\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n    addPopup?: boolean;\r\n    showLayers?: Array<number>;\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\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, 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._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        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        this.addLegendContent();\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);\r\n            super.addLegendContent(newHtml);\r\n        }, 'json');\r\n    }\r\n\r\n\r\n    getPopupInfo(queryParams) {\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"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/another.js b/test-html/js/another.js
index 7a428111b7f4d228e9fac29360843d6f9e81e801..dcd33182b698e0e29382ade353e4fe46282f3608 100644
--- a/test-html/js/another.js
+++ b/test-html/js/another.js
@@ -1,2 +1,59 @@
-!function(e){function o(n){if(r[n])return r[n].exports;var t=r[n]={exports:{},id:n,loaded:!1};return e[n].call(t.exports,t,t.exports,o),t.loaded=!0,t.exports}var r={};return o.m=e,o.c=r,o.p="",o(0)}([function(e,o){console.log("here is another"),console.log("here is another")}]);
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!*******************************!*\
+  !*** ./dist/_test/another.js ***!
+  \*******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 9/22/2016.
+	 */
+	console.log('here is another');
+	console.log('here is another');
+
+
+/***/ }
+/******/ ]);
 //# sourceMappingURL=another.js.map
\ No newline at end of file
diff --git a/test-html/js/another.js.map b/test-html/js/another.js.map
index 86ba0a31bbab0ff5db49d296dbb56d1a9298d367..16964d396f0a18c612416f1afb5a8478fde87c46 100644
--- a/test-html/js/another.js.map
+++ b/test-html/js/another.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///another.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457*******","webpack:///./src/_test/another.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","console","log"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAASI,EAAQD,GExCvBQ,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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 9/22/2016.\r\n\t */\r\n\tconsole.log('here is another');\r\n\tconsole.log('here is another');\r\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","/**\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/_test/another.ts"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap 6e5b1af915babfe1fe92?33e6","webpack:///./src/_test/another.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;ACtCA;;IAEG;AAEH,QAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC/B,QAAO,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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6e5b1af915babfe1fe92","/**\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/_test/another.ts"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/compare-test.js b/test-html/js/compare-test.js
index 1bbee29322d7ce60f493e8994faa3f75c0cd9bc0..a2d22f1ce86d494dc99c38f5e9818127b6186c13 100644
--- a/test-html/js/compare-test.js
+++ b/test-html/js/compare-test.js
@@ -1,3 +1,2307 @@
-!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";var n=o(12),r=o(31),i=o(16),a=n.quickMap(),l=new r.default(a),s=new i.LayerEsriMapServer("http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer",{minZoom:6,maxZoom:12,name:"WisDOT Regions"}),p=new i.LayerEsriMapServer("http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer",{minZoom:7,visible:!0,name:"Metamanager Segments"}),u=new i.LayerEsriMapServer("http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer",{minZoom:7,visible:!0,name:"truck2014",showLayers:[8]}),c=new i.LayerEsriMapServer("http://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)},function(e,t){"use strict";function o(e){"undefined"==typeof window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){var r=o[t[n]];"undefined"==typeof r&&(o[t[n]]={}),o=o[t[n]]}return o}o("util"),window.gv.util.provide=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},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,o="x"==e?t:3&t|8;return o.toString(16)})}var r=o(1),i=r.default("util");i.makeGuid=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";var n=o(11);t.mapPopup=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapPopup},function(e,t,o){"use strict";var n=o(1),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,o){"use strict";var n=o(10);t.mapMove=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapMove},function(e,t,o){"use strict";var n=o(14),r=o(1),i=o(4),a=o(2),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),"undefined"!=typeof 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="");var t=e.indexOf("<ul>")>-1;t&&(e='<span class="legend-items-expander" title="Expand/Collapse">&#9660;</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("&#9660;")):(e.addClass("legend-layer-group-collapsed"),e.html("&#9654;"))}),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s},function(e,t,o){"use strict";function n(e){return"undefined"==typeof e||null===e}function r(e){return!n(e)}var i=o(1),a=i.default("util.checkDefined");t.undefinedOrNull=n,a.undefinedOrNull=n,t.definedAndNotNull=r,a.definedAndNotNull=r},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),i=o(9),a=o(1),l=o(4),s=o(2),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("undefined"==typeof e&&"undefined"==typeof 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){return void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1?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(t&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))))},t.prototype.addCallback=function(e,t,o,n,r){return this._mapMoveCallbacks.indexOf(e)>-1?void console.log("this function already added to map move"):(this._checkInit(),r||(r=l.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=r,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(n&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))))},t}(r.default);t.MapMoveCls=u,p.MapMoveCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),i=o(1),a=o(3),l=o(2),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._arrPopupLayerNames=[],t._arrPopupLayers=[],t._arrPopupOlLayers=[],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)};return 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">&#9664;</span>',c+='<span class="next-popup ol-popup-nav-arrow">&#9654;</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span>&nbsp;of&nbsp;</span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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=o.map.hasFeatureAtPixel(t,function(e){for(var t=0,n=o._arrPopupOlLayers;t<n.length;t++){var r=n[t];if(e==r)return!0}return!1}),r=o.map.getTargetElement();r.style.cursor=n?"pointer":""}}),!0},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++){var a=i[r];a(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=t._arrPopupOlLayers.indexOf(n);r>-1&&o.push(new p(e,t._arrPopupLayers[r],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._arrPopupLayerNames.push(e.name),this._arrPopupLayers.push(e),this._arrPopupOlLayers.push(e.olLayer),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._arrPopupLayerNames.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupOlLayers.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++){var n=o[t];n()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";function n(e){var t=r.quickMapBase(e);return a.default.init(t),l.default.init(t),t}var r=o(13),i=o(1),a=o(7),l=o(5),s=i.default("olHelpers");t.quickMap=n,s.quickMap=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";function n(e){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;var t=a("#"+e.divId);t.css("position","relative");var o=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 n=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),n.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var r=n.getCoordinates();e.center.x=r[0],e.center.y=r[1]}var l=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:[o],target:e.divId,controls:l,view:s});return e.fullScreen&&p.addControl(new i.control.FullScreen({})),p}var r=o(1),i=o(3),a=o(2),l=r.default("olHelpers");t.quickMapBase=n,l.quickMapBase=n,Object.defineProperty(t,"__esModule",{value:!0}),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}var i=o(1),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";function n(e,t){return"rgba("+e[0]+","+e[1]+","+e[2]+","+t+")"}function r(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function i(e){var t=e.drawingInfo.renderer,o=null;switch(t.type){case"simple":switch(e.geometryType){case"esriGeometryPoint":o=new g(e,y);break;case"esriGeometryPolyline":o=new g(e,h);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,y);break;case"esriGeometryPolyline":o=new _(e,h);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">&#9660;</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){var t="",o=e.layers;if(1==o.length)t+=a(o[0],!0);else{t+="<ul>";for(var n=0;n<o.length;n++)t+="<li>"+a(o[n])+"</li>";t+="</ul>"}return t}var s=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},p=o(1),u=o(3),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+'">&#9679;</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),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,o=e.getProperties(),r=o[n.propertyName];return t=void 0!==n.propertyStyleLookup[r]?[n.propertyStyleLookup[r]]:[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},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(8),i=o(15),a=o(5),l=o(1),s=o(3),p=o(2),u=l.default("layers"),c=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._source=new s.source.TileArcGISRest({url:""==n.url?void 0:n.url,params:"undefined"==typeof o.showLayers?void 0:{layers:"show:"+o.showLayers.join(",")}}),n._olLayer=new s.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 s.format.EsriJSON,n._popupRequest=null,n.addLegendContent(),o.addPopup&&a.default.addMapServicePopup(n),n}return n(t,e),t.prototype.addLegendContent=function(t){var o=this,n=this.url;"/"!==n[n.length-1]&&(n+="/"),n+="legend?f=pjson&callback=?",p.get(n,{},function(t){var n=i.makeMapServiceLegend(t);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=p.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 l in r.attributes)if(r.attributes.hasOwnProperty(l)){var s=r.attributes[l];if(null==s||"null"==s.toString().toLowerCase())continue;var p=l;p.length>14&&(p=p.slice(0,11)+"..."),i+="<tr><td>"+p+"</td><td>"+s+"</td></tr>"}i+="</table>",a.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}(r.LayerBase);t.LayerEsriMapServer=c,u.LayerEsriMapServer=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c},,,,,,,,,,,,,,,function(e,t,o){"use strict";var n=o(1),r=o(2),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){var t=e.context;t.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){var t=e.context;t.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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a}]);
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!************************************!*\
+  !*** ./dist/_test/compare-test.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 6/1/2016.
+	 */
+	var quickMap_1 = __webpack_require__(/*! ../olHelpers/quickMap */ 1);
+	var layerSwipe_1 = __webpack_require__(/*! ../olHelpers/layerSwipe */ 25);
+	var LayerEsriMapServer_1 = __webpack_require__(/*! ../layers/LayerEsriMapServer */ 24);
+	var map = quickMap_1.quickMap();
+	var swiper = new layerSwipe_1.default(map);
+	var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('http://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('http://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('http://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('http://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);
+
+
+/***/ },
+/* 1 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/quickMap.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var quickMapBase_1 = __webpack_require__(/*! ./quickMapBase */ 2);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var mapMove_1 = __webpack_require__(/*! ./mapMove */ 6);
+	var mapPopup_1 = __webpack_require__(/*! ./mapPopup */ 11);
+	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) {
+	    var m = quickMapBase_1.quickMapBase(options);
+	    mapMove_1.default.init(m);
+	    mapPopup_1.default.init(m);
+	    return m;
+	}
+	exports.quickMap = quickMap;
+	nm.quickMap = quickMap;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMap;
+
+
+/***/ },
+/* 2 */
+/*!****************************************!*\
+  !*** ./dist/olHelpers/quickMapBase.js ***!
+  \****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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) {
+	    options = 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;
+	    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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5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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==')";
+	    if (options.baseSwitcher) {
+	    }
+	    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({}));
+	    }
+	    return map;
+	}
+	exports.quickMapBase = quickMapBase;
+	nm.quickMapBase = quickMapBase;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMapBase;
+
+
+/***/ },
+/* 3 */
+/*!******************************!*\
+  !*** ./dist/util/provide.js ***!
+  \******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = provide;
+
+
+/***/ },
+/* 4 */
+/*!*********************!*\
+  !*** external "ol" ***!
+  \*********************/
+/***/ function(module, exports) {
+
+	module.exports = ol;
+
+/***/ },
+/* 5 */
+/*!********************!*\
+  !*** external "$" ***!
+  \********************/
+/***/ function(module, exports) {
+
+	module.exports = $;
+
+/***/ },
+/* 6 */
+/*!***********************************!*\
+  !*** ./dist/olHelpers/mapMove.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapMoveCls_1 = __webpack_require__(/*! ./mapMoveCls */ 7);
+	/**
+	 * The single map move object catch is that it is common to multimap pages
+	 * @type {MapMoveCls}
+	 */
+	exports.mapMove = new mapMoveCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapMove;
+
+
+/***/ },
+/* 7 */
+/*!**************************************!*\
+  !*** ./dist/olHelpers/mapMoveCls.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var checkDefined = __webpack_require__(/*! ../util/checkDefined */ 9);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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] = functionId;
+	        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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapMoveCls;
+
+
+/***/ },
+/* 8 */
+/*!**********************************************!*\
+  !*** ./dist/olHelpers/mapInteractionBase.js ***!
+  \**********************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 12/8/2015.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapInteractionBase;
+
+
+/***/ },
+/* 9 */
+/*!***********************************!*\
+  !*** ./dist/util/checkDefined.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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 */
+/*!*******************************!*\
+  !*** ./dist/util/makeGuid.js ***!
+  \*******************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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);
+	    });
+	}
+	nm.makeGuid = makeGuid;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = makeGuid;
+
+
+/***/ },
+/* 11 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/mapPopup.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapPopupCls_1 = __webpack_require__(/*! ./mapPopupCls */ 12);
+	/**
+	 * The single popup object catch is that it is common to multimap pages
+	 * @type {MapPopupCls}
+	 */
+	exports.mapPopup = new mapPopupCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapPopup;
+
+
+/***/ },
+/* 12 */
+/*!***************************************!*\
+  !*** ./dist/olHelpers/mapPopupCls.js ***!
+  \***************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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
+	     * &param feature the openlayers vector feature
+	     * $param
+	     */
+	    /**
+	     * map popup constructor
+	     */
+	    function MapPopupCls() {
+	        var _this = _super.call(this, 'map popup') || this;
+	        _this._arrPopupLayerIds = [];
+	        _this._arrPopupLayerNames = [];
+	        _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) {
+	                }
+	                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">&#9664;</span>';
+	            popupHtml += '<span class="next-popup ol-popup-nav-arrow">&#9654;</span>';
+	            popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>";
+	            popupHtml += "<span>&nbsp;of&nbsp;</span>";
+	            popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>";
+	            popupHtml += "<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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 = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {
+	                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {
+	                    var olLayer = _a[_i];
+	                    if (lyrCandidate == olLayer) {
+	                        return true;
+	                    }
+	                }
+	                return false;
+	            });
+	            var mapElement = _this.map.getTargetElement();
+	            mapElement.style.cursor = hit ? 'pointer' : '';
+	        });
+	        return true;
+	    };
+	    /**
+	     * 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 lyrIndex = _this._arrPopupOlLayers.indexOf(layer);
+	            if (lyrIndex > -1) {
+	                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));
+	            }
+	        });
+	        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._arrPopupLayerNames.push(lyr.name);
+	        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._arrPopupLayerNames.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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapPopupCls;
+
+
+/***/ },
+/* 13 */,
+/* 14 */,
+/* 15 */
+/*!**********************************!*\
+  !*** ./dist/layers/LayerBase.js ***!
+  \**********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var zoomResolutionConvert = __webpack_require__(/*! ../olHelpers/zoomResolutionConvert */ 16);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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">&#9660;</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('&#9660;');
+	                    }
+	                    else {
+	                        $this.addClass('legend-layer-group-collapsed');
+	                        $this.html('&#9654;');
+	                    }
+	                });
+	                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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBase;
+
+
+/***/ },
+/* 16 */
+/*!*************************************************!*\
+  !*** ./dist/olHelpers/zoomResolutionConvert.js ***!
+  \*************************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/14/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+
+
+/***/ },
+/* 17 */,
+/* 18 */,
+/* 19 */,
+/* 20 */,
+/* 21 */,
+/* 22 */,
+/* 23 */
+/*!*****************************************!*\
+  !*** ./dist/olHelpers/esriToOlStyle.js ***!
+  \*****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 1/4/2016.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var nm = provide_1.default('olHelpers.esriToOlStyle');
+	/**
+	 * This callback is displayed as part of the Requester class.
+	 * @callback styleFunc
+	 * @param {ol.Feature} feat - openlayers feature
+	 * @param {number} resolution - map resolution
+	 */
+	/**
+	 *
+	 * @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, '&amp;')
+	        .replace(/"/g, '&quot;')
+	        .replace(/'/g, '&#39;')
+	        .replace(/</g, '&lt;')
+	        .replace(/>/g, '&gt;');
+	}
+	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 + "\">&#9679;</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];
+	            var returnValue;
+	            if (_this.propertyStyleLookup[checkProperty] !== undefined) {
+	                returnValue = [_this.propertyStyleLookup[checkProperty]];
+	            }
+	            else {
+	                returnValue = [_this.defaultStyle];
+	            }
+	            return returnValue;
+	        };
+	        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));
+	/**
+	 * style and legend object
+	 * @typedef {object} styleAndLegend
+	 * @property {styleFunc} style - style function
+	 * @property {string} legend - legend content
+	 */
+	/**
+	 *
+	 * @param {object} esriResponse - layer info
+	 * @returns {styleAndLegend} style and legend object
+	 */
+	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">&#9660;</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
+	 * @returns {string} legend content
+	 */
+	function makeMapServiceLegend(esriResponse) {
+	    "use strict";
+	    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++) {
+	            newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';
+	        }
+	        newLegendHtml += '</ul>';
+	    }
+	    return newLegendHtml;
+	}
+	exports.makeMapServiceLegend = makeMapServiceLegend;
+	nm.makeMapServiceLegend = makeMapServiceLegend;
+
+
+/***/ },
+/* 24 */
+/*!*******************************************!*\
+  !*** ./dist/layers/LayerEsriMapServer.js ***!
+  \*******************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 12/7/2015.
+	 */
+	var LayerBase_1 = __webpack_require__(/*! ./LayerBase */ 15);
+	var esriToOl = __webpack_require__(/*! ../olHelpers/esriToOlStyle */ 23);
+	var mapPopup_1 = __webpack_require__(/*! ../olHelpers/mapPopup */ 11);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	var nm = provide_1.default('layers');
+	/**
+	 * 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._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;
+	        _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);
+	            _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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerEsriMapServer;
+
+
+/***/ },
+/* 25 */
+/*!**************************************!*\
+  !*** ./dist/olHelpers/layerSwipe.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 6/1/2016.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerSwipe;
+
+
+/***/ }
+/******/ ]);
 //# sourceMappingURL=compare-test.js.map
\ No newline at end of file
diff --git a/test-html/js/compare-test.js.map b/test-html/js/compare-test.js.map
index 263551e5cc497362892dff14fba5ebb74429cb3d..bfa88e5ab01bd70eddc4acda82d0d3d0d6428b21 100644
--- a/test-html/js/compare-test.js.map
+++ b/test-html/js/compare-test.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///compare-test.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457**","webpack:///./src/_test/compare-test.ts","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/mapMove.ts?6a2b**","webpack:///./src/layers/LayerBase.ts?bf94**","webpack:///./src/util/checkDefined.ts?bcd7**","webpack:///./src/olHelpers/mapMoveCls.ts?cd45**","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7**","webpack:///./src/olHelpers/quickMap.ts?1069**","webpack:///./src/olHelpers/quickMapBase.ts?fb65**","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b**","webpack:///./src/olHelpers/esriToOlStyle.ts?9363*","webpack:///./src/layers/LayerEsriMapServer.ts?9c85*","webpack:///./src/olHelpers/layerSwipe.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","quickMap_1","layerSwipe_1","LayerEsriMapServer_1","map","quickMap","swiper","default","wisDotRegions","LayerEsriMapServer","minZoom","maxZoom","name","metamanagerSegments","visible","truckSpeed2014","showLayers","truckSpeed2015","addLayer","olLayer","addLeftLayer","addRightLayer","provide","namespace","window","parts","split","nameSpace","i","length","newObject","util","Object","defineProperty","value","$","ol","makeGuid","replace","r","Math","random","v","toString","provide_1","nm","mapPopupCls_1","mapPopup","MapInteractionBase","subtype","this","_map","_initialized","_subtype","prototype","init","theMap","get","enumerable","configurable","_checkInit","initialized","msg","alert","console","log","checkInit","mapMoveCls_1","mapMove","zoomResolutionConvert","makeGuid_1","LayerBase","url","options","_url","_params","params","_legendCollapse","legendCollapse","_legendCheckbox","legendCheckbox","_name","animate","_opacity","opacity","_visible","_source","undefined","_olLayer","_loaded","_maxResolution","zoomToResolution","_minResolution","_minZoom","_maxZoom","_zIndex","zIndex","loadCallback","_legendContent","_$legendDiv","_applyCollapseCalled","_addLegendContent","legendContent","_load","getLegendDiv","additionalContent","addCollapse","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","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","undefinedOrNull","input","definedAndNotNull","__extends","d","b","__","constructor","hasOwnProperty","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_this","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","getView","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","clear","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","push","addCallback","func","context","delay","FeatureLayerProperties","feature","layer","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayerNames","_arrPopupLayers","_arrPopupOlLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","n","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","addOverlay","evt","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","l","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","addFeature","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","hasFeatureAtPixel","lyrCandidate","mapElement","getTargetElement","style","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","forEachFeatureAtPixel","lyrIndex","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","color","width","theStyle","olStyle","Style","stroke","Stroke","image","Circle","radius","fill","Fill","Vector","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","quickMapBase_1","quickMapBase","mapMove_1","mapPopup_1","divId","center","x","y","zoom","baseSwitcher","fullScreen","$mapDiv","css","osmLayer","Tile","OSM","geom","Point","proj","Projection","code","transform","coordinates","getCoordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","_colorArrayToRgba","colorArray","htmlEscape","str","String","makeFeatureServiceLegendAndSymbol","esriResponse","renderer","drawingInfo","symbolLegendOut","SingleSymbol","PointSymbol","LineSymbol","PolygonSymbol","UniqueValueSymbol","legend","legendHtml","mapServiceLegendItem","lyrObject","skipLayerNameAndExpander","legendItems","makeMapServiceLegend","newLegendHtml","CommonSymbol","symbolObj","innerColor","outerColor","outline","outlineWidth","size","Icon","src","lineWidth","SymbolGenerator","SymbolClass","symbol","uniqueValueInfos","propertyName","defaultSymbol","defaultStyle","defaultLabelHtml","valueArray","labelArray","legendArray","propertyStyleLookup","uniqueVal","uniqueSym","returnValue","checkProperties","checkProperty","_b","_c","h","LayerBase_1","esriToOl","TileArcGISRest","minResolution","maxResolution","addPopup","_esriFormat","format","EsriJSON","_popupRequest","urlCopy","newHtml","a","attrVal","toLowerCase","attr","slice","readFeature","LayerSwipe","sliderContent","leftLayers","rightLayers","_percentRight","offset","$mapElement","$swiper","percentRight","dragging","mouseleave","bind","preventDefault","mousedown","offsetX","mouseup","mousemove","mapLeft","position","left","mapWidth","pageX","event","canvas","save","beginPath","rect","height","clip","restore","percent","maxed","render"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAA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y,cAAgB0B,EACrBra,KAAK8Y,QAAQxG,IAAI,OAAWtS,KAAK2Y,cAAcjJ,QAAQ,GAAE,KACzD1P,KAAKC,KAAKsa,WnB4iET/Z,YAAY,EACZC,cAAc,ImB3iEvB8X,IAEA5Y,GAAG4Y,WAAaA,EnB8iEfzZ,OAAOC,eAAexC,EAAS,cAAgByC,OAAO,ImB7iEvDzC,EAAAc,QAAekb","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 6/1/2016.\r\n\t */\r\n\tvar quickMap_1 = __webpack_require__(12);\r\n\tvar layerSwipe_1 = __webpack_require__(31);\r\n\tvar LayerEsriMapServer_1 = __webpack_require__(16);\r\n\tvar map = quickMap_1.quickMap();\r\n\tvar swiper = new layerSwipe_1.default(map);\r\n\tvar wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer', {\r\n\t    minZoom: 6,\r\n\t    maxZoom: 12,\r\n\t    name: 'WisDOT Regions'\r\n\t});\r\n\tvar metamanagerSegments = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/MM_All_Segments/MapServer', {\r\n\t    minZoom: 7,\r\n\t    visible: true,\r\n\t    name: 'Metamanager Segments'\r\n\t});\r\n\tvar truckSpeed2014 = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', {\r\n\t    minZoom: 7,\r\n\t    visible: true,\r\n\t    name: 'truck2014',\r\n\t    showLayers: [8]\r\n\t});\r\n\tvar truckSpeed2015 = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/NPMRDS/compareDynamic/MapServer', {\r\n\t    minZoom: 7,\r\n\t    visible: true,\r\n\t    name: 'truck2015',\r\n\t    showLayers: [9]\r\n\t});\r\n\tmap.addLayer(wisDotRegions.olLayer);\r\n\tmap.addLayer(truckSpeed2014.olLayer);\r\n\tmap.addLayer(truckSpeed2015.olLayer);\r\n\tmap.addLayer(metamanagerSegments.olLayer);\r\n\tswiper.addLeftLayer(wisDotRegions);\r\n\tswiper.addRightLayer(metamanagerSegments);\r\n\tswiper.addLeftLayer(truckSpeed2014);\r\n\tswiper.addRightLayer(truckSpeed2015);\r\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\t/**\r\n\t * create a namespace on the gv object\r\n\t * @param {string} namespace to create\r\n\t * @returns {object} object representing the namespace\r\n\t */\r\n\tfunction provide(namespace) {\r\n\t    \"use strict\";\r\n\t    if (typeof window['gv'] == 'undefined') {\r\n\t        window['gv'] = {};\r\n\t    }\r\n\t    var parts = namespace.split('.');\r\n\t    var nameSpace = window['gv'];\r\n\t    for (var i = 0; i < parts.length; i++) {\r\n\t        var newObject = nameSpace[parts[i]];\r\n\t        if (typeof newObject == 'undefined') {\r\n\t            nameSpace[parts[i]] = {};\r\n\t        }\r\n\t        nameSpace = nameSpace[parts[i]];\r\n\t    }\r\n\t    return nameSpace;\r\n\t}\r\n\tprovide('util');\r\n\twindow['gv'].util.provide = provide;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = provide;\r\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = $;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = ol;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util');\r\n\t/**\r\n\t * guids are used to uniquely identify groups and features\r\n\t * @returns {string} a new guid\r\n\t */\r\n\tfunction makeGuid() {\r\n\t    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n\t        .replace(/[xy]/g, function (c) {\r\n\t        var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\t        return v.toString(16);\r\n\t    });\r\n\t}\r\n\tnm.makeGuid = makeGuid;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = makeGuid;\r\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapPopupCls_1 = __webpack_require__(11);\r\n\t/**\r\n\t * The single popup object catch is that it is common to multimap pages\r\n\t * @type {MapPopupCls}\r\n\t */\r\n\texports.mapPopup = new mapPopupCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapPopup;\r\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 12/8/2015.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * base interaction\r\n\t */\r\n\tvar MapInteractionBase = (function () {\r\n\t    /**\r\n\t     * map interaction base\r\n\t     * @param subtype - the interaction subtype\r\n\t     */\r\n\t    function MapInteractionBase(subtype) {\r\n\t        this._map = null;\r\n\t        this._initialized = false;\r\n\t        this._subtype = subtype;\r\n\t    }\r\n\t    /**\r\n\t     * base initializer, returns true for already initialized\r\n\t     * @param theMap - the ol Map\r\n\t     * @returns true for already initialized\r\n\t     */\r\n\t    MapInteractionBase.prototype.init = function (theMap) {\r\n\t        if (!this._initialized) {\r\n\t            this._map = theMap;\r\n\t            this._initialized = true;\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n\t        /**\r\n\t         * get reference to the ol map object\r\n\t         * @returns {ol.Map} the map object\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._map;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n\t        /**\r\n\t         * get if is initialized\r\n\t         * @returns {boolean} is initialized\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._initialized;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     * @protected\r\n\t     */\r\n\t    MapInteractionBase.prototype._checkInit = function () {\r\n\t        if (!this.initialized) {\r\n\t            var msg = this._subtype + \" object not initialized\";\r\n\t            alert(msg);\r\n\t            console.log(msg);\r\n\t            throw msg;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     */\r\n\t    MapInteractionBase.prototype.checkInit = function () {\r\n\t        this._checkInit();\r\n\t    };\r\n\t    return MapInteractionBase;\r\n\t}());\r\n\texports.MapInteractionBase = MapInteractionBase;\r\n\tnm.MapInteractionBase = MapInteractionBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapInteractionBase;\r\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapMoveCls_1 = __webpack_require__(10);\r\n\t/**\r\n\t * The single map move object catch is that it is common to multimap pages\r\n\t * @type {MapMoveCls}\r\n\t */\r\n\texports.mapMove = new mapMoveCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapMove;\r\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar zoomResolutionConvert = __webpack_require__(14);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * The base layer class\r\n\t * @abstract\r\n\t */\r\n\tvar LayerBase = (function () {\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {string} url - url for source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id=makeGuid()] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] - the z index for the layer\r\n\t     * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n\t     */\r\n\t    function LayerBase(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        options = options || {};\r\n\t        if (typeof url !== 'string') {\r\n\t            throw 'Invalid URL';\r\n\t        }\r\n\t        this._url = url;\r\n\t        this._params = typeof options.params == 'object' ? options.params : {};\r\n\t        this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n\t        this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\t        this.id = options.id || makeGuid_1.default();\r\n\t        this._name = options.name || 'Unnamed Layer';\r\n\t        this.animate = false;\r\n\t        this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\t        if (this._opacity > 1) {\r\n\t            this._opacity = 1;\r\n\t        }\r\n\t        else if (this._opacity < 0) {\r\n\t            this._opacity = 0;\r\n\t        }\r\n\t        this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\t        this._source = undefined;\r\n\t        /**\r\n\t         *\r\n\t         * @protected\r\n\t         */\r\n\t        this._olLayer = undefined;\r\n\t        this._loaded = false;\r\n\t        this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n\t        if (typeof this._maxResolution !== 'undefined') {\r\n\t            this._maxResolution += 0.00001;\r\n\t        }\r\n\t        this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\t        this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n\t        this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n\t        this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\t        this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n\t        };\r\n\t        this._legendContent = '';\r\n\t        if (this._legendCheckbox) {\r\n\t            this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n\t                (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n\t            this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        else {\r\n\t            this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        this._$legendDiv = null;\r\n\t        this._applyCollapseCalled = false;\r\n\t        this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n\t    }\r\n\t    /**\r\n\t     * base load function, sets _loaded = true if it is not already\r\n\t     * @protected\r\n\t     * @returns {boolean} if already loaded\r\n\t     */\r\n\t    LayerBase.prototype._load = function () {\r\n\t        if (this.loaded == true) {\r\n\t            return true;\r\n\t        }\r\n\t        else {\r\n\t            this._loaded = true;\r\n\t            return false;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Get the legend html, be sure to only add to the DOM once\r\n\t     * @returns {string} html for layer wrapped in a div\r\n\t     */\r\n\t    LayerBase.prototype.getLegendDiv = function () {\r\n\t        return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param additionalContent - additional content to add to legend\r\n\t     * @private\r\n\t     */\r\n\t    LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n\t        if (additionalContent === void 0) { additionalContent = ''; }\r\n\t        var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\t        if (addCollapse) {\r\n\t            additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">&#9660;</span>' + additionalContent;\r\n\t        }\r\n\t        this._legendContent += additionalContent;\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            this._$legendDiv.append(additionalContent);\r\n\t            this.applyCollapse();\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=] - additonal content to add\r\n\t     */\r\n\t    LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n\t        this._addLegendContent(additionalContent);\r\n\t    };\r\n\t    LayerBase.prototype.applyCollapse = function () {\r\n\t        if (this._applyCollapseCalled) {\r\n\t            console.log('collapse already applied');\r\n\t            return undefined;\r\n\t        }\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            var $expander = this._$legendDiv.find('.legend-items-expander');\r\n\t            if ($expander.length > 0) {\r\n\t                this._applyCollapseCalled = true;\r\n\t                $expander.click(function () {\r\n\t                    var $this = $(this);\r\n\t                    $this.siblings('ul').slideToggle();\r\n\t                    if ($this.hasClass('legend-layer-group-collapsed')) {\r\n\t                        $this.removeClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9660;');\r\n\t                    }\r\n\t                    else {\r\n\t                        $this.addClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9654;');\r\n\t                    }\r\n\t                });\r\n\t                if (this._legendCollapse) {\r\n\t                    $expander.trigger('click');\r\n\t                }\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * trick to refresh the layer\r\n\t     */\r\n\t    LayerBase.prototype.refresh = function () {\r\n\t        if (this.source) {\r\n\t            this.source.refresh();\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"id\", {\r\n\t        get: function () {\r\n\t            return this._id;\r\n\t        },\r\n\t        set: function (newId) {\r\n\t            this._id = newId;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n\t        get: function () {\r\n\t            return this._animate;\r\n\t        },\r\n\t        set: function (animate) {\r\n\t            this._animate = animate;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n\t        /**\r\n\t         * get the legend content\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._legendContent;\r\n\t        },\r\n\t        /**\r\n\t         * set the legend content directly\r\n\t         * @param {string} newVal - new content\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newVal) {\r\n\t            this._legendContent = newVal;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"params\", {\r\n\t        /**\r\n\t         * get the map get params\r\n\t         * @type {object}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._params;\r\n\t        },\r\n\t        /**\r\n\t         * set the map get params\r\n\t         * @param {object} newParams - new get params\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newParams) {\r\n\t            this._params = newParams;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n\t        /**\r\n\t         * get the minimum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n\t        /**\r\n\t         * get the maximum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n\t        /**\r\n\t         * get min zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n\t        /**\r\n\t         * get max zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"url\", {\r\n\t        /**\r\n\t         * get the url\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._url;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n\t        /**\r\n\t         * Get the layer visibility\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._visible;\r\n\t        },\r\n\t        /**\r\n\t         * set the visibility\r\n\t         * @param visibility\r\n\t         */\r\n\t        set: function (visibility) {\r\n\t            this.setVisible(visibility);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setVisible = function (visibility) {\r\n\t        this._visible = visibility;\r\n\t        if (this.olLayer) {\r\n\t            this.olLayer.setVisible(this._visible);\r\n\t            if (visibility && !this._loaded) {\r\n\t                this._load();\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n\t        /**\r\n\t         * Get the layer opacity\r\n\t         * @type {number}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._opacity;\r\n\t        },\r\n\t        /**\r\n\t         * Set the layer opacity\r\n\t         * @param {number} opacity - layer opacity\r\n\t         */\r\n\t        set: function (opacity) {\r\n\t            this._opacity = opacity;\r\n\t            if (this.olLayer) {\r\n\t                this.olLayer.setOpacity(this._opacity);\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"name\", {\r\n\t        /**\r\n\t         * Get the layer name\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._name;\r\n\t        },\r\n\t        /**\r\n\t         * set the layer name\r\n\t         * @param {string} newName - the new name\r\n\t         */\r\n\t        set: function (newName) {\r\n\t            this._name = newName;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n\t        /**\r\n\t         * Check if the layer is loaded\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._loaded;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"source\", {\r\n\t        /**\r\n\t         * get the layer source\r\n\t         * @type {*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getSource();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getSource = function () {\r\n\t        return this._source;\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n\t        /**\r\n\t         * get the z index\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._zIndex;\r\n\t        },\r\n\t        /**\r\n\t         * set the z index\r\n\t         */\r\n\t        set: function (newZ) {\r\n\t            this._zIndex = newZ;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setZIndex = function (newZ) {\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         * the the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getOlLayer();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getOlLayer = function () {\r\n\t        return this._olLayer;\r\n\t    };\r\n\t    return LayerBase;\r\n\t}());\r\n\texports.LayerBase = LayerBase;\r\n\tnm.LayerBase = LayerBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBase;\r\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util.checkDefined');\r\n\t/**\r\n\t * check if the input is undefined or null\r\n\t * @param input - input pointer\r\n\t * @returns true undefined or null\r\n\t */\r\n\tfunction undefinedOrNull(input) {\r\n\t    \"use strict\";\r\n\t    return (typeof input === 'undefined' || input === null);\r\n\t}\r\n\texports.undefinedOrNull = undefinedOrNull;\r\n\tnm.undefinedOrNull = undefinedOrNull;\r\n\t/**\r\n\t * check if the input is defined and not null\r\n\t * @param input - input pointer\r\n\t * @returns true defined and not null\r\n\t */\r\n\tfunction definedAndNotNull(input) {\r\n\t    \"use strict\";\r\n\t    return !(undefinedOrNull(input));\r\n\t}\r\n\texports.definedAndNotNull = definedAndNotNull;\r\n\tnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar checkDefined = __webpack_require__(9);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * assists with map move interactions, trigger callback functions\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapMoveCls = (function (_super) {\r\n\t    __extends(MapMoveCls, _super);\r\n\t    /**\r\n\t     * constructor called implicitly\r\n\t     */\r\n\t    function MapMoveCls() {\r\n\t        var _this = _super.call(this, 'map move') || this;\r\n\t        _this._arrLyrRequest = [];\r\n\t        _this._arrLyrTimeout = [];\r\n\t        _this._arrLayer = [];\r\n\t        _this._lookupLayer = {};\r\n\t        _this._mapMoveCallbacks = [];\r\n\t        _this._mapMoveCallbacksLookup = {};\r\n\t        _this._mapMoveCallbackDelays = [];\r\n\t        _this._mapMoveCallbackContext = [];\r\n\t        _this._mapMoveCallbackTimeout = [];\r\n\t        _this._mapExtent = undefined;\r\n\t        _this._zoomLevel = undefined;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * initialize the map move object\r\n\t     * @param theMap - the ol map\r\n\t     */\r\n\t    MapMoveCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n\t            _this._updateMapExtent();\r\n\t            // trigger the layer updates\r\n\t            for (var i = 0; i < _this._arrLayer.length; i++) {\r\n\t                _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n\t            }\r\n\t            // trigger the map callbacks\r\n\t            for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n\t                _this.triggerMoveCallback(i, e.type);\r\n\t            }\r\n\t        });\r\n\t    };\r\n\t    MapMoveCls.prototype._updateMapExtent = function () {\r\n\t        var theView = this.map.getView();\r\n\t        this._zoomLevel = theView.getZoom();\r\n\t        var extentArray = theView.calculateExtent(this.map.getSize());\r\n\t        this._mapExtent = {\r\n\t            minX: extentArray[0],\r\n\t            minY: extentArray[1],\r\n\t            maxX: extentArray[2],\r\n\t            maxY: extentArray[3]\r\n\t        };\r\n\t    };\r\n\t    Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n\t        /**\r\n\t         * return the map extent\r\n\t         */\r\n\t        get: function () {\r\n\t            if (!this._mapExtent) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            return this._mapExtent;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Trigger the layer load\r\n\t     * @param lyr the layer being acted on\r\n\t     * @param index index of the layer\r\n\t     * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n\t        if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            throw 'need to define lyr or index';\r\n\t        }\r\n\t        else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            index = this._arrLayer.indexOf(lyr);\r\n\t        }\r\n\t        else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n\t            lyr = this._arrLayer[index];\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._arrLyrTimeout[index] != null) {\r\n\t            clearTimeout(this._arrLyrTimeout[index]);\r\n\t            this._arrLyrTimeout[index] = null;\r\n\t        }\r\n\t        // abort if necessary and clear the request\r\n\t        if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n\t            this._arrLyrRequest[index].abort();\r\n\t            this._arrLyrRequest[index] = null;\r\n\t        }\r\n\t        // dummy callback used if before load returns false\r\n\t        var callbackFunc = function () { };\r\n\t        if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n\t            lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\t            var __this_1 = this;\r\n\t            callbackFunc = function () {\r\n\t                function innerFunction(theLayer, theIndex) {\r\n\t                    var _innerThis = this;\r\n\t                    this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n\t                        /**\r\n\t                         * @type {LayerBaseVector}\r\n\t                         */\r\n\t                        theLayer.mapMoveCallback(d);\r\n\t                        theLayer.loadCallback();\r\n\t                    }, 'json').fail(function (jqXHR) {\r\n\t                        if (jqXHR.statusText != 'abort') {\r\n\t                            console.log('failed');\r\n\t                            console.log(theLayer.url);\r\n\t                            console.log(theLayer.mapMoveParams);\r\n\t                        }\r\n\t                    }).always(function () {\r\n\t                        _innerThis._arrLyrTimeout[theIndex] = null;\r\n\t                        _innerThis._arrLyrRequest[theIndex] = null;\r\n\t                    });\r\n\t                }\r\n\t                innerFunction.call(__this_1, lyr, index);\r\n\t            };\r\n\t        }\r\n\t        else {\r\n\t            lyr.clear();\r\n\t        }\r\n\t        this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n\t    };\r\n\t    /**\r\n\t     * trigger the map move call back at the given index\r\n\t     * @param ind - the index of the layer\r\n\t     * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n\t     * @param functionId=undefined the function id used to reference the added callback function\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n\t        if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n\t            throw 'either the function index or the id must be defined';\r\n\t        }\r\n\t        if (typeof ind !== 'number') {\r\n\t            ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n\t        }\r\n\t        if (ind < 0) {\r\n\t            console.log('function not found');\r\n\t            return;\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._mapMoveCallbackTimeout[ind] != null) {\r\n\t            clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n\t            this._mapMoveCallbackTimeout[ind] = null;\r\n\t        }\r\n\t        var ctx = this._mapMoveCallbackContext[ind];\r\n\t        var theFunc = this._mapMoveCallbacks[ind];\r\n\t        var __this = this;\r\n\t        var f = function () {\r\n\t            if (ctx !== null) {\r\n\t                theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t            else {\r\n\t                theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t        };\r\n\t        this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n\t    };\r\n\t    /**\r\n\t     * Add a layer to the interaction\r\n\t     * @param  lyr - layer to add\r\n\t     * @param triggerOnAdd - if the layer should be loaded on add\r\n\t     */\r\n\t    MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n\t        if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n\t        if (this._arrLayer.indexOf(lyr) > -1) {\r\n\t            console.log('already added ' + lyr.name + ' to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        this._arrLyrRequest.push(null);\r\n\t        this._arrLyrTimeout.push(null);\r\n\t        this._arrLayer.push(lyr);\r\n\t        this._lookupLayer[lyr.id] = lyr;\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add a callback to the map move event\r\n\t     * @param func - callback function\r\n\t     * @param context - the context to use for this function\r\n\t     * @param delay=50 the delay before call load\r\n\t     * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n\t     * @param functionId optional id to reference the function later for outside triggering\r\n\t     */\r\n\t    MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n\t        if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n\t            console.log('this function already added to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        if (!functionId) {\r\n\t            functionId = makeGuid_1.default();\r\n\t        }\r\n\t        this._mapMoveCallbacks.push(func);\r\n\t        this._mapMoveCallbacksLookup[functionId] = functionId;\r\n\t        this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n\t        this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n\t        this._mapMoveCallbackTimeout.push(null);\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n\t        }\r\n\t    };\r\n\t    return MapMoveCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapMoveCls = MapMoveCls;\r\n\tnm.MapMoveCls = MapMoveCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapMoveCls;\r\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\tvar FeatureLayerProperties = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param feature the feature\r\n\t     * @param layer - the layer in the popup\r\n\t     * @param layerIndex - index of the layer\r\n\t     * @param selectionLayer - the ol selection layer\r\n\t     * @param [esriLayerName=undefined] - esri layer name\r\n\t     */\r\n\t    function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n\t        this.feature = feature;\r\n\t        this.layer = layer;\r\n\t        this.layerIndex = layerIndex;\r\n\t        this.selectionLayer = selectionLayer;\r\n\t        this.popupContent = '';\r\n\t        this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n\t    }\r\n\t    Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n\t        get: function () {\r\n\t            if (typeof this.esriLayerName == 'string') {\r\n\t                return this.esriLayerName;\r\n\t            }\r\n\t            else {\r\n\t                return this.layer.name;\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return FeatureLayerProperties;\r\n\t}());\r\n\texports.FeatureLayerProperties = FeatureLayerProperties;\r\n\t/**\r\n\t * map popup class\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapPopupCls = (function (_super) {\r\n\t    __extends(MapPopupCls, _super);\r\n\t    /**\r\n\t     * Definition for openlayers style function\r\n\t     * @callback olStyleFunction\r\n\t     * &param feature the openlayers vector feature\r\n\t     * $param\r\n\t     */\r\n\t    /**\r\n\t     * map popup constructor\r\n\t     */\r\n\t    function MapPopupCls() {\r\n\t        var _this = _super.call(this, 'map popup') || this;\r\n\t        _this._arrPopupLayerIds = [];\r\n\t        _this._arrPopupLayerNames = [];\r\n\t        _this._arrPopupLayers = [];\r\n\t        _this._arrPopupOlLayers = [];\r\n\t        _this._arrPopupContentFunction = [];\r\n\t        _this._$popupContainer = undefined;\r\n\t        _this._$popupContent = undefined;\r\n\t        _this._$popupCloser = undefined;\r\n\t        _this._popupOverlay = undefined;\r\n\t        _this._selectionLayers = [];\r\n\t        _this._selectionLayerLookup = {};\r\n\t        _this._mapClickFunctions = [];\r\n\t        //let a = function($jqueryContent){console.log($jqueryContent)};\r\n\t        //this._popupChangedLookup = {'a': a};\r\n\t        _this._popupChangedFunctions = [];\r\n\t        _this._esriMapServiceLayers = [];\r\n\t        _this._popupOpen = false;\r\n\t        _this._popupCoordinate = null;\r\n\t        _this._passThroughLayerFeatureArray = [];\r\n\t        _this._currentPopupIndex = -1;\r\n\t        _this._popupContentLength = 0;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * map popup initialization\r\n\t     * @param {ol.Map} theMap - the ol map\r\n\t     */\r\n\t    MapPopupCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        var $map;\r\n\t        var target = this.map.getTarget();\r\n\t        if (typeof target == 'string') {\r\n\t            $map = $('#' + target);\r\n\t        }\r\n\t        else {\r\n\t            $map = $(target);\r\n\t        }\r\n\t        $map.append('<div class=\"ol-popup\">' +\r\n\t            '<span class=\"ol-popup-closer\">X</span>' +\r\n\t            '<div class=\"popup-content\"></div>' +\r\n\t            '</div>');\r\n\t        this._$popupContainer = $map.find('.ol-popup');\r\n\t        this._$popupContent = $map.find('.popup-content');\r\n\t        this._$popupCloser = $map.find('.ol-popup-closer');\r\n\t        var _ease = function (n) {\r\n\t            return ol.easing.inAndOut(n);\r\n\t        };\r\n\t        this._popupOverlay = new ol.Overlay({\r\n\t            element: this._$popupContainer[0],\r\n\t            autoPan: true,\r\n\t            autoPanAnimation: {\r\n\t                duration: 250,\r\n\t                source: theMap.getView().getCenter(),\r\n\t                easing: _ease\r\n\t            }\r\n\t        });\r\n\t        this._map.addOverlay(this._popupOverlay);\r\n\t        this._$popupCloser.click(function (evt) {\r\n\t            _this.closePopup();\r\n\t        });\r\n\t        // display popup on click\r\n\t        this._map.on('singleclick', function (evt) {\r\n\t            _this.closePopup();\r\n\t            _this._popupCoordinate = evt['coordinate'];\r\n\t            // esri map service layers\r\n\t            if (_this._esriMapServiceLayers.length > 0) {\r\n\t                var queryParams = {\r\n\t                    geometry: evt['coordinate'].join(','),\r\n\t                    geometryType: 'esriGeometryPoint',\r\n\t                    layers: 'all',\r\n\t                    sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n\t                    mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n\t                    imageDisplay: _this._map.getSize().join(',') + ',96',\r\n\t                    returnGeometry: true,\r\n\t                    tolerance: 15,\r\n\t                    f: 'pjson'\r\n\t                };\r\n\t                for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n\t                    var l = _a[_i];\r\n\t                    l.getPopupInfo(queryParams);\r\n\t                }\r\n\t            }\r\n\t            var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n\t            _this._passThroughLayerFeatureArray = [];\r\n\t            _this._currentPopupIndex = -1;\r\n\t            for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n\t                var featObj = layerFeatureObjectArray[i];\r\n\t                var props = featObj.feature.getProperties();\r\n\t                var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n\t                //skip if return was false\r\n\t                if (popupContentResponse === false) {\r\n\t                }\r\n\t                else if (typeof popupContentResponse == 'string') {\r\n\t                    featObj.popupContent = popupContentResponse;\r\n\t                    _this._passThroughLayerFeatureArray.push(featObj);\r\n\t                }\r\n\t                else {\r\n\t                    featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n\t                }\r\n\t            }\r\n\t            _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n\t            _this._currentPopupIndex = -1;\r\n\t            var popupHtml = '<div class=\"ol-popup-nav\">';\r\n\t            popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">&#9664;</span>';\r\n\t            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n\t            popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n\t            popupHtml += \"<span>&nbsp;of&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n\t            popupHtml += \"<span>&nbsp;&nbsp;-&nbsp;&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n\t            popupHtml += '</div>';\r\n\t            popupHtml += '<div class=\"ol-popup-inner\">';\r\n\t            popupHtml += '</div>';\r\n\t            _this._$popupContent.html(popupHtml);\r\n\t            _this._$popupContent.find('.previous-popup').click(function () {\r\n\t                if (_this._popupContentLength == 1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == 0) {\r\n\t                    _this._currentPopupIndex = _this._popupContentLength - 1;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex--;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            var nextPopup = _this._$popupContent.find('.next-popup');\r\n\t            nextPopup.click(function () {\r\n\t                if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n\t                    _this._currentPopupIndex = 0;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex++;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            if (_this._popupContentLength > 0) {\r\n\t                nextPopup.trigger('click');\r\n\t                _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n\t                _this._$popupContent.scrollTop(0);\r\n\t                _this._popupOpen = true;\r\n\t            }\r\n\t        });\r\n\t        //change mouse cursor when over marker\r\n\t        this._map.on('pointermove', function (evt) {\r\n\t            if (evt['dragging']) {\r\n\t                return;\r\n\t            }\r\n\t            var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n\t            var hit = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {\r\n\t                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {\r\n\t                    var olLayer = _a[_i];\r\n\t                    if (lyrCandidate == olLayer) {\r\n\t                        return true;\r\n\t                    }\r\n\t                }\r\n\t                return false;\r\n\t            });\r\n\t            var mapElement = _this.map.getTargetElement();\r\n\t            mapElement.style.cursor = hit ? 'pointer' : '';\r\n\t        });\r\n\t        return true;\r\n\t    };\r\n\t    /**\r\n\t     * helper to select features\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._triggerFeatSelect = function () {\r\n\t        var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n\t        var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n\t        var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n\t        this.clearSelection();\r\n\t        var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n\t        $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n\t        $layerNameSpan.html(lyrFeatObj.layerName);\r\n\t        $innerPopup.html(lyrFeatObj.popupContent);\r\n\t        lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n\t        for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f(this._$popupContent);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param feature - the ol feature\r\n\t     * @param {LayerEsriMapServer} lyr - the map server layer\r\n\t     * @param {string} popupContent - popup content\r\n\t     * @param {string} esriName - esri layer name\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n\t        var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n\t        featLayerObject.popupContent = popupContent;\r\n\t        this._passThroughLayerFeatureArray.push(featLayerObject);\r\n\t        this._popupContentLength++;\r\n\t        $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\t        if (!this._popupOpen) {\r\n\t            this._$popupContent.find('.next-popup').trigger('click');\r\n\t            this._popupOverlay.setPosition(this._popupCoordinate);\r\n\t            this._$popupContent.scrollTop(0);\r\n\t            this._popupOpen = true;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param  pixel - the ol pixel\r\n\t     * @returns  feature layer properties\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n\t        var _this = this;\r\n\t        var layerFeatureObjectArray = [];\r\n\t        this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n\t            var lyrIndex = _this._arrPopupOlLayers.indexOf(layer);\r\n\t            if (lyrIndex > -1) {\r\n\t                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));\r\n\t            }\r\n\t        });\r\n\t        return layerFeatureObjectArray;\r\n\t    };\r\n\t    MapPopupCls.prototype.closePopup = function () {\r\n\t        this._checkInit();\r\n\t        this._popupOpen = false;\r\n\t        this._popupOverlay.setPosition(undefined);\r\n\t        this._$popupCloser[0].blur();\r\n\t        this.clearSelection();\r\n\t        this._$popupContent.html('');\r\n\t        return false;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param chgFunction - popup change function\r\n\t     */\r\n\t    MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n\t        this._popupChangedFunctions.push(chgFunction);\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase|*} lyr - the layer being acted on\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns  the new selection layer\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n\t        this._checkInit();\r\n\t        selectionStyle = selectionStyle || {};\r\n\t        selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n\t        selectionStyle.width = selectionStyle.width || 10;\r\n\t        var theStyle;\r\n\t        if (selectionStyle.olStyle) {\r\n\t            theStyle = selectionStyle.olStyle;\r\n\t        }\r\n\t        else {\r\n\t            theStyle = new ol.style.Style({\r\n\t                stroke: new ol.style.Stroke({\r\n\t                    color: selectionStyle.color,\r\n\t                    width: selectionStyle.width\r\n\t                }),\r\n\t                image: new ol.style.Circle({\r\n\t                    radius: 7,\r\n\t                    fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n\t                    stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n\t                }),\r\n\t                fill: new ol.style.Fill({\r\n\t                    color: selectionStyle.color\r\n\t                })\r\n\t            });\r\n\t        }\r\n\t        var selectionLayer = new ol.layer.Vector({\r\n\t            source: new ol.source.Vector(),\r\n\t            style: theStyle\r\n\t        });\r\n\t        selectionLayer.setZIndex(100);\r\n\t        this._selectionLayers.push(selectionLayer);\r\n\t        this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n\t        this.map.addLayer(selectionLayer);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    /**\r\n\t     * Add popup to the map\r\n\t     * @param {LayerBase|*} lyr The layer that the popup with act on\r\n\t     * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._arrPopupLayerIds.push(lyr.id);\r\n\t        this._arrPopupLayerNames.push(lyr.name);\r\n\t        this._arrPopupLayers.push(lyr);\r\n\t        this._arrPopupOlLayers.push(lyr.olLayer);\r\n\t        this._arrPopupContentFunction.push(popupContentFunction);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase} lyr - layer\r\n\t     */\r\n\t    MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n\t        var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\t        if (idx > -1) {\r\n\t            this._arrPopupLayerIds.splice(idx, 1);\r\n\t            this._arrPopupLayerNames.splice(idx, 1);\r\n\t            this._arrPopupLayers.splice(idx, 1);\r\n\t            this._arrPopupOlLayers.splice(idx, 1);\r\n\t            this._arrPopupContentFunction.splice(idx, 1);\r\n\t            this._selectionLayers.splice(idx, 1);\r\n\t            delete this._selectionLayerLookup[lyr.id];\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerEsriMapServer} lyr - map server layer\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._esriMapServiceLayers.push(lyr);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    MapPopupCls.prototype.clearSelection = function () {\r\n\t        this._checkInit();\r\n\t        for (var i = 0; i < this._selectionLayers.length; i++) {\r\n\t            this._selectionLayers[i].getSource().clear();\r\n\t        }\r\n\t        for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f();\r\n\t        }\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     * Add a function to be called when the map is clicked but before any popups are implemented\r\n\t     * @param {function} func - the map click function\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n\t        this._mapClickFunctions.push(func);\r\n\t    };\r\n\t    return MapPopupCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapPopupCls = MapPopupCls;\r\n\tnm.MapPopupCls = MapPopupCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapPopupCls;\r\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar quickMapBase_1 = __webpack_require__(13);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param {object} [options={}] config options\r\n\t * @param {string} [options.divId=map] map div id\r\n\t * @param {object} [options.center={}] center config object\r\n\t * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param {number} [options.zoom=7] zoom level\r\n\t * @param {number} [options.minZoom=undefined] min zoom\r\n\t * @param {number} [options.maxZoom=undefined] max zoom\r\n\t * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n\t * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n\t * @returns {ol.Map} the ol map\r\n\t */\r\n\tfunction quickMap(options) {\r\n\t    var m = quickMapBase_1.quickMapBase(options);\r\n\t    mapMove_1.default.init(m);\r\n\t    mapPopup_1.default.init(m);\r\n\t    return m;\r\n\t}\r\n\texports.quickMap = quickMap;\r\n\tnm.quickMap = quickMap;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMap;\r\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param [options={}] config options\r\n\t * @param [options.divId=map] map div id\r\n\t * @param [options.center={}] center config object\r\n\t * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param [options.zoom=7] zoom level\r\n\t * @param [options.minZoom=undefined] min zoom\r\n\t * @param [options.maxZoom=undefined] max zoom\r\n\t * @param [options.baseSwitcher=true] if add base map switcher\r\n\t * @param [options.fullScreen=false] if add base map switcher\r\n\t * @returns the ol map\r\n\t */\r\n\tfunction quickMapBase(options) {\r\n\t    options = options || {};\r\n\t    options.divId = options.divId || 'map';\r\n\t    options.center = options.center || { x: -10018378, y: 5574910 };\r\n\t    options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n\t    options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n\t    options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n\t    var $mapDiv = $('#' + options.divId);\r\n\t    $mapDiv.css('position', 'relative');\r\n\t    var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n\t    // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\t    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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LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvr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LbmpxEQ3ff/Z0g/mauXsoln9wDRjy/NHsQFw3P6vWuTJ43/+FZrk2cvAFRipCKdfD9y2+pjRj78s0KdCUDKJvdV91ChngV38T20TM+gghjpJaPlpFr2xbEz5g4A/NGt5rNwdwmYGeeeMXBSLHHUIc+6RsojRH9VTUm3/mLf/64b470XvoxoTKhlMBQ2jMEzo2PjxdGMppmn1RM24bWFJqaQv4BcuJa2Sam7Zokq1ldCsz06NCBHrhwqVQYpfFj42NZexz1EW9SR/kT58nEeQKJb2fPXjjp0u/YUkwHEgLeOnf2nOuf1TRTM02CLKLTPy60/x1CCztqn7Ev+BdsC3m+30decQvW/wBNTwU+CfUQAQAAAABJRU5ErkJggg==')\";\r\n\t    if (options.baseSwitcher) {\r\n\t    }\r\n\t    if (options.zoom < 0 || options.zoom > 28) {\r\n\t        throw 'zoom out of range';\r\n\t    }\r\n\t    if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n\t        var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n\t        new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n\t        p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n\t        var coordinates = p.getCoordinates();\r\n\t        options.center.x = coordinates[0];\r\n\t        options.center.y = coordinates[1];\r\n\t    }\r\n\t    var controls = ol.control.defaults({\r\n\t        attributionOptions: { collapsible: false }\r\n\t    });\r\n\t    var view = new ol.View({\r\n\t        center: [options.center.x, options.center.y],\r\n\t        zoom: options.zoom,\r\n\t        minZoom: options.minZoom,\r\n\t        maxZoom: options.maxZoom\r\n\t    });\r\n\t    var map = new ol.Map({\r\n\t        layers: [osmLayer],\r\n\t        target: options.divId,\r\n\t        controls: controls,\r\n\t        view: view\r\n\t    });\r\n\t    if (options.fullScreen) {\r\n\t        map.addControl(new ol.control.FullScreen({}));\r\n\t    }\r\n\t    return map;\r\n\t}\r\n\texports.quickMapBase = quickMapBase;\r\n\tnm.quickMapBase = quickMapBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMapBase;\r\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/14/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\n\tvar _zoomResLookup = [\r\n\t    156543.03392804097,\r\n\t    78271.51696402048,\r\n\t    39135.75848201024,\r\n\t    19567.87924100512,\r\n\t    9783.93962050256,\r\n\t    4891.96981025128,\r\n\t    2445.98490512564,\r\n\t    1222.99245256282,\r\n\t    611.49622628141,\r\n\t    305.748113140705,\r\n\t    152.8740565703525,\r\n\t    76.43702828517625,\r\n\t    38.21851414258813,\r\n\t    19.109257071294063,\r\n\t    9.554628535647032,\r\n\t    4.777314267823516,\r\n\t    2.388657133911758,\r\n\t    1.194328566955879,\r\n\t    0.5971642834779395,\r\n\t    0.29858214173896974,\r\n\t    0.14929107086948487,\r\n\t    0.07464553543474244,\r\n\t    0.03732276771737122,\r\n\t    0.01866138385868561,\r\n\t    0.009330691929342804,\r\n\t    0.004665345964671402,\r\n\t    0.002332672982335701,\r\n\t    0.0011663364911678506,\r\n\t    0.0005831682455839253 //28\r\n\t];\r\n\t/**\r\n\t * Get the resolution given the zoom level\r\n\t * @param {number} zoomLevel - the zoom level\r\n\t * @returns {number|*} the map resolution\r\n\t */\r\n\tfunction zoomToResolution(zoomLevel) {\r\n\t    \"use strict\";\r\n\t    if (typeof zoomLevel == 'number') {\r\n\t        if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n\t            return _zoomResLookup[zoomLevel];\r\n\t        }\r\n\t        else {\r\n\t            console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n\t            return undefined;\r\n\t        }\r\n\t    }\r\n\t    else {\r\n\t        return undefined;\r\n\t    }\r\n\t}\r\n\texports.zoomToResolution = zoomToResolution;\r\n\tnm.zoomToResolution = zoomToResolution;\r\n\t/**\r\n\t * Get resolution from the zoom level\r\n\t * @param {number} resolution - the resolution\r\n\t * @returns {number|*} the zoom level\r\n\t */\r\n\tfunction resolutionToZoom(resolution) {\r\n\t    for (var i = 0; i < _zoomResLookup.length; i++) {\r\n\t        if (resolution >= _zoomResLookup[i]) {\r\n\t            return i;\r\n\t        }\r\n\t    }\r\n\t    return 0;\r\n\t}\r\n\texports.resolutionToZoom = resolutionToZoom;\r\n\tnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 1/4/2016.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar nm = provide_1.default('olHelpers.esriToOlStyle');\r\n\t/**\r\n\t * This callback is displayed as part of the Requester class.\r\n\t * @callback styleFunc\r\n\t * @param {ol.Feature} feat - openlayers feature\r\n\t * @param {number} resolution - map resolution\r\n\t */\r\n\t/**\r\n\t *\r\n\t * @param {Array<number>} colorArray - input color array\r\n\t * @param {number} opacity - the opacity 0 to 1\r\n\t * @returns {string} rgba string\r\n\t * @private\r\n\t */\r\n\tfunction _colorArrayToRgba(colorArray, opacity) {\r\n\t    \"use strict\";\r\n\t    return \"rgba(\" + colorArray[0] + \",\" + colorArray[1] + \",\" + colorArray[2] + \",\" + opacity + \")\";\r\n\t}\r\n\t/**\r\n\t * escape html charcters\r\n\t * @param {string} str - input string\r\n\t * @returns {string} escaped string\r\n\t */\r\n\tfunction htmlEscape(str) {\r\n\t    return String(str)\r\n\t        .replace(/&/g, '&amp;')\r\n\t        .replace(/\"/g, '&quot;')\r\n\t        .replace(/'/g, '&#39;')\r\n\t        .replace(/</g, '&lt;')\r\n\t        .replace(/>/g, '&gt;');\r\n\t}\r\n\tnm.htmlEscape = htmlEscape;\r\n\tvar CommonSymbol = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param symbolObj\r\n\t     * @param {number} opacity\r\n\t     */\r\n\t    function CommonSymbol(symbolObj, opacity) {\r\n\t        this.symbolObj = symbolObj;\r\n\t        this.opacity = opacity;\r\n\t        this.olStyle = undefined;\r\n\t        this.legendHtml = '';\r\n\t    }\r\n\t    return CommonSymbol;\r\n\t}());\r\n\tvar PointSymbol = (function (_super) {\r\n\t    __extends(PointSymbol, _super);\r\n\t    function PointSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj.type) {\r\n\t            case 'esriSMS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n\t                var outlineWidth = _this.symbolObj.outline.width;\r\n\t                var radius = _this.symbolObj.size;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    image: new ol.style.Circle({\r\n\t                        radius: radius,\r\n\t                        fill: new ol.style.Fill({\r\n\t                            color: innerColor\r\n\t                        }),\r\n\t                        stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth })\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" style=\\\"color: \" + innerColor + \"\\\">&#9679;</span>\";\r\n\t                break;\r\n\t            case 'esriPMS':\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    image: new ol.style.Icon({ src: \"data:image/png;base64,\" + _this.symbolObj['imageData'] })\r\n\t                });\r\n\t                _this.legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + _this.symbolObj['imageData'] + \"\\\">\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return PointSymbol;\r\n\t}(CommonSymbol));\r\n\tvar LineSymbol = (function (_super) {\r\n\t    __extends(LineSymbol, _super);\r\n\t    function LineSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj.type) {\r\n\t            case 'esriSLS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var lineWidth = _this.symbolObj.width;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    stroke: new ol.style.Stroke({\r\n\t                        color: innerColor,\r\n\t                        //lineDash: [4],\r\n\t                        width: lineWidth\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n\t                _this.legendHtml += \"style=\\\"\";\r\n\t                _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n\t                _this.legendHtml += \"width: 40px;\";\r\n\t                _this.legendHtml += \"height: 4px;\";\r\n\t                _this.legendHtml += \"position: relative;\";\r\n\t                _this.legendHtml += \"display: inline-block;\";\r\n\t                _this.legendHtml += \"top: -1px;\";\r\n\t                _this.legendHtml += \"\\\"></span>\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return LineSymbol;\r\n\t}(CommonSymbol));\r\n\tvar PolygonSymbol = (function (_super) {\r\n\t    __extends(PolygonSymbol, _super);\r\n\t    function PolygonSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj['type']) {\r\n\t            case 'esriSFS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n\t                var outlineWidth = _this.symbolObj.outline.width;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    stroke: new ol.style.Stroke({\r\n\t                        color: outerColor,\r\n\t                        //lineDash: [4],\r\n\t                        width: outlineWidth\r\n\t                    }),\r\n\t                    fill: new ol.style.Fill({\r\n\t                        color: innerColor\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n\t                _this.legendHtml += \"style=\\\"\";\r\n\t                _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n\t                _this.legendHtml += \"border: solid \" + outerColor + \" 1px;\";\r\n\t                _this.legendHtml += \"width: 40px;\";\r\n\t                _this.legendHtml += \"height: 9px;\";\r\n\t                _this.legendHtml += \"position: relative;\";\r\n\t                _this.legendHtml += \"display: inline-block;\";\r\n\t                _this.legendHtml += \"top: 2px;\";\r\n\t                _this.legendHtml += \"\\\"></span>\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return PolygonSymbol;\r\n\t}(CommonSymbol));\r\n\tvar SymbolGenerator = (function () {\r\n\t    function SymbolGenerator(esriResponse) {\r\n\t        this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n\t        this.renderer = esriResponse.drawingInfo.renderer;\r\n\t        this.olStyle = undefined;\r\n\t        this.legendHtml = '';\r\n\t    }\r\n\t    return SymbolGenerator;\r\n\t}());\r\n\tvar SingleSymbol = (function (_super) {\r\n\t    __extends(SingleSymbol, _super);\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} esriResponse - layer info\r\n\t     * @param SymbolClass - the symbol class to use\r\n\t     */\r\n\t    function SingleSymbol(esriResponse, SymbolClass) {\r\n\t        var _this = _super.call(this, esriResponse) || this;\r\n\t        _this.symbol = _this.renderer.symbol;\r\n\t        var symbolObj = new SymbolClass(_this.symbol, _this.opacity);\r\n\t        _this.olStyle = symbolObj.olStyle;\r\n\t        _this.legendHtml = symbolObj.legendHtml;\r\n\t        return _this;\r\n\t    }\r\n\t    return SingleSymbol;\r\n\t}(SymbolGenerator));\r\n\tvar UniqueValueSymbol = (function (_super) {\r\n\t    __extends(UniqueValueSymbol, _super);\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} esriResponse - layer info\r\n\t     * @param SymbolClass - the Symbol class definition\r\n\t     */\r\n\t    function UniqueValueSymbol(esriResponse, SymbolClass) {\r\n\t        var _this = _super.call(this, esriResponse) || this;\r\n\t        _this.uniqueValueInfos = _this.renderer['uniqueValueInfos'];\r\n\t        _this.propertyName = _this.renderer['field1'];\r\n\t        _this.defaultSymbol = _this.renderer['defaultSymbol'];\r\n\t        if (_this.defaultSymbol) {\r\n\t            var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity);\r\n\t            _this.defaultStyle = symbolObj.olStyle;\r\n\t            _this.defaultLabelHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(_this.renderer['defaultLabel']) + \"</span>\" + symbolObj.legendHtml;\r\n\t        }\r\n\t        else {\r\n\t            _this.defaultStyle = undefined;\r\n\t            _this.defaultLabelHtml = 'other';\r\n\t        }\r\n\t        _this.valueArray = [];\r\n\t        _this.labelArray = [];\r\n\t        _this.legendArray = [];\r\n\t        _this.propertyStyleLookup = {};\r\n\t        for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) {\r\n\t            var uniqueVal = _a[_i];\r\n\t            _this.labelArray.push(uniqueVal['label']);\r\n\t            _this.valueArray.push(uniqueVal['value']);\r\n\t            var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity);\r\n\t            _this.legendArray.push(\"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(uniqueVal['label']) + \"</span>\" + uniqueSym.legendHtml);\r\n\t            _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n\t        }\r\n\t        _this.olStyle = function (feature) {\r\n\t            var checkProperties = feature.getProperties();\r\n\t            var checkProperty = checkProperties[_this.propertyName];\r\n\t            var returnValue;\r\n\t            if (_this.propertyStyleLookup[checkProperty] !== undefined) {\r\n\t                returnValue = [_this.propertyStyleLookup[checkProperty]];\r\n\t            }\r\n\t            else {\r\n\t                returnValue = [_this.defaultStyle];\r\n\t            }\r\n\t            return returnValue;\r\n\t        };\r\n\t        if (_this.defaultLabelHtml !== null) {\r\n\t            _this.legendArray.push(_this.defaultLabelHtml);\r\n\t        }\r\n\t        _this.legendHtml = '<ul>';\r\n\t        for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) {\r\n\t            var h = _c[_b];\r\n\t            _this.legendHtml += \"<li>\" + h + \"</li>\";\r\n\t        }\r\n\t        _this.legendHtml += '</ul>';\r\n\t        return _this;\r\n\t    }\r\n\t    return UniqueValueSymbol;\r\n\t}(SymbolGenerator));\r\n\t/**\r\n\t * style and legend object\r\n\t * @typedef {object} styleAndLegend\r\n\t * @property {styleFunc} style - style function\r\n\t * @property {string} legend - legend content\r\n\t */\r\n\t/**\r\n\t *\r\n\t * @param {object} esriResponse - layer info\r\n\t * @returns {styleAndLegend} style and legend object\r\n\t */\r\n\tfunction makeFeatureServiceLegendAndSymbol(esriResponse) {\r\n\t    \"use strict\";\r\n\t    var renderer = esriResponse.drawingInfo.renderer;\r\n\t    var symbolLegendOut = null;\r\n\t    switch (renderer.type) {\r\n\t        case 'simple':\r\n\t            switch (esriResponse.geometryType) {\r\n\t                case 'esriGeometryPoint':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolyline':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolygon':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n\t                    break;\r\n\t                default:\r\n\t                    console.log(esriResponse);\r\n\t                    alert(esriResponse.geometryType + ' not handled');\r\n\t            }\r\n\t            break;\r\n\t        case 'uniqueValue':\r\n\t            switch (esriResponse.geometryType) {\r\n\t                case 'esriGeometryPoint':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolyline':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolygon':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n\t                    break;\r\n\t                default:\r\n\t                    console.log(esriResponse);\r\n\t                    alert(esriResponse['geometryType'] + ' not handled');\r\n\t            }\r\n\t            break;\r\n\t        default:\r\n\t            alert('not handled renderer type: ' + renderer['type']);\r\n\t    }\r\n\t    if (symbolLegendOut == null) {\r\n\t        return { style: undefined, legend: '' };\r\n\t    }\r\n\t    else {\r\n\t        return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml };\r\n\t    }\r\n\t}\r\n\texports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\tnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\t/**\r\n\t *\r\n\t * @param {object} lyrObject - the layer as defined in the response\r\n\t * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n\t * @returns {string} legend html\r\n\t */\r\n\tfunction mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) {\r\n\t    if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; }\r\n\t    skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n\t    var layerName = lyrObject['layerName'];\r\n\t    var legendItems = lyrObject['legend'];\r\n\t    var legendHtml = '';\r\n\t    if (!skipLayerNameAndExpander) {\r\n\t        legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\";\r\n\t    }\r\n\t    if (legendItems.length == 1) {\r\n\t        legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[0]['imageData'] + \"\\\">\";\r\n\t    }\r\n\t    else {\r\n\t        if (!skipLayerNameAndExpander) {\r\n\t            legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">&#9660;</span>';\r\n\t        }\r\n\t        legendHtml += '<ul>';\r\n\t        for (var i = 0; i < legendItems.length; i++) {\r\n\t            legendHtml += \"<li>\";\r\n\t            legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(legendItems[i]['label']) + \"</span>\";\r\n\t            legendHtml += \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[i]['imageData'] + \"\\\">\";\r\n\t            legendHtml += \"</li>\";\r\n\t        }\r\n\t        legendHtml += '</ul>';\r\n\t    }\r\n\t    if (!skipLayerNameAndExpander) {\r\n\t        legendHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\" + legendHtml;\r\n\t    }\r\n\t    return legendHtml;\r\n\t}\r\n\t/**\r\n\t * make map service legent\r\n\t * @param {object} esriResponse - layer info\r\n\t * @returns {string} legend content\r\n\t */\r\n\tfunction makeMapServiceLegend(esriResponse) {\r\n\t    \"use strict\";\r\n\t    var newLegendHtml = '';\r\n\t    var layers = esriResponse['layers'];\r\n\t    if (layers.length == 1) {\r\n\t        newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n\t    }\r\n\t    else {\r\n\t        newLegendHtml += '<ul>';\r\n\t        for (var i = 0; i < layers.length; i++) {\r\n\t            newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n\t        }\r\n\t        newLegendHtml += '</ul>';\r\n\t    }\r\n\t    return newLegendHtml;\r\n\t}\r\n\texports.makeMapServiceLegend = makeMapServiceLegend;\r\n\tnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 12/7/2015.\r\n\t */\r\n\tvar LayerBase_1 = __webpack_require__(8);\r\n\tvar esriToOl = __webpack_require__(15);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * esri mapserver layer\r\n\t * @augments LayerBase\r\n\t */\r\n\tvar LayerEsriMapServer = (function (_super) {\r\n\t    __extends(LayerEsriMapServer, _super);\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {string} url - resource url\r\n\t     * @param {object} [options] - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     * @param {boolean} [options.addPopup=false] if a popup should be added\r\n\t     * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n\t     */\r\n\t    function LayerEsriMapServer(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        var _this = _super.call(this, url, options) || this;\r\n\t        _this._source = new ol.source.TileArcGISRest({\r\n\t            url: _this.url == '' ? undefined : _this.url,\r\n\t            params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') }\r\n\t        });\r\n\t        _this._olLayer = new ol.layer.Tile({\r\n\t            source: _this._source,\r\n\t            visible: _this.visible,\r\n\t            opacity: _this.opacity,\r\n\t            minResolution: _this._minResolution,\r\n\t            maxResolution: _this._maxResolution\r\n\t        });\r\n\t        _this._olLayer.setZIndex(_this._zIndex);\r\n\t        options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\t        _this._esriFormat = new ol.format.EsriJSON();\r\n\t        _this._popupRequest = null;\r\n\t        _this.addLegendContent();\r\n\t        if (options.addPopup) {\r\n\t            mapPopup_1.default.addMapServicePopup(_this);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=''] additional content for legend\r\n\t     */\r\n\t    LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) {\r\n\t        var _this = this;\r\n\t        var urlCopy = this.url;\r\n\t        if (urlCopy[urlCopy.length - 1] !== '/') {\r\n\t            urlCopy += '/';\r\n\t        }\r\n\t        urlCopy += 'legend?f=pjson&callback=?';\r\n\t        $.get(urlCopy, {}, function (d) {\r\n\t            var newHtml = esriToOl.makeMapServiceLegend(d);\r\n\t            _super.prototype.addLegendContent.call(_this, newHtml);\r\n\t        }, 'json');\r\n\t    };\r\n\t    LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) {\r\n\t        if (!this.visible) {\r\n\t            return;\r\n\t        }\r\n\t        var urlCopy = this.url;\r\n\t        if (urlCopy[urlCopy.length - 1] != '/') {\r\n\t            urlCopy += '/';\r\n\t        }\r\n\t        urlCopy += 'identify?callback=?';\r\n\t        var __this = this;\r\n\t        if (this._popupRequest != null) {\r\n\t            this._popupRequest.abort();\r\n\t        }\r\n\t        this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n\t            for (var _i = 0, _a = d['results']; _i < _a.length; _i++) {\r\n\t                var r = _a[_i];\r\n\t                var popupHtml = '<table class=\"esri-popup-table\">';\r\n\t                for (var a in r['attributes']) {\r\n\t                    if (r['attributes'].hasOwnProperty(a)) {\r\n\t                        var attrVal = r['attributes'][a];\r\n\t                        if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n\t                            continue;\r\n\t                        }\r\n\t                        var attr = a;\r\n\t                        if (attr.length > 14) {\r\n\t                            attr = attr.slice(0, 11) + '...';\r\n\t                        }\r\n\t                        popupHtml += \"<tr><td>\" + attr + \"</td><td>\" + attrVal + \"</td></tr>\";\r\n\t                    }\r\n\t                }\r\n\t                popupHtml += '</table>';\r\n\t                mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n\t            }\r\n\t        }, 'json');\r\n\t        this._popupRequest.always(function () {\r\n\t            __this._popupRequest = null;\r\n\t        });\r\n\t    };\r\n\t    Object.defineProperty(LayerEsriMapServer.prototype, \"source\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {ol.source.TileArcGISRest} the vector source\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getSource.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerEsriMapServer.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getOlLayer.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return LayerEsriMapServer;\r\n\t}(LayerBase_1.LayerBase));\r\n\texports.LayerEsriMapServer = LayerEsriMapServer;\r\n\tnm.LayerEsriMapServer = LayerEsriMapServer;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerEsriMapServer;\r\n\n\n/***/ },\n/* 17 */,\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/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 6/1/2016.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('collections.layerSwipe');\r\n\tvar LayerSwipe = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param {ol.Map} map - the map\r\n\t     * @param {string} [sliderContent=''] - additional html to be added inside the slider div\r\n\t     */\r\n\t    function LayerSwipe(map, sliderContent) {\r\n\t        if (sliderContent === void 0) { sliderContent = ''; }\r\n\t        var _this = this;\r\n\t        sliderContent = sliderContent || '';\r\n\t        /**\r\n\t         *\r\n\t         * @type {Array<LayerBase>}\r\n\t         */\r\n\t        this.leftLayers = [];\r\n\t        /**\r\n\t         *\r\n\t         * @type {Array<LayerBase>}\r\n\t         */\r\n\t        this.rightLayers = [];\r\n\t        this._percentRight = 50;\r\n\t        this.offset = null;\r\n\t        this._map = map;\r\n\t        this.$mapElement = $(map.getTargetElement());\r\n\t        this.$mapElement.append(\"<div class=\\\"layer-swiper\\\">\" + sliderContent + \"</div>\");\r\n\t        this.$swiper = this.$mapElement.find('.layer-swiper');\r\n\t        this.percentRight = this.percentRight;\r\n\t        this.dragging = false;\r\n\t        this.$mapElement.mouseleave(function () {\r\n\t            _this.dragging = false;\r\n\t        });\r\n\t        this.$swiper.bind('mousewheel DOMMouseScroll', function (evt) {\r\n\t            evt.preventDefault();\r\n\t        });\r\n\t        this.$swiper.mousedown(function (evt) {\r\n\t            _this.dragging = true;\r\n\t            _this.offset = evt.offsetX;\r\n\t        });\r\n\t        $(window).mouseup(function () {\r\n\t            _this.dragging = false;\r\n\t        });\r\n\t        this.$mapElement.mousemove(function (evt) {\r\n\t            if (_this.dragging) {\r\n\t                var mapLeft = _this.$mapElement.position().left;\r\n\t                var mapWidth = _this.$mapElement.width();\r\n\t                _this.percentRight = 100 * (evt.pageX - _this.offset - mapLeft) / mapWidth;\r\n\t            }\r\n\t        });\r\n\t    }\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase|*} lyr - layer to be added to left side\r\n\t     */\r\n\t    LayerSwipe.prototype.addLeftLayer = function (lyr) {\r\n\t        var _this = this;\r\n\t        if (this.leftLayers.indexOf(lyr) != -1) {\r\n\t            return;\r\n\t        }\r\n\t        lyr.olLayer.on('precompose', function (event) {\r\n\t            var ctx = event['context'];\r\n\t            var width = ctx.canvas.width * (_this.percentRight / 100);\r\n\t            ctx.save();\r\n\t            ctx.beginPath();\r\n\t            ctx.rect(0, 0, width, ctx.canvas.height);\r\n\t            ctx.clip();\r\n\t        });\r\n\t        lyr.olLayer.on('postcompose', function (event) {\r\n\t            var ctx = event['context'];\r\n\t            ctx.restore();\r\n\t        });\r\n\t        this.leftLayers.push(lyr);\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase|*} lyr - layer to be added to right side\r\n\t     */\r\n\t    LayerSwipe.prototype.addRightLayer = function (lyr) {\r\n\t        var _this = this;\r\n\t        if (this.rightLayers.indexOf(lyr) != -1) {\r\n\t            return;\r\n\t        }\r\n\t        lyr.olLayer.on('precompose', function (event) {\r\n\t            var ctx = event['context'];\r\n\t            var width = ctx.canvas.width * (_this.percentRight / 100);\r\n\t            ctx.save();\r\n\t            ctx.beginPath();\r\n\t            ctx.rect(width, 0, ctx.canvas.width - width, ctx.canvas.height);\r\n\t            ctx.clip();\r\n\t        });\r\n\t        lyr.olLayer.on('postcompose', function (event) {\r\n\t            var ctx = event['context'];\r\n\t            ctx.restore();\r\n\t        });\r\n\t        this.rightLayers.push(lyr);\r\n\t    };\r\n\t    Object.defineProperty(LayerSwipe.prototype, \"percentRight\", {\r\n\t        get: function () {\r\n\t            return this._percentRight;\r\n\t        },\r\n\t        set: function (percent) {\r\n\t            var maxed = this.$swiper.position().left + this.$swiper.width() > this.$mapElement.width();\r\n\t            if (percent < 0) {\r\n\t                return;\r\n\t            }\r\n\t            else if (maxed && percent > this.percentRight) {\r\n\t                return;\r\n\t            }\r\n\t            this._percentRight = percent;\r\n\t            this.$swiper.css('left', this._percentRight.toFixed(2) + \"%\");\r\n\t            this._map.render();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return LayerSwipe;\r\n\t}());\r\n\tnm.LayerSwipe = LayerSwipe;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerSwipe;\r\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","/**\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    'http://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    'http://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    'http://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    'http://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\n\n\n// WEBPACK FOOTER //\n// ./src/_test/compare-test.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 2\n// module chunks = 0 1 2 3 4 5 6","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 3\n// module chunks = 0 1 2 3","/**\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\nfunction 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 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 * 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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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 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): 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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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 {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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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/R9N7GiWtshqI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QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33dsvrBtAQVoxtpZNK3zSzYjUjviWO2Ag+R77dl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sQFw3P6vWuTJ43/+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    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) {\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){\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 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 * This callback is displayed as part of the Requester class.\r\n * @callback styleFunc\r\n * @param {ol.Feature} feat - openlayers feature\r\n * @param {number} resolution - map resolution\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, opacity) {\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) {\r\n    return String(str)\r\n        .replace(/&/g, '&amp;')\r\n        .replace(/\"/g, '&quot;')\r\n        .replace(/'/g, '&#39;')\r\n        .replace(/</g, '&lt;')\r\n        .replace(/>/g, '&gt;');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface EsriResponse{\r\n    drawingInfo: {\r\n        renderer: EsriRenderer\r\n    },\r\n    geometryType: string\r\n}\r\n\r\nexport interface EsriRenderer{\r\n    type: string;\r\n    symbol: EsriSymbol;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\r\n}\r\n\r\nexport interface EsriSymbol{\r\n    size: number;\r\n    type: string;\r\n    outline:{\r\n        color: string;\r\n        width: number;\r\n    },\r\n    color: string;\r\n    width: number;\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n    legendHtml: string;\r\n    opacity: number;\r\n    symbolObj: EsriSymbol;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    /**\r\n     *\r\n     * @param symbolObj\r\n     * @param {number} opacity\r\n     */\r\n    constructor(symbolObj: EsriSymbol, 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: EsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n    constructor(symbolObj: EsriSymbol, 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}\">&#9679;</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: EsriSymbol, 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: EsriSymbol, 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\nclass SymbolGenerator {\r\n    opacity: number;\r\n    renderer: EsriRenderer;\r\n    legendHtml: string;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    constructor(esriResponse: 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}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n    symbol: EsriSymbol;\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, 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: EsriSymbol;\r\n    defaultStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n    defaultLabelHtml: string;\r\n    labelArray: Array<string>;\r\n    legendArray: Array<string>;\r\n    propertyStyleLookup: Object;\r\n    valueArray: Array<any>;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\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: EsriResponse, 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\r\n        this.olStyle = (feature: ol.Feature) => {\r\n            let checkProperties = feature.getProperties();\r\n            let checkProperty = checkProperties[this.propertyName];\r\n\r\n            let returnValue;\r\n            if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n                returnValue = [this.propertyStyleLookup[checkProperty]];\r\n            } else {\r\n               returnValue = [this.defaultStyle];\r\n            }\r\n\r\n            return returnValue;\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\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * style and legend object\r\n * @typedef {object} styleAndLegend\r\n * @property {styleFunc} style - style function\r\n * @property {string} legend - legend content\r\n */\r\n\r\n/**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @returns {styleAndLegend} style and legend object\r\n */\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: EsriResponse) {\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\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: 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\">&#9660;</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 * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse) {\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            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 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\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n    addPopup?: boolean;\r\n    showLayers?: Array<number>;\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\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, 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._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        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        this.addLegendContent();\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);\r\n            super.addLegendContent(newHtml);\r\n        }, 'json');\r\n    }\r\n\r\n\r\n    getPopupInfo(queryParams) {\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 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) {\r\n\r\n        if (this.leftLayers.indexOf(lyr) != -1){\r\n            return;\r\n        }\r\n\r\n        lyr.olLayer.on('precompose', (event) => {\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) {\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) {\r\n\r\n        if (this.rightLayers.indexOf(lyr) != -1){\r\n            return;\r\n        }\r\n\r\n        lyr.olLayer.on('precompose', (event) => {\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) {\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"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap 6e5b1af915babfe1fe92?33e6*","webpack:///./src/_test/compare-test.ts","webpack:///./src/olHelpers/quickMap.ts?1069","webpack:///./src/olHelpers/quickMapBase.ts?fb65","webpack:///./src/util/provide.ts?5c82","webpack:///external \"ol\"?81ed","webpack:///external \"$\"?57aa","webpack:///./src/olHelpers/mapMove.ts?6a2b","webpack:///./src/olHelpers/mapMoveCls.ts?cd45","webpack:///./src/olHelpers/mapInteractionBase.ts?f419","webpack:///./src/util/checkDefined.ts?bcd7","webpack:///./src/util/makeGuid.ts?e80e","webpack:///./src/olHelpers/mapPopup.ts?5d6c","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7","webpack:///./src/layers/LayerBase.ts?bf94","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b","webpack:///./src/olHelpers/esriToOlStyle.ts?9363","webpack:///./src/layers/LayerEsriMapServer.ts?9c85","webpack:///./src/olHelpers/layerSwipe.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;ACtCA;;IAEG;AACH,sEAA+C;AAC/C,2EAAiD;AACjD,wFAAgE;AAEhE,KAAI,GAAG,GAAG,mBAAQ,EAAE,CAAC;AAGrB,KAAI,MAAM,GAAG,IAAI,oBAAU,CAAC,GAAG,CAAC,CAAC;AAGjC,KAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,8GAA8G,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C;aAChE,GAAG,CAAC,IAAI,EAAE,CAAC;SACf,CAAC,CAAC,CAAC;SAEH,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,aAAa,EAAE,UAAU,KAAK;aACzC,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC;aAC3B,GAAG,CAAC,OAAO,EAAE,CAAC;SAClB,CAAC,CAAC,CAAC;SAEH,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAC/B,CAAC;KAED,sBAAI,oCAAY;cAAhB;aACI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;SAC9B,CAAC;cAED,UAAiB,OAAe;aAC5B,IAAI,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;aAE3F,EAAE,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC;iBACd,MAAM,CAAC;aACX,CAAC;aAAC,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;iBAC9C,MAAM,CAAC;aACX,CAAC;aAED,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC;aAC7B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,EAAK,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,MAAG,CAAC,CAAC;aAC9D,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;SACvB,CAAC;;;QAdA;KAeL,iBAAC;AAAD,EAAC;AAED,GAAE,CAAC,UAAU,GAAG,UAAU,CAAC;;AAC3B,mBAAe,UAAU,CAAC","file":"compare-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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6e5b1af915babfe1fe92","/**\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    'http://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    'http://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    'http://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    'http://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\n\n\n// WEBPACK FOOTER //\n// ./src/_test/compare-test.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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0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AAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////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+8dKzLmV9ymIwF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FQYZGgkTFQoVGQsZFAwZHBMeDhIbFBEbHAwWIA4bIREcIQ4hCQwjFw4lHBgkDB8sDxUiExIiGhAoGxohFRshGRorHQcrKQsiIQwmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+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+wPO56bOK+0rcwMrOK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dJh9vUlU1702/+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    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/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['gv'].util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 4\n// module chunks = 0 2 3 7","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 5\n// module chunks = 0 2 3 4 5 7 8","/**\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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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 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): 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","/**\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\nfunction 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 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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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","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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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","/**\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) {\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){\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 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 * This callback is displayed as part of the Requester class.\r\n * @callback styleFunc\r\n * @param {ol.Feature} feat - openlayers feature\r\n * @param {number} resolution - map resolution\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, opacity) {\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) {\r\n    return String(str)\r\n        .replace(/&/g, '&amp;')\r\n        .replace(/\"/g, '&quot;')\r\n        .replace(/'/g, '&#39;')\r\n        .replace(/</g, '&lt;')\r\n        .replace(/>/g, '&gt;');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface EsriResponse{\r\n    drawingInfo: {\r\n        renderer: EsriRenderer\r\n    },\r\n    geometryType: string\r\n}\r\n\r\nexport interface EsriRenderer{\r\n    type: string;\r\n    symbol: EsriSymbol;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\r\n}\r\n\r\nexport interface EsriSymbol{\r\n    size: number;\r\n    type: string;\r\n    outline:{\r\n        color: string;\r\n        width: number;\r\n    },\r\n    color: string;\r\n    width: number;\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n    legendHtml: string;\r\n    opacity: number;\r\n    symbolObj: EsriSymbol;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    /**\r\n     *\r\n     * @param symbolObj\r\n     * @param {number} opacity\r\n     */\r\n    constructor(symbolObj: EsriSymbol, 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: EsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n    constructor(symbolObj: EsriSymbol, 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}\">&#9679;</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: EsriSymbol, 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: EsriSymbol, 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\nclass SymbolGenerator {\r\n    opacity: number;\r\n    renderer: EsriRenderer;\r\n    legendHtml: string;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    constructor(esriResponse: 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}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n    symbol: EsriSymbol;\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, 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: EsriSymbol;\r\n    defaultStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n    defaultLabelHtml: string;\r\n    labelArray: Array<string>;\r\n    legendArray: Array<string>;\r\n    propertyStyleLookup: Object;\r\n    valueArray: Array<any>;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\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: EsriResponse, 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\r\n        this.olStyle = (feature: ol.Feature) => {\r\n            let checkProperties = feature.getProperties();\r\n            let checkProperty = checkProperties[this.propertyName];\r\n\r\n            let returnValue;\r\n            if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n                returnValue = [this.propertyStyleLookup[checkProperty]];\r\n            } else {\r\n               returnValue = [this.defaultStyle];\r\n            }\r\n\r\n            return returnValue;\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\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * style and legend object\r\n * @typedef {object} styleAndLegend\r\n * @property {styleFunc} style - style function\r\n * @property {string} legend - legend content\r\n */\r\n\r\n/**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @returns {styleAndLegend} style and legend object\r\n */\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: EsriResponse) {\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\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: 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\">&#9660;</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 * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse) {\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            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 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\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n    addPopup?: boolean;\r\n    showLayers?: Array<number>;\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\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, 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._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        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        this.addLegendContent();\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);\r\n            super.addLegendContent(newHtml);\r\n        }, 'json');\r\n    }\r\n\r\n\r\n    getPopupInfo(queryParams) {\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 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) {\r\n\r\n        if (this.leftLayers.indexOf(lyr) != -1){\r\n            return;\r\n        }\r\n\r\n        lyr.olLayer.on('precompose', (event) => {\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) {\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) {\r\n\r\n        if (this.rightLayers.indexOf(lyr) != -1){\r\n            return;\r\n        }\r\n\r\n        lyr.olLayer.on('precompose', (event) => {\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) {\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"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/itsMap.js b/test-html/js/itsMap.js
index 98a1286e7b6b97b802298a31375063edf3ee6332..0f576c0be5b37fd0fef1a7098ca44c3bc976da9b 100644
--- a/test-html/js/itsMap.js
+++ b/test-html/js/itsMap.js
@@ -1,3 +1,2992 @@
-!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";var n=o(21),r=o(17),i=o(12),a=i.default();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")},function(e,t){"use strict";function o(e){"undefined"==typeof window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){var r=o[t[n]];"undefined"==typeof r&&(o[t[n]]={}),o=o[t[n]]}return o}o("util"),window.gv.util.provide=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},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,o="x"==e?t:3&t|8;return o.toString(16)})}var r=o(1),i=r.default("util");i.makeGuid=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";var n=o(11);t.mapPopup=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapPopup},function(e,t,o){"use strict";var n=o(1),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,o){"use strict";var n=o(10);t.mapMove=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapMove},function(e,t,o){"use strict";var n=o(14),r=o(1),i=o(4),a=o(2),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),"undefined"!=typeof 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="");var t=e.indexOf("<ul>")>-1;t&&(e='<span class="legend-items-expander" title="Expand/Collapse">&#9660;</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("&#9660;")):(e.addClass("legend-layer-group-collapsed"),e.html("&#9654;"))}),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s},function(e,t,o){"use strict";function n(e){return"undefined"==typeof e||null===e}function r(e){return!n(e)}var i=o(1),a=i.default("util.checkDefined");t.undefinedOrNull=n,a.undefinedOrNull=n,t.definedAndNotNull=r,a.definedAndNotNull=r},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),i=o(9),a=o(1),l=o(4),s=o(2),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("undefined"==typeof e&&"undefined"==typeof 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){return void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1?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(t&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))))},t.prototype.addCallback=function(e,t,o,n,r){return this._mapMoveCallbacks.indexOf(e)>-1?void console.log("this function already added to map move"):(this._checkInit(),r||(r=l.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=r,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(n&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))))},t}(r.default);t.MapMoveCls=u,p.MapMoveCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),i=o(1),a=o(3),l=o(2),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._arrPopupLayerNames=[],t._arrPopupLayers=[],t._arrPopupOlLayers=[],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)};return 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">&#9664;</span>',c+='<span class="next-popup ol-popup-nav-arrow">&#9654;</span>',c+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',c+="<span>&nbsp;of&nbsp;</span>",c+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",c+="<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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=o.map.hasFeatureAtPixel(t,function(e){for(var t=0,n=o._arrPopupOlLayers;t<n.length;t++){var r=n[t];if(e==r)return!0}return!1}),r=o.map.getTargetElement();r.style.cursor=n?"pointer":""}}),!0},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++){var a=i[r];a(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=t._arrPopupOlLayers.indexOf(n);r>-1&&o.push(new p(e,t._arrPopupLayers[r],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._arrPopupLayerNames.push(e.name),this._arrPopupLayers.push(e),this._arrPopupOlLayers.push(e.olLayer),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._arrPopupLayerNames.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupOlLayers.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++){var n=o[t];n()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,s.MapPopupCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";function n(e){var t=r.quickMapBase(e);return a.default.init(t),l.default.init(t),t}var r=o(13),i=o(1),a=o(7),l=o(5),s=i.default("olHelpers");t.quickMap=n,s.quickMap=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";function n(e){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;var t=a("#"+e.divId);t.css("position","relative");var o=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 n=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),n.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var r=n.getCoordinates();e.center.x=r[0],e.center.y=r[1]}var l=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:[o],target:e.divId,controls:l,view:s});return e.fullScreen&&p.addControl(new i.control.FullScreen({})),p}var r=o(1),i=o(3),a=o(2),l=r.default("olHelpers");t.quickMapBase=n,l.quickMapBase=n,Object.defineProperty(t,"__esModule",{value:!0}),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}var i=o(1),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=o(1),r=o(4),i=o(7),a=n.default("collections"),l=o(2),s=function(){function e(e,t){this.groupLayers=[],this.groupLayersLookup={},this.groupGroups=[],this.groupGroupsLookup={},this.itemIdArray=[],"undefined"==typeof 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?"&#9654;":"&#9660;",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){for(var n=0,a=e;n<a.length;n++){var p=a[n];if("undefined"==typeof p)throw"undefined item passed in array to legend constructor"}o=o||{},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 u=0,c=this.layerGroup.allLayerArray;u<c.length;u++){var d=c[u];d.applyCollapse()}var h=this;o.scaleDependent&&(i.default.checkInit(),i.default.addCallback(function(e,t,o){if("undefined"==typeof 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","");h.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("&#9660;")):(e.addClass("legend-layer-group-collapsed"),e.html("&#9654;"))}),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||"undefined"==typeof t)&&(t=[]),"undefined"!=typeof o.groupName){var n=e[0],r=this.layerGroup.addGroup(n,t);t.push(r.groupId),this._buildTree(n.items,t)}else{var i=e[0];this.layerGroup.addLegendLayer(i,t)}this._buildTree(e.slice(1),t)}},e}();a.LayerLegend=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p},,,function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(8),i=o(7),a=o(1),l=o(3),s=o(2),p=(new l.Map({}),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="undefined"==typeof 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}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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";var n=o(33),r=o(1),i=o(27),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",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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s},,,,function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(20),i=o(1),a=o(3),l=o(32),s=o(2),p=i.default("layers"),u=function(e){function t(t,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||{dataProjection:l.proj4326,featureProjection:l.proj3857},(n.autoLoad||n.visible)&&n._load(),n}return n(t,e),t.prototype.addFeatures=function(e){"EPSG:3857"==this._transform.dataProjection&&"EPSG:3857"==this._transform.featureProjection?this._source.addFeatures(this._geoJsonFormat.readFeatures(e)):this._source.addFeatures(this._geoJsonFormat.readFeatures(e,this._transform))},t.prototype._load=function(){var t=this;return!!e.prototype._load.call(this)||(s.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,this._transform))},t}(r.LayerBaseVector);t.LayerBaseVectorGeoJson=u,p.LayerBaseVectorGeoJson=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},,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","undefined"==typeof o.iconArray&&(o.iconArray=[]),r++),"object"==typeof n){n.defaultName=n.defaultName||"Other",n.defaultWidth=n.defaultWidth||5,n.defaultColor=n.defaultColor||"red","undefined"==typeof 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="http://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="http://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(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},l=o(25),s=o(5),p=o(1),u=o(3),c=o(2),d=p.default("layers"),h=function(e){function t(t){var o=this;if("string"!=typeof t.itsType)throw"its type must be defined";var n="";return"undefined"==typeof 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,"http://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="http://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.default);d.LayerItsInventory=h,Object.defineProperty(t,"__esModule",{value:!0}),t.default=h},,,,,function(e,t,o){"use strict";var n=o(3);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){var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return isNaN(e)?"00":t[(e-e%16)/16]+t[e%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"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){var n=l(-2.5,2.5,o);return function(o){var r;return r=null==o?null:(o-e)/t,n(r)}}var p=o(1),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(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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!******************************!*\
+  !*** ./dist/_test/itsMap.js ***!
+  \******************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/18/2015.
+	 */
+	"use strict";
+	var ItsLayerCollection_1 = __webpack_require__(/*! ../collections/ItsLayerCollection */ 26);
+	var LayerLegend_1 = __webpack_require__(/*! ../collections/LayerLegend */ 31);
+	var quickMap_1 = __webpack_require__(/*! ../olHelpers/quickMap */ 1);
+	var map = quickMap_1.default();
+	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');
+
+
+/***/ },
+/* 1 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/quickMap.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var quickMapBase_1 = __webpack_require__(/*! ./quickMapBase */ 2);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var mapMove_1 = __webpack_require__(/*! ./mapMove */ 6);
+	var mapPopup_1 = __webpack_require__(/*! ./mapPopup */ 11);
+	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) {
+	    var m = quickMapBase_1.quickMapBase(options);
+	    mapMove_1.default.init(m);
+	    mapPopup_1.default.init(m);
+	    return m;
+	}
+	exports.quickMap = quickMap;
+	nm.quickMap = quickMap;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMap;
+
+
+/***/ },
+/* 2 */
+/*!****************************************!*\
+  !*** ./dist/olHelpers/quickMapBase.js ***!
+  \****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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) {
+	    options = 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;
+	    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/r2lAHARSwk2ORgEmOdC1Es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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==')";
+	    if (options.baseSwitcher) {
+	    }
+	    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({}));
+	    }
+	    return map;
+	}
+	exports.quickMapBase = quickMapBase;
+	nm.quickMapBase = quickMapBase;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMapBase;
+
+
+/***/ },
+/* 3 */
+/*!******************************!*\
+  !*** ./dist/util/provide.js ***!
+  \******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = provide;
+
+
+/***/ },
+/* 4 */
+/*!*********************!*\
+  !*** external "ol" ***!
+  \*********************/
+/***/ function(module, exports) {
+
+	module.exports = ol;
+
+/***/ },
+/* 5 */
+/*!********************!*\
+  !*** external "$" ***!
+  \********************/
+/***/ function(module, exports) {
+
+	module.exports = $;
+
+/***/ },
+/* 6 */
+/*!***********************************!*\
+  !*** ./dist/olHelpers/mapMove.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapMoveCls_1 = __webpack_require__(/*! ./mapMoveCls */ 7);
+	/**
+	 * The single map move object catch is that it is common to multimap pages
+	 * @type {MapMoveCls}
+	 */
+	exports.mapMove = new mapMoveCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapMove;
+
+
+/***/ },
+/* 7 */
+/*!**************************************!*\
+  !*** ./dist/olHelpers/mapMoveCls.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var checkDefined = __webpack_require__(/*! ../util/checkDefined */ 9);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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] = functionId;
+	        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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapMoveCls;
+
+
+/***/ },
+/* 8 */
+/*!**********************************************!*\
+  !*** ./dist/olHelpers/mapInteractionBase.js ***!
+  \**********************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 12/8/2015.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapInteractionBase;
+
+
+/***/ },
+/* 9 */
+/*!***********************************!*\
+  !*** ./dist/util/checkDefined.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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 */
+/*!*******************************!*\
+  !*** ./dist/util/makeGuid.js ***!
+  \*******************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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);
+	    });
+	}
+	nm.makeGuid = makeGuid;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = makeGuid;
+
+
+/***/ },
+/* 11 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/mapPopup.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapPopupCls_1 = __webpack_require__(/*! ./mapPopupCls */ 12);
+	/**
+	 * The single popup object catch is that it is common to multimap pages
+	 * @type {MapPopupCls}
+	 */
+	exports.mapPopup = new mapPopupCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapPopup;
+
+
+/***/ },
+/* 12 */
+/*!***************************************!*\
+  !*** ./dist/olHelpers/mapPopupCls.js ***!
+  \***************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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
+	     * &param feature the openlayers vector feature
+	     * $param
+	     */
+	    /**
+	     * map popup constructor
+	     */
+	    function MapPopupCls() {
+	        var _this = _super.call(this, 'map popup') || this;
+	        _this._arrPopupLayerIds = [];
+	        _this._arrPopupLayerNames = [];
+	        _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) {
+	                }
+	                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">&#9664;</span>';
+	            popupHtml += '<span class="next-popup ol-popup-nav-arrow">&#9654;</span>';
+	            popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>";
+	            popupHtml += "<span>&nbsp;of&nbsp;</span>";
+	            popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>";
+	            popupHtml += "<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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 = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {
+	                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {
+	                    var olLayer = _a[_i];
+	                    if (lyrCandidate == olLayer) {
+	                        return true;
+	                    }
+	                }
+	                return false;
+	            });
+	            var mapElement = _this.map.getTargetElement();
+	            mapElement.style.cursor = hit ? 'pointer' : '';
+	        });
+	        return true;
+	    };
+	    /**
+	     * 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 lyrIndex = _this._arrPopupOlLayers.indexOf(layer);
+	            if (lyrIndex > -1) {
+	                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));
+	            }
+	        });
+	        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._arrPopupLayerNames.push(lyr.name);
+	        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._arrPopupLayerNames.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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapPopupCls;
+
+
+/***/ },
+/* 13 */,
+/* 14 */,
+/* 15 */
+/*!**********************************!*\
+  !*** ./dist/layers/LayerBase.js ***!
+  \**********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var zoomResolutionConvert = __webpack_require__(/*! ../olHelpers/zoomResolutionConvert */ 16);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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">&#9660;</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('&#9660;');
+	                    }
+	                    else {
+	                        $this.addClass('legend-layer-group-collapsed');
+	                        $this.html('&#9654;');
+	                    }
+	                });
+	                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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBase;
+
+
+/***/ },
+/* 16 */
+/*!*************************************************!*\
+  !*** ./dist/olHelpers/zoomResolutionConvert.js ***!
+  \*************************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/14/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+
+
+/***/ },
+/* 17 */,
+/* 18 */,
+/* 19 */,
+/* 20 */,
+/* 21 */,
+/* 22 */
+/*!****************************************!*\
+  !*** ./dist/layers/LayerBaseVector.js ***!
+  \****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var LayerBase_1 = __webpack_require__(/*! ./LayerBase */ 15);
+	var mapMove_1 = __webpack_require__(/*! ../olHelpers/mapMove */ 6);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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" });
+	        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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBaseVector;
+
+
+/***/ },
+/* 23 */,
+/* 24 */,
+/* 25 */,
+/* 26 */
+/*!************************************************!*\
+  !*** ./dist/collections/ItsLayerCollection.js ***!
+  \************************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/14/2015.
+	 */
+	"use strict";
+	var colors = __webpack_require__(/*! ../util/colors */ 27);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var LayerItsInventory_1 = __webpack_require__(/*! ../layers/LayerItsInventory */ 28);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = ItsLayerCollection;
+
+
+/***/ },
+/* 27 */
+/*!*****************************!*\
+  !*** ./dist/util/colors.js ***!
+  \*****************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	var chk = __webpack_require__(/*! ./checkDefined */ 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"];
+	    return isNaN(x) ? "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 (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) {
+	    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;
+
+
+/***/ },
+/* 28 */
+/*!******************************************!*\
+  !*** ./dist/layers/LayerItsInventory.js ***!
+  \******************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/8/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var LayerBaseVectorGeoJson_1 = __webpack_require__(/*! ./LayerBaseVectorGeoJson */ 29);
+	var mapPopup_1 = __webpack_require__(/*! ../olHelpers/mapPopup */ 11);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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 http://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 = 'http://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;
+	    }
+	}
+	/**
+	 *
+	 * @param {string} [itsIcon=undefined] the ITS device type icon image see http://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 {string} html to be added to the legend
+	 */
+	function defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {
+	    "use strict";
+	    var iconHeight = 17;
+	    checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);
+	    var _iconUrlRoot = 'http://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 http://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 http://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 http://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';
+	        }
+	        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, 'http://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=\"http://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.default));
+	nm.LayerItsInventory = LayerItsInventory;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerItsInventory;
+
+
+/***/ },
+/* 29 */
+/*!***********************************************!*\
+  !*** ./dist/layers/LayerBaseVectorGeoJson.js ***!
+  \***********************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/2/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var LayerBaseVector_1 = __webpack_require__(/*! ./LayerBaseVector */ 22);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var proj = __webpack_require__(/*! ../olHelpers/projections */ 30);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	var nm = provide_1.default('layers');
+	/**
+	 * The Vector GeoJson Layer
+	 * @augments LayerBaseVector
+	 */
+	var LayerBaseVectorGeoJson = (function (_super) {
+	    __extends(LayerBaseVectorGeoJson, _super);
+	    /**
+	     * @param {string|undefined|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) {
+	        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 || { dataProjection: proj.proj4326, featureProjection: proj.proj3857 };
+	        if (_this.autoLoad || _this.visible) {
+	            _this._load();
+	        }
+	        return _this;
+	    }
+	    /**
+	     * add feature collection
+	     * @param {object} featureCollection - as geojson object
+	     */
+	    LayerBaseVectorGeoJson.prototype.addFeatures = function (featureCollection) {
+	        if (this._transform.dataProjection == 'EPSG:3857' && this._transform.featureProjection == 'EPSG:3857') {
+	            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection));
+	        }
+	        else {
+	            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, this._transform));
+	        }
+	    };
+	    /**
+	     * 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, this._transform));
+	    };
+	    return LayerBaseVectorGeoJson;
+	}(LayerBaseVector_1.LayerBaseVector));
+	exports.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;
+	nm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBaseVectorGeoJson;
+
+
+/***/ },
+/* 30 */
+/*!***************************************!*\
+  !*** ./dist/olHelpers/projections.js ***!
+  \***************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 10/3/2016.
+	 */
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	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' });
+
+
+/***/ },
+/* 31 */
+/*!*****************************************!*\
+  !*** ./dist/collections/LayerLegend.js ***!
+  \*****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/16/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var mapMove_1 = __webpack_require__(/*! ../olHelpers/mapMove */ 6);
+	var nm = provide_1.default('collections');
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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 ? '&#9654;' : '&#9660;';
+	            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) {
+	        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 = options || {};
+	        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('&#9660;');
+	            }
+	            else {
+	                $this.addClass('legend-layer-group-collapsed');
+	                $this.html('&#9654;');
+	            }
+	        });
+	        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(groupItem.items, parents);
+	        }
+	        else {
+	            /**
+	             * @type {LayerBase}
+	             */
+	            var layerItem = legendItems[0];
+	            this.layerGroup.addLegendLayer(layerItem, parents);
+	        }
+	        this._buildTree(legendItems.slice(1), parents);
+	    };
+	    return LayerLegend;
+	}());
+	nm.LayerLegend = LayerLegend;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerLegend;
+
+
+/***/ }
+/******/ ]);
 //# sourceMappingURL=itsMap.js.map
\ No newline at end of file
diff --git a/test-html/js/itsMap.js.map b/test-html/js/itsMap.js.map
index 56c0ed256852f95e766773b87461797a950cf5ec..84b90902b930f3353dab6cb3a63ee184ba80e8e9 100644
--- a/test-html/js/itsMap.js.map
+++ b/test-html/js/itsMap.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///itsMap.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457","webpack:///./src/_test/itsMap.ts","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/mapMove.ts?6a2b","webpack:///./src/layers/LayerBase.ts?bf94","webpack:///./src/util/checkDefined.ts?bcd7","webpack:///./src/olHelpers/mapMoveCls.ts?cd45","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7","webpack:///./src/olHelpers/quickMap.ts?1069","webpack:///./src/olHelpers/quickMapBase.ts?fb65","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b","webpack:///./src/collections/LayerLegend.ts","webpack:///./src/layers/LayerBaseVector.ts?c105","webpack:///./src/collections/ItsLayerCollection.ts","webpack:///./src/layers/LayerBaseVectorGeoJson.ts","webpack:///./src/layers/LayerItsInventory.ts","webpack:///./src/olHelpers/projections.ts","webpack:///./src/util/colors.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","ItsLayerCollection_1","LayerLegend_1","quickMap_1","map","default","window","itsLayerCollection","layerArray","groupName","collapse","addCheck","items","layers","console","log","provide","namespace","parts","split","nameSpace","i","length","newObject","util","Object","defineProperty","value","$","ol","makeGuid","replace","r","Math","random","v","toString","provide_1","nm","mapPopupCls_1","mapPopup","MapInteractionBase","subtype","this","_map","_initialized","_subtype","prototype","init","theMap","get","enumerable","configurable","_checkInit","initialized","msg","alert","checkInit","mapMoveCls_1","mapMove","zoomResolutionConvert","makeGuid_1","LayerBase","url","options","_url","_params","params","_legendCollapse","legendCollapse","_legendCheckbox","legendCheckbox","_name","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","getLegendDiv","additionalContent","addCollapse","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","undefinedOrNull","input","definedAndNotNull","__extends","d","b","__","constructor","hasOwnProperty","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_this","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","getView","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","clear","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","push","addCallback","func","context","delay","FeatureLayerProperties","feature","layer","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayerNames","_arrPopupLayers","_arrPopupOlLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","n","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","addOverlay","evt","closePopup","queryParams","geometry","join","geometryType","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","l","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","addFeature","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","hasFeatureAtPixel","lyrCandidate","mapElement","getTargetElement","style","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","forEachFeatureAtPixel","lyrIndex","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","color","width","theStyle","olStyle","Style","stroke","Stroke","image","Circle","radius","fill","Fill","Vector","addLayer","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","quickMap","quickMapBase_1","quickMapBase","mapMove_1","mapPopup_1","divId","center","x","y","zoom","baseSwitcher","fullScreen","$mapDiv","css","osmLayer","Tile","OSM","geom","Point","proj","Projection","code","transform","coordinates","getCoordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","LayerGroup","groupConfig","parent","groupLayers","groupLayersLookup","groupGroups","groupGroupsLookup","itemIdArray","groupId","allGroupLookup","root","allGroupArray","allLayerArray","allLayerLookup","layerParentLookup","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","layerItem","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","colors","LayerItsInventory_1","itsConfig","itsType","itsIconConfig","defaultName","defaultIcon","iconArray","itsIcon","itsLineConfig","defaultColor","hexAlphaToRgbOrRgba","lineArray","ItsLayerCollection","exclude","_layers","lyrConfig","j","inventLyr","LayerBaseVector_1","LayerBaseVectorGeoJson","_geoJsonFormat","format","GeoJSON","_transform","dataProjection","proj4326","featureProjection","proj3857","autoLoad","readFeatures","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","lowerLeft","lowerLeftCoordinates","upperRight","upperRightCoordinates","L","R","B","T","proj3070","_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"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAASI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Aja,EAAGia,oBAAsBA,EASzB9c,EAAAkhB,YASAre,EAAGqe,UAAYA,EAiBflhB,EAAAqhB,2BA6DAxe,EAAGwe,yBAA2BA,EAU9BrhB,EAAA8hB,iCAiBAjf,EAAGif,+BAAiCA","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/18/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar ItsLayerCollection_1 = __webpack_require__(21);\r\n\tvar LayerLegend_1 = __webpack_require__(17);\r\n\tvar quickMap_1 = __webpack_require__(12);\r\n\tvar map = quickMap_1.default();\r\n\twindow['map'] = map;\r\n\tvar itsLayerCollection = new ItsLayerCollection_1.default(map);\r\n\tvar layerArray = [\r\n\t    {\r\n\t        groupName: 'ITS Inventory Layers',\r\n\t        collapse: false,\r\n\t        addCheck: true,\r\n\t        items: itsLayerCollection.layers\r\n\t    }\r\n\t];\r\n\tvar legend = new LayerLegend_1.default(layerArray, 'legend-container', {});\r\n\tconsole.log('it works');\r\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\t/**\r\n\t * create a namespace on the gv object\r\n\t * @param {string} namespace to create\r\n\t * @returns {object} object representing the namespace\r\n\t */\r\n\tfunction provide(namespace) {\r\n\t    \"use strict\";\r\n\t    if (typeof window['gv'] == 'undefined') {\r\n\t        window['gv'] = {};\r\n\t    }\r\n\t    var parts = namespace.split('.');\r\n\t    var nameSpace = window['gv'];\r\n\t    for (var i = 0; i < parts.length; i++) {\r\n\t        var newObject = nameSpace[parts[i]];\r\n\t        if (typeof newObject == 'undefined') {\r\n\t            nameSpace[parts[i]] = {};\r\n\t        }\r\n\t        nameSpace = nameSpace[parts[i]];\r\n\t    }\r\n\t    return nameSpace;\r\n\t}\r\n\tprovide('util');\r\n\twindow['gv'].util.provide = provide;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = provide;\r\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = $;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = ol;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util');\r\n\t/**\r\n\t * guids are used to uniquely identify groups and features\r\n\t * @returns {string} a new guid\r\n\t */\r\n\tfunction makeGuid() {\r\n\t    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n\t        .replace(/[xy]/g, function (c) {\r\n\t        var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\t        return v.toString(16);\r\n\t    });\r\n\t}\r\n\tnm.makeGuid = makeGuid;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = makeGuid;\r\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapPopupCls_1 = __webpack_require__(11);\r\n\t/**\r\n\t * The single popup object catch is that it is common to multimap pages\r\n\t * @type {MapPopupCls}\r\n\t */\r\n\texports.mapPopup = new mapPopupCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapPopup;\r\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 12/8/2015.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * base interaction\r\n\t */\r\n\tvar MapInteractionBase = (function () {\r\n\t    /**\r\n\t     * map interaction base\r\n\t     * @param subtype - the interaction subtype\r\n\t     */\r\n\t    function MapInteractionBase(subtype) {\r\n\t        this._map = null;\r\n\t        this._initialized = false;\r\n\t        this._subtype = subtype;\r\n\t    }\r\n\t    /**\r\n\t     * base initializer, returns true for already initialized\r\n\t     * @param theMap - the ol Map\r\n\t     * @returns true for already initialized\r\n\t     */\r\n\t    MapInteractionBase.prototype.init = function (theMap) {\r\n\t        if (!this._initialized) {\r\n\t            this._map = theMap;\r\n\t            this._initialized = true;\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n\t        /**\r\n\t         * get reference to the ol map object\r\n\t         * @returns {ol.Map} the map object\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._map;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n\t        /**\r\n\t         * get if is initialized\r\n\t         * @returns {boolean} is initialized\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._initialized;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     * @protected\r\n\t     */\r\n\t    MapInteractionBase.prototype._checkInit = function () {\r\n\t        if (!this.initialized) {\r\n\t            var msg = this._subtype + \" object not initialized\";\r\n\t            alert(msg);\r\n\t            console.log(msg);\r\n\t            throw msg;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     */\r\n\t    MapInteractionBase.prototype.checkInit = function () {\r\n\t        this._checkInit();\r\n\t    };\r\n\t    return MapInteractionBase;\r\n\t}());\r\n\texports.MapInteractionBase = MapInteractionBase;\r\n\tnm.MapInteractionBase = MapInteractionBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapInteractionBase;\r\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapMoveCls_1 = __webpack_require__(10);\r\n\t/**\r\n\t * The single map move object catch is that it is common to multimap pages\r\n\t * @type {MapMoveCls}\r\n\t */\r\n\texports.mapMove = new mapMoveCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapMove;\r\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar zoomResolutionConvert = __webpack_require__(14);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * The base layer class\r\n\t * @abstract\r\n\t */\r\n\tvar LayerBase = (function () {\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {string} url - url for source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id=makeGuid()] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] - the z index for the layer\r\n\t     * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n\t     */\r\n\t    function LayerBase(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        options = options || {};\r\n\t        if (typeof url !== 'string') {\r\n\t            throw 'Invalid URL';\r\n\t        }\r\n\t        this._url = url;\r\n\t        this._params = typeof options.params == 'object' ? options.params : {};\r\n\t        this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n\t        this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\t        this.id = options.id || makeGuid_1.default();\r\n\t        this._name = options.name || 'Unnamed Layer';\r\n\t        this.animate = false;\r\n\t        this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\t        if (this._opacity > 1) {\r\n\t            this._opacity = 1;\r\n\t        }\r\n\t        else if (this._opacity < 0) {\r\n\t            this._opacity = 0;\r\n\t        }\r\n\t        this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\t        this._source = undefined;\r\n\t        /**\r\n\t         *\r\n\t         * @protected\r\n\t         */\r\n\t        this._olLayer = undefined;\r\n\t        this._loaded = false;\r\n\t        this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n\t        if (typeof this._maxResolution !== 'undefined') {\r\n\t            this._maxResolution += 0.00001;\r\n\t        }\r\n\t        this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\t        this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n\t        this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n\t        this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\t        this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n\t        };\r\n\t        this._legendContent = '';\r\n\t        if (this._legendCheckbox) {\r\n\t            this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n\t                (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n\t            this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        else {\r\n\t            this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        this._$legendDiv = null;\r\n\t        this._applyCollapseCalled = false;\r\n\t        this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n\t    }\r\n\t    /**\r\n\t     * base load function, sets _loaded = true if it is not already\r\n\t     * @protected\r\n\t     * @returns {boolean} if already loaded\r\n\t     */\r\n\t    LayerBase.prototype._load = function () {\r\n\t        if (this.loaded == true) {\r\n\t            return true;\r\n\t        }\r\n\t        else {\r\n\t            this._loaded = true;\r\n\t            return false;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Get the legend html, be sure to only add to the DOM once\r\n\t     * @returns {string} html for layer wrapped in a div\r\n\t     */\r\n\t    LayerBase.prototype.getLegendDiv = function () {\r\n\t        return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param additionalContent - additional content to add to legend\r\n\t     * @private\r\n\t     */\r\n\t    LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n\t        if (additionalContent === void 0) { additionalContent = ''; }\r\n\t        var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\t        if (addCollapse) {\r\n\t            additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">&#9660;</span>' + additionalContent;\r\n\t        }\r\n\t        this._legendContent += additionalContent;\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            this._$legendDiv.append(additionalContent);\r\n\t            this.applyCollapse();\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=] - additonal content to add\r\n\t     */\r\n\t    LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n\t        this._addLegendContent(additionalContent);\r\n\t    };\r\n\t    LayerBase.prototype.applyCollapse = function () {\r\n\t        if (this._applyCollapseCalled) {\r\n\t            console.log('collapse already applied');\r\n\t            return undefined;\r\n\t        }\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            var $expander = this._$legendDiv.find('.legend-items-expander');\r\n\t            if ($expander.length > 0) {\r\n\t                this._applyCollapseCalled = true;\r\n\t                $expander.click(function () {\r\n\t                    var $this = $(this);\r\n\t                    $this.siblings('ul').slideToggle();\r\n\t                    if ($this.hasClass('legend-layer-group-collapsed')) {\r\n\t                        $this.removeClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9660;');\r\n\t                    }\r\n\t                    else {\r\n\t                        $this.addClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9654;');\r\n\t                    }\r\n\t                });\r\n\t                if (this._legendCollapse) {\r\n\t                    $expander.trigger('click');\r\n\t                }\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * trick to refresh the layer\r\n\t     */\r\n\t    LayerBase.prototype.refresh = function () {\r\n\t        if (this.source) {\r\n\t            this.source.refresh();\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"id\", {\r\n\t        get: function () {\r\n\t            return this._id;\r\n\t        },\r\n\t        set: function (newId) {\r\n\t            this._id = newId;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n\t        get: function () {\r\n\t            return this._animate;\r\n\t        },\r\n\t        set: function (animate) {\r\n\t            this._animate = animate;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n\t        /**\r\n\t         * get the legend content\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._legendContent;\r\n\t        },\r\n\t        /**\r\n\t         * set the legend content directly\r\n\t         * @param {string} newVal - new content\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newVal) {\r\n\t            this._legendContent = newVal;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"params\", {\r\n\t        /**\r\n\t         * get the map get params\r\n\t         * @type {object}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._params;\r\n\t        },\r\n\t        /**\r\n\t         * set the map get params\r\n\t         * @param {object} newParams - new get params\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newParams) {\r\n\t            this._params = newParams;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n\t        /**\r\n\t         * get the minimum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n\t        /**\r\n\t         * get the maximum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n\t        /**\r\n\t         * get min zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n\t        /**\r\n\t         * get max zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"url\", {\r\n\t        /**\r\n\t         * get the url\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._url;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n\t        /**\r\n\t         * Get the layer visibility\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._visible;\r\n\t        },\r\n\t        /**\r\n\t         * set the visibility\r\n\t         * @param visibility\r\n\t         */\r\n\t        set: function (visibility) {\r\n\t            this.setVisible(visibility);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setVisible = function (visibility) {\r\n\t        this._visible = visibility;\r\n\t        if (this.olLayer) {\r\n\t            this.olLayer.setVisible(this._visible);\r\n\t            if (visibility && !this._loaded) {\r\n\t                this._load();\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n\t        /**\r\n\t         * Get the layer opacity\r\n\t         * @type {number}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._opacity;\r\n\t        },\r\n\t        /**\r\n\t         * Set the layer opacity\r\n\t         * @param {number} opacity - layer opacity\r\n\t         */\r\n\t        set: function (opacity) {\r\n\t            this._opacity = opacity;\r\n\t            if (this.olLayer) {\r\n\t                this.olLayer.setOpacity(this._opacity);\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"name\", {\r\n\t        /**\r\n\t         * Get the layer name\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._name;\r\n\t        },\r\n\t        /**\r\n\t         * set the layer name\r\n\t         * @param {string} newName - the new name\r\n\t         */\r\n\t        set: function (newName) {\r\n\t            this._name = newName;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n\t        /**\r\n\t         * Check if the layer is loaded\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._loaded;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"source\", {\r\n\t        /**\r\n\t         * get the layer source\r\n\t         * @type {*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getSource();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getSource = function () {\r\n\t        return this._source;\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n\t        /**\r\n\t         * get the z index\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._zIndex;\r\n\t        },\r\n\t        /**\r\n\t         * set the z index\r\n\t         */\r\n\t        set: function (newZ) {\r\n\t            this._zIndex = newZ;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setZIndex = function (newZ) {\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         * the the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getOlLayer();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getOlLayer = function () {\r\n\t        return this._olLayer;\r\n\t    };\r\n\t    return LayerBase;\r\n\t}());\r\n\texports.LayerBase = LayerBase;\r\n\tnm.LayerBase = LayerBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBase;\r\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util.checkDefined');\r\n\t/**\r\n\t * check if the input is undefined or null\r\n\t * @param input - input pointer\r\n\t * @returns true undefined or null\r\n\t */\r\n\tfunction undefinedOrNull(input) {\r\n\t    \"use strict\";\r\n\t    return (typeof input === 'undefined' || input === null);\r\n\t}\r\n\texports.undefinedOrNull = undefinedOrNull;\r\n\tnm.undefinedOrNull = undefinedOrNull;\r\n\t/**\r\n\t * check if the input is defined and not null\r\n\t * @param input - input pointer\r\n\t * @returns true defined and not null\r\n\t */\r\n\tfunction definedAndNotNull(input) {\r\n\t    \"use strict\";\r\n\t    return !(undefinedOrNull(input));\r\n\t}\r\n\texports.definedAndNotNull = definedAndNotNull;\r\n\tnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar checkDefined = __webpack_require__(9);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * assists with map move interactions, trigger callback functions\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapMoveCls = (function (_super) {\r\n\t    __extends(MapMoveCls, _super);\r\n\t    /**\r\n\t     * constructor called implicitly\r\n\t     */\r\n\t    function MapMoveCls() {\r\n\t        var _this = _super.call(this, 'map move') || this;\r\n\t        _this._arrLyrRequest = [];\r\n\t        _this._arrLyrTimeout = [];\r\n\t        _this._arrLayer = [];\r\n\t        _this._lookupLayer = {};\r\n\t        _this._mapMoveCallbacks = [];\r\n\t        _this._mapMoveCallbacksLookup = {};\r\n\t        _this._mapMoveCallbackDelays = [];\r\n\t        _this._mapMoveCallbackContext = [];\r\n\t        _this._mapMoveCallbackTimeout = [];\r\n\t        _this._mapExtent = undefined;\r\n\t        _this._zoomLevel = undefined;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * initialize the map move object\r\n\t     * @param theMap - the ol map\r\n\t     */\r\n\t    MapMoveCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n\t            _this._updateMapExtent();\r\n\t            // trigger the layer updates\r\n\t            for (var i = 0; i < _this._arrLayer.length; i++) {\r\n\t                _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n\t            }\r\n\t            // trigger the map callbacks\r\n\t            for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n\t                _this.triggerMoveCallback(i, e.type);\r\n\t            }\r\n\t        });\r\n\t    };\r\n\t    MapMoveCls.prototype._updateMapExtent = function () {\r\n\t        var theView = this.map.getView();\r\n\t        this._zoomLevel = theView.getZoom();\r\n\t        var extentArray = theView.calculateExtent(this.map.getSize());\r\n\t        this._mapExtent = {\r\n\t            minX: extentArray[0],\r\n\t            minY: extentArray[1],\r\n\t            maxX: extentArray[2],\r\n\t            maxY: extentArray[3]\r\n\t        };\r\n\t    };\r\n\t    Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n\t        /**\r\n\t         * return the map extent\r\n\t         */\r\n\t        get: function () {\r\n\t            if (!this._mapExtent) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            return this._mapExtent;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Trigger the layer load\r\n\t     * @param lyr the layer being acted on\r\n\t     * @param index index of the layer\r\n\t     * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n\t        if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            throw 'need to define lyr or index';\r\n\t        }\r\n\t        else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            index = this._arrLayer.indexOf(lyr);\r\n\t        }\r\n\t        else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n\t            lyr = this._arrLayer[index];\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._arrLyrTimeout[index] != null) {\r\n\t            clearTimeout(this._arrLyrTimeout[index]);\r\n\t            this._arrLyrTimeout[index] = null;\r\n\t        }\r\n\t        // abort if necessary and clear the request\r\n\t        if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n\t            this._arrLyrRequest[index].abort();\r\n\t            this._arrLyrRequest[index] = null;\r\n\t        }\r\n\t        // dummy callback used if before load returns false\r\n\t        var callbackFunc = function () { };\r\n\t        if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n\t            lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\t            var __this_1 = this;\r\n\t            callbackFunc = function () {\r\n\t                function innerFunction(theLayer, theIndex) {\r\n\t                    var _innerThis = this;\r\n\t                    this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n\t                        /**\r\n\t                         * @type {LayerBaseVector}\r\n\t                         */\r\n\t                        theLayer.mapMoveCallback(d);\r\n\t                        theLayer.loadCallback();\r\n\t                    }, 'json').fail(function (jqXHR) {\r\n\t                        if (jqXHR.statusText != 'abort') {\r\n\t                            console.log('failed');\r\n\t                            console.log(theLayer.url);\r\n\t                            console.log(theLayer.mapMoveParams);\r\n\t                        }\r\n\t                    }).always(function () {\r\n\t                        _innerThis._arrLyrTimeout[theIndex] = null;\r\n\t                        _innerThis._arrLyrRequest[theIndex] = null;\r\n\t                    });\r\n\t                }\r\n\t                innerFunction.call(__this_1, lyr, index);\r\n\t            };\r\n\t        }\r\n\t        else {\r\n\t            lyr.clear();\r\n\t        }\r\n\t        this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n\t    };\r\n\t    /**\r\n\t     * trigger the map move call back at the given index\r\n\t     * @param ind - the index of the layer\r\n\t     * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n\t     * @param functionId=undefined the function id used to reference the added callback function\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n\t        if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n\t            throw 'either the function index or the id must be defined';\r\n\t        }\r\n\t        if (typeof ind !== 'number') {\r\n\t            ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n\t        }\r\n\t        if (ind < 0) {\r\n\t            console.log('function not found');\r\n\t            return;\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._mapMoveCallbackTimeout[ind] != null) {\r\n\t            clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n\t            this._mapMoveCallbackTimeout[ind] = null;\r\n\t        }\r\n\t        var ctx = this._mapMoveCallbackContext[ind];\r\n\t        var theFunc = this._mapMoveCallbacks[ind];\r\n\t        var __this = this;\r\n\t        var f = function () {\r\n\t            if (ctx !== null) {\r\n\t                theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t            else {\r\n\t                theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t        };\r\n\t        this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n\t    };\r\n\t    /**\r\n\t     * Add a layer to the interaction\r\n\t     * @param  lyr - layer to add\r\n\t     * @param triggerOnAdd - if the layer should be loaded on add\r\n\t     */\r\n\t    MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n\t        if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n\t        if (this._arrLayer.indexOf(lyr) > -1) {\r\n\t            console.log('already added ' + lyr.name + ' to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        this._arrLyrRequest.push(null);\r\n\t        this._arrLyrTimeout.push(null);\r\n\t        this._arrLayer.push(lyr);\r\n\t        this._lookupLayer[lyr.id] = lyr;\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add a callback to the map move event\r\n\t     * @param func - callback function\r\n\t     * @param context - the context to use for this function\r\n\t     * @param delay=50 the delay before call load\r\n\t     * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n\t     * @param functionId optional id to reference the function later for outside triggering\r\n\t     */\r\n\t    MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n\t        if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n\t            console.log('this function already added to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        if (!functionId) {\r\n\t            functionId = makeGuid_1.default();\r\n\t        }\r\n\t        this._mapMoveCallbacks.push(func);\r\n\t        this._mapMoveCallbacksLookup[functionId] = functionId;\r\n\t        this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n\t        this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n\t        this._mapMoveCallbackTimeout.push(null);\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n\t        }\r\n\t    };\r\n\t    return MapMoveCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapMoveCls = MapMoveCls;\r\n\tnm.MapMoveCls = MapMoveCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapMoveCls;\r\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\tvar FeatureLayerProperties = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param feature the feature\r\n\t     * @param layer - the layer in the popup\r\n\t     * @param layerIndex - index of the layer\r\n\t     * @param selectionLayer - the ol selection layer\r\n\t     * @param [esriLayerName=undefined] - esri layer name\r\n\t     */\r\n\t    function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n\t        this.feature = feature;\r\n\t        this.layer = layer;\r\n\t        this.layerIndex = layerIndex;\r\n\t        this.selectionLayer = selectionLayer;\r\n\t        this.popupContent = '';\r\n\t        this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n\t    }\r\n\t    Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n\t        get: function () {\r\n\t            if (typeof this.esriLayerName == 'string') {\r\n\t                return this.esriLayerName;\r\n\t            }\r\n\t            else {\r\n\t                return this.layer.name;\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return FeatureLayerProperties;\r\n\t}());\r\n\texports.FeatureLayerProperties = FeatureLayerProperties;\r\n\t/**\r\n\t * map popup class\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapPopupCls = (function (_super) {\r\n\t    __extends(MapPopupCls, _super);\r\n\t    /**\r\n\t     * Definition for openlayers style function\r\n\t     * @callback olStyleFunction\r\n\t     * &param feature the openlayers vector feature\r\n\t     * $param\r\n\t     */\r\n\t    /**\r\n\t     * map popup constructor\r\n\t     */\r\n\t    function MapPopupCls() {\r\n\t        var _this = _super.call(this, 'map popup') || this;\r\n\t        _this._arrPopupLayerIds = [];\r\n\t        _this._arrPopupLayerNames = [];\r\n\t        _this._arrPopupLayers = [];\r\n\t        _this._arrPopupOlLayers = [];\r\n\t        _this._arrPopupContentFunction = [];\r\n\t        _this._$popupContainer = undefined;\r\n\t        _this._$popupContent = undefined;\r\n\t        _this._$popupCloser = undefined;\r\n\t        _this._popupOverlay = undefined;\r\n\t        _this._selectionLayers = [];\r\n\t        _this._selectionLayerLookup = {};\r\n\t        _this._mapClickFunctions = [];\r\n\t        //let a = function($jqueryContent){console.log($jqueryContent)};\r\n\t        //this._popupChangedLookup = {'a': a};\r\n\t        _this._popupChangedFunctions = [];\r\n\t        _this._esriMapServiceLayers = [];\r\n\t        _this._popupOpen = false;\r\n\t        _this._popupCoordinate = null;\r\n\t        _this._passThroughLayerFeatureArray = [];\r\n\t        _this._currentPopupIndex = -1;\r\n\t        _this._popupContentLength = 0;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * map popup initialization\r\n\t     * @param {ol.Map} theMap - the ol map\r\n\t     */\r\n\t    MapPopupCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        var $map;\r\n\t        var target = this.map.getTarget();\r\n\t        if (typeof target == 'string') {\r\n\t            $map = $('#' + target);\r\n\t        }\r\n\t        else {\r\n\t            $map = $(target);\r\n\t        }\r\n\t        $map.append('<div class=\"ol-popup\">' +\r\n\t            '<span class=\"ol-popup-closer\">X</span>' +\r\n\t            '<div class=\"popup-content\"></div>' +\r\n\t            '</div>');\r\n\t        this._$popupContainer = $map.find('.ol-popup');\r\n\t        this._$popupContent = $map.find('.popup-content');\r\n\t        this._$popupCloser = $map.find('.ol-popup-closer');\r\n\t        var _ease = function (n) {\r\n\t            return ol.easing.inAndOut(n);\r\n\t        };\r\n\t        this._popupOverlay = new ol.Overlay({\r\n\t            element: this._$popupContainer[0],\r\n\t            autoPan: true,\r\n\t            autoPanAnimation: {\r\n\t                duration: 250,\r\n\t                source: theMap.getView().getCenter(),\r\n\t                easing: _ease\r\n\t            }\r\n\t        });\r\n\t        this._map.addOverlay(this._popupOverlay);\r\n\t        this._$popupCloser.click(function (evt) {\r\n\t            _this.closePopup();\r\n\t        });\r\n\t        // display popup on click\r\n\t        this._map.on('singleclick', function (evt) {\r\n\t            _this.closePopup();\r\n\t            _this._popupCoordinate = evt['coordinate'];\r\n\t            // esri map service layers\r\n\t            if (_this._esriMapServiceLayers.length > 0) {\r\n\t                var queryParams = {\r\n\t                    geometry: evt['coordinate'].join(','),\r\n\t                    geometryType: 'esriGeometryPoint',\r\n\t                    layers: 'all',\r\n\t                    sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n\t                    mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n\t                    imageDisplay: _this._map.getSize().join(',') + ',96',\r\n\t                    returnGeometry: true,\r\n\t                    tolerance: 15,\r\n\t                    f: 'pjson'\r\n\t                };\r\n\t                for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n\t                    var l = _a[_i];\r\n\t                    l.getPopupInfo(queryParams);\r\n\t                }\r\n\t            }\r\n\t            var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n\t            _this._passThroughLayerFeatureArray = [];\r\n\t            _this._currentPopupIndex = -1;\r\n\t            for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n\t                var featObj = layerFeatureObjectArray[i];\r\n\t                var props = featObj.feature.getProperties();\r\n\t                var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n\t                //skip if return was false\r\n\t                if (popupContentResponse === false) {\r\n\t                }\r\n\t                else if (typeof popupContentResponse == 'string') {\r\n\t                    featObj.popupContent = popupContentResponse;\r\n\t                    _this._passThroughLayerFeatureArray.push(featObj);\r\n\t                }\r\n\t                else {\r\n\t                    featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n\t                }\r\n\t            }\r\n\t            _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n\t            _this._currentPopupIndex = -1;\r\n\t            var popupHtml = '<div class=\"ol-popup-nav\">';\r\n\t            popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">&#9664;</span>';\r\n\t            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n\t            popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n\t            popupHtml += \"<span>&nbsp;of&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n\t            popupHtml += \"<span>&nbsp;&nbsp;-&nbsp;&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n\t            popupHtml += '</div>';\r\n\t            popupHtml += '<div class=\"ol-popup-inner\">';\r\n\t            popupHtml += '</div>';\r\n\t            _this._$popupContent.html(popupHtml);\r\n\t            _this._$popupContent.find('.previous-popup').click(function () {\r\n\t                if (_this._popupContentLength == 1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == 0) {\r\n\t                    _this._currentPopupIndex = _this._popupContentLength - 1;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex--;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            var nextPopup = _this._$popupContent.find('.next-popup');\r\n\t            nextPopup.click(function () {\r\n\t                if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n\t                    _this._currentPopupIndex = 0;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex++;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            if (_this._popupContentLength > 0) {\r\n\t                nextPopup.trigger('click');\r\n\t                _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n\t                _this._$popupContent.scrollTop(0);\r\n\t                _this._popupOpen = true;\r\n\t            }\r\n\t        });\r\n\t        //change mouse cursor when over marker\r\n\t        this._map.on('pointermove', function (evt) {\r\n\t            if (evt['dragging']) {\r\n\t                return;\r\n\t            }\r\n\t            var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n\t            var hit = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {\r\n\t                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {\r\n\t                    var olLayer = _a[_i];\r\n\t                    if (lyrCandidate == olLayer) {\r\n\t                        return true;\r\n\t                    }\r\n\t                }\r\n\t                return false;\r\n\t            });\r\n\t            var mapElement = _this.map.getTargetElement();\r\n\t            mapElement.style.cursor = hit ? 'pointer' : '';\r\n\t        });\r\n\t        return true;\r\n\t    };\r\n\t    /**\r\n\t     * helper to select features\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._triggerFeatSelect = function () {\r\n\t        var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n\t        var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n\t        var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n\t        this.clearSelection();\r\n\t        var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n\t        $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n\t        $layerNameSpan.html(lyrFeatObj.layerName);\r\n\t        $innerPopup.html(lyrFeatObj.popupContent);\r\n\t        lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n\t        for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f(this._$popupContent);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param feature - the ol feature\r\n\t     * @param {LayerEsriMapServer} lyr - the map server layer\r\n\t     * @param {string} popupContent - popup content\r\n\t     * @param {string} esriName - esri layer name\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n\t        var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n\t        featLayerObject.popupContent = popupContent;\r\n\t        this._passThroughLayerFeatureArray.push(featLayerObject);\r\n\t        this._popupContentLength++;\r\n\t        $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\t        if (!this._popupOpen) {\r\n\t            this._$popupContent.find('.next-popup').trigger('click');\r\n\t            this._popupOverlay.setPosition(this._popupCoordinate);\r\n\t            this._$popupContent.scrollTop(0);\r\n\t            this._popupOpen = true;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param  pixel - the ol pixel\r\n\t     * @returns  feature layer properties\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n\t        var _this = this;\r\n\t        var layerFeatureObjectArray = [];\r\n\t        this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n\t            var lyrIndex = _this._arrPopupOlLayers.indexOf(layer);\r\n\t            if (lyrIndex > -1) {\r\n\t                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));\r\n\t            }\r\n\t        });\r\n\t        return layerFeatureObjectArray;\r\n\t    };\r\n\t    MapPopupCls.prototype.closePopup = function () {\r\n\t        this._checkInit();\r\n\t        this._popupOpen = false;\r\n\t        this._popupOverlay.setPosition(undefined);\r\n\t        this._$popupCloser[0].blur();\r\n\t        this.clearSelection();\r\n\t        this._$popupContent.html('');\r\n\t        return false;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param chgFunction - popup change function\r\n\t     */\r\n\t    MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n\t        this._popupChangedFunctions.push(chgFunction);\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase|*} lyr - the layer being acted on\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns  the new selection layer\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n\t        this._checkInit();\r\n\t        selectionStyle = selectionStyle || {};\r\n\t        selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n\t        selectionStyle.width = selectionStyle.width || 10;\r\n\t        var theStyle;\r\n\t        if (selectionStyle.olStyle) {\r\n\t            theStyle = selectionStyle.olStyle;\r\n\t        }\r\n\t        else {\r\n\t            theStyle = new ol.style.Style({\r\n\t                stroke: new ol.style.Stroke({\r\n\t                    color: selectionStyle.color,\r\n\t                    width: selectionStyle.width\r\n\t                }),\r\n\t                image: new ol.style.Circle({\r\n\t                    radius: 7,\r\n\t                    fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n\t                    stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n\t                }),\r\n\t                fill: new ol.style.Fill({\r\n\t                    color: selectionStyle.color\r\n\t                })\r\n\t            });\r\n\t        }\r\n\t        var selectionLayer = new ol.layer.Vector({\r\n\t            source: new ol.source.Vector(),\r\n\t            style: theStyle\r\n\t        });\r\n\t        selectionLayer.setZIndex(100);\r\n\t        this._selectionLayers.push(selectionLayer);\r\n\t        this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n\t        this.map.addLayer(selectionLayer);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    /**\r\n\t     * Add popup to the map\r\n\t     * @param {LayerBase|*} lyr The layer that the popup with act on\r\n\t     * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._arrPopupLayerIds.push(lyr.id);\r\n\t        this._arrPopupLayerNames.push(lyr.name);\r\n\t        this._arrPopupLayers.push(lyr);\r\n\t        this._arrPopupOlLayers.push(lyr.olLayer);\r\n\t        this._arrPopupContentFunction.push(popupContentFunction);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase} lyr - layer\r\n\t     */\r\n\t    MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n\t        var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\t        if (idx > -1) {\r\n\t            this._arrPopupLayerIds.splice(idx, 1);\r\n\t            this._arrPopupLayerNames.splice(idx, 1);\r\n\t            this._arrPopupLayers.splice(idx, 1);\r\n\t            this._arrPopupOlLayers.splice(idx, 1);\r\n\t            this._arrPopupContentFunction.splice(idx, 1);\r\n\t            this._selectionLayers.splice(idx, 1);\r\n\t            delete this._selectionLayerLookup[lyr.id];\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerEsriMapServer} lyr - map server layer\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._esriMapServiceLayers.push(lyr);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    MapPopupCls.prototype.clearSelection = function () {\r\n\t        this._checkInit();\r\n\t        for (var i = 0; i < this._selectionLayers.length; i++) {\r\n\t            this._selectionLayers[i].getSource().clear();\r\n\t        }\r\n\t        for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f();\r\n\t        }\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     * Add a function to be called when the map is clicked but before any popups are implemented\r\n\t     * @param {function} func - the map click function\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n\t        this._mapClickFunctions.push(func);\r\n\t    };\r\n\t    return MapPopupCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapPopupCls = MapPopupCls;\r\n\tnm.MapPopupCls = MapPopupCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapPopupCls;\r\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar quickMapBase_1 = __webpack_require__(13);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param {object} [options={}] config options\r\n\t * @param {string} [options.divId=map] map div id\r\n\t * @param {object} [options.center={}] center config object\r\n\t * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param {number} [options.zoom=7] zoom level\r\n\t * @param {number} [options.minZoom=undefined] min zoom\r\n\t * @param {number} [options.maxZoom=undefined] max zoom\r\n\t * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n\t * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n\t * @returns {ol.Map} the ol map\r\n\t */\r\n\tfunction quickMap(options) {\r\n\t    var m = quickMapBase_1.quickMapBase(options);\r\n\t    mapMove_1.default.init(m);\r\n\t    mapPopup_1.default.init(m);\r\n\t    return m;\r\n\t}\r\n\texports.quickMap = quickMap;\r\n\tnm.quickMap = quickMap;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMap;\r\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param [options={}] config options\r\n\t * @param [options.divId=map] map div id\r\n\t * @param [options.center={}] center config object\r\n\t * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param [options.zoom=7] zoom level\r\n\t * @param [options.minZoom=undefined] min zoom\r\n\t * @param [options.maxZoom=undefined] max zoom\r\n\t * @param [options.baseSwitcher=true] if add base map switcher\r\n\t * @param [options.fullScreen=false] if add base map switcher\r\n\t * @returns the ol map\r\n\t */\r\n\tfunction quickMapBase(options) {\r\n\t    options = options || {};\r\n\t    options.divId = options.divId || 'map';\r\n\t    options.center = options.center || { x: -10018378, y: 5574910 };\r\n\t    options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n\t    options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n\t    options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n\t    var $mapDiv = $('#' + options.divId);\r\n\t    $mapDiv.css('position', 'relative');\r\n\t    var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n\t    // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\t    var osmCss = \"url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAAXNSR0IArs4c6QAAAAR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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+8dKzLmV9ymIwF5FOGn2GdJM8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QoVGQsZFAwZHBMeDhIbFBEbHAwWIA4bIREcIQ4hCQwjFw4lHBgkDB8sDxUiExIiGhAoGxohFRshGRorHQcrKQsiIQwmKgooJA0pKQ81Jw8yLRMiIxImKxUrJREuKhslJB0rIhooKRUuMBMyLhkwJhozKh48LxUzMRM9MBwzMiUvFCMtGiMwEiwzFCgzHDI+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+wPO56bOK+0rcwMrOKkpUbZWYxV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702/+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\t    if (options.baseSwitcher) {\r\n\t    }\r\n\t    if (options.zoom < 0 || options.zoom > 28) {\r\n\t        throw 'zoom out of range';\r\n\t    }\r\n\t    if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n\t        var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n\t        new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n\t        p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n\t        var coordinates = p.getCoordinates();\r\n\t        options.center.x = coordinates[0];\r\n\t        options.center.y = coordinates[1];\r\n\t    }\r\n\t    var controls = ol.control.defaults({\r\n\t        attributionOptions: { collapsible: false }\r\n\t    });\r\n\t    var view = new ol.View({\r\n\t        center: [options.center.x, options.center.y],\r\n\t        zoom: options.zoom,\r\n\t        minZoom: options.minZoom,\r\n\t        maxZoom: options.maxZoom\r\n\t    });\r\n\t    var map = new ol.Map({\r\n\t        layers: [osmLayer],\r\n\t        target: options.divId,\r\n\t        controls: controls,\r\n\t        view: view\r\n\t    });\r\n\t    if (options.fullScreen) {\r\n\t        map.addControl(new ol.control.FullScreen({}));\r\n\t    }\r\n\t    return map;\r\n\t}\r\n\texports.quickMapBase = quickMapBase;\r\n\tnm.quickMapBase = quickMapBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMapBase;\r\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/14/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\n\tvar _zoomResLookup = [\r\n\t    156543.03392804097,\r\n\t    78271.51696402048,\r\n\t    39135.75848201024,\r\n\t    19567.87924100512,\r\n\t    9783.93962050256,\r\n\t    4891.96981025128,\r\n\t    2445.98490512564,\r\n\t    1222.99245256282,\r\n\t    611.49622628141,\r\n\t    305.748113140705,\r\n\t    152.8740565703525,\r\n\t    76.43702828517625,\r\n\t    38.21851414258813,\r\n\t    19.109257071294063,\r\n\t    9.554628535647032,\r\n\t    4.777314267823516,\r\n\t    2.388657133911758,\r\n\t    1.194328566955879,\r\n\t    0.5971642834779395,\r\n\t    0.29858214173896974,\r\n\t    0.14929107086948487,\r\n\t    0.07464553543474244,\r\n\t    0.03732276771737122,\r\n\t    0.01866138385868561,\r\n\t    0.009330691929342804,\r\n\t    0.004665345964671402,\r\n\t    0.002332672982335701,\r\n\t    0.0011663364911678506,\r\n\t    0.0005831682455839253 //28\r\n\t];\r\n\t/**\r\n\t * Get the resolution given the zoom level\r\n\t * @param {number} zoomLevel - the zoom level\r\n\t * @returns {number|*} the map resolution\r\n\t */\r\n\tfunction zoomToResolution(zoomLevel) {\r\n\t    \"use strict\";\r\n\t    if (typeof zoomLevel == 'number') {\r\n\t        if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n\t            return _zoomResLookup[zoomLevel];\r\n\t        }\r\n\t        else {\r\n\t            console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n\t            return undefined;\r\n\t        }\r\n\t    }\r\n\t    else {\r\n\t        return undefined;\r\n\t    }\r\n\t}\r\n\texports.zoomToResolution = zoomToResolution;\r\n\tnm.zoomToResolution = zoomToResolution;\r\n\t/**\r\n\t * Get resolution from the zoom level\r\n\t * @param {number} resolution - the resolution\r\n\t * @returns {number|*} the zoom level\r\n\t */\r\n\tfunction resolutionToZoom(resolution) {\r\n\t    for (var i = 0; i < _zoomResLookup.length; i++) {\r\n\t        if (resolution >= _zoomResLookup[i]) {\r\n\t            return i;\r\n\t        }\r\n\t    }\r\n\t    return 0;\r\n\t}\r\n\texports.resolutionToZoom = resolutionToZoom;\r\n\tnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ },\n/* 15 */,\n/* 16 */,\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/16/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar nm = provide_1.default('collections');\r\n\tvar $ = __webpack_require__(2);\r\n\tvar LayerGroup = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} [groupConfig={}] - group configuration object\r\n\t     * @param {string} groupConfig.groupName - the group name\r\n\t     * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n\t     * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n\t     * @param {LayerGroup} [parent=undefined] - the parent group\r\n\t     */\r\n\t    function LayerGroup(groupConfig, parent) {\r\n\t        this.groupLayers = [];\r\n\t        this.groupLayersLookup = {};\r\n\t        this.groupGroups = [];\r\n\t        this.groupGroupsLookup = {};\r\n\t        this.itemIdArray = [];\r\n\t        if (typeof groupConfig == 'undefined') {\r\n\t            this.parent = null;\r\n\t            this.groupId = 'root';\r\n\t            this.groupName = 'root';\r\n\t            this.allGroupLookup = { root: this };\r\n\t            this.allGroupArray = [this];\r\n\t            this.allLayerArray = [];\r\n\t            this.allLayerLookup = {};\r\n\t            this.layerParentLookup = {};\r\n\t            this.collapse = false;\r\n\t            this.addCheck = false;\r\n\t        }\r\n\t        else {\r\n\t            this.groupId = makeGuid_1.default();\r\n\t            this.parent = parent;\r\n\t            this.groupName = groupConfig.groupName;\r\n\t            this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n\t            this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n\t        }\r\n\t    }\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} groupConfig - configuration object\r\n\t     * @param {string} groupConfig.groupName - the group name\r\n\t     * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n\t     * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n\t     * @param {Array<LayerGroup>} parents parent groups\r\n\t     * @returns {LayerGroup} the layer group just added\r\n\t     */\r\n\t    LayerGroup.prototype.addGroup = function (groupConfig, parents) {\r\n\t        var parent;\r\n\t        if (parents.length > 0) {\r\n\t            parent = parents[parents.length - 1];\r\n\t        }\r\n\t        else {\r\n\t            parent = 'root';\r\n\t        }\r\n\t        /**\r\n\t         * @type {LayerGroup}\r\n\t         */\r\n\t        var parentGroup = this.allGroupLookup[parent];\r\n\t        var newGroup = new LayerGroup(groupConfig, parentGroup);\r\n\t        this.allGroupLookup[newGroup.groupId] = newGroup;\r\n\t        this.allGroupArray.push(newGroup);\r\n\t        parentGroup.groupGroups.push(newGroup);\r\n\t        parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n\t        if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n\t            console.log(newGroup.groupId);\r\n\t            throw 'layer and group ids must be unique';\r\n\t        }\r\n\t        parentGroup.itemIdArray.push(newGroup.groupId);\r\n\t        return newGroup;\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase} newLayer the layer to be added\r\n\t     * @param {Array} parents array\r\n\t     */\r\n\t    LayerGroup.prototype.addLegendLayer = function (newLayer, parents) {\r\n\t        var parent;\r\n\t        if (parents.length > 0) {\r\n\t            parent = parents[parents.length - 1];\r\n\t        }\r\n\t        else {\r\n\t            parent = 'root';\r\n\t        }\r\n\t        this.allLayerLookup[newLayer.id] = newLayer;\r\n\t        this.allLayerArray.push(newLayer);\r\n\t        /**\r\n\t         * @type {LayerGroup}\r\n\t         */\r\n\t        var parentGroup = this.allGroupLookup[parent];\r\n\t        parentGroup.groupLayers.push(newLayer);\r\n\t        parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n\t        if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n\t            console.log(newLayer.id);\r\n\t            throw 'layer and group ids must be unique';\r\n\t        }\r\n\t        parentGroup.itemIdArray.push(newLayer.id);\r\n\t        this.layerParentLookup[newLayer.id] = parentGroup;\r\n\t    };\r\n\t    LayerGroup.prototype.getLegendHtml = function (legendId, options) {\r\n\t        var legendHtml = \"<ul id=\\\"\" + legendId + \"\\\" class=\\\"legend-container\\\">\";\r\n\t        legendHtml += \"<li>\" + options.legendTitle + \"<input type=\\\"checkbox\\\" checked id=\\\"suppress-by-extent-\" + legendId + \"\\\" class=\\\"suppress-by-extent\\\">\" +\r\n\t            (\"<label title=\\\"Suppress layers not visible at this zoom level\\\" for=\\\"suppress-by-extent-\" + legendId + \"\\\">\") +\r\n\t            \"<span></span>\" +\r\n\t            \"</label></li>\";\r\n\t        legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n\t        return legendHtml;\r\n\t    };\r\n\t    /**\r\n\t     * @param {Array} itemIds the items to process\r\n\t     * @param {LayerGroup} theGroup new group\r\n\t     * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n\t     * @static\r\n\t     * @returns {string} html string\r\n\t     */\r\n\t    LayerGroup.prototype._buildLegend = function (itemIds, theGroup, layerDivClasses) {\r\n\t        if (itemIds.length == 0) {\r\n\t            return '';\r\n\t        }\r\n\t        var theHml = '';\r\n\t        var itemId = itemIds[0];\r\n\t        if (theGroup.groupLayersLookup[itemId]) {\r\n\t            /**\r\n\t             * @type {LayerBase}\r\n\t             */\r\n\t            var lyr = theGroup.groupLayersLookup[itemId];\r\n\t            theHml += \"<li id=\\\"\" + lyr.id + \"-layer-li\\\" class=\\\"legend-layer-li \" + layerDivClasses.join(' ') + \"\\\">\" + lyr.getLegendDiv() + '</li>';\r\n\t        }\r\n\t        else if (theGroup.groupGroupsLookup[itemId]) {\r\n\t            /**\r\n\t             * type {LayerGroup}\r\n\t             */\r\n\t            var otherGroup = theGroup.groupGroupsLookup[itemId];\r\n\t            theHml += \"<li>\";\r\n\t            theHml += \"<div id=\\\"\" + otherGroup.groupId + \"-legend-layer-div\\\" \" +\r\n\t                (\"class=\\\"legend-layer-group  \" + layerDivClasses.join(' ') + \"\\\">\");\r\n\t            if (otherGroup.addCheck) {\r\n\t                theHml += \"<input type=\\\"checkbox\\\" checked id=\\\"\" + otherGroup.groupId + \"-group-chck\\\">\" +\r\n\t                    (\"<label for=\\\"\" + otherGroup.groupId + \"-group-chck\\\" title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\");\r\n\t            }\r\n\t            else {\r\n\t                theHml += \"<label title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\";\r\n\t            }\r\n\t            theHml += \"<span title=\\\"Expand/Collapse\\\" class=\\\"layer-group-expander\";\r\n\t            theHml += (otherGroup.collapse ? ' legend-layer-group-initial-collapse' : '') + \"\\\">\";\r\n\t            theHml += otherGroup.collapse ? '&#9654;' : '&#9660;';\r\n\t            theHml += '</span>';\r\n\t            //parents.push(groupId);\r\n\t            theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n\t            theHml += '</div>';\r\n\t            theHml += '</li>';\r\n\t        }\r\n\t        return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n\t    };\r\n\t    return LayerGroup;\r\n\t}());\r\n\t/**\r\n\t * a wrapper to make a legend\r\n\t */\r\n\tvar LayerLegend = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param {Array} legendItems array of layers or objects with {groupName:  {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n\t     * @param {string} divId the div where the legend should be added\r\n\t     * @param {object} options for legend\r\n\t     * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n\t     * @param {string} [options.legendTitle=Legend] the legend title\r\n\t     * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n\t     */\r\n\t    function LayerLegend(legendItems, divId, options) {\r\n\t        for (var _i = 0, legendItems_1 = legendItems; _i < legendItems_1.length; _i++) {\r\n\t            var i = legendItems_1[_i];\r\n\t            if (typeof i == 'undefined') {\r\n\t                throw 'undefined item passed in array to legend constructor';\r\n\t            }\r\n\t        }\r\n\t        options = options || {};\r\n\t        options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n\t        options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n\t        options.layerDivClasses = options.layerDivClasses || [];\r\n\t        // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n\t        if (options.scaleDependent) {\r\n\t            mapMove_1.default.checkInit();\r\n\t        }\r\n\t        this.$divElement = $('#' + divId);\r\n\t        this._legendItems = legendItems;\r\n\t        this.layerGroup = new LayerGroup();\r\n\t        this._buildTree(legendItems);\r\n\t        this.legendId = makeGuid_1.default();\r\n\t        this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n\t        for (var _a = 0, _b = this.layerGroup.allLayerArray; _a < _b.length; _a++) {\r\n\t            var l = _b[_a];\r\n\t            l.applyCollapse();\r\n\t        }\r\n\t        var _this = this;\r\n\t        //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n\t        if (options.scaleDependent) {\r\n\t            mapMove_1.default.checkInit();\r\n\t            mapMove_1.default.addCallback(function (ext, zoom, evt) {\r\n\t                if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n\t                    for (var _i = 0, _a = this.layerGroup.allLayerArray; _i < _a.length; _i++) {\r\n\t                        var lyr = _a[_i];\r\n\t                        var $lyrLi = $('#' + lyr.id + '-layer-li');\r\n\t                        if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n\t                            $lyrLi.addClass('layer-not-visible');\r\n\t                        }\r\n\t                        else {\r\n\t                            $lyrLi.removeClass('layer-not-visible');\r\n\t                        }\r\n\t                    }\r\n\t                }\r\n\t            }, this, 100, true, 'legend1');\r\n\t        }\r\n\t        // <editor-fold desc=\"add event listeners\">\r\n\t        this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n\t            var legendLayerLis = $('.legend-layer-li');\r\n\t            if (this.checked) {\r\n\t                legendLayerLis.removeClass('layer-force-show');\r\n\t            }\r\n\t            else {\r\n\t                legendLayerLis.addClass('layer-force-show');\r\n\t            }\r\n\t        });\r\n\t        this.$divElement.find('.legend-check').change(function () {\r\n\t            var lyrId = this.id.replace('-legend-layer-check', '');\r\n\t            _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n\t        });\r\n\t        this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n\t            $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n\t        });\r\n\t        this.$divElement.find('.layer-group-expander').click(function () {\r\n\t            var $this = $(this);\r\n\t            $this.removeClass('legend-layer-group-initial-collapse');\r\n\t            $this.siblings('ul').slideToggle();\r\n\t            if ($this.hasClass('legend-layer-group-collapsed')) {\r\n\t                $this.removeClass('legend-layer-group-collapsed');\r\n\t                $this.html('&#9660;');\r\n\t            }\r\n\t            else {\r\n\t                $this.addClass('legend-layer-group-collapsed');\r\n\t                $this.html('&#9654;');\r\n\t            }\r\n\t        });\r\n\t        this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n\t        // </editor-fold>\r\n\t    }\r\n\t    /**\r\n\t     * @param {Array} [legendItems=this._layerConfig] the legend items\r\n\t     * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n\t     * @private\r\n\t     */\r\n\t    LayerLegend.prototype._buildTree = function (legendItems, parents) {\r\n\t        if (legendItems.length == 0) {\r\n\t            return;\r\n\t        }\r\n\t        var oneItem = legendItems[0];\r\n\t        //reset the parent if the item is in the base array\r\n\t        if (this._legendItems.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n\t            parents = [];\r\n\t        }\r\n\t        if (typeof oneItem['groupName'] !== 'undefined') {\r\n\t            var groupItem = legendItems[0];\r\n\t            var newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n\t            parents.push(newGroup.groupId);\r\n\t            this._buildTree(groupItem.items, parents);\r\n\t        }\r\n\t        else {\r\n\t            /**\r\n\t             * @type {LayerBase}\r\n\t             */\r\n\t            var layerItem = legendItems[0];\r\n\t            this.layerGroup.addLegendLayer(layerItem, parents);\r\n\t        }\r\n\t        this._buildTree(legendItems.slice(1), parents);\r\n\t    };\r\n\t    return LayerLegend;\r\n\t}());\r\n\tnm.LayerLegend = LayerLegend;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerLegend;\r\n\n\n/***/ },\n/* 18 */,\n/* 19 */,\n/* 20 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar LayerBase_1 = __webpack_require__(8);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar g = new ol.Map({});\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * The Vector layer base\r\n\t * @augments LayerBase\r\n\t * @abstract\r\n\t */\r\n\tvar LayerBaseVector = (function (_super) {\r\n\t    __extends(LayerBaseVector, _super);\r\n\t    /**\r\n\t     * The base vector layer\r\n\t     * @param {string} url - pass an empty string to prevent default load and add from a json source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     *\r\n\t     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n\t     * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n\t     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n\t     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n\t     * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n\t     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n\t     *\r\n\t     */\r\n\t    function LayerBaseVector(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        var _this = _super.call(this, url, options) || this;\r\n\t        options = options;\r\n\t        //prevent regular load if no url has been provided\r\n\t        if (_this.url.trim() == '') {\r\n\t            _this._loaded = true;\r\n\t        }\r\n\t        _this._style = typeof options.style == 'undefined' ? undefined : options.style;\r\n\t        if (_this.visible) {\r\n\t            _this._autoLoad = true;\r\n\t        }\r\n\t        else {\r\n\t            _this._autoLoad = (typeof options['autoLoad'] == 'boolean' ? options['autoLoad'] : false);\r\n\t        }\r\n\t        _this._onDemand = typeof options.onDemand == 'boolean' ? options.onDemand : false;\r\n\t        _this._onDemandDelay = typeof options.onDemandDelay == 'number' ? options.onDemandDelay : 300;\r\n\t        if (options.mapMoveObj) {\r\n\t            _this._mapMove = options.mapMoveObj;\r\n\t        }\r\n\t        else {\r\n\t            _this._mapMove = _this._onDemand ? mapMove_1.default : undefined;\r\n\t        }\r\n\t        _this._mapMoveMakeGetParams = typeof options.mapMoveMakeGetParams == 'function' ? options.mapMoveMakeGetParams :\r\n\t            function () { return {}; };\r\n\t        if (_this._onDemand) {\r\n\t            _this._loaded = true;\r\n\t            _this._mapMoveParams = {};\r\n\t            _this._mapMove.checkInit();\r\n\t            _this._mapMove.addVectorLayer(_this);\r\n\t        }\r\n\t        _this._source = new ol.source.Vector();\r\n\t        _this._olLayer = new ol.layer.Vector({\r\n\t            source: _this._source,\r\n\t            visible: _this.visible,\r\n\t            style: _this.style,\r\n\t            minResolution: _this._minResolution,\r\n\t            maxResolution: _this._maxResolution,\r\n\t            renderOrder: options.renderOrder\r\n\t        });\r\n\t        _this.olLayer.setZIndex(_this._zIndex);\r\n\t        _this._projectionMap = null;\r\n\t        _this._projection4326 = new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * dummy to be overridden\r\n\t     * @param {object} featureCollection - geojson or esrijson object\r\n\t     */\r\n\t    LayerBaseVector.prototype.addFeatures = function (featureCollection) {\r\n\t        console.log('Layer vector base addFeatures is a placeholder and does nothing');\r\n\t    };\r\n\t    /**\r\n\t     * Before call to map move callback, can prevent call by returning false\r\n\t     * @param {number} zoom - zoom level\r\n\t     * @param {string} [evtType=undefined] undefined for initial load, otherwise one of 'change:center', 'change:resolution'\r\n\t     * @returns {boolean} if the call should proceed\r\n\t     */\r\n\t    LayerBaseVector.prototype.mapMoveBefore = function (zoom, evtType) {\r\n\t        if (this.minZoom !== undefined) {\r\n\t            if (zoom < this.minZoom) {\r\n\t                return false;\r\n\t            }\r\n\t        }\r\n\t        if (this.maxZoom !== undefined) {\r\n\t            if (zoom > this.maxZoom) {\r\n\t                return false;\r\n\t            }\r\n\t        }\r\n\t        return this.visible;\r\n\t    };\r\n\t    /**\r\n\t     * callback to generate the parameters passed in the get request\r\n\t     * @param {object} extent - extent object\r\n\t     * @param {number} extent.minX - minX\r\n\t     * @param {number} extent.minY - minY\r\n\t     * @param {number} extent.maxX - maxX\r\n\t     * @param {number} extent.maxY - maxY\r\n\t     * @param {number} zoomLevel - zoom level\r\n\t     */\r\n\t    LayerBaseVector.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n\t        this._mapMoveParams = {};\r\n\t        $.extend(this._mapMoveParams, this.params);\r\n\t        $.extend(this._mapMoveParams, this._mapMoveMakeGetParams(this, extent, zoomLevel));\r\n\t    };\r\n\t    /**\r\n\t     * callback function on map move\r\n\t     * @param {object} d - the json response\r\n\t     */\r\n\t    LayerBaseVector.prototype.mapMoveCallback = function (d) {\r\n\t        if (this.source) {\r\n\t            this._source.clear();\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * clear features in the layer\r\n\t     */\r\n\t    LayerBaseVector.prototype.clear = function () {\r\n\t        if (this._source) {\r\n\t            this._source.clear();\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"onDemandDelay\", {\r\n\t        /**\r\n\t         * get on demand delay in miliseconds\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._onDemandDelay;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"autoLoad\", {\r\n\t        /**\r\n\t         * get if the layer is autoloaded\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._autoLoad;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"style\", {\r\n\t        /**\r\n\t         * get the style definition\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._style;\r\n\t        },\r\n\t        /**\r\n\t         * set the style\r\n\t         * @param style - the style or function\r\n\t         */\r\n\t        set: function (style) {\r\n\t            this._style = style;\r\n\t            this.olLayer.setStyle(this._style);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapCrs\", {\r\n\t        /**\r\n\t         * get the map CRS if it is defined by the map move object\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.mapProj == null ? null : this.mapProj.getCode();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapProj\", {\r\n\t        get: function () {\r\n\t            if (this._projectionMap != null) {\r\n\t                return this._projectionMap;\r\n\t            }\r\n\t            if (this._mapMove) {\r\n\t                this._projectionMap = this._mapMove.map.getView().getProjection();\r\n\t                return this._projectionMap;\r\n\t            }\r\n\t            else {\r\n\t                return null;\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapMove\", {\r\n\t        /**\r\n\t         * get the map move object\r\n\t         * @type {MapMoveCls|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._mapMove;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"mapMoveParams\", {\r\n\t        /**\r\n\t         * map move params\r\n\t         * @type {object}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._mapMoveParams;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"visible\", {\r\n\t        get: function () {\r\n\t            return this._visible;\r\n\t        },\r\n\t        /**\r\n\t         * Set the layer visibility\r\n\t         * @type {boolean}\r\n\t         * @override\r\n\t         */\r\n\t        set: function (visibility) {\r\n\t            _super.prototype.setVisible.call(this, visibility);\r\n\t            if (this._onDemand) {\r\n\t                this.mapMove.triggerLyrLoad(this);\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"source\", {\r\n\t        /**\r\n\t         * get the layer vector source\r\n\t         * @override\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getSource();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"features\", {\r\n\t        /**\r\n\t         * array of ol features\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.source.getFeatures();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBaseVector.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         *\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getOlLayer.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBaseVector.prototype.setZIndex = function (newZ) {\r\n\t        this.olLayer.setZIndex(newZ);\r\n\t    };\r\n\t    return LayerBaseVector;\r\n\t}(LayerBase_1.LayerBase));\r\n\texports.LayerBaseVector = LayerBaseVector;\r\n\tnm.LayerBaseVector = LayerBaseVector;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBaseVector;\r\n\n\n/***/ },\n/* 21 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/14/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar colors = __webpack_require__(33);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar LayerItsInventory_1 = __webpack_require__(27);\r\n\tvar nm = provide_1.default('collections');\r\n\tvar itsConfig = [\r\n\t    {\r\n\t        name: 'Camera',\r\n\t        itsType: 'cctv',\r\n\t        minZoom: 11,\r\n\t        itsIconConfig: {\r\n\t            prop: 'owner',\r\n\t            defaultName: 'WisDOT',\r\n\t            defaultIcon: 'cctv.png',\r\n\t            iconArray: [\r\n\t                ['City of Madison', 'Madison', 'cctv-mad.png']\r\n\t            ]\r\n\t        }\r\n\t    },\r\n\t    {\r\n\t        name: 'Message Signs',\r\n\t        itsType: 'DMS',\r\n\t        minZoom: 11,\r\n\t        itsIconConfig: {\r\n\t            prop: 'dmsType',\r\n\t            defaultName: 'DMS',\r\n\t            defaultIcon: 'dms.png',\r\n\t            iconArray: [\r\n\t                ['pcms', 'PCMS', 'pcms.png']\r\n\t            ]\r\n\t        }\r\n\t    },\r\n\t    { name: 'ATR', itsType: 'atr', minZoom: 8, itsIcon: 'atr.png', visible: false },\r\n\t    { name: 'Lighting', itsType: 'light', minZoom: 16, itsIcon: 'streetlight.png', visible: false, onDemand: true },\r\n\t    { name: 'Bluetooth', itsType: 'blue', minZoom: 10, itsIcon: 'bluetooth.png', visible: false },\r\n\t    { name: 'Cabinets', itsType: 'cabinet', minZoom: 10, itsIcon: 'cabinet.png', visible: false },\r\n\t    { name: 'Hut', itsType: 'hut', minZoom: 10, itsIcon: 'hut.png', visible: false },\r\n\t    { name: 'Vault', itsType: 'vault', minZoom: 13, itsIcon: 'vault.png', visible: false },\r\n\t    { name: 'Advisory Radio', itsType: 'har', minZoom: 10, itsIcon: 'har.png', visible: false },\r\n\t    {\r\n\t        name: 'Loop Detectors',\r\n\t        itsType: 'loop',\r\n\t        legendCollapse: true,\r\n\t        minZoom: 14,\r\n\t        visible: false,\r\n\t        itsIconConfig: {\r\n\t            prop: 'dtctrType',\r\n\t            defaultName: 'Other',\r\n\t            defaultIcon: 'loopdetectorother.png',\r\n\t            iconArray: [\r\n\t                ['detector', 'Detector', 'loopdetector.png'],\r\n\t                ['long', 'Long', 'loopdetectorlong.png'],\r\n\t                ['zone', 'Zone', 'loopdetectorzone.png']\r\n\t            ]\r\n\t        },\r\n\t        onDemand: true\r\n\t    },\r\n\t    { name: 'Microwave', itsType: 'microwave', minZoom: 14, itsIcon: 'microwave.png', visible: false },\r\n\t    { name: 'Pull Box', itsType: 'pull', minZoom: 14, itsIcon: 'pullbox.png', visible: false, onDemand: true },\r\n\t    { name: 'RWIS', itsType: 'rwis', minZoom: 7, itsIcon: 'rwis.png', visible: false },\r\n\t    { name: 'Ramp Gates', itsType: 'gate', minZoom: 10, itsIcon: 'rampgate.png', visible: false },\r\n\t    { name: 'Ramp Meter', itsType: 'meter', minZoom: 10, itsIcon: 'rampmeter.png', visible: false },\r\n\t    { name: 'Signal', itsType: 'signal', minZoom: 13, itsIcon: 'signal.png', visible: false, onDemand: true },\r\n\t    { name: 'Tower', itsType: 'tower', minZoom: 10, itsIcon: 'tower.png', visible: false },\r\n\t    {\r\n\t        name: 'Trench',\r\n\t        itsType: 'trench',\r\n\t        onDemand: true,\r\n\t        visible: false,\r\n\t        onDemandDelay: 500,\r\n\t        minZoom: 15,\r\n\t        legendCollapse: true,\r\n\t        itsLineConfig: {\r\n\t            prop: 'owner',\r\n\t            //defaultName: 'Other',\r\n\t            //defaultWidth: 7,\r\n\t            defaultColor: colors.hexAlphaToRgbOrRgba('#747474', 0.8),\r\n\t            lineArray: [\r\n\t                ['WisDOT', 'WisDOT', colors.hexAlphaToRgbOrRgba('#FF032F', 0.7)],\r\n\t                ['WIN', 'WIN', colors.hexAlphaToRgbOrRgba('#FFC632', 0.7)],\r\n\t                ['USXchange', 'USXchange', colors.hexAlphaToRgbOrRgba('#2DFF46', 0.7)],\r\n\t                ['AT&T', 'AT&T', colors.hexAlphaToRgbOrRgba('#ff2be5', 0.7)],\r\n\t                ['Touch America', 'Touch America', colors.hexAlphaToRgbOrRgba('#52f3ff', 0.7)],\r\n\t                ['Qwest', 'Qwest', colors.hexAlphaToRgbOrRgba('#9278ff', 0.7)],\r\n\t                ['McLeodUSA', 'McLeodUSA', colors.hexAlphaToRgbOrRgba('#2926FF', 0.7)],\r\n\t                ['CINC', 'CINC', colors.hexAlphaToRgbOrRgba('#CB00FF', 0.7)],\r\n\t                ['City of Madison', 'Madison', colors.hexAlphaToRgbOrRgba('#000380', 0.7)]\r\n\t            ]\r\n\t        }\r\n\t    }\r\n\t];\r\n\tvar ItsLayerCollection = (function () {\r\n\t    /**\r\n\t     * Create a collection of all ITS layers\r\n\t     * @param {ol.Map} theMap the openlayers map\r\n\t     * @param {Array} [exclude=[]] array of Its layer identifiers to exclude\r\n\t     *\r\n\t     * BLUE Bluetooth Detector - Bluetooth Detector\r\n\t     * CABINET Cabinets - The cabinets\r\n\t     * CCTV Camera - Traffic Cameras\r\n\t     * HUT Communication Hut - Communication Hut\r\n\t     * VAULT Communication Vault - The communication vaults\r\n\t     * HAR Highway Advisory Radio - Advisory Radios\r\n\t     * LIGHT Lighting - Lighting\r\n\t     * LOOP Loop Detectors - Loop Detectors\r\n\t     * DMS Message Board - Message Boards and Signs\r\n\t     * MICROWAVE Microwave Detector - Microwave Detectors\r\n\t     * PULL Pull Box - A pull box\r\n\t     * RWIS RWIS - Road weather information system\r\n\t     * GATE Ramp Gate - The ramp Gates\r\n\t     * METER Ramp Meter - The ramp meters\r\n\t     * SIGNAL Signal - Traffic Signal\r\n\t     * TOWER Tower - The towers\r\n\t     * TRENCH\r\n\t     */\r\n\t    function ItsLayerCollection(theMap, exclude) {\r\n\t        this._map = theMap;\r\n\t        this._layers = [];\r\n\t        exclude = typeof exclude == 'object' ? exclude : [];\r\n\t        for (var i = 0; i < itsConfig.length; i++) {\r\n\t            var lyrConfig = itsConfig[i];\r\n\t            var addLayer = true;\r\n\t            for (var j = 0; j < exclude.length; j++) {\r\n\t                if (exclude[j] == lyrConfig.itsType) {\r\n\t                    addLayer = false;\r\n\t                    break;\r\n\t                }\r\n\t            }\r\n\t            if (addLayer) {\r\n\t                var inventLyr = new LayerItsInventory_1.default(lyrConfig);\r\n\t                this._map.addLayer(inventLyr.olLayer);\r\n\t                this._layers.push(inventLyr);\r\n\t            }\r\n\t        }\r\n\t    }\r\n\t    Object.defineProperty(ItsLayerCollection.prototype, \"layers\", {\r\n\t        /**\r\n\t         * Return the array of layers in this collection\r\n\t         * @returns {Array<LayerItsInventory>} an array of layers\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._layers;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return ItsLayerCollection;\r\n\t}());\r\n\texports.ItsLayerCollection = ItsLayerCollection;\r\n\tnm.ItsLayerCollection = ItsLayerCollection;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = ItsLayerCollection;\r\n\n\n/***/ },\n/* 22 */,\n/* 23 */,\n/* 24 */,\n/* 25 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/2/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar LayerBaseVector_1 = __webpack_require__(20);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar proj = __webpack_require__(32);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * The Vector GeoJson Layer\r\n\t * @augments LayerBaseVector\r\n\t */\r\n\tvar LayerBaseVectorGeoJson = (function (_super) {\r\n\t    __extends(LayerBaseVectorGeoJson, _super);\r\n\t    /**\r\n\t     * @param {string|undefined|null} url - resource url, set to '' to make blank layer\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     *\r\n\t     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n\t     * @param {object} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n\t     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n\t     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n\t     *\r\n\t     * @param {object} [options.transform={}] SR transform, set as false for no transform\r\n\t     * @param {string} options.transform.dataProjection=EPSG:4326 the data CRS\r\n\t     * @param {string} options.transform.featureProjection=EPSG:3857 the feature/map CRS\r\n\t     * @param {mapMoveMakeGetParams} [options.mapMoveMakeGetParams=function(lyr, extent, zoomLevel){}] function to create additional map move params\r\n\t     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n\t     */\r\n\t    function LayerBaseVectorGeoJson(url, options) {\r\n\t        var _this = this;\r\n\t        url = typeof url == 'string' ? url : '';\r\n\t        _this = _super.call(this, url, options) || this;\r\n\t        _this._geoJsonFormat = new ol.format.GeoJSON();\r\n\t        _this._transform = options.transform || { dataProjection: proj.proj4326, featureProjection: proj.proj3857 };\r\n\t        if (_this.autoLoad || _this.visible) {\r\n\t            _this._load();\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * add feature collection\r\n\t     * @param {object} featureCollection - as geojson object\r\n\t     */\r\n\t    LayerBaseVectorGeoJson.prototype.addFeatures = function (featureCollection) {\r\n\t        if (this._transform.dataProjection == 'EPSG:3857' && this._transform.featureProjection == 'EPSG:3857') {\r\n\t            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection));\r\n\t        }\r\n\t        else {\r\n\t            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, this._transform));\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * trigger load features\r\n\t     * @protected\r\n\t     * @returns {boolean} if already loaded\r\n\t     */\r\n\t    LayerBaseVectorGeoJson.prototype._load = function () {\r\n\t        var _this = this;\r\n\t        if (_super.prototype._load.call(this)) {\r\n\t            return true;\r\n\t        }\r\n\t        $.get(this._url, this._params, function (d) {\r\n\t            _this.addFeatures(d);\r\n\t            _this.loadCallback(_this);\r\n\t        }, 'json').fail(function () {\r\n\t            this._loaded = false;\r\n\t        });\r\n\t        return false;\r\n\t    };\r\n\t    /**\r\n\t     * callback function on map move\r\n\t     * @param {object} d the json response\r\n\t     * @override\r\n\t     */\r\n\t    LayerBaseVectorGeoJson.prototype.mapMoveCallback = function (d) {\r\n\t        _super.prototype.mapMoveCallback.call(this, d);\r\n\t        this._source.addFeatures(this._geoJsonFormat.readFeatures(d, this._transform));\r\n\t    };\r\n\t    return LayerBaseVectorGeoJson;\r\n\t}(LayerBaseVector_1.LayerBaseVector));\r\n\texports.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\n\tnm.LayerBaseVectorGeoJson = LayerBaseVectorGeoJson;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBaseVectorGeoJson;\r\n\n\n/***/ },\n/* 26 */,\n/* 27 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/8/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar LayerBaseVectorGeoJson_1 = __webpack_require__(25);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\tfunction checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n\t    \"use strict\";\r\n\t    //make sure one and only one configuration is defined;\r\n\t    var configCount = 0;\r\n\t    if (typeof itsIcon == 'string') {\r\n\t        configCount++;\r\n\t    }\r\n\t    if (typeof itsLineStyle == 'object') {\r\n\t        itsLineStyle.width = typeof itsLineStyle.width == 'number' ? itsLineStyle.width : 5;\r\n\t        itsLineStyle.color = typeof itsLineStyle.color == 'string' ? itsLineStyle.color : 'red';\r\n\t        configCount++;\r\n\t    }\r\n\t    if (typeof itsIconConfig == 'object') {\r\n\t        itsIconConfig.defaultName = itsIconConfig.defaultName || 'Other';\r\n\t        if (typeof itsIconConfig.iconArray == 'undefined') {\r\n\t            itsIconConfig.iconArray = [];\r\n\t        }\r\n\t        configCount++;\r\n\t    }\r\n\t    if (typeof itsLineConfig == 'object') {\r\n\t        itsLineConfig.defaultName = itsLineConfig.defaultName || 'Other';\r\n\t        itsLineConfig.defaultWidth = itsLineConfig.defaultWidth || 5;\r\n\t        itsLineConfig.defaultColor = itsLineConfig.defaultColor || 'red';\r\n\t        if (typeof itsLineConfig.lineArray == 'undefined') {\r\n\t            itsLineConfig.lineArray = [];\r\n\t        }\r\n\t        // set the width if not defined\r\n\t        for (var i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n\t            if (itsLineConfig.lineArray[i].length == 3) {\r\n\t                itsLineConfig.lineArray[i].push(5);\r\n\t            }\r\n\t        }\r\n\t        configCount++;\r\n\t    }\r\n\t    if (configCount > 1) {\r\n\t        throw 'Only one style config can be defined';\r\n\t    }\r\n\t}\r\n\t/**\r\n\t *\r\n\t * @param {string} [itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n\t *\r\n\t * @param {object} [itsLineStyle=undefined] A single line style\r\n\t * @param {string} itsLineStyle.color the line color as rgb or hex\r\n\t * @param {number} [itsLineStyle.width=5] the line width\r\n\t *\r\n\t * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n\t * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n\t * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n\t * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n\t * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n\t *\r\n\t * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n\t * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n\t * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n\t * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n\t * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n\t * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n\t * @returns {*} undefined, style, or style function\r\n\t */\r\n\tfunction defineStyle(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n\t    \"use strict\";\r\n\t    checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\t    var _iconUrlRoot = 'http://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\t    if (itsIcon) {\r\n\t        return new ol.style.Style({\r\n\t            image: new ol.style.Icon({\r\n\t                src: _iconUrlRoot + itsIcon,\r\n\t                crossOrigin: 'anonymous'\r\n\t            })\r\n\t        });\r\n\t    }\r\n\t    else if (itsLineStyle) {\r\n\t        return new ol.style.Style({\r\n\t            stroke: new ol.style.Stroke({\r\n\t                color: itsLineStyle.color,\r\n\t                width: itsLineStyle.width\r\n\t            })\r\n\t        });\r\n\t    }\r\n\t    else if (itsIconConfig) {\r\n\t        return function (feature) {\r\n\t            var symbolProp = feature.getProperties()[itsIconConfig.prop];\r\n\t            var iconUrl = _iconUrlRoot + itsIconConfig.defaultIcon;\r\n\t            for (var i = 0; i < itsIconConfig.iconArray.length; i++) {\r\n\t                var thisProp = itsIconConfig.iconArray[i];\r\n\t                if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n\t                    iconUrl = _iconUrlRoot + thisProp[2];\r\n\t                    break;\r\n\t                }\r\n\t            }\r\n\t            return [new ol.style.Style({\r\n\t                    image: new ol.style.Icon({\r\n\t                        src: iconUrl,\r\n\t                        crossOrigin: 'anonymous'\r\n\t                    })\r\n\t                })];\r\n\t        };\r\n\t    }\r\n\t    else if (itsLineConfig) {\r\n\t        return function (feature) {\r\n\t            var symbolProp = feature.getProperties()[itsLineConfig.prop];\r\n\t            var colr = itsLineConfig.defaultColor || 'red';\r\n\t            var width = itsLineConfig.defaultWidth || 5;\r\n\t            for (var i = 0; i < itsLineConfig.lineArray.length; i++) {\r\n\t                var thisProp = itsLineConfig.lineArray[i];\r\n\t                if (symbolProp.trim().toLocaleLowerCase() == thisProp[0].trim().toLocaleLowerCase()) {\r\n\t                    colr = thisProp[2];\r\n\t                    width = thisProp[3];\r\n\t                    break;\r\n\t                }\r\n\t            }\r\n\t            return [new ol.style.Style({\r\n\t                    stroke: new ol.style.Stroke({\r\n\t                        color: colr,\r\n\t                        width: width\r\n\t                    })\r\n\t                })];\r\n\t        };\r\n\t    }\r\n\t    else {\r\n\t        return undefined;\r\n\t    }\r\n\t}\r\n\t/**\r\n\t *\r\n\t * @param {string} [itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n\t *\r\n\t * @param {object} [itsLineStyle=undefined] A single line style\r\n\t * @param {string} itsLineStyle.color the line color as rgb or hex\r\n\t * @param {number} [itsLineStyle.width=5] the line width\r\n\t *\r\n\t * @param {object} [itsIconConfig=undefined] The icon subtype configuration\r\n\t * @param {string} itsIconConfig.prop The property used to define icon attribute symbolization\r\n\t * @param {string} itsIconConfig.defaultName The default name to be used if no other match is found\r\n\t * @param {string} itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n\t * @param {object} [itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n\t *\r\n\t * @param {object} [itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n\t * @param {string} itsLineConfig.prop The property used to define icon attribute symbolization\r\n\t * @param {string} [itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n\t * @param {string} [itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n\t * @param {number} [itsLineConfig.defaultWidth=5] The default line width to be used for no other matches\r\n\t * @param {object} [itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width]\r\n\t * @returns {string} html to be added to the legend\r\n\t */\r\n\tfunction defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\r\n\t    \"use strict\";\r\n\t    var iconHeight = 17;\r\n\t    checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig);\r\n\t    var _iconUrlRoot = 'http://transportal.cee.wisc.edu/its/inventory/icons/';\r\n\t    if (itsIcon) {\r\n\t        return \"<img src=\\\"\" + (_iconUrlRoot + itsIcon) + \"\\\" class=\\\"legend-layer-icon\\\" height=\\\"\" + iconHeight + \"\\\">\";\r\n\t    }\r\n\t    else if (itsLineStyle) {\r\n\t        return \"<hr style=\\\"height: \" + itsLineStyle.width + \"px; background-color: \" + itsLineStyle.color + \"\\\">\";\r\n\t    }\r\n\t    else if (itsIconConfig) {\r\n\t        var outHtml = '';\r\n\t        outHtml += '<ul>';\r\n\t        for (var _i = 0, _a = itsIconConfig.iconArray; _i < _a.length; _i++) {\r\n\t            var a = _a[_i];\r\n\t            outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + a[1] + \"</span><img src=\\\"\" + (_iconUrlRoot + a[2]) + \"\\\" class=\\\"legend-layer-icon\\\" height=\\\"\" + iconHeight + \"\\\">\";\r\n\t        }\r\n\t        outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + itsIconConfig.defaultName + \"</span>\" +\r\n\t            (\"<img src=\\\"\" + (_iconUrlRoot + itsIconConfig.defaultIcon) + \"\\\" class=\\\"legend-layer-icon\\\" height=\\\"\" + iconHeight + \"\\\"></li>\");\r\n\t        outHtml += '</ul>';\r\n\t        return outHtml;\r\n\t    }\r\n\t    else if (itsLineConfig) {\r\n\t        var outHtml = '';\r\n\t        outHtml += '<ul>';\r\n\t        for (var _b = 0, _c = itsLineConfig.lineArray; _b < _c.length; _b++) {\r\n\t            var ls = _c[_b];\r\n\t            outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + ls[1] + \"</span>\" +\r\n\t                (\"<hr style=\\\"height: \" + ls[3] + \"px; background-color: \" + ls[2] + \"\\\">\");\r\n\t        }\r\n\t        outHtml += \"<li><span class=\\\"legend-layer-subitem\\\">\" + itsLineConfig.defaultName + \"</span>\" +\r\n\t            (\"<hr style=\\\"height: \" + itsLineConfig.defaultWidth + \"px; background-color: \" + itsLineConfig.defaultColor + \"\\\"></li>\");\r\n\t        outHtml += '</ul>';\r\n\t        return outHtml;\r\n\t    }\r\n\t    else {\r\n\t        return '';\r\n\t    }\r\n\t}\r\n\t/**\r\n\t * Its Layer class\r\n\t * @augments LayerBaseVectorGeoJson\r\n\t */\r\n\tvar LayerItsInventory = (function (_super) {\r\n\t    __extends(LayerItsInventory, _super);\r\n\t    /**\r\n\t     * ITS device layer, types available at http://transportal.cee.wisc.edu/its/inventory/\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     *\r\n\t     * @param {boolean} [options.autoLoad=false] if the layer should auto load if not visible\r\n\t     * @param {object|*} [options.style=undefined] the layer style, use openlayers default style if not defined\r\n\t     * @param {boolean} [options.onDemand=false] if the layer should be loaded by extent on map move\r\n\t     * @param {number} [options.onDemandDelay=300] delay before the map move callback should be called\r\n\t     * @param {MapMoveCls} [options.mapMoveObj=mapMove] alternate map move object for use with multi map pages\r\n\t     *\r\n\t     * @param {string} options.itsType the ITS device type, use the url flag at http://transportal.cee.wisc.edu/its/inventory/\r\n\t     * @param {boolean} [options.addPopup=true] if the popup should be added automatically\r\n\t     *\r\n\t     * @param {string} [options.itsIcon=undefined] the ITS device type icon image see http://transportal.cee.wisc.edu/its/inventory/icons/\r\n\t     *\r\n\t     * @param {object} [options.itsLineStyle=undefined] A single line style\r\n\t     * @param {string} options.itsLineStyle.color the line color as rgb or hex\r\n\t     * @param {number} [options.itsLineStyle.width=5] the line width\r\n\t     *\r\n\t     * @param {object} [options.itsIconConfig=undefined] The icon subtype configuration\r\n\t     * @param {string} options.itsIconConfig.prop The property used to define icon attribute symbolization\r\n\t     * @param {string} options.itsIconConfig.defaultName The default name to be used if no other match is found\r\n\t     * @param {string} options.itsIconConfig.defaultIcon The default icon to be used for no other matches\r\n\t     * @param {object} [options.itsIconConfig.iconArray=[]] an array, items with format [property, name, img]\r\n\t     *\r\n\t     * @param {object} [options.itsLineConfig=undefined] The property used to define icon attribute symbolization\r\n\t     * @param {string} options.itsLineConfig.prop The property used to define icon attribute symbolization\r\n\t     * @param {string} [options.itsLineConfig.defaultName=Other] The default name to be used if no other match is found\r\n\t     * @param {string} [options.itsLineConfig.defaultColor=red] The default line color to be used for no other matches\r\n\t     * @param {number} [options.itsLineConfig.defaultWidth] The default line width to be used for no other matches\r\n\t     * @param {object} [options.itsLineConfig.lineArray=[]] an array, items with format [property, name, color, optional width = 5]\r\n\t     */\r\n\t    function LayerItsInventory(options) {\r\n\t        var _this = this;\r\n\t        if (typeof options.itsType !== 'string') {\r\n\t            throw 'its type must be defined';\r\n\t        }\r\n\t        var addToLegend = '';\r\n\t        // define a style with the helper function if it is not explicitly defined\r\n\t        if (typeof options.style == 'undefined') {\r\n\t            options.style = defineStyle(options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig);\r\n\t            addToLegend = defineLegend(options.itsIcon, options.itsLineStyle, options.itsIconConfig, options.itsLineConfig);\r\n\t        }\r\n\t        options.params = typeof options.params == 'object' ? options.params : {};\r\n\t        $.extend(options.params, { format: 'JSON', resource: options.itsType });\r\n\t        _this = _super.call(this, 'http://transportal.cee.wisc.edu/its/inventory/', options) || this;\r\n\t        //add any additional content to the legend\r\n\t        _this.addLegendContent(addToLegend);\r\n\t        options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : true;\r\n\t        if (options.addPopup) {\r\n\t            mapPopup_1.default.addVectorPopup(_this, function (props) {\r\n\t                return \"<iframe src=\\\"http://transportal.cee.wisc.edu/its/inventory/?feature=\" + props['featureGuid'] + \"\\\" \" +\r\n\t                    \"height=\\\"250\\\" width=\\\"350\\\"></iframe>\";\r\n\t            });\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * callback to generate the parameters passed in the get request\r\n\t     * @callback makeGetParams\r\n\t     * @param {object} extent - extent object\r\n\t     * @param {number} extent.minX - minX\r\n\t     * @param {number} extent.minY - minY\r\n\t     * @param {number} extent.maxX - maxX\r\n\t     * @param {number} extent.maxY - maxY\r\n\t     * @param {number} zoomLevel - zoom level\r\n\t     */\r\n\t    LayerItsInventory.prototype.mapMoveMakeGetParams = function (extent, zoomLevel) {\r\n\t        _super.prototype.mapMoveMakeGetParams.call(this, extent, zoomLevel);\r\n\t        var lowerLeft = new ol.geom.Point([extent.minX, extent.minY]);\r\n\t        lowerLeft.transform(this.mapProj, this._projection4326);\r\n\t        var lowerLeftCoordinates = lowerLeft.getCoordinates();\r\n\t        var upperRight = new ol.geom.Point([extent.maxX, extent.maxY]);\r\n\t        upperRight.transform(this.mapProj, this._projection4326);\r\n\t        var upperRightCoordinates = upperRight.getCoordinates();\r\n\t        $.extend(this.mapMoveParams, {\r\n\t            L: lowerLeftCoordinates[0],\r\n\t            R: upperRightCoordinates[0],\r\n\t            B: lowerLeftCoordinates[1],\r\n\t            T: upperRightCoordinates[1]\r\n\t        });\r\n\t    };\r\n\t    return LayerItsInventory;\r\n\t}(LayerBaseVectorGeoJson_1.default));\r\n\tnm.LayerItsInventory = LayerItsInventory;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerItsInventory;\r\n\n\n/***/ },\n/* 28 */,\n/* 29 */,\n/* 30 */,\n/* 31 */,\n/* 32 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 10/3/2016.\r\n\t */\r\n\tvar ol = __webpack_require__(3);\r\n\texports.proj4326 = new ol.proj.Projection({ code: 'EPSG:4326' });\r\n\texports.proj3857 = new ol.proj.Projection({ code: 'EPSG:3857' });\r\n\texports.proj3070 = new ol.proj.Projection({ code: 'EPSG:3070' });\r\n\n\n/***/ },\n/* 33 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar chk = __webpack_require__(9);\r\n\tvar nm = provide_1.default('util.colors');\r\n\t/**\r\n\t * helper function to convert to hex\r\n\t * @param {number|string} x - the number to convert to hex\r\n\t * @returns {string} number as hex\r\n\t * @private\r\n\t */\r\n\tfunction _hex(x) {\r\n\t    var hexDigits = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\t    return isNaN(x) ? \"00\" : hexDigits[(x - x % 16) / 16] + hexDigits[x % 16];\r\n\t}\r\n\t/**\r\n\t * converts an RGB string to hex\r\n\t * @param {string} rgb - rgb color\r\n\t * @returns {string} rbg as hex\r\n\t */\r\n\tfunction rgb2hex(rgb) {\r\n\t    var rgb1 = rgb.match(/^rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)$/);\r\n\t    return (\"#\" + _hex(rgb1[1]) + _hex(rgb1[2]) + _hex(rgb1[3])).toUpperCase();\r\n\t}\r\n\texports.rgb2hex = rgb2hex;\r\n\tnm.rgb2hex = rgb2hex;\r\n\t/**\r\n\t * Convert hex string to RGB or RGBA string\r\n\t * @param {string} hexString - hex color string\r\n\t * @param {number} [alphaVal=undefined] Alpha value\r\n\t * @returns {string} - rgb or rgba color\r\n\t */\r\n\tfunction hexAlphaToRgbOrRgba(hexString, alphaVal) {\r\n\t    hexString = ((hexString.charAt(0) == \"#\") ? hexString.substring(1, 7) : hexString);\r\n\t    var r = parseInt(hexString.substring(0, 2), 16).toString() || '0';\r\n\t    var g = parseInt(hexString.substring(2, 4), 16).toString() || '0';\r\n\t    var b = parseInt(hexString.substring(4, 6), 16).toString() || '0';\r\n\t    if (alphaVal) {\r\n\t        return \"rgba(\" + r + \",\" + g + \",\" + b + \",\" + alphaVal + \")\";\r\n\t    }\r\n\t    else {\r\n\t        return \"rgba(\" + r + \",\" + g + \",\" + b + \")\";\r\n\t    }\r\n\t}\r\n\texports.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba;\r\n\tnm.hexAlphaToRgbOrRgba = hexAlphaToRgbOrRgba;\r\n\t/**\r\n\t * adds alpha value to rgb string 'rgb(r, b, g)', returns 'rgba(r, g, b, a)'\r\n\t * @param {string} rgb - rgb color\r\n\t * @param {number} alpha - alpha value 0 to 1\r\n\t * @returns {string} rgba color\r\n\t */\r\n\tfunction rgbToRgba(rgb, alpha) {\r\n\t    var pieces = rgb.split(',');\r\n\t    pieces[0] = pieces[0].replace('rgb', 'rgba');\r\n\t    pieces[2] = pieces[2].replace(')', '');\r\n\t    pieces.push(' ' + alpha.toFixed(1) + ')');\r\n\t    return pieces.join(',');\r\n\t}\r\n\texports.rgbToRgba = rgbToRgba;\r\n\tnm.rgbToRgba = rgbToRgba;\r\n\t/**\r\n\t * @typedef {function} colorLookupByNumber\r\n\t * @param {number} num - the number to use to retrieve the color\r\n\t * @returns {string} rgb color\r\n\t */\r\n\t/**\r\n\t * Make a blue green red gradient\r\n\t * @param {number} minVal - minimum value\r\n\t * @param {number} maxVal - maximum value\r\n\t * @param {boolean} flipColors - if the colors should be flipped\r\n\t * @returns {colorLookupByNumber} color lookup function\r\n\t */\r\n\tfunction makeBlueGreenRedGradient(minVal, maxVal, flipColors) {\r\n\t    if (typeof flipColors != \"boolean\") {\r\n\t        flipColors = false;\r\n\t    }\r\n\t    return function (theVal) {\r\n\t        var r, g, b;\r\n\t        var ratio;\r\n\t        if (chk.undefinedOrNull(theVal)) {\r\n\t            return 'rgb(100,100,100)';\r\n\t        }\r\n\t        var percent = (theVal - minVal) / (maxVal - minVal);\r\n\t        if (flipColors == true) {\r\n\t            percent = 1 - percent;\r\n\t        }\r\n\t        if (percent >= 1) {\r\n\t            r = 255;\r\n\t            g = 0;\r\n\t            b = 0;\r\n\t        }\r\n\t        else if (percent <= 0) {\r\n\t            r = 0;\r\n\t            g = 0;\r\n\t            b = 255;\r\n\t        }\r\n\t        else if (percent < .25) {\r\n\t            // green up, blue constant\r\n\t            r = 0;\r\n\t            g = Math.floor(255 * percent / 0.25);\r\n\t            b = 255;\r\n\t        }\r\n\t        else if (percent < 0.50) {\r\n\t            //blue down, green constant\r\n\t            ratio = (percent - 0.25) / 0.25;\r\n\t            r = 0;\r\n\t            g = 255;\r\n\t            b = 255 - Math.floor(255 * ratio);\r\n\t        }\r\n\t        else if (percent < 0.75) {\r\n\t            // red up, green constant\r\n\t            ratio = (percent - 0.5) / 0.25;\r\n\t            r = Math.floor(255 * ratio);\r\n\t            g = 255;\r\n\t            b = 0;\r\n\t        }\r\n\t        else {\r\n\t            // green down, red constant\r\n\t            ratio = (percent - 0.75) / 0.25;\r\n\t            r = 255;\r\n\t            g = 255 - Math.floor(255 * ratio);\r\n\t            b = 0;\r\n\t        }\r\n\t        r = r.toFixed();\r\n\t        g = g.toFixed();\r\n\t        b = b.toFixed();\r\n\t        return 'rgb(' + r + ',' + g + ',' + b + ')';\r\n\t    };\r\n\t}\r\n\texports.makeBlueGreenRedGradient = makeBlueGreenRedGradient;\r\n\tnm.makeBlueGreenRedGradient = makeBlueGreenRedGradient;\r\n\t/**\r\n\t * Create a function that will return colors based on a gradient\r\n\t * @param {number} median - median value\r\n\t * @param {number} stdDev - standard deviation\r\n\t * @param {boolean} flipColors - if the colors should be flipped\r\n\t * @returns {colorLookupByNumber} color lookup function\r\n\t */\r\n\tfunction makeBlueGreenRedGradientZScore(median, stdDev, flipColors) {\r\n\t    var grd = makeBlueGreenRedGradient(-2.5, 2.5, flipColors);\r\n\t    return function (theVal) {\r\n\t        var zScore;\r\n\t        if (theVal == null) {\r\n\t            zScore = null;\r\n\t        }\r\n\t        else {\r\n\t            zScore = (theVal - median) / stdDev;\r\n\t        }\r\n\t        return grd(zScore);\r\n\t    };\r\n\t}\r\n\texports.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore;\r\n\tnm.makeBlueGreenRedGradientZScore = makeBlueGreenRedGradientZScore;\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","/**\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();\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/_test/itsMap.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 2\n// module chunks = 0 1 2 3 4 5 6","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 3\n// module chunks = 0 1 2 3","/**\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\nfunction 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 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 * 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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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 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): 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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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 {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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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//793vnPOd7zvfes5zDBEZkBB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KJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfFzCUzDsJNsunXipglJXJbrtJWmwZNSnHD3jojRgUIm2UumIZ0JZ7JByrALbMWW0IBW8aRa4+cf76TeX3Nm3uc+z/s+7/vugl4r/aMTrT4e1pPTqnnmJNn5AyUzRnrRle/qE33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HXIbLbmpxEQ3ff/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    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) {\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){\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/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\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: any;\r\n    addCheck: any;\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?, parent?) {\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, parents) {\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, parents) {\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    getLegendHtml(legendId, options) {\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, theGroup, layerDivClasses) {\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 ? '&#9654;' : '&#9660;';\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 * a wrapper to make a legend\r\n */\r\nclass LayerLegend {\r\n\r\n    $divElement: any;\r\n    _legendItems: any;\r\n    layerGroup: any;\r\n    legendId: any;\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, divId, options) {\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 = options || {};\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\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('&#9660;');\r\n            } else {\r\n                $this.addClass('legend-layer-group-collapsed');\r\n                $this.html('&#9654;');\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, parents?) {\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.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n            parents = [];\r\n        }\r\n\r\n        if (typeof oneItem['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(groupItem.items, parents);\r\n        } else {\r\n            /**\r\n             * @type {LayerBase}\r\n             */\r\n            let layerItem = legendItems[0];\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\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.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\nlet g = new ol.Map({});\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: Array<number>, zoomLevel?: number): any\r\n}\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\r\n        this._projectionMap = null;\r\n        this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\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) {\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, evtType) {\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, 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    /**\r\n     * callback function on map move\r\n     * @param {object} d - the json response\r\n     */\r\n    mapMoveCallback(d) {\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/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\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() {\r\n        return this._layers;\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 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 {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('layers');\r\n\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions{\r\n    transform?: {dataProjection: ol.ProjectionLike, featureProjection: ol.ProjectionLike};\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: {dataProjection: ol.ProjectionLike, featureProjection: ol.ProjectionLike};\r\n\r\n    /**\r\n     * @param {string|undefined|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, 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 || {dataProjection: proj.proj4326, featureProjection: proj.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: JSON) {\r\n        if (this._transform.dataProjection == 'EPSG:3857' && this._transform.featureProjection == 'EPSG:3857') {\r\n            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection));\r\n        } else {\r\n            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, this._transform));\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) {\r\n        super.mapMoveCallback(d);\r\n        this._source.addFeatures(this._geoJsonFormat.readFeatures(d, this._transform));\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\n\r\nimport LayerBaseVectorGeoJson 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\n\r\nlet nm = provide('layers');\r\n\r\n\r\nfunction checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\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 http://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) : 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 = 'http://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\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see http://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 {string} html to be added to the legend\r\n */\r\nfunction defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\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 = 'http://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        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\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 * Its Layer class\r\n * @augments LayerBaseVectorGeoJson\r\n */\r\nclass LayerItsInventory extends LayerBaseVectorGeoJson {\r\n\r\n    /**\r\n     * ITS device layer, types available at http://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 http://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 http://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) {\r\n        if (typeof options.itsType !== 'string') {\r\n            throw 'its type must be defined';\r\n        }\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('http://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) {\r\n                return `<iframe src=\"http://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, zoomLevel) {\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 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","/**\r\n * Created by gavorhes on 11/3/2015.\r\n */\r\nimport provide from './provide';\r\nimport * as chk from './checkDefined';\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) {\r\n    let hexDigits = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\r\n    return isNaN(x) ? \"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) {\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, alphaVal) {\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, alpha) {\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, maxVal, flipColors) {\r\n\r\n    if (typeof flipColors != \"boolean\") {\r\n        flipColors = false;\r\n    }\r\n\r\n    return function (theVal) {\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, stdDev, flipColors) {\r\n\r\n    let grd = makeBlueGreenRedGradient(-2.5, 2.5, flipColors);\r\n\r\n    return function (theVal) {\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"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap c21684f02bf39ed965c4?159a","webpack:///./src/_test/itsMap.ts","webpack:///./src/olHelpers/quickMap.ts?1069","webpack:///./src/olHelpers/quickMapBase.ts?fb65","webpack:///./src/util/provide.ts?5c82","webpack:///external \"ol\"?81ed","webpack:///external \"$\"?57aa","webpack:///./src/olHelpers/mapMove.ts?6a2b","webpack:///./src/olHelpers/mapMoveCls.ts?cd45","webpack:///./src/olHelpers/mapInteractionBase.ts?f419","webpack:///./src/util/checkDefined.ts?bcd7","webpack:///./src/util/makeGuid.ts?e80e","webpack:///./src/olHelpers/mapPopup.ts?5d6c","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7","webpack:///./src/layers/LayerBase.ts?bf94","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b","webpack:///./src/layers/LayerBaseVector.ts?c105","webpack:///./src/collections/ItsLayerCollection.ts","webpack:///./src/util/colors.ts","webpack:///./src/layers/LayerItsInventory.ts","webpack:///./src/layers/LayerBaseVectorGeoJson.ts","webpack:///./src/olHelpers/projections.ts","webpack:///./src/collections/LayerLegend.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;ACtCA;;IAEG;;AAGH,6FAAmE;AACnE,+EAAqD;AACrD,sEAA6C;AAE7C,KAAI,GAAG,GAAG,kBAAQ,EAAE,CAAC;AAErB,OAAM,CAAC,KAAK,CAAC,GAAG,GAAG,CAAC;AAEpB,KAAI,kBAAkB,GAAG,IAAI,4BAAkB,CAAC,GAAG,CAAC,CAAC;AAErD,KAAI,UAAU,GAAG;KACb;SACI,SAAS,EAAE,sBAAsB;SACjC,QAAQ,EAAE,KAAK;SACf,QAAQ,EAAE,IAAI;SACd,KAAK,EAAE,kBAAkB,CAAC,MAAM;MACnC;EACJ,CAAC;AAEF,KAAI,MAAM,GAAG,IAAI,qBAAW,CAAC,UAAU,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAEjE,QAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;;;;;;;;;;AC1BxB;;IAEG;;AAEH,mEAA6D;AAC7D,+DAAsC;AACtC,yDAAgC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I,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;SAC9C,CAAC;SAAC,IAAI,CAAC,CAAC;aACJ;;gBAEG;aACH,IAAI,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;aAE/B,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;SACvD,CAAC;SAED,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;KACnD,CAAC;KAEL,kBAAC;AAAD,EAAC;AAED,GAAE,CAAC,WAAW,GAAG,WAAW,CAAC;;AAC7B,mBAAe,WAAW,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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c21684f02bf39ed965c4","/**\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();\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/_test/itsMap.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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OA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GiMwEiwzFCgzHDI+GSIsISkvJSQxIiM2LiY5Jic+Lyk0JSo0Ky49JSs9KSU1NSM7NCs2NS8+NDM1JzU9Ljg7IDJCHS1DLSNAMitCMSxIOjREITZLIDZJKDlFIjpFKztKJT1LKzJBMzpHMD1JMjpKPD1RKjlQNC1DQj5QQEA8MEJGJkBKJUJNK0lLLEJMMkVMPEpONENSLUdZL0pTLkpaLkRUMkRSPEVZMktUM0pVOklZMklZNEpcNU1ZMk1ZNUxfMk5dNkxcOVFUM1RUOFJbNVFZOVNYPVFdOVJdPFVaOVVaPVVdOlVdPVpaNlpdO0phN01hOlBiN1NhPFNoP1piPWFbPmRjPENOQEtPSURTQkJVS0xVQk1VSkxbQkxcS0heUVFXRFRcQlJfTFxeQlpeS05lQk1kSFRjQVRjSlZpQ1tkQlxlSlxpRF1rSVVnUVtlU1llXF9tU1xoXlxwSl9ramRfQmJlQ2FhSWFlSWFlTmVlSWRmTGFoQWFpRWFsRmVpRWVtRmNsSmtlRGpqRmpsS2BmWGRsUmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+aHl9YHOCXXqBXXeCYHyCY3iEaHyIYn+JaXqKcYB5WIN6Y4SCXoCDZIGEaYCIZoOLa4iCaImJbIOOdYuMco6OeIuVcpOKbZKPc5aQb5eXe5ufg6KjhAAAAAAAAAAAAAAAAOGCeQgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4wLjlsM35OAAAH80lEQVRISy1WbXQUVxm+6wqnk3Zmpxl2FG2EGg92C8GDlWptVTwa+uF3xcKmDfF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g1Dl9iaI7LqOOXKsXJFwjiuEAi70Jra2nW1PL08zLBhZsMABpW5csI7TPfew9ipFKcn5k1i+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    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/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['gv'].util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 4\n// module chunks = 0 2 3 7","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 5\n// module chunks = 0 2 3 4 5 7 8","/**\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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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 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): 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","/**\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\nfunction 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 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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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","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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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","/**\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) {\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){\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: Array<number>, zoomLevel?: number): any\r\n}\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\r\n        this._projectionMap = null;\r\n        this._projection4326 = new ol.proj.Projection({code: \"EPSG:4326\"});\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) {\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, evtType) {\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, 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    /**\r\n     * callback function on map move\r\n     * @param {object} d - the json response\r\n     */\r\n    mapMoveCallback(d) {\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/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\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() {\r\n        return this._layers;\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 11/3/2015.\r\n */\r\nimport provide from './provide';\r\nimport * as chk from './checkDefined';\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) {\r\n    let hexDigits = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n\r\n    return isNaN(x) ? \"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) {\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, alphaVal) {\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, alpha) {\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, maxVal, flipColors) {\r\n\r\n    if (typeof flipColors != \"boolean\") {\r\n        flipColors = false;\r\n    }\r\n\r\n    return function (theVal) {\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, stdDev, flipColors) {\r\n\r\n    let grd = makeBlueGreenRedGradient(-2.5, 2.5, flipColors);\r\n\r\n    return function (theVal) {\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/8/2015.\r\n */\r\n\r\nimport LayerBaseVectorGeoJson 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\n\r\nlet nm = provide('layers');\r\n\r\n\r\nfunction checkStyleNumber(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\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 http://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) : 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 = 'http://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\n/**\r\n *\r\n * @param {string} [itsIcon=undefined] the ITS device type icon image see http://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 {string} html to be added to the legend\r\n */\r\nfunction defineLegend(itsIcon, itsLineStyle, itsIconConfig, itsLineConfig) {\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 = 'http://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        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\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 * Its Layer class\r\n * @augments LayerBaseVectorGeoJson\r\n */\r\nclass LayerItsInventory extends LayerBaseVectorGeoJson {\r\n\r\n    /**\r\n     * ITS device layer, types available at http://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 http://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 http://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) {\r\n        if (typeof options.itsType !== 'string') {\r\n            throw 'its type must be defined';\r\n        }\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('http://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) {\r\n                return `<iframe src=\"http://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, zoomLevel) {\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/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 {MapMoveCls} from \"../olHelpers/mapMoveCls\";\r\nimport * as proj from '../olHelpers/projections';\r\nimport $ = require('jquery');\r\n\r\nlet nm = provide('layers');\r\n\r\n\r\n\r\nexport interface LayerBaseVectorGeoJsonOptions extends LayerBaseVectorOptions{\r\n    transform?: {dataProjection: ol.ProjectionLike, featureProjection: ol.ProjectionLike};\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: {dataProjection: ol.ProjectionLike, featureProjection: ol.ProjectionLike};\r\n\r\n    /**\r\n     * @param {string|undefined|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, 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 || {dataProjection: proj.proj4326, featureProjection: proj.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: JSON) {\r\n        if (this._transform.dataProjection == 'EPSG:3857' && this._transform.featureProjection == 'EPSG:3857') {\r\n            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection));\r\n        } else {\r\n            this._source.addFeatures(this._geoJsonFormat.readFeatures(featureCollection, this._transform));\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) {\r\n        super.mapMoveCallback(d);\r\n        this._source.addFeatures(this._geoJsonFormat.readFeatures(d, this._transform));\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 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","/**\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\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: any;\r\n    addCheck: any;\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?, parent?) {\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, parents) {\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, parents) {\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    getLegendHtml(legendId, options) {\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, theGroup, layerDivClasses) {\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 ? '&#9654;' : '&#9660;';\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 * a wrapper to make a legend\r\n */\r\nclass LayerLegend {\r\n\r\n    $divElement: any;\r\n    _legendItems: any;\r\n    layerGroup: any;\r\n    legendId: any;\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, divId, options) {\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 = options || {};\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\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('&#9660;');\r\n            } else {\r\n                $this.addClass('legend-layer-group-collapsed');\r\n                $this.html('&#9654;');\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, parents?) {\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.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n            parents = [];\r\n        }\r\n\r\n        if (typeof oneItem['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(groupItem.items, parents);\r\n        } else {\r\n            /**\r\n             * @type {LayerBase}\r\n             */\r\n            let layerItem = legendItems[0];\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\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.ts"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/my_little_test.js b/test-html/js/my_little_test.js
index d5311877226e61094480fce54ea821ab82a07984..f4dd5118a56c44fa670316e91681abc576d01268 100644
--- a/test-html/js/my_little_test.js
+++ b/test-html/js/my_little_test.js
@@ -1,2 +1,460 @@
-!function(e){function t(a){if(i[a])return i[a].exports;var n=i[a]={exports:{},id:a,loaded:!1};return e[a].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}({0:function(e,t,i){"use strict";function a(e){void 0===e&&(e=1),console.log(e,"one")}var n=i(18);console.log("eat this fish"),console.log("eat this fish"),console.log("eat this bird"),console.log("i am here5"),a(1);new n.MediaControl("map")},1:function(e,t){"use strict";function i(e){"undefined"==typeof window.gv&&(window.gv={});for(var t=e.split("."),i=window.gv,a=0;a<t.length;a++){var n=i[t[a]];"undefined"==typeof n&&(i[t[a]]={}),i=i[t[a]]}return i}i("util"),window.gv.util.provide=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},2:function(e,t){e.exports=$},18:function(e,t,i){"use strict";function a(e){var t=new Date(e),i=t.toLocaleTimeString().split(" "),a=i[0].split(":");return a=a.slice(0,2),t.toLocaleDateString()+"<br>"+a.join(":")+" "+i[1]}var n=i(1),s=i(19),l=i(2),o=n.default("domUtil"),r=function(){function e(e,t,i){void 0===t&&(t=function(){}),void 0===i&&(i={});var a=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=l("#"+e):"undefined"!=typeof e.style?this._container=l(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;var n='<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(n);var o=this._container.find(".media-play");this._$btnStop=this._container.find(".media-stop");var r=this._container.find(".media-ahead"),u=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),s.rangeChange(this._$slider,function(e){a.currentValue=e},100);var c=this;o.click(function(){var e=l(this);e.addClass("media-disabled"),c._$btnStop.removeClass("media-disabled"),r.addClass("media-locked"),u.addClass("media-locked"),c._$slider.prop("disabled",!0),c._playing=!0,c._interval=setInterval(function(){c.currentValue+=c._step},c._playInterval)}),this._$btnStop.click(function(){clearInterval(c._interval);var e=l(this);e.addClass("media-disabled"),o.removeClass("media-disabled"),r.removeClass("media-locked"),u.removeClass("media-locked"),c._$slider.prop("disabled",!1),c._playing=!1}),r.click(function(){c.currentValue=c.currentValue+c._step}),u.click(function(){c.currentValue=c.currentValue-c._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(a(this.currentValue)):this._$valLabelVal.html(this.currentValue.toString()),this._changeFunc(e)},enumerable:!0,configurable:!0}),e.prototype.setMinMaxValueStep=function(e,t,i,n){this._min=e,this._max=t,i="number"==typeof i?i:e,n="number"==typeof n?n:(t-e)/20,this._currentValue=i,this._step=n,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(a(this._min)),this._$valLabelVal.html(a(this.currentValue)),this._$valLabelMax.html(a(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},19:function(e,t,i){"use strict";function a(e,t){var i=parseFloat(this.value),a=parseFloat(this.min),n=parseFloat(this.max),l=parseFloat(this.step);n-i<l&&(i=n);var o=(i-a)/(n-a);"number"==typeof s&&i==s||(s=i,e(i,o,t))}function n(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&&(d=!0,s!=this.value)){s=this.value,null!=c&&clearTimeout(c);var n=this;c=setTimeout(function(){a.call(n,t,e),c=null},i)}}),e.keyup(function(e){37!=e.keyCode&&39!=e.keyCode||a.call(this,t,e)}),e.change(function(e){return d?void(d=!1):void a.call(this,t,e)}),this}var s,l=i(1),o=l.default("domUtil"),r=!1,u=!1,c=null,d=!1;t.rangeChange=n,o.rangeChange=n}});
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ 0:
+/*!**************************************!*\
+  !*** ./dist/_test/my_little_test.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	// let g = new
+	var media_control_1 = __webpack_require__(/*! ../domUtil/media-control */ 19);
+	//
+	//
+	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');
+	//
+
+
+/***/ },
+
+/***/ 3:
+/*!******************************!*\
+  !*** ./dist/util/provide.js ***!
+  \******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = provide;
+
+
+/***/ },
+
+/***/ 5:
+/*!********************!*\
+  !*** external "$" ***!
+  \********************/
+/***/ function(module, exports) {
+
+	module.exports = $;
+
+/***/ },
+
+/***/ 19:
+/*!***************************************!*\
+  !*** ./dist/domUtil/media-control.js ***!
+  \***************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/2/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var range_change_1 = __webpack_require__(/*! ./range-change */ 20);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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;
+
+
+/***/ },
+
+/***/ 20:
+/*!**************************************!*\
+  !*** ./dist/domUtil/range-change.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+
+
+/***/ }
+
+/******/ });
 //# sourceMappingURL=my_little_test.js.map
\ No newline at end of file
diff --git a/test-html/js/my_little_test.js.map b/test-html/js/my_little_test.js.map
index 91278b4ca7c864f7e9e86db17765457602f63c90..86ad8c236832d1e41dbc1a28a4951a5600220ebc 100644
--- a/test-html/js/my_little_test.js.map
+++ b/test-html/js/my_little_test.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///my_little_test.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457****","webpack:///./src/_test/my_little_test.ts","webpack:///./src/util/provide.ts?5c82****","webpack:///external \"$\"?57aa****","webpack:///./src/domUtil/media-control.ts?660c","webpack:///./src/domUtil/range-change.ts?b7cd"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","0","me","eat","console","log","media_control_1","MediaControl","1","provide","namespace","window","parts","split","nameSpace","i","length","newObject","util","Object","defineProperty","value","default","2","$","18","timeToLocalDateString","tm","d","Date","p1","toLocaleTimeString","p2","slice","toLocaleDateString","join","provide_1","range_change_1","nm","element","changeFunc","mediaConfig","_this","this","min","max","val","step","playInterval","showAsDate","_container","addClass","_playInterval","_changeFunc","_showAsDate","_currentValue","undefined","_min","_max","_step","_playing","htmlStr","append","btnPlay","find","_$btnStop","btnAhead","btnBack","_$slider","_$valLabelMin","_$valLabelVal","_$valLabelMax","setMinMaxValueStep","rangeChange","newVal","currentValue","___this","click","$this","removeClass","prop","_interval","setInterval","clearInterval","prototype","stopPlaying","trigger","get","enumerable","configurable","set","newValue","toFixed","html","toString","newMin","newMax","newStep","newFunc","19","triggerCallback","callback","evt","parseFloat","percent","lastVal","$slider","changeTimeout","mouseenter","mouseIn","mouseleave","mouseDown","mousedown","mouseup","mousemove","dragged","timeout","clearTimeout","setTimeout","keyup","keyCode","change"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMMW,EACA,SAASP,EAAQD,EAASH,GAE/B,YEtBD,SAAAY,GAAaC,GAAA,SAAAA,MAAA,GACTC,QAAQC,IAAIF,EAAK,OApBrB,GAAAG,GAAAhB,EAAA,GAKAc,SAAQC,IAAI,iBACZD,QAAQC,IAAI,iBACZD,QAAQC,IAAI,iBAQZD,QAAQC,IAAI,cAQZH,EAAG,EAEW,IAAII,GAAAC,aAAa,QFmDzBC,EACA,SAASd,EAAQD,GAKtB,YG9ED,SAAAgB,GAAiBC,GAEc,mBAAhBC,QAAW,KAClBA,OAAW,MAMf,KAAK,GAHDC,GAAQF,EAAUG,MAAM,KACxBC,EAAYH,OAAW,GAElBI,EAAE,EAAGA,EAAGH,EAAMI,OAAQD,IAAI,CAC/B,GAAIE,GAAYH,EAAUF,EAAMG,GAER,oBAAbE,KACPH,EAAUF,EAAMG,QAGpBD,EAAYA,EAAUF,EAAMG,IAGhC,MAAOD,GAGXL,EAAQ,QACRE,OAAW,GAAEO,KAAKT,QAAUA,EH+E3BU,OAAOC,eAAe3B,EAAS,cAAgB4B,OAAO,IG7EvD5B,EAAA6B,QAAeb,GHmFTc,EACA,SAAS7B,EAAQD,GIvHvBC,EAAAD,QAAA+B,GJ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AAQQ,UAMJ,SAAUZ,GACV,GAAMO,GAAWE,IAIjBI,GAAU,EAENV,GAAW9D,KAAY,OAA3B,CAGA8D,EAAU9D,KAAY,MAEP,MAAXyE,GACAC,aAAaD,EAGjB,IAAI1E,GAAQC,IAEZyE,GAAUE,WAAW,WACjBlB,EAAgBvG,KAAK6C,EAAO2D,EAAUC,GACtCc,EAAU,MAEXT,MAGPD,EAAQa,MAKJ,SAAUjB,GACS,IAAfA,EAAIkB,SAAgC,IAAflB,EAAIkB,SACzBpB,EAAgBvG,KAAK8C,KAAM0D,EAAUC,KAI7CI,EAAQe,OAAO,SAAUnB,GACrB,MAAIa,QACAA,GAAU,OAIdf,GAAgBvG,KAAK8C,KAAM0D,EAAUC,KAGlC3D,KA7IX,GASI8D,GATJrE,EAAA9C,EAAA,GAGMgD,EAAKF,EAAAd,QAAQ,WAEfuF,GAAU,EACVE,GAAY,EACZK,EAAU,KACVD,GAAU,CA6Dd1H,GAAAgF,cA2EAnC,EAAGmC,YAAcA","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t// let g = new\r\n\tvar media_control_1 = __webpack_require__(18);\r\n\t//\r\n\t//\r\n\tconsole.log('eat this fish');\r\n\tconsole.log('eat this fish');\r\n\tconsole.log('eat this bird');\r\n\t//\r\n\t// let g = new ol3.source.Vector();\r\n\t//\r\n\t// console.log(olx);\r\n\tconsole.log('i am here5');\r\n\tfunction me(eat) {\r\n\t    if (eat === void 0) { eat = 1; }\r\n\t    console.log(eat, 'one');\r\n\t}\r\n\tme(1);\r\n\tvar control = new media_control_1.MediaControl('map');\r\n\t//\r\n\t//\r\n\t// console.log(ol3);\r\n\t//\r\n\t//\r\n\t// console.log(definedAndNotNull(\"fish\"));\r\n\t// console.log(definedAndNotNull(\"fish\"));\r\n\t// console.log(definedAndNotNull(\"fish\"));\r\n\t// console.log(definedAndNotNull(\"fish\"));\r\n\t// console.log(definedAndNotNull(\"fish\"));\r\n\t// console.log('here');\r\n\t//\r\n\n\n/***/ },\n\n/***/ 1:\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\t/**\r\n\t * create a namespace on the gv object\r\n\t * @param {string} namespace to create\r\n\t * @returns {object} object representing the namespace\r\n\t */\r\n\tfunction provide(namespace) {\r\n\t    \"use strict\";\r\n\t    if (typeof window['gv'] == 'undefined') {\r\n\t        window['gv'] = {};\r\n\t    }\r\n\t    var parts = namespace.split('.');\r\n\t    var nameSpace = window['gv'];\r\n\t    for (var i = 0; i < parts.length; i++) {\r\n\t        var newObject = nameSpace[parts[i]];\r\n\t        if (typeof newObject == 'undefined') {\r\n\t            nameSpace[parts[i]] = {};\r\n\t        }\r\n\t        nameSpace = nameSpace[parts[i]];\r\n\t    }\r\n\t    return nameSpace;\r\n\t}\r\n\tprovide('util');\r\n\twindow['gv'].util.provide = provide;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = provide;\r\n\n\n/***/ },\n\n/***/ 2:\n/***/ function(module, exports) {\n\n\tmodule.exports = $;\n\n/***/ },\n\n/***/ 18:\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/2/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar range_change_1 = __webpack_require__(19);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('domUtil');\r\n\t/**\r\n\t * @callback mediaCallback\r\n\t * @param {number} tm\r\n\t */\r\n\tfunction timeToLocalDateString(tm) {\r\n\t    \"use strict\";\r\n\t    var d = new Date(tm);\r\n\t    var p1 = d.toLocaleTimeString().split(' ');\r\n\t    var p2 = p1[0].split(':');\r\n\t    p2 = p2.slice(0, 2);\r\n\t    return d.toLocaleDateString() + '<br>' + p2.join(':') + ' ' + p1[1];\r\n\t}\r\n\tvar MediaControl = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param element\r\n\t     * @param changeFunc\r\n\t     * @param mediaConfig\r\n\t     */\r\n\t    function MediaControl(element, changeFunc, mediaConfig) {\r\n\t        if (changeFunc === void 0) { changeFunc = function () { return; }; }\r\n\t        if (mediaConfig === void 0) { mediaConfig = {}; }\r\n\t        var _this = this;\r\n\t        mediaConfig.min = typeof mediaConfig.min == 'number' ? mediaConfig.min : 0;\r\n\t        mediaConfig.max = typeof mediaConfig.max == 'number' ? mediaConfig.max : 100;\r\n\t        mediaConfig.val = typeof mediaConfig.val == 'number' ? mediaConfig.val : 0;\r\n\t        mediaConfig.step = typeof mediaConfig.step == 'number' ? mediaConfig.step : 5;\r\n\t        mediaConfig.playInterval = typeof mediaConfig.playInterval == 'number' ? mediaConfig.playInterval : 500;\r\n\t        mediaConfig.showAsDate = typeof mediaConfig.showAsDate == 'boolean' ? mediaConfig.showAsDate : false;\r\n\t        if (typeof element == 'string') {\r\n\t            this._container = $('#' + element);\r\n\t        }\r\n\t        else if (typeof element['style'] !== 'undefined') {\r\n\t            this._container = $(element);\r\n\t        }\r\n\t        else {\r\n\t            this._container = element;\r\n\t        }\r\n\t        this._container.addClass('media-control-container');\r\n\t        this._playInterval = mediaConfig.playInterval;\r\n\t        this._changeFunc = changeFunc;\r\n\t        this._showAsDate = mediaConfig.showAsDate;\r\n\t        this._currentValue = undefined;\r\n\t        this._min = undefined;\r\n\t        this._max = undefined;\r\n\t        this._step = undefined;\r\n\t        this._playing = false;\r\n\t        var htmlStr = '<span class=\"media-player-button media-back\"></span>' +\r\n\t            '<span class=\"media-player-button media-play\"></span>' +\r\n\t            '<span class=\"media-player-button media-pause media-disabled\"></span>' +\r\n\t            '<span class=\"media-player-button media-stop media-disabled\" ></span>' +\r\n\t            '<span class=\"media-player-button media-ahead\"></span>' +\r\n\t            \"<input type=\\\"range\\\">\" +\r\n\t            \"<div class=\\\"media-control-value-label-container\\\">\" +\r\n\t            \"<span class=\\\"media-control-value-label-min\\\"></span>\" +\r\n\t            \"<span class=\\\"media-control-value-label-val\\\"></span>\" +\r\n\t            \"<span class=\\\"media-control-value-label-max\\\"></span>\" +\r\n\t            \"</div>\";\r\n\t        this._container.append(htmlStr);\r\n\t        // let btnPause = this._container.find('.media-pause');\r\n\t        var btnPlay = this._container.find('.media-play');\r\n\t        this._$btnStop = this._container.find('.media-stop');\r\n\t        var btnAhead = this._container.find('.media-ahead');\r\n\t        var btnBack = this._container.find('.media-back');\r\n\t        this._$slider = this._container.find('input[type=range]');\r\n\t        this._$valLabelMin = this._container.find('.media-control-value-label-min');\r\n\t        this._$valLabelVal = this._container.find('.media-control-value-label-val');\r\n\t        this._$valLabelMax = this._container.find('.media-control-value-label-max');\r\n\t        this.setMinMaxValueStep(mediaConfig.min, mediaConfig.max, mediaConfig.val, mediaConfig.step);\r\n\t        range_change_1.rangeChange(this._$slider, function (newVal) { _this.currentValue = newVal; }, 100);\r\n\t        var ___this = this;\r\n\t        btnPlay.click(function () {\r\n\t            var $this = $(this);\r\n\t            $this.addClass('media-disabled');\r\n\t            ___this._$btnStop.removeClass('media-disabled');\r\n\t            btnAhead.addClass('media-locked');\r\n\t            btnBack.addClass('media-locked');\r\n\t            ___this._$slider.prop('disabled', true);\r\n\t            ___this._playing = true;\r\n\t            ___this._interval = setInterval(function () {\r\n\t                ___this.currentValue += ___this._step;\r\n\t            }, ___this._playInterval);\r\n\t        });\r\n\t        this._$btnStop.click(function () {\r\n\t            clearInterval(___this._interval);\r\n\t            var $this = $(this);\r\n\t            $this.addClass('media-disabled');\r\n\t            btnPlay.removeClass('media-disabled');\r\n\t            btnAhead.removeClass('media-locked');\r\n\t            btnBack.removeClass('media-locked');\r\n\t            ___this._$slider.prop('disabled', false);\r\n\t            ___this._playing = false;\r\n\t        });\r\n\t        btnAhead.click(function () {\r\n\t            ___this.currentValue = ___this.currentValue + ___this._step;\r\n\t        });\r\n\t        btnBack.click(function () {\r\n\t            ___this.currentValue = ___this.currentValue - ___this._step;\r\n\t        });\r\n\t    }\r\n\t    MediaControl.prototype.stopPlaying = function () {\r\n\t        if (this._playing) {\r\n\t            this._$btnStop.trigger('click');\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MediaControl.prototype, \"playing\", {\r\n\t        get: function () {\r\n\t            return this._playing;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"min\", {\r\n\t        get: function () {\r\n\t            return this._min;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"max\", {\r\n\t        get: function () {\r\n\t            return this._max;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"step\", {\r\n\t        get: function () {\r\n\t            return this._step;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MediaControl.prototype, \"currentValue\", {\r\n\t        get: function () {\r\n\t            return this._currentValue;\r\n\t        },\r\n\t        set: function (newValue) {\r\n\t            if (newValue > this._max) {\r\n\t                newValue = this._min;\r\n\t            }\r\n\t            else if (newValue < this._min) {\r\n\t                newValue = this._max;\r\n\t            }\r\n\t            this._currentValue = newValue;\r\n\t            this._$slider.val(this._currentValue.toFixed(2));\r\n\t            if (this._showAsDate) {\r\n\t                this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n\t            }\r\n\t            else {\r\n\t                this._$valLabelVal.html(this.currentValue.toString());\r\n\t            }\r\n\t            this._changeFunc(newValue);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * set min and max value with step\r\n\t     * @param {number} newMin the new min\r\n\t     * @param {number} newMax the new mas\r\n\t     * @param {number} [newValue=newMin] the value to set\r\n\t     * @param {number} [newStep=(newMax-newMin)/20] step value\r\n\t     */\r\n\t    MediaControl.prototype.setMinMaxValueStep = function (newMin, newMax, newValue, newStep) {\r\n\t        this._min = newMin;\r\n\t        this._max = newMax;\r\n\t        newValue = typeof newValue == 'number' ? newValue : newMin;\r\n\t        newStep = typeof newStep == 'number' ? newStep : (newMax - newMin) / 20;\r\n\t        this._currentValue = newValue;\r\n\t        this._step = newStep;\r\n\t        this._$slider.prop('min', this.min.toString());\r\n\t        this._$slider.prop('max', this.max.toString());\r\n\t        this._$slider.prop('step', this.step.toString());\r\n\t        this._$slider.val(this.currentValue.toString());\r\n\t        if (this._showAsDate) {\r\n\t            this._$valLabelMin.html(timeToLocalDateString(this._min));\r\n\t            this._$valLabelVal.html(timeToLocalDateString(this.currentValue));\r\n\t            this._$valLabelMax.html(timeToLocalDateString(this._max));\r\n\t        }\r\n\t        else {\r\n\t            this._$valLabelMin.html(this._min.toString());\r\n\t            this._$valLabelVal.html(this.currentValue.toString());\r\n\t            this._$valLabelMax.html(this._max.toString());\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MediaControl.prototype, \"changeFunction\", {\r\n\t        /**\r\n\t         *\r\n\t         * @param {mediaCallback} newFunc the callback on change\r\n\t         */\r\n\t        set: function (newFunc) {\r\n\t            this._changeFunc = newFunc;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return MediaControl;\r\n\t}());\r\n\texports.MediaControl = MediaControl;\r\n\tnm.MediaControl = MediaControl;\r\n\n\n/***/ },\n\n/***/ 19:\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('domUtil');\r\n\tvar mouseIn = false;\r\n\tvar mouseDown = false;\r\n\tvar timeout = null;\r\n\tvar dragged = false;\r\n\tvar lastVal;\r\n\t/**\r\n\t * Created by gavorhes on 11/2/2015.\r\n\t */\r\n\tfunction triggerCallback(callback, evt) {\r\n\t    \"use strict\";\r\n\t    var val = parseFloat(this.value);\r\n\t    var min = parseFloat(this.min);\r\n\t    var max = parseFloat(this.max);\r\n\t    var step = parseFloat(this.step);\r\n\t    if (max - val < step) {\r\n\t        val = max;\r\n\t    }\r\n\t    var percent = (val - min) / (max - min);\r\n\t    if (typeof lastVal == 'number' && val == lastVal) {\r\n\t        return;\r\n\t    }\r\n\t    lastVal = val;\r\n\t    callback(val, percent, evt);\r\n\t}\r\n\t/**\r\n\t * Add a variety of listeners for range inputs applied to a common callback\r\n\t * @param  $slider - jquery reference to the slider\r\n\t * @param {rangeChangeCallback} callback - the callback\r\n\t * @param {number} [changeTimeout=75] before the callback is called\r\n\t * @this {jQuery}\r\n\t * @returns {jQuery} the jQuery object\r\n\t */\r\n\tfunction rangeChange($slider, callback, changeTimeout) {\r\n\t    changeTimeout = typeof changeTimeout == 'number' ? changeTimeout : 75;\r\n\t    $slider.mouseenter(function () {\r\n\t        mouseIn = true;\r\n\t    });\r\n\t    $slider.mouseleave(function () {\r\n\t        mouseIn = false;\r\n\t        mouseDown = false;\r\n\t    });\r\n\t    $slider.mousedown(function () {\r\n\t        mouseDown = true;\r\n\t    });\r\n\t    $slider.mouseup(function () {\r\n\t        mouseDown = false;\r\n\t    });\r\n\t    $slider.mousemove(\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} evt - event properties\r\n\t     * @this {HTMLElement}\r\n\t     */\r\n\t    function (evt) {\r\n\t        if (!(mouseIn && mouseDown)) {\r\n\t            return;\r\n\t        }\r\n\t        dragged = true;\r\n\t        if (lastVal == this['value']) {\r\n\t            return;\r\n\t        }\r\n\t        lastVal = this['value'];\r\n\t        if (timeout != null) {\r\n\t            clearTimeout(timeout);\r\n\t        }\r\n\t        var _this = this;\r\n\t        timeout = setTimeout(function () {\r\n\t            triggerCallback.call(_this, callback, evt);\r\n\t            timeout = null;\r\n\t        }, changeTimeout);\r\n\t    });\r\n\t    $slider.keyup(\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} evt - event properties\r\n\t     */\r\n\t    function (evt) {\r\n\t        if (evt.keyCode == 37 || evt.keyCode == 39) {\r\n\t            triggerCallback.call(this, callback, evt);\r\n\t        }\r\n\t    });\r\n\t    $slider.change(function (evt) {\r\n\t        if (dragged) {\r\n\t            dragged = false;\r\n\t            return;\r\n\t        }\r\n\t        triggerCallback.call(this, callback, evt);\r\n\t    });\r\n\t    return this;\r\n\t}\r\n\texports.rangeChange = rangeChange;\r\n\tnm.rangeChange = rangeChange;\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","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/_test/my_little_test.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 2\n// module chunks = 0 1 2 3 4 5 6","/**\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) {\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\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(\r\n        element: JQuery|HTMLElement|string,\r\n        changeFunc: changeFunction = (): void => {return;},\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['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) => { this.currentValue = newVal;}, 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, newMax, newValue, newStep) {\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\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout = null;\r\nlet dragged = false;\r\nlet lastVal;\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: Event): 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) {\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"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap 6e5b1af915babfe1fe92?33e6***","webpack:///./src/_test/my_little_test.ts","webpack:///./src/util/provide.ts?5c82**","webpack:///external \"$\"?57aa**","webpack:///./src/domUtil/media-control.ts?660c","webpack:///./src/domUtil/range-change.ts?b7cd"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;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aAEhB,MAAM,CAAC;SACX,CAAC;SACD,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,CAAC,CAAC;KAC9C,CAAC,CAAC,CAAC;KAEH,MAAM,CAAC,IAAI,CAAC;AAChB,EAAC;AAzED,mCAyEC;AAED,GAAE,CAAC,WAAW,GAAG,WAAW,CAAC","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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6e5b1af915babfe1fe92","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/_test/my_little_test.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 5\n// module chunks = 0 2 3 4 5 7 8","/**\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) {\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\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(\r\n        element: JQuery|HTMLElement|string,\r\n        changeFunc: changeFunction = (): void => {return;},\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['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) => { this.currentValue = newVal;}, 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, newMax, newValue, newStep) {\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\n\r\nconst nm = provide('domUtil');\r\n\r\nlet mouseIn = false;\r\nlet mouseDown = false;\r\nlet timeout = null;\r\nlet dragged = false;\r\nlet lastVal;\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: Event): 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) {\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"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/range_media.js b/test-html/js/range_media.js
index 364a6cd6e66929fc720bda6e6493638b49757947..63a61fc9730ded4112093f6eb4c67c5ee99db3a8 100644
--- a/test-html/js/range_media.js
+++ b/test-html/js/range_media.js
@@ -1,10 +1,5006 @@
-!function(t){function e(s){if(i[s])return i[s].exports;var n=i[s]={exports:{},id:s,loaded:!1};return t[s].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var i={};return e.m=t,e.c=i,e.p="",e(0)}({0:function(t,e,i){"use strict";var s=i(23),n=i(2);new s.DayRange(n("#day-range"),10)},1:function(t,e){"use strict";function i(t){"undefined"==typeof window.gv&&(window.gv={});for(var e=t.split("."),i=window.gv,s=0;s<e.length;s++){var n=i[e[s]];"undefined"==typeof n&&(i[e[s]]={}),i=i[e[s]]}return i}i("util"),window.gv.util.provide=i,Object.defineProperty(e,"__esModule",{value:!0}),e.default=i},2:function(t,e){t.exports=$},23:function(t,e,i){"use strict";var s=i(1),n=i(2);i(34);var o=s.default("domUtil"),a=function(){function t(t,e){this._workingDayRange=e-1;var i='<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;">';t.append(i),this._$startDate=n("#start-date"),this._$endDate=n("#end-date"),this._$startDate.datepicker(),this._$endDate.datepicker(),this._startDate=null,this._endDate=null;var s=new Date;s.setHours(0,0,0,0);var o=new Date(s.getTime());o.setDate(o.getDate()+e),o.setHours(23,59,59,0),this._maxDateRange=o.getTime()-s.getTime();var a=this;this._$startDate.change(function(){a.startDate=this.value}),this._$endDate.change(function(){a.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=a,o.DayRange=a,Object.defineProperty(e,"__esModule",{value:!0}),e.default=a},34:function(t,e,i){var s=i(2);/*! jQuery UI - v1.10.3 - 2013-05-03
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ 0:
+/*!***********************************!*\
+  !*** ./dist/_test/range_media.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 10/10/2016.
+	 */
+	"use strict";
+	var day_range_1 = __webpack_require__(/*! ../domUtil/day-range */ 32);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	var dayRange = new day_range_1.DayRange($('#day-range'), 10);
+
+
+/***/ },
+
+/***/ 3:
+/*!******************************!*\
+  !*** ./dist/util/provide.js ***!
+  \******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = provide;
+
+
+/***/ },
+
+/***/ 5:
+/*!********************!*\
+  !*** external "$" ***!
+  \********************/
+/***/ function(module, exports) {
+
+	module.exports = $;
+
+/***/ },
+
+/***/ 32:
+/*!***********************************!*\
+  !*** ./dist/domUtil/day-range.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	__webpack_require__(/*! jquery-ui */ 33);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = DayRange;
+
+
+/***/ },
+
+/***/ 33:
+/*!**********************************!*\
+  !*** ./~/jquery-ui/jquery-ui.js ***!
+  \**********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	var jQuery = __webpack_require__(/*! jquery */ 5);
+	
+	/*! jQuery UI - v1.10.3 - 2013-05-03
 	* http://jqueryui.com
 	* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js
 	* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */
-!function(t,e){function i(e,i){var n,o,a,r=e.nodeName.toLowerCase();return"area"===r?(n=e.parentNode,o=n.name,!(!e.href||!o||"map"!==n.nodeName.toLowerCase())&&(a=t("img[usemap=#"+o+"]")[0],!!a&&s(a))):(/input|select|textarea|button|object/.test(r)?!e.disabled:"a"===r?e.href||i:i)&&s(e)}function s(e){return t.expr.filters.visible(e)&&!t(e).parents().addBack().filter(function(){return"hidden"===t.css(this,"visibility")}).length}var n=0,o=/^ui-id-\d+$/;t.ui=t.ui||{},t.extend(t.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),t.fn.extend({focus:function(e){return function(i,s){return"number"==typeof i?this.each(function(){var e=this;setTimeout(function(){t(e).focus(),s&&s.call(e)},i)}):e.apply(this,arguments)}}(t.fn.focus),scrollParent:function(){var e;return e=t.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(t.css(this,"position"))&&/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(t.css(this,"overflow")+t.css(this,"overflow-y")+t.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!e.length?t(document):e},zIndex:function(i){if(i!==e)return this.css("zIndex",i);if(this.length)for(var s,n,o=t(this[0]);o.length&&o[0]!==document;){if(s=o.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(n=parseInt(o.css("zIndex"),10),!isNaN(n)&&0!==n))return n;o=o.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})},removeUniqueId:function(){return this.each(function(){o.test(this.id)&&t(this).removeAttr("id")})}}),t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])},focusable:function(e){return i(e,!isNaN(t.attr(e,"tabindex")))},tabbable:function(e){var s=t.attr(e,"tabindex"),n=isNaN(s);return(n||s>=0)&&i(e,!n)}}),t("<a>").outerWidth(1).jquery||t.each(["Width","Height"],function(i,s){function n(e,i,s,n){return t.each(o,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),n&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var o="Width"===s?["Left","Right"]:["Top","Bottom"],a=s.toLowerCase(),r={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+s]=function(i){return i===e?r["inner"+s].call(this):this.each(function(){t(this).css(a,n(this,i)+"px")})},t.fn["outer"+s]=function(e,i){return"number"!=typeof e?r["outer"+s].call(this,e):this.each(function(){t(this).css(a,n(this,e,!0,i)+"px")})}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(t.fn.removeData=function(e){return function(i){return arguments.length?e.call(this,t.camelCase(i)):e.call(this)}}(t.fn.removeData)),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),t.support.selectstart="onselectstart"in document.createElement("div"),t.fn.extend({disableSelection:function(){return this.bind((t.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(t){t.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),t.extend(t.ui,{plugin:{add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i){var s,n=t.plugins[e];if(n&&t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType)for(s=0;s<n.length;s++)t.options[n[s][0]]&&n[s][1].apply(t.element,i)}},hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0||(e[s]=1,n=e[s]>0,e[s]=0,n)}})}(s),function(t,e){var i=0,s=Array.prototype.slice,n=t.cleanData;t.cleanData=function(e){for(var i,s=0;null!=(i=e[s]);s++)try{t(i).triggerHandler("remove")}catch(t){}n(e)},t.widget=function(e,i,s){var n,o,a,r,h={},l=e.split(".")[0];e=e.split(".")[1],n=l+"-"+e,s||(s=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[l]=t[l]||{},o=t[l][e],a=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new a(t,e)},t.extend(a,o,{version:s.version,_proto:t.extend({},s),_childConstructors:[]}),r=new i,r.options=t.widget.extend({},r.options),t.each(s,function(e,s){return t.isFunction(s)?void(h[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,o=this._superApply;return this._super=t,this._superApply=n,e=s.apply(this,arguments),this._super=i,this._superApply=o,e}}()):void(h[e]=s)}),a.prototype=t.widget.extend(r,{widgetEventPrefix:o?r.widgetEventPrefix:e},h,{constructor:a,namespace:l,widgetName:e,widgetFullName:n}),o?(t.each(o._childConstructors,function(e,i){var s=i.prototype;t.widget(s.namespace+"."+s.widgetName,a,i._proto)}),delete o._childConstructors):i._childConstructors.push(a),t.widget.bridge(e,a)},t.widget.extend=function(i){for(var n,o,a=s.call(arguments,1),r=0,h=a.length;r<h;r++)for(n in a[r])o=a[r][n],a[r].hasOwnProperty(n)&&o!==e&&(t.isPlainObject(o)?i[n]=t.isPlainObject(i[n])?t.widget.extend({},i[n],o):t.widget.extend({},o):i[n]=o);return i},t.widget.bridge=function(i,n){var o=n.prototype.widgetFullName||i;t.fn[i]=function(a){var r="string"==typeof a,h=s.call(arguments,1),l=this;return a=!r&&h.length?t.widget.extend.apply(null,[a].concat(h)):a,r?this.each(function(){var s,n=t.data(this,o);return n?t.isFunction(n[a])&&"_"!==a.charAt(0)?(s=n[a].apply(n,h),s!==n&&s!==e?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):void 0):t.error("no such method '"+a+"' for "+i+" widget instance"):t.error("cannot call methods on "+i+" prior to initialization; attempted to call method '"+a+"'")}):this.each(function(){var e=t.data(this,o);e?e.option(a||{})._init():t.data(this,o,new n(a,this))}),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this.bindings=t(),this.hoverable=t(),this.focusable=t(),s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(i,s){var n,o,a,r=i;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof i)if(r={},n=i.split("."),i=n.shift(),n.length){for(o=r[i]=t.widget.extend({},this.options[i]),a=0;a<n.length-1;a++)o[n[a]]=o[n[a]]||{},o=o[n[a]];if(i=n.pop(),s===e)return o[i]===e?null:o[i];o[i]=s}else{if(s===e)return this.options[i]===e?null:this.options[i];r[i]=s}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!e).attr("aria-disabled",e),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){if(e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof a?o[a]:a).apply(o,arguments)}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^(\w+)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.delegate(c,l,r):i.bind(l,r)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(e).undelegate(e)},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}})}(s),function(t,e){var i=!1;t(document).mouseup(function(){i=!1}),t.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.bind("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).bind("click."+this.widgetName,function(i){if(!0===t.data(i.target,e.widgetName+".preventClickEvent"))return t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!i){this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var s=this,n=1===e.which,o=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&t(e.target).closest(this.options.cancel).length;return!(n&&!o&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return s._mouseMove(t)},this._mouseUpDelegate=function(t){return s._mouseUp(t)},t(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),i=!0,!0))}},_mouseMove:function(e){return t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button?this._mouseUp(e):this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){return t(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),!1},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}(s),function(t,e){t.widget("ui.draggable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(e){var i=this.options;return!(this.helper||i.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(t(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){t("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(t(this).offset()).appendTo("body")}),!0))},_mouseStart:function(e){var i=this.options;return this.helper=this._createHelper(e),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",e)===!1?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!i.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_mouseDrag:function(e,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",e,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var i=this,s=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(s=t.ui.ddmanager.drop(this,e)),this.dropped&&(s=this.dropped,this.dropped=!1),!("original"===this.options.helper&&!t.contains(this.element[0].ownerDocument,this.element[0]))&&("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||t.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",e)!==!1&&i._clear()}):this._trigger("stop",e)!==!1&&this._clear(),!1)},_mouseUp:function(e){return t("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.element.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;return n.containment?"window"===n.containment?void(this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):"document"===n.containment?void(this.containment=[0,0,t(document).width()-this.helperProportions.width-this.margins.left,(t(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]):n.containment.constructor===Array?void(this.containment=n.containment):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=t(n.containment),s=i[0],void(s&&(e="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(e?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i))):void(this.containment=null)},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(e){var i,s,n,o,a=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=e.pageX,l=e.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,h=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(e,i,s){return s=s||this._uiHash(),t.ui.plugin.call(this,e,[i,s]),"drag"===e&&(this.positionAbs=this._convertPositionTo("absolute")),t.Widget.prototype._trigger.call(this,e,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,i){var s=t(this).data("ui-draggable"),n=s.options,o=t.extend({},i,{item:s.element});s.sortables=[],t(n.connectToSortable).each(function(){var i=t.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",e,o))})},stop:function(e,i){var s=t(this).data("ui-draggable"),n=t.extend({},i,{item:s.element});t.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(e),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",e,n))})},drag:function(e,i){var s=t(this).data("ui-draggable"),n=this;t.each(s.sortables,function(){var o=!1,a=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(o=!0,t.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==a&&this.instance._intersectsWith(this.instance.containerCache)&&t.contains(a.instance.element[0],this.instance.element[0])&&(o=!1),o})),o?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=t(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},e.target=this.instance.currentItem[0],this.instance._mouseCapture(e,!0),this.instance._mouseStart(e,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",e),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(e)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",e,this.instance._uiHash(this.instance)),this.instance._mouseStop(e,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",e),s.dropped=!1)})}}),t.ui.plugin.add("draggable","cursor",{start:function(){var e=t("body"),i=t(this).data("ui-draggable").options;e.css("cursor")&&(i._cursor=e.css("cursor")),e.css("cursor",i.cursor)},stop:function(){var e=t(this).data("ui-draggable").options;e._cursor&&t("body").css("cursor",e._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._opacity&&t(i.helper).css("opacity",s._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(){var e=t(this).data("ui-draggable");e.scrollParent[0]!==document&&"HTML"!==e.scrollParent[0].tagName&&(e.overflowOffset=e.scrollParent.offset())},drag:function(e){var i=t(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-e.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:e.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-e.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:e.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(e.pageY-t(document).scrollTop()<s.scrollSensitivity?n=t(document).scrollTop(t(document).scrollTop()-s.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<s.scrollSensitivity&&(n=t(document).scrollTop(t(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(e.pageX-t(document).scrollLeft()<s.scrollSensitivity?n=t(document).scrollLeft(t(document).scrollLeft()-s.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<s.scrollSensitivity&&(n=t(document).scrollLeft(t(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(){var e=t(this).data("ui-draggable"),i=e.options;e.snapElements=[],t(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=t(this),s=i.offset();this!==e.element[0]&&e.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(e,i){var s,n,o,a,r,h,l,c,u,d,p=t(this).data("ui-draggable"),f=p.options,g=f.snapTolerance,m=i.offset.left,v=m+p.helperProportions.width,_=i.offset.top,b=_+p.helperProportions.height;for(u=p.snapElements.length-1;u>=0;u--)r=p.snapElements[u].left,h=r+p.snapElements[u].width,l=p.snapElements[u].top,c=l+p.snapElements[u].height,v<r-g||m>h+g||b<l-g||_>c+g||!t.contains(p.snapElements[u].item.ownerDocument,p.snapElements[u].item)?(p.snapElements[u].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=!1):("inner"!==f.snapMode&&(s=Math.abs(l-b)<=g,n=Math.abs(c-_)<=g,o=Math.abs(r-v)<=g,a=Math.abs(h-m)<=g,s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||o||a,"outer"!==f.snapMode&&(s=Math.abs(l-_)<=g,n=Math.abs(c-b)<=g,o=Math.abs(r-m)<=g,a=Math.abs(h-v)<=g,s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:c-p.helperProportions.height,left:0}).top-p.margins.top),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[u].snapping&&(s||n||o||a||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,e,t.extend(p._uiHash(),{snapItem:p.snapElements[u].item})),p.snapElements[u].snapping=s||n||o||a||d)}}),t.ui.plugin.add("draggable","stack",{start:function(){var e,i=this.data("ui-draggable").options,s=t.makeArray(t(i.stack)).sort(function(e,i){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(i).css("zIndex"),10)||0)});s.length&&(e=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each(function(i){t(this).css("zIndex",e+i)}),this.css("zIndex",e+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,i){var s=t(i.helper),n=t(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(e,i){var s=t(this).data("ui-draggable").options;s._zIndex&&t(i.helper).css("zIndex",s._zIndex)}})}(s),function(t,e){function i(t,e,i){return t>e&&t<e+i}t.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e=this.options,i=e.accept;this.isover=!1,this.isout=!0,this.accept=t.isFunction(i)?i:function(t){
-return t.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},t.ui.ddmanager.droppables[e.scope]=t.ui.ddmanager.droppables[e.scope]||[],t.ui.ddmanager.droppables[e.scope].push(this),e.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var e=0,i=t.ui.ddmanager.droppables[this.options.scope];e<i.length;e++)i[e]===this&&i.splice(e,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(e,i){"accept"===e&&(this.accept=t.isFunction(i)?i:function(t){return t.is(i)}),t.Widget.prototype._setOption.apply(this,arguments)},_activate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",e,this.ui(i))},_deactivate:function(e){var i=t.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",e,this.ui(i))},_over:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",e,this.ui(i)))},_out:function(e){var i=t.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",e,this.ui(i)))},_drop:function(e,i){var s=i||t.ui.ddmanager.current,n=!1;return!(!s||(s.currentItem||s.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=t.data(this,"ui-droppable");if(e.options.greedy&&!e.options.disabled&&e.options.scope===s.options.scope&&e.accept.call(e.element[0],s.currentItem||s.element)&&t.ui.intersect(s,t.extend(e,{offset:e.element.offset()}),e.options.tolerance))return n=!0,!1}),!n&&(!!this.accept.call(this.element[0],s.currentItem||s.element)&&(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",e,this.ui(s)),this.element)))},ui:function(t){return{draggable:t.currentItem||t.element,helper:t.helper,position:t.position,offset:t.positionAbs}}}),t.ui.intersect=function(t,e,s){if(!e.offset)return!1;var n,o,a=(t.positionAbs||t.position.absolute).left,r=a+t.helperProportions.width,h=(t.positionAbs||t.position.absolute).top,l=h+t.helperProportions.height,c=e.offset.left,u=c+e.proportions.width,d=e.offset.top,p=d+e.proportions.height;switch(s){case"fit":return c<=a&&r<=u&&d<=h&&l<=p;case"intersect":return c<a+t.helperProportions.width/2&&r-t.helperProportions.width/2<u&&d<h+t.helperProportions.height/2&&l-t.helperProportions.height/2<p;case"pointer":return n=(t.positionAbs||t.position.absolute).left+(t.clickOffset||t.offset.click).left,o=(t.positionAbs||t.position.absolute).top+(t.clickOffset||t.offset.click).top,i(o,d,e.proportions.height)&&i(n,c,e.proportions.width);case"touch":return(h>=d&&h<=p||l>=d&&l<=p||h<d&&l>p)&&(a>=c&&a<=u||r>=c&&r<=u||a<c&&r>u);default:return!1}},t.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,i){var s,n,o=t.ui.ddmanager.droppables[e.options.scope]||[],a=i?i.type:null,r=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();t:for(s=0;s<o.length;s++)if(!(o[s].options.disabled||e&&!o[s].accept.call(o[s].element[0],e.currentItem||e.element))){for(n=0;n<r.length;n++)if(r[n]===o[s].element[0]){o[s].proportions.height=0;continue t}o[s].visible="none"!==o[s].element.css("display"),o[s].visible&&("mousedown"===a&&o[s]._activate.call(o[s],i),o[s].offset=o[s].element.offset(),o[s].proportions={width:o[s].element[0].offsetWidth,height:o[s].element[0].offsetHeight})}},drop:function(e,i){var s=!1;return t.each((t.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&t.ui.intersect(e,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(e,i){e.element.parentsUntil("body").bind("scroll.droppable",function(){e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)})},drag:function(e,i){e.options.refreshPositions&&t.ui.ddmanager.prepareOffsets(e,i),t.each(t.ui.ddmanager.droppables[e.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,o,a=t.ui.intersect(e,this,this.options.tolerance),r=!a&&this.isover?"isout":a&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,o=this.element.parents(":data(ui-droppable)").filter(function(){return t.data(this,"ui-droppable").options.scope===n}),o.length&&(s=t.data(o[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(e,i){e.element.parentsUntil("body").unbind("scroll.droppable"),e.options.refreshPositions||t.ui.ddmanager.prepareOffsets(e,i)}}}(s),function(t,e){function i(t){return parseInt(t,10)||0}function s(t){return!isNaN(parseInt(t,10))}t.widget("ui.resizable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var e,i,s,n,o,a=this,r=this.options;if(this.element.addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(t("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),e=this.handles.split(","),this.handles={},i=0;i<e.length;i++)s=t.trim(e[i]),o="ui-resizable-"+s,n=t("<div class='ui-resizable-handle "+o+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=t(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),t(this.handles[i]).length},this._renderAxis(this.element),this._handles=t(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),t(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(t(this).removeClass("ui-resizable-autohide"),a._handles.show())}).mouseleave(function(){r.disabled||a.resizing||(t(this).addClass("ui-resizable-autohide"),a._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var s,n,o,a=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=i(this.helper.css("left")),n=i(this.helper.css("top")),a.containment&&(s+=t(a.containment).scrollLeft()||0,n+=t(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,o=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===o?this.axis+"-resize":o),h.addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s=this.helper,n={},o=this.originalMousePosition,a=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,c=this.size.height,u=e.pageX-o.left||0,d=e.pageY-o.top||0,p=this._change[a];return!!p&&(i=p.apply(this,[e,u,d]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==c&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(n)||this._trigger("resize",e,this.ui()),!1)},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&t.ui.hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,h=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(t){var e,i,n,o,a,r=this.options;a={minWidth:s(r.minWidth)?r.minWidth:0,maxWidth:s(r.maxWidth)?r.maxWidth:1/0,minHeight:s(r.minHeight)?r.minHeight:0,maxHeight:s(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||t)&&(e=a.minHeight*this.aspectRatio,n=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,o=a.maxWidth/this.aspectRatio,e>a.minWidth&&(a.minWidth=e),n>a.minHeight&&(a.minHeight=n),i<a.maxWidth&&(a.maxWidth=i),o<a.maxHeight&&(a.maxHeight=o)),this._vBoundaries=a},_updateCache:function(t){this.offset=this.helper.offset(),s(t.left)&&(this.position.left=t.left),s(t.top)&&(this.position.top=t.top),s(t.height)&&(this.size.height=t.height),s(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,n=this.axis;return s(t.height)?t.width=t.height*this.aspectRatio:s(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===n&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===n&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,n=s(t.width)&&e.maxWidth&&e.maxWidth<t.width,o=s(t.height)&&e.maxHeight&&e.maxHeight<t.height,a=s(t.width)&&e.minWidth&&e.minWidth>t.width,r=s(t.height)&&e.minHeight&&e.minHeight>t.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,c=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(t.width=e.minWidth),r&&(t.height=e.minHeight),n&&(t.width=e.maxWidth),o&&(t.height=e.maxHeight),a&&c&&(t.left=h-e.minWidth),n&&c&&(t.left=h-e.maxWidth),r&&u&&(t.top=l-e.minHeight),o&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var t,e,i,s,n,o=this.helper||this.element;for(t=0;t<this._proportionallyResizeElements.length;t++){if(n=this._proportionallyResizeElements[t],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],e=0;e<i.length;e++)this.borderDif[e]=(parseInt(i[e],10)||0)+(parseInt(s[e],10)||0);n.css({height:o.height()-this.borderDif[0]-this.borderDif[2]||0,width:o.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&t.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,c=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,s,n,o,a,r,h,l=t(this).data("ui-resizable"),c=l.options,u=l.element,d=c.containment,p=d instanceof t?d.get(0):/parent/.test(d)?u.parent().get(0):d;p&&(l.containerElement=t(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(p),s=[],t(["Top","Right","Left","Bottom"]).each(function(t,n){s[t]=i(e.css("padding"+n))}),l.containerOffset=e.offset(),l.containerPosition=e.position(),l.containerSize={height:e.innerHeight()-s[3],width:e.innerWidth()-s[1]},n=l.containerOffset,o=l.containerSize.height,a=l.containerSize.width,r=t.ui.hasScroll(p,"left")?p.scrollWidth:a,h=t.ui.hasScroll(p)?p.scrollHeight:o,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(e){var i,s,n,o,a=t(this).data("ui-resizable"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio),a.position.top=a._helper?h.top:0),a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top,i=Math.abs((a._helper?a.offset.left-u.left:a.offset.left-u.left)+a.sizeDiff.width),s=Math.abs((a._helper?a.offset.top-u.top:a.offset.top-h.top)+a.sizeDiff.height),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o&&(i-=a.parentData.left),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio))},stop:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=function(e){t(e).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseInt(e.width(),10),height:parseInt(e.height(),10),left:parseInt(e.css("left"),10),top:parseInt(e.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):t.each(i.alsoResize,function(t){s(t)})},resize:function(e,i){var s=t(this).data("ui-resizable"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0},h=function(e,s){t(e).each(function(){var e=t(this),n=t(this).data("ui-resizable-alsoresize"),o={},a=s&&s.length?s:e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(a,function(t,e){var i=(n[e]||0)+(r[e]||0);i&&i>=0&&(o[e]=i||null)}),e.css(o)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):t.each(n.alsoResize,function(t,e){h(t,e)})},stop:function(){t(this).removeData("resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).data("ui-resizable");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).data("ui-resizable");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e=t(this).data("ui-resizable"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,c=Math.round((s.width-n.width)/h)*h,u=Math.round((s.height-n.height)/l)*l,d=n.width+c,p=n.height+u,f=i.maxWidth&&i.maxWidth<d,g=i.maxHeight&&i.maxHeight<p,m=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=h),v&&(p+=l),f&&(d-=h),g&&(p-=l),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-u):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-c):(e.size.width=d,e.size.height=p,e.position.top=o.top-u,e.position.left=o.left-c)}})}(s),function(t,e){t.widget("ui.selectable",t.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var e,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){e=t(i.options.filter,i.element[0]),e.addClass("ui-selectee"),e.each(function(){var e=t(this),i=e.offset();t.data(this,"selectable-item",{element:this,$element:e,left:i.left,top:i.top,right:i.left+e.outerWidth(),bottom:i.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=e.addClass("ui-selectee"),this._mouseInit(),this.helper=t("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(e){var i=this,s=this.options;this.opos=[e.pageX,e.pageY],this.options.disabled||(this.selectees=t(s.filter,this.element[0]),this._trigger("start",e),t(s.appendTo).append(this.helper),this.helper.css({left:e.pageX,top:e.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=t.data(this,"selectable-item");s.startselected=!0,e.metaKey||e.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",e,{unselecting:s.element}))}),t(e.target).parents().addBack().each(function(){var s,n=t.data(this,"selectable-item");if(n)return s=!e.metaKey&&!e.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",e,{selecting:n.element}):i._trigger("unselecting",e,{unselecting:n.element}),!1}))},_mouseDrag:function(e){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,o=this.opos[0],a=this.opos[1],r=e.pageX,h=e.pageY;return o>r&&(i=r,r=o,o=i),a>h&&(i=h,h=a,a=i),this.helper.css({left:o,top:a,width:r-o,height:h-a}),this.selectees.each(function(){var i=t.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||i.right<o||i.top>h||i.bottom<a):"fit"===n.tolerance&&(l=i.left>o&&i.right<r&&i.top>a&&i.bottom<h),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",e,{selecting:i.element}))):(i.selecting&&((e.metaKey||e.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",e,{unselecting:i.element}))),i.selected&&(e.metaKey||e.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",e,{unselecting:i.element})))))}),!1}},_mouseStop:function(e){var i=this;return this.dragged=!1,t(".ui-unselecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",e,{unselected:s.element})}),t(".ui-selecting",this.element[0]).each(function(){var s=t.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",e,{selected:s.element})}),this._trigger("stop",e),this.helper.remove(),!1}})}(s),function(t,e){function i(t,e,i){return t>e&&t<e+i}function s(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=!!this.items.length&&("x"===t.axis||s(this.items[0].item)),this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,o=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each(function(){if(t.data(this,o.widgetName+"-item")===o)return s=t(this),!1}),t.data(e.target,o.widgetName+"-item")===o&&(s=t(e.target)),!!s&&(!(this.options.handle&&!i&&(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),!n))&&(this.currentItem=s,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,i,s){var n,o,a=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",a.cursor),this.storedStylesheet=t("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(o)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,o,a=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-t(document).scrollTop()<a.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-a.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<a.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+a.scrollSpeed)),e.pageX-t(document).scrollLeft()<a.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-a.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<a.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+a.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!a.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],
-o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&!(n===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===n||t.contains(this.placeholder[0],n)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],n))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,a={};o&&"x"!==o||(a.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(a.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=t.left,a=o+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&s+l<h,d="y"===this.options.axis||e+c>o&&e+c<a,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:o<e+this.helperProportions.width/2&&i-this.helperProportions.width/2<a&&r<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<h},_intersectsWithPointer:function(t){var e="x"===this.options.axis||i(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||i(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=e&&s,o=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return!!n&&(this.floating?a&&"right"===a||"down"===o?2:1:o&&("down"===o?2:1))},_intersectsWithSides:function(t){var e=i(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=i(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return this.floating&&o?"right"===o&&s||"left"===o&&!s:n&&("down"===n&&e||"up"===n&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,o,a=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&r.push([t.isFunction(o.options.items)?o.options.items.call(o.element):t(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){a.push(this)});return t(a)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;i<e.length;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,o,a,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)o=t.data(n[s],this.widgetFullName),o&&o!==this&&!o.options.disabled&&(u.push([t.isFunction(o.options.items)?o.options.items.call(o.element[0],e,{item:this.currentItem}):t(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(a=u[i][1],r=u[i][0],s=0,l=r.length;s<l;s++)h=t(r[s]),h.data(this.widgetName+"-item",a),c.push({item:h,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)o=this.containers[i].element.offset(),this.containers[i].containerCache.left=o.left,this.containers[i].containerCache.top=o.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){i&&!s.forcePlaceholderSize||(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(e){var n,o,a,r,h,l,c,u,d,p,f=null,g=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],g=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[g].containerCache.over||(this.containers[g]._trigger("over",e,this._uiHash(this)),this.containers[g].containerCache.over=1);else{for(a=1e4,r=null,p=f.floating||s(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],o=this.items.length-1;o>=0;o--)t.contains(this.containers[g].element[0],this.items[o].item[0])&&this.items[o].item[0]!==this.currentItem[0]&&(p&&!i(this.positionAbs.top+this.offset.click.top,this.items[o].top,this.items[o].height)||(u=this.items[o].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[o][l]-c)&&(d=!0,u+=this.items[o][l]),Math.abs(u-c)<a&&(a=Math.abs(u-c),r=this.items[o],this.direction=d?"up":"down")));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[g])return;r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[g].element,!0),this._trigger("change",e,this._uiHash()),this.containers[g]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[g],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[g]._trigger("over",e,this._uiHash(this)),this.containers[g].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),s[0].style.width&&!i.forceHelperSize||s.width(this.currentItem.width()),s[0].style.height&&!i.forceHelperSize||s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),"document"!==n.containment&&"window"!==n.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,o=e.pageX,a=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((a-this.originalPageY)/n.grid[1])*n.grid[1],a=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;i<s.length;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})}(s),function(t,e){var i="ui-effects-";t.effects={effect:{}},/*!
+	(function( $, undefined ) {
+	
+	var uuid = 0,
+		runiqueId = /^ui-id-\d+$/;
+	
+	// $.ui might exist from components with no dependencies, e.g., $.ui.position
+	$.ui = $.ui || {};
+	
+	$.extend( $.ui, {
+		version: "1.10.3",
+	
+		keyCode: {
+			BACKSPACE: 8,
+			COMMA: 188,
+			DELETE: 46,
+			DOWN: 40,
+			END: 35,
+			ENTER: 13,
+			ESCAPE: 27,
+			HOME: 36,
+			LEFT: 37,
+			NUMPAD_ADD: 107,
+			NUMPAD_DECIMAL: 110,
+			NUMPAD_DIVIDE: 111,
+			NUMPAD_ENTER: 108,
+			NUMPAD_MULTIPLY: 106,
+			NUMPAD_SUBTRACT: 109,
+			PAGE_DOWN: 34,
+			PAGE_UP: 33,
+			PERIOD: 190,
+			RIGHT: 39,
+			SPACE: 32,
+			TAB: 9,
+			UP: 38
+		}
+	});
+	
+	// plugins
+	$.fn.extend({
+		focus: (function( orig ) {
+			return function( delay, fn ) {
+				return typeof delay === "number" ?
+					this.each(function() {
+						var elem = this;
+						setTimeout(function() {
+							$( elem ).focus();
+							if ( fn ) {
+								fn.call( elem );
+							}
+						}, delay );
+					}) :
+					orig.apply( this, arguments );
+			};
+		})( $.fn.focus ),
+	
+		scrollParent: function() {
+			var scrollParent;
+			if (($.ui.ie && (/(static|relative)/).test(this.css("position"))) || (/absolute/).test(this.css("position"))) {
+				scrollParent = this.parents().filter(function() {
+					return (/(relative|absolute|fixed)/).test($.css(this,"position")) && (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
+				}).eq(0);
+			} else {
+				scrollParent = this.parents().filter(function() {
+					return (/(auto|scroll)/).test($.css(this,"overflow")+$.css(this,"overflow-y")+$.css(this,"overflow-x"));
+				}).eq(0);
+			}
+	
+			return (/fixed/).test(this.css("position")) || !scrollParent.length ? $(document) : scrollParent;
+		},
+	
+		zIndex: function( zIndex ) {
+			if ( zIndex !== undefined ) {
+				return this.css( "zIndex", zIndex );
+			}
+	
+			if ( this.length ) {
+				var elem = $( this[ 0 ] ), position, value;
+				while ( elem.length && elem[ 0 ] !== document ) {
+					// Ignore z-index if position is set to a value where z-index is ignored by the browser
+					// This makes behavior of this function consistent across browsers
+					// WebKit always returns auto if the element is positioned
+					position = elem.css( "position" );
+					if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+						// IE returns 0 when zIndex is not specified
+						// other browsers return a string
+						// we ignore the case of nested elements with an explicit value of 0
+						// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+						value = parseInt( elem.css( "zIndex" ), 10 );
+						if ( !isNaN( value ) && value !== 0 ) {
+							return value;
+						}
+					}
+					elem = elem.parent();
+				}
+			}
+	
+			return 0;
+		},
+	
+		uniqueId: function() {
+			return this.each(function() {
+				if ( !this.id ) {
+					this.id = "ui-id-" + (++uuid);
+				}
+			});
+		},
+	
+		removeUniqueId: function() {
+			return this.each(function() {
+				if ( runiqueId.test( this.id ) ) {
+					$( this ).removeAttr( "id" );
+				}
+			});
+		}
+	});
+	
+	// selectors
+	function focusable( element, isTabIndexNotNaN ) {
+		var map, mapName, img,
+			nodeName = element.nodeName.toLowerCase();
+		if ( "area" === nodeName ) {
+			map = element.parentNode;
+			mapName = map.name;
+			if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+				return false;
+			}
+			img = $( "img[usemap=#" + mapName + "]" )[0];
+			return !!img && visible( img );
+		}
+		return ( /input|select|textarea|button|object/.test( nodeName ) ?
+			!element.disabled :
+			"a" === nodeName ?
+				element.href || isTabIndexNotNaN :
+				isTabIndexNotNaN) &&
+			// the element and all of its ancestors must be visible
+			visible( element );
+	}
+	
+	function visible( element ) {
+		return $.expr.filters.visible( element ) &&
+			!$( element ).parents().addBack().filter(function() {
+				return $.css( this, "visibility" ) === "hidden";
+			}).length;
+	}
+	
+	$.extend( $.expr[ ":" ], {
+		data: $.expr.createPseudo ?
+			$.expr.createPseudo(function( dataName ) {
+				return function( elem ) {
+					return !!$.data( elem, dataName );
+				};
+			}) :
+			// support: jQuery <1.8
+			function( elem, i, match ) {
+				return !!$.data( elem, match[ 3 ] );
+			},
+	
+		focusable: function( element ) {
+			return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+		},
+	
+		tabbable: function( element ) {
+			var tabIndex = $.attr( element, "tabindex" ),
+				isTabIndexNaN = isNaN( tabIndex );
+			return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+		}
+	});
+	
+	// support: jQuery <1.8
+	if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
+		$.each( [ "Width", "Height" ], function( i, name ) {
+			var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+				type = name.toLowerCase(),
+				orig = {
+					innerWidth: $.fn.innerWidth,
+					innerHeight: $.fn.innerHeight,
+					outerWidth: $.fn.outerWidth,
+					outerHeight: $.fn.outerHeight
+				};
+	
+			function reduce( elem, size, border, margin ) {
+				$.each( side, function() {
+					size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
+					if ( border ) {
+						size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
+					}
+					if ( margin ) {
+						size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
+					}
+				});
+				return size;
+			}
+	
+			$.fn[ "inner" + name ] = function( size ) {
+				if ( size === undefined ) {
+					return orig[ "inner" + name ].call( this );
+				}
+	
+				return this.each(function() {
+					$( this ).css( type, reduce( this, size ) + "px" );
+				});
+			};
+	
+			$.fn[ "outer" + name] = function( size, margin ) {
+				if ( typeof size !== "number" ) {
+					return orig[ "outer" + name ].call( this, size );
+				}
+	
+				return this.each(function() {
+					$( this).css( type, reduce( this, size, true, margin ) + "px" );
+				});
+			};
+		});
+	}
+	
+	// support: jQuery <1.8
+	if ( !$.fn.addBack ) {
+		$.fn.addBack = function( selector ) {
+			return this.add( selector == null ?
+				this.prevObject : this.prevObject.filter( selector )
+			);
+		};
+	}
+	
+	// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
+	if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
+		$.fn.removeData = (function( removeData ) {
+			return function( key ) {
+				if ( arguments.length ) {
+					return removeData.call( this, $.camelCase( key ) );
+				} else {
+					return removeData.call( this );
+				}
+			};
+		})( $.fn.removeData );
+	}
+	
+	
+	
+	
+	
+	// deprecated
+	$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
+	
+	$.support.selectstart = "onselectstart" in document.createElement( "div" );
+	$.fn.extend({
+		disableSelection: function() {
+			return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +
+				".ui-disableSelection", function( event ) {
+					event.preventDefault();
+				});
+		},
+	
+		enableSelection: function() {
+			return this.unbind( ".ui-disableSelection" );
+		}
+	});
+	
+	$.extend( $.ui, {
+		// $.ui.plugin is deprecated. Use $.widget() extensions instead.
+		plugin: {
+			add: function( module, option, set ) {
+				var i,
+					proto = $.ui[ module ].prototype;
+				for ( i in set ) {
+					proto.plugins[ i ] = proto.plugins[ i ] || [];
+					proto.plugins[ i ].push( [ option, set[ i ] ] );
+				}
+			},
+			call: function( instance, name, args ) {
+				var i,
+					set = instance.plugins[ name ];
+				if ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {
+					return;
+				}
+	
+				for ( i = 0; i < set.length; i++ ) {
+					if ( instance.options[ set[ i ][ 0 ] ] ) {
+						set[ i ][ 1 ].apply( instance.element, args );
+					}
+				}
+			}
+		},
+	
+		// only used by resizable
+		hasScroll: function( el, a ) {
+	
+			//If overflow is hidden, the element might have extra content, but the user wants to hide it
+			if ( $( el ).css( "overflow" ) === "hidden") {
+				return false;
+			}
+	
+			var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
+				has = false;
+	
+			if ( el[ scroll ] > 0 ) {
+				return true;
+			}
+	
+			// TODO: determine which cases actually cause this to happen
+			// if the element doesn't have the scroll set, see if it's possible to
+			// set the scroll
+			el[ scroll ] = 1;
+			has = ( el[ scroll ] > 0 );
+			el[ scroll ] = 0;
+			return has;
+		}
+	});
+	
+	})( jQuery );
+	
+	(function( $, undefined ) {
+	
+	var uuid = 0,
+		slice = Array.prototype.slice,
+		_cleanData = $.cleanData;
+	$.cleanData = function( elems ) {
+		for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {
+			try {
+				$( elem ).triggerHandler( "remove" );
+			// http://bugs.jquery.com/ticket/8235
+			} catch( e ) {}
+		}
+		_cleanData( elems );
+	};
+	
+	$.widget = function( name, base, prototype ) {
+		var fullName, existingConstructor, constructor, basePrototype,
+			// proxiedPrototype allows the provided prototype to remain unmodified
+			// so that it can be used as a mixin for multiple widgets (#8876)
+			proxiedPrototype = {},
+			namespace = name.split( "." )[ 0 ];
+	
+		name = name.split( "." )[ 1 ];
+		fullName = namespace + "-" + name;
+	
+		if ( !prototype ) {
+			prototype = base;
+			base = $.Widget;
+		}
+	
+		// create selector for plugin
+		$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+			return !!$.data( elem, fullName );
+		};
+	
+		$[ namespace ] = $[ namespace ] || {};
+		existingConstructor = $[ namespace ][ name ];
+		constructor = $[ namespace ][ name ] = function( options, element ) {
+			// allow instantiation without "new" keyword
+			if ( !this._createWidget ) {
+				return new constructor( options, element );
+			}
+	
+			// allow instantiation without initializing for simple inheritance
+			// must use "new" keyword (the code above always passes args)
+			if ( arguments.length ) {
+				this._createWidget( options, element );
+			}
+		};
+		// extend with the existing constructor to carry over any static properties
+		$.extend( constructor, existingConstructor, {
+			version: prototype.version,
+			// copy the object used to create the prototype in case we need to
+			// redefine the widget later
+			_proto: $.extend( {}, prototype ),
+			// track widgets that inherit from this widget in case this widget is
+			// redefined after a widget inherits from it
+			_childConstructors: []
+		});
+	
+		basePrototype = new base();
+		// we need to make the options hash a property directly on the new instance
+		// otherwise we'll modify the options hash on the prototype that we're
+		// inheriting from
+		basePrototype.options = $.widget.extend( {}, basePrototype.options );
+		$.each( prototype, function( prop, value ) {
+			if ( !$.isFunction( value ) ) {
+				proxiedPrototype[ prop ] = value;
+				return;
+			}
+			proxiedPrototype[ prop ] = (function() {
+				var _super = function() {
+						return base.prototype[ prop ].apply( this, arguments );
+					},
+					_superApply = function( args ) {
+						return base.prototype[ prop ].apply( this, args );
+					};
+				return function() {
+					var __super = this._super,
+						__superApply = this._superApply,
+						returnValue;
+	
+					this._super = _super;
+					this._superApply = _superApply;
+	
+					returnValue = value.apply( this, arguments );
+	
+					this._super = __super;
+					this._superApply = __superApply;
+	
+					return returnValue;
+				};
+			})();
+		});
+		constructor.prototype = $.widget.extend( basePrototype, {
+			// TODO: remove support for widgetEventPrefix
+			// always use the name + a colon as the prefix, e.g., draggable:start
+			// don't prefix for widgets that aren't DOM-based
+			widgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name
+		}, proxiedPrototype, {
+			constructor: constructor,
+			namespace: namespace,
+			widgetName: name,
+			widgetFullName: fullName
+		});
+	
+		// If this widget is being redefined then we need to find all widgets that
+		// are inheriting from it and redefine all of them so that they inherit from
+		// the new version of this widget. We're essentially trying to replace one
+		// level in the prototype chain.
+		if ( existingConstructor ) {
+			$.each( existingConstructor._childConstructors, function( i, child ) {
+				var childPrototype = child.prototype;
+	
+				// redefine the child widget using the same prototype that was
+				// originally used, but inherit from the new version of the base
+				$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+			});
+			// remove the list of existing child constructors from the old constructor
+			// so the old child constructors can be garbage collected
+			delete existingConstructor._childConstructors;
+		} else {
+			base._childConstructors.push( constructor );
+		}
+	
+		$.widget.bridge( name, constructor );
+	};
+	
+	$.widget.extend = function( target ) {
+		var input = slice.call( arguments, 1 ),
+			inputIndex = 0,
+			inputLength = input.length,
+			key,
+			value;
+		for ( ; inputIndex < inputLength; inputIndex++ ) {
+			for ( key in input[ inputIndex ] ) {
+				value = input[ inputIndex ][ key ];
+				if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+					// Clone objects
+					if ( $.isPlainObject( value ) ) {
+						target[ key ] = $.isPlainObject( target[ key ] ) ?
+							$.widget.extend( {}, target[ key ], value ) :
+							// Don't extend strings, arrays, etc. with objects
+							$.widget.extend( {}, value );
+					// Copy everything else by reference
+					} else {
+						target[ key ] = value;
+					}
+				}
+			}
+		}
+		return target;
+	};
+	
+	$.widget.bridge = function( name, object ) {
+		var fullName = object.prototype.widgetFullName || name;
+		$.fn[ name ] = function( options ) {
+			var isMethodCall = typeof options === "string",
+				args = slice.call( arguments, 1 ),
+				returnValue = this;
+	
+			// allow multiple hashes to be passed on init
+			options = !isMethodCall && args.length ?
+				$.widget.extend.apply( null, [ options ].concat(args) ) :
+				options;
+	
+			if ( isMethodCall ) {
+				this.each(function() {
+					var methodValue,
+						instance = $.data( this, fullName );
+					if ( !instance ) {
+						return $.error( "cannot call methods on " + name + " prior to initialization; " +
+							"attempted to call method '" + options + "'" );
+					}
+					if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+						return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+					}
+					methodValue = instance[ options ].apply( instance, args );
+					if ( methodValue !== instance && methodValue !== undefined ) {
+						returnValue = methodValue && methodValue.jquery ?
+							returnValue.pushStack( methodValue.get() ) :
+							methodValue;
+						return false;
+					}
+				});
+			} else {
+				this.each(function() {
+					var instance = $.data( this, fullName );
+					if ( instance ) {
+						instance.option( options || {} )._init();
+					} else {
+						$.data( this, fullName, new object( options, this ) );
+					}
+				});
+			}
+	
+			return returnValue;
+		};
+	};
+	
+	$.Widget = function( /* options, element */ ) {};
+	$.Widget._childConstructors = [];
+	
+	$.Widget.prototype = {
+		widgetName: "widget",
+		widgetEventPrefix: "",
+		defaultElement: "<div>",
+		options: {
+			disabled: false,
+	
+			// callbacks
+			create: null
+		},
+		_createWidget: function( options, element ) {
+			element = $( element || this.defaultElement || this )[ 0 ];
+			this.element = $( element );
+			this.uuid = uuid++;
+			this.eventNamespace = "." + this.widgetName + this.uuid;
+			this.options = $.widget.extend( {},
+				this.options,
+				this._getCreateOptions(),
+				options );
+	
+			this.bindings = $();
+			this.hoverable = $();
+			this.focusable = $();
+	
+			if ( element !== this ) {
+				$.data( element, this.widgetFullName, this );
+				this._on( true, this.element, {
+					remove: function( event ) {
+						if ( event.target === element ) {
+							this.destroy();
+						}
+					}
+				});
+				this.document = $( element.style ?
+					// element within the document
+					element.ownerDocument :
+					// element is window or document
+					element.document || element );
+				this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+			}
+	
+			this._create();
+			this._trigger( "create", null, this._getCreateEventData() );
+			this._init();
+		},
+		_getCreateOptions: $.noop,
+		_getCreateEventData: $.noop,
+		_create: $.noop,
+		_init: $.noop,
+	
+		destroy: function() {
+			this._destroy();
+			// we can probably remove the unbind calls in 2.0
+			// all event bindings should go through this._on()
+			this.element
+				.unbind( this.eventNamespace )
+				// 1.9 BC for #7810
+				// TODO remove dual storage
+				.removeData( this.widgetName )
+				.removeData( this.widgetFullName )
+				// support: jquery <1.6.3
+				// http://bugs.jquery.com/ticket/9413
+				.removeData( $.camelCase( this.widgetFullName ) );
+			this.widget()
+				.unbind( this.eventNamespace )
+				.removeAttr( "aria-disabled" )
+				.removeClass(
+					this.widgetFullName + "-disabled " +
+					"ui-state-disabled" );
+	
+			// clean up events and states
+			this.bindings.unbind( this.eventNamespace );
+			this.hoverable.removeClass( "ui-state-hover" );
+			this.focusable.removeClass( "ui-state-focus" );
+		},
+		_destroy: $.noop,
+	
+		widget: function() {
+			return this.element;
+		},
+	
+		option: function( key, value ) {
+			var options = key,
+				parts,
+				curOption,
+				i;
+	
+			if ( arguments.length === 0 ) {
+				// don't return a reference to the internal hash
+				return $.widget.extend( {}, this.options );
+			}
+	
+			if ( typeof key === "string" ) {
+				// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+				options = {};
+				parts = key.split( "." );
+				key = parts.shift();
+				if ( parts.length ) {
+					curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+					for ( i = 0; i < parts.length - 1; i++ ) {
+						curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+						curOption = curOption[ parts[ i ] ];
+					}
+					key = parts.pop();
+					if ( value === undefined ) {
+						return curOption[ key ] === undefined ? null : curOption[ key ];
+					}
+					curOption[ key ] = value;
+				} else {
+					if ( value === undefined ) {
+						return this.options[ key ] === undefined ? null : this.options[ key ];
+					}
+					options[ key ] = value;
+				}
+			}
+	
+			this._setOptions( options );
+	
+			return this;
+		},
+		_setOptions: function( options ) {
+			var key;
+	
+			for ( key in options ) {
+				this._setOption( key, options[ key ] );
+			}
+	
+			return this;
+		},
+		_setOption: function( key, value ) {
+			this.options[ key ] = value;
+	
+			if ( key === "disabled" ) {
+				this.widget()
+					.toggleClass( this.widgetFullName + "-disabled ui-state-disabled", !!value )
+					.attr( "aria-disabled", value );
+				this.hoverable.removeClass( "ui-state-hover" );
+				this.focusable.removeClass( "ui-state-focus" );
+			}
+	
+			return this;
+		},
+	
+		enable: function() {
+			return this._setOption( "disabled", false );
+		},
+		disable: function() {
+			return this._setOption( "disabled", true );
+		},
+	
+		_on: function( suppressDisabledCheck, element, handlers ) {
+			var delegateElement,
+				instance = this;
+	
+			// no suppressDisabledCheck flag, shuffle arguments
+			if ( typeof suppressDisabledCheck !== "boolean" ) {
+				handlers = element;
+				element = suppressDisabledCheck;
+				suppressDisabledCheck = false;
+			}
+	
+			// no element argument, shuffle and use this.element
+			if ( !handlers ) {
+				handlers = element;
+				element = this.element;
+				delegateElement = this.widget();
+			} else {
+				// accept selectors, DOM elements
+				element = delegateElement = $( element );
+				this.bindings = this.bindings.add( element );
+			}
+	
+			$.each( handlers, function( event, handler ) {
+				function handlerProxy() {
+					// allow widgets to customize the disabled handling
+					// - disabled as an array instead of boolean
+					// - disabled class as method for disabling individual parts
+					if ( !suppressDisabledCheck &&
+							( instance.options.disabled === true ||
+								$( this ).hasClass( "ui-state-disabled" ) ) ) {
+						return;
+					}
+					return ( typeof handler === "string" ? instance[ handler ] : handler )
+						.apply( instance, arguments );
+				}
+	
+				// copy the guid so direct unbinding works
+				if ( typeof handler !== "string" ) {
+					handlerProxy.guid = handler.guid =
+						handler.guid || handlerProxy.guid || $.guid++;
+				}
+	
+				var match = event.match( /^(\w+)\s*(.*)$/ ),
+					eventName = match[1] + instance.eventNamespace,
+					selector = match[2];
+				if ( selector ) {
+					delegateElement.delegate( selector, eventName, handlerProxy );
+				} else {
+					element.bind( eventName, handlerProxy );
+				}
+			});
+		},
+	
+		_off: function( element, eventName ) {
+			eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
+			element.unbind( eventName ).undelegate( eventName );
+		},
+	
+		_delay: function( handler, delay ) {
+			function handlerProxy() {
+				return ( typeof handler === "string" ? instance[ handler ] : handler )
+					.apply( instance, arguments );
+			}
+			var instance = this;
+			return setTimeout( handlerProxy, delay || 0 );
+		},
+	
+		_hoverable: function( element ) {
+			this.hoverable = this.hoverable.add( element );
+			this._on( element, {
+				mouseenter: function( event ) {
+					$( event.currentTarget ).addClass( "ui-state-hover" );
+				},
+				mouseleave: function( event ) {
+					$( event.currentTarget ).removeClass( "ui-state-hover" );
+				}
+			});
+		},
+	
+		_focusable: function( element ) {
+			this.focusable = this.focusable.add( element );
+			this._on( element, {
+				focusin: function( event ) {
+					$( event.currentTarget ).addClass( "ui-state-focus" );
+				},
+				focusout: function( event ) {
+					$( event.currentTarget ).removeClass( "ui-state-focus" );
+				}
+			});
+		},
+	
+		_trigger: function( type, event, data ) {
+			var prop, orig,
+				callback = this.options[ type ];
+	
+			data = data || {};
+			event = $.Event( event );
+			event.type = ( type === this.widgetEventPrefix ?
+				type :
+				this.widgetEventPrefix + type ).toLowerCase();
+			// the original event may come from any element
+			// so we need to reset the target on the new event
+			event.target = this.element[ 0 ];
+	
+			// copy original event properties over to the new event
+			orig = event.originalEvent;
+			if ( orig ) {
+				for ( prop in orig ) {
+					if ( !( prop in event ) ) {
+						event[ prop ] = orig[ prop ];
+					}
+				}
+			}
+	
+			this.element.trigger( event, data );
+			return !( $.isFunction( callback ) &&
+				callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+				event.isDefaultPrevented() );
+		}
+	};
+	
+	$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+		$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+			if ( typeof options === "string" ) {
+				options = { effect: options };
+			}
+			var hasOptions,
+				effectName = !options ?
+					method :
+					options === true || typeof options === "number" ?
+						defaultEffect :
+						options.effect || defaultEffect;
+			options = options || {};
+			if ( typeof options === "number" ) {
+				options = { duration: options };
+			}
+			hasOptions = !$.isEmptyObject( options );
+			options.complete = callback;
+			if ( options.delay ) {
+				element.delay( options.delay );
+			}
+			if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+				element[ method ]( options );
+			} else if ( effectName !== method && element[ effectName ] ) {
+				element[ effectName ]( options.duration, options.easing, callback );
+			} else {
+				element.queue(function( next ) {
+					$( this )[ method ]();
+					if ( callback ) {
+						callback.call( element[ 0 ] );
+					}
+					next();
+				});
+			}
+		};
+	});
+	
+	})( jQuery );
+	
+	(function( $, undefined ) {
+	
+	var mouseHandled = false;
+	$( document ).mouseup( function() {
+		mouseHandled = false;
+	});
+	
+	$.widget("ui.mouse", {
+		version: "1.10.3",
+		options: {
+			cancel: "input,textarea,button,select,option",
+			distance: 1,
+			delay: 0
+		},
+		_mouseInit: function() {
+			var that = this;
+	
+			this.element
+				.bind("mousedown."+this.widgetName, function(event) {
+					return that._mouseDown(event);
+				})
+				.bind("click."+this.widgetName, function(event) {
+					if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
+						$.removeData(event.target, that.widgetName + ".preventClickEvent");
+						event.stopImmediatePropagation();
+						return false;
+					}
+				});
+	
+			this.started = false;
+		},
+	
+		// TODO: make sure destroying one instance of mouse doesn't mess with
+		// other instances of mouse
+		_mouseDestroy: function() {
+			this.element.unbind("."+this.widgetName);
+			if ( this._mouseMoveDelegate ) {
+				$(document)
+					.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+					.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+			}
+		},
+	
+		_mouseDown: function(event) {
+			// don't let more than one widget handle mouseStart
+			if( mouseHandled ) { return; }
+	
+			// we may have missed mouseup (out of window)
+			(this._mouseStarted && this._mouseUp(event));
+	
+			this._mouseDownEvent = event;
+	
+			var that = this,
+				btnIsLeft = (event.which === 1),
+				// event.target.nodeName works around a bug in IE 8 with
+				// disabled inputs (#7620)
+				elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
+			if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
+				return true;
+			}
+	
+			this.mouseDelayMet = !this.options.delay;
+			if (!this.mouseDelayMet) {
+				this._mouseDelayTimer = setTimeout(function() {
+					that.mouseDelayMet = true;
+				}, this.options.delay);
+			}
+	
+			if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+				this._mouseStarted = (this._mouseStart(event) !== false);
+				if (!this._mouseStarted) {
+					event.preventDefault();
+					return true;
+				}
+			}
+	
+			// Click event may never have fired (Gecko & Opera)
+			if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
+				$.removeData(event.target, this.widgetName + ".preventClickEvent");
+			}
+	
+			// these delegates are required to keep context
+			this._mouseMoveDelegate = function(event) {
+				return that._mouseMove(event);
+			};
+			this._mouseUpDelegate = function(event) {
+				return that._mouseUp(event);
+			};
+			$(document)
+				.bind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+				.bind("mouseup."+this.widgetName, this._mouseUpDelegate);
+	
+			event.preventDefault();
+	
+			mouseHandled = true;
+			return true;
+		},
+	
+		_mouseMove: function(event) {
+			// IE mouseup check - mouseup happened when mouse was out of window
+			if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
+				return this._mouseUp(event);
+			}
+	
+			if (this._mouseStarted) {
+				this._mouseDrag(event);
+				return event.preventDefault();
+			}
+	
+			if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
+				this._mouseStarted =
+					(this._mouseStart(this._mouseDownEvent, event) !== false);
+				(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
+			}
+	
+			return !this._mouseStarted;
+		},
+	
+		_mouseUp: function(event) {
+			$(document)
+				.unbind("mousemove."+this.widgetName, this._mouseMoveDelegate)
+				.unbind("mouseup."+this.widgetName, this._mouseUpDelegate);
+	
+			if (this._mouseStarted) {
+				this._mouseStarted = false;
+	
+				if (event.target === this._mouseDownEvent.target) {
+					$.data(event.target, this.widgetName + ".preventClickEvent", true);
+				}
+	
+				this._mouseStop(event);
+			}
+	
+			return false;
+		},
+	
+		_mouseDistanceMet: function(event) {
+			return (Math.max(
+					Math.abs(this._mouseDownEvent.pageX - event.pageX),
+					Math.abs(this._mouseDownEvent.pageY - event.pageY)
+				) >= this.options.distance
+			);
+		},
+	
+		_mouseDelayMet: function(/* event */) {
+			return this.mouseDelayMet;
+		},
+	
+		// These are placeholder methods, to be overriden by extending plugin
+		_mouseStart: function(/* event */) {},
+		_mouseDrag: function(/* event */) {},
+		_mouseStop: function(/* event */) {},
+		_mouseCapture: function(/* event */) { return true; }
+	});
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.widget("ui.draggable", $.ui.mouse, {
+		version: "1.10.3",
+		widgetEventPrefix: "drag",
+		options: {
+			addClasses: true,
+			appendTo: "parent",
+			axis: false,
+			connectToSortable: false,
+			containment: false,
+			cursor: "auto",
+			cursorAt: false,
+			grid: false,
+			handle: false,
+			helper: "original",
+			iframeFix: false,
+			opacity: false,
+			refreshPositions: false,
+			revert: false,
+			revertDuration: 500,
+			scope: "default",
+			scroll: true,
+			scrollSensitivity: 20,
+			scrollSpeed: 20,
+			snap: false,
+			snapMode: "both",
+			snapTolerance: 20,
+			stack: false,
+			zIndex: false,
+	
+			// callbacks
+			drag: null,
+			start: null,
+			stop: null
+		},
+		_create: function() {
+	
+			if (this.options.helper === "original" && !(/^(?:r|a|f)/).test(this.element.css("position"))) {
+				this.element[0].style.position = "relative";
+			}
+			if (this.options.addClasses){
+				this.element.addClass("ui-draggable");
+			}
+			if (this.options.disabled){
+				this.element.addClass("ui-draggable-disabled");
+			}
+	
+			this._mouseInit();
+	
+		},
+	
+		_destroy: function() {
+			this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" );
+			this._mouseDestroy();
+		},
+	
+		_mouseCapture: function(event) {
+	
+			var o = this.options;
+	
+			// among others, prevent a drag on a resizable-handle
+			if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) {
+				return false;
+			}
+	
+			//Quit if we're not on a valid handle
+			this.handle = this._getHandle(event);
+			if (!this.handle) {
+				return false;
+			}
+	
+			$(o.iframeFix === true ? "iframe" : o.iframeFix).each(function() {
+				$("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>")
+				.css({
+					width: this.offsetWidth+"px", height: this.offsetHeight+"px",
+					position: "absolute", opacity: "0.001", zIndex: 1000
+				})
+				.css($(this).offset())
+				.appendTo("body");
+			});
+	
+			return true;
+	
+		},
+	
+		_mouseStart: function(event) {
+	
+			var o = this.options;
+	
+			//Create and append the visible helper
+			this.helper = this._createHelper(event);
+	
+			this.helper.addClass("ui-draggable-dragging");
+	
+			//Cache the helper size
+			this._cacheHelperProportions();
+	
+			//If ddmanager is used for droppables, set the global draggable
+			if($.ui.ddmanager) {
+				$.ui.ddmanager.current = this;
+			}
+	
+			/*
+			 * - Position generation -
+			 * This block generates everything position related - it's the core of draggables.
+			 */
+	
+			//Cache the margins of the original element
+			this._cacheMargins();
+	
+			//Store the helper's css position
+			this.cssPosition = this.helper.css( "position" );
+			this.scrollParent = this.helper.scrollParent();
+			this.offsetParent = this.helper.offsetParent();
+			this.offsetParentCssPosition = this.offsetParent.css( "position" );
+	
+			//The element's absolute position on the page minus margins
+			this.offset = this.positionAbs = this.element.offset();
+			this.offset = {
+				top: this.offset.top - this.margins.top,
+				left: this.offset.left - this.margins.left
+			};
+	
+			//Reset scroll cache
+			this.offset.scroll = false;
+	
+			$.extend(this.offset, {
+				click: { //Where the click happened, relative to the element
+					left: event.pageX - this.offset.left,
+					top: event.pageY - this.offset.top
+				},
+				parent: this._getParentOffset(),
+				relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+			});
+	
+			//Generate the original position
+			this.originalPosition = this.position = this._generatePosition(event);
+			this.originalPageX = event.pageX;
+			this.originalPageY = event.pageY;
+	
+			//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+			(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+	
+			//Set a containment if given in the options
+			this._setContainment();
+	
+			//Trigger event + callbacks
+			if(this._trigger("start", event) === false) {
+				this._clear();
+				return false;
+			}
+	
+			//Recache the helper size
+			this._cacheHelperProportions();
+	
+			//Prepare the droppable offsets
+			if ($.ui.ddmanager && !o.dropBehaviour) {
+				$.ui.ddmanager.prepareOffsets(this, event);
+			}
+	
+	
+			this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+	
+			//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)
+			if ( $.ui.ddmanager ) {
+				$.ui.ddmanager.dragStart(this, event);
+			}
+	
+			return true;
+		},
+	
+		_mouseDrag: function(event, noPropagation) {
+			// reset any necessary cached properties (see #5009)
+			if ( this.offsetParentCssPosition === "fixed" ) {
+				this.offset.parent = this._getParentOffset();
+			}
+	
+			//Compute the helpers position
+			this.position = this._generatePosition(event);
+			this.positionAbs = this._convertPositionTo("absolute");
+	
+			//Call plugins and callbacks and use the resulting position if something is returned
+			if (!noPropagation) {
+				var ui = this._uiHash();
+				if(this._trigger("drag", event, ui) === false) {
+					this._mouseUp({});
+					return false;
+				}
+				this.position = ui.position;
+			}
+	
+			if(!this.options.axis || this.options.axis !== "y") {
+				this.helper[0].style.left = this.position.left+"px";
+			}
+			if(!this.options.axis || this.options.axis !== "x") {
+				this.helper[0].style.top = this.position.top+"px";
+			}
+			if($.ui.ddmanager) {
+				$.ui.ddmanager.drag(this, event);
+			}
+	
+			return false;
+		},
+	
+		_mouseStop: function(event) {
+	
+			//If we are using droppables, inform the manager about the drop
+			var that = this,
+				dropped = false;
+			if ($.ui.ddmanager && !this.options.dropBehaviour) {
+				dropped = $.ui.ddmanager.drop(this, event);
+			}
+	
+			//if a drop comes from outside (a sortable)
+			if(this.dropped) {
+				dropped = this.dropped;
+				this.dropped = false;
+			}
+	
+			//if the original element is no longer in the DOM don't bother to continue (see #8269)
+			if ( this.options.helper === "original" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {
+				return false;
+			}
+	
+			if((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {
+				$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {
+					if(that._trigger("stop", event) !== false) {
+						that._clear();
+					}
+				});
+			} else {
+				if(this._trigger("stop", event) !== false) {
+					this._clear();
+				}
+			}
+	
+			return false;
+		},
+	
+		_mouseUp: function(event) {
+			//Remove frame helpers
+			$("div.ui-draggable-iframeFix").each(function() {
+				this.parentNode.removeChild(this);
+			});
+	
+			//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)
+			if( $.ui.ddmanager ) {
+				$.ui.ddmanager.dragStop(this, event);
+			}
+	
+			return $.ui.mouse.prototype._mouseUp.call(this, event);
+		},
+	
+		cancel: function() {
+	
+			if(this.helper.is(".ui-draggable-dragging")) {
+				this._mouseUp({});
+			} else {
+				this._clear();
+			}
+	
+			return this;
+	
+		},
+	
+		_getHandle: function(event) {
+			return this.options.handle ?
+				!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
+				true;
+		},
+	
+		_createHelper: function(event) {
+	
+			var o = this.options,
+				helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === "clone" ? this.element.clone().removeAttr("id") : this.element);
+	
+			if(!helper.parents("body").length) {
+				helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo));
+			}
+	
+			if(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) {
+				helper.css("position", "absolute");
+			}
+	
+			return helper;
+	
+		},
+	
+		_adjustOffsetFromHelper: function(obj) {
+			if (typeof obj === "string") {
+				obj = obj.split(" ");
+			}
+			if ($.isArray(obj)) {
+				obj = {left: +obj[0], top: +obj[1] || 0};
+			}
+			if ("left" in obj) {
+				this.offset.click.left = obj.left + this.margins.left;
+			}
+			if ("right" in obj) {
+				this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+			}
+			if ("top" in obj) {
+				this.offset.click.top = obj.top + this.margins.top;
+			}
+			if ("bottom" in obj) {
+				this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+			}
+		},
+	
+		_getParentOffset: function() {
+	
+			//Get the offsetParent and cache its position
+			var po = this.offsetParent.offset();
+	
+			// This is a special case where we need to modify a offset calculated on start, since the following happened:
+			// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+			// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+			//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+			if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+				po.left += this.scrollParent.scrollLeft();
+				po.top += this.scrollParent.scrollTop();
+			}
+	
+			//This needs to be actually done for all browsers, since pageX/pageY includes this information
+			//Ugly IE fix
+			if((this.offsetParent[0] === document.body) ||
+				(this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
+				po = { top: 0, left: 0 };
+			}
+	
+			return {
+				top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+				left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+			};
+	
+		},
+	
+		_getRelativeOffset: function() {
+	
+			if(this.cssPosition === "relative") {
+				var p = this.element.position();
+				return {
+					top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+					left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+				};
+			} else {
+				return { top: 0, left: 0 };
+			}
+	
+		},
+	
+		_cacheMargins: function() {
+			this.margins = {
+				left: (parseInt(this.element.css("marginLeft"),10) || 0),
+				top: (parseInt(this.element.css("marginTop"),10) || 0),
+				right: (parseInt(this.element.css("marginRight"),10) || 0),
+				bottom: (parseInt(this.element.css("marginBottom"),10) || 0)
+			};
+		},
+	
+		_cacheHelperProportions: function() {
+			this.helperProportions = {
+				width: this.helper.outerWidth(),
+				height: this.helper.outerHeight()
+			};
+		},
+	
+		_setContainment: function() {
+	
+			var over, c, ce,
+				o = this.options;
+	
+			if ( !o.containment ) {
+				this.containment = null;
+				return;
+			}
+	
+			if ( o.containment === "window" ) {
+				this.containment = [
+					$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
+					$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
+					$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,
+					$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
+				];
+				return;
+			}
+	
+			if ( o.containment === "document") {
+				this.containment = [
+					0,
+					0,
+					$( document ).width() - this.helperProportions.width - this.margins.left,
+					( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top
+				];
+				return;
+			}
+	
+			if ( o.containment.constructor === Array ) {
+				this.containment = o.containment;
+				return;
+			}
+	
+			if ( o.containment === "parent" ) {
+				o.containment = this.helper[ 0 ].parentNode;
+			}
+	
+			c = $( o.containment );
+			ce = c[ 0 ];
+	
+			if( !ce ) {
+				return;
+			}
+	
+			over = c.css( "overflow" ) !== "hidden";
+	
+			this.containment = [
+				( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
+				( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ) ,
+				( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,
+				( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top  - this.margins.bottom
+			];
+			this.relative_container = c;
+		},
+	
+		_convertPositionTo: function(d, pos) {
+	
+			if(!pos) {
+				pos = this.position;
+			}
+	
+			var mod = d === "absolute" ? 1 : -1,
+				scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;
+	
+			//Cache the scroll
+			if (!this.offset.scroll) {
+				this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
+			}
+	
+			return {
+				top: (
+					pos.top	+																// The absolute mouse position
+					this.offset.relative.top * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.top * mod -										// The offsetParent's offset without borders (offset + border)
+					( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )
+				),
+				left: (
+					pos.left +																// The absolute mouse position
+					this.offset.relative.left * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.left * mod	-										// The offsetParent's offset without borders (offset + border)
+					( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )
+				)
+			};
+	
+		},
+	
+		_generatePosition: function(event) {
+	
+			var containment, co, top, left,
+				o = this.options,
+				scroll = this.cssPosition === "absolute" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,
+				pageX = event.pageX,
+				pageY = event.pageY;
+	
+			//Cache the scroll
+			if (!this.offset.scroll) {
+				this.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};
+			}
+	
+			/*
+			 * - Position constraining -
+			 * Constrain the position to a mix of grid, containment.
+			 */
+	
+			// If we are not dragging yet, we won't check for options
+			if ( this.originalPosition ) {
+				if ( this.containment ) {
+					if ( this.relative_container ){
+						co = this.relative_container.offset();
+						containment = [
+							this.containment[ 0 ] + co.left,
+							this.containment[ 1 ] + co.top,
+							this.containment[ 2 ] + co.left,
+							this.containment[ 3 ] + co.top
+						];
+					}
+					else {
+						containment = this.containment;
+					}
+	
+					if(event.pageX - this.offset.click.left < containment[0]) {
+						pageX = containment[0] + this.offset.click.left;
+					}
+					if(event.pageY - this.offset.click.top < containment[1]) {
+						pageY = containment[1] + this.offset.click.top;
+					}
+					if(event.pageX - this.offset.click.left > containment[2]) {
+						pageX = containment[2] + this.offset.click.left;
+					}
+					if(event.pageY - this.offset.click.top > containment[3]) {
+						pageY = containment[3] + this.offset.click.top;
+					}
+				}
+	
+				if(o.grid) {
+					//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)
+					top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;
+					pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+	
+					left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;
+					pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+				}
+	
+			}
+	
+			return {
+				top: (
+					pageY -																	// The absolute mouse position
+					this.offset.click.top	-												// Click offset (relative to the element)
+					this.offset.relative.top -												// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.top +												// The offsetParent's offset without borders (offset + border)
+					( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )
+				),
+				left: (
+					pageX -																	// The absolute mouse position
+					this.offset.click.left -												// Click offset (relative to the element)
+					this.offset.relative.left -												// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.left +												// The offsetParent's offset without borders (offset + border)
+					( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )
+				)
+			};
+	
+		},
+	
+		_clear: function() {
+			this.helper.removeClass("ui-draggable-dragging");
+			if(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {
+				this.helper.remove();
+			}
+			this.helper = null;
+			this.cancelHelperRemoval = false;
+		},
+	
+		// From now on bulk stuff - mainly helpers
+	
+		_trigger: function(type, event, ui) {
+			ui = ui || this._uiHash();
+			$.ui.plugin.call(this, type, [event, ui]);
+			//The absolute position has to be recalculated after plugins
+			if(type === "drag") {
+				this.positionAbs = this._convertPositionTo("absolute");
+			}
+			return $.Widget.prototype._trigger.call(this, type, event, ui);
+		},
+	
+		plugins: {},
+	
+		_uiHash: function() {
+			return {
+				helper: this.helper,
+				position: this.position,
+				originalPosition: this.originalPosition,
+				offset: this.positionAbs
+			};
+		}
+	
+	});
+	
+	$.ui.plugin.add("draggable", "connectToSortable", {
+		start: function(event, ui) {
+	
+			var inst = $(this).data("ui-draggable"), o = inst.options,
+				uiSortable = $.extend({}, ui, { item: inst.element });
+			inst.sortables = [];
+			$(o.connectToSortable).each(function() {
+				var sortable = $.data(this, "ui-sortable");
+				if (sortable && !sortable.options.disabled) {
+					inst.sortables.push({
+						instance: sortable,
+						shouldRevert: sortable.options.revert
+					});
+					sortable.refreshPositions();	// Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).
+					sortable._trigger("activate", event, uiSortable);
+				}
+			});
+	
+		},
+		stop: function(event, ui) {
+	
+			//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper
+			var inst = $(this).data("ui-draggable"),
+				uiSortable = $.extend({}, ui, { item: inst.element });
+	
+			$.each(inst.sortables, function() {
+				if(this.instance.isOver) {
+	
+					this.instance.isOver = 0;
+	
+					inst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance
+					this.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)
+	
+					//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: "valid/invalid"
+					if(this.shouldRevert) {
+						this.instance.options.revert = this.shouldRevert;
+					}
+	
+					//Trigger the stop of the sortable
+					this.instance._mouseStop(event);
+	
+					this.instance.options.helper = this.instance.options._helper;
+	
+					//If the helper has been the original item, restore properties in the sortable
+					if(inst.options.helper === "original") {
+						this.instance.currentItem.css({ top: "auto", left: "auto" });
+					}
+	
+				} else {
+					this.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance
+					this.instance._trigger("deactivate", event, uiSortable);
+				}
+	
+			});
+	
+		},
+		drag: function(event, ui) {
+	
+			var inst = $(this).data("ui-draggable"), that = this;
+	
+			$.each(inst.sortables, function() {
+	
+				var innermostIntersecting = false,
+					thisSortable = this;
+	
+				//Copy over some variables to allow calling the sortable's native _intersectsWith
+				this.instance.positionAbs = inst.positionAbs;
+				this.instance.helperProportions = inst.helperProportions;
+				this.instance.offset.click = inst.offset.click;
+	
+				if(this.instance._intersectsWith(this.instance.containerCache)) {
+					innermostIntersecting = true;
+					$.each(inst.sortables, function () {
+						this.instance.positionAbs = inst.positionAbs;
+						this.instance.helperProportions = inst.helperProportions;
+						this.instance.offset.click = inst.offset.click;
+						if (this !== thisSortable &&
+							this.instance._intersectsWith(this.instance.containerCache) &&
+							$.contains(thisSortable.instance.element[0], this.instance.element[0])
+						) {
+							innermostIntersecting = false;
+						}
+						return innermostIntersecting;
+					});
+				}
+	
+	
+				if(innermostIntersecting) {
+					//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once
+					if(!this.instance.isOver) {
+	
+						this.instance.isOver = 1;
+						//Now we fake the start of dragging for the sortable instance,
+						//by cloning the list group item, appending it to the sortable and using it as inst.currentItem
+						//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)
+						this.instance.currentItem = $(that).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item", true);
+						this.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it
+						this.instance.options.helper = function() { return ui.helper[0]; };
+	
+						event.target = this.instance.currentItem[0];
+						this.instance._mouseCapture(event, true);
+						this.instance._mouseStart(event, true, true);
+	
+						//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes
+						this.instance.offset.click.top = inst.offset.click.top;
+						this.instance.offset.click.left = inst.offset.click.left;
+						this.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;
+						this.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;
+	
+						inst._trigger("toSortable", event);
+						inst.dropped = this.instance.element; //draggable revert needs that
+						//hack so receive/update callbacks work (mostly)
+						inst.currentItem = inst.element;
+						this.instance.fromOutside = inst;
+	
+					}
+	
+					//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable
+					if(this.instance.currentItem) {
+						this.instance._mouseDrag(event);
+					}
+	
+				} else {
+	
+					//If it doesn't intersect with the sortable, and it intersected before,
+					//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval
+					if(this.instance.isOver) {
+	
+						this.instance.isOver = 0;
+						this.instance.cancelHelperRemoval = true;
+	
+						//Prevent reverting on this forced stop
+						this.instance.options.revert = false;
+	
+						// The out event needs to be triggered independently
+						this.instance._trigger("out", event, this.instance._uiHash(this.instance));
+	
+						this.instance._mouseStop(event, true);
+						this.instance.options.helper = this.instance.options._helper;
+	
+						//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size
+						this.instance.currentItem.remove();
+						if(this.instance.placeholder) {
+							this.instance.placeholder.remove();
+						}
+	
+						inst._trigger("fromSortable", event);
+						inst.dropped = false; //draggable revert needs that
+					}
+	
+				}
+	
+			});
+	
+		}
+	});
+	
+	$.ui.plugin.add("draggable", "cursor", {
+		start: function() {
+			var t = $("body"), o = $(this).data("ui-draggable").options;
+			if (t.css("cursor")) {
+				o._cursor = t.css("cursor");
+			}
+			t.css("cursor", o.cursor);
+		},
+		stop: function() {
+			var o = $(this).data("ui-draggable").options;
+			if (o._cursor) {
+				$("body").css("cursor", o._cursor);
+			}
+		}
+	});
+	
+	$.ui.plugin.add("draggable", "opacity", {
+		start: function(event, ui) {
+			var t = $(ui.helper), o = $(this).data("ui-draggable").options;
+			if(t.css("opacity")) {
+				o._opacity = t.css("opacity");
+			}
+			t.css("opacity", o.opacity);
+		},
+		stop: function(event, ui) {
+			var o = $(this).data("ui-draggable").options;
+			if(o._opacity) {
+				$(ui.helper).css("opacity", o._opacity);
+			}
+		}
+	});
+	
+	$.ui.plugin.add("draggable", "scroll", {
+		start: function() {
+			var i = $(this).data("ui-draggable");
+			if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
+				i.overflowOffset = i.scrollParent.offset();
+			}
+		},
+		drag: function( event ) {
+	
+			var i = $(this).data("ui-draggable"), o = i.options, scrolled = false;
+	
+			if(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== "HTML") {
+	
+				if(!o.axis || o.axis !== "x") {
+					if((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
+						i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
+					} else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
+						i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+					}
+				}
+	
+				if(!o.axis || o.axis !== "y") {
+					if((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
+						i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
+					} else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
+						i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+					}
+				}
+	
+			} else {
+	
+				if(!o.axis || o.axis !== "x") {
+					if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
+						scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+					} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
+						scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+					}
+				}
+	
+				if(!o.axis || o.axis !== "y") {
+					if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
+						scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+					} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
+						scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+					}
+				}
+	
+			}
+	
+			if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
+				$.ui.ddmanager.prepareOffsets(i, event);
+			}
+	
+		}
+	});
+	
+	$.ui.plugin.add("draggable", "snap", {
+		start: function() {
+	
+			var i = $(this).data("ui-draggable"),
+				o = i.options;
+	
+			i.snapElements = [];
+	
+			$(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() {
+				var $t = $(this),
+					$o = $t.offset();
+				if(this !== i.element[0]) {
+					i.snapElements.push({
+						item: this,
+						width: $t.outerWidth(), height: $t.outerHeight(),
+						top: $o.top, left: $o.left
+					});
+				}
+			});
+	
+		},
+		drag: function(event, ui) {
+	
+			var ts, bs, ls, rs, l, r, t, b, i, first,
+				inst = $(this).data("ui-draggable"),
+				o = inst.options,
+				d = o.snapTolerance,
+				x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
+				y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
+	
+			for (i = inst.snapElements.length - 1; i >= 0; i--){
+	
+				l = inst.snapElements[i].left;
+				r = l + inst.snapElements[i].width;
+				t = inst.snapElements[i].top;
+				b = t + inst.snapElements[i].height;
+	
+				if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {
+					if(inst.snapElements[i].snapping) {
+						(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+					}
+					inst.snapElements[i].snapping = false;
+					continue;
+				}
+	
+				if(o.snapMode !== "inner") {
+					ts = Math.abs(t - y2) <= d;
+					bs = Math.abs(b - y1) <= d;
+					ls = Math.abs(l - x2) <= d;
+					rs = Math.abs(r - x1) <= d;
+					if(ts) {
+						ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+					}
+					if(bs) {
+						ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top - inst.margins.top;
+					}
+					if(ls) {
+						ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;
+					}
+					if(rs) {
+						ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left - inst.margins.left;
+					}
+				}
+	
+				first = (ts || bs || ls || rs);
+	
+				if(o.snapMode !== "outer") {
+					ts = Math.abs(t - y1) <= d;
+					bs = Math.abs(b - y2) <= d;
+					ls = Math.abs(l - x1) <= d;
+					rs = Math.abs(r - x2) <= d;
+					if(ts) {
+						ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top - inst.margins.top;
+					}
+					if(bs) {
+						ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;
+					}
+					if(ls) {
+						ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left - inst.margins.left;
+					}
+					if(rs) {
+						ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;
+					}
+				}
+	
+				if(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {
+					(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));
+				}
+				inst.snapElements[i].snapping = (ts || bs || ls || rs || first);
+	
+			}
+	
+		}
+	});
+	
+	$.ui.plugin.add("draggable", "stack", {
+		start: function() {
+			var min,
+				o = this.data("ui-draggable").options,
+				group = $.makeArray($(o.stack)).sort(function(a,b) {
+					return (parseInt($(a).css("zIndex"),10) || 0) - (parseInt($(b).css("zIndex"),10) || 0);
+				});
+	
+			if (!group.length) { return; }
+	
+			min = parseInt($(group[0]).css("zIndex"), 10) || 0;
+			$(group).each(function(i) {
+				$(this).css("zIndex", min + i);
+			});
+			this.css("zIndex", (min + group.length));
+		}
+	});
+	
+	$.ui.plugin.add("draggable", "zIndex", {
+		start: function(event, ui) {
+			var t = $(ui.helper), o = $(this).data("ui-draggable").options;
+			if(t.css("zIndex")) {
+				o._zIndex = t.css("zIndex");
+			}
+			t.css("zIndex", o.zIndex);
+		},
+		stop: function(event, ui) {
+			var o = $(this).data("ui-draggable").options;
+			if(o._zIndex) {
+				$(ui.helper).css("zIndex", o._zIndex);
+			}
+		}
+	});
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	function isOverAxis( x, reference, size ) {
+		return ( x > reference ) && ( x < ( reference + size ) );
+	}
+	
+	$.widget("ui.droppable", {
+		version: "1.10.3",
+		widgetEventPrefix: "drop",
+		options: {
+			accept: "*",
+			activeClass: false,
+			addClasses: true,
+			greedy: false,
+			hoverClass: false,
+			scope: "default",
+			tolerance: "intersect",
+	
+			// callbacks
+			activate: null,
+			deactivate: null,
+			drop: null,
+			out: null,
+			over: null
+		},
+		_create: function() {
+	
+			var o = this.options,
+				accept = o.accept;
+	
+			this.isover = false;
+			this.isout = true;
+	
+			this.accept = $.isFunction(accept) ? accept : function(d) {
+				return d.is(accept);
+			};
+	
+			//Store the droppable's proportions
+			this.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };
+	
+			// Add the reference and positions to the manager
+			$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];
+			$.ui.ddmanager.droppables[o.scope].push(this);
+	
+			(o.addClasses && this.element.addClass("ui-droppable"));
+	
+		},
+	
+		_destroy: function() {
+			var i = 0,
+				drop = $.ui.ddmanager.droppables[this.options.scope];
+	
+			for ( ; i < drop.length; i++ ) {
+				if ( drop[i] === this ) {
+					drop.splice(i, 1);
+				}
+			}
+	
+			this.element.removeClass("ui-droppable ui-droppable-disabled");
+		},
+	
+		_setOption: function(key, value) {
+	
+			if(key === "accept") {
+				this.accept = $.isFunction(value) ? value : function(d) {
+					return d.is(value);
+				};
+			}
+			$.Widget.prototype._setOption.apply(this, arguments);
+		},
+	
+		_activate: function(event) {
+			var draggable = $.ui.ddmanager.current;
+			if(this.options.activeClass) {
+				this.element.addClass(this.options.activeClass);
+			}
+			if(draggable){
+				this._trigger("activate", event, this.ui(draggable));
+			}
+		},
+	
+		_deactivate: function(event) {
+			var draggable = $.ui.ddmanager.current;
+			if(this.options.activeClass) {
+				this.element.removeClass(this.options.activeClass);
+			}
+			if(draggable){
+				this._trigger("deactivate", event, this.ui(draggable));
+			}
+		},
+	
+		_over: function(event) {
+	
+			var draggable = $.ui.ddmanager.current;
+	
+			// Bail if draggable and droppable are same element
+			if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+				return;
+			}
+	
+			if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+				if(this.options.hoverClass) {
+					this.element.addClass(this.options.hoverClass);
+				}
+				this._trigger("over", event, this.ui(draggable));
+			}
+	
+		},
+	
+		_out: function(event) {
+	
+			var draggable = $.ui.ddmanager.current;
+	
+			// Bail if draggable and droppable are same element
+			if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+				return;
+			}
+	
+			if (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+				if(this.options.hoverClass) {
+					this.element.removeClass(this.options.hoverClass);
+				}
+				this._trigger("out", event, this.ui(draggable));
+			}
+	
+		},
+	
+		_drop: function(event,custom) {
+	
+			var draggable = custom || $.ui.ddmanager.current,
+				childrenIntersection = false;
+	
+			// Bail if draggable and droppable are same element
+			if (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {
+				return false;
+			}
+	
+			this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function() {
+				var inst = $.data(this, "ui-droppable");
+				if(
+					inst.options.greedy &&
+					!inst.options.disabled &&
+					inst.options.scope === draggable.options.scope &&
+					inst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&
+					$.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)
+				) { childrenIntersection = true; return false; }
+			});
+			if(childrenIntersection) {
+				return false;
+			}
+	
+			if(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+				if(this.options.activeClass) {
+					this.element.removeClass(this.options.activeClass);
+				}
+				if(this.options.hoverClass) {
+					this.element.removeClass(this.options.hoverClass);
+				}
+				this._trigger("drop", event, this.ui(draggable));
+				return this.element;
+			}
+	
+			return false;
+	
+		},
+	
+		ui: function(c) {
+			return {
+				draggable: (c.currentItem || c.element),
+				helper: c.helper,
+				position: c.position,
+				offset: c.positionAbs
+			};
+		}
+	
+	});
+	
+	$.ui.intersect = function(draggable, droppable, toleranceMode) {
+	
+		if (!droppable.offset) {
+			return false;
+		}
+	
+		var draggableLeft, draggableTop,
+			x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
+			y1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,
+			l = droppable.offset.left, r = l + droppable.proportions.width,
+			t = droppable.offset.top, b = t + droppable.proportions.height;
+	
+		switch (toleranceMode) {
+			case "fit":
+				return (l <= x1 && x2 <= r && t <= y1 && y2 <= b);
+			case "intersect":
+				return (l < x1 + (draggable.helperProportions.width / 2) && // Right Half
+					x2 - (draggable.helperProportions.width / 2) < r && // Left Half
+					t < y1 + (draggable.helperProportions.height / 2) && // Bottom Half
+					y2 - (draggable.helperProportions.height / 2) < b ); // Top Half
+			case "pointer":
+				draggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);
+				draggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);
+				return isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );
+			case "touch":
+				return (
+					(y1 >= t && y1 <= b) ||	// Top edge touching
+					(y2 >= t && y2 <= b) ||	// Bottom edge touching
+					(y1 < t && y2 > b)		// Surrounded vertically
+				) && (
+					(x1 >= l && x1 <= r) ||	// Left edge touching
+					(x2 >= l && x2 <= r) ||	// Right edge touching
+					(x1 < l && x2 > r)		// Surrounded horizontally
+				);
+			default:
+				return false;
+			}
+	
+	};
+	
+	/*
+		This manager tracks offsets of draggables and droppables
+	*/
+	$.ui.ddmanager = {
+		current: null,
+		droppables: { "default": [] },
+		prepareOffsets: function(t, event) {
+	
+			var i, j,
+				m = $.ui.ddmanager.droppables[t.options.scope] || [],
+				type = event ? event.type : null, // workaround for #2317
+				list = (t.currentItem || t.element).find(":data(ui-droppable)").addBack();
+	
+			droppablesLoop: for (i = 0; i < m.length; i++) {
+	
+				//No disabled and non-accepted
+				if(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {
+					continue;
+				}
+	
+				// Filter out elements in the current dragged item
+				for (j=0; j < list.length; j++) {
+					if(list[j] === m[i].element[0]) {
+						m[i].proportions.height = 0;
+						continue droppablesLoop;
+					}
+				}
+	
+				m[i].visible = m[i].element.css("display") !== "none";
+				if(!m[i].visible) {
+					continue;
+				}
+	
+				//Activate the droppable if used directly from draggables
+				if(type === "mousedown") {
+					m[i]._activate.call(m[i], event);
+				}
+	
+				m[i].offset = m[i].element.offset();
+				m[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };
+	
+			}
+	
+		},
+		drop: function(draggable, event) {
+	
+			var dropped = false;
+			// Create a copy of the droppables in case the list changes during the drop (#9116)
+			$.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {
+	
+				if(!this.options) {
+					return;
+				}
+				if (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {
+					dropped = this._drop.call(this, event) || dropped;
+				}
+	
+				if (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {
+					this.isout = true;
+					this.isover = false;
+					this._deactivate.call(this, event);
+				}
+	
+			});
+			return dropped;
+	
+		},
+		dragStart: function( draggable, event ) {
+			//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)
+			draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() {
+				if( !draggable.options.refreshPositions ) {
+					$.ui.ddmanager.prepareOffsets( draggable, event );
+				}
+			});
+		},
+		drag: function(draggable, event) {
+	
+			//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.
+			if(draggable.options.refreshPositions) {
+				$.ui.ddmanager.prepareOffsets(draggable, event);
+			}
+	
+			//Run through all droppables and check their positions based on specific tolerance options
+			$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {
+	
+				if(this.options.disabled || this.greedyChild || !this.visible) {
+					return;
+				}
+	
+				var parentInstance, scope, parent,
+					intersects = $.ui.intersect(draggable, this, this.options.tolerance),
+					c = !intersects && this.isover ? "isout" : (intersects && !this.isover ? "isover" : null);
+				if(!c) {
+					return;
+				}
+	
+				if (this.options.greedy) {
+					// find droppable parents with same scope
+					scope = this.options.scope;
+					parent = this.element.parents(":data(ui-droppable)").filter(function () {
+						return $.data(this, "ui-droppable").options.scope === scope;
+					});
+	
+					if (parent.length) {
+						parentInstance = $.data(parent[0], "ui-droppable");
+						parentInstance.greedyChild = (c === "isover");
+					}
+				}
+	
+				// we just moved into a greedy child
+				if (parentInstance && c === "isover") {
+					parentInstance.isover = false;
+					parentInstance.isout = true;
+					parentInstance._out.call(parentInstance, event);
+				}
+	
+				this[c] = true;
+				this[c === "isout" ? "isover" : "isout"] = false;
+				this[c === "isover" ? "_over" : "_out"].call(this, event);
+	
+				// we just moved out of a greedy child
+				if (parentInstance && c === "isout") {
+					parentInstance.isout = false;
+					parentInstance.isover = true;
+					parentInstance._over.call(parentInstance, event);
+				}
+			});
+	
+		},
+		dragStop: function( draggable, event ) {
+			draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" );
+			//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)
+			if( !draggable.options.refreshPositions ) {
+				$.ui.ddmanager.prepareOffsets( draggable, event );
+			}
+		}
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	function num(v) {
+		return parseInt(v, 10) || 0;
+	}
+	
+	function isNumber(value) {
+		return !isNaN(parseInt(value, 10));
+	}
+	
+	$.widget("ui.resizable", $.ui.mouse, {
+		version: "1.10.3",
+		widgetEventPrefix: "resize",
+		options: {
+			alsoResize: false,
+			animate: false,
+			animateDuration: "slow",
+			animateEasing: "swing",
+			aspectRatio: false,
+			autoHide: false,
+			containment: false,
+			ghost: false,
+			grid: false,
+			handles: "e,s,se",
+			helper: false,
+			maxHeight: null,
+			maxWidth: null,
+			minHeight: 10,
+			minWidth: 10,
+			// See #7960
+			zIndex: 90,
+	
+			// callbacks
+			resize: null,
+			start: null,
+			stop: null
+		},
+		_create: function() {
+	
+			var n, i, handle, axis, hname,
+				that = this,
+				o = this.options;
+			this.element.addClass("ui-resizable");
+	
+			$.extend(this, {
+				_aspectRatio: !!(o.aspectRatio),
+				aspectRatio: o.aspectRatio,
+				originalElement: this.element,
+				_proportionallyResizeElements: [],
+				_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
+			});
+	
+			//Wrap the element if it cannot hold child nodes
+			if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
+	
+				//Create a wrapper element and set the wrapper to the new current internal element
+				this.element.wrap(
+					$("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
+						position: this.element.css("position"),
+						width: this.element.outerWidth(),
+						height: this.element.outerHeight(),
+						top: this.element.css("top"),
+						left: this.element.css("left")
+					})
+				);
+	
+				//Overwrite the original this.element
+				this.element = this.element.parent().data(
+					"ui-resizable", this.element.data("ui-resizable")
+				);
+	
+				this.elementIsWrapper = true;
+	
+				//Move margins to the wrapper
+				this.element.css({ marginLeft: this.originalElement.css("marginLeft"), marginTop: this.originalElement.css("marginTop"), marginRight: this.originalElement.css("marginRight"), marginBottom: this.originalElement.css("marginBottom") });
+				this.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});
+	
+				//Prevent Safari textarea resize
+				this.originalResizeStyle = this.originalElement.css("resize");
+				this.originalElement.css("resize", "none");
+	
+				//Push the actual element to our proportionallyResize internal array
+				this._proportionallyResizeElements.push(this.originalElement.css({ position: "static", zoom: 1, display: "block" }));
+	
+				// avoid IE jump (hard set the margin)
+				this.originalElement.css({ margin: this.originalElement.css("margin") });
+	
+				// fix handlers offset
+				this._proportionallyResize();
+	
+			}
+	
+			this.handles = o.handles || (!$(".ui-resizable-handle", this.element).length ? "e,s,se" : { n: ".ui-resizable-n", e: ".ui-resizable-e", s: ".ui-resizable-s", w: ".ui-resizable-w", se: ".ui-resizable-se", sw: ".ui-resizable-sw", ne: ".ui-resizable-ne", nw: ".ui-resizable-nw" });
+			if(this.handles.constructor === String) {
+	
+				if ( this.handles === "all") {
+					this.handles = "n,e,s,w,se,sw,ne,nw";
+				}
+	
+				n = this.handles.split(",");
+				this.handles = {};
+	
+				for(i = 0; i < n.length; i++) {
+	
+					handle = $.trim(n[i]);
+					hname = "ui-resizable-"+handle;
+					axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
+	
+					// Apply zIndex to all handles - see #7960
+					axis.css({ zIndex: o.zIndex });
+	
+					//TODO : What's going on here?
+					if ("se" === handle) {
+						axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
+					}
+	
+					//Insert into internal handles object and append to element
+					this.handles[handle] = ".ui-resizable-"+handle;
+					this.element.append(axis);
+				}
+	
+			}
+	
+			this._renderAxis = function(target) {
+	
+				var i, axis, padPos, padWrapper;
+	
+				target = target || this.element;
+	
+				for(i in this.handles) {
+	
+					if(this.handles[i].constructor === String) {
+						this.handles[i] = $(this.handles[i], this.element).show();
+					}
+	
+					//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)
+					if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
+	
+						axis = $(this.handles[i], this.element);
+	
+						//Checking the correct pad and border
+						padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
+	
+						//The padding type i have to apply...
+						padPos = [ "padding",
+							/ne|nw|n/.test(i) ? "Top" :
+							/se|sw|s/.test(i) ? "Bottom" :
+							/^e$/.test(i) ? "Right" : "Left" ].join("");
+	
+						target.css(padPos, padWrapper);
+	
+						this._proportionallyResize();
+	
+					}
+	
+					//TODO: What's that good for? There's not anything to be executed left
+					if(!$(this.handles[i]).length) {
+						continue;
+					}
+				}
+			};
+	
+			//TODO: make renderAxis a prototype function
+			this._renderAxis(this.element);
+	
+			this._handles = $(".ui-resizable-handle", this.element)
+				.disableSelection();
+	
+			//Matching axis name
+			this._handles.mouseover(function() {
+				if (!that.resizing) {
+					if (this.className) {
+						axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
+					}
+					//Axis, default = se
+					that.axis = axis && axis[1] ? axis[1] : "se";
+				}
+			});
+	
+			//If we want to auto hide the elements
+			if (o.autoHide) {
+				this._handles.hide();
+				$(this.element)
+					.addClass("ui-resizable-autohide")
+					.mouseenter(function() {
+						if (o.disabled) {
+							return;
+						}
+						$(this).removeClass("ui-resizable-autohide");
+						that._handles.show();
+					})
+					.mouseleave(function(){
+						if (o.disabled) {
+							return;
+						}
+						if (!that.resizing) {
+							$(this).addClass("ui-resizable-autohide");
+							that._handles.hide();
+						}
+					});
+			}
+	
+			//Initialize the mouse interaction
+			this._mouseInit();
+	
+		},
+	
+		_destroy: function() {
+	
+			this._mouseDestroy();
+	
+			var wrapper,
+				_destroy = function(exp) {
+					$(exp).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
+						.removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove();
+				};
+	
+			//TODO: Unwrap at same DOM position
+			if (this.elementIsWrapper) {
+				_destroy(this.element);
+				wrapper = this.element;
+				this.originalElement.css({
+					position: wrapper.css("position"),
+					width: wrapper.outerWidth(),
+					height: wrapper.outerHeight(),
+					top: wrapper.css("top"),
+					left: wrapper.css("left")
+				}).insertAfter( wrapper );
+				wrapper.remove();
+			}
+	
+			this.originalElement.css("resize", this.originalResizeStyle);
+			_destroy(this.originalElement);
+	
+			return this;
+		},
+	
+		_mouseCapture: function(event) {
+			var i, handle,
+				capture = false;
+	
+			for (i in this.handles) {
+				handle = $(this.handles[i])[0];
+				if (handle === event.target || $.contains(handle, event.target)) {
+					capture = true;
+				}
+			}
+	
+			return !this.options.disabled && capture;
+		},
+	
+		_mouseStart: function(event) {
+	
+			var curleft, curtop, cursor,
+				o = this.options,
+				iniPos = this.element.position(),
+				el = this.element;
+	
+			this.resizing = true;
+	
+			// bugfix for http://dev.jquery.com/ticket/1749
+			if ( (/absolute/).test( el.css("position") ) ) {
+				el.css({ position: "absolute", top: el.css("top"), left: el.css("left") });
+			} else if (el.is(".ui-draggable")) {
+				el.css({ position: "absolute", top: iniPos.top, left: iniPos.left });
+			}
+	
+			this._renderProxy();
+	
+			curleft = num(this.helper.css("left"));
+			curtop = num(this.helper.css("top"));
+	
+			if (o.containment) {
+				curleft += $(o.containment).scrollLeft() || 0;
+				curtop += $(o.containment).scrollTop() || 0;
+			}
+	
+			//Store needed variables
+			this.offset = this.helper.offset();
+			this.position = { left: curleft, top: curtop };
+			this.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+			this.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };
+			this.originalPosition = { left: curleft, top: curtop };
+			this.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };
+			this.originalMousePosition = { left: event.pageX, top: event.pageY };
+	
+			//Aspect Ratio
+			this.aspectRatio = (typeof o.aspectRatio === "number") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);
+	
+			cursor = $(".ui-resizable-" + this.axis).css("cursor");
+			$("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
+	
+			el.addClass("ui-resizable-resizing");
+			this._propagate("start", event);
+			return true;
+		},
+	
+		_mouseDrag: function(event) {
+	
+			//Increase performance, avoid regex
+			var data,
+				el = this.helper, props = {},
+				smp = this.originalMousePosition,
+				a = this.axis,
+				prevTop = this.position.top,
+				prevLeft = this.position.left,
+				prevWidth = this.size.width,
+				prevHeight = this.size.height,
+				dx = (event.pageX-smp.left)||0,
+				dy = (event.pageY-smp.top)||0,
+				trigger = this._change[a];
+	
+			if (!trigger) {
+				return false;
+			}
+	
+			// Calculate the attrs that will be change
+			data = trigger.apply(this, [event, dx, dy]);
+	
+			// Put this in the mouseDrag handler since the user can start pressing shift while resizing
+			this._updateVirtualBoundaries(event.shiftKey);
+			if (this._aspectRatio || event.shiftKey) {
+				data = this._updateRatio(data, event);
+			}
+	
+			data = this._respectSize(data, event);
+	
+			this._updateCache(data);
+	
+			// plugins callbacks need to be called first
+			this._propagate("resize", event);
+	
+			if (this.position.top !== prevTop) {
+				props.top = this.position.top + "px";
+			}
+			if (this.position.left !== prevLeft) {
+				props.left = this.position.left + "px";
+			}
+			if (this.size.width !== prevWidth) {
+				props.width = this.size.width + "px";
+			}
+			if (this.size.height !== prevHeight) {
+				props.height = this.size.height + "px";
+			}
+			el.css(props);
+	
+			if (!this._helper && this._proportionallyResizeElements.length) {
+				this._proportionallyResize();
+			}
+	
+			// Call the user callback if the element was resized
+			if ( ! $.isEmptyObject(props) ) {
+				this._trigger("resize", event, this.ui());
+			}
+	
+			return false;
+		},
+	
+		_mouseStop: function(event) {
+	
+			this.resizing = false;
+			var pr, ista, soffseth, soffsetw, s, left, top,
+				o = this.options, that = this;
+	
+			if(this._helper) {
+	
+				pr = this._proportionallyResizeElements;
+				ista = pr.length && (/textarea/i).test(pr[0].nodeName);
+				soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height;
+				soffsetw = ista ? 0 : that.sizeDiff.width;
+	
+				s = { width: (that.helper.width()  - soffsetw), height: (that.helper.height() - soffseth) };
+				left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null;
+				top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
+	
+				if (!o.animate) {
+					this.element.css($.extend(s, { top: top, left: left }));
+				}
+	
+				that.helper.height(that.size.height);
+				that.helper.width(that.size.width);
+	
+				if (this._helper && !o.animate) {
+					this._proportionallyResize();
+				}
+			}
+	
+			$("body").css("cursor", "auto");
+	
+			this.element.removeClass("ui-resizable-resizing");
+	
+			this._propagate("stop", event);
+	
+			if (this._helper) {
+				this.helper.remove();
+			}
+	
+			return false;
+	
+		},
+	
+		_updateVirtualBoundaries: function(forceAspectRatio) {
+			var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
+				o = this.options;
+	
+			b = {
+				minWidth: isNumber(o.minWidth) ? o.minWidth : 0,
+				maxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,
+				minHeight: isNumber(o.minHeight) ? o.minHeight : 0,
+				maxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity
+			};
+	
+			if(this._aspectRatio || forceAspectRatio) {
+				// We want to create an enclosing box whose aspect ration is the requested one
+				// First, compute the "projected" size for each dimension based on the aspect ratio and other dimension
+				pMinWidth = b.minHeight * this.aspectRatio;
+				pMinHeight = b.minWidth / this.aspectRatio;
+				pMaxWidth = b.maxHeight * this.aspectRatio;
+				pMaxHeight = b.maxWidth / this.aspectRatio;
+	
+				if(pMinWidth > b.minWidth) {
+					b.minWidth = pMinWidth;
+				}
+				if(pMinHeight > b.minHeight) {
+					b.minHeight = pMinHeight;
+				}
+				if(pMaxWidth < b.maxWidth) {
+					b.maxWidth = pMaxWidth;
+				}
+				if(pMaxHeight < b.maxHeight) {
+					b.maxHeight = pMaxHeight;
+				}
+			}
+			this._vBoundaries = b;
+		},
+	
+		_updateCache: function(data) {
+			this.offset = this.helper.offset();
+			if (isNumber(data.left)) {
+				this.position.left = data.left;
+			}
+			if (isNumber(data.top)) {
+				this.position.top = data.top;
+			}
+			if (isNumber(data.height)) {
+				this.size.height = data.height;
+			}
+			if (isNumber(data.width)) {
+				this.size.width = data.width;
+			}
+		},
+	
+		_updateRatio: function( data ) {
+	
+			var cpos = this.position,
+				csize = this.size,
+				a = this.axis;
+	
+			if (isNumber(data.height)) {
+				data.width = (data.height * this.aspectRatio);
+			} else if (isNumber(data.width)) {
+				data.height = (data.width / this.aspectRatio);
+			}
+	
+			if (a === "sw") {
+				data.left = cpos.left + (csize.width - data.width);
+				data.top = null;
+			}
+			if (a === "nw") {
+				data.top = cpos.top + (csize.height - data.height);
+				data.left = cpos.left + (csize.width - data.width);
+			}
+	
+			return data;
+		},
+	
+		_respectSize: function( data ) {
+	
+			var o = this._vBoundaries,
+				a = this.axis,
+				ismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
+				isminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
+				dw = this.originalPosition.left + this.originalSize.width,
+				dh = this.position.top + this.size.height,
+				cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
+			if (isminw) {
+				data.width = o.minWidth;
+			}
+			if (isminh) {
+				data.height = o.minHeight;
+			}
+			if (ismaxw) {
+				data.width = o.maxWidth;
+			}
+			if (ismaxh) {
+				data.height = o.maxHeight;
+			}
+	
+			if (isminw && cw) {
+				data.left = dw - o.minWidth;
+			}
+			if (ismaxw && cw) {
+				data.left = dw - o.maxWidth;
+			}
+			if (isminh && ch) {
+				data.top = dh - o.minHeight;
+			}
+			if (ismaxh && ch) {
+				data.top = dh - o.maxHeight;
+			}
+	
+			// fixing jump error on top/left - bug #2330
+			if (!data.width && !data.height && !data.left && data.top) {
+				data.top = null;
+			} else if (!data.width && !data.height && !data.top && data.left) {
+				data.left = null;
+			}
+	
+			return data;
+		},
+	
+		_proportionallyResize: function() {
+	
+			if (!this._proportionallyResizeElements.length) {
+				return;
+			}
+	
+			var i, j, borders, paddings, prel,
+				element = this.helper || this.element;
+	
+			for ( i=0; i < this._proportionallyResizeElements.length; i++) {
+	
+				prel = this._proportionallyResizeElements[i];
+	
+				if (!this.borderDif) {
+					this.borderDif = [];
+					borders = [prel.css("borderTopWidth"), prel.css("borderRightWidth"), prel.css("borderBottomWidth"), prel.css("borderLeftWidth")];
+					paddings = [prel.css("paddingTop"), prel.css("paddingRight"), prel.css("paddingBottom"), prel.css("paddingLeft")];
+	
+					for ( j = 0; j < borders.length; j++ ) {
+						this.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );
+					}
+				}
+	
+				prel.css({
+					height: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,
+					width: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0
+				});
+	
+			}
+	
+		},
+	
+		_renderProxy: function() {
+	
+			var el = this.element, o = this.options;
+			this.elementOffset = el.offset();
+	
+			if(this._helper) {
+	
+				this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
+	
+				this.helper.addClass(this._helper).css({
+					width: this.element.outerWidth() - 1,
+					height: this.element.outerHeight() - 1,
+					position: "absolute",
+					left: this.elementOffset.left +"px",
+					top: this.elementOffset.top +"px",
+					zIndex: ++o.zIndex //TODO: Don't modify option
+				});
+	
+				this.helper
+					.appendTo("body")
+					.disableSelection();
+	
+			} else {
+				this.helper = this.element;
+			}
+	
+		},
+	
+		_change: {
+			e: function(event, dx) {
+				return { width: this.originalSize.width + dx };
+			},
+			w: function(event, dx) {
+				var cs = this.originalSize, sp = this.originalPosition;
+				return { left: sp.left + dx, width: cs.width - dx };
+			},
+			n: function(event, dx, dy) {
+				var cs = this.originalSize, sp = this.originalPosition;
+				return { top: sp.top + dy, height: cs.height - dy };
+			},
+			s: function(event, dx, dy) {
+				return { height: this.originalSize.height + dy };
+			},
+			se: function(event, dx, dy) {
+				return $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+			},
+			sw: function(event, dx, dy) {
+				return $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+			},
+			ne: function(event, dx, dy) {
+				return $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));
+			},
+			nw: function(event, dx, dy) {
+				return $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));
+			}
+		},
+	
+		_propagate: function(n, event) {
+			$.ui.plugin.call(this, n, [event, this.ui()]);
+			(n !== "resize" && this._trigger(n, event, this.ui()));
+		},
+	
+		plugins: {},
+	
+		ui: function() {
+			return {
+				originalElement: this.originalElement,
+				element: this.element,
+				helper: this.helper,
+				position: this.position,
+				size: this.size,
+				originalSize: this.originalSize,
+				originalPosition: this.originalPosition
+			};
+		}
+	
+	});
+	
+	/*
+	 * Resizable Extensions
+	 */
+	
+	$.ui.plugin.add("resizable", "animate", {
+	
+		stop: function( event ) {
+			var that = $(this).data("ui-resizable"),
+				o = that.options,
+				pr = that._proportionallyResizeElements,
+				ista = pr.length && (/textarea/i).test(pr[0].nodeName),
+				soffseth = ista && $.ui.hasScroll(pr[0], "left") /* TODO - jump height */ ? 0 : that.sizeDiff.height,
+				soffsetw = ista ? 0 : that.sizeDiff.width,
+				style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
+				left = (parseInt(that.element.css("left"), 10) + (that.position.left - that.originalPosition.left)) || null,
+				top = (parseInt(that.element.css("top"), 10) + (that.position.top - that.originalPosition.top)) || null;
+	
+			that.element.animate(
+				$.extend(style, top && left ? { top: top, left: left } : {}), {
+					duration: o.animateDuration,
+					easing: o.animateEasing,
+					step: function() {
+	
+						var data = {
+							width: parseInt(that.element.css("width"), 10),
+							height: parseInt(that.element.css("height"), 10),
+							top: parseInt(that.element.css("top"), 10),
+							left: parseInt(that.element.css("left"), 10)
+						};
+	
+						if (pr && pr.length) {
+							$(pr[0]).css({ width: data.width, height: data.height });
+						}
+	
+						// propagating resize, and updating values for each animation step
+						that._updateCache(data);
+						that._propagate("resize", event);
+	
+					}
+				}
+			);
+		}
+	
+	});
+	
+	$.ui.plugin.add("resizable", "containment", {
+	
+		start: function() {
+			var element, p, co, ch, cw, width, height,
+				that = $(this).data("ui-resizable"),
+				o = that.options,
+				el = that.element,
+				oc = o.containment,
+				ce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;
+	
+			if (!ce) {
+				return;
+			}
+	
+			that.containerElement = $(ce);
+	
+			if (/document/.test(oc) || oc === document) {
+				that.containerOffset = { left: 0, top: 0 };
+				that.containerPosition = { left: 0, top: 0 };
+	
+				that.parentData = {
+					element: $(document), left: 0, top: 0,
+					width: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight
+				};
+			}
+	
+			// i'm a node, so compute top, left, right, bottom
+			else {
+				element = $(ce);
+				p = [];
+				$([ "Top", "Right", "Left", "Bottom" ]).each(function(i, name) { p[i] = num(element.css("padding" + name)); });
+	
+				that.containerOffset = element.offset();
+				that.containerPosition = element.position();
+				that.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };
+	
+				co = that.containerOffset;
+				ch = that.containerSize.height;
+				cw = that.containerSize.width;
+				width = ($.ui.hasScroll(ce, "left") ? ce.scrollWidth : cw );
+				height = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);
+	
+				that.parentData = {
+					element: ce, left: co.left, top: co.top, width: width, height: height
+				};
+			}
+		},
+	
+		resize: function( event ) {
+			var woset, hoset, isParent, isOffsetRelative,
+				that = $(this).data("ui-resizable"),
+				o = that.options,
+				co = that.containerOffset, cp = that.position,
+				pRatio = that._aspectRatio || event.shiftKey,
+				cop = { top:0, left:0 }, ce = that.containerElement;
+	
+			if (ce[0] !== document && (/static/).test(ce.css("position"))) {
+				cop = co;
+			}
+	
+			if (cp.left < (that._helper ? co.left : 0)) {
+				that.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));
+				if (pRatio) {
+					that.size.height = that.size.width / that.aspectRatio;
+				}
+				that.position.left = o.helper ? co.left : 0;
+			}
+	
+			if (cp.top < (that._helper ? co.top : 0)) {
+				that.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);
+				if (pRatio) {
+					that.size.width = that.size.height * that.aspectRatio;
+				}
+				that.position.top = that._helper ? co.top : 0;
+			}
+	
+			that.offset.left = that.parentData.left+that.position.left;
+			that.offset.top = that.parentData.top+that.position.top;
+	
+			woset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );
+			hoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );
+	
+			isParent = that.containerElement.get(0) === that.element.parent().get(0);
+			isOffsetRelative = /relative|absolute/.test(that.containerElement.css("position"));
+	
+			if(isParent && isOffsetRelative) {
+				woset -= that.parentData.left;
+			}
+	
+			if (woset + that.size.width >= that.parentData.width) {
+				that.size.width = that.parentData.width - woset;
+				if (pRatio) {
+					that.size.height = that.size.width / that.aspectRatio;
+				}
+			}
+	
+			if (hoset + that.size.height >= that.parentData.height) {
+				that.size.height = that.parentData.height - hoset;
+				if (pRatio) {
+					that.size.width = that.size.height * that.aspectRatio;
+				}
+			}
+		},
+	
+		stop: function(){
+			var that = $(this).data("ui-resizable"),
+				o = that.options,
+				co = that.containerOffset,
+				cop = that.containerPosition,
+				ce = that.containerElement,
+				helper = $(that.helper),
+				ho = helper.offset(),
+				w = helper.outerWidth() - that.sizeDiff.width,
+				h = helper.outerHeight() - that.sizeDiff.height;
+	
+			if (that._helper && !o.animate && (/relative/).test(ce.css("position"))) {
+				$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+			}
+	
+			if (that._helper && !o.animate && (/static/).test(ce.css("position"))) {
+				$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });
+			}
+	
+		}
+	});
+	
+	$.ui.plugin.add("resizable", "alsoResize", {
+	
+		start: function () {
+			var that = $(this).data("ui-resizable"),
+				o = that.options,
+				_store = function (exp) {
+					$(exp).each(function() {
+						var el = $(this);
+						el.data("ui-resizable-alsoresize", {
+							width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
+							left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
+						});
+					});
+				};
+	
+			if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) {
+				if (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }
+				else { $.each(o.alsoResize, function (exp) { _store(exp); }); }
+			}else{
+				_store(o.alsoResize);
+			}
+		},
+	
+		resize: function (event, ui) {
+			var that = $(this).data("ui-resizable"),
+				o = that.options,
+				os = that.originalSize,
+				op = that.originalPosition,
+				delta = {
+					height: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,
+					top: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0
+				},
+	
+				_alsoResize = function (exp, c) {
+					$(exp).each(function() {
+						var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
+							css = c && c.length ? c : el.parents(ui.originalElement[0]).length ? ["width", "height"] : ["width", "height", "top", "left"];
+	
+						$.each(css, function (i, prop) {
+							var sum = (start[prop]||0) + (delta[prop]||0);
+							if (sum && sum >= 0) {
+								style[prop] = sum || null;
+							}
+						});
+	
+						el.css(style);
+					});
+				};
+	
+			if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
+				$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });
+			}else{
+				_alsoResize(o.alsoResize);
+			}
+		},
+	
+		stop: function () {
+			$(this).removeData("resizable-alsoresize");
+		}
+	});
+	
+	$.ui.plugin.add("resizable", "ghost", {
+	
+		start: function() {
+	
+			var that = $(this).data("ui-resizable"), o = that.options, cs = that.size;
+	
+			that.ghost = that.originalElement.clone();
+			that.ghost
+				.css({ opacity: 0.25, display: "block", position: "relative", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })
+				.addClass("ui-resizable-ghost")
+				.addClass(typeof o.ghost === "string" ? o.ghost : "");
+	
+			that.ghost.appendTo(that.helper);
+	
+		},
+	
+		resize: function(){
+			var that = $(this).data("ui-resizable");
+			if (that.ghost) {
+				that.ghost.css({ position: "relative", height: that.size.height, width: that.size.width });
+			}
+		},
+	
+		stop: function() {
+			var that = $(this).data("ui-resizable");
+			if (that.ghost && that.helper) {
+				that.helper.get(0).removeChild(that.ghost.get(0));
+			}
+		}
+	
+	});
+	
+	$.ui.plugin.add("resizable", "grid", {
+	
+		resize: function() {
+			var that = $(this).data("ui-resizable"),
+				o = that.options,
+				cs = that.size,
+				os = that.originalSize,
+				op = that.originalPosition,
+				a = that.axis,
+				grid = typeof o.grid === "number" ? [o.grid, o.grid] : o.grid,
+				gridX = (grid[0]||1),
+				gridY = (grid[1]||1),
+				ox = Math.round((cs.width - os.width) / gridX) * gridX,
+				oy = Math.round((cs.height - os.height) / gridY) * gridY,
+				newWidth = os.width + ox,
+				newHeight = os.height + oy,
+				isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
+				isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
+				isMinWidth = o.minWidth && (o.minWidth > newWidth),
+				isMinHeight = o.minHeight && (o.minHeight > newHeight);
+	
+			o.grid = grid;
+	
+			if (isMinWidth) {
+				newWidth = newWidth + gridX;
+			}
+			if (isMinHeight) {
+				newHeight = newHeight + gridY;
+			}
+			if (isMaxWidth) {
+				newWidth = newWidth - gridX;
+			}
+			if (isMaxHeight) {
+				newHeight = newHeight - gridY;
+			}
+	
+			if (/^(se|s|e)$/.test(a)) {
+				that.size.width = newWidth;
+				that.size.height = newHeight;
+			} else if (/^(ne)$/.test(a)) {
+				that.size.width = newWidth;
+				that.size.height = newHeight;
+				that.position.top = op.top - oy;
+			} else if (/^(sw)$/.test(a)) {
+				that.size.width = newWidth;
+				that.size.height = newHeight;
+				that.position.left = op.left - ox;
+			} else {
+				that.size.width = newWidth;
+				that.size.height = newHeight;
+				that.position.top = op.top - oy;
+				that.position.left = op.left - ox;
+			}
+		}
+	
+	});
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.widget("ui.selectable", $.ui.mouse, {
+		version: "1.10.3",
+		options: {
+			appendTo: "body",
+			autoRefresh: true,
+			distance: 0,
+			filter: "*",
+			tolerance: "touch",
+	
+			// callbacks
+			selected: null,
+			selecting: null,
+			start: null,
+			stop: null,
+			unselected: null,
+			unselecting: null
+		},
+		_create: function() {
+			var selectees,
+				that = this;
+	
+			this.element.addClass("ui-selectable");
+	
+			this.dragged = false;
+	
+			// cache selectee children based on filter
+			this.refresh = function() {
+				selectees = $(that.options.filter, that.element[0]);
+				selectees.addClass("ui-selectee");
+				selectees.each(function() {
+					var $this = $(this),
+						pos = $this.offset();
+					$.data(this, "selectable-item", {
+						element: this,
+						$element: $this,
+						left: pos.left,
+						top: pos.top,
+						right: pos.left + $this.outerWidth(),
+						bottom: pos.top + $this.outerHeight(),
+						startselected: false,
+						selected: $this.hasClass("ui-selected"),
+						selecting: $this.hasClass("ui-selecting"),
+						unselecting: $this.hasClass("ui-unselecting")
+					});
+				});
+			};
+			this.refresh();
+	
+			this.selectees = selectees.addClass("ui-selectee");
+	
+			this._mouseInit();
+	
+			this.helper = $("<div class='ui-selectable-helper'></div>");
+		},
+	
+		_destroy: function() {
+			this.selectees
+				.removeClass("ui-selectee")
+				.removeData("selectable-item");
+			this.element
+				.removeClass("ui-selectable ui-selectable-disabled");
+			this._mouseDestroy();
+		},
+	
+		_mouseStart: function(event) {
+			var that = this,
+				options = this.options;
+	
+			this.opos = [event.pageX, event.pageY];
+	
+			if (this.options.disabled) {
+				return;
+			}
+	
+			this.selectees = $(options.filter, this.element[0]);
+	
+			this._trigger("start", event);
+	
+			$(options.appendTo).append(this.helper);
+			// position helper (lasso)
+			this.helper.css({
+				"left": event.pageX,
+				"top": event.pageY,
+				"width": 0,
+				"height": 0
+			});
+	
+			if (options.autoRefresh) {
+				this.refresh();
+			}
+	
+			this.selectees.filter(".ui-selected").each(function() {
+				var selectee = $.data(this, "selectable-item");
+				selectee.startselected = true;
+				if (!event.metaKey && !event.ctrlKey) {
+					selectee.$element.removeClass("ui-selected");
+					selectee.selected = false;
+					selectee.$element.addClass("ui-unselecting");
+					selectee.unselecting = true;
+					// selectable UNSELECTING callback
+					that._trigger("unselecting", event, {
+						unselecting: selectee.element
+					});
+				}
+			});
+	
+			$(event.target).parents().addBack().each(function() {
+				var doSelect,
+					selectee = $.data(this, "selectable-item");
+				if (selectee) {
+					doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected");
+					selectee.$element
+						.removeClass(doSelect ? "ui-unselecting" : "ui-selected")
+						.addClass(doSelect ? "ui-selecting" : "ui-unselecting");
+					selectee.unselecting = !doSelect;
+					selectee.selecting = doSelect;
+					selectee.selected = doSelect;
+					// selectable (UN)SELECTING callback
+					if (doSelect) {
+						that._trigger("selecting", event, {
+							selecting: selectee.element
+						});
+					} else {
+						that._trigger("unselecting", event, {
+							unselecting: selectee.element
+						});
+					}
+					return false;
+				}
+			});
+	
+		},
+	
+		_mouseDrag: function(event) {
+	
+			this.dragged = true;
+	
+			if (this.options.disabled) {
+				return;
+			}
+	
+			var tmp,
+				that = this,
+				options = this.options,
+				x1 = this.opos[0],
+				y1 = this.opos[1],
+				x2 = event.pageX,
+				y2 = event.pageY;
+	
+			if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }
+			if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }
+			this.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});
+	
+			this.selectees.each(function() {
+				var selectee = $.data(this, "selectable-item"),
+					hit = false;
+	
+				//prevent helper from being selected if appendTo: selectable
+				if (!selectee || selectee.element === that.element[0]) {
+					return;
+				}
+	
+				if (options.tolerance === "touch") {
+					hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );
+				} else if (options.tolerance === "fit") {
+					hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);
+				}
+	
+				if (hit) {
+					// SELECT
+					if (selectee.selected) {
+						selectee.$element.removeClass("ui-selected");
+						selectee.selected = false;
+					}
+					if (selectee.unselecting) {
+						selectee.$element.removeClass("ui-unselecting");
+						selectee.unselecting = false;
+					}
+					if (!selectee.selecting) {
+						selectee.$element.addClass("ui-selecting");
+						selectee.selecting = true;
+						// selectable SELECTING callback
+						that._trigger("selecting", event, {
+							selecting: selectee.element
+						});
+					}
+				} else {
+					// UNSELECT
+					if (selectee.selecting) {
+						if ((event.metaKey || event.ctrlKey) && selectee.startselected) {
+							selectee.$element.removeClass("ui-selecting");
+							selectee.selecting = false;
+							selectee.$element.addClass("ui-selected");
+							selectee.selected = true;
+						} else {
+							selectee.$element.removeClass("ui-selecting");
+							selectee.selecting = false;
+							if (selectee.startselected) {
+								selectee.$element.addClass("ui-unselecting");
+								selectee.unselecting = true;
+							}
+							// selectable UNSELECTING callback
+							that._trigger("unselecting", event, {
+								unselecting: selectee.element
+							});
+						}
+					}
+					if (selectee.selected) {
+						if (!event.metaKey && !event.ctrlKey && !selectee.startselected) {
+							selectee.$element.removeClass("ui-selected");
+							selectee.selected = false;
+	
+							selectee.$element.addClass("ui-unselecting");
+							selectee.unselecting = true;
+							// selectable UNSELECTING callback
+							that._trigger("unselecting", event, {
+								unselecting: selectee.element
+							});
+						}
+					}
+				}
+			});
+	
+			return false;
+		},
+	
+		_mouseStop: function(event) {
+			var that = this;
+	
+			this.dragged = false;
+	
+			$(".ui-unselecting", this.element[0]).each(function() {
+				var selectee = $.data(this, "selectable-item");
+				selectee.$element.removeClass("ui-unselecting");
+				selectee.unselecting = false;
+				selectee.startselected = false;
+				that._trigger("unselected", event, {
+					unselected: selectee.element
+				});
+			});
+			$(".ui-selecting", this.element[0]).each(function() {
+				var selectee = $.data(this, "selectable-item");
+				selectee.$element.removeClass("ui-selecting").addClass("ui-selected");
+				selectee.selecting = false;
+				selectee.selected = true;
+				selectee.startselected = true;
+				that._trigger("selected", event, {
+					selected: selectee.element
+				});
+			});
+			this._trigger("stop", event);
+	
+			this.helper.remove();
+	
+			return false;
+		}
+	
+	});
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	/*jshint loopfunc: true */
+	
+	function isOverAxis( x, reference, size ) {
+		return ( x > reference ) && ( x < ( reference + size ) );
+	}
+	
+	function isFloating(item) {
+		return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display"));
+	}
+	
+	$.widget("ui.sortable", $.ui.mouse, {
+		version: "1.10.3",
+		widgetEventPrefix: "sort",
+		ready: false,
+		options: {
+			appendTo: "parent",
+			axis: false,
+			connectWith: false,
+			containment: false,
+			cursor: "auto",
+			cursorAt: false,
+			dropOnEmpty: true,
+			forcePlaceholderSize: false,
+			forceHelperSize: false,
+			grid: false,
+			handle: false,
+			helper: "original",
+			items: "> *",
+			opacity: false,
+			placeholder: false,
+			revert: false,
+			scroll: true,
+			scrollSensitivity: 20,
+			scrollSpeed: 20,
+			scope: "default",
+			tolerance: "intersect",
+			zIndex: 1000,
+	
+			// callbacks
+			activate: null,
+			beforeStop: null,
+			change: null,
+			deactivate: null,
+			out: null,
+			over: null,
+			receive: null,
+			remove: null,
+			sort: null,
+			start: null,
+			stop: null,
+			update: null
+		},
+		_create: function() {
+	
+			var o = this.options;
+			this.containerCache = {};
+			this.element.addClass("ui-sortable");
+	
+			//Get the items
+			this.refresh();
+	
+			//Let's determine if the items are being displayed horizontally
+			this.floating = this.items.length ? o.axis === "x" || isFloating(this.items[0].item) : false;
+	
+			//Let's determine the parent's offset
+			this.offset = this.element.offset();
+	
+			//Initialize mouse events for interaction
+			this._mouseInit();
+	
+			//We're ready to go
+			this.ready = true;
+	
+		},
+	
+		_destroy: function() {
+			this.element
+				.removeClass("ui-sortable ui-sortable-disabled");
+			this._mouseDestroy();
+	
+			for ( var i = this.items.length - 1; i >= 0; i-- ) {
+				this.items[i].item.removeData(this.widgetName + "-item");
+			}
+	
+			return this;
+		},
+	
+		_setOption: function(key, value){
+			if ( key === "disabled" ) {
+				this.options[ key ] = value;
+	
+				this.widget().toggleClass( "ui-sortable-disabled", !!value );
+			} else {
+				// Don't call widget base _setOption for disable as it adds ui-state-disabled class
+				$.Widget.prototype._setOption.apply(this, arguments);
+			}
+		},
+	
+		_mouseCapture: function(event, overrideHandle) {
+			var currentItem = null,
+				validHandle = false,
+				that = this;
+	
+			if (this.reverting) {
+				return false;
+			}
+	
+			if(this.options.disabled || this.options.type === "static") {
+				return false;
+			}
+	
+			//We have to refresh the items data once first
+			this._refreshItems(event);
+	
+			//Find out if the clicked node (or one of its parents) is a actual item in this.items
+			$(event.target).parents().each(function() {
+				if($.data(this, that.widgetName + "-item") === that) {
+					currentItem = $(this);
+					return false;
+				}
+			});
+			if($.data(event.target, that.widgetName + "-item") === that) {
+				currentItem = $(event.target);
+			}
+	
+			if(!currentItem) {
+				return false;
+			}
+			if(this.options.handle && !overrideHandle) {
+				$(this.options.handle, currentItem).find("*").addBack().each(function() {
+					if(this === event.target) {
+						validHandle = true;
+					}
+				});
+				if(!validHandle) {
+					return false;
+				}
+			}
+	
+			this.currentItem = currentItem;
+			this._removeCurrentsFromItems();
+			return true;
+	
+		},
+	
+		_mouseStart: function(event, overrideHandle, noActivation) {
+	
+			var i, body,
+				o = this.options;
+	
+			this.currentContainer = this;
+	
+			//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture
+			this.refreshPositions();
+	
+			//Create and append the visible helper
+			this.helper = this._createHelper(event);
+	
+			//Cache the helper size
+			this._cacheHelperProportions();
+	
+			/*
+			 * - Position generation -
+			 * This block generates everything position related - it's the core of draggables.
+			 */
+	
+			//Cache the margins of the original element
+			this._cacheMargins();
+	
+			//Get the next scrolling parent
+			this.scrollParent = this.helper.scrollParent();
+	
+			//The element's absolute position on the page minus margins
+			this.offset = this.currentItem.offset();
+			this.offset = {
+				top: this.offset.top - this.margins.top,
+				left: this.offset.left - this.margins.left
+			};
+	
+			$.extend(this.offset, {
+				click: { //Where the click happened, relative to the element
+					left: event.pageX - this.offset.left,
+					top: event.pageY - this.offset.top
+				},
+				parent: this._getParentOffset(),
+				relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
+			});
+	
+			// Only after we got the offset, we can change the helper's position to absolute
+			// TODO: Still need to figure out a way to make relative sorting possible
+			this.helper.css("position", "absolute");
+			this.cssPosition = this.helper.css("position");
+	
+			//Generate the original position
+			this.originalPosition = this._generatePosition(event);
+			this.originalPageX = event.pageX;
+			this.originalPageY = event.pageY;
+	
+			//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
+			(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));
+	
+			//Cache the former DOM position
+			this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };
+	
+			//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way
+			if(this.helper[0] !== this.currentItem[0]) {
+				this.currentItem.hide();
+			}
+	
+			//Create the placeholder
+			this._createPlaceholder();
+	
+			//Set a containment if given in the options
+			if(o.containment) {
+				this._setContainment();
+			}
+	
+			if( o.cursor && o.cursor !== "auto" ) { // cursor option
+				body = this.document.find( "body" );
+	
+				// support: IE
+				this.storedCursor = body.css( "cursor" );
+				body.css( "cursor", o.cursor );
+	
+				this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body );
+			}
+	
+			if(o.opacity) { // opacity option
+				if (this.helper.css("opacity")) {
+					this._storedOpacity = this.helper.css("opacity");
+				}
+				this.helper.css("opacity", o.opacity);
+			}
+	
+			if(o.zIndex) { // zIndex option
+				if (this.helper.css("zIndex")) {
+					this._storedZIndex = this.helper.css("zIndex");
+				}
+				this.helper.css("zIndex", o.zIndex);
+			}
+	
+			//Prepare scrolling
+			if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
+				this.overflowOffset = this.scrollParent.offset();
+			}
+	
+			//Call callbacks
+			this._trigger("start", event, this._uiHash());
+	
+			//Recache the helper size
+			if(!this._preserveHelperProportions) {
+				this._cacheHelperProportions();
+			}
+	
+	
+			//Post "activate" events to possible containers
+			if( !noActivation ) {
+				for ( i = this.containers.length - 1; i >= 0; i-- ) {
+					this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
+				}
+			}
+	
+			//Prepare possible droppables
+			if($.ui.ddmanager) {
+				$.ui.ddmanager.current = this;
+			}
+	
+			if ($.ui.ddmanager && !o.dropBehaviour) {
+				$.ui.ddmanager.prepareOffsets(this, event);
+			}
+	
+			this.dragging = true;
+	
+			this.helper.addClass("ui-sortable-helper");
+			this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position
+			return true;
+	
+		},
+	
+		_mouseDrag: function(event) {
+			var i, item, itemElement, intersection,
+				o = this.options,
+				scrolled = false;
+	
+			//Compute the helpers position
+			this.position = this._generatePosition(event);
+			this.positionAbs = this._convertPositionTo("absolute");
+	
+			if (!this.lastPositionAbs) {
+				this.lastPositionAbs = this.positionAbs;
+			}
+	
+			//Do scrolling
+			if(this.options.scroll) {
+				if(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== "HTML") {
+	
+					if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
+						this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;
+					} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {
+						this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;
+					}
+	
+					if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
+						this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;
+					} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {
+						this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;
+					}
+	
+				} else {
+	
+					if(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {
+						scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);
+					} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {
+						scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);
+					}
+	
+					if(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {
+						scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);
+					} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {
+						scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);
+					}
+	
+				}
+	
+				if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {
+					$.ui.ddmanager.prepareOffsets(this, event);
+				}
+			}
+	
+			//Regenerate the absolute position used for position checks
+			this.positionAbs = this._convertPositionTo("absolute");
+	
+			//Set the helper position
+			if(!this.options.axis || this.options.axis !== "y") {
+				this.helper[0].style.left = this.position.left+"px";
+			}
+			if(!this.options.axis || this.options.axis !== "x") {
+				this.helper[0].style.top = this.position.top+"px";
+			}
+	
+			//Rearrange
+			for (i = this.items.length - 1; i >= 0; i--) {
+	
+				//Cache variables and intersection, continue if no intersection
+				item = this.items[i];
+				itemElement = item.item[0];
+				intersection = this._intersectsWithPointer(item);
+				if (!intersection) {
+					continue;
+				}
+	
+				// Only put the placeholder inside the current Container, skip all
+				// items form other containers. This works because when moving
+				// an item from one container to another the
+				// currentContainer is switched before the placeholder is moved.
+				//
+				// Without this moving items in "sub-sortables" can cause the placeholder to jitter
+				// beetween the outer and inner container.
+				if (item.instance !== this.currentContainer) {
+					continue;
+				}
+	
+				// cannot intersect with itself
+				// no useless actions that have been done before
+				// no action if the item moved is the parent of the item checked
+				if (itemElement !== this.currentItem[0] &&
+					this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement &&
+					!$.contains(this.placeholder[0], itemElement) &&
+					(this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true)
+				) {
+	
+					this.direction = intersection === 1 ? "down" : "up";
+	
+					if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) {
+						this._rearrange(event, item);
+					} else {
+						break;
+					}
+	
+					this._trigger("change", event, this._uiHash());
+					break;
+				}
+			}
+	
+			//Post events to containers
+			this._contactContainers(event);
+	
+			//Interconnect with droppables
+			if($.ui.ddmanager) {
+				$.ui.ddmanager.drag(this, event);
+			}
+	
+			//Call callbacks
+			this._trigger("sort", event, this._uiHash());
+	
+			this.lastPositionAbs = this.positionAbs;
+			return false;
+	
+		},
+	
+		_mouseStop: function(event, noPropagation) {
+	
+			if(!event) {
+				return;
+			}
+	
+			//If we are using droppables, inform the manager about the drop
+			if ($.ui.ddmanager && !this.options.dropBehaviour) {
+				$.ui.ddmanager.drop(this, event);
+			}
+	
+			if(this.options.revert) {
+				var that = this,
+					cur = this.placeholder.offset(),
+					axis = this.options.axis,
+					animation = {};
+	
+				if ( !axis || axis === "x" ) {
+					animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);
+				}
+				if ( !axis || axis === "y" ) {
+					animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);
+				}
+				this.reverting = true;
+				$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {
+					that._clear(event);
+				});
+			} else {
+				this._clear(event, noPropagation);
+			}
+	
+			return false;
+	
+		},
+	
+		cancel: function() {
+	
+			if(this.dragging) {
+	
+				this._mouseUp({ target: null });
+	
+				if(this.options.helper === "original") {
+					this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+				} else {
+					this.currentItem.show();
+				}
+	
+				//Post deactivating events to containers
+				for (var i = this.containers.length - 1; i >= 0; i--){
+					this.containers[i]._trigger("deactivate", null, this._uiHash(this));
+					if(this.containers[i].containerCache.over) {
+						this.containers[i]._trigger("out", null, this._uiHash(this));
+						this.containers[i].containerCache.over = 0;
+					}
+				}
+	
+			}
+	
+			if (this.placeholder) {
+				//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+				if(this.placeholder[0].parentNode) {
+					this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+				}
+				if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) {
+					this.helper.remove();
+				}
+	
+				$.extend(this, {
+					helper: null,
+					dragging: false,
+					reverting: false,
+					_noFinalSort: null
+				});
+	
+				if(this.domPosition.prev) {
+					$(this.domPosition.prev).after(this.currentItem);
+				} else {
+					$(this.domPosition.parent).prepend(this.currentItem);
+				}
+			}
+	
+			return this;
+	
+		},
+	
+		serialize: function(o) {
+	
+			var items = this._getItemsAsjQuery(o && o.connected),
+				str = [];
+			o = o || {};
+	
+			$(items).each(function() {
+				var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/));
+				if (res) {
+					str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2]));
+				}
+			});
+	
+			if(!str.length && o.key) {
+				str.push(o.key + "=");
+			}
+	
+			return str.join("&");
+	
+		},
+	
+		toArray: function(o) {
+	
+			var items = this._getItemsAsjQuery(o && o.connected),
+				ret = [];
+	
+			o = o || {};
+	
+			items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); });
+			return ret;
+	
+		},
+	
+		/* Be careful with the following core functions */
+		_intersectsWith: function(item) {
+	
+			var x1 = this.positionAbs.left,
+				x2 = x1 + this.helperProportions.width,
+				y1 = this.positionAbs.top,
+				y2 = y1 + this.helperProportions.height,
+				l = item.left,
+				r = l + item.width,
+				t = item.top,
+				b = t + item.height,
+				dyClick = this.offset.click.top,
+				dxClick = this.offset.click.left,
+				isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),
+				isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),
+				isOverElement = isOverElementHeight && isOverElementWidth;
+	
+			if ( this.options.tolerance === "pointer" ||
+				this.options.forcePointerForContainers ||
+				(this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"])
+			) {
+				return isOverElement;
+			} else {
+	
+				return (l < x1 + (this.helperProportions.width / 2) && // Right Half
+					x2 - (this.helperProportions.width / 2) < r && // Left Half
+					t < y1 + (this.helperProportions.height / 2) && // Bottom Half
+					y2 - (this.helperProportions.height / 2) < b ); // Top Half
+	
+			}
+		},
+	
+		_intersectsWithPointer: function(item) {
+	
+			var isOverElementHeight = (this.options.axis === "x") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),
+				isOverElementWidth = (this.options.axis === "y") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),
+				isOverElement = isOverElementHeight && isOverElementWidth,
+				verticalDirection = this._getDragVerticalDirection(),
+				horizontalDirection = this._getDragHorizontalDirection();
+	
+			if (!isOverElement) {
+				return false;
+			}
+	
+			return this.floating ?
+				( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 )
+				: ( verticalDirection && (verticalDirection === "down" ? 2 : 1) );
+	
+		},
+	
+		_intersectsWithSides: function(item) {
+	
+			var isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),
+				isOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),
+				verticalDirection = this._getDragVerticalDirection(),
+				horizontalDirection = this._getDragHorizontalDirection();
+	
+			if (this.floating && horizontalDirection) {
+				return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf));
+			} else {
+				return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf));
+			}
+	
+		},
+	
+		_getDragVerticalDirection: function() {
+			var delta = this.positionAbs.top - this.lastPositionAbs.top;
+			return delta !== 0 && (delta > 0 ? "down" : "up");
+		},
+	
+		_getDragHorizontalDirection: function() {
+			var delta = this.positionAbs.left - this.lastPositionAbs.left;
+			return delta !== 0 && (delta > 0 ? "right" : "left");
+		},
+	
+		refresh: function(event) {
+			this._refreshItems(event);
+			this.refreshPositions();
+			return this;
+		},
+	
+		_connectWith: function() {
+			var options = this.options;
+			return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;
+		},
+	
+		_getItemsAsjQuery: function(connected) {
+	
+			var i, j, cur, inst,
+				items = [],
+				queries = [],
+				connectWith = this._connectWith();
+	
+			if(connectWith && connected) {
+				for (i = connectWith.length - 1; i >= 0; i--){
+					cur = $(connectWith[i]);
+					for ( j = cur.length - 1; j >= 0; j--){
+						inst = $.data(cur[j], this.widgetFullName);
+						if(inst && inst !== this && !inst.options.disabled) {
+							queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]);
+						}
+					}
+				}
+			}
+	
+			queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
+	
+			for (i = queries.length - 1; i >= 0; i--){
+				queries[i][0].each(function() {
+					items.push(this);
+				});
+			}
+	
+			return $(items);
+	
+		},
+	
+		_removeCurrentsFromItems: function() {
+	
+			var list = this.currentItem.find(":data(" + this.widgetName + "-item)");
+	
+			this.items = $.grep(this.items, function (item) {
+				for (var j=0; j < list.length; j++) {
+					if(list[j] === item.item[0]) {
+						return false;
+					}
+				}
+				return true;
+			});
+	
+		},
+	
+		_refreshItems: function(event) {
+	
+			this.items = [];
+			this.containers = [this];
+	
+			var i, j, cur, inst, targetData, _queries, item, queriesLength,
+				items = this.items,
+				queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],
+				connectWith = this._connectWith();
+	
+			if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down
+				for (i = connectWith.length - 1; i >= 0; i--){
+					cur = $(connectWith[i]);
+					for (j = cur.length - 1; j >= 0; j--){
+						inst = $.data(cur[j], this.widgetFullName);
+						if(inst && inst !== this && !inst.options.disabled) {
+							queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);
+							this.containers.push(inst);
+						}
+					}
+				}
+			}
+	
+			for (i = queries.length - 1; i >= 0; i--) {
+				targetData = queries[i][1];
+				_queries = queries[i][0];
+	
+				for (j=0, queriesLength = _queries.length; j < queriesLength; j++) {
+					item = $(_queries[j]);
+	
+					item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager)
+	
+					items.push({
+						item: item,
+						instance: targetData,
+						width: 0, height: 0,
+						left: 0, top: 0
+					});
+				}
+			}
+	
+		},
+	
+		refreshPositions: function(fast) {
+	
+			//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change
+			if(this.offsetParent && this.helper) {
+				this.offset.parent = this._getParentOffset();
+			}
+	
+			var i, item, t, p;
+	
+			for (i = this.items.length - 1; i >= 0; i--){
+				item = this.items[i];
+	
+				//We ignore calculating positions of all connected containers when we're not over them
+				if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {
+					continue;
+				}
+	
+				t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;
+	
+				if (!fast) {
+					item.width = t.outerWidth();
+					item.height = t.outerHeight();
+				}
+	
+				p = t.offset();
+				item.left = p.left;
+				item.top = p.top;
+			}
+	
+			if(this.options.custom && this.options.custom.refreshContainers) {
+				this.options.custom.refreshContainers.call(this);
+			} else {
+				for (i = this.containers.length - 1; i >= 0; i--){
+					p = this.containers[i].element.offset();
+					this.containers[i].containerCache.left = p.left;
+					this.containers[i].containerCache.top = p.top;
+					this.containers[i].containerCache.width	= this.containers[i].element.outerWidth();
+					this.containers[i].containerCache.height = this.containers[i].element.outerHeight();
+				}
+			}
+	
+			return this;
+		},
+	
+		_createPlaceholder: function(that) {
+			that = that || this;
+			var className,
+				o = that.options;
+	
+			if(!o.placeholder || o.placeholder.constructor === String) {
+				className = o.placeholder;
+				o.placeholder = {
+					element: function() {
+	
+						var nodeName = that.currentItem[0].nodeName.toLowerCase(),
+							element = $( "<" + nodeName + ">", that.document[0] )
+								.addClass(className || that.currentItem[0].className+" ui-sortable-placeholder")
+								.removeClass("ui-sortable-helper");
+	
+						if ( nodeName === "tr" ) {
+							that.currentItem.children().each(function() {
+								$( "<td>&#160;</td>", that.document[0] )
+									.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
+									.appendTo( element );
+							});
+						} else if ( nodeName === "img" ) {
+							element.attr( "src", that.currentItem.attr( "src" ) );
+						}
+	
+						if ( !className ) {
+							element.css( "visibility", "hidden" );
+						}
+	
+						return element;
+					},
+					update: function(container, p) {
+	
+						// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that
+						// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified
+						if(className && !o.forcePlaceholderSize) {
+							return;
+						}
+	
+						//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item
+						if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); }
+						if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); }
+					}
+				};
+			}
+	
+			//Create the placeholder
+			that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));
+	
+			//Append it after the actual current item
+			that.currentItem.after(that.placeholder);
+	
+			//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
+			o.placeholder.update(that, that.placeholder);
+	
+		},
+	
+		_contactContainers: function(event) {
+			var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,
+				innermostContainer = null,
+				innermostIndex = null;
+	
+			// get innermost container that intersects with item
+			for (i = this.containers.length - 1; i >= 0; i--) {
+	
+				// never consider a container that's located within the item itself
+				if($.contains(this.currentItem[0], this.containers[i].element[0])) {
+					continue;
+				}
+	
+				if(this._intersectsWith(this.containers[i].containerCache)) {
+	
+					// if we've already found a container and it's more "inner" than this, then continue
+					if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {
+						continue;
+					}
+	
+					innermostContainer = this.containers[i];
+					innermostIndex = i;
+	
+				} else {
+					// container doesn't intersect. trigger "out" event if necessary
+					if(this.containers[i].containerCache.over) {
+						this.containers[i]._trigger("out", event, this._uiHash(this));
+						this.containers[i].containerCache.over = 0;
+					}
+				}
+	
+			}
+	
+			// if no intersecting containers found, return
+			if(!innermostContainer) {
+				return;
+			}
+	
+			// move the item into the container if it's not there already
+			if(this.containers.length === 1) {
+				if (!this.containers[innermostIndex].containerCache.over) {
+					this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+					this.containers[innermostIndex].containerCache.over = 1;
+				}
+			} else {
+	
+				//When entering a new container, we will find the item with the least distance and append our item near it
+				dist = 10000;
+				itemWithLeastDistance = null;
+				floating = innermostContainer.floating || isFloating(this.currentItem);
+				posProperty = floating ? "left" : "top";
+				sizeProperty = floating ? "width" : "height";
+				base = this.positionAbs[posProperty] + this.offset.click[posProperty];
+				for (j = this.items.length - 1; j >= 0; j--) {
+					if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {
+						continue;
+					}
+					if(this.items[j].item[0] === this.currentItem[0]) {
+						continue;
+					}
+					if (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {
+						continue;
+					}
+					cur = this.items[j].item.offset()[posProperty];
+					nearBottom = false;
+					if(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){
+						nearBottom = true;
+						cur += this.items[j][sizeProperty];
+					}
+	
+					if(Math.abs(cur - base) < dist) {
+						dist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];
+						this.direction = nearBottom ? "up": "down";
+					}
+				}
+	
+				//Check if dropOnEmpty is enabled
+				if(!itemWithLeastDistance && !this.options.dropOnEmpty) {
+					return;
+				}
+	
+				if(this.currentContainer === this.containers[innermostIndex]) {
+					return;
+				}
+	
+				itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);
+				this._trigger("change", event, this._uiHash());
+				this.containers[innermostIndex]._trigger("change", event, this._uiHash(this));
+				this.currentContainer = this.containers[innermostIndex];
+	
+				//Update the placeholder
+				this.options.placeholder.update(this.currentContainer, this.placeholder);
+	
+				this.containers[innermostIndex]._trigger("over", event, this._uiHash(this));
+				this.containers[innermostIndex].containerCache.over = 1;
+			}
+	
+	
+		},
+	
+		_createHelper: function(event) {
+	
+			var o = this.options,
+				helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem);
+	
+			//Add the helper to the DOM if that didn't happen already
+			if(!helper.parents("body").length) {
+				$(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);
+			}
+	
+			if(helper[0] === this.currentItem[0]) {
+				this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") };
+			}
+	
+			if(!helper[0].style.width || o.forceHelperSize) {
+				helper.width(this.currentItem.width());
+			}
+			if(!helper[0].style.height || o.forceHelperSize) {
+				helper.height(this.currentItem.height());
+			}
+	
+			return helper;
+	
+		},
+	
+		_adjustOffsetFromHelper: function(obj) {
+			if (typeof obj === "string") {
+				obj = obj.split(" ");
+			}
+			if ($.isArray(obj)) {
+				obj = {left: +obj[0], top: +obj[1] || 0};
+			}
+			if ("left" in obj) {
+				this.offset.click.left = obj.left + this.margins.left;
+			}
+			if ("right" in obj) {
+				this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
+			}
+			if ("top" in obj) {
+				this.offset.click.top = obj.top + this.margins.top;
+			}
+			if ("bottom" in obj) {
+				this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
+			}
+		},
+	
+		_getParentOffset: function() {
+	
+	
+			//Get the offsetParent and cache its position
+			this.offsetParent = this.helper.offsetParent();
+			var po = this.offsetParent.offset();
+	
+			// This is a special case where we need to modify a offset calculated on start, since the following happened:
+			// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
+			// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
+			//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
+			if(this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {
+				po.left += this.scrollParent.scrollLeft();
+				po.top += this.scrollParent.scrollTop();
+			}
+	
+			// This needs to be actually done for all browsers, since pageX/pageY includes this information
+			// with an ugly IE fix
+			if( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) {
+				po = { top: 0, left: 0 };
+			}
+	
+			return {
+				top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0),
+				left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0)
+			};
+	
+		},
+	
+		_getRelativeOffset: function() {
+	
+			if(this.cssPosition === "relative") {
+				var p = this.currentItem.position();
+				return {
+					top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(),
+					left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft()
+				};
+			} else {
+				return { top: 0, left: 0 };
+			}
+	
+		},
+	
+		_cacheMargins: function() {
+			this.margins = {
+				left: (parseInt(this.currentItem.css("marginLeft"),10) || 0),
+				top: (parseInt(this.currentItem.css("marginTop"),10) || 0)
+			};
+		},
+	
+		_cacheHelperProportions: function() {
+			this.helperProportions = {
+				width: this.helper.outerWidth(),
+				height: this.helper.outerHeight()
+			};
+		},
+	
+		_setContainment: function() {
+	
+			var ce, co, over,
+				o = this.options;
+			if(o.containment === "parent") {
+				o.containment = this.helper[0].parentNode;
+			}
+			if(o.containment === "document" || o.containment === "window") {
+				this.containment = [
+					0 - this.offset.relative.left - this.offset.parent.left,
+					0 - this.offset.relative.top - this.offset.parent.top,
+					$(o.containment === "document" ? document : window).width() - this.helperProportions.width - this.margins.left,
+					($(o.containment === "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top
+				];
+			}
+	
+			if(!(/^(document|window|parent)$/).test(o.containment)) {
+				ce = $(o.containment)[0];
+				co = $(o.containment).offset();
+				over = ($(ce).css("overflow") !== "hidden");
+	
+				this.containment = [
+					co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left,
+					co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top,
+					co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left,
+					co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top
+				];
+			}
+	
+		},
+	
+		_convertPositionTo: function(d, pos) {
+	
+			if(!pos) {
+				pos = this.position;
+			}
+			var mod = d === "absolute" ? 1 : -1,
+				scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
+				scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+	
+			return {
+				top: (
+					pos.top	+																// The absolute mouse position
+					this.offset.relative.top * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.top * mod -											// The offsetParent's offset without borders (offset + border)
+					( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)
+				),
+				left: (
+					pos.left +																// The absolute mouse position
+					this.offset.relative.left * mod +										// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.left * mod	-										// The offsetParent's offset without borders (offset + border)
+					( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)
+				)
+			};
+	
+		},
+	
+		_generatePosition: function(event) {
+	
+			var top, left,
+				o = this.options,
+				pageX = event.pageX,
+				pageY = event.pageY,
+				scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
+	
+			// This is another very weird special case that only happens for relative elements:
+			// 1. If the css position is relative
+			// 2. and the scroll parent is the document or similar to the offset parent
+			// we have to refresh the relative offset during the scroll so there are no jumps
+			if(this.cssPosition === "relative" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {
+				this.offset.relative = this._getRelativeOffset();
+			}
+	
+			/*
+			 * - Position constraining -
+			 * Constrain the position to a mix of grid, containment.
+			 */
+	
+			if(this.originalPosition) { //If we are not dragging yet, we won't check for options
+	
+				if(this.containment) {
+					if(event.pageX - this.offset.click.left < this.containment[0]) {
+						pageX = this.containment[0] + this.offset.click.left;
+					}
+					if(event.pageY - this.offset.click.top < this.containment[1]) {
+						pageY = this.containment[1] + this.offset.click.top;
+					}
+					if(event.pageX - this.offset.click.left > this.containment[2]) {
+						pageX = this.containment[2] + this.offset.click.left;
+					}
+					if(event.pageY - this.offset.click.top > this.containment[3]) {
+						pageY = this.containment[3] + this.offset.click.top;
+					}
+				}
+	
+				if(o.grid) {
+					top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];
+					pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;
+	
+					left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];
+					pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;
+				}
+	
+			}
+	
+			return {
+				top: (
+					pageY -																// The absolute mouse position
+					this.offset.click.top -													// Click offset (relative to the element)
+					this.offset.relative.top	-											// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.top +												// The offsetParent's offset without borders (offset + border)
+					( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))
+				),
+				left: (
+					pageX -																// The absolute mouse position
+					this.offset.click.left -												// Click offset (relative to the element)
+					this.offset.relative.left	-											// Only for relative positioned nodes: Relative offset from element to offset parent
+					this.offset.parent.left +												// The offsetParent's offset without borders (offset + border)
+					( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))
+				)
+			};
+	
+		},
+	
+		_rearrange: function(event, i, a, hardRefresh) {
+	
+			a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling));
+	
+			//Various things done here to improve the performance:
+			// 1. we create a setTimeout, that calls refreshPositions
+			// 2. on the instance, we have a counter variable, that get's higher after every append
+			// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same
+			// 4. this lets only the last addition to the timeout stack through
+			this.counter = this.counter ? ++this.counter : 1;
+			var counter = this.counter;
+	
+			this._delay(function() {
+				if(counter === this.counter) {
+					this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove
+				}
+			});
+	
+		},
+	
+		_clear: function(event, noPropagation) {
+	
+			this.reverting = false;
+			// We delay all events that have to be triggered to after the point where the placeholder has been removed and
+			// everything else normalized again
+			var i,
+				delayedTriggers = [];
+	
+			// We first have to update the dom position of the actual currentItem
+			// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)
+			if(!this._noFinalSort && this.currentItem.parent().length) {
+				this.placeholder.before(this.currentItem);
+			}
+			this._noFinalSort = null;
+	
+			if(this.helper[0] === this.currentItem[0]) {
+				for(i in this._storedCSS) {
+					if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") {
+						this._storedCSS[i] = "";
+					}
+				}
+				this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper");
+			} else {
+				this.currentItem.show();
+			}
+	
+			if(this.fromOutside && !noPropagation) {
+				delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); });
+			}
+			if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {
+				delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed
+			}
+	
+			// Check if the items Container has Changed and trigger appropriate
+			// events.
+			if (this !== this.currentContainer) {
+				if(!noPropagation) {
+					delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); });
+					delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); };  }).call(this, this.currentContainer));
+					delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this));  }; }).call(this, this.currentContainer));
+				}
+			}
+	
+	
+			//Post events to containers
+			for (i = this.containers.length - 1; i >= 0; i--){
+				if(!noPropagation) {
+					delayedTriggers.push((function(c) { return function(event) { c._trigger("deactivate", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
+				}
+				if(this.containers[i].containerCache.over) {
+					delayedTriggers.push((function(c) { return function(event) { c._trigger("out", event, this._uiHash(this)); };  }).call(this, this.containers[i]));
+					this.containers[i].containerCache.over = 0;
+				}
+			}
+	
+			//Do what was originally in plugins
+			if ( this.storedCursor ) {
+				this.document.find( "body" ).css( "cursor", this.storedCursor );
+				this.storedStylesheet.remove();
+			}
+			if(this._storedOpacity) {
+				this.helper.css("opacity", this._storedOpacity);
+			}
+			if(this._storedZIndex) {
+				this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex);
+			}
+	
+			this.dragging = false;
+			if(this.cancelHelperRemoval) {
+				if(!noPropagation) {
+					this._trigger("beforeStop", event, this._uiHash());
+					for (i=0; i < delayedTriggers.length; i++) {
+						delayedTriggers[i].call(this, event);
+					} //Trigger all delayed events
+					this._trigger("stop", event, this._uiHash());
+				}
+	
+				this.fromOutside = false;
+				return false;
+			}
+	
+			if(!noPropagation) {
+				this._trigger("beforeStop", event, this._uiHash());
+			}
+	
+			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!
+			this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
+	
+			if(this.helper[0] !== this.currentItem[0]) {
+				this.helper.remove();
+			}
+			this.helper = null;
+	
+			if(!noPropagation) {
+				for (i=0; i < delayedTriggers.length; i++) {
+					delayedTriggers[i].call(this, event);
+				} //Trigger all delayed events
+				this._trigger("stop", event, this._uiHash());
+			}
+	
+			this.fromOutside = false;
+			return true;
+	
+		},
+	
+		_trigger: function() {
+			if ($.Widget.prototype._trigger.apply(this, arguments) === false) {
+				this.cancel();
+			}
+		},
+	
+		_uiHash: function(_inst) {
+			var inst = _inst || this;
+			return {
+				helper: inst.helper,
+				placeholder: inst.placeholder || $([]),
+				position: inst.position,
+				originalPosition: inst.originalPosition,
+				offset: inst.positionAbs,
+				item: inst.currentItem,
+				sender: _inst ? _inst.element : null
+			};
+		}
+	
+	});
+	
+	})(jQuery);
+	
+	(function($, undefined) {
+	
+	var dataSpace = "ui-effects-";
+	
+	$.effects = {
+		effect: {}
+	};
+	
+	/*!
 	 * jQuery Color Animations v2.1.2
 	 * https://github.com/jquery/jquery-color
 	 *
@@ -14,9 +5010,10221 @@ o=this._intersectsWithPointer(s),o&&s.instance===this.currentContainer&&!(n===th
 	 *
 	 * Date: Wed Jan 16 08:47:09 2013 -0600
 	 */
-function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:s.max<t?s.max:t)}function s(e){var i=l(),s=i._rgba=[];return e=e.toLowerCase(),f(h,function(t,n){var o,a=n.re.exec(e),r=a&&n.parse(a),h=n.space||"rgba";if(r)return o=i[h](r),i[c[h].cache]=o[c[h].cache],s=i._rgba=o._rgba,!1}),s.length?("0,0,0,0"===s.join()&&t.extend(s,o.transparent),i):o[e]}function n(t,e,i){return i=(i+1)%1,6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}var o,a="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d="array"),"string"===d?this.parse(s(n)||o._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if("alpha"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&t.inArray(null,u[o].slice(0,3))<0&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):void 0},is:function(t){var e=l(t),i=!0,s=this;return f(c,function(t,n){var o,a=e[n.cache];return a&&(o=s[n.cache]||n.to&&n.to(s._rgba)||[],f(n.props,function(t,e){if(null!=a[e.idx])return i=a[e.idx]===o[e.idx]})),i}),i},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l("transparent"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&e<3&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:u<=.5?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=s<=.5?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===a?c:("function"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:("string"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*("+"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r="";if("transparent"!==n&&("string"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&a&&a.style;)try{r=t.css(a,"backgroundColor"),a=a.parentNode}catch(t){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(t){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},o=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(s),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(o[i]=n[i]);return o}function n(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||!t.fx.step[s]&&isNaN(parseFloat(n))||(o[s]=n));return o}var o=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(s.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,s,a,r){var h=t.speed(s,a,r);return this.queue(function(){var s,a=t(this),r=a.attr("class")||"",l=h.children?a.find("*").addBack():a;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),s=function(){t.each(o,function(t,i){e[i]&&a[i+"Class"](e[i])})},s(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=n(this.start,this.end),this}),a.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){s(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,o,a,r){return"boolean"==typeof n||n===e?o?t.effects.animateClass.call(this,n?{add:s}:{remove:s},o,a,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,o,a)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!(e&&"number"!=typeof e&&!t.fx.speeds[e])||("string"==typeof e&&!t.effects.effect[e]||(!!t.isFunction(e)||"object"==typeof e&&!e.effect))}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;s<e.length;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,o;for(o=0;o<s.length;o++)null!==s[o]&&(n=t.data(i+s[o]),n===e&&(n=""),t.css(s[o],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),float:e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(t){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(o)&&o.call(n[0]),t.isFunction(e)&&e()}var n=t(this),o=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):a.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,o=i.queue,a=t.effects.effect[i.effect];return t.fx.off||!a?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):o===!1?this.each(e):this.queue(o||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;t<((e=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return t<.5?i(2*t)/2:1-i(t*-2+2)/2}})}()}(s),function(t,e){var i=0,s={},n={};s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="hide",n.height=n.paddingTop=n.paddingBottom=n.borderTopWidth=n.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?void this._activate(e):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),void("disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e)))},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),o=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:o=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:o=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:o=this.headers[0];break;case i.END:o=this.headers[s-1]}o&&(t(e.target).attr("tabIndex",-1),t(o).attr("tabIndex",0),o.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var e,s=this.options,n=s.heightStyle,o=this.element.parent(),a=this.accordionId="ui-accordion-"+(this.element.attr("id")||++i);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),o=n.attr("id");s||(s=a+"-header-"+e,i.attr("id",s)),o||(o=a+"-panel-"+e,n.attr("id",o)),i.attr("aria-controls",o),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(e=o.height(),this.element.siblings(":visible").each(function(){var i=t(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(e-=i.outerHeight(!0))}),this.headers.each(function(){e-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,e-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(e=0,this.headers.next().each(function(){e=Math.max(e,t(this).css("height","").height())}).height(e))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n[0]===s[0],a=o&&i.collapsible,r=a?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:a?t():n,newPanel:r};e.preventDefault(),o&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=!a&&this.headers.index(n),this.active=o?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),o||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,i){var o,a,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(i)};return"number"==typeof d&&(r=d),"string"==typeof d&&(a=d),a=a||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(o=t.show().outerHeight(),e.animate(s,{duration:r,easing:a,step:function(t,e){e.now=Math.round(t)}}),void t.hide().animate(n,{duration:r,easing:a,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(o-e.outerHeight()-l),l=0)}})):e.animate(s,r,a,p):t.animate(n,r,a,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})}(s),function(t,e){var i=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=!!o||!a&&this.element.prop("isContentEditable"),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,void(i=!0);e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:case o.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||s.preventDefault());if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,void t.preventDefault()):void this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(clearTimeout(this.searching),this.close(t),void this._change(t))}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)});var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):void 0},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,e=++i;return function(s){e===i&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),void this.menu.blur()):void this.menu[t](e):void this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=new RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})}(s),function(t,e){var i,s,n,o,a="ui-button ui-widget ui-state-default ui-corner-all",r="ui-state-hover ui-state-active ",h="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",l=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},c=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,l),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var e=this,r=this.options,h="checkbox"===this.type||"radio"===this.type,u=h?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===i&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){e.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){e.buttonElement.removeClass(d)}),h&&(this.element.bind("change"+this.eventNamespace,function(){o||e.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(o=!1,s=t.pageX,n=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||s===t.pageX&&n===t.pageY||(o=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||o)return!1}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||o)return!1;t(this).addClass("ui-state-active"),e.buttonElement.attr("aria-pressed","true");var i=e.element[0];c(i).not(i).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return!r.disabled&&(t(this).addClass("ui-state-active"),i=this,void e.document.one("mouseup",function(){i=null}))}).bind("mouseup"+this.eventNamespace,function(){return!r.disabled&&void t(this).removeClass("ui-state-active")}).bind("keydown"+this.eventNamespace,function(e){return!r.disabled&&void(e.keyCode!==t.ui.keyCode.SPACE&&e.keyCode!==t.ui.keyCode.ENTER||t(this).addClass("ui-state-active"))}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.element.is("[type=checkbox]")?this.type="checkbox":this.element.is("[type=radio]")?this.type="radio":this.element.is("input")?this.type="input":this.type="button",
-"checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+r+" "+h).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?void(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1)):void this._resetButton()},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?c(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return void(this.options.label&&this.element.val(this.options.label));var e=this.buttonElement.removeClass(h),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,o=[];s.primary||s.secondary?(this.options.text&&o.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(o.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):o.push("ui-button-text-only"),e.addClass(o.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})}(s),function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).removeClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(o.inline?e.parent()[0]:o.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&t(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var o,a="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,o;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),o=this._newInst(t(e),n),o.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,o):n&&this._inlineDatepicker(e,o)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,a,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,o,a=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),a&&(i.append=t("<span class='"+this._appendClass+"'>"+a+"</span>"),e[r?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),"focus"!==s&&"both"!==s||e.focus(this._showDatepicker),"button"!==s&&"both"!==s||(n=this._get(i,"buttonText"),o=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:o,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(o?t("<img/>").attr({src:o,alt:n,title:n}):n)),e[r?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,a,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,o,r){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],a,p)),n(p.settings,o||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=r?r.length?r:[r.pageX,r.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],a,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,a);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,a),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):"div"!==i&&"span"!==i||s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,o.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==i&&"span"!==i||(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),o=t.data(e,a);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,o.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==i&&"span"!==i||(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,a)}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,o){var a,r,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(a=s||{},"string"==typeof s&&(a={},a[s]=o),void(c&&(this._curInst===c&&this._hideDatepicker(),r=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,a),null!==h&&a.dateFormat!==e&&a.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&a.dateFormat!==e&&a.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in a&&(a.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,r),this._updateAlternate(c),this._updateDatepicker(c))))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,o=t.datepicker._getInst(e.target),a=!0,r=o.dpDiv.is(".ui-datepicker-rtl");if(o._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),a=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",o.dpDiv),n[0]&&t.datepicker._selectDay(e.target,o.selectedMonth,o.selectedYear,n[0]),i=t.datepicker._get(o,"onSelect"),i?(s=t.datepicker._formatDate(o),i.apply(o.input?o.input[0]:null,[s,o])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(o,"stepBigMonths"):-t.datepicker._get(o,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,r?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(o,"stepBigMonths"):+t.datepicker._get(o,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var i,s,n=t.datepicker._getInst(e.target);if(t.datepicker._get(n,"constrainInput"))return i=t.datepicker._possibleChars(t.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||s<" "||!i||i.indexOf(s)>-1},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(t){}return!0},_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,o,a,r,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),o=s?s.apply(e,[e,i]):{},o!==!1&&(n(i.settings,o),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),a=!1,t(e).parents().each(function(){return a|="fixed"===t(this).css("position"),!a}),r={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),r=t.datepicker._checkOffset(i,r,a),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":a?"fixed":"absolute",display:"none",left:r.left+"px",top:r.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,o=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],a=17;e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),o=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,r=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-a:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+r?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+o>l&&l>o?Math.abs(o+r):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,o,r=this._curInst;!r||e&&r!==t.data(e,a)||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){t.datepicker._tidyDialog(r)},t.effects&&(t.effects.effect[i]||t.effects[i])?r.dpDiv.hide(i,t.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,o=this._get(r,"onClose"),o&&o.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id===t.datepicker._mainDivId||0!==i.parents("#"+t.datepicker._mainDivId).length||i.hasClass(t.datepicker.markerClassName)||i.closest("."+t.datepicker._triggerClass).length||!t.datepicker._datepickerShowing||t.datepicker._inDialog&&t.blockUI)&&(!i.hasClass(t.datepicker.markerClassName)||t.datepicker._curInst===s)||t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),o=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(o,i+("M"===s?this._get(o,"showCurrentAtPos"):0),s),this._updateDatepicker(o))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),o=this._getInst(n[0]);o["selected"+("M"===s?"Month":"Year")]=o["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(o),this._adjustDate(n)},_selectDay:function(e,i,s,n){var o,a=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||(o=this._getInst(a[0]),o.selectedDay=o.currentDay=t("a",n).html(),o.selectedMonth=o.currentMonth=i,o.selectedYear=o.currentYear=s,this._selectDate(e,this._formatDate(o,o.currentDay,o.currentMonth,o.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),o=this._getInst(n[0]);i=null!=i?i:this._formatDate(o),o.input&&o.input.val(i),this._updateAlternate(o),s=this._get(o,"onSelect"),s?s.apply(o.input?o.input[0]:null,[i,o]):o.input&&o.input.trigger("change"),o.inline?this._updateDatepicker(o):(this._hideDatepicker(),this._lastInput=o.input[0],"object"!=typeof o.input[0]&&o.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,o=this._get(e,"altField");o&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(o).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(e,i,s){if(null==e||null==i)throw"Invalid arguments";if(i="object"==typeof i?i.toString():i+"",""===i)return null;var n,o,a,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,c="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,d=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,g=-1,m=-1,v=-1,_=-1,b=!1,y=function(t){var i=n+1<e.length&&e.charAt(n+1)===t;return i&&n++,i},w=function(t){var e=y(t),s="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=new RegExp("^\\d{1,"+s+"}"),o=i.substring(h).match(n);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},x=function(e,s,n){var o=-1,a=t.map(y(e)?n:s,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(a,function(t,e){var s=e[1];if(i.substr(h,s.length).toLowerCase()===s.toLowerCase())return o=e[0],h+=s.length,!1}),o!==-1)return o+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==e.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;n<e.length;n++)if(b)"'"!==e.charAt(n)||y("'")?k():b=!1;else switch(e.charAt(n)){case"d":v=w("d");break;case"D":x("D",u,d);break;case"o":_=w("o");break;case"m":m=w("m");break;case"M":m=x("M",p,f);break;case"y":g=w("y");break;case"@":r=new Date(w("@")),g=r.getFullYear(),m=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((w("!")-this._ticksTo1970)/1e4),g=r.getFullYear(),m=r.getMonth()+1,v=r.getDate();break;case"'":y("'")?k():b=!0;break;default:k()}if(h<i.length&&(a=i.substr(h),!/^\s+/.test(a)))throw"Extra/unparsed characters found in date: "+a;if(g===-1?g=(new Date).getFullYear():g<100&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(g<=c?0:-100)),_>-1)for(m=1,v=_;;){if(o=this._getDaysInMonth(g,m-1),v<=o)break;m++,v-=o}if(r=this._daylightSavingAdjust(new Date(g,m-1,v)),r.getFullYear()!==g||r.getMonth()+1!==m||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,o=(i?i.dayNames:null)||this._defaults.dayNames,a=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=s+1<t.length&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;s.length<i;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;s<t.length;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,o);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),a,r);break;case"y":u+=h("y")?e.getFullYear():(e.getYear()%100<10?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=e+1<t.length&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;e<t.length;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},o=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(t){}for(var s=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,n=s.getFullYear(),o=s.getMonth(),a=s.getDate(),r=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,h=r.exec(i);h;){switch(h[2]||"d"){case"d":case"D":a+=parseInt(h[1],10);break;case"w":case"W":a+=7*parseInt(h[1],10);break;case"m":case"M":o+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(n,o));break;case"y":case"Y":n+=parseInt(h[1],10),a=Math.min(a,t.datepicker._getDaysInMonth(n,o))}h=r.exec(i)}return new Date(n,o,a)},a=null==i||""===i?s:"string"==typeof i?o(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return a=a&&"Invalid Date"===a.toString()?s:a,a&&(a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)),this._daylightSavingAdjust(a)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,h,l,c,u,d,p,f,g,m,v,_,b,y,w,x,k,D,C,I,T,P,M,S,z,H,A,W,E,N,O,F,R,L=new Date,Y=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),B=this._get(t,"isRTL"),j=this._get(t,"showButtonPanel"),K=this._get(t,"hideIfNoPrevNext"),U=this._get(t,"navigationAsDateFormat"),q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),$=this._get(t,"stepMonths"),X=1!==q[0]||1!==q[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),Q=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-q[0]*q[1]+1,J.getDate())),e=Q&&e<Q?Q:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)Z--,Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=U?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-$,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>":K?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=U?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+$,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>":K?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(B?"w":"e")+"'>"+n+"</span></a>",a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:Y,a=U?this.formatDate(a,r,this._getFormatConfig(t)):a,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=j?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(B?h:"")+(this._isInRange(t,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+a+"</button>":"")+(B?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),
-_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",x=0;x<q[0];x++){for(k="",this.maxRows=4,D=0;D<q[1];D++){if(C=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),I=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",q[1]>1)switch(D){case 0:T+=" ui-datepicker-group-first",I=" ui-corner-"+(B?"right":"left");break;case q[1]-1:T+=" ui-datepicker-group-last",I=" ui-corner-"+(B?"left":"right");break;default:T+=" ui-datepicker-group-middle",I=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+I+"'>"+(/all|left/.test(I)&&0===x?B?o:s:"")+(/all|right/.test(I)&&0===x?B?s:o:"")+this._generateMonthYearHeader(t,Z,tt,Q,J,x>0||D>0,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",P=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)M=(w+c)%7,P+="<th"+((w+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+d[M]+"'>"+p[M]+"</span></th>";for(T+=P+"</tr></thead><tbody>",S=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,S)),z=(this._getFirstDayOfMonth(tt,Z)-c+7)%7,H=Math.ceil((z+S)/7),A=X&&this.maxRows>H?this.maxRows:H,this.maxRows=A,W=this._daylightSavingAdjust(new Date(tt,Z,1-z)),E=0;E<A;E++){for(T+="<tr>",N=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(W)+"</td>":"",w=0;w<7;w++)O=m?m.apply(t.input?t.input[0]:null,[W]):[!0,""],F=W.getMonth()!==Z,R=F&&!_||!O[0]||Q&&W<Q||J&&W>J,N+="<td class='"+((w+c+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(W.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===W.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(R?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!v?"":" "+O[1]+(W.getTime()===G.getTime()?" "+this._currentClass:"")+(W.getTime()===Y.getTime()?" ui-datepicker-today":""))+"'"+(F&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(R?"":" data-handler='selectDay' data-event='click' data-month='"+W.getMonth()+"' data-year='"+W.getFullYear()+"'")+">"+(F&&!v?"&#xa0;":R?"<span class='ui-state-default'>"+W.getDate()+"</span>":"<a class='ui-state-default"+(W.getTime()===Y.getTime()?" ui-state-highlight":"")+(W.getTime()===G.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+W.getDate()+"</a>")+"</td>",W.setDate(W.getDate()+1),W=this._daylightSavingAdjust(W);T+=N+"</tr>"}Z++,Z>11&&(Z=0,tt++),T+="</tbody></table>"+(X?"</div>"+(q[0]>0&&D===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=T}y+=k}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var h,l,c,u,d,p,f,g,m=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(o||!m)y+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;c<12;c++)(!h||c>=s.getMonth())&&(!l||c<=n.getMonth())&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+r[c]+"</option>");y+="</select>"}if(_||(b+=y+(!o&&m&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",o||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e},f=p(u[0]),g=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";f<=g;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!o&&m&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&e<i?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"}(s),function(t,e){var i={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},s={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;i<0&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?void(this._moveToTop()&&this._focusTabbable()):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),void this._trigger("open"))},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?void this.uiDialog.removeClass("ui-dialog-buttons"):(t.each(i,function(i,s){var n,o;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},o={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(o).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),void this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,o){s.position=[o.position.left-i.document.scrollLeft(),o.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(o))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,o=this.uiDialog.css("position"),a="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:a,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,o){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(o))}}).css("position",o)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(e){var n=this,o=!1,a={};t.each(e,function(t,e){n._setOption(t,e),t in i&&(o=!0),t in s&&(a[t]=e)}),o&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",a)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!t(e.target).closest(".ui-dialog").length||!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(n[0]<0?n[0]:"+"+n[0])+" "+s[1]+(n[1]<0?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})}(s),function(t,e){var i=/up|down|vertical/,s=/up|left|vertical|horizontal/;t.effects.effect.blind=function(e,n){var o,a,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,e.mode||"hide"),u=e.direction||"up",d=i.test(u),p=d?"height":"width",f=d?"top":"left",g=s.test(u),m={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),o=t.effects.createWrapper(h).css({overflow:"hidden"}),a=o[p](),r=parseFloat(o.css(f))||0,m[p]=v?a:0,g||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),m[f]=v?r:a+r),v&&(o.css(p,0),g||o.css(f,r+a)),o.animate(m,{duration:e.duration,easing:e.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}}(s),function(t,e){t.effects.effect.bounce=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),g=e.duration/f,m=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=a.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(a,r),a.show(),t.effects.createWrapper(a),d||(d=a["top"===v?"outerHeight":"outerWidth"]()/3),c&&(o={opacity:1},o[v]=0,a.css("opacity",0).css(v,_?2*-d:2*d).animate(o,g,m)),l&&(d/=Math.pow(2,p-1)),o={},o[v]=0,s=0;s<p;s++)n={},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m).animate(o,g,m),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,a.animate(n,g,m)),a.queue(function(){l&&a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),a.dequeue()}}(s),function(t,e){t.effects.effect.clip=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(a,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(a,r),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n="IMG"===a[0].tagName?s:a,o=n[d](),l&&(n.css(d,0),n.css(p,o/2)),f[d]=l?o:0,f[p]=l?0:o/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||a.hide(),t.effects.restore(a,r),t.effects.removeWrapper(a),i()}})}}(s),function(t,e){t.effects.effect.drop=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","opacity","height","width"],a=t.effects.setMode(n,e.mode||"hide"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,o),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(s),function(t,e){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),g||p.hide(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),g="show"===f,m=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(o=0;o<u;o++)for(h=m.top+o*_,c=o-(u-1)/2,a=0;a<d;a++)r=m.left+a*v,l=a-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-a*v,top:-o*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(g?l*v:0),top:h+(g?c*_:0),opacity:g?0:1}).animate({left:r+(g?0:l*v),top:h+(g?0:c*_),opacity:g?1:0},e.duration||500,e.easing,s)}}(s),function(t,e){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}}(s),function(t,e){t.effects.effect.fold=function(e,i){var s,n,o=t(this),a=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(o,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],g=e.duration/2,m={},v={};t.effects.save(o,a),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),m[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(m,g,e.easing).animate(v,g,e.easing,function(){l&&o.hide(),t.effects.restore(o,a),t.effects.removeWrapper(o),i()})}}(s),function(t,e){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],o=t.effects.setMode(s,e.mode||"show"),a={backgroundColor:s.css("backgroundColor")};"hide"===o&&(a.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(a,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&s.hide(),t.effects.restore(s,n),i()}})}}(s),function(t,e){t.effects.effect.pulsate=function(e,i){var s,n=t(this),o=t.effects.setMode(n,e.mode||"show"),a="show"===o,r="hide"===o,h=a||"hide"===o,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for(!a&&n.is(":visible")||(n.css("opacity",0).show(),u=1),s=1;s<l;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}}(s),function(t,e){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),o="hide"===n,a=parseInt(e.percent,10)||150,r=a/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:o?a:100,from:o?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),o=t.effects.setMode(s,e.mode||"effect"),a=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===o?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?a/100:1,x:"vertical"!==r?a/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==o&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===o?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===o&&(n.from.opacity=0,n.to.opacity=1),"hide"===o&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,o,a=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(a,e.mode||"effect"),f=e.restore||"effect"!==p,g=e.scale||"both",m=e.origin||["middle","center"],v=a.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&a.show(),s={height:a.height(),width:a.width(),outerHeight:a.outerHeight(),outerWidth:a.outerWidth()},"toggle"===e.mode&&"show"===p?(a.from=e.to||b,a.to=e.from||s):(a.from=e.from||("show"===p?b:s),a.to=e.to||("hide"===p?b:s)),o={from:{y:a.from.height/s.height,x:a.from.width/s.width},to:{y:a.to.height/s.height,x:a.to.width/s.width}},"box"!==g&&"both"!==g||(o.from.y!==o.to.y&&(_=_.concat(u),a.from=t.effects.setTransition(a,u,o.from.y,a.from),a.to=t.effects.setTransition(a,u,o.to.y,a.to)),o.from.x!==o.to.x&&(_=_.concat(d),a.from=t.effects.setTransition(a,d,o.from.x,a.from),a.to=t.effects.setTransition(a,d,o.to.x,a.to))),"content"!==g&&"both"!==g||o.from.y!==o.to.y&&(_=_.concat(c).concat(l),a.from=t.effects.setTransition(a,c,o.from.y,a.from),a.to=t.effects.setTransition(a,c,o.to.y,a.to)),t.effects.save(a,_),a.show(),t.effects.createWrapper(a),a.css("overflow","hidden").css(a.from),m&&(n=t.effects.getBaseline(m,s),a.from.top=(s.outerHeight-a.outerHeight())*n.y,a.from.left=(s.outerWidth-a.outerWidth())*n.x,a.to.top=(s.outerHeight-a.to.outerHeight)*n.y,a.to.left=(s.outerWidth-a.to.outerWidth)*n.x),a.css(a.from),"content"!==g&&"both"!==g||(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),a.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*o.from.y,width:s.width*o.from.x,outerHeight:s.outerHeight*o.from.y,outerWidth:s.outerWidth*o.from.x},i.to={height:s.height*o.to.y,width:s.width*o.to.x,outerHeight:s.height*o.to.y,outerWidth:s.width*o.to.x},o.from.y!==o.to.y&&(i.from=t.effects.setTransition(i,u,o.from.y,i.from),i.to=t.effects.setTransition(i,u,o.to.y,i.to)),o.from.x!==o.to.x&&(i.from=t.effects.setTransition(i,d,o.from.x,i.from),i.to=t.effects.setTransition(i,d,o.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),a.animate(a.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===a.to.opacity&&a.css("opacity",a.from.opacity),"hide"===p&&a.hide(),t.effects.restore(a,_),f||("static"===v?a.css({position:"relative",top:a.to.top,left:a.to.left}):t.each(["top","left"],function(t,e){a.css(e,function(e,i){var s=parseInt(i,10),n=t?a.to.left:a.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(a),i()}})}}(s),function(t,e){t.effects.effect.shake=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","height","width"],a=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},g={},m={},v=n.queue(),_=v.length;for(t.effects.save(n,o),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,g[d]=(p?"+=":"-=")+2*h,m[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;s<l;s++)n.animate(g,u,e.easing).animate(m,u,e.easing);n.animate(g,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}}(s),function(t,e){t.effects.effect.slide=function(e,i){var s,n=t(this),o=["position","top","bottom","left","right","width","height"],a=t.effects.setMode(n,e.mode||"show"),r="show"===a,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,o),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&n.hide(),t.effects.restore(n,o),t.effects.removeWrapper(n),i()}})}}(s),function(t,e){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),o="fixed"===n.css("position"),a=t("body"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}}(s),function(t,e){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),
-this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,o,a,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",o=String.fromCharCode(e.keyCode),a=!1,clearTimeout(this.filterTimer),o===n?a=!0:o=n+o,r=new RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=a&&s.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):s,s.length||(o=String.fromCharCode(e.keyCode),r=new RegExp("^"+i(o),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=o,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.height(),n<0?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?void(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s-n<0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]()))):void this.next(e)},previousPage:function(e){var i,s,n;return this.active?void(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first()))):void this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})}(s),function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var o,a=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(o!==e)return o;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=n.children()[0];return t("body").append(n),i=a.offsetWidth,n.css("overflow","scroll"),s=a.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),o=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,o="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:o?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var o,p,g,m,v,_,b=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return _=n(b),b[0].preventDefault&&(e.at="left top"),p=_.width,g=_.height,m=_.offset,v=t.extend({},m),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[1]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=g:"center"===e.at[1]&&(v.top+=g/2),o=i(k.at,p,g),v.left+=o[0],v.top+=o[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),_=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,C=d+_+s(this,"marginBottom")+w.height,I=t.extend({},v),T=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?I.left-=u:"center"===e.my[0]&&(I.left-=u/2),"bottom"===e.my[1]?I.top-=d:"center"===e.my[1]&&(I.top-=d/2),I.left+=T[0],I.top+=T[1],t.support.offsetFractions||(I.left=h(I.left),I.top=h(I.top)),n={marginLeft:f,marginTop:_},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](I,{targetWidth:p,targetHeight:g,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:C,offset:[o[0]+T[0],o[1]+T[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=m.left-I.left,s=i+p-u,n=m.top-I.top,o=n+g-d,h={target:{element:b,left:m.left,top:m.top,width:p,height:g},element:{element:c,left:I.left,top:I.top,width:u,height:d},horizontal:s<0?"left":i>0?"right":"center",vertical:o<0?"top":n>0?"bottom":"middle"};p<u&&r(i+s)<p&&(h.horizontal="center"),g<d&&r(n+o)<g&&(h.vertical="middle"),a(r(i),r(s))>a(r(n),r(o))?h.important="horizontal":h.important="vertical",e.using.call(this,t,h)}),c.offset(t.extend(I,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-o-n;e.collisionWidth>o?h>0&&l<=0?(i=t.left+h+e.collisionWidth-o-n,t.left+=h-i):l>0&&h<=0?t.left=n:h>l?t.left=n+o-e.collisionWidth:t.left=n:h>0?t.left+=h:l>0?t.left-=l:t.left=a(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-o-n;e.collisionHeight>o?h>0&&l<=0?(i=t.top+h+e.collisionHeight-o-n,t.top+=h-i):l>0&&h<=0?t.top=n:h>l?t.top=n+o-e.collisionHeight:t.top=n:h>0?t.top+=h:l>0?t.top-=l:t.top=a(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-a-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];c<0?(i=t.left+d+p+f+e.collisionWidth-a-o,(i<0||i<r(c))&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||r(s)<u)&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-a-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];c<0?(s=t.top+p+f+g+e.collisionHeight-a-o,t.top+p+f+g>c&&(s<0||s<r(c))&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-h,t.top+p+f+g>u&&(i>0||r(i)<u)&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,o,a=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(a?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},a&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)e.style[o]=s[o];e.appendChild(r),i=a||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&n<11,e.innerHTML="",i.removeChild(e)}()}(s),function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),void this._refreshValue())},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})}(s),function(t,e){var i=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),o="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",a=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;e<i;e++)a.push(o);this.handles=n.add(t(a.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)},_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,o,a,r,h,l,c=this,u=this.options;return!u.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-c.values(e));(n>i||n===i&&(e===c._lastChangedValue||c.values(e)===u.min))&&(n=i,o=t(this),a=e)}),r=this._start(e,a),r!==!1&&(this._mouseSliding=!0,this._handleIndex=a,o.addClass("ui-state-active").focus(),h=o.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-o.width()/2,top:e.pageY-h.top-o.height()/2-(parseInt(o.css("borderTopWidth"),10)||0)-(parseInt(o.css("borderBottomWidth"),10)||0)+(parseInt(o.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,o;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),s<0&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),o=this._valueMin()+s*n,this._trimAlignValue(o)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,o;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&i<s)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,o=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),o!==!1&&this.values(e,i,!0))):i!==this.value()&&(o=this._trigger("slide",t,{handle:this.handles[e],value:i}),o!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,i){var s,n,o;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],o=0;o<s.length;o+=1)s[o]=this._trimAlignValue(n[o]),this._change(null,o);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;s<n;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,o,a=this.options.range,r=this.options,h=this,l=!this._animateOff&&r.animate,c={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=(h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())*100,c["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](c,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),o=this._valueMax(),i=o!==n?(s-n)/(o-n)*100:0,c["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](c,r.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===a&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===a&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(e){var s,n,o,a,r=t(e.target).data("ui-slider-handle-index");switch(e.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(e.target).addClass("ui-state-active"),s=this._start(e,r),s===!1))return}switch(a=this.options.step,n=o=this.options.values&&this.options.values.length?this.values(r):this.value(),e.keyCode){case t.ui.keyCode.HOME:o=this._valueMin();break;case t.ui.keyCode.END:o=this._valueMax();break;case t.ui.keyCode.PAGE_UP:o=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.PAGE_DOWN:o=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/i);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;o=this._trimAlignValue(n+a);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;o=this._trimAlignValue(n-a)}this._slide(e,r,o)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})}(s),function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?void delete this.cancelBlur:(this._stop(),this._refresh(),void(this.previous!==this.element.val()&&this._trigger("change",t)))},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(t(e.currentTarget).hasClass("ui-state-active"))return this._start(e)!==!1&&void this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span></a><a class='ui-spinner-button ui-spinner-down ui-corner-br'><span class='ui-icon "+this.options.icons.down+"'>&#9660;</span></a>"},_start:function(t){return!(!this.spinning&&this._trigger("start",t)===!1)&&(this.counter||(this.counter=1),this.spinning=!0,!0)},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return i===-1?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&t<s.min?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,void this.element.val(this._format(i))}"max"!==t&&"min"!==t&&"step"!==t||"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?void e(this._value).call(this,t):this._parse(this.element.val());
-},widget:function(){return this.uiSpinner}})}(s),function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(o,""))===decodeURIComponent(location.href.replace(o,""))}var n=0,o=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.options.active!==!1&&this.anchors.length?this.active=this._findActive(i.active):this.active=t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var e=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===e&&(s&&this.tabs.each(function(i,n){if(t(n).attr("aria-controls")===s)return e=i,!1}),null===e&&(e=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==e&&e!==-1||(e=!!this.tabs.length&&0)),e!==!1&&(e=this.tabs.index(this.tabs.eq(e)),e===-1&&(e=!i&&0)),!i&&e===!1&&this.anchors.length&&(e=0),e},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(e){var i=t(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:s++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:n=!1,s--;break;case t.ui.keyCode.END:s=this.anchors.length-1;break;case t.ui.keyCode.HOME:s=0;break;case t.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s);case t.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(s!==this.options.active&&s);default:return}e.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),e.ctrlKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(e){return e.altKey&&e.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,i){function s(){return e>n&&(e=0),e<0&&(e=n),e}for(var n=this.tabs.length-1;t.inArray(s(),this.options.disabled)!==-1;)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,e){return"active"===t?void this._activate(e):"disabled"===t?void this._setupDisabled(e):(this._super(t,e),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",e),e||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(e),void("heightStyle"===t&&this._setupHeightStyle(e)))},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var o,a,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),c=l.attr("aria-controls");s(n)?(o=n.hash,a=e.element.find(e._sanitizeSelector(o))):(r=e._tabId(l),o="#"+r,a=e.element.find(o),a.length||(a=e._createPanel(r),a.insertAfter(e.panels[i-1]||e.tablist)),a.attr("aria-live","polite")),a.length&&(e.panels=e.panels.add(a)),c&&l.data("ui-tabs-aria-controls",c),l.attr({"aria-controls":o.substring(1),"aria-labelledby":h}),a.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||t.inArray(s,e)!==-1?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),o=n.closest("li"),a=o[0]===s[0],r=a&&i.collapsible,h=r?t():this._getPanelForTab(o),l=s.length?this._getPanelForTab(s):t(),c={oldTab:s,oldPanel:l,newTab:r?t():o,newPanel:h};e.preventDefault(),o.hasClass("ui-state-disabled")||o.hasClass("ui-tabs-loading")||this.running||a&&!i.collapsible||this._trigger("beforeActivate",e,c)===!1||(i.active=!r&&this.tabs.index(o),this.active=a?t():o,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(o),e),this._toggle(e,c))},_toggle:function(e,i){function s(){o.running=!1,o._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),a.length&&o.options.show?o._show(a,o.options.show,s):(a.show(),s())}var o=this,a=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}),i.oldTab.attr("aria-selected","false"),a.length&&r.length?i.oldTab.attr("tabIndex",-1):a.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),a.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),t.inArray(i,s)!==-1)return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,o=this.tabs.eq(e),a=o.find(".ui-tabs-anchor"),r=this._getPanelForTab(o),h={tab:o,panel:r};s(a[0])||(this.xhr=t.ajax(this._ajaxSettings(a,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(o.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),o.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,o){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:o},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})}(s),function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);n!==-1&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),void(this.options[e]=i)):(this._super(e,i),void("content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)})))},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,o=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=o),this._open(e,t,i)})}),void(i&&this._open(e,t,i)))},_open:function(i,s,n){function o(t){l.of=t,a.is(":hidden")||a.position(l)}var a,r,h,l=t.extend({},this.options.position);if(n){if(a=this._find(s),a.length)return void a.find(".ui-tooltip-content").html(n);s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),a=this._tooltip(s),e(s,a.attr("id")),a.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:o}),o(i)):a.position(t.extend({of:s},this.options.position)),a.hide(),this._show(a,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){a.is(":visible")&&(o(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:a}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(a)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),o=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),o.stop(!0),this._hide(o,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:o}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})}(s)}});
+	(function( jQuery, undefined ) {
+	
+		var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
+	
+		// plusequals test for += 100 -= 100
+		rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
+		// a set of RE's that can match strings and generate color tuples.
+		stringParsers = [{
+				re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+				parse: function( execResult ) {
+					return [
+						execResult[ 1 ],
+						execResult[ 2 ],
+						execResult[ 3 ],
+						execResult[ 4 ]
+					];
+				}
+			}, {
+				re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+				parse: function( execResult ) {
+					return [
+						execResult[ 1 ] * 2.55,
+						execResult[ 2 ] * 2.55,
+						execResult[ 3 ] * 2.55,
+						execResult[ 4 ]
+					];
+				}
+			}, {
+				// this regex ignores A-F because it's compared against an already lowercased string
+				re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
+				parse: function( execResult ) {
+					return [
+						parseInt( execResult[ 1 ], 16 ),
+						parseInt( execResult[ 2 ], 16 ),
+						parseInt( execResult[ 3 ], 16 )
+					];
+				}
+			}, {
+				// this regex ignores A-F because it's compared against an already lowercased string
+				re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
+				parse: function( execResult ) {
+					return [
+						parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
+						parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
+						parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
+					];
+				}
+			}, {
+				re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
+				space: "hsla",
+				parse: function( execResult ) {
+					return [
+						execResult[ 1 ],
+						execResult[ 2 ] / 100,
+						execResult[ 3 ] / 100,
+						execResult[ 4 ]
+					];
+				}
+			}],
+	
+		// jQuery.Color( )
+		color = jQuery.Color = function( color, green, blue, alpha ) {
+			return new jQuery.Color.fn.parse( color, green, blue, alpha );
+		},
+		spaces = {
+			rgba: {
+				props: {
+					red: {
+						idx: 0,
+						type: "byte"
+					},
+					green: {
+						idx: 1,
+						type: "byte"
+					},
+					blue: {
+						idx: 2,
+						type: "byte"
+					}
+				}
+			},
+	
+			hsla: {
+				props: {
+					hue: {
+						idx: 0,
+						type: "degrees"
+					},
+					saturation: {
+						idx: 1,
+						type: "percent"
+					},
+					lightness: {
+						idx: 2,
+						type: "percent"
+					}
+				}
+			}
+		},
+		propTypes = {
+			"byte": {
+				floor: true,
+				max: 255
+			},
+			"percent": {
+				max: 1
+			},
+			"degrees": {
+				mod: 360,
+				floor: true
+			}
+		},
+		support = color.support = {},
+	
+		// element for support tests
+		supportElem = jQuery( "<p>" )[ 0 ],
+	
+		// colors = jQuery.Color.names
+		colors,
+	
+		// local aliases of functions called often
+		each = jQuery.each;
+	
+	// determine rgba support immediately
+	supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
+	support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
+	
+	// define cache name and alpha properties
+	// for rgba and hsla spaces
+	each( spaces, function( spaceName, space ) {
+		space.cache = "_" + spaceName;
+		space.props.alpha = {
+			idx: 3,
+			type: "percent",
+			def: 1
+		};
+	});
+	
+	function clamp( value, prop, allowEmpty ) {
+		var type = propTypes[ prop.type ] || {};
+	
+		if ( value == null ) {
+			return (allowEmpty || !prop.def) ? null : prop.def;
+		}
+	
+		// ~~ is an short way of doing floor for positive numbers
+		value = type.floor ? ~~value : parseFloat( value );
+	
+		// IE will pass in empty strings as value for alpha,
+		// which will hit this case
+		if ( isNaN( value ) ) {
+			return prop.def;
+		}
+	
+		if ( type.mod ) {
+			// we add mod before modding to make sure that negatives values
+			// get converted properly: -10 -> 350
+			return (value + type.mod) % type.mod;
+		}
+	
+		// for now all property types without mod have min and max
+		return 0 > value ? 0 : type.max < value ? type.max : value;
+	}
+	
+	function stringParse( string ) {
+		var inst = color(),
+			rgba = inst._rgba = [];
+	
+		string = string.toLowerCase();
+	
+		each( stringParsers, function( i, parser ) {
+			var parsed,
+				match = parser.re.exec( string ),
+				values = match && parser.parse( match ),
+				spaceName = parser.space || "rgba";
+	
+			if ( values ) {
+				parsed = inst[ spaceName ]( values );
+	
+				// if this was an rgba parse the assignment might happen twice
+				// oh well....
+				inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
+				rgba = inst._rgba = parsed._rgba;
+	
+				// exit each( stringParsers ) here because we matched
+				return false;
+			}
+		});
+	
+		// Found a stringParser that handled it
+		if ( rgba.length ) {
+	
+			// if this came from a parsed string, force "transparent" when alpha is 0
+			// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
+			if ( rgba.join() === "0,0,0,0" ) {
+				jQuery.extend( rgba, colors.transparent );
+			}
+			return inst;
+		}
+	
+		// named colors
+		return colors[ string ];
+	}
+	
+	color.fn = jQuery.extend( color.prototype, {
+		parse: function( red, green, blue, alpha ) {
+			if ( red === undefined ) {
+				this._rgba = [ null, null, null, null ];
+				return this;
+			}
+			if ( red.jquery || red.nodeType ) {
+				red = jQuery( red ).css( green );
+				green = undefined;
+			}
+	
+			var inst = this,
+				type = jQuery.type( red ),
+				rgba = this._rgba = [];
+	
+			// more than 1 argument specified - assume ( red, green, blue, alpha )
+			if ( green !== undefined ) {
+				red = [ red, green, blue, alpha ];
+				type = "array";
+			}
+	
+			if ( type === "string" ) {
+				return this.parse( stringParse( red ) || colors._default );
+			}
+	
+			if ( type === "array" ) {
+				each( spaces.rgba.props, function( key, prop ) {
+					rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
+				});
+				return this;
+			}
+	
+			if ( type === "object" ) {
+				if ( red instanceof color ) {
+					each( spaces, function( spaceName, space ) {
+						if ( red[ space.cache ] ) {
+							inst[ space.cache ] = red[ space.cache ].slice();
+						}
+					});
+				} else {
+					each( spaces, function( spaceName, space ) {
+						var cache = space.cache;
+						each( space.props, function( key, prop ) {
+	
+							// if the cache doesn't exist, and we know how to convert
+							if ( !inst[ cache ] && space.to ) {
+	
+								// if the value was null, we don't need to copy it
+								// if the key was alpha, we don't need to copy it either
+								if ( key === "alpha" || red[ key ] == null ) {
+									return;
+								}
+								inst[ cache ] = space.to( inst._rgba );
+							}
+	
+							// this is the only case where we allow nulls for ALL properties.
+							// call clamp with alwaysAllowEmpty
+							inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
+						});
+	
+						// everything defined but alpha?
+						if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
+							// use the default of 1
+							inst[ cache ][ 3 ] = 1;
+							if ( space.from ) {
+								inst._rgba = space.from( inst[ cache ] );
+							}
+						}
+					});
+				}
+				return this;
+			}
+		},
+		is: function( compare ) {
+			var is = color( compare ),
+				same = true,
+				inst = this;
+	
+			each( spaces, function( _, space ) {
+				var localCache,
+					isCache = is[ space.cache ];
+				if (isCache) {
+					localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
+					each( space.props, function( _, prop ) {
+						if ( isCache[ prop.idx ] != null ) {
+							same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
+							return same;
+						}
+					});
+				}
+				return same;
+			});
+			return same;
+		},
+		_space: function() {
+			var used = [],
+				inst = this;
+			each( spaces, function( spaceName, space ) {
+				if ( inst[ space.cache ] ) {
+					used.push( spaceName );
+				}
+			});
+			return used.pop();
+		},
+		transition: function( other, distance ) {
+			var end = color( other ),
+				spaceName = end._space(),
+				space = spaces[ spaceName ],
+				startColor = this.alpha() === 0 ? color( "transparent" ) : this,
+				start = startColor[ space.cache ] || space.to( startColor._rgba ),
+				result = start.slice();
+	
+			end = end[ space.cache ];
+			each( space.props, function( key, prop ) {
+				var index = prop.idx,
+					startValue = start[ index ],
+					endValue = end[ index ],
+					type = propTypes[ prop.type ] || {};
+	
+				// if null, don't override start value
+				if ( endValue === null ) {
+					return;
+				}
+				// if null - use end
+				if ( startValue === null ) {
+					result[ index ] = endValue;
+				} else {
+					if ( type.mod ) {
+						if ( endValue - startValue > type.mod / 2 ) {
+							startValue += type.mod;
+						} else if ( startValue - endValue > type.mod / 2 ) {
+							startValue -= type.mod;
+						}
+					}
+					result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
+				}
+			});
+			return this[ spaceName ]( result );
+		},
+		blend: function( opaque ) {
+			// if we are already opaque - return ourself
+			if ( this._rgba[ 3 ] === 1 ) {
+				return this;
+			}
+	
+			var rgb = this._rgba.slice(),
+				a = rgb.pop(),
+				blend = color( opaque )._rgba;
+	
+			return color( jQuery.map( rgb, function( v, i ) {
+				return ( 1 - a ) * blend[ i ] + a * v;
+			}));
+		},
+		toRgbaString: function() {
+			var prefix = "rgba(",
+				rgba = jQuery.map( this._rgba, function( v, i ) {
+					return v == null ? ( i > 2 ? 1 : 0 ) : v;
+				});
+	
+			if ( rgba[ 3 ] === 1 ) {
+				rgba.pop();
+				prefix = "rgb(";
+			}
+	
+			return prefix + rgba.join() + ")";
+		},
+		toHslaString: function() {
+			var prefix = "hsla(",
+				hsla = jQuery.map( this.hsla(), function( v, i ) {
+					if ( v == null ) {
+						v = i > 2 ? 1 : 0;
+					}
+	
+					// catch 1 and 2
+					if ( i && i < 3 ) {
+						v = Math.round( v * 100 ) + "%";
+					}
+					return v;
+				});
+	
+			if ( hsla[ 3 ] === 1 ) {
+				hsla.pop();
+				prefix = "hsl(";
+			}
+			return prefix + hsla.join() + ")";
+		},
+		toHexString: function( includeAlpha ) {
+			var rgba = this._rgba.slice(),
+				alpha = rgba.pop();
+	
+			if ( includeAlpha ) {
+				rgba.push( ~~( alpha * 255 ) );
+			}
+	
+			return "#" + jQuery.map( rgba, function( v ) {
+	
+				// default to 0 when nulls exist
+				v = ( v || 0 ).toString( 16 );
+				return v.length === 1 ? "0" + v : v;
+			}).join("");
+		},
+		toString: function() {
+			return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
+		}
+	});
+	color.fn.parse.prototype = color.fn;
+	
+	// hsla conversions adapted from:
+	// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
+	
+	function hue2rgb( p, q, h ) {
+		h = ( h + 1 ) % 1;
+		if ( h * 6 < 1 ) {
+			return p + (q - p) * h * 6;
+		}
+		if ( h * 2 < 1) {
+			return q;
+		}
+		if ( h * 3 < 2 ) {
+			return p + (q - p) * ((2/3) - h) * 6;
+		}
+		return p;
+	}
+	
+	spaces.hsla.to = function ( rgba ) {
+		if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
+			return [ null, null, null, rgba[ 3 ] ];
+		}
+		var r = rgba[ 0 ] / 255,
+			g = rgba[ 1 ] / 255,
+			b = rgba[ 2 ] / 255,
+			a = rgba[ 3 ],
+			max = Math.max( r, g, b ),
+			min = Math.min( r, g, b ),
+			diff = max - min,
+			add = max + min,
+			l = add * 0.5,
+			h, s;
+	
+		if ( min === max ) {
+			h = 0;
+		} else if ( r === max ) {
+			h = ( 60 * ( g - b ) / diff ) + 360;
+		} else if ( g === max ) {
+			h = ( 60 * ( b - r ) / diff ) + 120;
+		} else {
+			h = ( 60 * ( r - g ) / diff ) + 240;
+		}
+	
+		// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
+		// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
+		if ( diff === 0 ) {
+			s = 0;
+		} else if ( l <= 0.5 ) {
+			s = diff / add;
+		} else {
+			s = diff / ( 2 - add );
+		}
+		return [ Math.round(h) % 360, s, l, a == null ? 1 : a ];
+	};
+	
+	spaces.hsla.from = function ( hsla ) {
+		if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
+			return [ null, null, null, hsla[ 3 ] ];
+		}
+		var h = hsla[ 0 ] / 360,
+			s = hsla[ 1 ],
+			l = hsla[ 2 ],
+			a = hsla[ 3 ],
+			q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
+			p = 2 * l - q;
+	
+		return [
+			Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
+			Math.round( hue2rgb( p, q, h ) * 255 ),
+			Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
+			a
+		];
+	};
+	
+	
+	each( spaces, function( spaceName, space ) {
+		var props = space.props,
+			cache = space.cache,
+			to = space.to,
+			from = space.from;
+	
+		// makes rgba() and hsla()
+		color.fn[ spaceName ] = function( value ) {
+	
+			// generate a cache for this space if it doesn't exist
+			if ( to && !this[ cache ] ) {
+				this[ cache ] = to( this._rgba );
+			}
+			if ( value === undefined ) {
+				return this[ cache ].slice();
+			}
+	
+			var ret,
+				type = jQuery.type( value ),
+				arr = ( type === "array" || type === "object" ) ? value : arguments,
+				local = this[ cache ].slice();
+	
+			each( props, function( key, prop ) {
+				var val = arr[ type === "object" ? key : prop.idx ];
+				if ( val == null ) {
+					val = local[ prop.idx ];
+				}
+				local[ prop.idx ] = clamp( val, prop );
+			});
+	
+			if ( from ) {
+				ret = color( from( local ) );
+				ret[ cache ] = local;
+				return ret;
+			} else {
+				return color( local );
+			}
+		};
+	
+		// makes red() green() blue() alpha() hue() saturation() lightness()
+		each( props, function( key, prop ) {
+			// alpha is included in more than one space
+			if ( color.fn[ key ] ) {
+				return;
+			}
+			color.fn[ key ] = function( value ) {
+				var vtype = jQuery.type( value ),
+					fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
+					local = this[ fn ](),
+					cur = local[ prop.idx ],
+					match;
+	
+				if ( vtype === "undefined" ) {
+					return cur;
+				}
+	
+				if ( vtype === "function" ) {
+					value = value.call( this, cur );
+					vtype = jQuery.type( value );
+				}
+				if ( value == null && prop.empty ) {
+					return this;
+				}
+				if ( vtype === "string" ) {
+					match = rplusequals.exec( value );
+					if ( match ) {
+						value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
+					}
+				}
+				local[ prop.idx ] = value;
+				return this[ fn ]( local );
+			};
+		});
+	});
+	
+	// add cssHook and .fx.step function for each named hook.
+	// accept a space separated string of properties
+	color.hook = function( hook ) {
+		var hooks = hook.split( " " );
+		each( hooks, function( i, hook ) {
+			jQuery.cssHooks[ hook ] = {
+				set: function( elem, value ) {
+					var parsed, curElem,
+						backgroundColor = "";
+	
+					if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) {
+						value = color( parsed || value );
+						if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
+							curElem = hook === "backgroundColor" ? elem.parentNode : elem;
+							while (
+								(backgroundColor === "" || backgroundColor === "transparent") &&
+								curElem && curElem.style
+							) {
+								try {
+									backgroundColor = jQuery.css( curElem, "backgroundColor" );
+									curElem = curElem.parentNode;
+								} catch ( e ) {
+								}
+							}
+	
+							value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
+								backgroundColor :
+								"_default" );
+						}
+	
+						value = value.toRgbaString();
+					}
+					try {
+						elem.style[ hook ] = value;
+					} catch( e ) {
+						// wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit'
+					}
+				}
+			};
+			jQuery.fx.step[ hook ] = function( fx ) {
+				if ( !fx.colorInit ) {
+					fx.start = color( fx.elem, hook );
+					fx.end = color( fx.end );
+					fx.colorInit = true;
+				}
+				jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
+			};
+		});
+	
+	};
+	
+	color.hook( stepHooks );
+	
+	jQuery.cssHooks.borderColor = {
+		expand: function( value ) {
+			var expanded = {};
+	
+			each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
+				expanded[ "border" + part + "Color" ] = value;
+			});
+			return expanded;
+		}
+	};
+	
+	// Basic color names only.
+	// Usage of any of the other color names requires adding yourself or including
+	// jquery.color.svg-names.js.
+	colors = jQuery.Color.names = {
+		// 4.1. Basic color keywords
+		aqua: "#00ffff",
+		black: "#000000",
+		blue: "#0000ff",
+		fuchsia: "#ff00ff",
+		gray: "#808080",
+		green: "#008000",
+		lime: "#00ff00",
+		maroon: "#800000",
+		navy: "#000080",
+		olive: "#808000",
+		purple: "#800080",
+		red: "#ff0000",
+		silver: "#c0c0c0",
+		teal: "#008080",
+		white: "#ffffff",
+		yellow: "#ffff00",
+	
+		// 4.2.3. "transparent" color keyword
+		transparent: [ null, null, null, 0 ],
+	
+		_default: "#ffffff"
+	};
+	
+	})( jQuery );
+	
+	
+	/******************************************************************************/
+	/****************************** CLASS ANIMATIONS ******************************/
+	/******************************************************************************/
+	(function() {
+	
+	var classAnimationActions = [ "add", "remove", "toggle" ],
+		shorthandStyles = {
+			border: 1,
+			borderBottom: 1,
+			borderColor: 1,
+			borderLeft: 1,
+			borderRight: 1,
+			borderTop: 1,
+			borderWidth: 1,
+			margin: 1,
+			padding: 1
+		};
+	
+	$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) {
+		$.fx.step[ prop ] = function( fx ) {
+			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
+				jQuery.style( fx.elem, prop, fx.end );
+				fx.setAttr = true;
+			}
+		};
+	});
+	
+	function getElementStyles( elem ) {
+		var key, len,
+			style = elem.ownerDocument.defaultView ?
+				elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
+				elem.currentStyle,
+			styles = {};
+	
+		if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
+			len = style.length;
+			while ( len-- ) {
+				key = style[ len ];
+				if ( typeof style[ key ] === "string" ) {
+					styles[ $.camelCase( key ) ] = style[ key ];
+				}
+			}
+		// support: Opera, IE <9
+		} else {
+			for ( key in style ) {
+				if ( typeof style[ key ] === "string" ) {
+					styles[ key ] = style[ key ];
+				}
+			}
+		}
+	
+		return styles;
+	}
+	
+	
+	function styleDifference( oldStyle, newStyle ) {
+		var diff = {},
+			name, value;
+	
+		for ( name in newStyle ) {
+			value = newStyle[ name ];
+			if ( oldStyle[ name ] !== value ) {
+				if ( !shorthandStyles[ name ] ) {
+					if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
+						diff[ name ] = value;
+					}
+				}
+			}
+		}
+	
+		return diff;
+	}
+	
+	// support: jQuery <1.8
+	if ( !$.fn.addBack ) {
+		$.fn.addBack = function( selector ) {
+			return this.add( selector == null ?
+				this.prevObject : this.prevObject.filter( selector )
+			);
+		};
+	}
+	
+	$.effects.animateClass = function( value, duration, easing, callback ) {
+		var o = $.speed( duration, easing, callback );
+	
+		return this.queue( function() {
+			var animated = $( this ),
+				baseClass = animated.attr( "class" ) || "",
+				applyClassChange,
+				allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
+	
+			// map the animated objects to store the original styles.
+			allAnimations = allAnimations.map(function() {
+				var el = $( this );
+				return {
+					el: el,
+					start: getElementStyles( this )
+				};
+			});
+	
+			// apply class change
+			applyClassChange = function() {
+				$.each( classAnimationActions, function(i, action) {
+					if ( value[ action ] ) {
+						animated[ action + "Class" ]( value[ action ] );
+					}
+				});
+			};
+			applyClassChange();
+	
+			// map all animated objects again - calculate new styles and diff
+			allAnimations = allAnimations.map(function() {
+				this.end = getElementStyles( this.el[ 0 ] );
+				this.diff = styleDifference( this.start, this.end );
+				return this;
+			});
+	
+			// apply original class
+			animated.attr( "class", baseClass );
+	
+			// map all animated objects again - this time collecting a promise
+			allAnimations = allAnimations.map(function() {
+				var styleInfo = this,
+					dfd = $.Deferred(),
+					opts = $.extend({}, o, {
+						queue: false,
+						complete: function() {
+							dfd.resolve( styleInfo );
+						}
+					});
+	
+				this.el.animate( this.diff, opts );
+				return dfd.promise();
+			});
+	
+			// once all animations have completed:
+			$.when.apply( $, allAnimations.get() ).done(function() {
+	
+				// set the final class
+				applyClassChange();
+	
+				// for each animated element,
+				// clear all css properties that were animated
+				$.each( arguments, function() {
+					var el = this.el;
+					$.each( this.diff, function(key) {
+						el.css( key, "" );
+					});
+				});
+	
+				// this is guarnteed to be there if you use jQuery.speed()
+				// it also handles dequeuing the next anim...
+				o.complete.call( animated[ 0 ] );
+			});
+		});
+	};
+	
+	$.fn.extend({
+		addClass: (function( orig ) {
+			return function( classNames, speed, easing, callback ) {
+				return speed ?
+					$.effects.animateClass.call( this,
+						{ add: classNames }, speed, easing, callback ) :
+					orig.apply( this, arguments );
+			};
+		})( $.fn.addClass ),
+	
+		removeClass: (function( orig ) {
+			return function( classNames, speed, easing, callback ) {
+				return arguments.length > 1 ?
+					$.effects.animateClass.call( this,
+						{ remove: classNames }, speed, easing, callback ) :
+					orig.apply( this, arguments );
+			};
+		})( $.fn.removeClass ),
+	
+		toggleClass: (function( orig ) {
+			return function( classNames, force, speed, easing, callback ) {
+				if ( typeof force === "boolean" || force === undefined ) {
+					if ( !speed ) {
+						// without speed parameter
+						return orig.apply( this, arguments );
+					} else {
+						return $.effects.animateClass.call( this,
+							(force ? { add: classNames } : { remove: classNames }),
+							speed, easing, callback );
+					}
+				} else {
+					// without force parameter
+					return $.effects.animateClass.call( this,
+						{ toggle: classNames }, force, speed, easing );
+				}
+			};
+		})( $.fn.toggleClass ),
+	
+		switchClass: function( remove, add, speed, easing, callback) {
+			return $.effects.animateClass.call( this, {
+				add: add,
+				remove: remove
+			}, speed, easing, callback );
+		}
+	});
+	
+	})();
+	
+	/******************************************************************************/
+	/*********************************** EFFECTS **********************************/
+	/******************************************************************************/
+	
+	(function() {
+	
+	$.extend( $.effects, {
+		version: "1.10.3",
+	
+		// Saves a set of properties in a data storage
+		save: function( element, set ) {
+			for( var i=0; i < set.length; i++ ) {
+				if ( set[ i ] !== null ) {
+					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
+				}
+			}
+		},
+	
+		// Restores a set of previously saved properties from a data storage
+		restore: function( element, set ) {
+			var val, i;
+			for( i=0; i < set.length; i++ ) {
+				if ( set[ i ] !== null ) {
+					val = element.data( dataSpace + set[ i ] );
+					// support: jQuery 1.6.2
+					// http://bugs.jquery.com/ticket/9917
+					// jQuery 1.6.2 incorrectly returns undefined for any falsy value.
+					// We can't differentiate between "" and 0 here, so we just assume
+					// empty string since it's likely to be a more common value...
+					if ( val === undefined ) {
+						val = "";
+					}
+					element.css( set[ i ], val );
+				}
+			}
+		},
+	
+		setMode: function( el, mode ) {
+			if (mode === "toggle") {
+				mode = el.is( ":hidden" ) ? "show" : "hide";
+			}
+			return mode;
+		},
+	
+		// Translates a [top,left] array into a baseline value
+		// this should be a little more flexible in the future to handle a string & hash
+		getBaseline: function( origin, original ) {
+			var y, x;
+			switch ( origin[ 0 ] ) {
+				case "top": y = 0; break;
+				case "middle": y = 0.5; break;
+				case "bottom": y = 1; break;
+				default: y = origin[ 0 ] / original.height;
+			}
+			switch ( origin[ 1 ] ) {
+				case "left": x = 0; break;
+				case "center": x = 0.5; break;
+				case "right": x = 1; break;
+				default: x = origin[ 1 ] / original.width;
+			}
+			return {
+				x: x,
+				y: y
+			};
+		},
+	
+		// Wraps the element around a wrapper that copies position properties
+		createWrapper: function( element ) {
+	
+			// if the element is already wrapped, return it
+			if ( element.parent().is( ".ui-effects-wrapper" )) {
+				return element.parent();
+			}
+	
+			// wrap the element
+			var props = {
+					width: element.outerWidth(true),
+					height: element.outerHeight(true),
+					"float": element.css( "float" )
+				},
+				wrapper = $( "<div></div>" )
+					.addClass( "ui-effects-wrapper" )
+					.css({
+						fontSize: "100%",
+						background: "transparent",
+						border: "none",
+						margin: 0,
+						padding: 0
+					}),
+				// Store the size in case width/height are defined in % - Fixes #5245
+				size = {
+					width: element.width(),
+					height: element.height()
+				},
+				active = document.activeElement;
+	
+			// support: Firefox
+			// Firefox incorrectly exposes anonymous content
+			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
+			try {
+				active.id;
+			} catch( e ) {
+				active = document.body;
+			}
+	
+			element.wrap( wrapper );
+	
+			// Fixes #7595 - Elements lose focus when wrapped.
+			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+				$( active ).focus();
+			}
+	
+			wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element
+	
+			// transfer positioning properties to the wrapper
+			if ( element.css( "position" ) === "static" ) {
+				wrapper.css({ position: "relative" });
+				element.css({ position: "relative" });
+			} else {
+				$.extend( props, {
+					position: element.css( "position" ),
+					zIndex: element.css( "z-index" )
+				});
+				$.each([ "top", "left", "bottom", "right" ], function(i, pos) {
+					props[ pos ] = element.css( pos );
+					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
+						props[ pos ] = "auto";
+					}
+				});
+				element.css({
+					position: "relative",
+					top: 0,
+					left: 0,
+					right: "auto",
+					bottom: "auto"
+				});
+			}
+			element.css(size);
+	
+			return wrapper.css( props ).show();
+		},
+	
+		removeWrapper: function( element ) {
+			var active = document.activeElement;
+	
+			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
+				element.parent().replaceWith( element );
+	
+				// Fixes #7595 - Elements lose focus when wrapped.
+				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
+					$( active ).focus();
+				}
+			}
+	
+	
+			return element;
+		},
+	
+		setTransition: function( element, list, factor, value ) {
+			value = value || {};
+			$.each( list, function( i, x ) {
+				var unit = element.cssUnit( x );
+				if ( unit[ 0 ] > 0 ) {
+					value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
+				}
+			});
+			return value;
+		}
+	});
+	
+	// return an effect options object for the given parameters:
+	function _normalizeArguments( effect, options, speed, callback ) {
+	
+		// allow passing all options as the first parameter
+		if ( $.isPlainObject( effect ) ) {
+			options = effect;
+			effect = effect.effect;
+		}
+	
+		// convert to an object
+		effect = { effect: effect };
+	
+		// catch (effect, null, ...)
+		if ( options == null ) {
+			options = {};
+		}
+	
+		// catch (effect, callback)
+		if ( $.isFunction( options ) ) {
+			callback = options;
+			speed = null;
+			options = {};
+		}
+	
+		// catch (effect, speed, ?)
+		if ( typeof options === "number" || $.fx.speeds[ options ] ) {
+			callback = speed;
+			speed = options;
+			options = {};
+		}
+	
+		// catch (effect, options, callback)
+		if ( $.isFunction( speed ) ) {
+			callback = speed;
+			speed = null;
+		}
+	
+		// add options to effect
+		if ( options ) {
+			$.extend( effect, options );
+		}
+	
+		speed = speed || options.duration;
+		effect.duration = $.fx.off ? 0 :
+			typeof speed === "number" ? speed :
+			speed in $.fx.speeds ? $.fx.speeds[ speed ] :
+			$.fx.speeds._default;
+	
+		effect.complete = callback || options.complete;
+	
+		return effect;
+	}
+	
+	function standardAnimationOption( option ) {
+		// Valid standard speeds (nothing, number, named speed)
+		if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
+			return true;
+		}
+	
+		// Invalid strings - treat as "normal" speed
+		if ( typeof option === "string" && !$.effects.effect[ option ] ) {
+			return true;
+		}
+	
+		// Complete callback
+		if ( $.isFunction( option ) ) {
+			return true;
+		}
+	
+		// Options hash (but not naming an effect)
+		if ( typeof option === "object" && !option.effect ) {
+			return true;
+		}
+	
+		// Didn't match any standard API
+		return false;
+	}
+	
+	$.fn.extend({
+		effect: function( /* effect, options, speed, callback */ ) {
+			var args = _normalizeArguments.apply( this, arguments ),
+				mode = args.mode,
+				queue = args.queue,
+				effectMethod = $.effects.effect[ args.effect ];
+	
+			if ( $.fx.off || !effectMethod ) {
+				// delegate to the original method (e.g., .show()) if possible
+				if ( mode ) {
+					return this[ mode ]( args.duration, args.complete );
+				} else {
+					return this.each( function() {
+						if ( args.complete ) {
+							args.complete.call( this );
+						}
+					});
+				}
+			}
+	
+			function run( next ) {
+				var elem = $( this ),
+					complete = args.complete,
+					mode = args.mode;
+	
+				function done() {
+					if ( $.isFunction( complete ) ) {
+						complete.call( elem[0] );
+					}
+					if ( $.isFunction( next ) ) {
+						next();
+					}
+				}
+	
+				// If the element already has the correct final state, delegate to
+				// the core methods so the internal tracking of "olddisplay" works.
+				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
+					elem[ mode ]();
+					done();
+				} else {
+					effectMethod.call( elem[0], args, done );
+				}
+			}
+	
+			return queue === false ? this.each( run ) : this.queue( queue || "fx", run );
+		},
+	
+		show: (function( orig ) {
+			return function( option ) {
+				if ( standardAnimationOption( option ) ) {
+					return orig.apply( this, arguments );
+				} else {
+					var args = _normalizeArguments.apply( this, arguments );
+					args.mode = "show";
+					return this.effect.call( this, args );
+				}
+			};
+		})( $.fn.show ),
+	
+		hide: (function( orig ) {
+			return function( option ) {
+				if ( standardAnimationOption( option ) ) {
+					return orig.apply( this, arguments );
+				} else {
+					var args = _normalizeArguments.apply( this, arguments );
+					args.mode = "hide";
+					return this.effect.call( this, args );
+				}
+			};
+		})( $.fn.hide ),
+	
+		toggle: (function( orig ) {
+			return function( option ) {
+				if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
+					return orig.apply( this, arguments );
+				} else {
+					var args = _normalizeArguments.apply( this, arguments );
+					args.mode = "toggle";
+					return this.effect.call( this, args );
+				}
+			};
+		})( $.fn.toggle ),
+	
+		// helper functions
+		cssUnit: function(key) {
+			var style = this.css( key ),
+				val = [];
+	
+			$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
+				if ( style.indexOf( unit ) > 0 ) {
+					val = [ parseFloat( style ), unit ];
+				}
+			});
+			return val;
+		}
+	});
+	
+	})();
+	
+	/******************************************************************************/
+	/*********************************** EASING ***********************************/
+	/******************************************************************************/
+	
+	(function() {
+	
+	// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
+	
+	var baseEasings = {};
+	
+	$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
+		baseEasings[ name ] = function( p ) {
+			return Math.pow( p, i + 2 );
+		};
+	});
+	
+	$.extend( baseEasings, {
+		Sine: function ( p ) {
+			return 1 - Math.cos( p * Math.PI / 2 );
+		},
+		Circ: function ( p ) {
+			return 1 - Math.sqrt( 1 - p * p );
+		},
+		Elastic: function( p ) {
+			return p === 0 || p === 1 ? p :
+				-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );
+		},
+		Back: function( p ) {
+			return p * p * ( 3 * p - 2 );
+		},
+		Bounce: function ( p ) {
+			var pow2,
+				bounce = 4;
+	
+			while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
+			return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
+		}
+	});
+	
+	$.each( baseEasings, function( name, easeIn ) {
+		$.easing[ "easeIn" + name ] = easeIn;
+		$.easing[ "easeOut" + name ] = function( p ) {
+			return 1 - easeIn( 1 - p );
+		};
+		$.easing[ "easeInOut" + name ] = function( p ) {
+			return p < 0.5 ?
+				easeIn( p * 2 ) / 2 :
+				1 - easeIn( p * -2 + 2 ) / 2;
+		};
+	});
+	
+	})();
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	var uid = 0,
+		hideProps = {},
+		showProps = {};
+	
+	hideProps.height = hideProps.paddingTop = hideProps.paddingBottom =
+		hideProps.borderTopWidth = hideProps.borderBottomWidth = "hide";
+	showProps.height = showProps.paddingTop = showProps.paddingBottom =
+		showProps.borderTopWidth = showProps.borderBottomWidth = "show";
+	
+	$.widget( "ui.accordion", {
+		version: "1.10.3",
+		options: {
+			active: 0,
+			animate: {},
+			collapsible: false,
+			event: "click",
+			header: "> li > :first-child,> :not(li):even",
+			heightStyle: "auto",
+			icons: {
+				activeHeader: "ui-icon-triangle-1-s",
+				header: "ui-icon-triangle-1-e"
+			},
+	
+			// callbacks
+			activate: null,
+			beforeActivate: null
+		},
+	
+		_create: function() {
+			var options = this.options;
+			this.prevShow = this.prevHide = $();
+			this.element.addClass( "ui-accordion ui-widget ui-helper-reset" )
+				// ARIA
+				.attr( "role", "tablist" );
+	
+			// don't allow collapsible: false and active: false / null
+			if ( !options.collapsible && (options.active === false || options.active == null) ) {
+				options.active = 0;
+			}
+	
+			this._processPanels();
+			// handle negative values
+			if ( options.active < 0 ) {
+				options.active += this.headers.length;
+			}
+			this._refresh();
+		},
+	
+		_getCreateEventData: function() {
+			return {
+				header: this.active,
+				panel: !this.active.length ? $() : this.active.next(),
+				content: !this.active.length ? $() : this.active.next()
+			};
+		},
+	
+		_createIcons: function() {
+			var icons = this.options.icons;
+			if ( icons ) {
+				$( "<span>" )
+					.addClass( "ui-accordion-header-icon ui-icon " + icons.header )
+					.prependTo( this.headers );
+				this.active.children( ".ui-accordion-header-icon" )
+					.removeClass( icons.header )
+					.addClass( icons.activeHeader );
+				this.headers.addClass( "ui-accordion-icons" );
+			}
+		},
+	
+		_destroyIcons: function() {
+			this.headers
+				.removeClass( "ui-accordion-icons" )
+				.children( ".ui-accordion-header-icon" )
+					.remove();
+		},
+	
+		_destroy: function() {
+			var contents;
+	
+			// clean up main element
+			this.element
+				.removeClass( "ui-accordion ui-widget ui-helper-reset" )
+				.removeAttr( "role" );
+	
+			// clean up headers
+			this.headers
+				.removeClass( "ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top" )
+				.removeAttr( "role" )
+				.removeAttr( "aria-selected" )
+				.removeAttr( "aria-controls" )
+				.removeAttr( "tabIndex" )
+				.each(function() {
+					if ( /^ui-accordion/.test( this.id ) ) {
+						this.removeAttribute( "id" );
+					}
+				});
+			this._destroyIcons();
+	
+			// clean up content panels
+			contents = this.headers.next()
+				.css( "display", "" )
+				.removeAttr( "role" )
+				.removeAttr( "aria-expanded" )
+				.removeAttr( "aria-hidden" )
+				.removeAttr( "aria-labelledby" )
+				.removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled" )
+				.each(function() {
+					if ( /^ui-accordion/.test( this.id ) ) {
+						this.removeAttribute( "id" );
+					}
+				});
+			if ( this.options.heightStyle !== "content" ) {
+				contents.css( "height", "" );
+			}
+		},
+	
+		_setOption: function( key, value ) {
+			if ( key === "active" ) {
+				// _activate() will handle invalid values and update this.options
+				this._activate( value );
+				return;
+			}
+	
+			if ( key === "event" ) {
+				if ( this.options.event ) {
+					this._off( this.headers, this.options.event );
+				}
+				this._setupEvents( value );
+			}
+	
+			this._super( key, value );
+	
+			// setting collapsible: false while collapsed; open first panel
+			if ( key === "collapsible" && !value && this.options.active === false ) {
+				this._activate( 0 );
+			}
+	
+			if ( key === "icons" ) {
+				this._destroyIcons();
+				if ( value ) {
+					this._createIcons();
+				}
+			}
+	
+			// #5332 - opacity doesn't cascade to positioned elements in IE
+			// so we need to add the disabled class to the headers and panels
+			if ( key === "disabled" ) {
+				this.headers.add( this.headers.next() )
+					.toggleClass( "ui-state-disabled", !!value );
+			}
+		},
+	
+		_keydown: function( event ) {
+			/*jshint maxcomplexity:15*/
+			if ( event.altKey || event.ctrlKey ) {
+				return;
+			}
+	
+			var keyCode = $.ui.keyCode,
+				length = this.headers.length,
+				currentIndex = this.headers.index( event.target ),
+				toFocus = false;
+	
+			switch ( event.keyCode ) {
+				case keyCode.RIGHT:
+				case keyCode.DOWN:
+					toFocus = this.headers[ ( currentIndex + 1 ) % length ];
+					break;
+				case keyCode.LEFT:
+				case keyCode.UP:
+					toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
+					break;
+				case keyCode.SPACE:
+				case keyCode.ENTER:
+					this._eventHandler( event );
+					break;
+				case keyCode.HOME:
+					toFocus = this.headers[ 0 ];
+					break;
+				case keyCode.END:
+					toFocus = this.headers[ length - 1 ];
+					break;
+			}
+	
+			if ( toFocus ) {
+				$( event.target ).attr( "tabIndex", -1 );
+				$( toFocus ).attr( "tabIndex", 0 );
+				toFocus.focus();
+				event.preventDefault();
+			}
+		},
+	
+		_panelKeyDown : function( event ) {
+			if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
+				$( event.currentTarget ).prev().focus();
+			}
+		},
+	
+		refresh: function() {
+			var options = this.options;
+			this._processPanels();
+	
+			// was collapsed or no panel
+			if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {
+				options.active = false;
+				this.active = $();
+			// active false only when collapsible is true
+			} else if ( options.active === false ) {
+				this._activate( 0 );
+			// was active, but active panel is gone
+			} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+				// all remaining panel are disabled
+				if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) {
+					options.active = false;
+					this.active = $();
+				// activate previous panel
+				} else {
+					this._activate( Math.max( 0, options.active - 1 ) );
+				}
+			// was active, active panel still exists
+			} else {
+				// make sure active index is correct
+				options.active = this.headers.index( this.active );
+			}
+	
+			this._destroyIcons();
+	
+			this._refresh();
+		},
+	
+		_processPanels: function() {
+			this.headers = this.element.find( this.options.header )
+				.addClass( "ui-accordion-header ui-helper-reset ui-state-default ui-corner-all" );
+	
+			this.headers.next()
+				.addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" )
+				.filter(":not(.ui-accordion-content-active)")
+				.hide();
+		},
+	
+		_refresh: function() {
+			var maxHeight,
+				options = this.options,
+				heightStyle = options.heightStyle,
+				parent = this.element.parent(),
+				accordionId = this.accordionId = "ui-accordion-" +
+					(this.element.attr( "id" ) || ++uid);
+	
+			this.active = this._findActive( options.active )
+				.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" )
+				.removeClass( "ui-corner-all" );
+			this.active.next()
+				.addClass( "ui-accordion-content-active" )
+				.show();
+	
+			this.headers
+				.attr( "role", "tab" )
+				.each(function( i ) {
+					var header = $( this ),
+						headerId = header.attr( "id" ),
+						panel = header.next(),
+						panelId = panel.attr( "id" );
+					if ( !headerId ) {
+						headerId = accordionId + "-header-" + i;
+						header.attr( "id", headerId );
+					}
+					if ( !panelId ) {
+						panelId = accordionId + "-panel-" + i;
+						panel.attr( "id", panelId );
+					}
+					header.attr( "aria-controls", panelId );
+					panel.attr( "aria-labelledby", headerId );
+				})
+				.next()
+					.attr( "role", "tabpanel" );
+	
+			this.headers
+				.not( this.active )
+				.attr({
+					"aria-selected": "false",
+					tabIndex: -1
+				})
+				.next()
+					.attr({
+						"aria-expanded": "false",
+						"aria-hidden": "true"
+					})
+					.hide();
+	
+			// make sure at least one header is in the tab order
+			if ( !this.active.length ) {
+				this.headers.eq( 0 ).attr( "tabIndex", 0 );
+			} else {
+				this.active.attr({
+					"aria-selected": "true",
+					tabIndex: 0
+				})
+				.next()
+					.attr({
+						"aria-expanded": "true",
+						"aria-hidden": "false"
+					});
+			}
+	
+			this._createIcons();
+	
+			this._setupEvents( options.event );
+	
+			if ( heightStyle === "fill" ) {
+				maxHeight = parent.height();
+				this.element.siblings( ":visible" ).each(function() {
+					var elem = $( this ),
+						position = elem.css( "position" );
+	
+					if ( position === "absolute" || position === "fixed" ) {
+						return;
+					}
+					maxHeight -= elem.outerHeight( true );
+				});
+	
+				this.headers.each(function() {
+					maxHeight -= $( this ).outerHeight( true );
+				});
+	
+				this.headers.next()
+					.each(function() {
+						$( this ).height( Math.max( 0, maxHeight -
+							$( this ).innerHeight() + $( this ).height() ) );
+					})
+					.css( "overflow", "auto" );
+			} else if ( heightStyle === "auto" ) {
+				maxHeight = 0;
+				this.headers.next()
+					.each(function() {
+						maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
+					})
+					.height( maxHeight );
+			}
+		},
+	
+		_activate: function( index ) {
+			var active = this._findActive( index )[ 0 ];
+	
+			// trying to activate the already active panel
+			if ( active === this.active[ 0 ] ) {
+				return;
+			}
+	
+			// trying to collapse, simulate a click on the currently active header
+			active = active || this.active[ 0 ];
+	
+			this._eventHandler({
+				target: active,
+				currentTarget: active,
+				preventDefault: $.noop
+			});
+		},
+	
+		_findActive: function( selector ) {
+			return typeof selector === "number" ? this.headers.eq( selector ) : $();
+		},
+	
+		_setupEvents: function( event ) {
+			var events = {
+				keydown: "_keydown"
+			};
+			if ( event ) {
+				$.each( event.split(" "), function( index, eventName ) {
+					events[ eventName ] = "_eventHandler";
+				});
+			}
+	
+			this._off( this.headers.add( this.headers.next() ) );
+			this._on( this.headers, events );
+			this._on( this.headers.next(), { keydown: "_panelKeyDown" });
+			this._hoverable( this.headers );
+			this._focusable( this.headers );
+		},
+	
+		_eventHandler: function( event ) {
+			var options = this.options,
+				active = this.active,
+				clicked = $( event.currentTarget ),
+				clickedIsActive = clicked[ 0 ] === active[ 0 ],
+				collapsing = clickedIsActive && options.collapsible,
+				toShow = collapsing ? $() : clicked.next(),
+				toHide = active.next(),
+				eventData = {
+					oldHeader: active,
+					oldPanel: toHide,
+					newHeader: collapsing ? $() : clicked,
+					newPanel: toShow
+				};
+	
+			event.preventDefault();
+	
+			if (
+					// click on active header, but not collapsible
+					( clickedIsActive && !options.collapsible ) ||
+					// allow canceling activation
+					( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
+				return;
+			}
+	
+			options.active = collapsing ? false : this.headers.index( clicked );
+	
+			// when the call to ._toggle() comes after the class changes
+			// it causes a very odd bug in IE 8 (see #6720)
+			this.active = clickedIsActive ? $() : clicked;
+			this._toggle( eventData );
+	
+			// switch classes
+			// corner classes on the previously active header stay after the animation
+			active.removeClass( "ui-accordion-header-active ui-state-active" );
+			if ( options.icons ) {
+				active.children( ".ui-accordion-header-icon" )
+					.removeClass( options.icons.activeHeader )
+					.addClass( options.icons.header );
+			}
+	
+			if ( !clickedIsActive ) {
+				clicked
+					.removeClass( "ui-corner-all" )
+					.addClass( "ui-accordion-header-active ui-state-active ui-corner-top" );
+				if ( options.icons ) {
+					clicked.children( ".ui-accordion-header-icon" )
+						.removeClass( options.icons.header )
+						.addClass( options.icons.activeHeader );
+				}
+	
+				clicked
+					.next()
+					.addClass( "ui-accordion-content-active" );
+			}
+		},
+	
+		_toggle: function( data ) {
+			var toShow = data.newPanel,
+				toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
+	
+			// handle activating a panel during the animation for another activation
+			this.prevShow.add( this.prevHide ).stop( true, true );
+			this.prevShow = toShow;
+			this.prevHide = toHide;
+	
+			if ( this.options.animate ) {
+				this._animate( toShow, toHide, data );
+			} else {
+				toHide.hide();
+				toShow.show();
+				this._toggleComplete( data );
+			}
+	
+			toHide.attr({
+				"aria-expanded": "false",
+				"aria-hidden": "true"
+			});
+			toHide.prev().attr( "aria-selected", "false" );
+			// if we're switching panels, remove the old header from the tab order
+			// if we're opening from collapsed state, remove the previous header from the tab order
+			// if we're collapsing, then keep the collapsing header in the tab order
+			if ( toShow.length && toHide.length ) {
+				toHide.prev().attr( "tabIndex", -1 );
+			} else if ( toShow.length ) {
+				this.headers.filter(function() {
+					return $( this ).attr( "tabIndex" ) === 0;
+				})
+				.attr( "tabIndex", -1 );
+			}
+	
+			toShow
+				.attr({
+					"aria-expanded": "true",
+					"aria-hidden": "false"
+				})
+				.prev()
+					.attr({
+						"aria-selected": "true",
+						tabIndex: 0
+					});
+		},
+	
+		_animate: function( toShow, toHide, data ) {
+			var total, easing, duration,
+				that = this,
+				adjust = 0,
+				down = toShow.length &&
+					( !toHide.length || ( toShow.index() < toHide.index() ) ),
+				animate = this.options.animate || {},
+				options = down && animate.down || animate,
+				complete = function() {
+					that._toggleComplete( data );
+				};
+	
+			if ( typeof options === "number" ) {
+				duration = options;
+			}
+			if ( typeof options === "string" ) {
+				easing = options;
+			}
+			// fall back from options to animation in case of partial down settings
+			easing = easing || options.easing || animate.easing;
+			duration = duration || options.duration || animate.duration;
+	
+			if ( !toHide.length ) {
+				return toShow.animate( showProps, duration, easing, complete );
+			}
+			if ( !toShow.length ) {
+				return toHide.animate( hideProps, duration, easing, complete );
+			}
+	
+			total = toShow.show().outerHeight();
+			toHide.animate( hideProps, {
+				duration: duration,
+				easing: easing,
+				step: function( now, fx ) {
+					fx.now = Math.round( now );
+				}
+			});
+			toShow
+				.hide()
+				.animate( showProps, {
+					duration: duration,
+					easing: easing,
+					complete: complete,
+					step: function( now, fx ) {
+						fx.now = Math.round( now );
+						if ( fx.prop !== "height" ) {
+							adjust += fx.now;
+						} else if ( that.options.heightStyle !== "content" ) {
+							fx.now = Math.round( total - toHide.outerHeight() - adjust );
+							adjust = 0;
+						}
+					}
+				});
+		},
+	
+		_toggleComplete: function( data ) {
+			var toHide = data.oldPanel;
+	
+			toHide
+				.removeClass( "ui-accordion-content-active" )
+				.prev()
+					.removeClass( "ui-corner-top" )
+					.addClass( "ui-corner-all" );
+	
+			// Work around for rendering bug in IE (#5421)
+			if ( toHide.length ) {
+				toHide.parent()[0].className = toHide.parent()[0].className;
+			}
+	
+			this._trigger( "activate", null, data );
+		}
+	});
+	
+	})( jQuery );
+	
+	(function( $, undefined ) {
+	
+	// used to prevent race conditions with remote data sources
+	var requestIndex = 0;
+	
+	$.widget( "ui.autocomplete", {
+		version: "1.10.3",
+		defaultElement: "<input>",
+		options: {
+			appendTo: null,
+			autoFocus: false,
+			delay: 300,
+			minLength: 1,
+			position: {
+				my: "left top",
+				at: "left bottom",
+				collision: "none"
+			},
+			source: null,
+	
+			// callbacks
+			change: null,
+			close: null,
+			focus: null,
+			open: null,
+			response: null,
+			search: null,
+			select: null
+		},
+	
+		pending: 0,
+	
+		_create: function() {
+			// Some browsers only repeat keydown events, not keypress events,
+			// so we use the suppressKeyPress flag to determine if we've already
+			// handled the keydown event. #7269
+			// Unfortunately the code for & in keypress is the same as the up arrow,
+			// so we use the suppressKeyPressRepeat flag to avoid handling keypress
+			// events when we know the keydown event was used to modify the
+			// search term. #7799
+			var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
+				nodeName = this.element[0].nodeName.toLowerCase(),
+				isTextarea = nodeName === "textarea",
+				isInput = nodeName === "input";
+	
+			this.isMultiLine =
+				// Textareas are always multi-line
+				isTextarea ? true :
+				// Inputs are always single-line, even if inside a contentEditable element
+				// IE also treats inputs as contentEditable
+				isInput ? false :
+				// All other element types are determined by whether or not they're contentEditable
+				this.element.prop( "isContentEditable" );
+	
+			this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
+			this.isNewMenu = true;
+	
+			this.element
+				.addClass( "ui-autocomplete-input" )
+				.attr( "autocomplete", "off" );
+	
+			this._on( this.element, {
+				keydown: function( event ) {
+					/*jshint maxcomplexity:15*/
+					if ( this.element.prop( "readOnly" ) ) {
+						suppressKeyPress = true;
+						suppressInput = true;
+						suppressKeyPressRepeat = true;
+						return;
+					}
+	
+					suppressKeyPress = false;
+					suppressInput = false;
+					suppressKeyPressRepeat = false;
+					var keyCode = $.ui.keyCode;
+					switch( event.keyCode ) {
+					case keyCode.PAGE_UP:
+						suppressKeyPress = true;
+						this._move( "previousPage", event );
+						break;
+					case keyCode.PAGE_DOWN:
+						suppressKeyPress = true;
+						this._move( "nextPage", event );
+						break;
+					case keyCode.UP:
+						suppressKeyPress = true;
+						this._keyEvent( "previous", event );
+						break;
+					case keyCode.DOWN:
+						suppressKeyPress = true;
+						this._keyEvent( "next", event );
+						break;
+					case keyCode.ENTER:
+					case keyCode.NUMPAD_ENTER:
+						// when menu is open and has focus
+						if ( this.menu.active ) {
+							// #6055 - Opera still allows the keypress to occur
+							// which causes forms to submit
+							suppressKeyPress = true;
+							event.preventDefault();
+							this.menu.select( event );
+						}
+						break;
+					case keyCode.TAB:
+						if ( this.menu.active ) {
+							this.menu.select( event );
+						}
+						break;
+					case keyCode.ESCAPE:
+						if ( this.menu.element.is( ":visible" ) ) {
+							this._value( this.term );
+							this.close( event );
+							// Different browsers have different default behavior for escape
+							// Single press can mean undo or clear
+							// Double press in IE means clear the whole form
+							event.preventDefault();
+						}
+						break;
+					default:
+						suppressKeyPressRepeat = true;
+						// search timeout should be triggered before the input value is changed
+						this._searchTimeout( event );
+						break;
+					}
+				},
+				keypress: function( event ) {
+					if ( suppressKeyPress ) {
+						suppressKeyPress = false;
+						if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+							event.preventDefault();
+						}
+						return;
+					}
+					if ( suppressKeyPressRepeat ) {
+						return;
+					}
+	
+					// replicate some key handlers to allow them to repeat in Firefox and Opera
+					var keyCode = $.ui.keyCode;
+					switch( event.keyCode ) {
+					case keyCode.PAGE_UP:
+						this._move( "previousPage", event );
+						break;
+					case keyCode.PAGE_DOWN:
+						this._move( "nextPage", event );
+						break;
+					case keyCode.UP:
+						this._keyEvent( "previous", event );
+						break;
+					case keyCode.DOWN:
+						this._keyEvent( "next", event );
+						break;
+					}
+				},
+				input: function( event ) {
+					if ( suppressInput ) {
+						suppressInput = false;
+						event.preventDefault();
+						return;
+					}
+					this._searchTimeout( event );
+				},
+				focus: function() {
+					this.selectedItem = null;
+					this.previous = this._value();
+				},
+				blur: function( event ) {
+					if ( this.cancelBlur ) {
+						delete this.cancelBlur;
+						return;
+					}
+	
+					clearTimeout( this.searching );
+					this.close( event );
+					this._change( event );
+				}
+			});
+	
+			this._initSource();
+			this.menu = $( "<ul>" )
+				.addClass( "ui-autocomplete ui-front" )
+				.appendTo( this._appendTo() )
+				.menu({
+					// disable ARIA support, the live region takes care of that
+					role: null
+				})
+				.hide()
+				.data( "ui-menu" );
+	
+			this._on( this.menu.element, {
+				mousedown: function( event ) {
+					// prevent moving focus out of the text field
+					event.preventDefault();
+	
+					// IE doesn't prevent moving focus even with event.preventDefault()
+					// so we set a flag to know when we should ignore the blur event
+					this.cancelBlur = true;
+					this._delay(function() {
+						delete this.cancelBlur;
+					});
+	
+					// clicking on the scrollbar causes focus to shift to the body
+					// but we can't detect a mouseup or a click immediately afterward
+					// so we have to track the next mousedown and close the menu if
+					// the user clicks somewhere outside of the autocomplete
+					var menuElement = this.menu.element[ 0 ];
+					if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
+						this._delay(function() {
+							var that = this;
+							this.document.one( "mousedown", function( event ) {
+								if ( event.target !== that.element[ 0 ] &&
+										event.target !== menuElement &&
+										!$.contains( menuElement, event.target ) ) {
+									that.close();
+								}
+							});
+						});
+					}
+				},
+				menufocus: function( event, ui ) {
+					// support: Firefox
+					// Prevent accidental activation of menu items in Firefox (#7024 #9118)
+					if ( this.isNewMenu ) {
+						this.isNewMenu = false;
+						if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
+							this.menu.blur();
+	
+							this.document.one( "mousemove", function() {
+								$( event.target ).trigger( event.originalEvent );
+							});
+	
+							return;
+						}
+					}
+	
+					var item = ui.item.data( "ui-autocomplete-item" );
+					if ( false !== this._trigger( "focus", event, { item: item } ) ) {
+						// use value to match what will end up in the input, if it was a key event
+						if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
+							this._value( item.value );
+						}
+					} else {
+						// Normally the input is populated with the item's value as the
+						// menu is navigated, causing screen readers to notice a change and
+						// announce the item. Since the focus event was canceled, this doesn't
+						// happen, so we update the live region so that screen readers can
+						// still notice the change and announce it.
+						this.liveRegion.text( item.value );
+					}
+				},
+				menuselect: function( event, ui ) {
+					var item = ui.item.data( "ui-autocomplete-item" ),
+						previous = this.previous;
+	
+					// only trigger when focus was lost (click on menu)
+					if ( this.element[0] !== this.document[0].activeElement ) {
+						this.element.focus();
+						this.previous = previous;
+						// #6109 - IE triggers two focus events and the second
+						// is asynchronous, so we need to reset the previous
+						// term synchronously and asynchronously :-(
+						this._delay(function() {
+							this.previous = previous;
+							this.selectedItem = item;
+						});
+					}
+	
+					if ( false !== this._trigger( "select", event, { item: item } ) ) {
+						this._value( item.value );
+					}
+					// reset the term after the select event
+					// this allows custom select handling to work properly
+					this.term = this._value();
+	
+					this.close( event );
+					this.selectedItem = item;
+				}
+			});
+	
+			this.liveRegion = $( "<span>", {
+					role: "status",
+					"aria-live": "polite"
+				})
+				.addClass( "ui-helper-hidden-accessible" )
+				.insertBefore( this.element );
+	
+			// turning off autocomplete prevents the browser from remembering the
+			// value when navigating through history, so we re-enable autocomplete
+			// if the page is unloaded before the widget is destroyed. #7790
+			this._on( this.window, {
+				beforeunload: function() {
+					this.element.removeAttr( "autocomplete" );
+				}
+			});
+		},
+	
+		_destroy: function() {
+			clearTimeout( this.searching );
+			this.element
+				.removeClass( "ui-autocomplete-input" )
+				.removeAttr( "autocomplete" );
+			this.menu.element.remove();
+			this.liveRegion.remove();
+		},
+	
+		_setOption: function( key, value ) {
+			this._super( key, value );
+			if ( key === "source" ) {
+				this._initSource();
+			}
+			if ( key === "appendTo" ) {
+				this.menu.element.appendTo( this._appendTo() );
+			}
+			if ( key === "disabled" && value && this.xhr ) {
+				this.xhr.abort();
+			}
+		},
+	
+		_appendTo: function() {
+			var element = this.options.appendTo;
+	
+			if ( element ) {
+				element = element.jquery || element.nodeType ?
+					$( element ) :
+					this.document.find( element ).eq( 0 );
+			}
+	
+			if ( !element ) {
+				element = this.element.closest( ".ui-front" );
+			}
+	
+			if ( !element.length ) {
+				element = this.document[0].body;
+			}
+	
+			return element;
+		},
+	
+		_initSource: function() {
+			var array, url,
+				that = this;
+			if ( $.isArray(this.options.source) ) {
+				array = this.options.source;
+				this.source = function( request, response ) {
+					response( $.ui.autocomplete.filter( array, request.term ) );
+				};
+			} else if ( typeof this.options.source === "string" ) {
+				url = this.options.source;
+				this.source = function( request, response ) {
+					if ( that.xhr ) {
+						that.xhr.abort();
+					}
+					that.xhr = $.ajax({
+						url: url,
+						data: request,
+						dataType: "json",
+						success: function( data ) {
+							response( data );
+						},
+						error: function() {
+							response( [] );
+						}
+					});
+				};
+			} else {
+				this.source = this.options.source;
+			}
+		},
+	
+		_searchTimeout: function( event ) {
+			clearTimeout( this.searching );
+			this.searching = this._delay(function() {
+				// only search if the value has changed
+				if ( this.term !== this._value() ) {
+					this.selectedItem = null;
+					this.search( null, event );
+				}
+			}, this.options.delay );
+		},
+	
+		search: function( value, event ) {
+			value = value != null ? value : this._value();
+	
+			// always save the actual value, not the one passed as an argument
+			this.term = this._value();
+	
+			if ( value.length < this.options.minLength ) {
+				return this.close( event );
+			}
+	
+			if ( this._trigger( "search", event ) === false ) {
+				return;
+			}
+	
+			return this._search( value );
+		},
+	
+		_search: function( value ) {
+			this.pending++;
+			this.element.addClass( "ui-autocomplete-loading" );
+			this.cancelSearch = false;
+	
+			this.source( { term: value }, this._response() );
+		},
+	
+		_response: function() {
+			var that = this,
+				index = ++requestIndex;
+	
+			return function( content ) {
+				if ( index === requestIndex ) {
+					that.__response( content );
+				}
+	
+				that.pending--;
+				if ( !that.pending ) {
+					that.element.removeClass( "ui-autocomplete-loading" );
+				}
+			};
+		},
+	
+		__response: function( content ) {
+			if ( content ) {
+				content = this._normalize( content );
+			}
+			this._trigger( "response", null, { content: content } );
+			if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
+				this._suggest( content );
+				this._trigger( "open" );
+			} else {
+				// use ._close() instead of .close() so we don't cancel future searches
+				this._close();
+			}
+		},
+	
+		close: function( event ) {
+			this.cancelSearch = true;
+			this._close( event );
+		},
+	
+		_close: function( event ) {
+			if ( this.menu.element.is( ":visible" ) ) {
+				this.menu.element.hide();
+				this.menu.blur();
+				this.isNewMenu = true;
+				this._trigger( "close", event );
+			}
+		},
+	
+		_change: function( event ) {
+			if ( this.previous !== this._value() ) {
+				this._trigger( "change", event, { item: this.selectedItem } );
+			}
+		},
+	
+		_normalize: function( items ) {
+			// assume all items have the right format when the first item is complete
+			if ( items.length && items[0].label && items[0].value ) {
+				return items;
+			}
+			return $.map( items, function( item ) {
+				if ( typeof item === "string" ) {
+					return {
+						label: item,
+						value: item
+					};
+				}
+				return $.extend({
+					label: item.label || item.value,
+					value: item.value || item.label
+				}, item );
+			});
+		},
+	
+		_suggest: function( items ) {
+			var ul = this.menu.element.empty();
+			this._renderMenu( ul, items );
+			this.isNewMenu = true;
+			this.menu.refresh();
+	
+			// size and position menu
+			ul.show();
+			this._resizeMenu();
+			ul.position( $.extend({
+				of: this.element
+			}, this.options.position ));
+	
+			if ( this.options.autoFocus ) {
+				this.menu.next();
+			}
+		},
+	
+		_resizeMenu: function() {
+			var ul = this.menu.element;
+			ul.outerWidth( Math.max(
+				// Firefox wraps long text (possibly a rounding bug)
+				// so we add 1px to avoid the wrapping (#7513)
+				ul.width( "" ).outerWidth() + 1,
+				this.element.outerWidth()
+			) );
+		},
+	
+		_renderMenu: function( ul, items ) {
+			var that = this;
+			$.each( items, function( index, item ) {
+				that._renderItemData( ul, item );
+			});
+		},
+	
+		_renderItemData: function( ul, item ) {
+			return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
+		},
+	
+		_renderItem: function( ul, item ) {
+			return $( "<li>" )
+				.append( $( "<a>" ).text( item.label ) )
+				.appendTo( ul );
+		},
+	
+		_move: function( direction, event ) {
+			if ( !this.menu.element.is( ":visible" ) ) {
+				this.search( null, event );
+				return;
+			}
+			if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
+					this.menu.isLastItem() && /^next/.test( direction ) ) {
+				this._value( this.term );
+				this.menu.blur();
+				return;
+			}
+			this.menu[ direction ]( event );
+		},
+	
+		widget: function() {
+			return this.menu.element;
+		},
+	
+		_value: function() {
+			return this.valueMethod.apply( this.element, arguments );
+		},
+	
+		_keyEvent: function( keyEvent, event ) {
+			if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+				this._move( keyEvent, event );
+	
+				// prevents moving cursor to beginning/end of the text field in some browsers
+				event.preventDefault();
+			}
+		}
+	});
+	
+	$.extend( $.ui.autocomplete, {
+		escapeRegex: function( value ) {
+			return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
+		},
+		filter: function(array, term) {
+			var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
+			return $.grep( array, function(value) {
+				return matcher.test( value.label || value.value || value );
+			});
+		}
+	});
+	
+	
+	// live region extension, adding a `messages` option
+	// NOTE: This is an experimental API. We are still investigating
+	// a full solution for string manipulation and internationalization.
+	$.widget( "ui.autocomplete", $.ui.autocomplete, {
+		options: {
+			messages: {
+				noResults: "No search results.",
+				results: function( amount ) {
+					return amount + ( amount > 1 ? " results are" : " result is" ) +
+						" available, use up and down arrow keys to navigate.";
+				}
+			}
+		},
+	
+		__response: function( content ) {
+			var message;
+			this._superApply( arguments );
+			if ( this.options.disabled || this.cancelSearch ) {
+				return;
+			}
+			if ( content && content.length ) {
+				message = this.options.messages.results( content.length );
+			} else {
+				message = this.options.messages.noResults;
+			}
+			this.liveRegion.text( message );
+		}
+	});
+	
+	}( jQuery ));
+	
+	(function( $, undefined ) {
+	
+	var lastActive, startXPos, startYPos, clickDragged,
+		baseClasses = "ui-button ui-widget ui-state-default ui-corner-all",
+		stateClasses = "ui-state-hover ui-state-active ",
+		typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",
+		formResetHandler = function() {
+			var form = $( this );
+			setTimeout(function() {
+				form.find( ":ui-button" ).button( "refresh" );
+			}, 1 );
+		},
+		radioGroup = function( radio ) {
+			var name = radio.name,
+				form = radio.form,
+				radios = $( [] );
+			if ( name ) {
+				name = name.replace( /'/g, "\\'" );
+				if ( form ) {
+					radios = $( form ).find( "[name='" + name + "']" );
+				} else {
+					radios = $( "[name='" + name + "']", radio.ownerDocument )
+						.filter(function() {
+							return !this.form;
+						});
+				}
+			}
+			return radios;
+		};
+	
+	$.widget( "ui.button", {
+		version: "1.10.3",
+		defaultElement: "<button>",
+		options: {
+			disabled: null,
+			text: true,
+			label: null,
+			icons: {
+				primary: null,
+				secondary: null
+			}
+		},
+		_create: function() {
+			this.element.closest( "form" )
+				.unbind( "reset" + this.eventNamespace )
+				.bind( "reset" + this.eventNamespace, formResetHandler );
+	
+			if ( typeof this.options.disabled !== "boolean" ) {
+				this.options.disabled = !!this.element.prop( "disabled" );
+			} else {
+				this.element.prop( "disabled", this.options.disabled );
+			}
+	
+			this._determineButtonType();
+			this.hasTitle = !!this.buttonElement.attr( "title" );
+	
+			var that = this,
+				options = this.options,
+				toggleButton = this.type === "checkbox" || this.type === "radio",
+				activeClass = !toggleButton ? "ui-state-active" : "",
+				focusClass = "ui-state-focus";
+	
+			if ( options.label === null ) {
+				options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html());
+			}
+	
+			this._hoverable( this.buttonElement );
+	
+			this.buttonElement
+				.addClass( baseClasses )
+				.attr( "role", "button" )
+				.bind( "mouseenter" + this.eventNamespace, function() {
+					if ( options.disabled ) {
+						return;
+					}
+					if ( this === lastActive ) {
+						$( this ).addClass( "ui-state-active" );
+					}
+				})
+				.bind( "mouseleave" + this.eventNamespace, function() {
+					if ( options.disabled ) {
+						return;
+					}
+					$( this ).removeClass( activeClass );
+				})
+				.bind( "click" + this.eventNamespace, function( event ) {
+					if ( options.disabled ) {
+						event.preventDefault();
+						event.stopImmediatePropagation();
+					}
+				});
+	
+			this.element
+				.bind( "focus" + this.eventNamespace, function() {
+					// no need to check disabled, focus won't be triggered anyway
+					that.buttonElement.addClass( focusClass );
+				})
+				.bind( "blur" + this.eventNamespace, function() {
+					that.buttonElement.removeClass( focusClass );
+				});
+	
+			if ( toggleButton ) {
+				this.element.bind( "change" + this.eventNamespace, function() {
+					if ( clickDragged ) {
+						return;
+					}
+					that.refresh();
+				});
+				// if mouse moves between mousedown and mouseup (drag) set clickDragged flag
+				// prevents issue where button state changes but checkbox/radio checked state
+				// does not in Firefox (see ticket #6970)
+				this.buttonElement
+					.bind( "mousedown" + this.eventNamespace, function( event ) {
+						if ( options.disabled ) {
+							return;
+						}
+						clickDragged = false;
+						startXPos = event.pageX;
+						startYPos = event.pageY;
+					})
+					.bind( "mouseup" + this.eventNamespace, function( event ) {
+						if ( options.disabled ) {
+							return;
+						}
+						if ( startXPos !== event.pageX || startYPos !== event.pageY ) {
+							clickDragged = true;
+						}
+				});
+			}
+	
+			if ( this.type === "checkbox" ) {
+				this.buttonElement.bind( "click" + this.eventNamespace, function() {
+					if ( options.disabled || clickDragged ) {
+						return false;
+					}
+				});
+			} else if ( this.type === "radio" ) {
+				this.buttonElement.bind( "click" + this.eventNamespace, function() {
+					if ( options.disabled || clickDragged ) {
+						return false;
+					}
+					$( this ).addClass( "ui-state-active" );
+					that.buttonElement.attr( "aria-pressed", "true" );
+	
+					var radio = that.element[ 0 ];
+					radioGroup( radio )
+						.not( radio )
+						.map(function() {
+							return $( this ).button( "widget" )[ 0 ];
+						})
+						.removeClass( "ui-state-active" )
+						.attr( "aria-pressed", "false" );
+				});
+			} else {
+				this.buttonElement
+					.bind( "mousedown" + this.eventNamespace, function() {
+						if ( options.disabled ) {
+							return false;
+						}
+						$( this ).addClass( "ui-state-active" );
+						lastActive = this;
+						that.document.one( "mouseup", function() {
+							lastActive = null;
+						});
+					})
+					.bind( "mouseup" + this.eventNamespace, function() {
+						if ( options.disabled ) {
+							return false;
+						}
+						$( this ).removeClass( "ui-state-active" );
+					})
+					.bind( "keydown" + this.eventNamespace, function(event) {
+						if ( options.disabled ) {
+							return false;
+						}
+						if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {
+							$( this ).addClass( "ui-state-active" );
+						}
+					})
+					// see #8559, we bind to blur here in case the button element loses
+					// focus between keydown and keyup, it would be left in an "active" state
+					.bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() {
+						$( this ).removeClass( "ui-state-active" );
+					});
+	
+				if ( this.buttonElement.is("a") ) {
+					this.buttonElement.keyup(function(event) {
+						if ( event.keyCode === $.ui.keyCode.SPACE ) {
+							// TODO pass through original event correctly (just as 2nd argument doesn't work)
+							$( this ).click();
+						}
+					});
+				}
+			}
+	
+			// TODO: pull out $.Widget's handling for the disabled option into
+			// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can
+			// be overridden by individual plugins
+			this._setOption( "disabled", options.disabled );
+			this._resetButton();
+		},
+	
+		_determineButtonType: function() {
+			var ancestor, labelSelector, checked;
+	
+			if ( this.element.is("[type=checkbox]") ) {
+				this.type = "checkbox";
+			} else if ( this.element.is("[type=radio]") ) {
+				this.type = "radio";
+			} else if ( this.element.is("input") ) {
+				this.type = "input";
+			} else {
+				this.type = "button";
+			}
+	
+			if ( this.type === "checkbox" || this.type === "radio" ) {
+				// we don't search against the document in case the element
+				// is disconnected from the DOM
+				ancestor = this.element.parents().last();
+				labelSelector = "label[for='" + this.element.attr("id") + "']";
+				this.buttonElement = ancestor.find( labelSelector );
+				if ( !this.buttonElement.length ) {
+					ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();
+					this.buttonElement = ancestor.filter( labelSelector );
+					if ( !this.buttonElement.length ) {
+						this.buttonElement = ancestor.find( labelSelector );
+					}
+				}
+				this.element.addClass( "ui-helper-hidden-accessible" );
+	
+				checked = this.element.is( ":checked" );
+				if ( checked ) {
+					this.buttonElement.addClass( "ui-state-active" );
+				}
+				this.buttonElement.prop( "aria-pressed", checked );
+			} else {
+				this.buttonElement = this.element;
+			}
+		},
+	
+		widget: function() {
+			return this.buttonElement;
+		},
+	
+		_destroy: function() {
+			this.element
+				.removeClass( "ui-helper-hidden-accessible" );
+			this.buttonElement
+				.removeClass( baseClasses + " " + stateClasses + " " + typeClasses )
+				.removeAttr( "role" )
+				.removeAttr( "aria-pressed" )
+				.html( this.buttonElement.find(".ui-button-text").html() );
+	
+			if ( !this.hasTitle ) {
+				this.buttonElement.removeAttr( "title" );
+			}
+		},
+	
+		_setOption: function( key, value ) {
+			this._super( key, value );
+			if ( key === "disabled" ) {
+				if ( value ) {
+					this.element.prop( "disabled", true );
+				} else {
+					this.element.prop( "disabled", false );
+				}
+				return;
+			}
+			this._resetButton();
+		},
+	
+		refresh: function() {
+			//See #8237 & #8828
+			var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" );
+	
+			if ( isDisabled !== this.options.disabled ) {
+				this._setOption( "disabled", isDisabled );
+			}
+			if ( this.type === "radio" ) {
+				radioGroup( this.element[0] ).each(function() {
+					if ( $( this ).is( ":checked" ) ) {
+						$( this ).button( "widget" )
+							.addClass( "ui-state-active" )
+							.attr( "aria-pressed", "true" );
+					} else {
+						$( this ).button( "widget" )
+							.removeClass( "ui-state-active" )
+							.attr( "aria-pressed", "false" );
+					}
+				});
+			} else if ( this.type === "checkbox" ) {
+				if ( this.element.is( ":checked" ) ) {
+					this.buttonElement
+						.addClass( "ui-state-active" )
+						.attr( "aria-pressed", "true" );
+				} else {
+					this.buttonElement
+						.removeClass( "ui-state-active" )
+						.attr( "aria-pressed", "false" );
+				}
+			}
+		},
+	
+		_resetButton: function() {
+			if ( this.type === "input" ) {
+				if ( this.options.label ) {
+					this.element.val( this.options.label );
+				}
+				return;
+			}
+			var buttonElement = this.buttonElement.removeClass( typeClasses ),
+				buttonText = $( "<span></span>", this.document[0] )
+					.addClass( "ui-button-text" )
+					.html( this.options.label )
+					.appendTo( buttonElement.empty() )
+					.text(),
+				icons = this.options.icons,
+				multipleIcons = icons.primary && icons.secondary,
+				buttonClasses = [];
+	
+			if ( icons.primary || icons.secondary ) {
+				if ( this.options.text ) {
+					buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) );
+				}
+	
+				if ( icons.primary ) {
+					buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" );
+				}
+	
+				if ( icons.secondary ) {
+					buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" );
+				}
+	
+				if ( !this.options.text ) {
+					buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" );
+	
+					if ( !this.hasTitle ) {
+						buttonElement.attr( "title", $.trim( buttonText ) );
+					}
+				}
+			} else {
+				buttonClasses.push( "ui-button-text-only" );
+			}
+			buttonElement.addClass( buttonClasses.join( " " ) );
+		}
+	});
+	
+	$.widget( "ui.buttonset", {
+		version: "1.10.3",
+		options: {
+			items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"
+		},
+	
+		_create: function() {
+			this.element.addClass( "ui-buttonset" );
+		},
+	
+		_init: function() {
+			this.refresh();
+		},
+	
+		_setOption: function( key, value ) {
+			if ( key === "disabled" ) {
+				this.buttons.button( "option", key, value );
+			}
+	
+			this._super( key, value );
+		},
+	
+		refresh: function() {
+			var rtl = this.element.css( "direction" ) === "rtl";
+	
+			this.buttons = this.element.find( this.options.items )
+				.filter( ":ui-button" )
+					.button( "refresh" )
+				.end()
+				.not( ":ui-button" )
+					.button()
+				.end()
+				.map(function() {
+					return $( this ).button( "widget" )[ 0 ];
+				})
+					.removeClass( "ui-corner-all ui-corner-left ui-corner-right" )
+					.filter( ":first" )
+						.addClass( rtl ? "ui-corner-right" : "ui-corner-left" )
+					.end()
+					.filter( ":last" )
+						.addClass( rtl ? "ui-corner-left" : "ui-corner-right" )
+					.end()
+				.end();
+		},
+	
+		_destroy: function() {
+			this.element.removeClass( "ui-buttonset" );
+			this.buttons
+				.map(function() {
+					return $( this ).button( "widget" )[ 0 ];
+				})
+					.removeClass( "ui-corner-left ui-corner-right" )
+				.end()
+				.button( "destroy" );
+		}
+	});
+	
+	}( jQuery ) );
+	
+	(function( $, undefined ) {
+	
+	$.extend($.ui, { datepicker: { version: "1.10.3" } });
+	
+	var PROP_NAME = "datepicker",
+		instActive;
+	
+	/* Date picker manager.
+	   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
+	   Settings for (groups of) date pickers are maintained in an instance object,
+	   allowing multiple different settings on the same page. */
+	
+	function Datepicker() {
+		this._curInst = null; // The current instance in use
+		this._keyEvent = false; // If the last event was a key event
+		this._disabledInputs = []; // List of date picker inputs that have been disabled
+		this._datepickerShowing = false; // True if the popup picker is showing , false if not
+		this._inDialog = false; // True if showing within a "dialog", false if not
+		this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
+		this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
+		this._appendClass = "ui-datepicker-append"; // The name of the append marker class
+		this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
+		this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
+		this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
+		this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
+		this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
+		this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
+		this.regional = []; // Available regional settings, indexed by language code
+		this.regional[""] = { // Default regional settings
+			closeText: "Done", // Display text for close link
+			prevText: "Prev", // Display text for previous month link
+			nextText: "Next", // Display text for next month link
+			currentText: "Today", // Display text for current month link
+			monthNames: ["January","February","March","April","May","June",
+				"July","August","September","October","November","December"], // Names of months for drop-down and formatting
+			monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
+			dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
+			dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
+			dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday
+			weekHeader: "Wk", // Column header for week of the year
+			dateFormat: "mm/dd/yy", // See format options on parseDate
+			firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
+			isRTL: false, // True if right-to-left language, false if left-to-right
+			showMonthAfterYear: false, // True if the year select precedes month, false for month then year
+			yearSuffix: "" // Additional text to append to the year in the month headers
+		};
+		this._defaults = { // Global defaults for all the date picker instances
+			showOn: "focus", // "focus" for popup on focus,
+				// "button" for trigger button, or "both" for either
+			showAnim: "fadeIn", // Name of jQuery animation for popup
+			showOptions: {}, // Options for enhanced animations
+			defaultDate: null, // Used when field is blank: actual date,
+				// +/-number for offset from today, null for today
+			appendText: "", // Display text following the input box, e.g. showing the format
+			buttonText: "...", // Text for trigger button
+			buttonImage: "", // URL for trigger button image
+			buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
+			hideIfNoPrevNext: false, // True to hide next/previous month links
+				// if not applicable, false to just disable them
+			navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
+			gotoCurrent: false, // True if today link goes back to current selection instead
+			changeMonth: false, // True if month can be selected directly, false if only prev/next
+			changeYear: false, // True if year can be selected directly, false if only prev/next
+			yearRange: "c-10:c+10", // Range of years to display in drop-down,
+				// either relative to today's year (-nn:+nn), relative to currently displayed year
+				// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
+			showOtherMonths: false, // True to show dates in other months, false to leave blank
+			selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
+			showWeek: false, // True to show week of the year, false to not show it
+			calculateWeek: this.iso8601Week, // How to calculate the week of the year,
+				// takes a Date and returns the number of the week for it
+			shortYearCutoff: "+10", // Short year values < this are in the current century,
+				// > this are in the previous century,
+				// string value starting with "+" for current year + value
+			minDate: null, // The earliest selectable date, or null for no limit
+			maxDate: null, // The latest selectable date, or null for no limit
+			duration: "fast", // Duration of display/closure
+			beforeShowDay: null, // Function that takes a date and returns an array with
+				// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
+				// [2] = cell title (optional), e.g. $.datepicker.noWeekends
+			beforeShow: null, // Function that takes an input field and
+				// returns a set of custom settings for the date picker
+			onSelect: null, // Define a callback function when a date is selected
+			onChangeMonthYear: null, // Define a callback function when the month or year is changed
+			onClose: null, // Define a callback function when the datepicker is closed
+			numberOfMonths: 1, // Number of months to show at a time
+			showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
+			stepMonths: 1, // Number of months to step back/forward
+			stepBigMonths: 12, // Number of months to step back/forward for the big links
+			altField: "", // Selector for an alternate field to store selected dates into
+			altFormat: "", // The date format to use for the alternate field
+			constrainInput: true, // The input is constrained by the current date format
+			showButtonPanel: false, // True to show button panel, false to not show it
+			autoSize: false, // True to size the input for the date format, false to leave as is
+			disabled: false // The initial disabled state
+		};
+		$.extend(this._defaults, this.regional[""]);
+		this.dpDiv = bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"));
+	}
+	
+	$.extend(Datepicker.prototype, {
+		/* Class name added to elements to indicate already configured with a date picker. */
+		markerClassName: "hasDatepicker",
+	
+		//Keep track of the maximum number of rows displayed (see #7043)
+		maxRows: 4,
+	
+		// TODO rename to "widget" when switching to widget factory
+		_widgetDatepicker: function() {
+			return this.dpDiv;
+		},
+	
+		/* Override the default settings for all instances of the date picker.
+		 * @param  settings  object - the new settings to use as defaults (anonymous object)
+		 * @return the manager object
+		 */
+		setDefaults: function(settings) {
+			extendRemove(this._defaults, settings || {});
+			return this;
+		},
+	
+		/* Attach the date picker to a jQuery selection.
+		 * @param  target	element - the target input field or division or span
+		 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
+		 */
+		_attachDatepicker: function(target, settings) {
+			var nodeName, inline, inst;
+			nodeName = target.nodeName.toLowerCase();
+			inline = (nodeName === "div" || nodeName === "span");
+			if (!target.id) {
+				this.uuid += 1;
+				target.id = "dp" + this.uuid;
+			}
+			inst = this._newInst($(target), inline);
+			inst.settings = $.extend({}, settings || {});
+			if (nodeName === "input") {
+				this._connectDatepicker(target, inst);
+			} else if (inline) {
+				this._inlineDatepicker(target, inst);
+			}
+		},
+	
+		/* Create a new instance object. */
+		_newInst: function(target, inline) {
+			var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars
+			return {id: id, input: target, // associated target
+				selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
+				drawMonth: 0, drawYear: 0, // month being drawn
+				inline: inline, // is datepicker inline or not
+				dpDiv: (!inline ? this.dpDiv : // presentation div
+				bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))};
+		},
+	
+		/* Attach the date picker to an input field. */
+		_connectDatepicker: function(target, inst) {
+			var input = $(target);
+			inst.append = $([]);
+			inst.trigger = $([]);
+			if (input.hasClass(this.markerClassName)) {
+				return;
+			}
+			this._attachments(input, inst);
+			input.addClass(this.markerClassName).keydown(this._doKeyDown).
+				keypress(this._doKeyPress).keyup(this._doKeyUp);
+			this._autoSize(inst);
+			$.data(target, PROP_NAME, inst);
+			//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
+			if( inst.settings.disabled ) {
+				this._disableDatepicker( target );
+			}
+		},
+	
+		/* Make attachments based on settings. */
+		_attachments: function(input, inst) {
+			var showOn, buttonText, buttonImage,
+				appendText = this._get(inst, "appendText"),
+				isRTL = this._get(inst, "isRTL");
+	
+			if (inst.append) {
+				inst.append.remove();
+			}
+			if (appendText) {
+				inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>");
+				input[isRTL ? "before" : "after"](inst.append);
+			}
+	
+			input.unbind("focus", this._showDatepicker);
+	
+			if (inst.trigger) {
+				inst.trigger.remove();
+			}
+	
+			showOn = this._get(inst, "showOn");
+			if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field
+				input.focus(this._showDatepicker);
+			}
+			if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked
+				buttonText = this._get(inst, "buttonText");
+				buttonImage = this._get(inst, "buttonImage");
+				inst.trigger = $(this._get(inst, "buttonImageOnly") ?
+					$("<img/>").addClass(this._triggerClass).
+						attr({ src: buttonImage, alt: buttonText, title: buttonText }) :
+					$("<button type='button'></button>").addClass(this._triggerClass).
+						html(!buttonImage ? buttonText : $("<img/>").attr(
+						{ src:buttonImage, alt:buttonText, title:buttonText })));
+				input[isRTL ? "before" : "after"](inst.trigger);
+				inst.trigger.click(function() {
+					if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {
+						$.datepicker._hideDatepicker();
+					} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {
+						$.datepicker._hideDatepicker();
+						$.datepicker._showDatepicker(input[0]);
+					} else {
+						$.datepicker._showDatepicker(input[0]);
+					}
+					return false;
+				});
+			}
+		},
+	
+		/* Apply the maximum length for the date format. */
+		_autoSize: function(inst) {
+			if (this._get(inst, "autoSize") && !inst.inline) {
+				var findMax, max, maxI, i,
+					date = new Date(2009, 12 - 1, 20), // Ensure double digits
+					dateFormat = this._get(inst, "dateFormat");
+	
+				if (dateFormat.match(/[DM]/)) {
+					findMax = function(names) {
+						max = 0;
+						maxI = 0;
+						for (i = 0; i < names.length; i++) {
+							if (names[i].length > max) {
+								max = names[i].length;
+								maxI = i;
+							}
+						}
+						return maxI;
+					};
+					date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?
+						"monthNames" : "monthNamesShort"))));
+					date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?
+						"dayNames" : "dayNamesShort"))) + 20 - date.getDay());
+				}
+				inst.input.attr("size", this._formatDate(inst, date).length);
+			}
+		},
+	
+		/* Attach an inline date picker to a div. */
+		_inlineDatepicker: function(target, inst) {
+			var divSpan = $(target);
+			if (divSpan.hasClass(this.markerClassName)) {
+				return;
+			}
+			divSpan.addClass(this.markerClassName).append(inst.dpDiv);
+			$.data(target, PROP_NAME, inst);
+			this._setDate(inst, this._getDefaultDate(inst), true);
+			this._updateDatepicker(inst);
+			this._updateAlternate(inst);
+			//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
+			if( inst.settings.disabled ) {
+				this._disableDatepicker( target );
+			}
+			// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
+			// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
+			inst.dpDiv.css( "display", "block" );
+		},
+	
+		/* Pop-up the date picker in a "dialog" box.
+		 * @param  input element - ignored
+		 * @param  date	string or Date - the initial date to display
+		 * @param  onSelect  function - the function to call when a date is selected
+		 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
+		 * @param  pos int[2] - coordinates for the dialog's position within the screen or
+		 *					event - with x/y coordinates or
+		 *					leave empty for default (screen centre)
+		 * @return the manager object
+		 */
+		_dialogDatepicker: function(input, date, onSelect, settings, pos) {
+			var id, browserWidth, browserHeight, scrollX, scrollY,
+				inst = this._dialogInst; // internal instance
+	
+			if (!inst) {
+				this.uuid += 1;
+				id = "dp" + this.uuid;
+				this._dialogInput = $("<input type='text' id='" + id +
+					"' style='position: absolute; top: -100px; width: 0px;'/>");
+				this._dialogInput.keydown(this._doKeyDown);
+				$("body").append(this._dialogInput);
+				inst = this._dialogInst = this._newInst(this._dialogInput, false);
+				inst.settings = {};
+				$.data(this._dialogInput[0], PROP_NAME, inst);
+			}
+			extendRemove(inst.settings, settings || {});
+			date = (date && date.constructor === Date ? this._formatDate(inst, date) : date);
+			this._dialogInput.val(date);
+	
+			this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);
+			if (!this._pos) {
+				browserWidth = document.documentElement.clientWidth;
+				browserHeight = document.documentElement.clientHeight;
+				scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
+				scrollY = document.documentElement.scrollTop || document.body.scrollTop;
+				this._pos = // should use actual width/height below
+					[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];
+			}
+	
+			// move input on screen for focus, but hidden behind dialog
+			this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px");
+			inst.settings.onSelect = onSelect;
+			this._inDialog = true;
+			this.dpDiv.addClass(this._dialogClass);
+			this._showDatepicker(this._dialogInput[0]);
+			if ($.blockUI) {
+				$.blockUI(this.dpDiv);
+			}
+			$.data(this._dialogInput[0], PROP_NAME, inst);
+			return this;
+		},
+	
+		/* Detach a datepicker from its control.
+		 * @param  target	element - the target input field or division or span
+		 */
+		_destroyDatepicker: function(target) {
+			var nodeName,
+				$target = $(target),
+				inst = $.data(target, PROP_NAME);
+	
+			if (!$target.hasClass(this.markerClassName)) {
+				return;
+			}
+	
+			nodeName = target.nodeName.toLowerCase();
+			$.removeData(target, PROP_NAME);
+			if (nodeName === "input") {
+				inst.append.remove();
+				inst.trigger.remove();
+				$target.removeClass(this.markerClassName).
+					unbind("focus", this._showDatepicker).
+					unbind("keydown", this._doKeyDown).
+					unbind("keypress", this._doKeyPress).
+					unbind("keyup", this._doKeyUp);
+			} else if (nodeName === "div" || nodeName === "span") {
+				$target.removeClass(this.markerClassName).empty();
+			}
+		},
+	
+		/* Enable the date picker to a jQuery selection.
+		 * @param  target	element - the target input field or division or span
+		 */
+		_enableDatepicker: function(target) {
+			var nodeName, inline,
+				$target = $(target),
+				inst = $.data(target, PROP_NAME);
+	
+			if (!$target.hasClass(this.markerClassName)) {
+				return;
+			}
+	
+			nodeName = target.nodeName.toLowerCase();
+			if (nodeName === "input") {
+				target.disabled = false;
+				inst.trigger.filter("button").
+					each(function() { this.disabled = false; }).end().
+					filter("img").css({opacity: "1.0", cursor: ""});
+			} else if (nodeName === "div" || nodeName === "span") {
+				inline = $target.children("." + this._inlineClass);
+				inline.children().removeClass("ui-state-disabled");
+				inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
+					prop("disabled", false);
+			}
+			this._disabledInputs = $.map(this._disabledInputs,
+				function(value) { return (value === target ? null : value); }); // delete entry
+		},
+	
+		/* Disable the date picker to a jQuery selection.
+		 * @param  target	element - the target input field or division or span
+		 */
+		_disableDatepicker: function(target) {
+			var nodeName, inline,
+				$target = $(target),
+				inst = $.data(target, PROP_NAME);
+	
+			if (!$target.hasClass(this.markerClassName)) {
+				return;
+			}
+	
+			nodeName = target.nodeName.toLowerCase();
+			if (nodeName === "input") {
+				target.disabled = true;
+				inst.trigger.filter("button").
+					each(function() { this.disabled = true; }).end().
+					filter("img").css({opacity: "0.5", cursor: "default"});
+			} else if (nodeName === "div" || nodeName === "span") {
+				inline = $target.children("." + this._inlineClass);
+				inline.children().addClass("ui-state-disabled");
+				inline.find("select.ui-datepicker-month, select.ui-datepicker-year").
+					prop("disabled", true);
+			}
+			this._disabledInputs = $.map(this._disabledInputs,
+				function(value) { return (value === target ? null : value); }); // delete entry
+			this._disabledInputs[this._disabledInputs.length] = target;
+		},
+	
+		/* Is the first field in a jQuery collection disabled as a datepicker?
+		 * @param  target	element - the target input field or division or span
+		 * @return boolean - true if disabled, false if enabled
+		 */
+		_isDisabledDatepicker: function(target) {
+			if (!target) {
+				return false;
+			}
+			for (var i = 0; i < this._disabledInputs.length; i++) {
+				if (this._disabledInputs[i] === target) {
+					return true;
+				}
+			}
+			return false;
+		},
+	
+		/* Retrieve the instance data for the target control.
+		 * @param  target  element - the target input field or division or span
+		 * @return  object - the associated instance data
+		 * @throws  error if a jQuery problem getting data
+		 */
+		_getInst: function(target) {
+			try {
+				return $.data(target, PROP_NAME);
+			}
+			catch (err) {
+				throw "Missing instance data for this datepicker";
+			}
+		},
+	
+		/* Update or retrieve the settings for a date picker attached to an input field or division.
+		 * @param  target  element - the target input field or division or span
+		 * @param  name	object - the new settings to update or
+		 *				string - the name of the setting to change or retrieve,
+		 *				when retrieving also "all" for all instance settings or
+		 *				"defaults" for all global defaults
+		 * @param  value   any - the new value for the setting
+		 *				(omit if above is an object or to retrieve a value)
+		 */
+		_optionDatepicker: function(target, name, value) {
+			var settings, date, minDate, maxDate,
+				inst = this._getInst(target);
+	
+			if (arguments.length === 2 && typeof name === "string") {
+				return (name === "defaults" ? $.extend({}, $.datepicker._defaults) :
+					(inst ? (name === "all" ? $.extend({}, inst.settings) :
+					this._get(inst, name)) : null));
+			}
+	
+			settings = name || {};
+			if (typeof name === "string") {
+				settings = {};
+				settings[name] = value;
+			}
+	
+			if (inst) {
+				if (this._curInst === inst) {
+					this._hideDatepicker();
+				}
+	
+				date = this._getDateDatepicker(target, true);
+				minDate = this._getMinMaxDate(inst, "min");
+				maxDate = this._getMinMaxDate(inst, "max");
+				extendRemove(inst.settings, settings);
+				// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
+				if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {
+					inst.settings.minDate = this._formatDate(inst, minDate);
+				}
+				if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {
+					inst.settings.maxDate = this._formatDate(inst, maxDate);
+				}
+				if ( "disabled" in settings ) {
+					if ( settings.disabled ) {
+						this._disableDatepicker(target);
+					} else {
+						this._enableDatepicker(target);
+					}
+				}
+				this._attachments($(target), inst);
+				this._autoSize(inst);
+				this._setDate(inst, date);
+				this._updateAlternate(inst);
+				this._updateDatepicker(inst);
+			}
+		},
+	
+		// change method deprecated
+		_changeDatepicker: function(target, name, value) {
+			this._optionDatepicker(target, name, value);
+		},
+	
+		/* Redraw the date picker attached to an input field or division.
+		 * @param  target  element - the target input field or division or span
+		 */
+		_refreshDatepicker: function(target) {
+			var inst = this._getInst(target);
+			if (inst) {
+				this._updateDatepicker(inst);
+			}
+		},
+	
+		/* Set the dates for a jQuery selection.
+		 * @param  target element - the target input field or division or span
+		 * @param  date	Date - the new date
+		 */
+		_setDateDatepicker: function(target, date) {
+			var inst = this._getInst(target);
+			if (inst) {
+				this._setDate(inst, date);
+				this._updateDatepicker(inst);
+				this._updateAlternate(inst);
+			}
+		},
+	
+		/* Get the date(s) for the first entry in a jQuery selection.
+		 * @param  target element - the target input field or division or span
+		 * @param  noDefault boolean - true if no default date is to be used
+		 * @return Date - the current date
+		 */
+		_getDateDatepicker: function(target, noDefault) {
+			var inst = this._getInst(target);
+			if (inst && !inst.inline) {
+				this._setDateFromField(inst, noDefault);
+			}
+			return (inst ? this._getDate(inst) : null);
+		},
+	
+		/* Handle keystrokes. */
+		_doKeyDown: function(event) {
+			var onSelect, dateStr, sel,
+				inst = $.datepicker._getInst(event.target),
+				handled = true,
+				isRTL = inst.dpDiv.is(".ui-datepicker-rtl");
+	
+			inst._keyEvent = true;
+			if ($.datepicker._datepickerShowing) {
+				switch (event.keyCode) {
+					case 9: $.datepicker._hideDatepicker();
+							handled = false;
+							break; // hide on tab out
+					case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." +
+										$.datepicker._currentClass + ")", inst.dpDiv);
+							if (sel[0]) {
+								$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
+							}
+	
+							onSelect = $.datepicker._get(inst, "onSelect");
+							if (onSelect) {
+								dateStr = $.datepicker._formatDate(inst);
+	
+								// trigger custom callback
+								onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);
+							} else {
+								$.datepicker._hideDatepicker();
+							}
+	
+							return false; // don't submit the form
+					case 27: $.datepicker._hideDatepicker();
+							break; // hide on escape
+					case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+								-$.datepicker._get(inst, "stepBigMonths") :
+								-$.datepicker._get(inst, "stepMonths")), "M");
+							break; // previous month/year on page up/+ ctrl
+					case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?
+								+$.datepicker._get(inst, "stepBigMonths") :
+								+$.datepicker._get(inst, "stepMonths")), "M");
+							break; // next month/year on page down/+ ctrl
+					case 35: if (event.ctrlKey || event.metaKey) {
+								$.datepicker._clearDate(event.target);
+							}
+							handled = event.ctrlKey || event.metaKey;
+							break; // clear on ctrl or command +end
+					case 36: if (event.ctrlKey || event.metaKey) {
+								$.datepicker._gotoToday(event.target);
+							}
+							handled = event.ctrlKey || event.metaKey;
+							break; // current on ctrl or command +home
+					case 37: if (event.ctrlKey || event.metaKey) {
+								$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D");
+							}
+							handled = event.ctrlKey || event.metaKey;
+							// -1 day on ctrl or command +left
+							if (event.originalEvent.altKey) {
+								$.datepicker._adjustDate(event.target, (event.ctrlKey ?
+									-$.datepicker._get(inst, "stepBigMonths") :
+									-$.datepicker._get(inst, "stepMonths")), "M");
+							}
+							// next month/year on alt +left on Mac
+							break;
+					case 38: if (event.ctrlKey || event.metaKey) {
+								$.datepicker._adjustDate(event.target, -7, "D");
+							}
+							handled = event.ctrlKey || event.metaKey;
+							break; // -1 week on ctrl or command +up
+					case 39: if (event.ctrlKey || event.metaKey) {
+								$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D");
+							}
+							handled = event.ctrlKey || event.metaKey;
+							// +1 day on ctrl or command +right
+							if (event.originalEvent.altKey) {
+								$.datepicker._adjustDate(event.target, (event.ctrlKey ?
+									+$.datepicker._get(inst, "stepBigMonths") :
+									+$.datepicker._get(inst, "stepMonths")), "M");
+							}
+							// next month/year on alt +right
+							break;
+					case 40: if (event.ctrlKey || event.metaKey) {
+								$.datepicker._adjustDate(event.target, +7, "D");
+							}
+							handled = event.ctrlKey || event.metaKey;
+							break; // +1 week on ctrl or command +down
+					default: handled = false;
+				}
+			} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home
+				$.datepicker._showDatepicker(this);
+			} else {
+				handled = false;
+			}
+	
+			if (handled) {
+				event.preventDefault();
+				event.stopPropagation();
+			}
+		},
+	
+		/* Filter entered characters - based on date format. */
+		_doKeyPress: function(event) {
+			var chars, chr,
+				inst = $.datepicker._getInst(event.target);
+	
+			if ($.datepicker._get(inst, "constrainInput")) {
+				chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat"));
+				chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);
+				return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1);
+			}
+		},
+	
+		/* Synchronise manual entry and field/alternate field. */
+		_doKeyUp: function(event) {
+			var date,
+				inst = $.datepicker._getInst(event.target);
+	
+			if (inst.input.val() !== inst.lastVal) {
+				try {
+					date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
+						(inst.input ? inst.input.val() : null),
+						$.datepicker._getFormatConfig(inst));
+	
+					if (date) { // only if valid
+						$.datepicker._setDateFromField(inst);
+						$.datepicker._updateAlternate(inst);
+						$.datepicker._updateDatepicker(inst);
+					}
+				}
+				catch (err) {
+				}
+			}
+			return true;
+		},
+	
+		/* Pop-up the date picker for a given input field.
+		 * If false returned from beforeShow event handler do not show.
+		 * @param  input  element - the input field attached to the date picker or
+		 *					event - if triggered by focus
+		 */
+		_showDatepicker: function(input) {
+			input = input.target || input;
+			if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger
+				input = $("input", input.parentNode)[0];
+			}
+	
+			if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here
+				return;
+			}
+	
+			var inst, beforeShow, beforeShowSettings, isFixed,
+				offset, showAnim, duration;
+	
+			inst = $.datepicker._getInst(input);
+			if ($.datepicker._curInst && $.datepicker._curInst !== inst) {
+				$.datepicker._curInst.dpDiv.stop(true, true);
+				if ( inst && $.datepicker._datepickerShowing ) {
+					$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );
+				}
+			}
+	
+			beforeShow = $.datepicker._get(inst, "beforeShow");
+			beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};
+			if(beforeShowSettings === false){
+				return;
+			}
+			extendRemove(inst.settings, beforeShowSettings);
+	
+			inst.lastVal = null;
+			$.datepicker._lastInput = input;
+			$.datepicker._setDateFromField(inst);
+	
+			if ($.datepicker._inDialog) { // hide cursor
+				input.value = "";
+			}
+			if (!$.datepicker._pos) { // position below input
+				$.datepicker._pos = $.datepicker._findPos(input);
+				$.datepicker._pos[1] += input.offsetHeight; // add the height
+			}
+	
+			isFixed = false;
+			$(input).parents().each(function() {
+				isFixed |= $(this).css("position") === "fixed";
+				return !isFixed;
+			});
+	
+			offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};
+			$.datepicker._pos = null;
+			//to avoid flashes on Firefox
+			inst.dpDiv.empty();
+			// determine sizing offscreen
+			inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"});
+			$.datepicker._updateDatepicker(inst);
+			// fix width for dynamic number of date pickers
+			// and adjust position before showing
+			offset = $.datepicker._checkOffset(inst, offset, isFixed);
+			inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?
+				"static" : (isFixed ? "fixed" : "absolute")), display: "none",
+				left: offset.left + "px", top: offset.top + "px"});
+	
+			if (!inst.inline) {
+				showAnim = $.datepicker._get(inst, "showAnim");
+				duration = $.datepicker._get(inst, "duration");
+				inst.dpDiv.zIndex($(input).zIndex()+1);
+				$.datepicker._datepickerShowing = true;
+	
+				if ( $.effects && $.effects.effect[ showAnim ] ) {
+					inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration);
+				} else {
+					inst.dpDiv[showAnim || "show"](showAnim ? duration : null);
+				}
+	
+				if ( $.datepicker._shouldFocusInput( inst ) ) {
+					inst.input.focus();
+				}
+	
+				$.datepicker._curInst = inst;
+			}
+		},
+	
+		/* Generate the date picker content. */
+		_updateDatepicker: function(inst) {
+			this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
+			instActive = inst; // for delegate hover events
+			inst.dpDiv.empty().append(this._generateHTML(inst));
+			this._attachHandlers(inst);
+			inst.dpDiv.find("." + this._dayOverClass + " a").mouseover();
+	
+			var origyearshtml,
+				numMonths = this._getNumberOfMonths(inst),
+				cols = numMonths[1],
+				width = 17;
+	
+			inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
+			if (cols > 1) {
+				inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em");
+			}
+			inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") +
+				"Class"]("ui-datepicker-multi");
+			inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") +
+				"Class"]("ui-datepicker-rtl");
+	
+			if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
+				inst.input.focus();
+			}
+	
+			// deffered render of the years select (to avoid flashes on Firefox)
+			if( inst.yearshtml ){
+				origyearshtml = inst.yearshtml;
+				setTimeout(function(){
+					//assure that inst.yearshtml didn't change.
+					if( origyearshtml === inst.yearshtml && inst.yearshtml ){
+						inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml);
+					}
+					origyearshtml = inst.yearshtml = null;
+				}, 0);
+			}
+		},
+	
+		// #6694 - don't focus the input if it's already focused
+		// this breaks the change event in IE
+		// Support: IE and jQuery <1.9
+		_shouldFocusInput: function( inst ) {
+			return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
+		},
+	
+		/* Check positioning to remain on screen. */
+		_checkOffset: function(inst, offset, isFixed) {
+			var dpWidth = inst.dpDiv.outerWidth(),
+				dpHeight = inst.dpDiv.outerHeight(),
+				inputWidth = inst.input ? inst.input.outerWidth() : 0,
+				inputHeight = inst.input ? inst.input.outerHeight() : 0,
+				viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),
+				viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());
+	
+			offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0);
+			offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;
+			offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
+	
+			// now check if datepicker is showing outside window viewport - move to a better place if so.
+			offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?
+				Math.abs(offset.left + dpWidth - viewWidth) : 0);
+			offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?
+				Math.abs(dpHeight + inputHeight) : 0);
+	
+			return offset;
+		},
+	
+		/* Find an object's position on the screen. */
+		_findPos: function(obj) {
+			var position,
+				inst = this._getInst(obj),
+				isRTL = this._get(inst, "isRTL");
+	
+			while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {
+				obj = obj[isRTL ? "previousSibling" : "nextSibling"];
+			}
+	
+			position = $(obj).offset();
+			return [position.left, position.top];
+		},
+	
+		/* Hide the date picker from view.
+		 * @param  input  element - the input field attached to the date picker
+		 */
+		_hideDatepicker: function(input) {
+			var showAnim, duration, postProcess, onClose,
+				inst = this._curInst;
+	
+			if (!inst || (input && inst !== $.data(input, PROP_NAME))) {
+				return;
+			}
+	
+			if (this._datepickerShowing) {
+				showAnim = this._get(inst, "showAnim");
+				duration = this._get(inst, "duration");
+				postProcess = function() {
+					$.datepicker._tidyDialog(inst);
+				};
+	
+				// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
+				if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
+					inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess);
+				} else {
+					inst.dpDiv[(showAnim === "slideDown" ? "slideUp" :
+						(showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess);
+				}
+	
+				if (!showAnim) {
+					postProcess();
+				}
+				this._datepickerShowing = false;
+	
+				onClose = this._get(inst, "onClose");
+				if (onClose) {
+					onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]);
+				}
+	
+				this._lastInput = null;
+				if (this._inDialog) {
+					this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" });
+					if ($.blockUI) {
+						$.unblockUI();
+						$("body").append(this.dpDiv);
+					}
+				}
+				this._inDialog = false;
+			}
+		},
+	
+		/* Tidy up after a dialog display. */
+		_tidyDialog: function(inst) {
+			inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar");
+		},
+	
+		/* Close date picker if clicked elsewhere. */
+		_checkExternalClick: function(event) {
+			if (!$.datepicker._curInst) {
+				return;
+			}
+	
+			var $target = $(event.target),
+				inst = $.datepicker._getInst($target[0]);
+	
+			if ( ( ( $target[0].id !== $.datepicker._mainDivId &&
+					$target.parents("#" + $.datepicker._mainDivId).length === 0 &&
+					!$target.hasClass($.datepicker.markerClassName) &&
+					!$target.closest("." + $.datepicker._triggerClass).length &&
+					$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
+				( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {
+					$.datepicker._hideDatepicker();
+			}
+		},
+	
+		/* Adjust one of the date sub-fields. */
+		_adjustDate: function(id, offset, period) {
+			var target = $(id),
+				inst = this._getInst(target[0]);
+	
+			if (this._isDisabledDatepicker(target[0])) {
+				return;
+			}
+			this._adjustInstDate(inst, offset +
+				(period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning
+				period);
+			this._updateDatepicker(inst);
+		},
+	
+		/* Action for current link. */
+		_gotoToday: function(id) {
+			var date,
+				target = $(id),
+				inst = this._getInst(target[0]);
+	
+			if (this._get(inst, "gotoCurrent") && inst.currentDay) {
+				inst.selectedDay = inst.currentDay;
+				inst.drawMonth = inst.selectedMonth = inst.currentMonth;
+				inst.drawYear = inst.selectedYear = inst.currentYear;
+			} else {
+				date = new Date();
+				inst.selectedDay = date.getDate();
+				inst.drawMonth = inst.selectedMonth = date.getMonth();
+				inst.drawYear = inst.selectedYear = date.getFullYear();
+			}
+			this._notifyChange(inst);
+			this._adjustDate(target);
+		},
+	
+		/* Action for selecting a new month/year. */
+		_selectMonthYear: function(id, select, period) {
+			var target = $(id),
+				inst = this._getInst(target[0]);
+	
+			inst["selected" + (period === "M" ? "Month" : "Year")] =
+			inst["draw" + (period === "M" ? "Month" : "Year")] =
+				parseInt(select.options[select.selectedIndex].value,10);
+	
+			this._notifyChange(inst);
+			this._adjustDate(target);
+		},
+	
+		/* Action for selecting a day. */
+		_selectDay: function(id, month, year, td) {
+			var inst,
+				target = $(id);
+	
+			if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {
+				return;
+			}
+	
+			inst = this._getInst(target[0]);
+			inst.selectedDay = inst.currentDay = $("a", td).html();
+			inst.selectedMonth = inst.currentMonth = month;
+			inst.selectedYear = inst.currentYear = year;
+			this._selectDate(id, this._formatDate(inst,
+				inst.currentDay, inst.currentMonth, inst.currentYear));
+		},
+	
+		/* Erase the input field and hide the date picker. */
+		_clearDate: function(id) {
+			var target = $(id);
+			this._selectDate(target, "");
+		},
+	
+		/* Update the input field with the selected date. */
+		_selectDate: function(id, dateStr) {
+			var onSelect,
+				target = $(id),
+				inst = this._getInst(target[0]);
+	
+			dateStr = (dateStr != null ? dateStr : this._formatDate(inst));
+			if (inst.input) {
+				inst.input.val(dateStr);
+			}
+			this._updateAlternate(inst);
+	
+			onSelect = this._get(inst, "onSelect");
+			if (onSelect) {
+				onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback
+			} else if (inst.input) {
+				inst.input.trigger("change"); // fire the change event
+			}
+	
+			if (inst.inline){
+				this._updateDatepicker(inst);
+			} else {
+				this._hideDatepicker();
+				this._lastInput = inst.input[0];
+				if (typeof(inst.input[0]) !== "object") {
+					inst.input.focus(); // restore focus
+				}
+				this._lastInput = null;
+			}
+		},
+	
+		/* Update any alternate field to synchronise with the main field. */
+		_updateAlternate: function(inst) {
+			var altFormat, date, dateStr,
+				altField = this._get(inst, "altField");
+	
+			if (altField) { // update alternate field too
+				altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat");
+				date = this._getDate(inst);
+				dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
+				$(altField).each(function() { $(this).val(dateStr); });
+			}
+		},
+	
+		/* Set as beforeShowDay function to prevent selection of weekends.
+		 * @param  date  Date - the date to customise
+		 * @return [boolean, string] - is this date selectable?, what is its CSS class?
+		 */
+		noWeekends: function(date) {
+			var day = date.getDay();
+			return [(day > 0 && day < 6), ""];
+		},
+	
+		/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
+		 * @param  date  Date - the date to get the week for
+		 * @return  number - the number of the week within the year that contains this date
+		 */
+		iso8601Week: function(date) {
+			var time,
+				checkDate = new Date(date.getTime());
+	
+			// Find Thursday of this week starting on Monday
+			checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));
+	
+			time = checkDate.getTime();
+			checkDate.setMonth(0); // Compare with Jan 1
+			checkDate.setDate(1);
+			return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;
+		},
+	
+		/* Parse a string value into a date object.
+		 * See formatDate below for the possible formats.
+		 *
+		 * @param  format string - the expected format of the date
+		 * @param  value string - the date in the above format
+		 * @param  settings Object - attributes include:
+		 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
+		 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
+		 *					dayNames		string[7] - names of the days from Sunday (optional)
+		 *					monthNamesShort string[12] - abbreviated names of the months (optional)
+		 *					monthNames		string[12] - names of the months (optional)
+		 * @return  Date - the extracted date value or null if value is blank
+		 */
+		parseDate: function (format, value, settings) {
+			if (format == null || value == null) {
+				throw "Invalid arguments";
+			}
+	
+			value = (typeof value === "object" ? value.toString() : value + "");
+			if (value === "") {
+				return null;
+			}
+	
+			var iFormat, dim, extra,
+				iValue = 0,
+				shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,
+				shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp :
+					new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),
+				dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
+				dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
+				monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
+				monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
+				year = -1,
+				month = -1,
+				day = -1,
+				doy = -1,
+				literal = false,
+				date,
+				// Check whether a format character is doubled
+				lookAhead = function(match) {
+					var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
+					if (matches) {
+						iFormat++;
+					}
+					return matches;
+				},
+				// Extract a number from the string value
+				getNumber = function(match) {
+					var isDoubled = lookAhead(match),
+						size = (match === "@" ? 14 : (match === "!" ? 20 :
+						(match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))),
+						digits = new RegExp("^\\d{1," + size + "}"),
+						num = value.substring(iValue).match(digits);
+					if (!num) {
+						throw "Missing number at position " + iValue;
+					}
+					iValue += num[0].length;
+					return parseInt(num[0], 10);
+				},
+				// Extract a name from the string value and convert to an index
+				getName = function(match, shortNames, longNames) {
+					var index = -1,
+						names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {
+							return [ [k, v] ];
+						}).sort(function (a, b) {
+							return -(a[1].length - b[1].length);
+						});
+	
+					$.each(names, function (i, pair) {
+						var name = pair[1];
+						if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {
+							index = pair[0];
+							iValue += name.length;
+							return false;
+						}
+					});
+					if (index !== -1) {
+						return index + 1;
+					} else {
+						throw "Unknown name at position " + iValue;
+					}
+				},
+				// Confirm that a literal character matches the string value
+				checkLiteral = function() {
+					if (value.charAt(iValue) !== format.charAt(iFormat)) {
+						throw "Unexpected literal at position " + iValue;
+					}
+					iValue++;
+				};
+	
+			for (iFormat = 0; iFormat < format.length; iFormat++) {
+				if (literal) {
+					if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
+						literal = false;
+					} else {
+						checkLiteral();
+					}
+				} else {
+					switch (format.charAt(iFormat)) {
+						case "d":
+							day = getNumber("d");
+							break;
+						case "D":
+							getName("D", dayNamesShort, dayNames);
+							break;
+						case "o":
+							doy = getNumber("o");
+							break;
+						case "m":
+							month = getNumber("m");
+							break;
+						case "M":
+							month = getName("M", monthNamesShort, monthNames);
+							break;
+						case "y":
+							year = getNumber("y");
+							break;
+						case "@":
+							date = new Date(getNumber("@"));
+							year = date.getFullYear();
+							month = date.getMonth() + 1;
+							day = date.getDate();
+							break;
+						case "!":
+							date = new Date((getNumber("!") - this._ticksTo1970) / 10000);
+							year = date.getFullYear();
+							month = date.getMonth() + 1;
+							day = date.getDate();
+							break;
+						case "'":
+							if (lookAhead("'")){
+								checkLiteral();
+							} else {
+								literal = true;
+							}
+							break;
+						default:
+							checkLiteral();
+					}
+				}
+			}
+	
+			if (iValue < value.length){
+				extra = value.substr(iValue);
+				if (!/^\s+/.test(extra)) {
+					throw "Extra/unparsed characters found in date: " + extra;
+				}
+			}
+	
+			if (year === -1) {
+				year = new Date().getFullYear();
+			} else if (year < 100) {
+				year += new Date().getFullYear() - new Date().getFullYear() % 100 +
+					(year <= shortYearCutoff ? 0 : -100);
+			}
+	
+			if (doy > -1) {
+				month = 1;
+				day = doy;
+				do {
+					dim = this._getDaysInMonth(year, month - 1);
+					if (day <= dim) {
+						break;
+					}
+					month++;
+					day -= dim;
+				} while (true);
+			}
+	
+			date = this._daylightSavingAdjust(new Date(year, month - 1, day));
+			if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {
+				throw "Invalid date"; // E.g. 31/02/00
+			}
+			return date;
+		},
+	
+		/* Standard date formats. */
+		ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
+		COOKIE: "D, dd M yy",
+		ISO_8601: "yy-mm-dd",
+		RFC_822: "D, d M y",
+		RFC_850: "DD, dd-M-y",
+		RFC_1036: "D, d M y",
+		RFC_1123: "D, d M yy",
+		RFC_2822: "D, d M yy",
+		RSS: "D, d M y", // RFC 822
+		TICKS: "!",
+		TIMESTAMP: "@",
+		W3C: "yy-mm-dd", // ISO 8601
+	
+		_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +
+			Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),
+	
+		/* Format a date object into a string value.
+		 * The format can be combinations of the following:
+		 * d  - day of month (no leading zero)
+		 * dd - day of month (two digit)
+		 * o  - day of year (no leading zeros)
+		 * oo - day of year (three digit)
+		 * D  - day name short
+		 * DD - day name long
+		 * m  - month of year (no leading zero)
+		 * mm - month of year (two digit)
+		 * M  - month name short
+		 * MM - month name long
+		 * y  - year (two digit)
+		 * yy - year (four digit)
+		 * @ - Unix timestamp (ms since 01/01/1970)
+		 * ! - Windows ticks (100ns since 01/01/0001)
+		 * "..." - literal text
+		 * '' - single quote
+		 *
+		 * @param  format string - the desired format of the date
+		 * @param  date Date - the date value to format
+		 * @param  settings Object - attributes include:
+		 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
+		 *					dayNames		string[7] - names of the days from Sunday (optional)
+		 *					monthNamesShort string[12] - abbreviated names of the months (optional)
+		 *					monthNames		string[12] - names of the months (optional)
+		 * @return  string - the date in the above format
+		 */
+		formatDate: function (format, date, settings) {
+			if (!date) {
+				return "";
+			}
+	
+			var iFormat,
+				dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,
+				dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,
+				monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,
+				monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,
+				// Check whether a format character is doubled
+				lookAhead = function(match) {
+					var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
+					if (matches) {
+						iFormat++;
+					}
+					return matches;
+				},
+				// Format a number, with leading zero if necessary
+				formatNumber = function(match, value, len) {
+					var num = "" + value;
+					if (lookAhead(match)) {
+						while (num.length < len) {
+							num = "0" + num;
+						}
+					}
+					return num;
+				},
+				// Format a name, short or long as requested
+				formatName = function(match, value, shortNames, longNames) {
+					return (lookAhead(match) ? longNames[value] : shortNames[value]);
+				},
+				output = "",
+				literal = false;
+	
+			if (date) {
+				for (iFormat = 0; iFormat < format.length; iFormat++) {
+					if (literal) {
+						if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
+							literal = false;
+						} else {
+							output += format.charAt(iFormat);
+						}
+					} else {
+						switch (format.charAt(iFormat)) {
+							case "d":
+								output += formatNumber("d", date.getDate(), 2);
+								break;
+							case "D":
+								output += formatName("D", date.getDay(), dayNamesShort, dayNames);
+								break;
+							case "o":
+								output += formatNumber("o",
+									Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);
+								break;
+							case "m":
+								output += formatNumber("m", date.getMonth() + 1, 2);
+								break;
+							case "M":
+								output += formatName("M", date.getMonth(), monthNamesShort, monthNames);
+								break;
+							case "y":
+								output += (lookAhead("y") ? date.getFullYear() :
+									(date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100);
+								break;
+							case "@":
+								output += date.getTime();
+								break;
+							case "!":
+								output += date.getTime() * 10000 + this._ticksTo1970;
+								break;
+							case "'":
+								if (lookAhead("'")) {
+									output += "'";
+								} else {
+									literal = true;
+								}
+								break;
+							default:
+								output += format.charAt(iFormat);
+						}
+					}
+				}
+			}
+			return output;
+		},
+	
+		/* Extract all possible characters from the date format. */
+		_possibleChars: function (format) {
+			var iFormat,
+				chars = "",
+				literal = false,
+				// Check whether a format character is doubled
+				lookAhead = function(match) {
+					var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);
+					if (matches) {
+						iFormat++;
+					}
+					return matches;
+				};
+	
+			for (iFormat = 0; iFormat < format.length; iFormat++) {
+				if (literal) {
+					if (format.charAt(iFormat) === "'" && !lookAhead("'")) {
+						literal = false;
+					} else {
+						chars += format.charAt(iFormat);
+					}
+				} else {
+					switch (format.charAt(iFormat)) {
+						case "d": case "m": case "y": case "@":
+							chars += "0123456789";
+							break;
+						case "D": case "M":
+							return null; // Accept anything
+						case "'":
+							if (lookAhead("'")) {
+								chars += "'";
+							} else {
+								literal = true;
+							}
+							break;
+						default:
+							chars += format.charAt(iFormat);
+					}
+				}
+			}
+			return chars;
+		},
+	
+		/* Get a setting value, defaulting if necessary. */
+		_get: function(inst, name) {
+			return inst.settings[name] !== undefined ?
+				inst.settings[name] : this._defaults[name];
+		},
+	
+		/* Parse existing date and initialise date picker. */
+		_setDateFromField: function(inst, noDefault) {
+			if (inst.input.val() === inst.lastVal) {
+				return;
+			}
+	
+			var dateFormat = this._get(inst, "dateFormat"),
+				dates = inst.lastVal = inst.input ? inst.input.val() : null,
+				defaultDate = this._getDefaultDate(inst),
+				date = defaultDate,
+				settings = this._getFormatConfig(inst);
+	
+			try {
+				date = this.parseDate(dateFormat, dates, settings) || defaultDate;
+			} catch (event) {
+				dates = (noDefault ? "" : dates);
+			}
+			inst.selectedDay = date.getDate();
+			inst.drawMonth = inst.selectedMonth = date.getMonth();
+			inst.drawYear = inst.selectedYear = date.getFullYear();
+			inst.currentDay = (dates ? date.getDate() : 0);
+			inst.currentMonth = (dates ? date.getMonth() : 0);
+			inst.currentYear = (dates ? date.getFullYear() : 0);
+			this._adjustInstDate(inst);
+		},
+	
+		/* Retrieve the default date shown on opening. */
+		_getDefaultDate: function(inst) {
+			return this._restrictMinMax(inst,
+				this._determineDate(inst, this._get(inst, "defaultDate"), new Date()));
+		},
+	
+		/* A date may be specified as an exact value or a relative one. */
+		_determineDate: function(inst, date, defaultDate) {
+			var offsetNumeric = function(offset) {
+					var date = new Date();
+					date.setDate(date.getDate() + offset);
+					return date;
+				},
+				offsetString = function(offset) {
+					try {
+						return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"),
+							offset, $.datepicker._getFormatConfig(inst));
+					}
+					catch (e) {
+						// Ignore
+					}
+	
+					var date = (offset.toLowerCase().match(/^c/) ?
+						$.datepicker._getDate(inst) : null) || new Date(),
+						year = date.getFullYear(),
+						month = date.getMonth(),
+						day = date.getDate(),
+						pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
+						matches = pattern.exec(offset);
+	
+					while (matches) {
+						switch (matches[2] || "d") {
+							case "d" : case "D" :
+								day += parseInt(matches[1],10); break;
+							case "w" : case "W" :
+								day += parseInt(matches[1],10) * 7; break;
+							case "m" : case "M" :
+								month += parseInt(matches[1],10);
+								day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
+								break;
+							case "y": case "Y" :
+								year += parseInt(matches[1],10);
+								day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
+								break;
+						}
+						matches = pattern.exec(offset);
+					}
+					return new Date(year, month, day);
+				},
+				newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) :
+					(typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));
+	
+			newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate);
+			if (newDate) {
+				newDate.setHours(0);
+				newDate.setMinutes(0);
+				newDate.setSeconds(0);
+				newDate.setMilliseconds(0);
+			}
+			return this._daylightSavingAdjust(newDate);
+		},
+	
+		/* Handle switch to/from daylight saving.
+		 * Hours may be non-zero on daylight saving cut-over:
+		 * > 12 when midnight changeover, but then cannot generate
+		 * midnight datetime, so jump to 1AM, otherwise reset.
+		 * @param  date  (Date) the date to check
+		 * @return  (Date) the corrected date
+		 */
+		_daylightSavingAdjust: function(date) {
+			if (!date) {
+				return null;
+			}
+			date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);
+			return date;
+		},
+	
+		/* Set the date(s) directly. */
+		_setDate: function(inst, date, noChange) {
+			var clear = !date,
+				origMonth = inst.selectedMonth,
+				origYear = inst.selectedYear,
+				newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
+	
+			inst.selectedDay = inst.currentDay = newDate.getDate();
+			inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
+			inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
+			if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {
+				this._notifyChange(inst);
+			}
+			this._adjustInstDate(inst);
+			if (inst.input) {
+				inst.input.val(clear ? "" : this._formatDate(inst));
+			}
+		},
+	
+		/* Retrieve the date(s) directly. */
+		_getDate: function(inst) {
+			var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null :
+				this._daylightSavingAdjust(new Date(
+				inst.currentYear, inst.currentMonth, inst.currentDay)));
+				return startDate;
+		},
+	
+		/* Attach the onxxx handlers.  These are declared statically so
+		 * they work with static code transformers like Caja.
+		 */
+		_attachHandlers: function(inst) {
+			var stepMonths = this._get(inst, "stepMonths"),
+				id = "#" + inst.id.replace( /\\\\/g, "\\" );
+			inst.dpDiv.find("[data-handler]").map(function () {
+				var handler = {
+					prev: function () {
+						$.datepicker._adjustDate(id, -stepMonths, "M");
+					},
+					next: function () {
+						$.datepicker._adjustDate(id, +stepMonths, "M");
+					},
+					hide: function () {
+						$.datepicker._hideDatepicker();
+					},
+					today: function () {
+						$.datepicker._gotoToday(id);
+					},
+					selectDay: function () {
+						$.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this);
+						return false;
+					},
+					selectMonth: function () {
+						$.datepicker._selectMonthYear(id, this, "M");
+						return false;
+					},
+					selectYear: function () {
+						$.datepicker._selectMonthYear(id, this, "Y");
+						return false;
+					}
+				};
+				$(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]);
+			});
+		},
+	
+		/* Generate the HTML for the current state of the date picker. */
+		_generateHTML: function(inst) {
+			var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
+				controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
+				monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
+				selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
+				cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
+				printDate, dRow, tbody, daySettings, otherMonth, unselectable,
+				tempDate = new Date(),
+				today = this._daylightSavingAdjust(
+					new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time
+				isRTL = this._get(inst, "isRTL"),
+				showButtonPanel = this._get(inst, "showButtonPanel"),
+				hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"),
+				navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"),
+				numMonths = this._getNumberOfMonths(inst),
+				showCurrentAtPos = this._get(inst, "showCurrentAtPos"),
+				stepMonths = this._get(inst, "stepMonths"),
+				isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),
+				currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :
+					new Date(inst.currentYear, inst.currentMonth, inst.currentDay))),
+				minDate = this._getMinMaxDate(inst, "min"),
+				maxDate = this._getMinMaxDate(inst, "max"),
+				drawMonth = inst.drawMonth - showCurrentAtPos,
+				drawYear = inst.drawYear;
+	
+			if (drawMonth < 0) {
+				drawMonth += 12;
+				drawYear--;
+			}
+			if (maxDate) {
+				maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),
+					maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));
+				maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);
+				while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {
+					drawMonth--;
+					if (drawMonth < 0) {
+						drawMonth = 11;
+						drawYear--;
+					}
+				}
+			}
+			inst.drawMonth = drawMonth;
+			inst.drawYear = drawYear;
+	
+			prevText = this._get(inst, "prevText");
+			prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,
+				this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),
+				this._getFormatConfig(inst)));
+	
+			prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?
+				"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
+				" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" :
+				(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>"));
+	
+			nextText = this._get(inst, "nextText");
+			nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,
+				this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),
+				this._getFormatConfig(inst)));
+	
+			next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?
+				"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
+				" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" :
+				(hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>"));
+	
+			currentText = this._get(inst, "currentText");
+			gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today);
+			currentText = (!navigationAsDateFormat ? currentText :
+				this.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));
+	
+			controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
+				this._get(inst, "closeText") + "</button>" : "");
+	
+			buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") +
+				(this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
+				">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : "";
+	
+			firstDay = parseInt(this._get(inst, "firstDay"),10);
+			firstDay = (isNaN(firstDay) ? 0 : firstDay);
+	
+			showWeek = this._get(inst, "showWeek");
+			dayNames = this._get(inst, "dayNames");
+			dayNamesMin = this._get(inst, "dayNamesMin");
+			monthNames = this._get(inst, "monthNames");
+			monthNamesShort = this._get(inst, "monthNamesShort");
+			beforeShowDay = this._get(inst, "beforeShowDay");
+			showOtherMonths = this._get(inst, "showOtherMonths");
+			selectOtherMonths = this._get(inst, "selectOtherMonths");
+			defaultDate = this._getDefaultDate(inst);
+			html = "";
+			dow;
+			for (row = 0; row < numMonths[0]; row++) {
+				group = "";
+				this.maxRows = 4;
+				for (col = 0; col < numMonths[1]; col++) {
+					selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));
+					cornerClass = " ui-corner-all";
+					calender = "";
+					if (isMultiMonth) {
+						calender += "<div class='ui-datepicker-group";
+						if (numMonths[1] > 1) {
+							switch (col) {
+								case 0: calender += " ui-datepicker-group-first";
+									cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break;
+								case numMonths[1]-1: calender += " ui-datepicker-group-last";
+									cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break;
+								default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
+							}
+						}
+						calender += "'>";
+					}
+					calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
+						(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") +
+						(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") +
+						this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,
+						row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers
+						"</div><table class='ui-datepicker-calendar'><thead>" +
+						"<tr>";
+					thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : "");
+					for (dow = 0; dow < 7; dow++) { // days of the week
+						day = (dow + firstDay) % 7;
+						thead += "<th" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" +
+							"<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>";
+					}
+					calender += thead + "</tr></thead><tbody>";
+					daysInMonth = this._getDaysInMonth(drawYear, drawMonth);
+					if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {
+						inst.selectedDay = Math.min(inst.selectedDay, daysInMonth);
+					}
+					leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;
+					curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate
+					numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)
+					this.maxRows = numRows;
+					printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));
+					for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows
+						calender += "<tr>";
+						tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
+							this._get(inst, "calculateWeek")(printDate) + "</td>");
+						for (dow = 0; dow < 7; dow++) { // create date picker days
+							daySettings = (beforeShowDay ?
+								beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]);
+							otherMonth = (printDate.getMonth() !== drawMonth);
+							unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||
+								(minDate && printDate < minDate) || (maxDate && printDate > maxDate);
+							tbody += "<td class='" +
+								((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends
+								(otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months
+								((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key
+								(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?
+								// or defaultDate is current printedDate and defaultDate is selectedDate
+								" " + this._dayOverClass : "") + // highlight selected day
+								(unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") +  // highlight unselectable days
+								(otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates
+								(printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day
+								(printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different)
+								((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "&#39;") + "'" : "") + // cell title
+								(unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions
+								(otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
+								(unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
+								(printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") +
+								(printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day
+								(otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months
+								"' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date
+							printDate.setDate(printDate.getDate() + 1);
+							printDate = this._daylightSavingAdjust(printDate);
+						}
+						calender += tbody + "</tr>";
+					}
+					drawMonth++;
+					if (drawMonth > 11) {
+						drawMonth = 0;
+						drawYear++;
+					}
+					calender += "</tbody></table>" + (isMultiMonth ? "</div>" +
+								((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : "");
+					group += calender;
+				}
+				html += group;
+			}
+			html += buttonPanel;
+			inst._keyEvent = false;
+			return html;
+		},
+	
+		/* Generate the month and year header. */
+		_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,
+				secondary, monthNames, monthNamesShort) {
+	
+			var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
+				changeMonth = this._get(inst, "changeMonth"),
+				changeYear = this._get(inst, "changeYear"),
+				showMonthAfterYear = this._get(inst, "showMonthAfterYear"),
+				html = "<div class='ui-datepicker-title'>",
+				monthHtml = "";
+	
+			// month selection
+			if (secondary || !changeMonth) {
+				monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>";
+			} else {
+				inMinYear = (minDate && minDate.getFullYear() === drawYear);
+				inMaxYear = (maxDate && maxDate.getFullYear() === drawYear);
+				monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
+				for ( month = 0; month < 12; month++) {
+					if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {
+						monthHtml += "<option value='" + month + "'" +
+							(month === drawMonth ? " selected='selected'" : "") +
+							">" + monthNamesShort[month] + "</option>";
+					}
+				}
+				monthHtml += "</select>";
+			}
+	
+			if (!showMonthAfterYear) {
+				html += monthHtml + (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "");
+			}
+	
+			// year selection
+			if ( !inst.yearshtml ) {
+				inst.yearshtml = "";
+				if (secondary || !changeYear) {
+					html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
+				} else {
+					// determine range of years to display
+					years = this._get(inst, "yearRange").split(":");
+					thisYear = new Date().getFullYear();
+					determineYear = function(value) {
+						var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) :
+							(value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) :
+							parseInt(value, 10)));
+						return (isNaN(year) ? thisYear : year);
+					};
+					year = determineYear(years[0]);
+					endYear = Math.max(year, determineYear(years[1] || ""));
+					year = (minDate ? Math.max(year, minDate.getFullYear()) : year);
+					endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);
+					inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
+					for (; year <= endYear; year++) {
+						inst.yearshtml += "<option value='" + year + "'" +
+							(year === drawYear ? " selected='selected'" : "") +
+							">" + year + "</option>";
+					}
+					inst.yearshtml += "</select>";
+	
+					html += inst.yearshtml;
+					inst.yearshtml = null;
+				}
+			}
+	
+			html += this._get(inst, "yearSuffix");
+			if (showMonthAfterYear) {
+				html += (secondary || !(changeMonth && changeYear) ? "&#xa0;" : "") + monthHtml;
+			}
+			html += "</div>"; // Close datepicker_header
+			return html;
+		},
+	
+		/* Adjust one of the date sub-fields. */
+		_adjustInstDate: function(inst, offset, period) {
+			var year = inst.drawYear + (period === "Y" ? offset : 0),
+				month = inst.drawMonth + (period === "M" ? offset : 0),
+				day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0),
+				date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));
+	
+			inst.selectedDay = date.getDate();
+			inst.drawMonth = inst.selectedMonth = date.getMonth();
+			inst.drawYear = inst.selectedYear = date.getFullYear();
+			if (period === "M" || period === "Y") {
+				this._notifyChange(inst);
+			}
+		},
+	
+		/* Ensure a date is within any min/max bounds. */
+		_restrictMinMax: function(inst, date) {
+			var minDate = this._getMinMaxDate(inst, "min"),
+				maxDate = this._getMinMaxDate(inst, "max"),
+				newDate = (minDate && date < minDate ? minDate : date);
+			return (maxDate && newDate > maxDate ? maxDate : newDate);
+		},
+	
+		/* Notify change of month/year. */
+		_notifyChange: function(inst) {
+			var onChange = this._get(inst, "onChangeMonthYear");
+			if (onChange) {
+				onChange.apply((inst.input ? inst.input[0] : null),
+					[inst.selectedYear, inst.selectedMonth + 1, inst]);
+			}
+		},
+	
+		/* Determine the number of months to show. */
+		_getNumberOfMonths: function(inst) {
+			var numMonths = this._get(inst, "numberOfMonths");
+			return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths));
+		},
+	
+		/* Determine the current maximum date - ensure no time components are set. */
+		_getMinMaxDate: function(inst, minMax) {
+			return this._determineDate(inst, this._get(inst, minMax + "Date"), null);
+		},
+	
+		/* Find the number of days in a given month. */
+		_getDaysInMonth: function(year, month) {
+			return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();
+		},
+	
+		/* Find the day of the week of the first of a month. */
+		_getFirstDayOfMonth: function(year, month) {
+			return new Date(year, month, 1).getDay();
+		},
+	
+		/* Determines if we should allow a "next/prev" month display change. */
+		_canAdjustMonth: function(inst, offset, curYear, curMonth) {
+			var numMonths = this._getNumberOfMonths(inst),
+				date = this._daylightSavingAdjust(new Date(curYear,
+				curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));
+	
+			if (offset < 0) {
+				date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));
+			}
+			return this._isInRange(inst, date);
+		},
+	
+		/* Is the given date in the accepted range? */
+		_isInRange: function(inst, date) {
+			var yearSplit, currentYear,
+				minDate = this._getMinMaxDate(inst, "min"),
+				maxDate = this._getMinMaxDate(inst, "max"),
+				minYear = null,
+				maxYear = null,
+				years = this._get(inst, "yearRange");
+				if (years){
+					yearSplit = years.split(":");
+					currentYear = new Date().getFullYear();
+					minYear = parseInt(yearSplit[0], 10);
+					maxYear = parseInt(yearSplit[1], 10);
+					if ( yearSplit[0].match(/[+\-].*/) ) {
+						minYear += currentYear;
+					}
+					if ( yearSplit[1].match(/[+\-].*/) ) {
+						maxYear += currentYear;
+					}
+				}
+	
+			return ((!minDate || date.getTime() >= minDate.getTime()) &&
+				(!maxDate || date.getTime() <= maxDate.getTime()) &&
+				(!minYear || date.getFullYear() >= minYear) &&
+				(!maxYear || date.getFullYear() <= maxYear));
+		},
+	
+		/* Provide the configuration settings for formatting/parsing. */
+		_getFormatConfig: function(inst) {
+			var shortYearCutoff = this._get(inst, "shortYearCutoff");
+			shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff :
+				new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
+			return {shortYearCutoff: shortYearCutoff,
+				dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"),
+				monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")};
+		},
+	
+		/* Format the given date for display. */
+		_formatDate: function(inst, day, month, year) {
+			if (!day) {
+				inst.currentDay = inst.selectedDay;
+				inst.currentMonth = inst.selectedMonth;
+				inst.currentYear = inst.selectedYear;
+			}
+			var date = (day ? (typeof day === "object" ? day :
+				this._daylightSavingAdjust(new Date(year, month, day))) :
+				this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));
+			return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst));
+		}
+	});
+	
+	/*
+	 * Bind hover events for datepicker elements.
+	 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
+	 * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
+	 */
+	function bindHover(dpDiv) {
+		var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
+		return dpDiv.delegate(selector, "mouseout", function() {
+				$(this).removeClass("ui-state-hover");
+				if (this.className.indexOf("ui-datepicker-prev") !== -1) {
+					$(this).removeClass("ui-datepicker-prev-hover");
+				}
+				if (this.className.indexOf("ui-datepicker-next") !== -1) {
+					$(this).removeClass("ui-datepicker-next-hover");
+				}
+			})
+			.delegate(selector, "mouseover", function(){
+				if (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {
+					$(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
+					$(this).addClass("ui-state-hover");
+					if (this.className.indexOf("ui-datepicker-prev") !== -1) {
+						$(this).addClass("ui-datepicker-prev-hover");
+					}
+					if (this.className.indexOf("ui-datepicker-next") !== -1) {
+						$(this).addClass("ui-datepicker-next-hover");
+					}
+				}
+			});
+	}
+	
+	/* jQuery extend now ignores nulls! */
+	function extendRemove(target, props) {
+		$.extend(target, props);
+		for (var name in props) {
+			if (props[name] == null) {
+				target[name] = props[name];
+			}
+		}
+		return target;
+	}
+	
+	/* Invoke the datepicker functionality.
+	   @param  options  string - a command, optionally followed by additional parameters or
+						Object - settings for attaching new datepicker functionality
+	   @return  jQuery object */
+	$.fn.datepicker = function(options){
+	
+		/* Verify an empty collection wasn't passed - Fixes #6976 */
+		if ( !this.length ) {
+			return this;
+		}
+	
+		/* Initialise the date picker. */
+		if (!$.datepicker.initialized) {
+			$(document).mousedown($.datepicker._checkExternalClick);
+			$.datepicker.initialized = true;
+		}
+	
+		/* Append datepicker main container to body if not exist. */
+		if ($("#"+$.datepicker._mainDivId).length === 0) {
+			$("body").append($.datepicker.dpDiv);
+		}
+	
+		var otherArgs = Array.prototype.slice.call(arguments, 1);
+		if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) {
+			return $.datepicker["_" + options + "Datepicker"].
+				apply($.datepicker, [this[0]].concat(otherArgs));
+		}
+		if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") {
+			return $.datepicker["_" + options + "Datepicker"].
+				apply($.datepicker, [this[0]].concat(otherArgs));
+		}
+		return this.each(function() {
+			typeof options === "string" ?
+				$.datepicker["_" + options + "Datepicker"].
+					apply($.datepicker, [this].concat(otherArgs)) :
+				$.datepicker._attachDatepicker(this, options);
+		});
+	};
+	
+	$.datepicker = new Datepicker(); // singleton instance
+	$.datepicker.initialized = false;
+	$.datepicker.uuid = new Date().getTime();
+	$.datepicker.version = "1.10.3";
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	var sizeRelatedOptions = {
+			buttons: true,
+			height: true,
+			maxHeight: true,
+			maxWidth: true,
+			minHeight: true,
+			minWidth: true,
+			width: true
+		},
+		resizableRelatedOptions = {
+			maxHeight: true,
+			maxWidth: true,
+			minHeight: true,
+			minWidth: true
+		};
+	
+	$.widget( "ui.dialog", {
+		version: "1.10.3",
+		options: {
+			appendTo: "body",
+			autoOpen: true,
+			buttons: [],
+			closeOnEscape: true,
+			closeText: "close",
+			dialogClass: "",
+			draggable: true,
+			hide: null,
+			height: "auto",
+			maxHeight: null,
+			maxWidth: null,
+			minHeight: 150,
+			minWidth: 150,
+			modal: false,
+			position: {
+				my: "center",
+				at: "center",
+				of: window,
+				collision: "fit",
+				// Ensure the titlebar is always visible
+				using: function( pos ) {
+					var topOffset = $( this ).css( pos ).offset().top;
+					if ( topOffset < 0 ) {
+						$( this ).css( "top", pos.top - topOffset );
+					}
+				}
+			},
+			resizable: true,
+			show: null,
+			title: null,
+			width: 300,
+	
+			// callbacks
+			beforeClose: null,
+			close: null,
+			drag: null,
+			dragStart: null,
+			dragStop: null,
+			focus: null,
+			open: null,
+			resize: null,
+			resizeStart: null,
+			resizeStop: null
+		},
+	
+		_create: function() {
+			this.originalCss = {
+				display: this.element[0].style.display,
+				width: this.element[0].style.width,
+				minHeight: this.element[0].style.minHeight,
+				maxHeight: this.element[0].style.maxHeight,
+				height: this.element[0].style.height
+			};
+			this.originalPosition = {
+				parent: this.element.parent(),
+				index: this.element.parent().children().index( this.element )
+			};
+			this.originalTitle = this.element.attr("title");
+			this.options.title = this.options.title || this.originalTitle;
+	
+			this._createWrapper();
+	
+			this.element
+				.show()
+				.removeAttr("title")
+				.addClass("ui-dialog-content ui-widget-content")
+				.appendTo( this.uiDialog );
+	
+			this._createTitlebar();
+			this._createButtonPane();
+	
+			if ( this.options.draggable && $.fn.draggable ) {
+				this._makeDraggable();
+			}
+			if ( this.options.resizable && $.fn.resizable ) {
+				this._makeResizable();
+			}
+	
+			this._isOpen = false;
+		},
+	
+		_init: function() {
+			if ( this.options.autoOpen ) {
+				this.open();
+			}
+		},
+	
+		_appendTo: function() {
+			var element = this.options.appendTo;
+			if ( element && (element.jquery || element.nodeType) ) {
+				return $( element );
+			}
+			return this.document.find( element || "body" ).eq( 0 );
+		},
+	
+		_destroy: function() {
+			var next,
+				originalPosition = this.originalPosition;
+	
+			this._destroyOverlay();
+	
+			this.element
+				.removeUniqueId()
+				.removeClass("ui-dialog-content ui-widget-content")
+				.css( this.originalCss )
+				// Without detaching first, the following becomes really slow
+				.detach();
+	
+			this.uiDialog.stop( true, true ).remove();
+	
+			if ( this.originalTitle ) {
+				this.element.attr( "title", this.originalTitle );
+			}
+	
+			next = originalPosition.parent.children().eq( originalPosition.index );
+			// Don't try to place the dialog next to itself (#8613)
+			if ( next.length && next[0] !== this.element[0] ) {
+				next.before( this.element );
+			} else {
+				originalPosition.parent.append( this.element );
+			}
+		},
+	
+		widget: function() {
+			return this.uiDialog;
+		},
+	
+		disable: $.noop,
+		enable: $.noop,
+	
+		close: function( event ) {
+			var that = this;
+	
+			if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
+				return;
+			}
+	
+			this._isOpen = false;
+			this._destroyOverlay();
+	
+			if ( !this.opener.filter(":focusable").focus().length ) {
+				// Hiding a focused element doesn't trigger blur in WebKit
+				// so in case we have nothing to focus on, explicitly blur the active element
+				// https://bugs.webkit.org/show_bug.cgi?id=47182
+				$( this.document[0].activeElement ).blur();
+			}
+	
+			this._hide( this.uiDialog, this.options.hide, function() {
+				that._trigger( "close", event );
+			});
+		},
+	
+		isOpen: function() {
+			return this._isOpen;
+		},
+	
+		moveToTop: function() {
+			this._moveToTop();
+		},
+	
+		_moveToTop: function( event, silent ) {
+			var moved = !!this.uiDialog.nextAll(":visible").insertBefore( this.uiDialog ).length;
+			if ( moved && !silent ) {
+				this._trigger( "focus", event );
+			}
+			return moved;
+		},
+	
+		open: function() {
+			var that = this;
+			if ( this._isOpen ) {
+				if ( this._moveToTop() ) {
+					this._focusTabbable();
+				}
+				return;
+			}
+	
+			this._isOpen = true;
+			this.opener = $( this.document[0].activeElement );
+	
+			this._size();
+			this._position();
+			this._createOverlay();
+			this._moveToTop( null, true );
+			this._show( this.uiDialog, this.options.show, function() {
+				that._focusTabbable();
+				that._trigger("focus");
+			});
+	
+			this._trigger("open");
+		},
+	
+		_focusTabbable: function() {
+			// Set focus to the first match:
+			// 1. First element inside the dialog matching [autofocus]
+			// 2. Tabbable element inside the content element
+			// 3. Tabbable element inside the buttonpane
+			// 4. The close button
+			// 5. The dialog itself
+			var hasFocus = this.element.find("[autofocus]");
+			if ( !hasFocus.length ) {
+				hasFocus = this.element.find(":tabbable");
+			}
+			if ( !hasFocus.length ) {
+				hasFocus = this.uiDialogButtonPane.find(":tabbable");
+			}
+			if ( !hasFocus.length ) {
+				hasFocus = this.uiDialogTitlebarClose.filter(":tabbable");
+			}
+			if ( !hasFocus.length ) {
+				hasFocus = this.uiDialog;
+			}
+			hasFocus.eq( 0 ).focus();
+		},
+	
+		_keepFocus: function( event ) {
+			function checkFocus() {
+				var activeElement = this.document[0].activeElement,
+					isActive = this.uiDialog[0] === activeElement ||
+						$.contains( this.uiDialog[0], activeElement );
+				if ( !isActive ) {
+					this._focusTabbable();
+				}
+			}
+			event.preventDefault();
+			checkFocus.call( this );
+			// support: IE
+			// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
+			// so we check again later
+			this._delay( checkFocus );
+		},
+	
+		_createWrapper: function() {
+			this.uiDialog = $("<div>")
+				.addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " +
+					this.options.dialogClass )
+				.hide()
+				.attr({
+					// Setting tabIndex makes the div focusable
+					tabIndex: -1,
+					role: "dialog"
+				})
+				.appendTo( this._appendTo() );
+	
+			this._on( this.uiDialog, {
+				keydown: function( event ) {
+					if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
+							event.keyCode === $.ui.keyCode.ESCAPE ) {
+						event.preventDefault();
+						this.close( event );
+						return;
+					}
+	
+					// prevent tabbing out of dialogs
+					if ( event.keyCode !== $.ui.keyCode.TAB ) {
+						return;
+					}
+					var tabbables = this.uiDialog.find(":tabbable"),
+						first = tabbables.filter(":first"),
+						last  = tabbables.filter(":last");
+	
+					if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {
+						first.focus( 1 );
+						event.preventDefault();
+					} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {
+						last.focus( 1 );
+						event.preventDefault();
+					}
+				},
+				mousedown: function( event ) {
+					if ( this._moveToTop( event ) ) {
+						this._focusTabbable();
+					}
+				}
+			});
+	
+			// We assume that any existing aria-describedby attribute means
+			// that the dialog content is marked up properly
+			// otherwise we brute force the content as the description
+			if ( !this.element.find("[aria-describedby]").length ) {
+				this.uiDialog.attr({
+					"aria-describedby": this.element.uniqueId().attr("id")
+				});
+			}
+		},
+	
+		_createTitlebar: function() {
+			var uiDialogTitle;
+	
+			this.uiDialogTitlebar = $("<div>")
+				.addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix")
+				.prependTo( this.uiDialog );
+			this._on( this.uiDialogTitlebar, {
+				mousedown: function( event ) {
+					// Don't prevent click on close button (#8838)
+					// Focusing a dialog that is partially scrolled out of view
+					// causes the browser to scroll it into view, preventing the click event
+					if ( !$( event.target ).closest(".ui-dialog-titlebar-close") ) {
+						// Dialog isn't getting focus when dragging (#8063)
+						this.uiDialog.focus();
+					}
+				}
+			});
+	
+			this.uiDialogTitlebarClose = $("<button></button>")
+				.button({
+					label: this.options.closeText,
+					icons: {
+						primary: "ui-icon-closethick"
+					},
+					text: false
+				})
+				.addClass("ui-dialog-titlebar-close")
+				.appendTo( this.uiDialogTitlebar );
+			this._on( this.uiDialogTitlebarClose, {
+				click: function( event ) {
+					event.preventDefault();
+					this.close( event );
+				}
+			});
+	
+			uiDialogTitle = $("<span>")
+				.uniqueId()
+				.addClass("ui-dialog-title")
+				.prependTo( this.uiDialogTitlebar );
+			this._title( uiDialogTitle );
+	
+			this.uiDialog.attr({
+				"aria-labelledby": uiDialogTitle.attr("id")
+			});
+		},
+	
+		_title: function( title ) {
+			if ( !this.options.title ) {
+				title.html("&#160;");
+			}
+			title.text( this.options.title );
+		},
+	
+		_createButtonPane: function() {
+			this.uiDialogButtonPane = $("<div>")
+				.addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix");
+	
+			this.uiButtonSet = $("<div>")
+				.addClass("ui-dialog-buttonset")
+				.appendTo( this.uiDialogButtonPane );
+	
+			this._createButtons();
+		},
+	
+		_createButtons: function() {
+			var that = this,
+				buttons = this.options.buttons;
+	
+			// if we already have a button pane, remove it
+			this.uiDialogButtonPane.remove();
+			this.uiButtonSet.empty();
+	
+			if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {
+				this.uiDialog.removeClass("ui-dialog-buttons");
+				return;
+			}
+	
+			$.each( buttons, function( name, props ) {
+				var click, buttonOptions;
+				props = $.isFunction( props ) ?
+					{ click: props, text: name } :
+					props;
+				// Default to a non-submitting button
+				props = $.extend( { type: "button" }, props );
+				// Change the context for the click callback to be the main element
+				click = props.click;
+				props.click = function() {
+					click.apply( that.element[0], arguments );
+				};
+				buttonOptions = {
+					icons: props.icons,
+					text: props.showText
+				};
+				delete props.icons;
+				delete props.showText;
+				$( "<button></button>", props )
+					.button( buttonOptions )
+					.appendTo( that.uiButtonSet );
+			});
+			this.uiDialog.addClass("ui-dialog-buttons");
+			this.uiDialogButtonPane.appendTo( this.uiDialog );
+		},
+	
+		_makeDraggable: function() {
+			var that = this,
+				options = this.options;
+	
+			function filteredUi( ui ) {
+				return {
+					position: ui.position,
+					offset: ui.offset
+				};
+			}
+	
+			this.uiDialog.draggable({
+				cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
+				handle: ".ui-dialog-titlebar",
+				containment: "document",
+				start: function( event, ui ) {
+					$( this ).addClass("ui-dialog-dragging");
+					that._blockFrames();
+					that._trigger( "dragStart", event, filteredUi( ui ) );
+				},
+				drag: function( event, ui ) {
+					that._trigger( "drag", event, filteredUi( ui ) );
+				},
+				stop: function( event, ui ) {
+					options.position = [
+						ui.position.left - that.document.scrollLeft(),
+						ui.position.top - that.document.scrollTop()
+					];
+					$( this ).removeClass("ui-dialog-dragging");
+					that._unblockFrames();
+					that._trigger( "dragStop", event, filteredUi( ui ) );
+				}
+			});
+		},
+	
+		_makeResizable: function() {
+			var that = this,
+				options = this.options,
+				handles = options.resizable,
+				// .ui-resizable has position: relative defined in the stylesheet
+				// but dialogs have to use absolute or fixed positioning
+				position = this.uiDialog.css("position"),
+				resizeHandles = typeof handles === "string" ?
+					handles	:
+					"n,e,s,w,se,sw,ne,nw";
+	
+			function filteredUi( ui ) {
+				return {
+					originalPosition: ui.originalPosition,
+					originalSize: ui.originalSize,
+					position: ui.position,
+					size: ui.size
+				};
+			}
+	
+			this.uiDialog.resizable({
+				cancel: ".ui-dialog-content",
+				containment: "document",
+				alsoResize: this.element,
+				maxWidth: options.maxWidth,
+				maxHeight: options.maxHeight,
+				minWidth: options.minWidth,
+				minHeight: this._minHeight(),
+				handles: resizeHandles,
+				start: function( event, ui ) {
+					$( this ).addClass("ui-dialog-resizing");
+					that._blockFrames();
+					that._trigger( "resizeStart", event, filteredUi( ui ) );
+				},
+				resize: function( event, ui ) {
+					that._trigger( "resize", event, filteredUi( ui ) );
+				},
+				stop: function( event, ui ) {
+					options.height = $( this ).height();
+					options.width = $( this ).width();
+					$( this ).removeClass("ui-dialog-resizing");
+					that._unblockFrames();
+					that._trigger( "resizeStop", event, filteredUi( ui ) );
+				}
+			})
+			.css( "position", position );
+		},
+	
+		_minHeight: function() {
+			var options = this.options;
+	
+			return options.height === "auto" ?
+				options.minHeight :
+				Math.min( options.minHeight, options.height );
+		},
+	
+		_position: function() {
+			// Need to show the dialog to get the actual offset in the position plugin
+			var isVisible = this.uiDialog.is(":visible");
+			if ( !isVisible ) {
+				this.uiDialog.show();
+			}
+			this.uiDialog.position( this.options.position );
+			if ( !isVisible ) {
+				this.uiDialog.hide();
+			}
+		},
+	
+		_setOptions: function( options ) {
+			var that = this,
+				resize = false,
+				resizableOptions = {};
+	
+			$.each( options, function( key, value ) {
+				that._setOption( key, value );
+	
+				if ( key in sizeRelatedOptions ) {
+					resize = true;
+				}
+				if ( key in resizableRelatedOptions ) {
+					resizableOptions[ key ] = value;
+				}
+			});
+	
+			if ( resize ) {
+				this._size();
+				this._position();
+			}
+			if ( this.uiDialog.is(":data(ui-resizable)") ) {
+				this.uiDialog.resizable( "option", resizableOptions );
+			}
+		},
+	
+		_setOption: function( key, value ) {
+			/*jshint maxcomplexity:15*/
+			var isDraggable, isResizable,
+				uiDialog = this.uiDialog;
+	
+			if ( key === "dialogClass" ) {
+				uiDialog
+					.removeClass( this.options.dialogClass )
+					.addClass( value );
+			}
+	
+			if ( key === "disabled" ) {
+				return;
+			}
+	
+			this._super( key, value );
+	
+			if ( key === "appendTo" ) {
+				this.uiDialog.appendTo( this._appendTo() );
+			}
+	
+			if ( key === "buttons" ) {
+				this._createButtons();
+			}
+	
+			if ( key === "closeText" ) {
+				this.uiDialogTitlebarClose.button({
+					// Ensure that we always pass a string
+					label: "" + value
+				});
+			}
+	
+			if ( key === "draggable" ) {
+				isDraggable = uiDialog.is(":data(ui-draggable)");
+				if ( isDraggable && !value ) {
+					uiDialog.draggable("destroy");
+				}
+	
+				if ( !isDraggable && value ) {
+					this._makeDraggable();
+				}
+			}
+	
+			if ( key === "position" ) {
+				this._position();
+			}
+	
+			if ( key === "resizable" ) {
+				// currently resizable, becoming non-resizable
+				isResizable = uiDialog.is(":data(ui-resizable)");
+				if ( isResizable && !value ) {
+					uiDialog.resizable("destroy");
+				}
+	
+				// currently resizable, changing handles
+				if ( isResizable && typeof value === "string" ) {
+					uiDialog.resizable( "option", "handles", value );
+				}
+	
+				// currently non-resizable, becoming resizable
+				if ( !isResizable && value !== false ) {
+					this._makeResizable();
+				}
+			}
+	
+			if ( key === "title" ) {
+				this._title( this.uiDialogTitlebar.find(".ui-dialog-title") );
+			}
+		},
+	
+		_size: function() {
+			// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
+			// divs will both have width and height set, so we need to reset them
+			var nonContentHeight, minContentHeight, maxContentHeight,
+				options = this.options;
+	
+			// Reset content sizing
+			this.element.show().css({
+				width: "auto",
+				minHeight: 0,
+				maxHeight: "none",
+				height: 0
+			});
+	
+			if ( options.minWidth > options.width ) {
+				options.width = options.minWidth;
+			}
+	
+			// reset wrapper sizing
+			// determine the height of all the non-content elements
+			nonContentHeight = this.uiDialog.css({
+					height: "auto",
+					width: options.width
+				})
+				.outerHeight();
+			minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
+			maxContentHeight = typeof options.maxHeight === "number" ?
+				Math.max( 0, options.maxHeight - nonContentHeight ) :
+				"none";
+	
+			if ( options.height === "auto" ) {
+				this.element.css({
+					minHeight: minContentHeight,
+					maxHeight: maxContentHeight,
+					height: "auto"
+				});
+			} else {
+				this.element.height( Math.max( 0, options.height - nonContentHeight ) );
+			}
+	
+			if (this.uiDialog.is(":data(ui-resizable)") ) {
+				this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
+			}
+		},
+	
+		_blockFrames: function() {
+			this.iframeBlocks = this.document.find( "iframe" ).map(function() {
+				var iframe = $( this );
+	
+				return $( "<div>" )
+					.css({
+						position: "absolute",
+						width: iframe.outerWidth(),
+						height: iframe.outerHeight()
+					})
+					.appendTo( iframe.parent() )
+					.offset( iframe.offset() )[0];
+			});
+		},
+	
+		_unblockFrames: function() {
+			if ( this.iframeBlocks ) {
+				this.iframeBlocks.remove();
+				delete this.iframeBlocks;
+			}
+		},
+	
+		_allowInteraction: function( event ) {
+			if ( $( event.target ).closest(".ui-dialog").length ) {
+				return true;
+			}
+	
+			// TODO: Remove hack when datepicker implements
+			// the .ui-front logic (#8989)
+			return !!$( event.target ).closest(".ui-datepicker").length;
+		},
+	
+		_createOverlay: function() {
+			if ( !this.options.modal ) {
+				return;
+			}
+	
+			var that = this,
+				widgetFullName = this.widgetFullName;
+			if ( !$.ui.dialog.overlayInstances ) {
+				// Prevent use of anchors and inputs.
+				// We use a delay in case the overlay is created from an
+				// event that we're going to be cancelling. (#2804)
+				this._delay(function() {
+					// Handle .dialog().dialog("close") (#4065)
+					if ( $.ui.dialog.overlayInstances ) {
+						this.document.bind( "focusin.dialog", function( event ) {
+							if ( !that._allowInteraction( event ) ) {
+								event.preventDefault();
+								$(".ui-dialog:visible:last .ui-dialog-content")
+									.data( widgetFullName )._focusTabbable();
+							}
+						});
+					}
+				});
+			}
+	
+			this.overlay = $("<div>")
+				.addClass("ui-widget-overlay ui-front")
+				.appendTo( this._appendTo() );
+			this._on( this.overlay, {
+				mousedown: "_keepFocus"
+			});
+			$.ui.dialog.overlayInstances++;
+		},
+	
+		_destroyOverlay: function() {
+			if ( !this.options.modal ) {
+				return;
+			}
+	
+			if ( this.overlay ) {
+				$.ui.dialog.overlayInstances--;
+	
+				if ( !$.ui.dialog.overlayInstances ) {
+					this.document.unbind( "focusin.dialog" );
+				}
+				this.overlay.remove();
+				this.overlay = null;
+			}
+		}
+	});
+	
+	$.ui.dialog.overlayInstances = 0;
+	
+	// DEPRECATED
+	if ( $.uiBackCompat !== false ) {
+		// position option with array notation
+		// just override with old implementation
+		$.widget( "ui.dialog", $.ui.dialog, {
+			_position: function() {
+				var position = this.options.position,
+					myAt = [],
+					offset = [ 0, 0 ],
+					isVisible;
+	
+				if ( position ) {
+					if ( typeof position === "string" || (typeof position === "object" && "0" in position ) ) {
+						myAt = position.split ? position.split(" ") : [ position[0], position[1] ];
+						if ( myAt.length === 1 ) {
+							myAt[1] = myAt[0];
+						}
+	
+						$.each( [ "left", "top" ], function( i, offsetPosition ) {
+							if ( +myAt[ i ] === myAt[ i ] ) {
+								offset[ i ] = myAt[ i ];
+								myAt[ i ] = offsetPosition;
+							}
+						});
+	
+						position = {
+							my: myAt[0] + (offset[0] < 0 ? offset[0] : "+" + offset[0]) + " " +
+								myAt[1] + (offset[1] < 0 ? offset[1] : "+" + offset[1]),
+							at: myAt.join(" ")
+						};
+					}
+	
+					position = $.extend( {}, $.ui.dialog.prototype.options.position, position );
+				} else {
+					position = $.ui.dialog.prototype.options.position;
+				}
+	
+				// need to show the dialog to get the actual offset in the position plugin
+				isVisible = this.uiDialog.is(":visible");
+				if ( !isVisible ) {
+					this.uiDialog.show();
+				}
+				this.uiDialog.position( position );
+				if ( !isVisible ) {
+					this.uiDialog.hide();
+				}
+			}
+		});
+	}
+	
+	}( jQuery ) );
+	
+	(function( $, undefined ) {
+	
+	var rvertical = /up|down|vertical/,
+		rpositivemotion = /up|left|vertical|horizontal/;
+	
+	$.effects.effect.blind = function( o, done ) {
+		// Create element
+		var el = $( this ),
+			props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+			mode = $.effects.setMode( el, o.mode || "hide" ),
+			direction = o.direction || "up",
+			vertical = rvertical.test( direction ),
+			ref = vertical ? "height" : "width",
+			ref2 = vertical ? "top" : "left",
+			motion = rpositivemotion.test( direction ),
+			animation = {},
+			show = mode === "show",
+			wrapper, distance, margin;
+	
+		// if already wrapped, the wrapper's properties are my property. #6245
+		if ( el.parent().is( ".ui-effects-wrapper" ) ) {
+			$.effects.save( el.parent(), props );
+		} else {
+			$.effects.save( el, props );
+		}
+		el.show();
+		wrapper = $.effects.createWrapper( el ).css({
+			overflow: "hidden"
+		});
+	
+		distance = wrapper[ ref ]();
+		margin = parseFloat( wrapper.css( ref2 ) ) || 0;
+	
+		animation[ ref ] = show ? distance : 0;
+		if ( !motion ) {
+			el
+				.css( vertical ? "bottom" : "right", 0 )
+				.css( vertical ? "top" : "left", "auto" )
+				.css({ position: "absolute" });
+	
+			animation[ ref2 ] = show ? margin : distance + margin;
+		}
+	
+		// start at 0 if we are showing
+		if ( show ) {
+			wrapper.css( ref, 0 );
+			if ( ! motion ) {
+				wrapper.css( ref2, margin + distance );
+			}
+		}
+	
+		// Animate
+		wrapper.animate( animation, {
+			duration: o.duration,
+			easing: o.easing,
+			queue: false,
+			complete: function() {
+				if ( mode === "hide" ) {
+					el.hide();
+				}
+				$.effects.restore( el, props );
+				$.effects.removeWrapper( el );
+				done();
+			}
+		});
+	
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.bounce = function( o, done ) {
+		var el = $( this ),
+			props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+	
+			// defaults:
+			mode = $.effects.setMode( el, o.mode || "effect" ),
+			hide = mode === "hide",
+			show = mode === "show",
+			direction = o.direction || "up",
+			distance = o.distance,
+			times = o.times || 5,
+	
+			// number of internal animations
+			anims = times * 2 + ( show || hide ? 1 : 0 ),
+			speed = o.duration / anims,
+			easing = o.easing,
+	
+			// utility:
+			ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+			motion = ( direction === "up" || direction === "left" ),
+			i,
+			upAnim,
+			downAnim,
+	
+			// we will need to re-assemble the queue to stack our animations in place
+			queue = el.queue(),
+			queuelen = queue.length;
+	
+		// Avoid touching opacity to prevent clearType and PNG issues in IE
+		if ( show || hide ) {
+			props.push( "opacity" );
+		}
+	
+		$.effects.save( el, props );
+		el.show();
+		$.effects.createWrapper( el ); // Create Wrapper
+	
+		// default distance for the BIGGEST bounce is the outer Distance / 3
+		if ( !distance ) {
+			distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
+		}
+	
+		if ( show ) {
+			downAnim = { opacity: 1 };
+			downAnim[ ref ] = 0;
+	
+			// if we are showing, force opacity 0 and set the initial position
+			// then do the "first" animation
+			el.css( "opacity", 0 )
+				.css( ref, motion ? -distance * 2 : distance * 2 )
+				.animate( downAnim, speed, easing );
+		}
+	
+		// start at the smallest distance if we are hiding
+		if ( hide ) {
+			distance = distance / Math.pow( 2, times - 1 );
+		}
+	
+		downAnim = {};
+		downAnim[ ref ] = 0;
+		// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
+		for ( i = 0; i < times; i++ ) {
+			upAnim = {};
+			upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+	
+			el.animate( upAnim, speed, easing )
+				.animate( downAnim, speed, easing );
+	
+			distance = hide ? distance * 2 : distance / 2;
+		}
+	
+		// Last Bounce when Hiding
+		if ( hide ) {
+			upAnim = { opacity: 0 };
+			upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
+	
+			el.animate( upAnim, speed, easing );
+		}
+	
+		el.queue(function() {
+			if ( hide ) {
+				el.hide();
+			}
+			$.effects.restore( el, props );
+			$.effects.removeWrapper( el );
+			done();
+		});
+	
+		// inject all the animations we just queued to be first in line (after "inprogress")
+		if ( queuelen > 1) {
+			queue.splice.apply( queue,
+				[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
+		}
+		el.dequeue();
+	
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.clip = function( o, done ) {
+		// Create element
+		var el = $( this ),
+			props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+			mode = $.effects.setMode( el, o.mode || "hide" ),
+			show = mode === "show",
+			direction = o.direction || "vertical",
+			vert = direction === "vertical",
+			size = vert ? "height" : "width",
+			position = vert ? "top" : "left",
+			animation = {},
+			wrapper, animate, distance;
+	
+		// Save & Show
+		$.effects.save( el, props );
+		el.show();
+	
+		// Create Wrapper
+		wrapper = $.effects.createWrapper( el ).css({
+			overflow: "hidden"
+		});
+		animate = ( el[0].tagName === "IMG" ) ? wrapper : el;
+		distance = animate[ size ]();
+	
+		// Shift
+		if ( show ) {
+			animate.css( size, 0 );
+			animate.css( position, distance / 2 );
+		}
+	
+		// Create Animation Object:
+		animation[ size ] = show ? distance : 0;
+		animation[ position ] = show ? 0 : distance / 2;
+	
+		// Animate
+		animate.animate( animation, {
+			queue: false,
+			duration: o.duration,
+			easing: o.easing,
+			complete: function() {
+				if ( !show ) {
+					el.hide();
+				}
+				$.effects.restore( el, props );
+				$.effects.removeWrapper( el );
+				done();
+			}
+		});
+	
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.drop = function( o, done ) {
+	
+		var el = $( this ),
+			props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ],
+			mode = $.effects.setMode( el, o.mode || "hide" ),
+			show = mode === "show",
+			direction = o.direction || "left",
+			ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
+			motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg",
+			animation = {
+				opacity: show ? 1 : 0
+			},
+			distance;
+	
+		// Adjust
+		$.effects.save( el, props );
+		el.show();
+		$.effects.createWrapper( el );
+	
+		distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]( true ) / 2;
+	
+		if ( show ) {
+			el
+				.css( "opacity", 0 )
+				.css( ref, motion === "pos" ? -distance : distance );
+		}
+	
+		// Animation
+		animation[ ref ] = ( show ?
+			( motion === "pos" ? "+=" : "-=" ) :
+			( motion === "pos" ? "-=" : "+=" ) ) +
+			distance;
+	
+		// Animate
+		el.animate( animation, {
+			queue: false,
+			duration: o.duration,
+			easing: o.easing,
+			complete: function() {
+				if ( mode === "hide" ) {
+					el.hide();
+				}
+				$.effects.restore( el, props );
+				$.effects.removeWrapper( el );
+				done();
+			}
+		});
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.explode = function( o, done ) {
+	
+		var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,
+			cells = rows,
+			el = $( this ),
+			mode = $.effects.setMode( el, o.mode || "hide" ),
+			show = mode === "show",
+	
+			// show and then visibility:hidden the element before calculating offset
+			offset = el.show().css( "visibility", "hidden" ).offset(),
+	
+			// width and height of a piece
+			width = Math.ceil( el.outerWidth() / cells ),
+			height = Math.ceil( el.outerHeight() / rows ),
+			pieces = [],
+	
+			// loop
+			i, j, left, top, mx, my;
+	
+		// children animate complete:
+		function childComplete() {
+			pieces.push( this );
+			if ( pieces.length === rows * cells ) {
+				animComplete();
+			}
+		}
+	
+		// clone the element for each row and cell.
+		for( i = 0; i < rows ; i++ ) { // ===>
+			top = offset.top + i * height;
+			my = i - ( rows - 1 ) / 2 ;
+	
+			for( j = 0; j < cells ; j++ ) { // |||
+				left = offset.left + j * width;
+				mx = j - ( cells - 1 ) / 2 ;
+	
+				// Create a clone of the now hidden main element that will be absolute positioned
+				// within a wrapper div off the -left and -top equal to size of our pieces
+				el
+					.clone()
+					.appendTo( "body" )
+					.wrap( "<div></div>" )
+					.css({
+						position: "absolute",
+						visibility: "visible",
+						left: -j * width,
+						top: -i * height
+					})
+	
+				// select the wrapper - make it overflow: hidden and absolute positioned based on
+				// where the original was located +left and +top equal to the size of pieces
+					.parent()
+					.addClass( "ui-effects-explode" )
+					.css({
+						position: "absolute",
+						overflow: "hidden",
+						width: width,
+						height: height,
+						left: left + ( show ? mx * width : 0 ),
+						top: top + ( show ? my * height : 0 ),
+						opacity: show ? 0 : 1
+					}).animate({
+						left: left + ( show ? 0 : mx * width ),
+						top: top + ( show ? 0 : my * height ),
+						opacity: show ? 1 : 0
+					}, o.duration || 500, o.easing, childComplete );
+			}
+		}
+	
+		function animComplete() {
+			el.css({
+				visibility: "visible"
+			});
+			$( pieces ).remove();
+			if ( !show ) {
+				el.hide();
+			}
+			done();
+		}
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.fade = function( o, done ) {
+		var el = $( this ),
+			mode = $.effects.setMode( el, o.mode || "toggle" );
+	
+		el.animate({
+			opacity: mode
+		}, {
+			queue: false,
+			duration: o.duration,
+			easing: o.easing,
+			complete: done
+		});
+	};
+	
+	})( jQuery );
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.fold = function( o, done ) {
+	
+		// Create element
+		var el = $( this ),
+			props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+			mode = $.effects.setMode( el, o.mode || "hide" ),
+			show = mode === "show",
+			hide = mode === "hide",
+			size = o.size || 15,
+			percent = /([0-9]+)%/.exec( size ),
+			horizFirst = !!o.horizFirst,
+			widthFirst = show !== horizFirst,
+			ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ],
+			duration = o.duration / 2,
+			wrapper, distance,
+			animation1 = {},
+			animation2 = {};
+	
+		$.effects.save( el, props );
+		el.show();
+	
+		// Create Wrapper
+		wrapper = $.effects.createWrapper( el ).css({
+			overflow: "hidden"
+		});
+		distance = widthFirst ?
+			[ wrapper.width(), wrapper.height() ] :
+			[ wrapper.height(), wrapper.width() ];
+	
+		if ( percent ) {
+			size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
+		}
+		if ( show ) {
+			wrapper.css( horizFirst ? {
+				height: 0,
+				width: size
+			} : {
+				height: size,
+				width: 0
+			});
+		}
+	
+		// Animation
+		animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;
+		animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;
+	
+		// Animate
+		wrapper
+			.animate( animation1, duration, o.easing )
+			.animate( animation2, duration, o.easing, function() {
+				if ( hide ) {
+					el.hide();
+				}
+				$.effects.restore( el, props );
+				$.effects.removeWrapper( el );
+				done();
+			});
+	
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.highlight = function( o, done ) {
+		var elem = $( this ),
+			props = [ "backgroundImage", "backgroundColor", "opacity" ],
+			mode = $.effects.setMode( elem, o.mode || "show" ),
+			animation = {
+				backgroundColor: elem.css( "backgroundColor" )
+			};
+	
+		if (mode === "hide") {
+			animation.opacity = 0;
+		}
+	
+		$.effects.save( elem, props );
+	
+		elem
+			.show()
+			.css({
+				backgroundImage: "none",
+				backgroundColor: o.color || "#ffff99"
+			})
+			.animate( animation, {
+				queue: false,
+				duration: o.duration,
+				easing: o.easing,
+				complete: function() {
+					if ( mode === "hide" ) {
+						elem.hide();
+					}
+					$.effects.restore( elem, props );
+					done();
+				}
+			});
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.pulsate = function( o, done ) {
+		var elem = $( this ),
+			mode = $.effects.setMode( elem, o.mode || "show" ),
+			show = mode === "show",
+			hide = mode === "hide",
+			showhide = ( show || mode === "hide" ),
+	
+			// showing or hiding leaves of the "last" animation
+			anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
+			duration = o.duration / anims,
+			animateTo = 0,
+			queue = elem.queue(),
+			queuelen = queue.length,
+			i;
+	
+		if ( show || !elem.is(":visible")) {
+			elem.css( "opacity", 0 ).show();
+			animateTo = 1;
+		}
+	
+		// anims - 1 opacity "toggles"
+		for ( i = 1; i < anims; i++ ) {
+			elem.animate({
+				opacity: animateTo
+			}, duration, o.easing );
+			animateTo = 1 - animateTo;
+		}
+	
+		elem.animate({
+			opacity: animateTo
+		}, duration, o.easing);
+	
+		elem.queue(function() {
+			if ( hide ) {
+				elem.hide();
+			}
+			done();
+		});
+	
+		// We just queued up "anims" animations, we need to put them next in the queue
+		if ( queuelen > 1 ) {
+			queue.splice.apply( queue,
+				[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
+		}
+		elem.dequeue();
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.puff = function( o, done ) {
+		var elem = $( this ),
+			mode = $.effects.setMode( elem, o.mode || "hide" ),
+			hide = mode === "hide",
+			percent = parseInt( o.percent, 10 ) || 150,
+			factor = percent / 100,
+			original = {
+				height: elem.height(),
+				width: elem.width(),
+				outerHeight: elem.outerHeight(),
+				outerWidth: elem.outerWidth()
+			};
+	
+		$.extend( o, {
+			effect: "scale",
+			queue: false,
+			fade: true,
+			mode: mode,
+			complete: done,
+			percent: hide ? percent : 100,
+			from: hide ?
+				original :
+				{
+					height: original.height * factor,
+					width: original.width * factor,
+					outerHeight: original.outerHeight * factor,
+					outerWidth: original.outerWidth * factor
+				}
+		});
+	
+		elem.effect( o );
+	};
+	
+	$.effects.effect.scale = function( o, done ) {
+	
+		// Create element
+		var el = $( this ),
+			options = $.extend( true, {}, o ),
+			mode = $.effects.setMode( el, o.mode || "effect" ),
+			percent = parseInt( o.percent, 10 ) ||
+				( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ),
+			direction = o.direction || "both",
+			origin = o.origin,
+			original = {
+				height: el.height(),
+				width: el.width(),
+				outerHeight: el.outerHeight(),
+				outerWidth: el.outerWidth()
+			},
+			factor = {
+				y: direction !== "horizontal" ? (percent / 100) : 1,
+				x: direction !== "vertical" ? (percent / 100) : 1
+			};
+	
+		// We are going to pass this effect to the size effect:
+		options.effect = "size";
+		options.queue = false;
+		options.complete = done;
+	
+		// Set default origin and restore for show/hide
+		if ( mode !== "effect" ) {
+			options.origin = origin || ["middle","center"];
+			options.restore = true;
+		}
+	
+		options.from = o.from || ( mode === "show" ? {
+			height: 0,
+			width: 0,
+			outerHeight: 0,
+			outerWidth: 0
+		} : original );
+		options.to = {
+			height: original.height * factor.y,
+			width: original.width * factor.x,
+			outerHeight: original.outerHeight * factor.y,
+			outerWidth: original.outerWidth * factor.x
+		};
+	
+		// Fade option to support puff
+		if ( options.fade ) {
+			if ( mode === "show" ) {
+				options.from.opacity = 0;
+				options.to.opacity = 1;
+			}
+			if ( mode === "hide" ) {
+				options.from.opacity = 1;
+				options.to.opacity = 0;
+			}
+		}
+	
+		// Animate
+		el.effect( options );
+	
+	};
+	
+	$.effects.effect.size = function( o, done ) {
+	
+		// Create element
+		var original, baseline, factor,
+			el = $( this ),
+			props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ],
+	
+			// Always restore
+			props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ],
+	
+			// Copy for children
+			props2 = [ "width", "height", "overflow" ],
+			cProps = [ "fontSize" ],
+			vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
+			hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
+	
+			// Set options
+			mode = $.effects.setMode( el, o.mode || "effect" ),
+			restore = o.restore || mode !== "effect",
+			scale = o.scale || "both",
+			origin = o.origin || [ "middle", "center" ],
+			position = el.css( "position" ),
+			props = restore ? props0 : props1,
+			zero = {
+				height: 0,
+				width: 0,
+				outerHeight: 0,
+				outerWidth: 0
+			};
+	
+		if ( mode === "show" ) {
+			el.show();
+		}
+		original = {
+			height: el.height(),
+			width: el.width(),
+			outerHeight: el.outerHeight(),
+			outerWidth: el.outerWidth()
+		};
+	
+		if ( o.mode === "toggle" && mode === "show" ) {
+			el.from = o.to || zero;
+			el.to = o.from || original;
+		} else {
+			el.from = o.from || ( mode === "show" ? zero : original );
+			el.to = o.to || ( mode === "hide" ? zero : original );
+		}
+	
+		// Set scaling factor
+		factor = {
+			from: {
+				y: el.from.height / original.height,
+				x: el.from.width / original.width
+			},
+			to: {
+				y: el.to.height / original.height,
+				x: el.to.width / original.width
+			}
+		};
+	
+		// Scale the css box
+		if ( scale === "box" || scale === "both" ) {
+	
+			// Vertical props scaling
+			if ( factor.from.y !== factor.to.y ) {
+				props = props.concat( vProps );
+				el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
+				el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
+			}
+	
+			// Horizontal props scaling
+			if ( factor.from.x !== factor.to.x ) {
+				props = props.concat( hProps );
+				el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
+				el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
+			}
+		}
+	
+		// Scale the content
+		if ( scale === "content" || scale === "both" ) {
+	
+			// Vertical props scaling
+			if ( factor.from.y !== factor.to.y ) {
+				props = props.concat( cProps ).concat( props2 );
+				el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
+				el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
+			}
+		}
+	
+		$.effects.save( el, props );
+		el.show();
+		$.effects.createWrapper( el );
+		el.css( "overflow", "hidden" ).css( el.from );
+	
+		// Adjust
+		if (origin) { // Calculate baseline shifts
+			baseline = $.effects.getBaseline( origin, original );
+			el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;
+			el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;
+			el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;
+			el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;
+		}
+		el.css( el.from ); // set top & left
+	
+		// Animate
+		if ( scale === "content" || scale === "both" ) { // Scale the children
+	
+			// Add margins/font-size
+			vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps);
+			hProps = hProps.concat([ "marginLeft", "marginRight" ]);
+			props2 = props0.concat(vProps).concat(hProps);
+	
+			el.find( "*[width]" ).each( function(){
+				var child = $( this ),
+					c_original = {
+						height: child.height(),
+						width: child.width(),
+						outerHeight: child.outerHeight(),
+						outerWidth: child.outerWidth()
+					};
+				if (restore) {
+					$.effects.save(child, props2);
+				}
+	
+				child.from = {
+					height: c_original.height * factor.from.y,
+					width: c_original.width * factor.from.x,
+					outerHeight: c_original.outerHeight * factor.from.y,
+					outerWidth: c_original.outerWidth * factor.from.x
+				};
+				child.to = {
+					height: c_original.height * factor.to.y,
+					width: c_original.width * factor.to.x,
+					outerHeight: c_original.height * factor.to.y,
+					outerWidth: c_original.width * factor.to.x
+				};
+	
+				// Vertical props scaling
+				if ( factor.from.y !== factor.to.y ) {
+					child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
+					child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
+				}
+	
+				// Horizontal props scaling
+				if ( factor.from.x !== factor.to.x ) {
+					child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
+					child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
+				}
+	
+				// Animate children
+				child.css( child.from );
+				child.animate( child.to, o.duration, o.easing, function() {
+	
+					// Restore children
+					if ( restore ) {
+						$.effects.restore( child, props2 );
+					}
+				});
+			});
+		}
+	
+		// Animate
+		el.animate( el.to, {
+			queue: false,
+			duration: o.duration,
+			easing: o.easing,
+			complete: function() {
+				if ( el.to.opacity === 0 ) {
+					el.css( "opacity", el.from.opacity );
+				}
+				if( mode === "hide" ) {
+					el.hide();
+				}
+				$.effects.restore( el, props );
+				if ( !restore ) {
+	
+					// we need to calculate our new positioning based on the scaling
+					if ( position === "static" ) {
+						el.css({
+							position: "relative",
+							top: el.to.top,
+							left: el.to.left
+						});
+					} else {
+						$.each([ "top", "left" ], function( idx, pos ) {
+							el.css( pos, function( _, str ) {
+								var val = parseInt( str, 10 ),
+									toRef = idx ? el.to.left : el.to.top;
+	
+								// if original was "auto", recalculate the new value from wrapper
+								if ( str === "auto" ) {
+									return toRef + "px";
+								}
+	
+								return val + toRef + "px";
+							});
+						});
+					}
+				}
+	
+				$.effects.removeWrapper( el );
+				done();
+			}
+		});
+	
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.shake = function( o, done ) {
+	
+		var el = $( this ),
+			props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
+			mode = $.effects.setMode( el, o.mode || "effect" ),
+			direction = o.direction || "left",
+			distance = o.distance || 20,
+			times = o.times || 3,
+			anims = times * 2 + 1,
+			speed = Math.round(o.duration/anims),
+			ref = (direction === "up" || direction === "down") ? "top" : "left",
+			positiveMotion = (direction === "up" || direction === "left"),
+			animation = {},
+			animation1 = {},
+			animation2 = {},
+			i,
+	
+			// we will need to re-assemble the queue to stack our animations in place
+			queue = el.queue(),
+			queuelen = queue.length;
+	
+		$.effects.save( el, props );
+		el.show();
+		$.effects.createWrapper( el );
+	
+		// Animation
+		animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
+		animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
+		animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
+	
+		// Animate
+		el.animate( animation, speed, o.easing );
+	
+		// Shakes
+		for ( i = 1; i < times; i++ ) {
+			el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
+		}
+		el
+			.animate( animation1, speed, o.easing )
+			.animate( animation, speed / 2, o.easing )
+			.queue(function() {
+				if ( mode === "hide" ) {
+					el.hide();
+				}
+				$.effects.restore( el, props );
+				$.effects.removeWrapper( el );
+				done();
+			});
+	
+		// inject all the animations we just queued to be first in line (after "inprogress")
+		if ( queuelen > 1) {
+			queue.splice.apply( queue,
+				[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );
+		}
+		el.dequeue();
+	
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.slide = function( o, done ) {
+	
+		// Create element
+		var el = $( this ),
+			props = [ "position", "top", "bottom", "left", "right", "width", "height" ],
+			mode = $.effects.setMode( el, o.mode || "show" ),
+			show = mode === "show",
+			direction = o.direction || "left",
+			ref = (direction === "up" || direction === "down") ? "top" : "left",
+			positiveMotion = (direction === "up" || direction === "left"),
+			distance,
+			animation = {};
+	
+		// Adjust
+		$.effects.save( el, props );
+		el.show();
+		distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true );
+	
+		$.effects.createWrapper( el ).css({
+			overflow: "hidden"
+		});
+	
+		if ( show ) {
+			el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance );
+		}
+	
+		// Animation
+		animation[ ref ] = ( show ?
+			( positiveMotion ? "+=" : "-=") :
+			( positiveMotion ? "-=" : "+=")) +
+			distance;
+	
+		// Animate
+		el.animate( animation, {
+			queue: false,
+			duration: o.duration,
+			easing: o.easing,
+			complete: function() {
+				if ( mode === "hide" ) {
+					el.hide();
+				}
+				$.effects.restore( el, props );
+				$.effects.removeWrapper( el );
+				done();
+			}
+		});
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.effects.effect.transfer = function( o, done ) {
+		var elem = $( this ),
+			target = $( o.to ),
+			targetFixed = target.css( "position" ) === "fixed",
+			body = $("body"),
+			fixTop = targetFixed ? body.scrollTop() : 0,
+			fixLeft = targetFixed ? body.scrollLeft() : 0,
+			endPosition = target.offset(),
+			animation = {
+				top: endPosition.top - fixTop ,
+				left: endPosition.left - fixLeft ,
+				height: target.innerHeight(),
+				width: target.innerWidth()
+			},
+			startPosition = elem.offset(),
+			transfer = $( "<div class='ui-effects-transfer'></div>" )
+				.appendTo( document.body )
+				.addClass( o.className )
+				.css({
+					top: startPosition.top - fixTop ,
+					left: startPosition.left - fixLeft ,
+					height: elem.innerHeight(),
+					width: elem.innerWidth(),
+					position: targetFixed ? "fixed" : "absolute"
+				})
+				.animate( animation, o.duration, o.easing, function() {
+					transfer.remove();
+					done();
+				});
+	};
+	
+	})(jQuery);
+	
+	(function( $, undefined ) {
+	
+	$.widget( "ui.menu", {
+		version: "1.10.3",
+		defaultElement: "<ul>",
+		delay: 300,
+		options: {
+			icons: {
+				submenu: "ui-icon-carat-1-e"
+			},
+			menus: "ul",
+			position: {
+				my: "left top",
+				at: "right top"
+			},
+			role: "menu",
+	
+			// callbacks
+			blur: null,
+			focus: null,
+			select: null
+		},
+	
+		_create: function() {
+			this.activeMenu = this.element;
+			// flag used to prevent firing of the click handler
+			// as the event bubbles up through nested menus
+			this.mouseHandled = false;
+			this.element
+				.uniqueId()
+				.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
+				.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
+				.attr({
+					role: this.options.role,
+					tabIndex: 0
+				})
+				// need to catch all clicks on disabled menu
+				// not possible through _on
+				.bind( "click" + this.eventNamespace, $.proxy(function( event ) {
+					if ( this.options.disabled ) {
+						event.preventDefault();
+					}
+				}, this ));
+	
+			if ( this.options.disabled ) {
+				this.element
+					.addClass( "ui-state-disabled" )
+					.attr( "aria-disabled", "true" );
+			}
+	
+			this._on({
+				// Prevent focus from sticking to links inside menu after clicking
+				// them (focus should always stay on UL during navigation).
+				"mousedown .ui-menu-item > a": function( event ) {
+					event.preventDefault();
+				},
+				"click .ui-state-disabled > a": function( event ) {
+					event.preventDefault();
+				},
+				"click .ui-menu-item:has(a)": function( event ) {
+					var target = $( event.target ).closest( ".ui-menu-item" );
+					if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
+						this.mouseHandled = true;
+	
+						this.select( event );
+						// Open submenu on click
+						if ( target.has( ".ui-menu" ).length ) {
+							this.expand( event );
+						} else if ( !this.element.is( ":focus" ) ) {
+							// Redirect focus to the menu
+							this.element.trigger( "focus", [ true ] );
+	
+							// If the active item is on the top level, let it stay active.
+							// Otherwise, blur the active item since it is no longer visible.
+							if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
+								clearTimeout( this.timer );
+							}
+						}
+					}
+				},
+				"mouseenter .ui-menu-item": function( event ) {
+					var target = $( event.currentTarget );
+					// Remove ui-state-active class from siblings of the newly focused menu item
+					// to avoid a jump caused by adjacent elements both having a class with a border
+					target.siblings().children( ".ui-state-active" ).removeClass( "ui-state-active" );
+					this.focus( event, target );
+				},
+				mouseleave: "collapseAll",
+				"mouseleave .ui-menu": "collapseAll",
+				focus: function( event, keepActiveItem ) {
+					// If there's already an active item, keep it active
+					// If not, activate the first item
+					var item = this.active || this.element.children( ".ui-menu-item" ).eq( 0 );
+	
+					if ( !keepActiveItem ) {
+						this.focus( event, item );
+					}
+				},
+				blur: function( event ) {
+					this._delay(function() {
+						if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
+							this.collapseAll( event );
+						}
+					});
+				},
+				keydown: "_keydown"
+			});
+	
+			this.refresh();
+	
+			// Clicks outside of a menu collapse any open menus
+			this._on( this.document, {
+				click: function( event ) {
+					if ( !$( event.target ).closest( ".ui-menu" ).length ) {
+						this.collapseAll( event );
+					}
+	
+					// Reset the mouseHandled flag
+					this.mouseHandled = false;
+				}
+			});
+		},
+	
+		_destroy: function() {
+			// Destroy (sub)menus
+			this.element
+				.removeAttr( "aria-activedescendant" )
+				.find( ".ui-menu" ).addBack()
+					.removeClass( "ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons" )
+					.removeAttr( "role" )
+					.removeAttr( "tabIndex" )
+					.removeAttr( "aria-labelledby" )
+					.removeAttr( "aria-expanded" )
+					.removeAttr( "aria-hidden" )
+					.removeAttr( "aria-disabled" )
+					.removeUniqueId()
+					.show();
+	
+			// Destroy menu items
+			this.element.find( ".ui-menu-item" )
+				.removeClass( "ui-menu-item" )
+				.removeAttr( "role" )
+				.removeAttr( "aria-disabled" )
+				.children( "a" )
+					.removeUniqueId()
+					.removeClass( "ui-corner-all ui-state-hover" )
+					.removeAttr( "tabIndex" )
+					.removeAttr( "role" )
+					.removeAttr( "aria-haspopup" )
+					.children().each( function() {
+						var elem = $( this );
+						if ( elem.data( "ui-menu-submenu-carat" ) ) {
+							elem.remove();
+						}
+					});
+	
+			// Destroy menu dividers
+			this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
+		},
+	
+		_keydown: function( event ) {
+			/*jshint maxcomplexity:20*/
+			var match, prev, character, skip, regex,
+				preventDefault = true;
+	
+			function escape( value ) {
+				return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
+			}
+	
+			switch ( event.keyCode ) {
+			case $.ui.keyCode.PAGE_UP:
+				this.previousPage( event );
+				break;
+			case $.ui.keyCode.PAGE_DOWN:
+				this.nextPage( event );
+				break;
+			case $.ui.keyCode.HOME:
+				this._move( "first", "first", event );
+				break;
+			case $.ui.keyCode.END:
+				this._move( "last", "last", event );
+				break;
+			case $.ui.keyCode.UP:
+				this.previous( event );
+				break;
+			case $.ui.keyCode.DOWN:
+				this.next( event );
+				break;
+			case $.ui.keyCode.LEFT:
+				this.collapse( event );
+				break;
+			case $.ui.keyCode.RIGHT:
+				if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
+					this.expand( event );
+				}
+				break;
+			case $.ui.keyCode.ENTER:
+			case $.ui.keyCode.SPACE:
+				this._activate( event );
+				break;
+			case $.ui.keyCode.ESCAPE:
+				this.collapse( event );
+				break;
+			default:
+				preventDefault = false;
+				prev = this.previousFilter || "";
+				character = String.fromCharCode( event.keyCode );
+				skip = false;
+	
+				clearTimeout( this.filterTimer );
+	
+				if ( character === prev ) {
+					skip = true;
+				} else {
+					character = prev + character;
+				}
+	
+				regex = new RegExp( "^" + escape( character ), "i" );
+				match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
+					return regex.test( $( this ).children( "a" ).text() );
+				});
+				match = skip && match.index( this.active.next() ) !== -1 ?
+					this.active.nextAll( ".ui-menu-item" ) :
+					match;
+	
+				// If no matches on the current filter, reset to the last character pressed
+				// to move down the menu to the first item that starts with that character
+				if ( !match.length ) {
+					character = String.fromCharCode( event.keyCode );
+					regex = new RegExp( "^" + escape( character ), "i" );
+					match = this.activeMenu.children( ".ui-menu-item" ).filter(function() {
+						return regex.test( $( this ).children( "a" ).text() );
+					});
+				}
+	
+				if ( match.length ) {
+					this.focus( event, match );
+					if ( match.length > 1 ) {
+						this.previousFilter = character;
+						this.filterTimer = this._delay(function() {
+							delete this.previousFilter;
+						}, 1000 );
+					} else {
+						delete this.previousFilter;
+					}
+				} else {
+					delete this.previousFilter;
+				}
+			}
+	
+			if ( preventDefault ) {
+				event.preventDefault();
+			}
+		},
+	
+		_activate: function( event ) {
+			if ( !this.active.is( ".ui-state-disabled" ) ) {
+				if ( this.active.children( "a[aria-haspopup='true']" ).length ) {
+					this.expand( event );
+				} else {
+					this.select( event );
+				}
+			}
+		},
+	
+		refresh: function() {
+			var menus,
+				icon = this.options.icons.submenu,
+				submenus = this.element.find( this.options.menus );
+	
+			// Initialize nested menus
+			submenus.filter( ":not(.ui-menu)" )
+				.addClass( "ui-menu ui-widget ui-widget-content ui-corner-all" )
+				.hide()
+				.attr({
+					role: this.options.role,
+					"aria-hidden": "true",
+					"aria-expanded": "false"
+				})
+				.each(function() {
+					var menu = $( this ),
+						item = menu.prev( "a" ),
+						submenuCarat = $( "<span>" )
+							.addClass( "ui-menu-icon ui-icon " + icon )
+							.data( "ui-menu-submenu-carat", true );
+	
+					item
+						.attr( "aria-haspopup", "true" )
+						.prepend( submenuCarat );
+					menu.attr( "aria-labelledby", item.attr( "id" ) );
+				});
+	
+			menus = submenus.add( this.element );
+	
+			// Don't refresh list items that are already adapted
+			menus.children( ":not(.ui-menu-item):has(a)" )
+				.addClass( "ui-menu-item" )
+				.attr( "role", "presentation" )
+				.children( "a" )
+					.uniqueId()
+					.addClass( "ui-corner-all" )
+					.attr({
+						tabIndex: -1,
+						role: this._itemRole()
+					});
+	
+			// Initialize unlinked menu-items containing spaces and/or dashes only as dividers
+			menus.children( ":not(.ui-menu-item)" ).each(function() {
+				var item = $( this );
+				// hyphen, em dash, en dash
+				if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {
+					item.addClass( "ui-widget-content ui-menu-divider" );
+				}
+			});
+	
+			// Add aria-disabled attribute to any disabled menu item
+			menus.children( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
+	
+			// If the active item has been removed, blur the menu
+			if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+				this.blur();
+			}
+		},
+	
+		_itemRole: function() {
+			return {
+				menu: "menuitem",
+				listbox: "option"
+			}[ this.options.role ];
+		},
+	
+		_setOption: function( key, value ) {
+			if ( key === "icons" ) {
+				this.element.find( ".ui-menu-icon" )
+					.removeClass( this.options.icons.submenu )
+					.addClass( value.submenu );
+			}
+			this._super( key, value );
+		},
+	
+		focus: function( event, item ) {
+			var nested, focused;
+			this.blur( event, event && event.type === "focus" );
+	
+			this._scrollIntoView( item );
+	
+			this.active = item.first();
+			focused = this.active.children( "a" ).addClass( "ui-state-focus" );
+			// Only update aria-activedescendant if there's a role
+			// otherwise we assume focus is managed elsewhere
+			if ( this.options.role ) {
+				this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
+			}
+	
+			// Highlight active parent menu item, if any
+			this.active
+				.parent()
+				.closest( ".ui-menu-item" )
+				.children( "a:first" )
+				.addClass( "ui-state-active" );
+	
+			if ( event && event.type === "keydown" ) {
+				this._close();
+			} else {
+				this.timer = this._delay(function() {
+					this._close();
+				}, this.delay );
+			}
+	
+			nested = item.children( ".ui-menu" );
+			if ( nested.length && ( /^mouse/.test( event.type ) ) ) {
+				this._startOpening(nested);
+			}
+			this.activeMenu = item.parent();
+	
+			this._trigger( "focus", event, { item: item } );
+		},
+	
+		_scrollIntoView: function( item ) {
+			var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
+			if ( this._hasScroll() ) {
+				borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
+				paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
+				offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
+				scroll = this.activeMenu.scrollTop();
+				elementHeight = this.activeMenu.height();
+				itemHeight = item.height();
+	
+				if ( offset < 0 ) {
+					this.activeMenu.scrollTop( scroll + offset );
+				} else if ( offset + itemHeight > elementHeight ) {
+					this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
+				}
+			}
+		},
+	
+		blur: function( event, fromFocus ) {
+			if ( !fromFocus ) {
+				clearTimeout( this.timer );
+			}
+	
+			if ( !this.active ) {
+				return;
+			}
+	
+			this.active.children( "a" ).removeClass( "ui-state-focus" );
+			this.active = null;
+	
+			this._trigger( "blur", event, { item: this.active } );
+		},
+	
+		_startOpening: function( submenu ) {
+			clearTimeout( this.timer );
+	
+			// Don't open if already open fixes a Firefox bug that caused a .5 pixel
+			// shift in the submenu position when mousing over the carat icon
+			if ( submenu.attr( "aria-hidden" ) !== "true" ) {
+				return;
+			}
+	
+			this.timer = this._delay(function() {
+				this._close();
+				this._open( submenu );
+			}, this.delay );
+		},
+	
+		_open: function( submenu ) {
+			var position = $.extend({
+				of: this.active
+			}, this.options.position );
+	
+			clearTimeout( this.timer );
+			this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
+				.hide()
+				.attr( "aria-hidden", "true" );
+	
+			submenu
+				.show()
+				.removeAttr( "aria-hidden" )
+				.attr( "aria-expanded", "true" )
+				.position( position );
+		},
+	
+		collapseAll: function( event, all ) {
+			clearTimeout( this.timer );
+			this.timer = this._delay(function() {
+				// If we were passed an event, look for the submenu that contains the event
+				var currentMenu = all ? this.element :
+					$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
+	
+				// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
+				if ( !currentMenu.length ) {
+					currentMenu = this.element;
+				}
+	
+				this._close( currentMenu );
+	
+				this.blur( event );
+				this.activeMenu = currentMenu;
+			}, this.delay );
+		},
+	
+		// With no arguments, closes the currently active menu - if nothing is active
+		// it closes all menus.  If passed an argument, it will search for menus BELOW
+		_close: function( startMenu ) {
+			if ( !startMenu ) {
+				startMenu = this.active ? this.active.parent() : this.element;
+			}
+	
+			startMenu
+				.find( ".ui-menu" )
+					.hide()
+					.attr( "aria-hidden", "true" )
+					.attr( "aria-expanded", "false" )
+				.end()
+				.find( "a.ui-state-active" )
+					.removeClass( "ui-state-active" );
+		},
+	
+		collapse: function( event ) {
+			var newItem = this.active &&
+				this.active.parent().closest( ".ui-menu-item", this.element );
+			if ( newItem && newItem.length ) {
+				this._close();
+				this.focus( event, newItem );
+			}
+		},
+	
+		expand: function( event ) {
+			var newItem = this.active &&
+				this.active
+					.children( ".ui-menu " )
+					.children( ".ui-menu-item" )
+					.first();
+	
+			if ( newItem && newItem.length ) {
+				this._open( newItem.parent() );
+	
+				// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
+				this._delay(function() {
+					this.focus( event, newItem );
+				});
+			}
+		},
+	
+		next: function( event ) {
+			this._move( "next", "first", event );
+		},
+	
+		previous: function( event ) {
+			this._move( "prev", "last", event );
+		},
+	
+		isFirstItem: function() {
+			return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
+		},
+	
+		isLastItem: function() {
+			return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
+		},
+	
+		_move: function( direction, filter, event ) {
+			var next;
+			if ( this.active ) {
+				if ( direction === "first" || direction === "last" ) {
+					next = this.active
+						[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
+						.eq( -1 );
+				} else {
+					next = this.active
+						[ direction + "All" ]( ".ui-menu-item" )
+						.eq( 0 );
+				}
+			}
+			if ( !next || !next.length || !this.active ) {
+				next = this.activeMenu.children( ".ui-menu-item" )[ filter ]();
+			}
+	
+			this.focus( event, next );
+		},
+	
+		nextPage: function( event ) {
+			var item, base, height;
+	
+			if ( !this.active ) {
+				this.next( event );
+				return;
+			}
+			if ( this.isLastItem() ) {
+				return;
+			}
+			if ( this._hasScroll() ) {
+				base = this.active.offset().top;
+				height = this.element.height();
+				this.active.nextAll( ".ui-menu-item" ).each(function() {
+					item = $( this );
+					return item.offset().top - base - height < 0;
+				});
+	
+				this.focus( event, item );
+			} else {
+				this.focus( event, this.activeMenu.children( ".ui-menu-item" )
+					[ !this.active ? "first" : "last" ]() );
+			}
+		},
+	
+		previousPage: function( event ) {
+			var item, base, height;
+			if ( !this.active ) {
+				this.next( event );
+				return;
+			}
+			if ( this.isFirstItem() ) {
+				return;
+			}
+			if ( this._hasScroll() ) {
+				base = this.active.offset().top;
+				height = this.element.height();
+				this.active.prevAll( ".ui-menu-item" ).each(function() {
+					item = $( this );
+					return item.offset().top - base + height > 0;
+				});
+	
+				this.focus( event, item );
+			} else {
+				this.focus( event, this.activeMenu.children( ".ui-menu-item" ).first() );
+			}
+		},
+	
+		_hasScroll: function() {
+			return this.element.outerHeight() < this.element.prop( "scrollHeight" );
+		},
+	
+		select: function( event ) {
+			// TODO: It should never be possible to not have an active item at this
+			// point, but the tests don't trigger mouseenter before click.
+			this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
+			var ui = { item: this.active };
+			if ( !this.active.has( ".ui-menu" ).length ) {
+				this.collapseAll( event, true );
+			}
+			this._trigger( "select", event, ui );
+		}
+	});
+	
+	}( jQuery ));
+	
+	(function( $, undefined ) {
+	
+	$.ui = $.ui || {};
+	
+	var cachedScrollbarWidth,
+		max = Math.max,
+		abs = Math.abs,
+		round = Math.round,
+		rhorizontal = /left|center|right/,
+		rvertical = /top|center|bottom/,
+		roffset = /[\+\-]\d+(\.[\d]+)?%?/,
+		rposition = /^\w+/,
+		rpercent = /%$/,
+		_position = $.fn.position;
+	
+	function getOffsets( offsets, width, height ) {
+		return [
+			parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+			parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+		];
+	}
+	
+	function parseCss( element, property ) {
+		return parseInt( $.css( element, property ), 10 ) || 0;
+	}
+	
+	function getDimensions( elem ) {
+		var raw = elem[0];
+		if ( raw.nodeType === 9 ) {
+			return {
+				width: elem.width(),
+				height: elem.height(),
+				offset: { top: 0, left: 0 }
+			};
+		}
+		if ( $.isWindow( raw ) ) {
+			return {
+				width: elem.width(),
+				height: elem.height(),
+				offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
+			};
+		}
+		if ( raw.preventDefault ) {
+			return {
+				width: 0,
+				height: 0,
+				offset: { top: raw.pageY, left: raw.pageX }
+			};
+		}
+		return {
+			width: elem.outerWidth(),
+			height: elem.outerHeight(),
+			offset: elem.offset()
+		};
+	}
+	
+	$.position = {
+		scrollbarWidth: function() {
+			if ( cachedScrollbarWidth !== undefined ) {
+				return cachedScrollbarWidth;
+			}
+			var w1, w2,
+				div = $( "<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
+				innerDiv = div.children()[0];
+	
+			$( "body" ).append( div );
+			w1 = innerDiv.offsetWidth;
+			div.css( "overflow", "scroll" );
+	
+			w2 = innerDiv.offsetWidth;
+	
+			if ( w1 === w2 ) {
+				w2 = div[0].clientWidth;
+			}
+	
+			div.remove();
+	
+			return (cachedScrollbarWidth = w1 - w2);
+		},
+		getScrollInfo: function( within ) {
+			var overflowX = within.isWindow ? "" : within.element.css( "overflow-x" ),
+				overflowY = within.isWindow ? "" : within.element.css( "overflow-y" ),
+				hasOverflowX = overflowX === "scroll" ||
+					( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
+				hasOverflowY = overflowY === "scroll" ||
+					( overflowY === "auto" && within.height < within.element[0].scrollHeight );
+			return {
+				width: hasOverflowY ? $.position.scrollbarWidth() : 0,
+				height: hasOverflowX ? $.position.scrollbarWidth() : 0
+			};
+		},
+		getWithinInfo: function( element ) {
+			var withinElement = $( element || window ),
+				isWindow = $.isWindow( withinElement[0] );
+			return {
+				element: withinElement,
+				isWindow: isWindow,
+				offset: withinElement.offset() || { left: 0, top: 0 },
+				scrollLeft: withinElement.scrollLeft(),
+				scrollTop: withinElement.scrollTop(),
+				width: isWindow ? withinElement.width() : withinElement.outerWidth(),
+				height: isWindow ? withinElement.height() : withinElement.outerHeight()
+			};
+		}
+	};
+	
+	$.fn.position = function( options ) {
+		if ( !options || !options.of ) {
+			return _position.apply( this, arguments );
+		}
+	
+		// make a copy, we don't want to modify arguments
+		options = $.extend( {}, options );
+	
+		var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
+			target = $( options.of ),
+			within = $.position.getWithinInfo( options.within ),
+			scrollInfo = $.position.getScrollInfo( within ),
+			collision = ( options.collision || "flip" ).split( " " ),
+			offsets = {};
+	
+		dimensions = getDimensions( target );
+		if ( target[0].preventDefault ) {
+			// force left top to allow flipping
+			options.at = "left top";
+		}
+		targetWidth = dimensions.width;
+		targetHeight = dimensions.height;
+		targetOffset = dimensions.offset;
+		// clone to reuse original targetOffset later
+		basePosition = $.extend( {}, targetOffset );
+	
+		// force my and at to have valid horizontal and vertical positions
+		// if a value is missing or invalid, it will be converted to center
+		$.each( [ "my", "at" ], function() {
+			var pos = ( options[ this ] || "" ).split( " " ),
+				horizontalOffset,
+				verticalOffset;
+	
+			if ( pos.length === 1) {
+				pos = rhorizontal.test( pos[ 0 ] ) ?
+					pos.concat( [ "center" ] ) :
+					rvertical.test( pos[ 0 ] ) ?
+						[ "center" ].concat( pos ) :
+						[ "center", "center" ];
+			}
+			pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
+			pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
+	
+			// calculate offsets
+			horizontalOffset = roffset.exec( pos[ 0 ] );
+			verticalOffset = roffset.exec( pos[ 1 ] );
+			offsets[ this ] = [
+				horizontalOffset ? horizontalOffset[ 0 ] : 0,
+				verticalOffset ? verticalOffset[ 0 ] : 0
+			];
+	
+			// reduce to just the positions without the offsets
+			options[ this ] = [
+				rposition.exec( pos[ 0 ] )[ 0 ],
+				rposition.exec( pos[ 1 ] )[ 0 ]
+			];
+		});
+	
+		// normalize collision option
+		if ( collision.length === 1 ) {
+			collision[ 1 ] = collision[ 0 ];
+		}
+	
+		if ( options.at[ 0 ] === "right" ) {
+			basePosition.left += targetWidth;
+		} else if ( options.at[ 0 ] === "center" ) {
+			basePosition.left += targetWidth / 2;
+		}
+	
+		if ( options.at[ 1 ] === "bottom" ) {
+			basePosition.top += targetHeight;
+		} else if ( options.at[ 1 ] === "center" ) {
+			basePosition.top += targetHeight / 2;
+		}
+	
+		atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
+		basePosition.left += atOffset[ 0 ];
+		basePosition.top += atOffset[ 1 ];
+	
+		return this.each(function() {
+			var collisionPosition, using,
+				elem = $( this ),
+				elemWidth = elem.outerWidth(),
+				elemHeight = elem.outerHeight(),
+				marginLeft = parseCss( this, "marginLeft" ),
+				marginTop = parseCss( this, "marginTop" ),
+				collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
+				collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
+				position = $.extend( {}, basePosition ),
+				myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
+	
+			if ( options.my[ 0 ] === "right" ) {
+				position.left -= elemWidth;
+			} else if ( options.my[ 0 ] === "center" ) {
+				position.left -= elemWidth / 2;
+			}
+	
+			if ( options.my[ 1 ] === "bottom" ) {
+				position.top -= elemHeight;
+			} else if ( options.my[ 1 ] === "center" ) {
+				position.top -= elemHeight / 2;
+			}
+	
+			position.left += myOffset[ 0 ];
+			position.top += myOffset[ 1 ];
+	
+			// if the browser doesn't support fractions, then round for consistent results
+			if ( !$.support.offsetFractions ) {
+				position.left = round( position.left );
+				position.top = round( position.top );
+			}
+	
+			collisionPosition = {
+				marginLeft: marginLeft,
+				marginTop: marginTop
+			};
+	
+			$.each( [ "left", "top" ], function( i, dir ) {
+				if ( $.ui.position[ collision[ i ] ] ) {
+					$.ui.position[ collision[ i ] ][ dir ]( position, {
+						targetWidth: targetWidth,
+						targetHeight: targetHeight,
+						elemWidth: elemWidth,
+						elemHeight: elemHeight,
+						collisionPosition: collisionPosition,
+						collisionWidth: collisionWidth,
+						collisionHeight: collisionHeight,
+						offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
+						my: options.my,
+						at: options.at,
+						within: within,
+						elem : elem
+					});
+				}
+			});
+	
+			if ( options.using ) {
+				// adds feedback as second argument to using callback, if present
+				using = function( props ) {
+					var left = targetOffset.left - position.left,
+						right = left + targetWidth - elemWidth,
+						top = targetOffset.top - position.top,
+						bottom = top + targetHeight - elemHeight,
+						feedback = {
+							target: {
+								element: target,
+								left: targetOffset.left,
+								top: targetOffset.top,
+								width: targetWidth,
+								height: targetHeight
+							},
+							element: {
+								element: elem,
+								left: position.left,
+								top: position.top,
+								width: elemWidth,
+								height: elemHeight
+							},
+							horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
+							vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
+						};
+					if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
+						feedback.horizontal = "center";
+					}
+					if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
+						feedback.vertical = "middle";
+					}
+					if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
+						feedback.important = "horizontal";
+					} else {
+						feedback.important = "vertical";
+					}
+					options.using.call( this, props, feedback );
+				};
+			}
+	
+			elem.offset( $.extend( position, { using: using } ) );
+		});
+	};
+	
+	$.ui.position = {
+		fit: {
+			left: function( position, data ) {
+				var within = data.within,
+					withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
+					outerWidth = within.width,
+					collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+					overLeft = withinOffset - collisionPosLeft,
+					overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
+					newOverRight;
+	
+				// element is wider than within
+				if ( data.collisionWidth > outerWidth ) {
+					// element is initially over the left side of within
+					if ( overLeft > 0 && overRight <= 0 ) {
+						newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
+						position.left += overLeft - newOverRight;
+					// element is initially over right side of within
+					} else if ( overRight > 0 && overLeft <= 0 ) {
+						position.left = withinOffset;
+					// element is initially over both left and right sides of within
+					} else {
+						if ( overLeft > overRight ) {
+							position.left = withinOffset + outerWidth - data.collisionWidth;
+						} else {
+							position.left = withinOffset;
+						}
+					}
+				// too far left -> align with left edge
+				} else if ( overLeft > 0 ) {
+					position.left += overLeft;
+				// too far right -> align with right edge
+				} else if ( overRight > 0 ) {
+					position.left -= overRight;
+				// adjust based on position and margin
+				} else {
+					position.left = max( position.left - collisionPosLeft, position.left );
+				}
+			},
+			top: function( position, data ) {
+				var within = data.within,
+					withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
+					outerHeight = data.within.height,
+					collisionPosTop = position.top - data.collisionPosition.marginTop,
+					overTop = withinOffset - collisionPosTop,
+					overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
+					newOverBottom;
+	
+				// element is taller than within
+				if ( data.collisionHeight > outerHeight ) {
+					// element is initially over the top of within
+					if ( overTop > 0 && overBottom <= 0 ) {
+						newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
+						position.top += overTop - newOverBottom;
+					// element is initially over bottom of within
+					} else if ( overBottom > 0 && overTop <= 0 ) {
+						position.top = withinOffset;
+					// element is initially over both top and bottom of within
+					} else {
+						if ( overTop > overBottom ) {
+							position.top = withinOffset + outerHeight - data.collisionHeight;
+						} else {
+							position.top = withinOffset;
+						}
+					}
+				// too far up -> align with top
+				} else if ( overTop > 0 ) {
+					position.top += overTop;
+				// too far down -> align with bottom edge
+				} else if ( overBottom > 0 ) {
+					position.top -= overBottom;
+				// adjust based on position and margin
+				} else {
+					position.top = max( position.top - collisionPosTop, position.top );
+				}
+			}
+		},
+		flip: {
+			left: function( position, data ) {
+				var within = data.within,
+					withinOffset = within.offset.left + within.scrollLeft,
+					outerWidth = within.width,
+					offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
+					collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+					overLeft = collisionPosLeft - offsetLeft,
+					overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
+					myOffset = data.my[ 0 ] === "left" ?
+						-data.elemWidth :
+						data.my[ 0 ] === "right" ?
+							data.elemWidth :
+							0,
+					atOffset = data.at[ 0 ] === "left" ?
+						data.targetWidth :
+						data.at[ 0 ] === "right" ?
+							-data.targetWidth :
+							0,
+					offset = -2 * data.offset[ 0 ],
+					newOverRight,
+					newOverLeft;
+	
+				if ( overLeft < 0 ) {
+					newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
+					if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
+						position.left += myOffset + atOffset + offset;
+					}
+				}
+				else if ( overRight > 0 ) {
+					newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
+					if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
+						position.left += myOffset + atOffset + offset;
+					}
+				}
+			},
+			top: function( position, data ) {
+				var within = data.within,
+					withinOffset = within.offset.top + within.scrollTop,
+					outerHeight = within.height,
+					offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
+					collisionPosTop = position.top - data.collisionPosition.marginTop,
+					overTop = collisionPosTop - offsetTop,
+					overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
+					top = data.my[ 1 ] === "top",
+					myOffset = top ?
+						-data.elemHeight :
+						data.my[ 1 ] === "bottom" ?
+							data.elemHeight :
+							0,
+					atOffset = data.at[ 1 ] === "top" ?
+						data.targetHeight :
+						data.at[ 1 ] === "bottom" ?
+							-data.targetHeight :
+							0,
+					offset = -2 * data.offset[ 1 ],
+					newOverTop,
+					newOverBottom;
+				if ( overTop < 0 ) {
+					newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
+					if ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {
+						position.top += myOffset + atOffset + offset;
+					}
+				}
+				else if ( overBottom > 0 ) {
+					newOverTop = position.top -  data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
+					if ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {
+						position.top += myOffset + atOffset + offset;
+					}
+				}
+			}
+		},
+		flipfit: {
+			left: function() {
+				$.ui.position.flip.left.apply( this, arguments );
+				$.ui.position.fit.left.apply( this, arguments );
+			},
+			top: function() {
+				$.ui.position.flip.top.apply( this, arguments );
+				$.ui.position.fit.top.apply( this, arguments );
+			}
+		}
+	};
+	
+	// fraction support test
+	(function () {
+		var testElement, testElementParent, testElementStyle, offsetLeft, i,
+			body = document.getElementsByTagName( "body" )[ 0 ],
+			div = document.createElement( "div" );
+	
+		//Create a "fake body" for testing based on method used in jQuery.support
+		testElement = document.createElement( body ? "div" : "body" );
+		testElementStyle = {
+			visibility: "hidden",
+			width: 0,
+			height: 0,
+			border: 0,
+			margin: 0,
+			background: "none"
+		};
+		if ( body ) {
+			$.extend( testElementStyle, {
+				position: "absolute",
+				left: "-1000px",
+				top: "-1000px"
+			});
+		}
+		for ( i in testElementStyle ) {
+			testElement.style[ i ] = testElementStyle[ i ];
+		}
+		testElement.appendChild( div );
+		testElementParent = body || document.documentElement;
+		testElementParent.insertBefore( testElement, testElementParent.firstChild );
+	
+		div.style.cssText = "position: absolute; left: 10.7432222px;";
+	
+		offsetLeft = $( div ).offset().left;
+		$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
+	
+		testElement.innerHTML = "";
+		testElementParent.removeChild( testElement );
+	})();
+	
+	}( jQuery ) );
+	
+	(function( $, undefined ) {
+	
+	$.widget( "ui.progressbar", {
+		version: "1.10.3",
+		options: {
+			max: 100,
+			value: 0,
+	
+			change: null,
+			complete: null
+		},
+	
+		min: 0,
+	
+		_create: function() {
+			// Constrain initial value
+			this.oldValue = this.options.value = this._constrainedValue();
+	
+			this.element
+				.addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
+				.attr({
+					// Only set static values, aria-valuenow and aria-valuemax are
+					// set inside _refreshValue()
+					role: "progressbar",
+					"aria-valuemin": this.min
+				});
+	
+			this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" )
+				.appendTo( this.element );
+	
+			this._refreshValue();
+		},
+	
+		_destroy: function() {
+			this.element
+				.removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" )
+				.removeAttr( "role" )
+				.removeAttr( "aria-valuemin" )
+				.removeAttr( "aria-valuemax" )
+				.removeAttr( "aria-valuenow" );
+	
+			this.valueDiv.remove();
+		},
+	
+		value: function( newValue ) {
+			if ( newValue === undefined ) {
+				return this.options.value;
+			}
+	
+			this.options.value = this._constrainedValue( newValue );
+			this._refreshValue();
+		},
+	
+		_constrainedValue: function( newValue ) {
+			if ( newValue === undefined ) {
+				newValue = this.options.value;
+			}
+	
+			this.indeterminate = newValue === false;
+	
+			// sanitize value
+			if ( typeof newValue !== "number" ) {
+				newValue = 0;
+			}
+	
+			return this.indeterminate ? false :
+				Math.min( this.options.max, Math.max( this.min, newValue ) );
+		},
+	
+		_setOptions: function( options ) {
+			// Ensure "value" option is set after other values (like max)
+			var value = options.value;
+			delete options.value;
+	
+			this._super( options );
+	
+			this.options.value = this._constrainedValue( value );
+			this._refreshValue();
+		},
+	
+		_setOption: function( key, value ) {
+			if ( key === "max" ) {
+				// Don't allow a max less than min
+				value = Math.max( this.min, value );
+			}
+	
+			this._super( key, value );
+		},
+	
+		_percentage: function() {
+			return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
+		},
+	
+		_refreshValue: function() {
+			var value = this.options.value,
+				percentage = this._percentage();
+	
+			this.valueDiv
+				.toggle( this.indeterminate || value > this.min )
+				.toggleClass( "ui-corner-right", value === this.options.max )
+				.width( percentage.toFixed(0) + "%" );
+	
+			this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate );
+	
+			if ( this.indeterminate ) {
+				this.element.removeAttr( "aria-valuenow" );
+				if ( !this.overlayDiv ) {
+					this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv );
+				}
+			} else {
+				this.element.attr({
+					"aria-valuemax": this.options.max,
+					"aria-valuenow": value
+				});
+				if ( this.overlayDiv ) {
+					this.overlayDiv.remove();
+					this.overlayDiv = null;
+				}
+			}
+	
+			if ( this.oldValue !== value ) {
+				this.oldValue = value;
+				this._trigger( "change" );
+			}
+			if ( value === this.options.max ) {
+				this._trigger( "complete" );
+			}
+		}
+	});
+	
+	})( jQuery );
+	
+	(function( $, undefined ) {
+	
+	// number of pages in a slider
+	// (how many times can you page up/down to go through the whole range)
+	var numPages = 5;
+	
+	$.widget( "ui.slider", $.ui.mouse, {
+		version: "1.10.3",
+		widgetEventPrefix: "slide",
+	
+		options: {
+			animate: false,
+			distance: 0,
+			max: 100,
+			min: 0,
+			orientation: "horizontal",
+			range: false,
+			step: 1,
+			value: 0,
+			values: null,
+	
+			// callbacks
+			change: null,
+			slide: null,
+			start: null,
+			stop: null
+		},
+	
+		_create: function() {
+			this._keySliding = false;
+			this._mouseSliding = false;
+			this._animateOff = true;
+			this._handleIndex = null;
+			this._detectOrientation();
+			this._mouseInit();
+	
+			this.element
+				.addClass( "ui-slider" +
+					" ui-slider-" + this.orientation +
+					" ui-widget" +
+					" ui-widget-content" +
+					" ui-corner-all");
+	
+			this._refresh();
+			this._setOption( "disabled", this.options.disabled );
+	
+			this._animateOff = false;
+		},
+	
+		_refresh: function() {
+			this._createRange();
+			this._createHandles();
+			this._setupEvents();
+			this._refreshValue();
+		},
+	
+		_createHandles: function() {
+			var i, handleCount,
+				options = this.options,
+				existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ),
+				handle = "<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",
+				handles = [];
+	
+			handleCount = ( options.values && options.values.length ) || 1;
+	
+			if ( existingHandles.length > handleCount ) {
+				existingHandles.slice( handleCount ).remove();
+				existingHandles = existingHandles.slice( 0, handleCount );
+			}
+	
+			for ( i = existingHandles.length; i < handleCount; i++ ) {
+				handles.push( handle );
+			}
+	
+			this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
+	
+			this.handle = this.handles.eq( 0 );
+	
+			this.handles.each(function( i ) {
+				$( this ).data( "ui-slider-handle-index", i );
+			});
+		},
+	
+		_createRange: function() {
+			var options = this.options,
+				classes = "";
+	
+			if ( options.range ) {
+				if ( options.range === true ) {
+					if ( !options.values ) {
+						options.values = [ this._valueMin(), this._valueMin() ];
+					} else if ( options.values.length && options.values.length !== 2 ) {
+						options.values = [ options.values[0], options.values[0] ];
+					} else if ( $.isArray( options.values ) ) {
+						options.values = options.values.slice(0);
+					}
+				}
+	
+				if ( !this.range || !this.range.length ) {
+					this.range = $( "<div></div>" )
+						.appendTo( this.element );
+	
+					classes = "ui-slider-range" +
+					// note: this isn't the most fittingly semantic framework class for this element,
+					// but worked best visually with a variety of themes
+					" ui-widget-header ui-corner-all";
+				} else {
+					this.range.removeClass( "ui-slider-range-min ui-slider-range-max" )
+						// Handle range switching from true to min/max
+						.css({
+							"left": "",
+							"bottom": ""
+						});
+				}
+	
+				this.range.addClass( classes +
+					( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) );
+			} else {
+				this.range = $([]);
+			}
+		},
+	
+		_setupEvents: function() {
+			var elements = this.handles.add( this.range ).filter( "a" );
+			this._off( elements );
+			this._on( elements, this._handleEvents );
+			this._hoverable( elements );
+			this._focusable( elements );
+		},
+	
+		_destroy: function() {
+			this.handles.remove();
+			this.range.remove();
+	
+			this.element
+				.removeClass( "ui-slider" +
+					" ui-slider-horizontal" +
+					" ui-slider-vertical" +
+					" ui-widget" +
+					" ui-widget-content" +
+					" ui-corner-all" );
+	
+			this._mouseDestroy();
+		},
+	
+		_mouseCapture: function( event ) {
+			var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
+				that = this,
+				o = this.options;
+	
+			if ( o.disabled ) {
+				return false;
+			}
+	
+			this.elementSize = {
+				width: this.element.outerWidth(),
+				height: this.element.outerHeight()
+			};
+			this.elementOffset = this.element.offset();
+	
+			position = { x: event.pageX, y: event.pageY };
+			normValue = this._normValueFromMouse( position );
+			distance = this._valueMax() - this._valueMin() + 1;
+			this.handles.each(function( i ) {
+				var thisDistance = Math.abs( normValue - that.values(i) );
+				if (( distance > thisDistance ) ||
+					( distance === thisDistance &&
+						(i === that._lastChangedValue || that.values(i) === o.min ))) {
+					distance = thisDistance;
+					closestHandle = $( this );
+					index = i;
+				}
+			});
+	
+			allowed = this._start( event, index );
+			if ( allowed === false ) {
+				return false;
+			}
+			this._mouseSliding = true;
+	
+			this._handleIndex = index;
+	
+			closestHandle
+				.addClass( "ui-state-active" )
+				.focus();
+	
+			offset = closestHandle.offset();
+			mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
+			this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
+				left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
+				top: event.pageY - offset.top -
+					( closestHandle.height() / 2 ) -
+					( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) -
+					( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) +
+					( parseInt( closestHandle.css("marginTop"), 10 ) || 0)
+			};
+	
+			if ( !this.handles.hasClass( "ui-state-hover" ) ) {
+				this._slide( event, index, normValue );
+			}
+			this._animateOff = true;
+			return true;
+		},
+	
+		_mouseStart: function() {
+			return true;
+		},
+	
+		_mouseDrag: function( event ) {
+			var position = { x: event.pageX, y: event.pageY },
+				normValue = this._normValueFromMouse( position );
+	
+			this._slide( event, this._handleIndex, normValue );
+	
+			return false;
+		},
+	
+		_mouseStop: function( event ) {
+			this.handles.removeClass( "ui-state-active" );
+			this._mouseSliding = false;
+	
+			this._stop( event, this._handleIndex );
+			this._change( event, this._handleIndex );
+	
+			this._handleIndex = null;
+			this._clickOffset = null;
+			this._animateOff = false;
+	
+			return false;
+		},
+	
+		_detectOrientation: function() {
+			this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
+		},
+	
+		_normValueFromMouse: function( position ) {
+			var pixelTotal,
+				pixelMouse,
+				percentMouse,
+				valueTotal,
+				valueMouse;
+	
+			if ( this.orientation === "horizontal" ) {
+				pixelTotal = this.elementSize.width;
+				pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );
+			} else {
+				pixelTotal = this.elementSize.height;
+				pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );
+			}
+	
+			percentMouse = ( pixelMouse / pixelTotal );
+			if ( percentMouse > 1 ) {
+				percentMouse = 1;
+			}
+			if ( percentMouse < 0 ) {
+				percentMouse = 0;
+			}
+			if ( this.orientation === "vertical" ) {
+				percentMouse = 1 - percentMouse;
+			}
+	
+			valueTotal = this._valueMax() - this._valueMin();
+			valueMouse = this._valueMin() + percentMouse * valueTotal;
+	
+			return this._trimAlignValue( valueMouse );
+		},
+	
+		_start: function( event, index ) {
+			var uiHash = {
+				handle: this.handles[ index ],
+				value: this.value()
+			};
+			if ( this.options.values && this.options.values.length ) {
+				uiHash.value = this.values( index );
+				uiHash.values = this.values();
+			}
+			return this._trigger( "start", event, uiHash );
+		},
+	
+		_slide: function( event, index, newVal ) {
+			var otherVal,
+				newValues,
+				allowed;
+	
+			if ( this.options.values && this.options.values.length ) {
+				otherVal = this.values( index ? 0 : 1 );
+	
+				if ( ( this.options.values.length === 2 && this.options.range === true ) &&
+						( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )
+					) {
+					newVal = otherVal;
+				}
+	
+				if ( newVal !== this.values( index ) ) {
+					newValues = this.values();
+					newValues[ index ] = newVal;
+					// A slide can be canceled by returning false from the slide callback
+					allowed = this._trigger( "slide", event, {
+						handle: this.handles[ index ],
+						value: newVal,
+						values: newValues
+					} );
+					otherVal = this.values( index ? 0 : 1 );
+					if ( allowed !== false ) {
+						this.values( index, newVal, true );
+					}
+				}
+			} else {
+				if ( newVal !== this.value() ) {
+					// A slide can be canceled by returning false from the slide callback
+					allowed = this._trigger( "slide", event, {
+						handle: this.handles[ index ],
+						value: newVal
+					} );
+					if ( allowed !== false ) {
+						this.value( newVal );
+					}
+				}
+			}
+		},
+	
+		_stop: function( event, index ) {
+			var uiHash = {
+				handle: this.handles[ index ],
+				value: this.value()
+			};
+			if ( this.options.values && this.options.values.length ) {
+				uiHash.value = this.values( index );
+				uiHash.values = this.values();
+			}
+	
+			this._trigger( "stop", event, uiHash );
+		},
+	
+		_change: function( event, index ) {
+			if ( !this._keySliding && !this._mouseSliding ) {
+				var uiHash = {
+					handle: this.handles[ index ],
+					value: this.value()
+				};
+				if ( this.options.values && this.options.values.length ) {
+					uiHash.value = this.values( index );
+					uiHash.values = this.values();
+				}
+	
+				//store the last changed value index for reference when handles overlap
+				this._lastChangedValue = index;
+	
+				this._trigger( "change", event, uiHash );
+			}
+		},
+	
+		value: function( newValue ) {
+			if ( arguments.length ) {
+				this.options.value = this._trimAlignValue( newValue );
+				this._refreshValue();
+				this._change( null, 0 );
+				return;
+			}
+	
+			return this._value();
+		},
+	
+		values: function( index, newValue ) {
+			var vals,
+				newValues,
+				i;
+	
+			if ( arguments.length > 1 ) {
+				this.options.values[ index ] = this._trimAlignValue( newValue );
+				this._refreshValue();
+				this._change( null, index );
+				return;
+			}
+	
+			if ( arguments.length ) {
+				if ( $.isArray( arguments[ 0 ] ) ) {
+					vals = this.options.values;
+					newValues = arguments[ 0 ];
+					for ( i = 0; i < vals.length; i += 1 ) {
+						vals[ i ] = this._trimAlignValue( newValues[ i ] );
+						this._change( null, i );
+					}
+					this._refreshValue();
+				} else {
+					if ( this.options.values && this.options.values.length ) {
+						return this._values( index );
+					} else {
+						return this.value();
+					}
+				}
+			} else {
+				return this._values();
+			}
+		},
+	
+		_setOption: function( key, value ) {
+			var i,
+				valsLength = 0;
+	
+			if ( key === "range" && this.options.range === true ) {
+				if ( value === "min" ) {
+					this.options.value = this._values( 0 );
+					this.options.values = null;
+				} else if ( value === "max" ) {
+					this.options.value = this._values( this.options.values.length-1 );
+					this.options.values = null;
+				}
+			}
+	
+			if ( $.isArray( this.options.values ) ) {
+				valsLength = this.options.values.length;
+			}
+	
+			$.Widget.prototype._setOption.apply( this, arguments );
+	
+			switch ( key ) {
+				case "orientation":
+					this._detectOrientation();
+					this.element
+						.removeClass( "ui-slider-horizontal ui-slider-vertical" )
+						.addClass( "ui-slider-" + this.orientation );
+					this._refreshValue();
+					break;
+				case "value":
+					this._animateOff = true;
+					this._refreshValue();
+					this._change( null, 0 );
+					this._animateOff = false;
+					break;
+				case "values":
+					this._animateOff = true;
+					this._refreshValue();
+					for ( i = 0; i < valsLength; i += 1 ) {
+						this._change( null, i );
+					}
+					this._animateOff = false;
+					break;
+				case "min":
+				case "max":
+					this._animateOff = true;
+					this._refreshValue();
+					this._animateOff = false;
+					break;
+				case "range":
+					this._animateOff = true;
+					this._refresh();
+					this._animateOff = false;
+					break;
+			}
+		},
+	
+		//internal value getter
+		// _value() returns value trimmed by min and max, aligned by step
+		_value: function() {
+			var val = this.options.value;
+			val = this._trimAlignValue( val );
+	
+			return val;
+		},
+	
+		//internal values getter
+		// _values() returns array of values trimmed by min and max, aligned by step
+		// _values( index ) returns single value trimmed by min and max, aligned by step
+		_values: function( index ) {
+			var val,
+				vals,
+				i;
+	
+			if ( arguments.length ) {
+				val = this.options.values[ index ];
+				val = this._trimAlignValue( val );
+	
+				return val;
+			} else if ( this.options.values && this.options.values.length ) {
+				// .slice() creates a copy of the array
+				// this copy gets trimmed by min and max and then returned
+				vals = this.options.values.slice();
+				for ( i = 0; i < vals.length; i+= 1) {
+					vals[ i ] = this._trimAlignValue( vals[ i ] );
+				}
+	
+				return vals;
+			} else {
+				return [];
+			}
+		},
+	
+		// returns the step-aligned value that val is closest to, between (inclusive) min and max
+		_trimAlignValue: function( val ) {
+			if ( val <= this._valueMin() ) {
+				return this._valueMin();
+			}
+			if ( val >= this._valueMax() ) {
+				return this._valueMax();
+			}
+			var step = ( this.options.step > 0 ) ? this.options.step : 1,
+				valModStep = (val - this._valueMin()) % step,
+				alignValue = val - valModStep;
+	
+			if ( Math.abs(valModStep) * 2 >= step ) {
+				alignValue += ( valModStep > 0 ) ? step : ( -step );
+			}
+	
+			// Since JavaScript has problems with large floats, round
+			// the final value to 5 digits after the decimal point (see #4124)
+			return parseFloat( alignValue.toFixed(5) );
+		},
+	
+		_valueMin: function() {
+			return this.options.min;
+		},
+	
+		_valueMax: function() {
+			return this.options.max;
+		},
+	
+		_refreshValue: function() {
+			var lastValPercent, valPercent, value, valueMin, valueMax,
+				oRange = this.options.range,
+				o = this.options,
+				that = this,
+				animate = ( !this._animateOff ) ? o.animate : false,
+				_set = {};
+	
+			if ( this.options.values && this.options.values.length ) {
+				this.handles.each(function( i ) {
+					valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;
+					_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+					$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+					if ( that.options.range === true ) {
+						if ( that.orientation === "horizontal" ) {
+							if ( i === 0 ) {
+								that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate );
+							}
+							if ( i === 1 ) {
+								that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+							}
+						} else {
+							if ( i === 0 ) {
+								that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate );
+							}
+							if ( i === 1 ) {
+								that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } );
+							}
+						}
+					}
+					lastValPercent = valPercent;
+				});
+			} else {
+				value = this.value();
+				valueMin = this._valueMin();
+				valueMax = this._valueMax();
+				valPercent = ( valueMax !== valueMin ) ?
+						( value - valueMin ) / ( valueMax - valueMin ) * 100 :
+						0;
+				_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
+				this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
+	
+				if ( oRange === "min" && this.orientation === "horizontal" ) {
+					this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate );
+				}
+				if ( oRange === "max" && this.orientation === "horizontal" ) {
+					this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
+				}
+				if ( oRange === "min" && this.orientation === "vertical" ) {
+					this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate );
+				}
+				if ( oRange === "max" && this.orientation === "vertical" ) {
+					this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } );
+				}
+			}
+		},
+	
+		_handleEvents: {
+			keydown: function( event ) {
+				/*jshint maxcomplexity:25*/
+				var allowed, curVal, newVal, step,
+					index = $( event.target ).data( "ui-slider-handle-index" );
+	
+				switch ( event.keyCode ) {
+					case $.ui.keyCode.HOME:
+					case $.ui.keyCode.END:
+					case $.ui.keyCode.PAGE_UP:
+					case $.ui.keyCode.PAGE_DOWN:
+					case $.ui.keyCode.UP:
+					case $.ui.keyCode.RIGHT:
+					case $.ui.keyCode.DOWN:
+					case $.ui.keyCode.LEFT:
+						event.preventDefault();
+						if ( !this._keySliding ) {
+							this._keySliding = true;
+							$( event.target ).addClass( "ui-state-active" );
+							allowed = this._start( event, index );
+							if ( allowed === false ) {
+								return;
+							}
+						}
+						break;
+				}
+	
+				step = this.options.step;
+				if ( this.options.values && this.options.values.length ) {
+					curVal = newVal = this.values( index );
+				} else {
+					curVal = newVal = this.value();
+				}
+	
+				switch ( event.keyCode ) {
+					case $.ui.keyCode.HOME:
+						newVal = this._valueMin();
+						break;
+					case $.ui.keyCode.END:
+						newVal = this._valueMax();
+						break;
+					case $.ui.keyCode.PAGE_UP:
+						newVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );
+						break;
+					case $.ui.keyCode.PAGE_DOWN:
+						newVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );
+						break;
+					case $.ui.keyCode.UP:
+					case $.ui.keyCode.RIGHT:
+						if ( curVal === this._valueMax() ) {
+							return;
+						}
+						newVal = this._trimAlignValue( curVal + step );
+						break;
+					case $.ui.keyCode.DOWN:
+					case $.ui.keyCode.LEFT:
+						if ( curVal === this._valueMin() ) {
+							return;
+						}
+						newVal = this._trimAlignValue( curVal - step );
+						break;
+				}
+	
+				this._slide( event, index, newVal );
+			},
+			click: function( event ) {
+				event.preventDefault();
+			},
+			keyup: function( event ) {
+				var index = $( event.target ).data( "ui-slider-handle-index" );
+	
+				if ( this._keySliding ) {
+					this._keySliding = false;
+					this._stop( event, index );
+					this._change( event, index );
+					$( event.target ).removeClass( "ui-state-active" );
+				}
+			}
+		}
+	
+	});
+	
+	}(jQuery));
+	
+	(function( $ ) {
+	
+	function modifier( fn ) {
+		return function() {
+			var previous = this.element.val();
+			fn.apply( this, arguments );
+			this._refresh();
+			if ( previous !== this.element.val() ) {
+				this._trigger( "change" );
+			}
+		};
+	}
+	
+	$.widget( "ui.spinner", {
+		version: "1.10.3",
+		defaultElement: "<input>",
+		widgetEventPrefix: "spin",
+		options: {
+			culture: null,
+			icons: {
+				down: "ui-icon-triangle-1-s",
+				up: "ui-icon-triangle-1-n"
+			},
+			incremental: true,
+			max: null,
+			min: null,
+			numberFormat: null,
+			page: 10,
+			step: 1,
+	
+			change: null,
+			spin: null,
+			start: null,
+			stop: null
+		},
+	
+		_create: function() {
+			// handle string values that need to be parsed
+			this._setOption( "max", this.options.max );
+			this._setOption( "min", this.options.min );
+			this._setOption( "step", this.options.step );
+	
+			// format the value, but don't constrain
+			this._value( this.element.val(), true );
+	
+			this._draw();
+			this._on( this._events );
+			this._refresh();
+	
+			// turning off autocomplete prevents the browser from remembering the
+			// value when navigating through history, so we re-enable autocomplete
+			// if the page is unloaded before the widget is destroyed. #7790
+			this._on( this.window, {
+				beforeunload: function() {
+					this.element.removeAttr( "autocomplete" );
+				}
+			});
+		},
+	
+		_getCreateOptions: function() {
+			var options = {},
+				element = this.element;
+	
+			$.each( [ "min", "max", "step" ], function( i, option ) {
+				var value = element.attr( option );
+				if ( value !== undefined && value.length ) {
+					options[ option ] = value;
+				}
+			});
+	
+			return options;
+		},
+	
+		_events: {
+			keydown: function( event ) {
+				if ( this._start( event ) && this._keydown( event ) ) {
+					event.preventDefault();
+				}
+			},
+			keyup: "_stop",
+			focus: function() {
+				this.previous = this.element.val();
+			},
+			blur: function( event ) {
+				if ( this.cancelBlur ) {
+					delete this.cancelBlur;
+					return;
+				}
+	
+				this._stop();
+				this._refresh();
+				if ( this.previous !== this.element.val() ) {
+					this._trigger( "change", event );
+				}
+			},
+			mousewheel: function( event, delta ) {
+				if ( !delta ) {
+					return;
+				}
+				if ( !this.spinning && !this._start( event ) ) {
+					return false;
+				}
+	
+				this._spin( (delta > 0 ? 1 : -1) * this.options.step, event );
+				clearTimeout( this.mousewheelTimer );
+				this.mousewheelTimer = this._delay(function() {
+					if ( this.spinning ) {
+						this._stop( event );
+					}
+				}, 100 );
+				event.preventDefault();
+			},
+			"mousedown .ui-spinner-button": function( event ) {
+				var previous;
+	
+				// We never want the buttons to have focus; whenever the user is
+				// interacting with the spinner, the focus should be on the input.
+				// If the input is focused then this.previous is properly set from
+				// when the input first received focus. If the input is not focused
+				// then we need to set this.previous based on the value before spinning.
+				previous = this.element[0] === this.document[0].activeElement ?
+					this.previous : this.element.val();
+				function checkFocus() {
+					var isActive = this.element[0] === this.document[0].activeElement;
+					if ( !isActive ) {
+						this.element.focus();
+						this.previous = previous;
+						// support: IE
+						// IE sets focus asynchronously, so we need to check if focus
+						// moved off of the input because the user clicked on the button.
+						this._delay(function() {
+							this.previous = previous;
+						});
+					}
+				}
+	
+				// ensure focus is on (or stays on) the text field
+				event.preventDefault();
+				checkFocus.call( this );
+	
+				// support: IE
+				// IE doesn't prevent moving focus even with event.preventDefault()
+				// so we set a flag to know when we should ignore the blur event
+				// and check (again) if focus moved off of the input.
+				this.cancelBlur = true;
+				this._delay(function() {
+					delete this.cancelBlur;
+					checkFocus.call( this );
+				});
+	
+				if ( this._start( event ) === false ) {
+					return;
+				}
+	
+				this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
+			},
+			"mouseup .ui-spinner-button": "_stop",
+			"mouseenter .ui-spinner-button": function( event ) {
+				// button will add ui-state-active if mouse was down while mouseleave and kept down
+				if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
+					return;
+				}
+	
+				if ( this._start( event ) === false ) {
+					return false;
+				}
+				this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event );
+			},
+			// TODO: do we really want to consider this a stop?
+			// shouldn't we just stop the repeater and wait until mouseup before
+			// we trigger the stop event?
+			"mouseleave .ui-spinner-button": "_stop"
+		},
+	
+		_draw: function() {
+			var uiSpinner = this.uiSpinner = this.element
+				.addClass( "ui-spinner-input" )
+				.attr( "autocomplete", "off" )
+				.wrap( this._uiSpinnerHtml() )
+				.parent()
+					// add buttons
+					.append( this._buttonHtml() );
+	
+			this.element.attr( "role", "spinbutton" );
+	
+			// button bindings
+			this.buttons = uiSpinner.find( ".ui-spinner-button" )
+				.attr( "tabIndex", -1 )
+				.button()
+				.removeClass( "ui-corner-all" );
+	
+			// IE 6 doesn't understand height: 50% for the buttons
+			// unless the wrapper has an explicit height
+			if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&
+					uiSpinner.height() > 0 ) {
+				uiSpinner.height( uiSpinner.height() );
+			}
+	
+			// disable spinner if element was already disabled
+			if ( this.options.disabled ) {
+				this.disable();
+			}
+		},
+	
+		_keydown: function( event ) {
+			var options = this.options,
+				keyCode = $.ui.keyCode;
+	
+			switch ( event.keyCode ) {
+			case keyCode.UP:
+				this._repeat( null, 1, event );
+				return true;
+			case keyCode.DOWN:
+				this._repeat( null, -1, event );
+				return true;
+			case keyCode.PAGE_UP:
+				this._repeat( null, options.page, event );
+				return true;
+			case keyCode.PAGE_DOWN:
+				this._repeat( null, -options.page, event );
+				return true;
+			}
+	
+			return false;
+		},
+	
+		_uiSpinnerHtml: function() {
+			return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>";
+		},
+	
+		_buttonHtml: function() {
+			return "" +
+				"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" +
+					"<span class='ui-icon " + this.options.icons.up + "'>&#9650;</span>" +
+				"</a>" +
+				"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" +
+					"<span class='ui-icon " + this.options.icons.down + "'>&#9660;</span>" +
+				"</a>";
+		},
+	
+		_start: function( event ) {
+			if ( !this.spinning && this._trigger( "start", event ) === false ) {
+				return false;
+			}
+	
+			if ( !this.counter ) {
+				this.counter = 1;
+			}
+			this.spinning = true;
+			return true;
+		},
+	
+		_repeat: function( i, steps, event ) {
+			i = i || 500;
+	
+			clearTimeout( this.timer );
+			this.timer = this._delay(function() {
+				this._repeat( 40, steps, event );
+			}, i );
+	
+			this._spin( steps * this.options.step, event );
+		},
+	
+		_spin: function( step, event ) {
+			var value = this.value() || 0;
+	
+			if ( !this.counter ) {
+				this.counter = 1;
+			}
+	
+			value = this._adjustValue( value + step * this._increment( this.counter ) );
+	
+			if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) {
+				this._value( value );
+				this.counter++;
+			}
+		},
+	
+		_increment: function( i ) {
+			var incremental = this.options.incremental;
+	
+			if ( incremental ) {
+				return $.isFunction( incremental ) ?
+					incremental( i ) :
+					Math.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );
+			}
+	
+			return 1;
+		},
+	
+		_precision: function() {
+			var precision = this._precisionOf( this.options.step );
+			if ( this.options.min !== null ) {
+				precision = Math.max( precision, this._precisionOf( this.options.min ) );
+			}
+			return precision;
+		},
+	
+		_precisionOf: function( num ) {
+			var str = num.toString(),
+				decimal = str.indexOf( "." );
+			return decimal === -1 ? 0 : str.length - decimal - 1;
+		},
+	
+		_adjustValue: function( value ) {
+			var base, aboveMin,
+				options = this.options;
+	
+			// make sure we're at a valid step
+			// - find out where we are relative to the base (min or 0)
+			base = options.min !== null ? options.min : 0;
+			aboveMin = value - base;
+			// - round to the nearest step
+			aboveMin = Math.round(aboveMin / options.step) * options.step;
+			// - rounding is based on 0, so adjust back to our base
+			value = base + aboveMin;
+	
+			// fix precision from bad JS floating point math
+			value = parseFloat( value.toFixed( this._precision() ) );
+	
+			// clamp the value
+			if ( options.max !== null && value > options.max) {
+				return options.max;
+			}
+			if ( options.min !== null && value < options.min ) {
+				return options.min;
+			}
+	
+			return value;
+		},
+	
+		_stop: function( event ) {
+			if ( !this.spinning ) {
+				return;
+			}
+	
+			clearTimeout( this.timer );
+			clearTimeout( this.mousewheelTimer );
+			this.counter = 0;
+			this.spinning = false;
+			this._trigger( "stop", event );
+		},
+	
+		_setOption: function( key, value ) {
+			if ( key === "culture" || key === "numberFormat" ) {
+				var prevValue = this._parse( this.element.val() );
+				this.options[ key ] = value;
+				this.element.val( this._format( prevValue ) );
+				return;
+			}
+	
+			if ( key === "max" || key === "min" || key === "step" ) {
+				if ( typeof value === "string" ) {
+					value = this._parse( value );
+				}
+			}
+			if ( key === "icons" ) {
+				this.buttons.first().find( ".ui-icon" )
+					.removeClass( this.options.icons.up )
+					.addClass( value.up );
+				this.buttons.last().find( ".ui-icon" )
+					.removeClass( this.options.icons.down )
+					.addClass( value.down );
+			}
+	
+			this._super( key, value );
+	
+			if ( key === "disabled" ) {
+				if ( value ) {
+					this.element.prop( "disabled", true );
+					this.buttons.button( "disable" );
+				} else {
+					this.element.prop( "disabled", false );
+					this.buttons.button( "enable" );
+				}
+			}
+		},
+	
+		_setOptions: modifier(function( options ) {
+			this._super( options );
+			this._value( this.element.val() );
+		}),
+	
+		_parse: function( val ) {
+			if ( typeof val === "string" && val !== "" ) {
+				val = window.Globalize && this.options.numberFormat ?
+					Globalize.parseFloat( val, 10, this.options.culture ) : +val;
+			}
+			return val === "" || isNaN( val ) ? null : val;
+		},
+	
+		_format: function( value ) {
+			if ( value === "" ) {
+				return "";
+			}
+			return window.Globalize && this.options.numberFormat ?
+				Globalize.format( value, this.options.numberFormat, this.options.culture ) :
+				value;
+		},
+	
+		_refresh: function() {
+			this.element.attr({
+				"aria-valuemin": this.options.min,
+				"aria-valuemax": this.options.max,
+				// TODO: what should we do with values that can't be parsed?
+				"aria-valuenow": this._parse( this.element.val() )
+			});
+		},
+	
+		// update the value without triggering change
+		_value: function( value, allowAny ) {
+			var parsed;
+			if ( value !== "" ) {
+				parsed = this._parse( value );
+				if ( parsed !== null ) {
+					if ( !allowAny ) {
+						parsed = this._adjustValue( parsed );
+					}
+					value = this._format( parsed );
+				}
+			}
+			this.element.val( value );
+			this._refresh();
+		},
+	
+		_destroy: function() {
+			this.element
+				.removeClass( "ui-spinner-input" )
+				.prop( "disabled", false )
+				.removeAttr( "autocomplete" )
+				.removeAttr( "role" )
+				.removeAttr( "aria-valuemin" )
+				.removeAttr( "aria-valuemax" )
+				.removeAttr( "aria-valuenow" );
+			this.uiSpinner.replaceWith( this.element );
+		},
+	
+		stepUp: modifier(function( steps ) {
+			this._stepUp( steps );
+		}),
+		_stepUp: function( steps ) {
+			if ( this._start() ) {
+				this._spin( (steps || 1) * this.options.step );
+				this._stop();
+			}
+		},
+	
+		stepDown: modifier(function( steps ) {
+			this._stepDown( steps );
+		}),
+		_stepDown: function( steps ) {
+			if ( this._start() ) {
+				this._spin( (steps || 1) * -this.options.step );
+				this._stop();
+			}
+		},
+	
+		pageUp: modifier(function( pages ) {
+			this._stepUp( (pages || 1) * this.options.page );
+		}),
+	
+		pageDown: modifier(function( pages ) {
+			this._stepDown( (pages || 1) * this.options.page );
+		}),
+	
+		value: function( newVal ) {
+			if ( !arguments.length ) {
+				return this._parse( this.element.val() );
+			}
+			modifier( this._value ).call( this, newVal );
+		},
+	
+		widget: function() {
+			return this.uiSpinner;
+		}
+	});
+	
+	}( jQuery ) );
+	
+	(function( $, undefined ) {
+	
+	var tabId = 0,
+		rhash = /#.*$/;
+	
+	function getNextTabId() {
+		return ++tabId;
+	}
+	
+	function isLocal( anchor ) {
+		return anchor.hash.length > 1 &&
+			decodeURIComponent( anchor.href.replace( rhash, "" ) ) ===
+				decodeURIComponent( location.href.replace( rhash, "" ) );
+	}
+	
+	$.widget( "ui.tabs", {
+		version: "1.10.3",
+		delay: 300,
+		options: {
+			active: null,
+			collapsible: false,
+			event: "click",
+			heightStyle: "content",
+			hide: null,
+			show: null,
+	
+			// callbacks
+			activate: null,
+			beforeActivate: null,
+			beforeLoad: null,
+			load: null
+		},
+	
+		_create: function() {
+			var that = this,
+				options = this.options;
+	
+			this.running = false;
+	
+			this.element
+				.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" )
+				.toggleClass( "ui-tabs-collapsible", options.collapsible )
+				// Prevent users from focusing disabled tabs via click
+				.delegate( ".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function( event ) {
+					if ( $( this ).is( ".ui-state-disabled" ) ) {
+						event.preventDefault();
+					}
+				})
+				// support: IE <9
+				// Preventing the default action in mousedown doesn't prevent IE
+				// from focusing the element, so if the anchor gets focused, blur.
+				// We don't have to worry about focusing the previously focused
+				// element since clicking on a non-focusable element should focus
+				// the body anyway.
+				.delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
+					if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
+						this.blur();
+					}
+				});
+	
+			this._processTabs();
+			options.active = this._initialActive();
+	
+			// Take disabling tabs via class attribute from HTML
+			// into account and update option properly.
+			if ( $.isArray( options.disabled ) ) {
+				options.disabled = $.unique( options.disabled.concat(
+					$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
+						return that.tabs.index( li );
+					})
+				) ).sort();
+			}
+	
+			// check for length avoids error when initializing empty list
+			if ( this.options.active !== false && this.anchors.length ) {
+				this.active = this._findActive( options.active );
+			} else {
+				this.active = $();
+			}
+	
+			this._refresh();
+	
+			if ( this.active.length ) {
+				this.load( options.active );
+			}
+		},
+	
+		_initialActive: function() {
+			var active = this.options.active,
+				collapsible = this.options.collapsible,
+				locationHash = location.hash.substring( 1 );
+	
+			if ( active === null ) {
+				// check the fragment identifier in the URL
+				if ( locationHash ) {
+					this.tabs.each(function( i, tab ) {
+						if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
+							active = i;
+							return false;
+						}
+					});
+				}
+	
+				// check for a tab marked active via a class
+				if ( active === null ) {
+					active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
+				}
+	
+				// no active tab, set to false
+				if ( active === null || active === -1 ) {
+					active = this.tabs.length ? 0 : false;
+				}
+			}
+	
+			// handle numbers: negative, out of range
+			if ( active !== false ) {
+				active = this.tabs.index( this.tabs.eq( active ) );
+				if ( active === -1 ) {
+					active = collapsible ? false : 0;
+				}
+			}
+	
+			// don't allow collapsible: false and active: false
+			if ( !collapsible && active === false && this.anchors.length ) {
+				active = 0;
+			}
+	
+			return active;
+		},
+	
+		_getCreateEventData: function() {
+			return {
+				tab: this.active,
+				panel: !this.active.length ? $() : this._getPanelForTab( this.active )
+			};
+		},
+	
+		_tabKeydown: function( event ) {
+			/*jshint maxcomplexity:15*/
+			var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
+				selectedIndex = this.tabs.index( focusedTab ),
+				goingForward = true;
+	
+			if ( this._handlePageNav( event ) ) {
+				return;
+			}
+	
+			switch ( event.keyCode ) {
+				case $.ui.keyCode.RIGHT:
+				case $.ui.keyCode.DOWN:
+					selectedIndex++;
+					break;
+				case $.ui.keyCode.UP:
+				case $.ui.keyCode.LEFT:
+					goingForward = false;
+					selectedIndex--;
+					break;
+				case $.ui.keyCode.END:
+					selectedIndex = this.anchors.length - 1;
+					break;
+				case $.ui.keyCode.HOME:
+					selectedIndex = 0;
+					break;
+				case $.ui.keyCode.SPACE:
+					// Activate only, no collapsing
+					event.preventDefault();
+					clearTimeout( this.activating );
+					this._activate( selectedIndex );
+					return;
+				case $.ui.keyCode.ENTER:
+					// Toggle (cancel delayed activation, allow collapsing)
+					event.preventDefault();
+					clearTimeout( this.activating );
+					// Determine if we should collapse or activate
+					this._activate( selectedIndex === this.options.active ? false : selectedIndex );
+					return;
+				default:
+					return;
+			}
+	
+			// Focus the appropriate tab, based on which key was pressed
+			event.preventDefault();
+			clearTimeout( this.activating );
+			selectedIndex = this._focusNextTab( selectedIndex, goingForward );
+	
+			// Navigating with control key will prevent automatic activation
+			if ( !event.ctrlKey ) {
+				// Update aria-selected immediately so that AT think the tab is already selected.
+				// Otherwise AT may confuse the user by stating that they need to activate the tab,
+				// but the tab will already be activated by the time the announcement finishes.
+				focusedTab.attr( "aria-selected", "false" );
+				this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
+	
+				this.activating = this._delay(function() {
+					this.option( "active", selectedIndex );
+				}, this.delay );
+			}
+		},
+	
+		_panelKeydown: function( event ) {
+			if ( this._handlePageNav( event ) ) {
+				return;
+			}
+	
+			// Ctrl+up moves focus to the current tab
+			if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
+				event.preventDefault();
+				this.active.focus();
+			}
+		},
+	
+		// Alt+page up/down moves focus to the previous/next tab (and activates)
+		_handlePageNav: function( event ) {
+			if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
+				this._activate( this._focusNextTab( this.options.active - 1, false ) );
+				return true;
+			}
+			if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
+				this._activate( this._focusNextTab( this.options.active + 1, true ) );
+				return true;
+			}
+		},
+	
+		_findNextTab: function( index, goingForward ) {
+			var lastTabIndex = this.tabs.length - 1;
+	
+			function constrain() {
+				if ( index > lastTabIndex ) {
+					index = 0;
+				}
+				if ( index < 0 ) {
+					index = lastTabIndex;
+				}
+				return index;
+			}
+	
+			while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
+				index = goingForward ? index + 1 : index - 1;
+			}
+	
+			return index;
+		},
+	
+		_focusNextTab: function( index, goingForward ) {
+			index = this._findNextTab( index, goingForward );
+			this.tabs.eq( index ).focus();
+			return index;
+		},
+	
+		_setOption: function( key, value ) {
+			if ( key === "active" ) {
+				// _activate() will handle invalid values and update this.options
+				this._activate( value );
+				return;
+			}
+	
+			if ( key === "disabled" ) {
+				// don't use the widget factory's disabled handling
+				this._setupDisabled( value );
+				return;
+			}
+	
+			this._super( key, value);
+	
+			if ( key === "collapsible" ) {
+				this.element.toggleClass( "ui-tabs-collapsible", value );
+				// Setting collapsible: false while collapsed; open first panel
+				if ( !value && this.options.active === false ) {
+					this._activate( 0 );
+				}
+			}
+	
+			if ( key === "event" ) {
+				this._setupEvents( value );
+			}
+	
+			if ( key === "heightStyle" ) {
+				this._setupHeightStyle( value );
+			}
+		},
+	
+		_tabId: function( tab ) {
+			return tab.attr( "aria-controls" ) || "ui-tabs-" + getNextTabId();
+		},
+	
+		_sanitizeSelector: function( hash ) {
+			return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
+		},
+	
+		refresh: function() {
+			var options = this.options,
+				lis = this.tablist.children( ":has(a[href])" );
+	
+			// get disabled tabs from class attribute from HTML
+			// this will get converted to a boolean if needed in _refresh()
+			options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
+				return lis.index( tab );
+			});
+	
+			this._processTabs();
+	
+			// was collapsed or no tabs
+			if ( options.active === false || !this.anchors.length ) {
+				options.active = false;
+				this.active = $();
+			// was active, but active tab is gone
+			} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
+				// all remaining tabs are disabled
+				if ( this.tabs.length === options.disabled.length ) {
+					options.active = false;
+					this.active = $();
+				// activate previous tab
+				} else {
+					this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
+				}
+			// was active, active tab still exists
+			} else {
+				// make sure active index is correct
+				options.active = this.tabs.index( this.active );
+			}
+	
+			this._refresh();
+		},
+	
+		_refresh: function() {
+			this._setupDisabled( this.options.disabled );
+			this._setupEvents( this.options.event );
+			this._setupHeightStyle( this.options.heightStyle );
+	
+			this.tabs.not( this.active ).attr({
+				"aria-selected": "false",
+				tabIndex: -1
+			});
+			this.panels.not( this._getPanelForTab( this.active ) )
+				.hide()
+				.attr({
+					"aria-expanded": "false",
+					"aria-hidden": "true"
+				});
+	
+			// Make sure one tab is in the tab order
+			if ( !this.active.length ) {
+				this.tabs.eq( 0 ).attr( "tabIndex", 0 );
+			} else {
+				this.active
+					.addClass( "ui-tabs-active ui-state-active" )
+					.attr({
+						"aria-selected": "true",
+						tabIndex: 0
+					});
+				this._getPanelForTab( this.active )
+					.show()
+					.attr({
+						"aria-expanded": "true",
+						"aria-hidden": "false"
+					});
+			}
+		},
+	
+		_processTabs: function() {
+			var that = this;
+	
+			this.tablist = this._getList()
+				.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
+				.attr( "role", "tablist" );
+	
+			this.tabs = this.tablist.find( "> li:has(a[href])" )
+				.addClass( "ui-state-default ui-corner-top" )
+				.attr({
+					role: "tab",
+					tabIndex: -1
+				});
+	
+			this.anchors = this.tabs.map(function() {
+					return $( "a", this )[ 0 ];
+				})
+				.addClass( "ui-tabs-anchor" )
+				.attr({
+					role: "presentation",
+					tabIndex: -1
+				});
+	
+			this.panels = $();
+	
+			this.anchors.each(function( i, anchor ) {
+				var selector, panel, panelId,
+					anchorId = $( anchor ).uniqueId().attr( "id" ),
+					tab = $( anchor ).closest( "li" ),
+					originalAriaControls = tab.attr( "aria-controls" );
+	
+				// inline tab
+				if ( isLocal( anchor ) ) {
+					selector = anchor.hash;
+					panel = that.element.find( that._sanitizeSelector( selector ) );
+				// remote tab
+				} else {
+					panelId = that._tabId( tab );
+					selector = "#" + panelId;
+					panel = that.element.find( selector );
+					if ( !panel.length ) {
+						panel = that._createPanel( panelId );
+						panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
+					}
+					panel.attr( "aria-live", "polite" );
+				}
+	
+				if ( panel.length) {
+					that.panels = that.panels.add( panel );
+				}
+				if ( originalAriaControls ) {
+					tab.data( "ui-tabs-aria-controls", originalAriaControls );
+				}
+				tab.attr({
+					"aria-controls": selector.substring( 1 ),
+					"aria-labelledby": anchorId
+				});
+				panel.attr( "aria-labelledby", anchorId );
+			});
+	
+			this.panels
+				.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+				.attr( "role", "tabpanel" );
+		},
+	
+		// allow overriding how to find the list for rare usage scenarios (#7715)
+		_getList: function() {
+			return this.element.find( "ol,ul" ).eq( 0 );
+		},
+	
+		_createPanel: function( id ) {
+			return $( "<div>" )
+				.attr( "id", id )
+				.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" )
+				.data( "ui-tabs-destroy", true );
+		},
+	
+		_setupDisabled: function( disabled ) {
+			if ( $.isArray( disabled ) ) {
+				if ( !disabled.length ) {
+					disabled = false;
+				} else if ( disabled.length === this.anchors.length ) {
+					disabled = true;
+				}
+			}
+	
+			// disable tabs
+			for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {
+				if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
+					$( li )
+						.addClass( "ui-state-disabled" )
+						.attr( "aria-disabled", "true" );
+				} else {
+					$( li )
+						.removeClass( "ui-state-disabled" )
+						.removeAttr( "aria-disabled" );
+				}
+			}
+	
+			this.options.disabled = disabled;
+		},
+	
+		_setupEvents: function( event ) {
+			var events = {
+				click: function( event ) {
+					event.preventDefault();
+				}
+			};
+			if ( event ) {
+				$.each( event.split(" "), function( index, eventName ) {
+					events[ eventName ] = "_eventHandler";
+				});
+			}
+	
+			this._off( this.anchors.add( this.tabs ).add( this.panels ) );
+			this._on( this.anchors, events );
+			this._on( this.tabs, { keydown: "_tabKeydown" } );
+			this._on( this.panels, { keydown: "_panelKeydown" } );
+	
+			this._focusable( this.tabs );
+			this._hoverable( this.tabs );
+		},
+	
+		_setupHeightStyle: function( heightStyle ) {
+			var maxHeight,
+				parent = this.element.parent();
+	
+			if ( heightStyle === "fill" ) {
+				maxHeight = parent.height();
+				maxHeight -= this.element.outerHeight() - this.element.height();
+	
+				this.element.siblings( ":visible" ).each(function() {
+					var elem = $( this ),
+						position = elem.css( "position" );
+	
+					if ( position === "absolute" || position === "fixed" ) {
+						return;
+					}
+					maxHeight -= elem.outerHeight( true );
+				});
+	
+				this.element.children().not( this.panels ).each(function() {
+					maxHeight -= $( this ).outerHeight( true );
+				});
+	
+				this.panels.each(function() {
+					$( this ).height( Math.max( 0, maxHeight -
+						$( this ).innerHeight() + $( this ).height() ) );
+				})
+				.css( "overflow", "auto" );
+			} else if ( heightStyle === "auto" ) {
+				maxHeight = 0;
+				this.panels.each(function() {
+					maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
+				}).height( maxHeight );
+			}
+		},
+	
+		_eventHandler: function( event ) {
+			var options = this.options,
+				active = this.active,
+				anchor = $( event.currentTarget ),
+				tab = anchor.closest( "li" ),
+				clickedIsActive = tab[ 0 ] === active[ 0 ],
+				collapsing = clickedIsActive && options.collapsible,
+				toShow = collapsing ? $() : this._getPanelForTab( tab ),
+				toHide = !active.length ? $() : this._getPanelForTab( active ),
+				eventData = {
+					oldTab: active,
+					oldPanel: toHide,
+					newTab: collapsing ? $() : tab,
+					newPanel: toShow
+				};
+	
+			event.preventDefault();
+	
+			if ( tab.hasClass( "ui-state-disabled" ) ||
+					// tab is already loading
+					tab.hasClass( "ui-tabs-loading" ) ||
+					// can't switch durning an animation
+					this.running ||
+					// click on active header, but not collapsible
+					( clickedIsActive && !options.collapsible ) ||
+					// allow canceling activation
+					( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
+				return;
+			}
+	
+			options.active = collapsing ? false : this.tabs.index( tab );
+	
+			this.active = clickedIsActive ? $() : tab;
+			if ( this.xhr ) {
+				this.xhr.abort();
+			}
+	
+			if ( !toHide.length && !toShow.length ) {
+				$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
+			}
+	
+			if ( toShow.length ) {
+				this.load( this.tabs.index( tab ), event );
+			}
+			this._toggle( event, eventData );
+		},
+	
+		// handles show/hide for selecting tabs
+		_toggle: function( event, eventData ) {
+			var that = this,
+				toShow = eventData.newPanel,
+				toHide = eventData.oldPanel;
+	
+			this.running = true;
+	
+			function complete() {
+				that.running = false;
+				that._trigger( "activate", event, eventData );
+			}
+	
+			function show() {
+				eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" );
+	
+				if ( toShow.length && that.options.show ) {
+					that._show( toShow, that.options.show, complete );
+				} else {
+					toShow.show();
+					complete();
+				}
+			}
+	
+			// start out by hiding, then showing, then completing
+			if ( toHide.length && this.options.hide ) {
+				this._hide( toHide, this.options.hide, function() {
+					eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
+					show();
+				});
+			} else {
+				eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" );
+				toHide.hide();
+				show();
+			}
+	
+			toHide.attr({
+				"aria-expanded": "false",
+				"aria-hidden": "true"
+			});
+			eventData.oldTab.attr( "aria-selected", "false" );
+			// If we're switching tabs, remove the old tab from the tab order.
+			// If we're opening from collapsed state, remove the previous tab from the tab order.
+			// If we're collapsing, then keep the collapsing tab in the tab order.
+			if ( toShow.length && toHide.length ) {
+				eventData.oldTab.attr( "tabIndex", -1 );
+			} else if ( toShow.length ) {
+				this.tabs.filter(function() {
+					return $( this ).attr( "tabIndex" ) === 0;
+				})
+				.attr( "tabIndex", -1 );
+			}
+	
+			toShow.attr({
+				"aria-expanded": "true",
+				"aria-hidden": "false"
+			});
+			eventData.newTab.attr({
+				"aria-selected": "true",
+				tabIndex: 0
+			});
+		},
+	
+		_activate: function( index ) {
+			var anchor,
+				active = this._findActive( index );
+	
+			// trying to activate the already active panel
+			if ( active[ 0 ] === this.active[ 0 ] ) {
+				return;
+			}
+	
+			// trying to collapse, simulate a click on the current active header
+			if ( !active.length ) {
+				active = this.active;
+			}
+	
+			anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
+			this._eventHandler({
+				target: anchor,
+				currentTarget: anchor,
+				preventDefault: $.noop
+			});
+		},
+	
+		_findActive: function( index ) {
+			return index === false ? $() : this.tabs.eq( index );
+		},
+	
+		_getIndex: function( index ) {
+			// meta-function to give users option to provide a href string instead of a numerical index.
+			if ( typeof index === "string" ) {
+				index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
+			}
+	
+			return index;
+		},
+	
+		_destroy: function() {
+			if ( this.xhr ) {
+				this.xhr.abort();
+			}
+	
+			this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" );
+	
+			this.tablist
+				.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" )
+				.removeAttr( "role" );
+	
+			this.anchors
+				.removeClass( "ui-tabs-anchor" )
+				.removeAttr( "role" )
+				.removeAttr( "tabIndex" )
+				.removeUniqueId();
+	
+			this.tabs.add( this.panels ).each(function() {
+				if ( $.data( this, "ui-tabs-destroy" ) ) {
+					$( this ).remove();
+				} else {
+					$( this )
+						.removeClass( "ui-state-default ui-state-active ui-state-disabled " +
+							"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" )
+						.removeAttr( "tabIndex" )
+						.removeAttr( "aria-live" )
+						.removeAttr( "aria-busy" )
+						.removeAttr( "aria-selected" )
+						.removeAttr( "aria-labelledby" )
+						.removeAttr( "aria-hidden" )
+						.removeAttr( "aria-expanded" )
+						.removeAttr( "role" );
+				}
+			});
+	
+			this.tabs.each(function() {
+				var li = $( this ),
+					prev = li.data( "ui-tabs-aria-controls" );
+				if ( prev ) {
+					li
+						.attr( "aria-controls", prev )
+						.removeData( "ui-tabs-aria-controls" );
+				} else {
+					li.removeAttr( "aria-controls" );
+				}
+			});
+	
+			this.panels.show();
+	
+			if ( this.options.heightStyle !== "content" ) {
+				this.panels.css( "height", "" );
+			}
+		},
+	
+		enable: function( index ) {
+			var disabled = this.options.disabled;
+			if ( disabled === false ) {
+				return;
+			}
+	
+			if ( index === undefined ) {
+				disabled = false;
+			} else {
+				index = this._getIndex( index );
+				if ( $.isArray( disabled ) ) {
+					disabled = $.map( disabled, function( num ) {
+						return num !== index ? num : null;
+					});
+				} else {
+					disabled = $.map( this.tabs, function( li, num ) {
+						return num !== index ? num : null;
+					});
+				}
+			}
+			this._setupDisabled( disabled );
+		},
+	
+		disable: function( index ) {
+			var disabled = this.options.disabled;
+			if ( disabled === true ) {
+				return;
+			}
+	
+			if ( index === undefined ) {
+				disabled = true;
+			} else {
+				index = this._getIndex( index );
+				if ( $.inArray( index, disabled ) !== -1 ) {
+					return;
+				}
+				if ( $.isArray( disabled ) ) {
+					disabled = $.merge( [ index ], disabled ).sort();
+				} else {
+					disabled = [ index ];
+				}
+			}
+			this._setupDisabled( disabled );
+		},
+	
+		load: function( index, event ) {
+			index = this._getIndex( index );
+			var that = this,
+				tab = this.tabs.eq( index ),
+				anchor = tab.find( ".ui-tabs-anchor" ),
+				panel = this._getPanelForTab( tab ),
+				eventData = {
+					tab: tab,
+					panel: panel
+				};
+	
+			// not remote
+			if ( isLocal( anchor[ 0 ] ) ) {
+				return;
+			}
+	
+			this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
+	
+			// support: jQuery <1.8
+			// jQuery <1.8 returns false if the request is canceled in beforeSend,
+			// but as of 1.8, $.ajax() always returns a jqXHR object.
+			if ( this.xhr && this.xhr.statusText !== "canceled" ) {
+				tab.addClass( "ui-tabs-loading" );
+				panel.attr( "aria-busy", "true" );
+	
+				this.xhr
+					.success(function( response ) {
+						// support: jQuery <1.8
+						// http://bugs.jquery.com/ticket/11778
+						setTimeout(function() {
+							panel.html( response );
+							that._trigger( "load", event, eventData );
+						}, 1 );
+					})
+					.complete(function( jqXHR, status ) {
+						// support: jQuery <1.8
+						// http://bugs.jquery.com/ticket/11778
+						setTimeout(function() {
+							if ( status === "abort" ) {
+								that.panels.stop( false, true );
+							}
+	
+							tab.removeClass( "ui-tabs-loading" );
+							panel.removeAttr( "aria-busy" );
+	
+							if ( jqXHR === that.xhr ) {
+								delete that.xhr;
+							}
+						}, 1 );
+					});
+			}
+		},
+	
+		_ajaxSettings: function( anchor, event, eventData ) {
+			var that = this;
+			return {
+				url: anchor.attr( "href" ),
+				beforeSend: function( jqXHR, settings ) {
+					return that._trigger( "beforeLoad", event,
+						$.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );
+				}
+			};
+		},
+	
+		_getPanelForTab: function( tab ) {
+			var id = $( tab ).attr( "aria-controls" );
+			return this.element.find( this._sanitizeSelector( "#" + id ) );
+		}
+	});
+	
+	})( jQuery );
+	
+	(function( $ ) {
+	
+	var increments = 0;
+	
+	function addDescribedBy( elem, id ) {
+		var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ );
+		describedby.push( id );
+		elem
+			.data( "ui-tooltip-id", id )
+			.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
+	}
+	
+	function removeDescribedBy( elem ) {
+		var id = elem.data( "ui-tooltip-id" ),
+			describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ),
+			index = $.inArray( id, describedby );
+		if ( index !== -1 ) {
+			describedby.splice( index, 1 );
+		}
+	
+		elem.removeData( "ui-tooltip-id" );
+		describedby = $.trim( describedby.join( " " ) );
+		if ( describedby ) {
+			elem.attr( "aria-describedby", describedby );
+		} else {
+			elem.removeAttr( "aria-describedby" );
+		}
+	}
+	
+	$.widget( "ui.tooltip", {
+		version: "1.10.3",
+		options: {
+			content: function() {
+				// support: IE<9, Opera in jQuery <1.7
+				// .text() can't accept undefined, so coerce to a string
+				var title = $( this ).attr( "title" ) || "";
+				// Escape title, since we're going from an attribute to raw HTML
+				return $( "<a>" ).text( title ).html();
+			},
+			hide: true,
+			// Disabled elements have inconsistent behavior across browsers (#8661)
+			items: "[title]:not([disabled])",
+			position: {
+				my: "left top+15",
+				at: "left bottom",
+				collision: "flipfit flip"
+			},
+			show: true,
+			tooltipClass: null,
+			track: false,
+	
+			// callbacks
+			close: null,
+			open: null
+		},
+	
+		_create: function() {
+			this._on({
+				mouseover: "open",
+				focusin: "open"
+			});
+	
+			// IDs of generated tooltips, needed for destroy
+			this.tooltips = {};
+			// IDs of parent tooltips where we removed the title attribute
+			this.parents = {};
+	
+			if ( this.options.disabled ) {
+				this._disable();
+			}
+		},
+	
+		_setOption: function( key, value ) {
+			var that = this;
+	
+			if ( key === "disabled" ) {
+				this[ value ? "_disable" : "_enable" ]();
+				this.options[ key ] = value;
+				// disable element style changes
+				return;
+			}
+	
+			this._super( key, value );
+	
+			if ( key === "content" ) {
+				$.each( this.tooltips, function( id, element ) {
+					that._updateContent( element );
+				});
+			}
+		},
+	
+		_disable: function() {
+			var that = this;
+	
+			// close open tooltips
+			$.each( this.tooltips, function( id, element ) {
+				var event = $.Event( "blur" );
+				event.target = event.currentTarget = element[0];
+				that.close( event, true );
+			});
+	
+			// remove title attributes to prevent native tooltips
+			this.element.find( this.options.items ).addBack().each(function() {
+				var element = $( this );
+				if ( element.is( "[title]" ) ) {
+					element
+						.data( "ui-tooltip-title", element.attr( "title" ) )
+						.attr( "title", "" );
+				}
+			});
+		},
+	
+		_enable: function() {
+			// restore title attributes
+			this.element.find( this.options.items ).addBack().each(function() {
+				var element = $( this );
+				if ( element.data( "ui-tooltip-title" ) ) {
+					element.attr( "title", element.data( "ui-tooltip-title" ) );
+				}
+			});
+		},
+	
+		open: function( event ) {
+			var that = this,
+				target = $( event ? event.target : this.element )
+					// we need closest here due to mouseover bubbling,
+					// but always pointing at the same event target
+					.closest( this.options.items );
+	
+			// No element to show a tooltip for or the tooltip is already open
+			if ( !target.length || target.data( "ui-tooltip-id" ) ) {
+				return;
+			}
+	
+			if ( target.attr( "title" ) ) {
+				target.data( "ui-tooltip-title", target.attr( "title" ) );
+			}
+	
+			target.data( "ui-tooltip-open", true );
+	
+			// kill parent tooltips, custom or native, for hover
+			if ( event && event.type === "mouseover" ) {
+				target.parents().each(function() {
+					var parent = $( this ),
+						blurEvent;
+					if ( parent.data( "ui-tooltip-open" ) ) {
+						blurEvent = $.Event( "blur" );
+						blurEvent.target = blurEvent.currentTarget = this;
+						that.close( blurEvent, true );
+					}
+					if ( parent.attr( "title" ) ) {
+						parent.uniqueId();
+						that.parents[ this.id ] = {
+							element: this,
+							title: parent.attr( "title" )
+						};
+						parent.attr( "title", "" );
+					}
+				});
+			}
+	
+			this._updateContent( target, event );
+		},
+	
+		_updateContent: function( target, event ) {
+			var content,
+				contentOption = this.options.content,
+				that = this,
+				eventType = event ? event.type : null;
+	
+			if ( typeof contentOption === "string" ) {
+				return this._open( event, target, contentOption );
+			}
+	
+			content = contentOption.call( target[0], function( response ) {
+				// ignore async response if tooltip was closed already
+				if ( !target.data( "ui-tooltip-open" ) ) {
+					return;
+				}
+				// IE may instantly serve a cached response for ajax requests
+				// delay this call to _open so the other call to _open runs first
+				that._delay(function() {
+					// jQuery creates a special event for focusin when it doesn't
+					// exist natively. To improve performance, the native event
+					// object is reused and the type is changed. Therefore, we can't
+					// rely on the type being correct after the event finished
+					// bubbling, so we set it back to the previous value. (#8740)
+					if ( event ) {
+						event.type = eventType;
+					}
+					this._open( event, target, response );
+				});
+			});
+			if ( content ) {
+				this._open( event, target, content );
+			}
+		},
+	
+		_open: function( event, target, content ) {
+			var tooltip, events, delayedShow,
+				positionOption = $.extend( {}, this.options.position );
+	
+			if ( !content ) {
+				return;
+			}
+	
+			// Content can be updated multiple times. If the tooltip already
+			// exists, then just update the content and bail.
+			tooltip = this._find( target );
+			if ( tooltip.length ) {
+				tooltip.find( ".ui-tooltip-content" ).html( content );
+				return;
+			}
+	
+			// if we have a title, clear it to prevent the native tooltip
+			// we have to check first to avoid defining a title if none exists
+			// (we don't want to cause an element to start matching [title])
+			//
+			// We use removeAttr only for key events, to allow IE to export the correct
+			// accessible attributes. For mouse events, set to empty string to avoid
+			// native tooltip showing up (happens only when removing inside mouseover).
+			if ( target.is( "[title]" ) ) {
+				if ( event && event.type === "mouseover" ) {
+					target.attr( "title", "" );
+				} else {
+					target.removeAttr( "title" );
+				}
+			}
+	
+			tooltip = this._tooltip( target );
+			addDescribedBy( target, tooltip.attr( "id" ) );
+			tooltip.find( ".ui-tooltip-content" ).html( content );
+	
+			function position( event ) {
+				positionOption.of = event;
+				if ( tooltip.is( ":hidden" ) ) {
+					return;
+				}
+				tooltip.position( positionOption );
+			}
+			if ( this.options.track && event && /^mouse/.test( event.type ) ) {
+				this._on( this.document, {
+					mousemove: position
+				});
+				// trigger once to override element-relative positioning
+				position( event );
+			} else {
+				tooltip.position( $.extend({
+					of: target
+				}, this.options.position ) );
+			}
+	
+			tooltip.hide();
+	
+			this._show( tooltip, this.options.show );
+			// Handle tracking tooltips that are shown with a delay (#8644). As soon
+			// as the tooltip is visible, position the tooltip using the most recent
+			// event.
+			if ( this.options.show && this.options.show.delay ) {
+				delayedShow = this.delayedShow = setInterval(function() {
+					if ( tooltip.is( ":visible" ) ) {
+						position( positionOption.of );
+						clearInterval( delayedShow );
+					}
+				}, $.fx.interval );
+			}
+	
+			this._trigger( "open", event, { tooltip: tooltip } );
+	
+			events = {
+				keyup: function( event ) {
+					if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
+						var fakeEvent = $.Event(event);
+						fakeEvent.currentTarget = target[0];
+						this.close( fakeEvent, true );
+					}
+				},
+				remove: function() {
+					this._removeTooltip( tooltip );
+				}
+			};
+			if ( !event || event.type === "mouseover" ) {
+				events.mouseleave = "close";
+			}
+			if ( !event || event.type === "focusin" ) {
+				events.focusout = "close";
+			}
+			this._on( true, target, events );
+		},
+	
+		close: function( event ) {
+			var that = this,
+				target = $( event ? event.currentTarget : this.element ),
+				tooltip = this._find( target );
+	
+			// disabling closes the tooltip, so we need to track when we're closing
+			// to avoid an infinite loop in case the tooltip becomes disabled on close
+			if ( this.closing ) {
+				return;
+			}
+	
+			// Clear the interval for delayed tracking tooltips
+			clearInterval( this.delayedShow );
+	
+			// only set title if we had one before (see comment in _open())
+			if ( target.data( "ui-tooltip-title" ) ) {
+				target.attr( "title", target.data( "ui-tooltip-title" ) );
+			}
+	
+			removeDescribedBy( target );
+	
+			tooltip.stop( true );
+			this._hide( tooltip, this.options.hide, function() {
+				that._removeTooltip( $( this ) );
+			});
+	
+			target.removeData( "ui-tooltip-open" );
+			this._off( target, "mouseleave focusout keyup" );
+			// Remove 'remove' binding only on delegated targets
+			if ( target[0] !== this.element[0] ) {
+				this._off( target, "remove" );
+			}
+			this._off( this.document, "mousemove" );
+	
+			if ( event && event.type === "mouseleave" ) {
+				$.each( this.parents, function( id, parent ) {
+					$( parent.element ).attr( "title", parent.title );
+					delete that.parents[ id ];
+				});
+			}
+	
+			this.closing = true;
+			this._trigger( "close", event, { tooltip: tooltip } );
+			this.closing = false;
+		},
+	
+		_tooltip: function( element ) {
+			var id = "ui-tooltip-" + increments++,
+				tooltip = $( "<div>" )
+					.attr({
+						id: id,
+						role: "tooltip"
+					})
+					.addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " +
+						( this.options.tooltipClass || "" ) );
+			$( "<div>" )
+				.addClass( "ui-tooltip-content" )
+				.appendTo( tooltip );
+			tooltip.appendTo( this.document[0].body );
+			this.tooltips[ id ] = element;
+			return tooltip;
+		},
+	
+		_find: function( target ) {
+			var id = target.data( "ui-tooltip-id" );
+			return id ? $( "#" + id ) : $();
+		},
+	
+		_removeTooltip: function( tooltip ) {
+			tooltip.remove();
+			delete this.tooltips[ tooltip.attr( "id" ) ];
+		},
+	
+		_destroy: function() {
+			var that = this;
+	
+			// close open tooltips
+			$.each( this.tooltips, function( id, element ) {
+				// Delegate to close method to handle common cleanup
+				var event = $.Event( "blur" );
+				event.target = event.currentTarget = element[0];
+				that.close( event, true );
+	
+				// Remove immediately; destroying an open tooltip doesn't use the
+				// hide animation
+				$( "#" + id ).remove();
+	
+				// Restore the title
+				if ( element.data( "ui-tooltip-title" ) ) {
+					element.attr( "title", element.data( "ui-tooltip-title" ) );
+					element.removeData( "ui-tooltip-title" );
+				}
+			});
+		}
+	});
+	
+	}( jQuery ) );
+
+
+/***/ }
+
+/******/ });
 //# sourceMappingURL=range_media.js.map
\ No newline at end of file
diff --git a/test-html/js/range_media.js.map b/test-html/js/range_media.js.map
index 693c84ad51389457cacafe05a5e7f2eee413856e..bc19672d95d1138808dc473bdd702d0774b83186 100644
--- a/test-html/js/range_media.js.map
+++ b/test-html/js/range_media.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///range_media.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457***","webpack:///./src/_test/range_media.ts","webpack:///./src/util/provide.ts?5c82***","webpack:///external \"$\"?57aa***","webpack:///./src/domUtil/day-range.ts","webpack:///./~/jquery-ui/jquery-ui.js"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","0","day_range_1","$","DayRange","1","provide","namespace","window","parts","split","nameSpace","i","length","newObject","util","Object","defineProperty","value","default","2","23","provide_1","nm","jQueryRef","dayRange","this","_workingDayRange","pickerHtml","append","_$startDate","_$endDate","_startDate","_endDate","dte1","Date","setHours","dte2","getTime","setDate","getDate","_maxDateRange","_this","change","startDate","endDate","prototype","get","set","val","toLocaleDateString","tmpDate","enumerable","configurable","34","jQuery","undefined","focusable","element","isTabIndexNotNaN","map","mapName","img","nodeName","toLowerCase","parentNode","name","href","visible","test","disabled","expr","filters","parents","addBack","filter","css","uuid","runiqueId","ui","extend","version","keyCode","BACKSPACE","COMMA","DELETE","DOWN","END","ENTER","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","SPACE","TAB","UP","fn","focus","orig","delay","each","elem","setTimeout","apply","arguments","scrollParent","ie","eq","document","zIndex","position","parseInt","isNaN","parent","uniqueId","removeUniqueId","removeAttr","data","createPseudo","dataName","match","attr","tabbable","tabIndex","isTabIndexNaN","outerWidth","jquery","reduce","size","border","margin","side","parseFloat","type","innerWidth","innerHeight","outerHeight","selector","add","prevObject","removeData","key","camelCase","exec","navigator","userAgent","support","selectstart","createElement","disableSelection","bind","event","preventDefault","enableSelection","unbind","plugin","option","proto","plugins","push","instance","args","nodeType","options","hasScroll","el","a","scroll","has","slice","Array","_cleanData","cleanData","elems","triggerHandler","e","widget","base","fullName","existingConstructor","constructor","basePrototype","proxiedPrototype","Widget","_createWidget","_proto","_childConstructors","prop","isFunction","_super","_superApply","returnValue","__super","__superApply","widgetEventPrefix","widgetName","widgetFullName","child","childPrototype","bridge","target","input","inputIndex","inputLength","hasOwnProperty","isPlainObject","object","isMethodCall","concat","methodValue","charAt","pushStack","error","_init","defaultElement","create","eventNamespace","_getCreateOptions","bindings","hoverable","_on","remove","destroy","style","ownerDocument","defaultView","parentWindow","_create","_trigger","_getCreateEventData","noop","_destroy","removeClass","curOption","shift","pop","_setOptions","_setOption","toggleClass","enable","disable","suppressDisabledCheck","handlers","delegateElement","handler","handlerProxy","hasClass","guid","eventName","delegate","_off","join","undelegate","_delay","_hoverable","mouseenter","currentTarget","addClass","mouseleave","_focusable","focusin","focusout","callback","Event","originalEvent","trigger","isDefaultPrevented","show","hide","method","defaultEffect","effect","hasOptions","effectName","duration","isEmptyObject","complete","effects","easing","queue","next","mouseHandled","mouseup","cancel","distance","_mouseInit","that","_mouseDown","stopImmediatePropagation","started","_mouseDestroy","_mouseMoveDelegate","_mouseUpDelegate","_mouseStarted","_mouseUp","_mouseDownEvent","btnIsLeft","which","elIsCancel","closest","_mouseCapture","mouseDelayMet","_mouseDelayTimer","_mouseDistanceMet","_mouseDelayMet","_mouseStart","_mouseMove","documentMode","button","_mouseDrag","_mouseStop","Math","max","abs","pageX","pageY","mouse","addClasses","appendTo","axis","connectToSortable","containment","cursor","cursorAt","grid","handle","helper","iframeFix","opacity","refreshPositions","revert","revertDuration","scope","scrollSensitivity","scrollSpeed","snap","snapMode","snapTolerance","stack","drag","start","stop","o","_getHandle","width","offsetWidth","height","offsetHeight","offset","_createHelper","_cacheHelperProportions","ddmanager","current","_cacheMargins","cssPosition","offsetParent","offsetParentCssPosition","positionAbs","top","margins","left","click","_getParentOffset","relative","_getRelativeOffset","originalPosition","_generatePosition","originalPageX","originalPageY","_adjustOffsetFromHelper","_setContainment","_clear","dropBehaviour","prepareOffsets","dragStart","noPropagation","_convertPositionTo","_uiHash","dropped","drop","contains","animate","removeChild","dragStop","is","find","clone","obj","isArray","helperProportions","right","bottom","po","scrollLeft","scrollTop","body","tagName","over","ce","scrollHeight","scrollWidth","relative_container","d","pos","mod","co","round","cancelHelperRemoval","inst","uiSortable","item","sortables","sortable","shouldRevert","isOver","_helper","currentItem","innermostIntersecting","thisSortable","_intersectsWith","containerCache","fromOutside","placeholder","t","_cursor","_opacity","overflowOffset","scrolled","snapElements","String","items","$t","$o","ts","bs","ls","rs","l","r","b","first","x1","x2","y1","y2","snapping","release","snapItem","min","group","makeArray","sort","_zIndex","isOverAxis","x","reference","accept","activeClass","greedy","hoverClass","tolerance","activate","deactivate","out","isover","isout","proportions","droppables","splice","_activate","draggable","_deactivate","_over","_out","_drop","custom","childrenIntersection","not","intersect","droppable","toleranceMode","draggableLeft","draggableTop","absolute","clickOffset","j","list","droppablesLoop","parentsUntil","greedyChild","parentInstance","intersects","num","v","isNumber","alsoResize","animateDuration","animateEasing","aspectRatio","autoHide","ghost","handles","maxHeight","maxWidth","minHeight","minWidth","resize","n","hname","_aspectRatio","originalElement","_proportionallyResizeElements","wrap","elementIsWrapper","marginLeft","marginTop","marginRight","marginBottom","originalResizeStyle","zoom","display","_proportionallyResize","s","w","se","sw","ne","nw","trim","_renderAxis","padPos","padWrapper","_handles","mouseover","resizing","className","wrapper","exp","insertAfter","capture","curleft","curtop","iniPos","_renderProxy","originalSize","sizeDiff","originalMousePosition","_propagate","props","smp","prevTop","prevLeft","prevWidth","prevHeight","dx","dy","_change","_updateVirtualBoundaries","shiftKey","_updateRatio","_respectSize","_updateCache","pr","ista","soffseth","soffsetw","forceAspectRatio","pMinWidth","pMaxWidth","pMinHeight","pMaxHeight","Infinity","_vBoundaries","cpos","csize","ismaxw","ismaxh","isminw","isminh","dw","dh","cw","ch","borders","paddings","prel","borderDif","elementOffset","cs","sp","step","oc","containerElement","containerOffset","containerPosition","parentData","containerSize","woset","hoset","isParent","isOffsetRelative","cp","pRatio","cop","ho","h","_store","os","op","delta","_alsoResize","sum","gridX","gridY","ox","oy","newWidth","newHeight","isMaxWidth","isMaxHeight","isMinWidth","isMinHeight","autoRefresh","selected","selecting","unselected","unselecting","selectees","dragged","refresh","$this","$element","startselected","opos","selectee","metaKey","ctrlKey","doSelect","tmp","hit","isFloating","ready","connectWith","dropOnEmpty","forcePlaceholderSize","forceHelperSize","beforeStop","receive","update","floating","overrideHandle","validHandle","reverting","_refreshItems","_removeCurrentsFromItems","noActivation","currentContainer","domPosition","prev","_createPlaceholder","storedCursor","storedStylesheet","_storedOpacity","_storedZIndex","_preserveHelperProportions","containers","dragging","itemElement","intersection","lastPositionAbs","_intersectsWithPointer","direction","_intersectsWithSides","_rearrange","_contactContainers","cur","animation","_storedCSS","_noFinalSort","after","prepend","serialize","_getItemsAsjQuery","connected","str","res","attribute","expression","toArray","ret","dyClick","dxClick","isOverElementHeight","isOverElementWidth","isOverElement","forcePointerForContainers","verticalDirection","_getDragVerticalDirection","horizontalDirection","_getDragHorizontalDirection","isOverBottomHalf","isOverRightHalf","_connectWith","queries","grep","targetData","_queries","queriesLength","fast","toleranceElement","refreshContainers","children","container","dist","itemWithLeastDistance","posProperty","sizeProperty","nearBottom","innermostContainer","innermostIndex","appendChild","scrollIsRootNode","hardRefresh","insertBefore","nextSibling","counter","delayedTriggers","before","_inst","sender","dataSpace","clamp","allowEmpty","propTypes","def","floor","stringParse","string","color","rgba","_rgba","stringParsers","parser","parsed","re","values","parse","spaceName","space","spaces","cache","colors","transparent","hue2rgb","q","stepHooks","rplusequals","execResult","Color","green","blue","alpha","red","idx","hsla","hue","saturation","lightness","byte","percent","degrees","supportElem","cssText","backgroundColor","indexOf","_default","to","inArray","from","compare","same","_","localCache","isCache","_space","used","transition","other","end","startColor","result","index","startValue","endValue","blend","opaque","rgb","toRgbaString","prefix","toHslaString","toHexString","includeAlpha","toString","g","diff","arr","local","vtype","_hsla","empty","hook","hooks","cssHooks","curElem","fx","colorInit","borderColor","expand","expanded","part","names","aqua","black","fuchsia","gray","lime","maroon","navy","olive","purple","silver","teal","white","yellow","getElementStyles","len","getComputedStyle","currentStyle","styles","styleDifference","oldStyle","newStyle","shorthandStyles","classAnimationActions","borderBottom","borderLeft","borderRight","borderTop","borderWidth","padding","setAttr","animateClass","speed","applyClassChange","animated","baseClass","allAnimations","action","styleInfo","dfd","Deferred","opts","resolve","promise","when","done","classNames","force","toggle","switchClass","_normalizeArguments","speeds","off","standardAnimationOption","save","restore","setMode","mode","getBaseline","origin","original","y","createWrapper","float","fontSize","background","active","activeElement","removeWrapper","replaceWith","setTransition","factor","unit","cssUnit","run","effectMethod","baseEasings","pow","Sine","cos","PI","Circ","sqrt","Elastic","sin","Back","Bounce","pow2","bounce","easeIn","uid","hideProps","showProps","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","collapsible","header","heightStyle","icons","activeHeader","beforeActivate","prevShow","prevHide","_processPanels","headers","_refresh","panel","content","_createIcons","prependTo","_destroyIcons","contents","removeAttribute","_setupEvents","_keydown","altKey","currentIndex","toFocus","_eventHandler","_panelKeyDown","accordionId","_findActive","headerId","panelId","aria-selected","aria-expanded","aria-hidden","siblings","events","keydown","clicked","clickedIsActive","collapsing","toShow","toHide","eventData","oldHeader","oldPanel","newHeader","newPanel","_toggle","_animate","_toggleComplete","total","adjust","down","now","requestIndex","autoFocus","minLength","my","at","collision","source","close","open","response","search","select","pending","suppressKeyPress","suppressKeyPressRepeat","suppressInput","isTextarea","isInput","isMultiLine","valueMethod","isNewMenu","_move","_keyEvent","menu","_value","term","_searchTimeout","keypress","selectedItem","previous","blur","cancelBlur","clearTimeout","searching","_initSource","_appendTo","role","mousedown","menuElement","one","menufocus","liveRegion","text","menuselect","aria-live","beforeunload","xhr","abort","array","url","request","autocomplete","ajax","dataType","success","_search","cancelSearch","_response","__response","_normalize","_suggest","_close","label","ul","_renderMenu","_resizeMenu","of","_renderItemData","_renderItem","isFirstItem","isLastItem","keyEvent","escapeRegex","replace","matcher","RegExp","messages","noResults","results","amount","message","lastActive","startXPos","startYPos","clickDragged","baseClasses","stateClasses","typeClasses","formResetHandler","form","radioGroup","radio","radios","primary","secondary","_determineButtonType","hasTitle","buttonElement","toggleButton","focusClass","html","keyup","_resetButton","ancestor","labelSelector","checked","last","isDisabled","buttonText","multipleIcons","buttonClasses","buttons","rtl","Datepicker","_curInst","_disabledInputs","_datepickerShowing","_inDialog","_mainDivId","_inlineClass","_appendClass","_triggerClass","_dialogClass","_disableClass","_unselectableClass","_currentClass","_dayOverClass","regional","closeText","prevText","nextText","currentText","monthNames","monthNamesShort","dayNames","dayNamesShort","dayNamesMin","weekHeader","dateFormat","firstDay","isRTL","showMonthAfterYear","yearSuffix","_defaults","showOn","showAnim","showOptions","defaultDate","appendText","buttonImage","buttonImageOnly","hideIfNoPrevNext","navigationAsDateFormat","gotoCurrent","changeMonth","changeYear","yearRange","showOtherMonths","selectOtherMonths","showWeek","calculateWeek","iso8601Week","shortYearCutoff","minDate","maxDate","beforeShowDay","beforeShow","onSelect","onChangeMonthYear","onClose","numberOfMonths","showCurrentAtPos","stepMonths","stepBigMonths","altField","altFormat","constrainInput","showButtonPanel","autoSize","dpDiv","bindHover","datepicker","_isDisabledDatepicker","instActive","inline","extendRemove","PROP_NAME","markerClassName","maxRows","_widgetDatepicker","setDefaults","settings","_attachDatepicker","_newInst","_connectDatepicker","_inlineDatepicker","selectedDay","selectedMonth","selectedYear","drawMonth","drawYear","_attachments","_doKeyDown","_doKeyPress","_doKeyUp","_autoSize","_disableDatepicker","_get","_showDatepicker","src","alt","title","_lastInput","_hideDatepicker","findMax","maxI","date","setMonth","getDay","_formatDate","divSpan","_setDate","_getDefaultDate","_updateDatepicker","_updateAlternate","_dialogDatepicker","browserWidth","browserHeight","scrollX","scrollY","_dialogInst","_dialogInput","_pos","documentElement","clientWidth","clientHeight","blockUI","_destroyDatepicker","$target","_enableDatepicker","_getInst","err","_optionDatepicker","_getDateDatepicker","_getMinMaxDate","_changeDatepicker","_refreshDatepicker","_setDateDatepicker","noDefault","_setDateFromField","_getDate","dateStr","sel","handled","_selectDay","_adjustDate","_clearDate","_gotoToday","stopPropagation","chars","chr","_possibleChars","fromCharCode","charCode","lastVal","parseDate","_getFormatConfig","beforeShowSettings","isFixed","_findPos","_checkOffset","_shouldFocusInput","_generateHTML","_attachHandlers","origyearshtml","numMonths","_getNumberOfMonths","cols","yearshtml","dpWidth","dpHeight","inputWidth","inputHeight","viewWidth","viewHeight","hidden","postProcess","_tidyDialog","unblockUI","_checkExternalClick","period","_adjustInstDate","currentDay","currentMonth","currentYear","getMonth","getFullYear","_notifyChange","_selectMonthYear","selectedIndex","month","year","td","_selectDate","formatDate","noWeekends","day","time","checkDate","format","iFormat","dim","extra","iValue","shortYearCutoffTemp","doy","literal","lookAhead","matches","getNumber","isDoubled","digits","substring","getName","shortNames","longNames","k","pair","substr","checkLiteral","_ticksTo1970","_getDaysInMonth","_daylightSavingAdjust","ATOM","COOKIE","ISO_8601","RFC_822","RFC_850","RFC_1036","RFC_1123","RFC_2822","RSS","TICKS","TIMESTAMP","W3C","formatNumber","formatName","output","getYear","dates","_restrictMinMax","_determineDate","offsetNumeric","offsetString","pattern","newDate","setMinutes","setSeconds","setMilliseconds","getHours","noChange","clear","origMonth","origYear","today","selectDay","getAttribute","selectMonth","selectYear","maxDraw","gotoDate","controls","buttonPanel","dow","row","col","selectedDate","cornerClass","calender","thead","daysInMonth","leadDays","curRows","numRows","printDate","dRow","tbody","daySettings","otherMonth","unselectable","tempDate","isMultiMonth","currentDate","_canAdjustMonth","_isInRange","_generateMonthYearHeader","_getFirstDayOfMonth","ceil","inMinYear","inMaxYear","years","thisYear","determineYear","endYear","monthHtml","onChange","minMax","curYear","curMonth","yearSplit","minYear","maxYear","initialized","otherArgs","sizeRelatedOptions","resizableRelatedOptions","autoOpen","closeOnEscape","dialogClass","modal","using","topOffset","resizable","beforeClose","resizeStart","resizeStop","originalCss","originalTitle","_createWrapper","uiDialog","_createTitlebar","_createButtonPane","_makeDraggable","_makeResizable","_isOpen","_destroyOverlay","detach","opener","_hide","isOpen","moveToTop","_moveToTop","silent","moved","nextAll","_focusTabbable","_size","_position","_createOverlay","_show","hasFocus","uiDialogButtonPane","uiDialogTitlebarClose","_keepFocus","checkFocus","isActive","tabbables","aria-describedby","uiDialogTitle","uiDialogTitlebar","_title","aria-labelledby","uiButtonSet","_createButtons","buttonOptions","showText","filteredUi","_blockFrames","_unblockFrames","resizeHandles","_minHeight","isVisible","resizableOptions","isDraggable","isResizable","nonContentHeight","minContentHeight","maxContentHeight","iframeBlocks","iframe","_allowInteraction","dialog","overlayInstances","overlay","uiBackCompat","myAt","offsetPosition","rvertical","rpositivemotion","blind","vertical","ref","ref2","motion","overflow","upAnim","downAnim","times","anims","queuelen","dequeue","clip","vert","explode","childComplete","pieces","rows","cells","animComplete","visibility","mx","fade","fold","horizFirst","widthFirst","animation1","animation2","highlight","backgroundImage","pulsate","showhide","animateTo","puff","scale","baseline","props0","props1","props2","cProps","vProps","hProps","zero","c_original","toRef","shake","positiveMotion","slide","transfer","targetFixed","fixTop","fixLeft","endPosition","startPosition","submenu","menus","activeMenu","proxy","mousedown .ui-menu-item > a","click .ui-state-disabled > a","click .ui-menu-item:has(a)","timer","mouseenter .ui-menu-item","mouseleave .ui-menu","keepActiveItem","collapseAll","escape","character","skip","regex","previousPage","nextPage","collapse","previousFilter","filterTimer","icon","submenus","submenuCarat","_itemRole","listbox","nested","focused","_scrollIntoView","_startOpening","elementHeight","itemHeight","_hasScroll","fromFocus","_open","all","currentMenu","startMenu","newItem","prevAll","getOffsets","offsets","rpercent","parseCss","property","getDimensions","raw","isWindow","cachedScrollbarWidth","rhorizontal","roffset","rposition","scrollbarWidth","w1","w2","div","innerDiv","getScrollInfo","within","overflowX","overflowY","hasOverflowX","hasOverflowY","getWithinInfo","withinElement","atOffset","targetWidth","targetHeight","targetOffset","basePosition","dimensions","scrollInfo","horizontalOffset","verticalOffset","collisionPosition","elemWidth","elemHeight","collisionWidth","collisionHeight","myOffset","offsetFractions","dir","feedback","horizontal","important","fit","newOverRight","withinOffset","collisionPosLeft","overLeft","overRight","newOverBottom","collisionPosTop","overTop","overBottom","flip","newOverLeft","offsetLeft","newOverTop","offsetTop","flipfit","testElement","testElementParent","testElementStyle","getElementsByTagName","firstChild","innerHTML","oldValue","_constrainedValue","aria-valuemin","valueDiv","_refreshValue","newValue","indeterminate","_percentage","percentage","toFixed","overlayDiv","aria-valuemax","aria-valuenow","numPages","orientation","range","_keySliding","_mouseSliding","_animateOff","_handleIndex","_detectOrientation","_createRange","_createHandles","handleCount","existingHandles","classes","_valueMin","elements","_handleEvents","normValue","closestHandle","allowed","mouseOverHandle","elementSize","_normValueFromMouse","_valueMax","thisDistance","_lastChangedValue","_start","_clickOffset","_slide","_stop","pixelTotal","pixelMouse","percentMouse","valueTotal","valueMouse","_trimAlignValue","uiHash","newVal","otherVal","newValues","vals","_values","valsLength","valModStep","alignValue","lastValPercent","valPercent","valueMin","valueMax","oRange","_set","curVal","modifier","culture","up","incremental","numberFormat","page","spin","_draw","_events","mousewheel","spinning","_spin","mousewheelTimer","mousedown .ui-spinner-button","_repeat","mouseup .ui-spinner-button","mouseenter .ui-spinner-button","mouseleave .ui-spinner-button","uiSpinner","_uiSpinnerHtml","_buttonHtml","steps","_adjustValue","_increment","_precision","precision","_precisionOf","decimal","aboveMin","prevValue","_parse","_format","Globalize","allowAny","stepUp","_stepUp","stepDown","_stepDown","pageUp","pages","pageDown","getNextTabId","tabId","isLocal","anchor","hash","decodeURIComponent","rhash","location","beforeLoad","load","running","_processTabs","_initialActive","unique","tabs","li","anchors","locationHash","tab","_getPanelForTab","_tabKeydown","focusedTab","goingForward","_handlePageNav","activating","_focusNextTab","_panelKeydown","_findNextTab","constrain","lastTabIndex","_setupDisabled","_setupHeightStyle","_tabId","_sanitizeSelector","lis","tablist","panels","_getList","anchorId","originalAriaControls","_createPanel","aria-controls","oldTab","newTab","_getIndex","merge","_ajaxSettings","statusText","jqXHR","status","beforeSend","ajaxSettings","addDescribedBy","describedby","removeDescribedBy","increments","tooltipClass","track","tooltips","_disable","_updateContent","_enable","blurEvent","contentOption","eventType","positionOption","tooltip","delayedShow","_find","_tooltip","mousemove","setInterval","clearInterval","interval","fakeEvent","_removeTooltip","closing"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMMW,EACA,SAASP,EAAQD,EAASH,GAK/B,YE9CD,IAAAY,GAAAZ,EAAA,IACAa,EAAAb,EAAA,EAEe,IAAIY,GAAAE,SAASD,EAAE,cAAe,KFmDvCE,EACA,SAASX,EAAQD,GAKtB,YGtDD,SAAAa,GAAiBC,GAEc,mBAAhBC,QAAW,KAClBA,OAAW,MAMf,KAAK,GAHDC,GAAQF,EAAUG,MAAM,KACxBC,EAAYH,OAAW,GAElBI,EAAE,EAAGA,EAAGH,EAAMI,OAAQD,IAAI,CAC/B,GAAIE,GAAYH,EAAUF,EAAMG,GAER,oBAAbE,KACPH,EAAUF,EAAMG,QAGpBD,EAAYA,EAAUF,EAAMG,IAGhC,MAAOD,GAGXL,EAAQ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,GACA6O,EAAAkrB,MAAAzzB,GAAA,GAIA7J,EAAA,IAAAR,GAAA2O,SAGA5K,EAAAoE,KAAA,sBACApE,EAAAwE,KAAA,QAAAxE,EAAAoE,KAAA,qBACApE,EAAA2F,WAAA,2BAMC9F","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 10/10/2016.\r\n\t */\r\n\t\"use strict\";\r\n\tvar day_range_1 = __webpack_require__(23);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar dayRange = new day_range_1.DayRange($('#day-range'), 10);\r\n\n\n/***/ },\n\n/***/ 1:\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\t/**\r\n\t * create a namespace on the gv object\r\n\t * @param {string} namespace to create\r\n\t * @returns {object} object representing the namespace\r\n\t */\r\n\tfunction provide(namespace) {\r\n\t    \"use strict\";\r\n\t    if (typeof window['gv'] == 'undefined') {\r\n\t        window['gv'] = {};\r\n\t    }\r\n\t    var parts = namespace.split('.');\r\n\t    var nameSpace = window['gv'];\r\n\t    for (var i = 0; i < parts.length; i++) {\r\n\t        var newObject = nameSpace[parts[i]];\r\n\t        if (typeof newObject == 'undefined') {\r\n\t            nameSpace[parts[i]] = {};\r\n\t        }\r\n\t        nameSpace = nameSpace[parts[i]];\r\n\t    }\r\n\t    return nameSpace;\r\n\t}\r\n\tprovide('util');\r\n\twindow['gv'].util.provide = provide;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = provide;\r\n\n\n/***/ },\n\n/***/ 2:\n/***/ function(module, exports) {\n\n\tmodule.exports = $;\n\n/***/ },\n\n/***/ 23:\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar $ = __webpack_require__(2);\r\n\t__webpack_require__(34);\r\n\tvar nm = provide_1.default('domUtil');\r\n\tvar DayRange = (function () {\r\n\t    /**\r\n\t     * constructor for the date range\r\n\t     * @param {number} dayRange number of days\r\n\t     * @param {jQuery|HTMLElement|*} jQueryRef reference to the jquery element\r\n\t     */\r\n\t    function DayRange(jQueryRef, dayRange) {\r\n\t        this._workingDayRange = dayRange - 1;\r\n\t        var pickerHtml = '<label for=\"start-date\" style=\"width: 78px; display: inline-block; margin:5px;\">Start Date</label>' +\r\n\t            '<input type=\"text\" readonly id=\"start-date\" class=\"date-pick\"  style=\"width: 90px;\">' +\r\n\t            '<br><label for=\"end-date\" style=\"width: 78px; display: inline-block;  margin:5px;\">End Date</label>' +\r\n\t            '<input type=\"text\" readonly id=\"end-date\" class=\"date-pick\" style=\"width: 90px;\">';\r\n\t        jQueryRef.append(pickerHtml);\r\n\t        this._$startDate = $('#start-date');\r\n\t        this._$endDate = $('#end-date');\r\n\t        this._$startDate['datepicker']();\r\n\t        this._$endDate['datepicker']();\r\n\t        this._startDate = null;\r\n\t        this._endDate = null;\r\n\t        var dte1 = new Date();\r\n\t        dte1.setHours(0, 0, 0, 0);\r\n\t        var dte2 = new Date(dte1.getTime());\r\n\t        dte2.setDate(dte2.getDate() + dayRange);\r\n\t        dte2.setHours(23, 59, 59, 0);\r\n\t        this._maxDateRange = dte2.getTime() - dte1.getTime();\r\n\t        var _this = this;\r\n\t        //add event listeners\r\n\t        this._$startDate.change(function () {\r\n\t            _this.startDate = this.value;\r\n\t        });\r\n\t        this._$endDate.change(function () {\r\n\t            _this.endDate = this.value;\r\n\t        });\r\n\t        // initialize\r\n\t        this.endDate = new Date();\r\n\t    }\r\n\t    Object.defineProperty(DayRange.prototype, \"startDate\", {\r\n\t        get: function () {\r\n\t            return this._startDate;\r\n\t        },\r\n\t        /**\r\n\t         *\r\n\t         * @param val\r\n\t         */\r\n\t        set: function (val) {\r\n\t            if (typeof val == 'string') {\r\n\t                val = new Date(val);\r\n\t            }\r\n\t            this._startDate = val;\r\n\t            this._startDate.setHours(0, 0, 0, 0);\r\n\t            this._$startDate.val(this._startDate.toLocaleDateString());\r\n\t            if (this.endDate == null ||\r\n\t                this._endDate.getTime() - this._startDate.getTime() > this._maxDateRange ||\r\n\t                this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n\t                var tmpDate = new Date(this._startDate.getTime());\r\n\t                tmpDate.setDate(tmpDate.getDate() + this._workingDayRange);\r\n\t                this.endDate = new Date(tmpDate.getTime());\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(DayRange.prototype, \"endDate\", {\r\n\t        get: function () {\r\n\t            return this._endDate;\r\n\t        },\r\n\t        set: function (val) {\r\n\t            if (typeof val == 'string') {\r\n\t                val = new Date(val);\r\n\t            }\r\n\t            this._endDate = val;\r\n\t            this._endDate.setHours(23, 59, 59, 0);\r\n\t            this._$endDate.val(this._endDate.toLocaleDateString());\r\n\t            if (this._startDate == null || this._endDate.getTime() - this.startDate.getTime() > this._maxDateRange || this._endDate.getTime() - this._startDate.getTime() < 24 * 60 * 60 * 1000) {\r\n\t                var tmpDate = new Date(this._endDate.getTime());\r\n\t                tmpDate.setDate(tmpDate.getDate() - this._workingDayRange);\r\n\t                this.startDate = new Date(tmpDate.getTime());\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return DayRange;\r\n\t}());\r\n\texports.DayRange = DayRange;\r\n\tnm.DayRange = DayRange;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = DayRange;\r\n\n\n/***/ },\n\n/***/ 34:\n/***/ function(module, exports, __webpack_require__) {\n\n\tvar jQuery = __webpack_require__(2);\n\t\n\t/*! jQuery UI - v1.10.3 - 2013-05-03\n\t* http://jqueryui.com\n\t* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js\n\t* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */\n\t(function( $, undefined ) {\n\t\n\tvar uuid = 0,\n\t\truniqueId = /^ui-id-\\d+$/;\n\t\n\t// $.ui might exist from components with no dependencies, e.g., $.ui.position\n\t$.ui = $.ui || {};\n\t\n\t$.extend( $.ui, {\n\t\tversion: \"1.10.3\",\n\t\n\t\tkeyCode: {\n\t\t\tBACKSPACE: 8,\n\t\t\tCOMMA: 188,\n\t\t\tDELETE: 46,\n\t\t\tDOWN: 40,\n\t\t\tEND: 35,\n\t\t\tENTER: 13,\n\t\t\tESCAPE: 27,\n\t\t\tHOME: 36,\n\t\t\tLEFT: 37,\n\t\t\tNUMPAD_ADD: 107,\n\t\t\tNUMPAD_DECIMAL: 110,\n\t\t\tNUMPAD_DIVIDE: 111,\n\t\t\tNUMPAD_ENTER: 108,\n\t\t\tNUMPAD_MULTIPLY: 106,\n\t\t\tNUMPAD_SUBTRACT: 109,\n\t\t\tPAGE_DOWN: 34,\n\t\t\tPAGE_UP: 33,\n\t\t\tPERIOD: 190,\n\t\t\tRIGHT: 39,\n\t\t\tSPACE: 32,\n\t\t\tTAB: 9,\n\t\t\tUP: 38\n\t\t}\n\t});\n\t\n\t// plugins\n\t$.fn.extend({\n\t\tfocus: (function( orig ) {\n\t\t\treturn function( delay, fn ) {\n\t\t\t\treturn typeof delay === \"number\" ?\n\t\t\t\t\tthis.each(function() {\n\t\t\t\t\t\tvar elem = this;\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t$( elem ).focus();\n\t\t\t\t\t\t\tif ( fn ) {\n\t\t\t\t\t\t\t\tfn.call( elem );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, delay );\n\t\t\t\t\t}) :\n\t\t\t\t\torig.apply( this, arguments );\n\t\t\t};\n\t\t})( $.fn.focus ),\n\t\n\t\tscrollParent: function() {\n\t\t\tvar scrollParent;\n\t\t\tif (($.ui.ie && (/(static|relative)/).test(this.css(\"position\"))) || (/absolute/).test(this.css(\"position\"))) {\n\t\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\t\treturn (/(relative|absolute|fixed)/).test($.css(this,\"position\")) && (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t\t}).eq(0);\n\t\t\t} else {\n\t\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\t\treturn (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t\t}).eq(0);\n\t\t\t}\n\t\n\t\t\treturn (/fixed/).test(this.css(\"position\")) || !scrollParent.length ? $(document) : scrollParent;\n\t\t},\n\t\n\t\tzIndex: function( zIndex ) {\n\t\t\tif ( zIndex !== undefined ) {\n\t\t\t\treturn this.css( \"zIndex\", zIndex );\n\t\t\t}\n\t\n\t\t\tif ( this.length ) {\n\t\t\t\tvar elem = $( this[ 0 ] ), position, value;\n\t\t\t\twhile ( elem.length && elem[ 0 ] !== document ) {\n\t\t\t\t\t// Ignore z-index if position is set to a value where z-index is ignored by the browser\n\t\t\t\t\t// This makes behavior of this function consistent across browsers\n\t\t\t\t\t// WebKit always returns auto if the element is positioned\n\t\t\t\t\tposition = elem.css( \"position\" );\n\t\t\t\t\tif ( position === \"absolute\" || position === \"relative\" || position === \"fixed\" ) {\n\t\t\t\t\t\t// IE returns 0 when zIndex is not specified\n\t\t\t\t\t\t// other browsers return a string\n\t\t\t\t\t\t// we ignore the case of nested elements with an explicit value of 0\n\t\t\t\t\t\t// <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n\t\t\t\t\t\tvalue = parseInt( elem.css( \"zIndex\" ), 10 );\n\t\t\t\t\t\tif ( !isNaN( value ) && value !== 0 ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telem = elem.parent();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn 0;\n\t\t},\n\t\n\t\tuniqueId: function() {\n\t\t\treturn this.each(function() {\n\t\t\t\tif ( !this.id ) {\n\t\t\t\t\tthis.id = \"ui-id-\" + (++uuid);\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\tremoveUniqueId: function() {\n\t\t\treturn this.each(function() {\n\t\t\t\tif ( runiqueId.test( this.id ) ) {\n\t\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t\n\t// selectors\n\tfunction focusable( element, isTabIndexNotNaN ) {\n\t\tvar map, mapName, img,\n\t\t\tnodeName = element.nodeName.toLowerCase();\n\t\tif ( \"area\" === nodeName ) {\n\t\t\tmap = element.parentNode;\n\t\t\tmapName = map.name;\n\t\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\timg = $( \"img[usemap=#\" + mapName + \"]\" )[0];\n\t\t\treturn !!img && visible( img );\n\t\t}\n\t\treturn ( /input|select|textarea|button|object/.test( nodeName ) ?\n\t\t\t!element.disabled :\n\t\t\t\"a\" === nodeName ?\n\t\t\t\telement.href || isTabIndexNotNaN :\n\t\t\t\tisTabIndexNotNaN) &&\n\t\t\t// the element and all of its ancestors must be visible\n\t\t\tvisible( element );\n\t}\n\t\n\tfunction visible( element ) {\n\t\treturn $.expr.filters.visible( element ) &&\n\t\t\t!$( element ).parents().addBack().filter(function() {\n\t\t\t\treturn $.css( this, \"visibility\" ) === \"hidden\";\n\t\t\t}).length;\n\t}\n\t\n\t$.extend( $.expr[ \":\" ], {\n\t\tdata: $.expr.createPseudo ?\n\t\t\t$.expr.createPseudo(function( dataName ) {\n\t\t\t\treturn function( elem ) {\n\t\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t\t};\n\t\t\t}) :\n\t\t\t// support: jQuery <1.8\n\t\t\tfunction( elem, i, match ) {\n\t\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t\t},\n\t\n\t\tfocusable: function( element ) {\n\t\t\treturn focusable( element, !isNaN( $.attr( element, \"tabindex\" ) ) );\n\t\t},\n\t\n\t\ttabbable: function( element ) {\n\t\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\t\tisTabIndexNaN = isNaN( tabIndex );\n\t\t\treturn ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );\n\t\t}\n\t});\n\t\n\t// support: jQuery <1.8\n\tif ( !$( \"<a>\" ).outerWidth( 1 ).jquery ) {\n\t\t$.each( [ \"Width\", \"Height\" ], function( i, name ) {\n\t\t\tvar side = name === \"Width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ],\n\t\t\t\ttype = name.toLowerCase(),\n\t\t\t\torig = {\n\t\t\t\t\tinnerWidth: $.fn.innerWidth,\n\t\t\t\t\tinnerHeight: $.fn.innerHeight,\n\t\t\t\t\touterWidth: $.fn.outerWidth,\n\t\t\t\t\touterHeight: $.fn.outerHeight\n\t\t\t\t};\n\t\n\t\t\tfunction reduce( elem, size, border, margin ) {\n\t\t\t\t$.each( side, function() {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"padding\" + this ) ) || 0;\n\t\t\t\t\tif ( border ) {\n\t\t\t\t\t\tsize -= parseFloat( $.css( elem, \"border\" + this + \"Width\" ) ) || 0;\n\t\t\t\t\t}\n\t\t\t\t\tif ( margin ) {\n\t\t\t\t\t\tsize -= parseFloat( $.css( elem, \"margin\" + this ) ) || 0;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn size;\n\t\t\t}\n\t\n\t\t\t$.fn[ \"inner\" + name ] = function( size ) {\n\t\t\t\tif ( size === undefined ) {\n\t\t\t\t\treturn orig[ \"inner\" + name ].call( this );\n\t\t\t\t}\n\t\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\t$( this ).css( type, reduce( this, size ) + \"px\" );\n\t\t\t\t});\n\t\t\t};\n\t\n\t\t\t$.fn[ \"outer\" + name] = function( size, margin ) {\n\t\t\t\tif ( typeof size !== \"number\" ) {\n\t\t\t\t\treturn orig[ \"outer\" + name ].call( this, size );\n\t\t\t\t}\n\t\n\t\t\t\treturn this.each(function() {\n\t\t\t\t\t$( this).css( type, reduce( this, size, true, margin ) + \"px\" );\n\t\t\t\t});\n\t\t\t};\n\t\t});\n\t}\n\t\n\t// support: jQuery <1.8\n\tif ( !$.fn.addBack ) {\n\t\t$.fn.addBack = function( selector ) {\n\t\t\treturn this.add( selector == null ?\n\t\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t\t);\n\t\t};\n\t}\n\t\n\t// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)\n\tif ( $( \"<a>\" ).data( \"a-b\", \"a\" ).removeData( \"a-b\" ).data( \"a-b\" ) ) {\n\t\t$.fn.removeData = (function( removeData ) {\n\t\t\treturn function( key ) {\n\t\t\t\tif ( arguments.length ) {\n\t\t\t\t\treturn removeData.call( this, $.camelCase( key ) );\n\t\t\t\t} else {\n\t\t\t\t\treturn removeData.call( this );\n\t\t\t\t}\n\t\t\t};\n\t\t})( $.fn.removeData );\n\t}\n\t\n\t\n\t\n\t\n\t\n\t// deprecated\n\t$.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n\t\n\t$.support.selectstart = \"onselectstart\" in document.createElement( \"div\" );\n\t$.fn.extend({\n\t\tdisableSelection: function() {\n\t\t\treturn this.bind( ( $.support.selectstart ? \"selectstart\" : \"mousedown\" ) +\n\t\t\t\t\".ui-disableSelection\", function( event ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t});\n\t\t},\n\t\n\t\tenableSelection: function() {\n\t\t\treturn this.unbind( \".ui-disableSelection\" );\n\t\t}\n\t});\n\t\n\t$.extend( $.ui, {\n\t\t// $.ui.plugin is deprecated. Use $.widget() extensions instead.\n\t\tplugin: {\n\t\t\tadd: function( module, option, set ) {\n\t\t\t\tvar i,\n\t\t\t\t\tproto = $.ui[ module ].prototype;\n\t\t\t\tfor ( i in set ) {\n\t\t\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t\t\t}\n\t\t\t},\n\t\t\tcall: function( instance, name, args ) {\n\t\t\t\tvar i,\n\t\t\t\t\tset = instance.plugins[ name ];\n\t\t\t\tif ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t// only used by resizable\n\t\thasScroll: function( el, a ) {\n\t\n\t\t\t//If overflow is hidden, the element might have extra content, but the user wants to hide it\n\t\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\") {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\t\thas = false;\n\t\n\t\t\tif ( el[ scroll ] > 0 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\n\t\t\t// TODO: determine which cases actually cause this to happen\n\t\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t\t// set the scroll\n\t\t\tel[ scroll ] = 1;\n\t\t\thas = ( el[ scroll ] > 0 );\n\t\t\tel[ scroll ] = 0;\n\t\t\treturn has;\n\t\t}\n\t});\n\t\n\t})( jQuery );\n\t\n\t(function( $, undefined ) {\n\t\n\tvar uuid = 0,\n\t\tslice = Array.prototype.slice,\n\t\t_cleanData = $.cleanData;\n\t$.cleanData = function( elems ) {\n\t\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\t\ttry {\n\t\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t\t// http://bugs.jquery.com/ticket/8235\n\t\t\t} catch( e ) {}\n\t\t}\n\t\t_cleanData( elems );\n\t};\n\t\n\t$.widget = function( name, base, prototype ) {\n\t\tvar fullName, existingConstructor, constructor, basePrototype,\n\t\t\t// proxiedPrototype allows the provided prototype to remain unmodified\n\t\t\t// so that it can be used as a mixin for multiple widgets (#8876)\n\t\t\tproxiedPrototype = {},\n\t\t\tnamespace = name.split( \".\" )[ 0 ];\n\t\n\t\tname = name.split( \".\" )[ 1 ];\n\t\tfullName = namespace + \"-\" + name;\n\t\n\t\tif ( !prototype ) {\n\t\t\tprototype = base;\n\t\t\tbase = $.Widget;\n\t\t}\n\t\n\t\t// create selector for plugin\n\t\t$.expr[ \":\" ][ fullName.toLowerCase() ] = function( elem ) {\n\t\t\treturn !!$.data( elem, fullName );\n\t\t};\n\t\n\t\t$[ namespace ] = $[ namespace ] || {};\n\t\texistingConstructor = $[ namespace ][ name ];\n\t\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\t\t\t// allow instantiation without \"new\" keyword\n\t\t\tif ( !this._createWidget ) {\n\t\t\t\treturn new constructor( options, element );\n\t\t\t}\n\t\n\t\t\t// allow instantiation without initializing for simple inheritance\n\t\t\t// must use \"new\" keyword (the code above always passes args)\n\t\t\tif ( arguments.length ) {\n\t\t\t\tthis._createWidget( options, element );\n\t\t\t}\n\t\t};\n\t\t// extend with the existing constructor to carry over any static properties\n\t\t$.extend( constructor, existingConstructor, {\n\t\t\tversion: prototype.version,\n\t\t\t// copy the object used to create the prototype in case we need to\n\t\t\t// redefine the widget later\n\t\t\t_proto: $.extend( {}, prototype ),\n\t\t\t// track widgets that inherit from this widget in case this widget is\n\t\t\t// redefined after a widget inherits from it\n\t\t\t_childConstructors: []\n\t\t});\n\t\n\t\tbasePrototype = new base();\n\t\t// we need to make the options hash a property directly on the new instance\n\t\t// otherwise we'll modify the options hash on the prototype that we're\n\t\t// inheriting from\n\t\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t\t$.each( prototype, function( prop, value ) {\n\t\t\tif ( !$.isFunction( value ) ) {\n\t\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tproxiedPrototype[ prop ] = (function() {\n\t\t\t\tvar _super = function() {\n\t\t\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t\t\t},\n\t\t\t\t\t_superApply = function( args ) {\n\t\t\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t\t\t};\n\t\t\t\treturn function() {\n\t\t\t\t\tvar __super = this._super,\n\t\t\t\t\t\t__superApply = this._superApply,\n\t\t\t\t\t\treturnValue;\n\t\n\t\t\t\t\tthis._super = _super;\n\t\t\t\t\tthis._superApply = _superApply;\n\t\n\t\t\t\t\treturnValue = value.apply( this, arguments );\n\t\n\t\t\t\t\tthis._super = __super;\n\t\t\t\t\tthis._superApply = __superApply;\n\t\n\t\t\t\t\treturn returnValue;\n\t\t\t\t};\n\t\t\t})();\n\t\t});\n\t\tconstructor.prototype = $.widget.extend( basePrototype, {\n\t\t\t// TODO: remove support for widgetEventPrefix\n\t\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t\t// don't prefix for widgets that aren't DOM-based\n\t\t\twidgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name\n\t\t}, proxiedPrototype, {\n\t\t\tconstructor: constructor,\n\t\t\tnamespace: namespace,\n\t\t\twidgetName: name,\n\t\t\twidgetFullName: fullName\n\t\t});\n\t\n\t\t// If this widget is being redefined then we need to find all widgets that\n\t\t// are inheriting from it and redefine all of them so that they inherit from\n\t\t// the new version of this widget. We're essentially trying to replace one\n\t\t// level in the prototype chain.\n\t\tif ( existingConstructor ) {\n\t\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\t\tvar childPrototype = child.prototype;\n\t\n\t\t\t\t// redefine the child widget using the same prototype that was\n\t\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor, child._proto );\n\t\t\t});\n\t\t\t// remove the list of existing child constructors from the old constructor\n\t\t\t// so the old child constructors can be garbage collected\n\t\t\tdelete existingConstructor._childConstructors;\n\t\t} else {\n\t\t\tbase._childConstructors.push( constructor );\n\t\t}\n\t\n\t\t$.widget.bridge( name, constructor );\n\t};\n\t\n\t$.widget.extend = function( target ) {\n\t\tvar input = slice.call( arguments, 1 ),\n\t\t\tinputIndex = 0,\n\t\t\tinputLength = input.length,\n\t\t\tkey,\n\t\t\tvalue;\n\t\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\t\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\n\t\t\t\t\t// Clone objects\n\t\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\t\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t\t$.widget.extend( {}, value );\n\t\t\t\t\t// Copy everything else by reference\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn target;\n\t};\n\t\n\t$.widget.bridge = function( name, object ) {\n\t\tvar fullName = object.prototype.widgetFullName || name;\n\t\t$.fn[ name ] = function( options ) {\n\t\t\tvar isMethodCall = typeof options === \"string\",\n\t\t\t\targs = slice.call( arguments, 1 ),\n\t\t\t\treturnValue = this;\n\t\n\t\t\t// allow multiple hashes to be passed on init\n\t\t\toptions = !isMethodCall && args.length ?\n\t\t\t\t$.widget.extend.apply( null, [ options ].concat(args) ) :\n\t\t\t\toptions;\n\t\n\t\t\tif ( isMethodCall ) {\n\t\t\t\tthis.each(function() {\n\t\t\t\t\tvar methodValue,\n\t\t\t\t\t\tinstance = $.data( this, fullName );\n\t\t\t\t\tif ( !instance ) {\n\t\t\t\t\t\treturn $.error( \"cannot call methods on \" + name + \" prior to initialization; \" +\n\t\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t\t}\n\t\t\t\t\tif ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name + \" widget instance\" );\n\t\t\t\t\t}\n\t\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\t\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\t\tmethodValue;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.each(function() {\n\t\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\t\tif ( instance ) {\n\t\t\t\t\t\tinstance.option( options || {} )._init();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\treturn returnValue;\n\t\t};\n\t};\n\t\n\t$.Widget = function( /* options, element */ ) {};\n\t$.Widget._childConstructors = [];\n\t\n\t$.Widget.prototype = {\n\t\twidgetName: \"widget\",\n\t\twidgetEventPrefix: \"\",\n\t\tdefaultElement: \"<div>\",\n\t\toptions: {\n\t\t\tdisabled: false,\n\t\n\t\t\t// callbacks\n\t\t\tcreate: null\n\t\t},\n\t\t_createWidget: function( options, element ) {\n\t\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\t\tthis.element = $( element );\n\t\t\tthis.uuid = uuid++;\n\t\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\t\t\tthis.options = $.widget.extend( {},\n\t\t\t\tthis.options,\n\t\t\t\tthis._getCreateOptions(),\n\t\t\t\toptions );\n\t\n\t\t\tthis.bindings = $();\n\t\t\tthis.hoverable = $();\n\t\t\tthis.focusable = $();\n\t\n\t\t\tif ( element !== this ) {\n\t\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\t\tthis._on( true, this.element, {\n\t\t\t\t\tremove: function( event ) {\n\t\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tthis.document = $( element.style ?\n\t\t\t\t\t// element within the document\n\t\t\t\t\telement.ownerDocument :\n\t\t\t\t\t// element is window or document\n\t\t\t\t\telement.document || element );\n\t\t\t\tthis.window = $( this.document[0].defaultView || this.document[0].parentWindow );\n\t\t\t}\n\t\n\t\t\tthis._create();\n\t\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\t\tthis._init();\n\t\t},\n\t\t_getCreateOptions: $.noop,\n\t\t_getCreateEventData: $.noop,\n\t\t_create: $.noop,\n\t\t_init: $.noop,\n\t\n\t\tdestroy: function() {\n\t\t\tthis._destroy();\n\t\t\t// we can probably remove the unbind calls in 2.0\n\t\t\t// all event bindings should go through this._on()\n\t\t\tthis.element\n\t\t\t\t.unbind( this.eventNamespace )\n\t\t\t\t// 1.9 BC for #7810\n\t\t\t\t// TODO remove dual storage\n\t\t\t\t.removeData( this.widgetName )\n\t\t\t\t.removeData( this.widgetFullName )\n\t\t\t\t// support: jquery <1.6.3\n\t\t\t\t// http://bugs.jquery.com/ticket/9413\n\t\t\t\t.removeData( $.camelCase( this.widgetFullName ) );\n\t\t\tthis.widget()\n\t\t\t\t.unbind( this.eventNamespace )\n\t\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t\t.removeClass(\n\t\t\t\t\tthis.widgetFullName + \"-disabled \" +\n\t\t\t\t\t\"ui-state-disabled\" );\n\t\n\t\t\t// clean up events and states\n\t\t\tthis.bindings.unbind( this.eventNamespace );\n\t\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t\t},\n\t\t_destroy: $.noop,\n\t\n\t\twidget: function() {\n\t\t\treturn this.element;\n\t\t},\n\t\n\t\toption: function( key, value ) {\n\t\t\tvar options = key,\n\t\t\t\tparts,\n\t\t\t\tcurOption,\n\t\t\t\ti;\n\t\n\t\t\tif ( arguments.length === 0 ) {\n\t\t\t\t// don't return a reference to the internal hash\n\t\t\t\treturn $.widget.extend( {}, this.options );\n\t\t\t}\n\t\n\t\t\tif ( typeof key === \"string\" ) {\n\t\t\t\t// handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\t\toptions = {};\n\t\t\t\tparts = key.split( \".\" );\n\t\t\t\tkey = parts.shift();\n\t\t\t\tif ( parts.length ) {\n\t\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t\t}\n\t\t\t\t\tkey = parts.pop();\n\t\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t\t}\n\t\t\t\t\tcurOption[ key ] = value;\n\t\t\t\t} else {\n\t\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t\t}\n\t\t\t\t\toptions[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tthis._setOptions( options );\n\t\n\t\t\treturn this;\n\t\t},\n\t\t_setOptions: function( options ) {\n\t\t\tvar key;\n\t\n\t\t\tfor ( key in options ) {\n\t\t\t\tthis._setOption( key, options[ key ] );\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\t},\n\t\t_setOption: function( key, value ) {\n\t\t\tthis.options[ key ] = value;\n\t\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\tthis.widget()\n\t\t\t\t\t.toggleClass( this.widgetFullName + \"-disabled ui-state-disabled\", !!value )\n\t\t\t\t\t.attr( \"aria-disabled\", value );\n\t\t\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\t},\n\t\n\t\tenable: function() {\n\t\t\treturn this._setOption( \"disabled\", false );\n\t\t},\n\t\tdisable: function() {\n\t\t\treturn this._setOption( \"disabled\", true );\n\t\t},\n\t\n\t\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\t\tvar delegateElement,\n\t\t\t\tinstance = this;\n\t\n\t\t\t// no suppressDisabledCheck flag, shuffle arguments\n\t\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\t\thandlers = element;\n\t\t\t\telement = suppressDisabledCheck;\n\t\t\t\tsuppressDisabledCheck = false;\n\t\t\t}\n\t\n\t\t\t// no element argument, shuffle and use this.element\n\t\t\tif ( !handlers ) {\n\t\t\t\thandlers = element;\n\t\t\t\telement = this.element;\n\t\t\t\tdelegateElement = this.widget();\n\t\t\t} else {\n\t\t\t\t// accept selectors, DOM elements\n\t\t\t\telement = delegateElement = $( element );\n\t\t\t\tthis.bindings = this.bindings.add( element );\n\t\t\t}\n\t\n\t\t\t$.each( handlers, function( event, handler ) {\n\t\t\t\tfunction handlerProxy() {\n\t\t\t\t\t// allow widgets to customize the disabled handling\n\t\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t\t.apply( instance, arguments );\n\t\t\t\t}\n\t\n\t\t\t\t// copy the guid so direct unbinding works\n\t\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t\t}\n\t\n\t\t\t\tvar match = event.match( /^(\\w+)\\s*(.*)$/ ),\n\t\t\t\t\teventName = match[1] + instance.eventNamespace,\n\t\t\t\t\tselector = match[2];\n\t\t\t\tif ( selector ) {\n\t\t\t\t\tdelegateElement.delegate( selector, eventName, handlerProxy );\n\t\t\t\t} else {\n\t\t\t\t\telement.bind( eventName, handlerProxy );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_off: function( element, eventName ) {\n\t\t\teventName = (eventName || \"\").split( \" \" ).join( this.eventNamespace + \" \" ) + this.eventNamespace;\n\t\t\telement.unbind( eventName ).undelegate( eventName );\n\t\t},\n\t\n\t\t_delay: function( handler, delay ) {\n\t\t\tfunction handlerProxy() {\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\t\t\tvar instance = this;\n\t\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t\t},\n\t\n\t\t_hoverable: function( element ) {\n\t\t\tthis.hoverable = this.hoverable.add( element );\n\t\t\tthis._on( element, {\n\t\t\t\tmouseenter: function( event ) {\n\t\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-hover\" );\n\t\t\t\t},\n\t\t\t\tmouseleave: function( event ) {\n\t\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-hover\" );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_focusable: function( element ) {\n\t\t\tthis.focusable = this.focusable.add( element );\n\t\t\tthis._on( element, {\n\t\t\t\tfocusin: function( event ) {\n\t\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-focus\" );\n\t\t\t\t},\n\t\t\t\tfocusout: function( event ) {\n\t\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-focus\" );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_trigger: function( type, event, data ) {\n\t\t\tvar prop, orig,\n\t\t\t\tcallback = this.options[ type ];\n\t\n\t\t\tdata = data || {};\n\t\t\tevent = $.Event( event );\n\t\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\t\ttype :\n\t\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\t\t\t// the original event may come from any element\n\t\t\t// so we need to reset the target on the new event\n\t\t\tevent.target = this.element[ 0 ];\n\t\n\t\t\t// copy original event properties over to the new event\n\t\t\torig = event.originalEvent;\n\t\t\tif ( orig ) {\n\t\t\t\tfor ( prop in orig ) {\n\t\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tthis.element.trigger( event, data );\n\t\t\treturn !( $.isFunction( callback ) &&\n\t\t\t\tcallback.apply( this.element[0], [ event ].concat( data ) ) === false ||\n\t\t\t\tevent.isDefaultPrevented() );\n\t\t}\n\t};\n\t\n\t$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\t\tif ( typeof options === \"string\" ) {\n\t\t\t\toptions = { effect: options };\n\t\t\t}\n\t\t\tvar hasOptions,\n\t\t\t\teffectName = !options ?\n\t\t\t\t\tmethod :\n\t\t\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\t\t\tdefaultEffect :\n\t\t\t\t\t\toptions.effect || defaultEffect;\n\t\t\toptions = options || {};\n\t\t\tif ( typeof options === \"number\" ) {\n\t\t\t\toptions = { duration: options };\n\t\t\t}\n\t\t\thasOptions = !$.isEmptyObject( options );\n\t\t\toptions.complete = callback;\n\t\t\tif ( options.delay ) {\n\t\t\t\telement.delay( options.delay );\n\t\t\t}\n\t\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\t\telement[ method ]( options );\n\t\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t\t} else {\n\t\t\t\telement.queue(function( next ) {\n\t\t\t\t\t$( this )[ method ]();\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t\t}\n\t\t\t\t\tnext();\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\t});\n\t\n\t})( jQuery );\n\t\n\t(function( $, undefined ) {\n\t\n\tvar mouseHandled = false;\n\t$( document ).mouseup( function() {\n\t\tmouseHandled = false;\n\t});\n\t\n\t$.widget(\"ui.mouse\", {\n\t\tversion: \"1.10.3\",\n\t\toptions: {\n\t\t\tcancel: \"input,textarea,button,select,option\",\n\t\t\tdistance: 1,\n\t\t\tdelay: 0\n\t\t},\n\t\t_mouseInit: function() {\n\t\t\tvar that = this;\n\t\n\t\t\tthis.element\n\t\t\t\t.bind(\"mousedown.\"+this.widgetName, function(event) {\n\t\t\t\t\treturn that._mouseDown(event);\n\t\t\t\t})\n\t\t\t\t.bind(\"click.\"+this.widgetName, function(event) {\n\t\t\t\t\tif (true === $.data(event.target, that.widgetName + \".preventClickEvent\")) {\n\t\t\t\t\t\t$.removeData(event.target, that.widgetName + \".preventClickEvent\");\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\n\t\t\tthis.started = false;\n\t\t},\n\t\n\t\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t\t// other instances of mouse\n\t\t_mouseDestroy: function() {\n\t\t\tthis.element.unbind(\".\"+this.widgetName);\n\t\t\tif ( this._mouseMoveDelegate ) {\n\t\t\t\t$(document)\n\t\t\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\t\t\t}\n\t\t},\n\t\n\t\t_mouseDown: function(event) {\n\t\t\t// don't let more than one widget handle mouseStart\n\t\t\tif( mouseHandled ) { return; }\n\t\n\t\t\t// we may have missed mouseup (out of window)\n\t\t\t(this._mouseStarted && this._mouseUp(event));\n\t\n\t\t\tthis._mouseDownEvent = event;\n\t\n\t\t\tvar that = this,\n\t\t\t\tbtnIsLeft = (event.which === 1),\n\t\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t\t// disabled inputs (#7620)\n\t\t\t\telIsCancel = (typeof this.options.cancel === \"string\" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);\n\t\t\tif (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\n\t\t\tthis.mouseDelayMet = !this.options.delay;\n\t\t\tif (!this.mouseDelayMet) {\n\t\t\t\tthis._mouseDelayTimer = setTimeout(function() {\n\t\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t\t}, this.options.delay);\n\t\t\t}\n\t\n\t\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\t\tthis._mouseStarted = (this._mouseStart(event) !== false);\n\t\t\t\tif (!this._mouseStarted) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// Click event may never have fired (Gecko & Opera)\n\t\t\tif (true === $.data(event.target, this.widgetName + \".preventClickEvent\")) {\n\t\t\t\t$.removeData(event.target, this.widgetName + \".preventClickEvent\");\n\t\t\t}\n\t\n\t\t\t// these delegates are required to keep context\n\t\t\tthis._mouseMoveDelegate = function(event) {\n\t\t\t\treturn that._mouseMove(event);\n\t\t\t};\n\t\t\tthis._mouseUpDelegate = function(event) {\n\t\t\t\treturn that._mouseUp(event);\n\t\t\t};\n\t\t\t$(document)\n\t\t\t\t.bind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t\t.bind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\t\n\t\t\tevent.preventDefault();\n\t\n\t\t\tmouseHandled = true;\n\t\t\treturn true;\n\t\t},\n\t\n\t\t_mouseMove: function(event) {\n\t\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\t\tif ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {\n\t\t\t\treturn this._mouseUp(event);\n\t\t\t}\n\t\n\t\t\tif (this._mouseStarted) {\n\t\t\t\tthis._mouseDrag(event);\n\t\t\t\treturn event.preventDefault();\n\t\t\t}\n\t\n\t\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\t\tthis._mouseStarted =\n\t\t\t\t\t(this._mouseStart(this._mouseDownEvent, event) !== false);\n\t\t\t\t(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));\n\t\t\t}\n\t\n\t\t\treturn !this._mouseStarted;\n\t\t},\n\t\n\t\t_mouseUp: function(event) {\n\t\t\t$(document)\n\t\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\t\n\t\t\tif (this._mouseStarted) {\n\t\t\t\tthis._mouseStarted = false;\n\t\n\t\t\t\tif (event.target === this._mouseDownEvent.target) {\n\t\t\t\t\t$.data(event.target, this.widgetName + \".preventClickEvent\", true);\n\t\t\t\t}\n\t\n\t\t\t\tthis._mouseStop(event);\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_mouseDistanceMet: function(event) {\n\t\t\treturn (Math.max(\n\t\t\t\t\tMath.abs(this._mouseDownEvent.pageX - event.pageX),\n\t\t\t\t\tMath.abs(this._mouseDownEvent.pageY - event.pageY)\n\t\t\t\t) >= this.options.distance\n\t\t\t);\n\t\t},\n\t\n\t\t_mouseDelayMet: function(/* event */) {\n\t\t\treturn this.mouseDelayMet;\n\t\t},\n\t\n\t\t// These are placeholder methods, to be overriden by extending plugin\n\t\t_mouseStart: function(/* event */) {},\n\t\t_mouseDrag: function(/* event */) {},\n\t\t_mouseStop: function(/* event */) {},\n\t\t_mouseCapture: function(/* event */) { return true; }\n\t});\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.widget(\"ui.draggable\", $.ui.mouse, {\n\t\tversion: \"1.10.3\",\n\t\twidgetEventPrefix: \"drag\",\n\t\toptions: {\n\t\t\taddClasses: true,\n\t\t\tappendTo: \"parent\",\n\t\t\taxis: false,\n\t\t\tconnectToSortable: false,\n\t\t\tcontainment: false,\n\t\t\tcursor: \"auto\",\n\t\t\tcursorAt: false,\n\t\t\tgrid: false,\n\t\t\thandle: false,\n\t\t\thelper: \"original\",\n\t\t\tiframeFix: false,\n\t\t\topacity: false,\n\t\t\trefreshPositions: false,\n\t\t\trevert: false,\n\t\t\trevertDuration: 500,\n\t\t\tscope: \"default\",\n\t\t\tscroll: true,\n\t\t\tscrollSensitivity: 20,\n\t\t\tscrollSpeed: 20,\n\t\t\tsnap: false,\n\t\t\tsnapMode: \"both\",\n\t\t\tsnapTolerance: 20,\n\t\t\tstack: false,\n\t\t\tzIndex: false,\n\t\n\t\t\t// callbacks\n\t\t\tdrag: null,\n\t\t\tstart: null,\n\t\t\tstop: null\n\t\t},\n\t\t_create: function() {\n\t\n\t\t\tif (this.options.helper === \"original\" && !(/^(?:r|a|f)/).test(this.element.css(\"position\"))) {\n\t\t\t\tthis.element[0].style.position = \"relative\";\n\t\t\t}\n\t\t\tif (this.options.addClasses){\n\t\t\t\tthis.element.addClass(\"ui-draggable\");\n\t\t\t}\n\t\t\tif (this.options.disabled){\n\t\t\t\tthis.element.addClass(\"ui-draggable-disabled\");\n\t\t\t}\n\t\n\t\t\tthis._mouseInit();\n\t\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.element.removeClass( \"ui-draggable ui-draggable-dragging ui-draggable-disabled\" );\n\t\t\tthis._mouseDestroy();\n\t\t},\n\t\n\t\t_mouseCapture: function(event) {\n\t\n\t\t\tvar o = this.options;\n\t\n\t\t\t// among others, prevent a drag on a resizable-handle\n\t\t\tif (this.helper || o.disabled || $(event.target).closest(\".ui-resizable-handle\").length > 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t//Quit if we're not on a valid handle\n\t\t\tthis.handle = this._getHandle(event);\n\t\t\tif (!this.handle) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t$(o.iframeFix === true ? \"iframe\" : o.iframeFix).each(function() {\n\t\t\t\t$(\"<div class='ui-draggable-iframeFix' style='background: #fff;'></div>\")\n\t\t\t\t.css({\n\t\t\t\t\twidth: this.offsetWidth+\"px\", height: this.offsetHeight+\"px\",\n\t\t\t\t\tposition: \"absolute\", opacity: \"0.001\", zIndex: 1000\n\t\t\t\t})\n\t\t\t\t.css($(this).offset())\n\t\t\t\t.appendTo(\"body\");\n\t\t\t});\n\t\n\t\t\treturn true;\n\t\n\t\t},\n\t\n\t\t_mouseStart: function(event) {\n\t\n\t\t\tvar o = this.options;\n\t\n\t\t\t//Create and append the visible helper\n\t\t\tthis.helper = this._createHelper(event);\n\t\n\t\t\tthis.helper.addClass(\"ui-draggable-dragging\");\n\t\n\t\t\t//Cache the helper size\n\t\t\tthis._cacheHelperProportions();\n\t\n\t\t\t//If ddmanager is used for droppables, set the global draggable\n\t\t\tif($.ui.ddmanager) {\n\t\t\t\t$.ui.ddmanager.current = this;\n\t\t\t}\n\t\n\t\t\t/*\n\t\t\t * - Position generation -\n\t\t\t * This block generates everything position related - it's the core of draggables.\n\t\t\t */\n\t\n\t\t\t//Cache the margins of the original element\n\t\t\tthis._cacheMargins();\n\t\n\t\t\t//Store the helper's css position\n\t\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\t\tthis.scrollParent = this.helper.scrollParent();\n\t\t\tthis.offsetParent = this.helper.offsetParent();\n\t\t\tthis.offsetParentCssPosition = this.offsetParent.css( \"position\" );\n\t\n\t\t\t//The element's absolute position on the page minus margins\n\t\t\tthis.offset = this.positionAbs = this.element.offset();\n\t\t\tthis.offset = {\n\t\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\t\tleft: this.offset.left - this.margins.left\n\t\t\t};\n\t\n\t\t\t//Reset scroll cache\n\t\t\tthis.offset.scroll = false;\n\t\n\t\t\t$.extend(this.offset, {\n\t\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t\t},\n\t\t\t\tparent: this._getParentOffset(),\n\t\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t\t});\n\t\n\t\t\t//Generate the original position\n\t\t\tthis.originalPosition = this.position = this._generatePosition(event);\n\t\t\tthis.originalPageX = event.pageX;\n\t\t\tthis.originalPageY = event.pageY;\n\t\n\t\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\t\n\t\t\t//Set a containment if given in the options\n\t\t\tthis._setContainment();\n\t\n\t\t\t//Trigger event + callbacks\n\t\t\tif(this._trigger(\"start\", event) === false) {\n\t\t\t\tthis._clear();\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t//Recache the helper size\n\t\t\tthis._cacheHelperProportions();\n\t\n\t\t\t//Prepare the droppable offsets\n\t\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t\t}\n\t\n\t\n\t\t\tthis._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\t\n\t\t\t//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)\n\t\t\tif ( $.ui.ddmanager ) {\n\t\t\t\t$.ui.ddmanager.dragStart(this, event);\n\t\t\t}\n\t\n\t\t\treturn true;\n\t\t},\n\t\n\t\t_mouseDrag: function(event, noPropagation) {\n\t\t\t// reset any necessary cached properties (see #5009)\n\t\t\tif ( this.offsetParentCssPosition === \"fixed\" ) {\n\t\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t\t}\n\t\n\t\t\t//Compute the helpers position\n\t\t\tthis.position = this._generatePosition(event);\n\t\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\t\n\t\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\t\tif (!noPropagation) {\n\t\t\t\tvar ui = this._uiHash();\n\t\t\t\tif(this._trigger(\"drag\", event, ui) === false) {\n\t\t\t\t\tthis._mouseUp({});\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tthis.position = ui.position;\n\t\t\t}\n\t\n\t\t\tif(!this.options.axis || this.options.axis !== \"y\") {\n\t\t\t\tthis.helper[0].style.left = this.position.left+\"px\";\n\t\t\t}\n\t\t\tif(!this.options.axis || this.options.axis !== \"x\") {\n\t\t\t\tthis.helper[0].style.top = this.position.top+\"px\";\n\t\t\t}\n\t\t\tif($.ui.ddmanager) {\n\t\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_mouseStop: function(event) {\n\t\n\t\t\t//If we are using droppables, inform the manager about the drop\n\t\t\tvar that = this,\n\t\t\t\tdropped = false;\n\t\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\t\tdropped = $.ui.ddmanager.drop(this, event);\n\t\t\t}\n\t\n\t\t\t//if a drop comes from outside (a sortable)\n\t\t\tif(this.dropped) {\n\t\t\t\tdropped = this.dropped;\n\t\t\t\tthis.dropped = false;\n\t\t\t}\n\t\n\t\t\t//if the original element is no longer in the DOM don't bother to continue (see #8269)\n\t\t\tif ( this.options.helper === \"original\" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tif((this.options.revert === \"invalid\" && !dropped) || (this.options.revert === \"valid\" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {\n\t\t\t\t$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {\n\t\t\t\t\tif(that._trigger(\"stop\", event) !== false) {\n\t\t\t\t\t\tthat._clear();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif(this._trigger(\"stop\", event) !== false) {\n\t\t\t\t\tthis._clear();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_mouseUp: function(event) {\n\t\t\t//Remove frame helpers\n\t\t\t$(\"div.ui-draggable-iframeFix\").each(function() {\n\t\t\t\tthis.parentNode.removeChild(this);\n\t\t\t});\n\t\n\t\t\t//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)\n\t\t\tif( $.ui.ddmanager ) {\n\t\t\t\t$.ui.ddmanager.dragStop(this, event);\n\t\t\t}\n\t\n\t\t\treturn $.ui.mouse.prototype._mouseUp.call(this, event);\n\t\t},\n\t\n\t\tcancel: function() {\n\t\n\t\t\tif(this.helper.is(\".ui-draggable-dragging\")) {\n\t\t\t\tthis._mouseUp({});\n\t\t\t} else {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\n\t\t},\n\t\n\t\t_getHandle: function(event) {\n\t\t\treturn this.options.handle ?\n\t\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\t\ttrue;\n\t\t},\n\t\n\t\t_createHelper: function(event) {\n\t\n\t\t\tvar o = this.options,\n\t\t\t\thelper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === \"clone\" ? this.element.clone().removeAttr(\"id\") : this.element);\n\t\n\t\t\tif(!helper.parents(\"body\").length) {\n\t\t\t\thelper.appendTo((o.appendTo === \"parent\" ? this.element[0].parentNode : o.appendTo));\n\t\t\t}\n\t\n\t\t\tif(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css(\"position\"))) {\n\t\t\t\thelper.css(\"position\", \"absolute\");\n\t\t\t}\n\t\n\t\t\treturn helper;\n\t\n\t\t},\n\t\n\t\t_adjustOffsetFromHelper: function(obj) {\n\t\t\tif (typeof obj === \"string\") {\n\t\t\t\tobj = obj.split(\" \");\n\t\t\t}\n\t\t\tif ($.isArray(obj)) {\n\t\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t\t}\n\t\t\tif (\"left\" in obj) {\n\t\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t\t}\n\t\t\tif (\"right\" in obj) {\n\t\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t\t}\n\t\t\tif (\"top\" in obj) {\n\t\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t\t}\n\t\t\tif (\"bottom\" in obj) {\n\t\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t\t}\n\t\t},\n\t\n\t\t_getParentOffset: function() {\n\t\n\t\t\t//Get the offsetParent and cache its position\n\t\t\tvar po = this.offsetParent.offset();\n\t\n\t\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\t\tif(this.cssPosition === \"absolute\" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t\t}\n\t\n\t\t\t//This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t\t//Ugly IE fix\n\t\t\tif((this.offsetParent[0] === document.body) ||\n\t\t\t\t(this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie)) {\n\t\t\t\tpo = { top: 0, left: 0 };\n\t\t\t}\n\t\n\t\t\treturn {\n\t\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t\t};\n\t\n\t\t},\n\t\n\t\t_getRelativeOffset: function() {\n\t\n\t\t\tif(this.cssPosition === \"relative\") {\n\t\t\t\tvar p = this.element.position();\n\t\t\t\treturn {\n\t\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn { top: 0, left: 0 };\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_cacheMargins: function() {\n\t\t\tthis.margins = {\n\t\t\t\tleft: (parseInt(this.element.css(\"marginLeft\"),10) || 0),\n\t\t\t\ttop: (parseInt(this.element.css(\"marginTop\"),10) || 0),\n\t\t\t\tright: (parseInt(this.element.css(\"marginRight\"),10) || 0),\n\t\t\t\tbottom: (parseInt(this.element.css(\"marginBottom\"),10) || 0)\n\t\t\t};\n\t\t},\n\t\n\t\t_cacheHelperProportions: function() {\n\t\t\tthis.helperProportions = {\n\t\t\t\twidth: this.helper.outerWidth(),\n\t\t\t\theight: this.helper.outerHeight()\n\t\t\t};\n\t\t},\n\t\n\t\t_setContainment: function() {\n\t\n\t\t\tvar over, c, ce,\n\t\t\t\to = this.options;\n\t\n\t\t\tif ( !o.containment ) {\n\t\t\t\tthis.containment = null;\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( o.containment === \"window\" ) {\n\t\t\t\tthis.containment = [\n\t\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t\t$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t\t$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t\t];\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( o.containment === \"document\") {\n\t\t\t\tthis.containment = [\n\t\t\t\t\t0,\n\t\t\t\t\t0,\n\t\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t\t];\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( o.containment.constructor === Array ) {\n\t\t\t\tthis.containment = o.containment;\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( o.containment === \"parent\" ) {\n\t\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t\t}\n\t\n\t\t\tc = $( o.containment );\n\t\t\tce = c[ 0 ];\n\t\n\t\t\tif( !ce ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tover = c.css( \"overflow\" ) !== \"hidden\";\n\t\n\t\t\tthis.containment = [\n\t\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ) ,\n\t\t\t\t( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) - ( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,\n\t\t\t\t( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) - ( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top  - this.margins.bottom\n\t\t\t];\n\t\t\tthis.relative_container = c;\n\t\t},\n\t\n\t\t_convertPositionTo: function(d, pos) {\n\t\n\t\t\tif(!pos) {\n\t\t\t\tpos = this.position;\n\t\t\t}\n\t\n\t\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\t\tscroll = this.cssPosition === \"absolute\" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;\n\t\n\t\t\t//Cache the scroll\n\t\t\tif (!this.offset.scroll) {\n\t\t\t\tthis.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};\n\t\t\t}\n\t\n\t\t\treturn {\n\t\t\t\ttop: (\n\t\t\t\t\tpos.top\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.relative.top * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.top * mod -\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )\n\t\t\t\t),\n\t\t\t\tleft: (\n\t\t\t\t\tpos.left +\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.relative.left * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.left * mod\t-\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )\n\t\t\t\t)\n\t\t\t};\n\t\n\t\t},\n\t\n\t\t_generatePosition: function(event) {\n\t\n\t\t\tvar containment, co, top, left,\n\t\t\t\to = this.options,\n\t\t\t\tscroll = this.cssPosition === \"absolute\" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,\n\t\t\t\tpageX = event.pageX,\n\t\t\t\tpageY = event.pageY;\n\t\n\t\t\t//Cache the scroll\n\t\t\tif (!this.offset.scroll) {\n\t\t\t\tthis.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};\n\t\t\t}\n\t\n\t\t\t/*\n\t\t\t * - Position constraining -\n\t\t\t * Constrain the position to a mix of grid, containment.\n\t\t\t */\n\t\n\t\t\t// If we are not dragging yet, we won't check for options\n\t\t\tif ( this.originalPosition ) {\n\t\t\t\tif ( this.containment ) {\n\t\t\t\t\tif ( this.relative_container ){\n\t\t\t\t\t\tco = this.relative_container.offset();\n\t\t\t\t\t\tcontainment = [\n\t\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif(event.pageX - this.offset.click.left < containment[0]) {\n\t\t\t\t\t\tpageX = containment[0] + this.offset.click.left;\n\t\t\t\t\t}\n\t\t\t\t\tif(event.pageY - this.offset.click.top < containment[1]) {\n\t\t\t\t\t\tpageY = containment[1] + this.offset.click.top;\n\t\t\t\t\t}\n\t\t\t\t\tif(event.pageX - this.offset.click.left > containment[2]) {\n\t\t\t\t\t\tpageX = containment[2] + this.offset.click.left;\n\t\t\t\t\t}\n\t\t\t\t\tif(event.pageY - this.offset.click.top > containment[3]) {\n\t\t\t\t\t\tpageY = containment[3] + this.offset.click.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tif(o.grid) {\n\t\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)\n\t\t\t\t\ttop = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;\n\t\t\t\t\tpageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\t\n\t\t\t\t\tleft = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;\n\t\t\t\t\tpageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\treturn {\n\t\t\t\ttop: (\n\t\t\t\t\tpageY -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.click.top\t-\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t\tthis.offset.relative.top -\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.top +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )\n\t\t\t\t),\n\t\t\t\tleft: (\n\t\t\t\t\tpageX -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.click.left -\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t\tthis.offset.relative.left -\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.left +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )\n\t\t\t\t)\n\t\t\t};\n\t\n\t\t},\n\t\n\t\t_clear: function() {\n\t\t\tthis.helper.removeClass(\"ui-draggable-dragging\");\n\t\t\tif(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\t\t\tthis.helper = null;\n\t\t\tthis.cancelHelperRemoval = false;\n\t\t},\n\t\n\t\t// From now on bulk stuff - mainly helpers\n\t\n\t\t_trigger: function(type, event, ui) {\n\t\t\tui = ui || this._uiHash();\n\t\t\t$.ui.plugin.call(this, type, [event, ui]);\n\t\t\t//The absolute position has to be recalculated after plugins\n\t\t\tif(type === \"drag\") {\n\t\t\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\t\t\t}\n\t\t\treturn $.Widget.prototype._trigger.call(this, type, event, ui);\n\t\t},\n\t\n\t\tplugins: {},\n\t\n\t\t_uiHash: function() {\n\t\t\treturn {\n\t\t\t\thelper: this.helper,\n\t\t\t\tposition: this.position,\n\t\t\t\toriginalPosition: this.originalPosition,\n\t\t\t\toffset: this.positionAbs\n\t\t\t};\n\t\t}\n\t\n\t});\n\t\n\t$.ui.plugin.add(\"draggable\", \"connectToSortable\", {\n\t\tstart: function(event, ui) {\n\t\n\t\t\tvar inst = $(this).data(\"ui-draggable\"), o = inst.options,\n\t\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\t\t\tinst.sortables = [];\n\t\t\t$(o.connectToSortable).each(function() {\n\t\t\t\tvar sortable = $.data(this, \"ui-sortable\");\n\t\t\t\tif (sortable && !sortable.options.disabled) {\n\t\t\t\t\tinst.sortables.push({\n\t\t\t\t\t\tinstance: sortable,\n\t\t\t\t\t\tshouldRevert: sortable.options.revert\n\t\t\t\t\t});\n\t\t\t\t\tsortable.refreshPositions();\t// Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).\n\t\t\t\t\tsortable._trigger(\"activate\", event, uiSortable);\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t},\n\t\tstop: function(event, ui) {\n\t\n\t\t\t//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper\n\t\t\tvar inst = $(this).data(\"ui-draggable\"),\n\t\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\t\n\t\t\t$.each(inst.sortables, function() {\n\t\t\t\tif(this.instance.isOver) {\n\t\n\t\t\t\t\tthis.instance.isOver = 0;\n\t\n\t\t\t\t\tinst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance\n\t\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)\n\t\n\t\t\t\t\t//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: \"valid/invalid\"\n\t\t\t\t\tif(this.shouldRevert) {\n\t\t\t\t\t\tthis.instance.options.revert = this.shouldRevert;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//Trigger the stop of the sortable\n\t\t\t\t\tthis.instance._mouseStop(event);\n\t\n\t\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\t\n\t\t\t\t\t//If the helper has been the original item, restore properties in the sortable\n\t\t\t\t\tif(inst.options.helper === \"original\") {\n\t\t\t\t\t\tthis.instance.currentItem.css({ top: \"auto\", left: \"auto\" });\n\t\t\t\t\t}\n\t\n\t\t\t\t} else {\n\t\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance\n\t\t\t\t\tthis.instance._trigger(\"deactivate\", event, uiSortable);\n\t\t\t\t}\n\t\n\t\t\t});\n\t\n\t\t},\n\t\tdrag: function(event, ui) {\n\t\n\t\t\tvar inst = $(this).data(\"ui-draggable\"), that = this;\n\t\n\t\t\t$.each(inst.sortables, function() {\n\t\n\t\t\t\tvar innermostIntersecting = false,\n\t\t\t\t\tthisSortable = this;\n\t\n\t\t\t\t//Copy over some variables to allow calling the sortable's native _intersectsWith\n\t\t\t\tthis.instance.positionAbs = inst.positionAbs;\n\t\t\t\tthis.instance.helperProportions = inst.helperProportions;\n\t\t\t\tthis.instance.offset.click = inst.offset.click;\n\t\n\t\t\t\tif(this.instance._intersectsWith(this.instance.containerCache)) {\n\t\t\t\t\tinnermostIntersecting = true;\n\t\t\t\t\t$.each(inst.sortables, function () {\n\t\t\t\t\t\tthis.instance.positionAbs = inst.positionAbs;\n\t\t\t\t\t\tthis.instance.helperProportions = inst.helperProportions;\n\t\t\t\t\t\tthis.instance.offset.click = inst.offset.click;\n\t\t\t\t\t\tif (this !== thisSortable &&\n\t\t\t\t\t\t\tthis.instance._intersectsWith(this.instance.containerCache) &&\n\t\t\t\t\t\t\t$.contains(thisSortable.instance.element[0], this.instance.element[0])\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\n\t\n\t\t\t\tif(innermostIntersecting) {\n\t\t\t\t\t//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once\n\t\t\t\t\tif(!this.instance.isOver) {\n\t\n\t\t\t\t\t\tthis.instance.isOver = 1;\n\t\t\t\t\t\t//Now we fake the start of dragging for the sortable instance,\n\t\t\t\t\t\t//by cloning the list group item, appending it to the sortable and using it as inst.currentItem\n\t\t\t\t\t\t//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)\n\t\t\t\t\t\tthis.instance.currentItem = $(that).clone().removeAttr(\"id\").appendTo(this.instance.element).data(\"ui-sortable-item\", true);\n\t\t\t\t\t\tthis.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it\n\t\t\t\t\t\tthis.instance.options.helper = function() { return ui.helper[0]; };\n\t\n\t\t\t\t\t\tevent.target = this.instance.currentItem[0];\n\t\t\t\t\t\tthis.instance._mouseCapture(event, true);\n\t\t\t\t\t\tthis.instance._mouseStart(event, true, true);\n\t\n\t\t\t\t\t\t//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes\n\t\t\t\t\t\tthis.instance.offset.click.top = inst.offset.click.top;\n\t\t\t\t\t\tthis.instance.offset.click.left = inst.offset.click.left;\n\t\t\t\t\t\tthis.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;\n\t\t\t\t\t\tthis.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;\n\t\n\t\t\t\t\t\tinst._trigger(\"toSortable\", event);\n\t\t\t\t\t\tinst.dropped = this.instance.element; //draggable revert needs that\n\t\t\t\t\t\t//hack so receive/update callbacks work (mostly)\n\t\t\t\t\t\tinst.currentItem = inst.element;\n\t\t\t\t\t\tthis.instance.fromOutside = inst;\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable\n\t\t\t\t\tif(this.instance.currentItem) {\n\t\t\t\t\t\tthis.instance._mouseDrag(event);\n\t\t\t\t\t}\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\t//If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t\t//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval\n\t\t\t\t\tif(this.instance.isOver) {\n\t\n\t\t\t\t\t\tthis.instance.isOver = 0;\n\t\t\t\t\t\tthis.instance.cancelHelperRemoval = true;\n\t\n\t\t\t\t\t\t//Prevent reverting on this forced stop\n\t\t\t\t\t\tthis.instance.options.revert = false;\n\t\n\t\t\t\t\t\t// The out event needs to be triggered independently\n\t\t\t\t\t\tthis.instance._trigger(\"out\", event, this.instance._uiHash(this.instance));\n\t\n\t\t\t\t\t\tthis.instance._mouseStop(event, true);\n\t\t\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\t\n\t\t\t\t\t\t//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size\n\t\t\t\t\t\tthis.instance.currentItem.remove();\n\t\t\t\t\t\tif(this.instance.placeholder) {\n\t\t\t\t\t\t\tthis.instance.placeholder.remove();\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tinst._trigger(\"fromSortable\", event);\n\t\t\t\t\t\tinst.dropped = false; //draggable revert needs that\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t});\n\t\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"draggable\", \"cursor\", {\n\t\tstart: function() {\n\t\t\tvar t = $(\"body\"), o = $(this).data(\"ui-draggable\").options;\n\t\t\tif (t.css(\"cursor\")) {\n\t\t\t\to._cursor = t.css(\"cursor\");\n\t\t\t}\n\t\t\tt.css(\"cursor\", o.cursor);\n\t\t},\n\t\tstop: function() {\n\t\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\t\tif (o._cursor) {\n\t\t\t\t$(\"body\").css(\"cursor\", o._cursor);\n\t\t\t}\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"draggable\", \"opacity\", {\n\t\tstart: function(event, ui) {\n\t\t\tvar t = $(ui.helper), o = $(this).data(\"ui-draggable\").options;\n\t\t\tif(t.css(\"opacity\")) {\n\t\t\t\to._opacity = t.css(\"opacity\");\n\t\t\t}\n\t\t\tt.css(\"opacity\", o.opacity);\n\t\t},\n\t\tstop: function(event, ui) {\n\t\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\t\tif(o._opacity) {\n\t\t\t\t$(ui.helper).css(\"opacity\", o._opacity);\n\t\t\t}\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"draggable\", \"scroll\", {\n\t\tstart: function() {\n\t\t\tvar i = $(this).data(\"ui-draggable\");\n\t\t\tif(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== \"HTML\") {\n\t\t\t\ti.overflowOffset = i.scrollParent.offset();\n\t\t\t}\n\t\t},\n\t\tdrag: function( event ) {\n\t\n\t\t\tvar i = $(this).data(\"ui-draggable\"), o = i.options, scrolled = false;\n\t\n\t\t\tif(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== \"HTML\") {\n\t\n\t\t\t\tif(!o.axis || o.axis !== \"x\") {\n\t\t\t\t\tif((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n\t\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\t\t} else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {\n\t\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tif(!o.axis || o.axis !== \"y\") {\n\t\t\t\t\tif((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n\t\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\t\t} else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {\n\t\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t} else {\n\t\n\t\t\t\tif(!o.axis || o.axis !== \"x\") {\n\t\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\t\t} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tif(!o.axis || o.axis !== \"y\") {\n\t\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\t\t} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets(i, event);\n\t\t\t}\n\t\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"draggable\", \"snap\", {\n\t\tstart: function() {\n\t\n\t\t\tvar i = $(this).data(\"ui-draggable\"),\n\t\t\t\to = i.options;\n\t\n\t\t\ti.snapElements = [];\n\t\n\t\t\t$(o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap).each(function() {\n\t\t\t\tvar $t = $(this),\n\t\t\t\t\t$o = $t.offset();\n\t\t\t\tif(this !== i.element[0]) {\n\t\t\t\t\ti.snapElements.push({\n\t\t\t\t\t\titem: this,\n\t\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t},\n\t\tdrag: function(event, ui) {\n\t\n\t\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\t\tinst = $(this).data(\"ui-draggable\"),\n\t\t\t\to = inst.options,\n\t\t\t\td = o.snapTolerance,\n\t\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\t\n\t\t\tfor (i = inst.snapElements.length - 1; i >= 0; i--){\n\t\n\t\t\t\tl = inst.snapElements[i].left;\n\t\t\t\tr = l + inst.snapElements[i].width;\n\t\t\t\tt = inst.snapElements[i].top;\n\t\t\t\tb = t + inst.snapElements[i].height;\n\t\n\t\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {\n\t\t\t\t\tif(inst.snapElements[i].snapping) {\n\t\t\t\t\t\t(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t\t\t}\n\t\t\t\t\tinst.snapElements[i].snapping = false;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\tif(o.snapMode !== \"inner\") {\n\t\t\t\t\tts = Math.abs(t - y2) <= d;\n\t\t\t\t\tbs = Math.abs(b - y1) <= d;\n\t\t\t\t\tls = Math.abs(l - x2) <= d;\n\t\t\t\t\trs = Math.abs(r - x1) <= d;\n\t\t\t\t\tif(ts) {\n\t\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\t\t}\n\t\t\t\t\tif(bs) {\n\t\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b, left: 0 }).top - inst.margins.top;\n\t\t\t\t\t}\n\t\t\t\t\tif(ls) {\n\t\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t\t\t}\n\t\t\t\t\tif(rs) {\n\t\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r }).left - inst.margins.left;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tfirst = (ts || bs || ls || rs);\n\t\n\t\t\t\tif(o.snapMode !== \"outer\") {\n\t\t\t\t\tts = Math.abs(t - y1) <= d;\n\t\t\t\t\tbs = Math.abs(b - y2) <= d;\n\t\t\t\t\tls = Math.abs(l - x1) <= d;\n\t\t\t\t\trs = Math.abs(r - x2) <= d;\n\t\t\t\t\tif(ts) {\n\t\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t, left: 0 }).top - inst.margins.top;\n\t\t\t\t\t}\n\t\t\t\t\tif(bs) {\n\t\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\t\t}\n\t\t\t\t\tif(ls) {\n\t\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l }).left - inst.margins.left;\n\t\t\t\t\t}\n\t\t\t\t\tif(rs) {\n\t\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tif(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {\n\t\t\t\t\t(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t\t}\n\t\t\t\tinst.snapElements[i].snapping = (ts || bs || ls || rs || first);\n\t\n\t\t\t}\n\t\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"draggable\", \"stack\", {\n\t\tstart: function() {\n\t\t\tvar min,\n\t\t\t\to = this.data(\"ui-draggable\").options,\n\t\t\t\tgroup = $.makeArray($(o.stack)).sort(function(a,b) {\n\t\t\t\t\treturn (parseInt($(a).css(\"zIndex\"),10) || 0) - (parseInt($(b).css(\"zIndex\"),10) || 0);\n\t\t\t\t});\n\t\n\t\t\tif (!group.length) { return; }\n\t\n\t\t\tmin = parseInt($(group[0]).css(\"zIndex\"), 10) || 0;\n\t\t\t$(group).each(function(i) {\n\t\t\t\t$(this).css(\"zIndex\", min + i);\n\t\t\t});\n\t\t\tthis.css(\"zIndex\", (min + group.length));\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"draggable\", \"zIndex\", {\n\t\tstart: function(event, ui) {\n\t\t\tvar t = $(ui.helper), o = $(this).data(\"ui-draggable\").options;\n\t\t\tif(t.css(\"zIndex\")) {\n\t\t\t\to._zIndex = t.css(\"zIndex\");\n\t\t\t}\n\t\t\tt.css(\"zIndex\", o.zIndex);\n\t\t},\n\t\tstop: function(event, ui) {\n\t\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\t\tif(o._zIndex) {\n\t\t\t\t$(ui.helper).css(\"zIndex\", o._zIndex);\n\t\t\t}\n\t\t}\n\t});\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\tfunction isOverAxis( x, reference, size ) {\n\t\treturn ( x > reference ) && ( x < ( reference + size ) );\n\t}\n\t\n\t$.widget(\"ui.droppable\", {\n\t\tversion: \"1.10.3\",\n\t\twidgetEventPrefix: \"drop\",\n\t\toptions: {\n\t\t\taccept: \"*\",\n\t\t\tactiveClass: false,\n\t\t\taddClasses: true,\n\t\t\tgreedy: false,\n\t\t\thoverClass: false,\n\t\t\tscope: \"default\",\n\t\t\ttolerance: \"intersect\",\n\t\n\t\t\t// callbacks\n\t\t\tactivate: null,\n\t\t\tdeactivate: null,\n\t\t\tdrop: null,\n\t\t\tout: null,\n\t\t\tover: null\n\t\t},\n\t\t_create: function() {\n\t\n\t\t\tvar o = this.options,\n\t\t\t\taccept = o.accept;\n\t\n\t\t\tthis.isover = false;\n\t\t\tthis.isout = true;\n\t\n\t\t\tthis.accept = $.isFunction(accept) ? accept : function(d) {\n\t\t\t\treturn d.is(accept);\n\t\t\t};\n\t\n\t\t\t//Store the droppable's proportions\n\t\t\tthis.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };\n\t\n\t\t\t// Add the reference and positions to the manager\n\t\t\t$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];\n\t\t\t$.ui.ddmanager.droppables[o.scope].push(this);\n\t\n\t\t\t(o.addClasses && this.element.addClass(\"ui-droppable\"));\n\t\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tvar i = 0,\n\t\t\t\tdrop = $.ui.ddmanager.droppables[this.options.scope];\n\t\n\t\t\tfor ( ; i < drop.length; i++ ) {\n\t\t\t\tif ( drop[i] === this ) {\n\t\t\t\t\tdrop.splice(i, 1);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tthis.element.removeClass(\"ui-droppable ui-droppable-disabled\");\n\t\t},\n\t\n\t\t_setOption: function(key, value) {\n\t\n\t\t\tif(key === \"accept\") {\n\t\t\t\tthis.accept = $.isFunction(value) ? value : function(d) {\n\t\t\t\t\treturn d.is(value);\n\t\t\t\t};\n\t\t\t}\n\t\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t\t},\n\t\n\t\t_activate: function(event) {\n\t\t\tvar draggable = $.ui.ddmanager.current;\n\t\t\tif(this.options.activeClass) {\n\t\t\t\tthis.element.addClass(this.options.activeClass);\n\t\t\t}\n\t\t\tif(draggable){\n\t\t\t\tthis._trigger(\"activate\", event, this.ui(draggable));\n\t\t\t}\n\t\t},\n\t\n\t\t_deactivate: function(event) {\n\t\t\tvar draggable = $.ui.ddmanager.current;\n\t\t\tif(this.options.activeClass) {\n\t\t\t\tthis.element.removeClass(this.options.activeClass);\n\t\t\t}\n\t\t\tif(draggable){\n\t\t\t\tthis._trigger(\"deactivate\", event, this.ui(draggable));\n\t\t\t}\n\t\t},\n\t\n\t\t_over: function(event) {\n\t\n\t\t\tvar draggable = $.ui.ddmanager.current;\n\t\n\t\t\t// Bail if draggable and droppable are same element\n\t\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\t\tif(this.options.hoverClass) {\n\t\t\t\t\tthis.element.addClass(this.options.hoverClass);\n\t\t\t\t}\n\t\t\t\tthis._trigger(\"over\", event, this.ui(draggable));\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_out: function(event) {\n\t\n\t\t\tvar draggable = $.ui.ddmanager.current;\n\t\n\t\t\t// Bail if draggable and droppable are same element\n\t\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\t\tif(this.options.hoverClass) {\n\t\t\t\t\tthis.element.removeClass(this.options.hoverClass);\n\t\t\t\t}\n\t\t\t\tthis._trigger(\"out\", event, this.ui(draggable));\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_drop: function(event,custom) {\n\t\n\t\t\tvar draggable = custom || $.ui.ddmanager.current,\n\t\t\t\tchildrenIntersection = false;\n\t\n\t\t\t// Bail if draggable and droppable are same element\n\t\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tthis.element.find(\":data(ui-droppable)\").not(\".ui-draggable-dragging\").each(function() {\n\t\t\t\tvar inst = $.data(this, \"ui-droppable\");\n\t\t\t\tif(\n\t\t\t\t\tinst.options.greedy &&\n\t\t\t\t\t!inst.options.disabled &&\n\t\t\t\t\tinst.options.scope === draggable.options.scope &&\n\t\t\t\t\tinst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&\n\t\t\t\t\t$.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)\n\t\t\t\t) { childrenIntersection = true; return false; }\n\t\t\t});\n\t\t\tif(childrenIntersection) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tif(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\t\tif(this.options.activeClass) {\n\t\t\t\t\tthis.element.removeClass(this.options.activeClass);\n\t\t\t\t}\n\t\t\t\tif(this.options.hoverClass) {\n\t\t\t\t\tthis.element.removeClass(this.options.hoverClass);\n\t\t\t\t}\n\t\t\t\tthis._trigger(\"drop\", event, this.ui(draggable));\n\t\t\t\treturn this.element;\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\n\t\t},\n\t\n\t\tui: function(c) {\n\t\t\treturn {\n\t\t\t\tdraggable: (c.currentItem || c.element),\n\t\t\t\thelper: c.helper,\n\t\t\t\tposition: c.position,\n\t\t\t\toffset: c.positionAbs\n\t\t\t};\n\t\t}\n\t\n\t});\n\t\n\t$.ui.intersect = function(draggable, droppable, toleranceMode) {\n\t\n\t\tif (!droppable.offset) {\n\t\t\treturn false;\n\t\t}\n\t\n\t\tvar draggableLeft, draggableTop,\n\t\t\tx1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,\n\t\t\ty1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,\n\t\t\tl = droppable.offset.left, r = l + droppable.proportions.width,\n\t\t\tt = droppable.offset.top, b = t + droppable.proportions.height;\n\t\n\t\tswitch (toleranceMode) {\n\t\t\tcase \"fit\":\n\t\t\t\treturn (l <= x1 && x2 <= r && t <= y1 && y2 <= b);\n\t\t\tcase \"intersect\":\n\t\t\t\treturn (l < x1 + (draggable.helperProportions.width / 2) && // Right Half\n\t\t\t\t\tx2 - (draggable.helperProportions.width / 2) < r && // Left Half\n\t\t\t\t\tt < y1 + (draggable.helperProportions.height / 2) && // Bottom Half\n\t\t\t\t\ty2 - (draggable.helperProportions.height / 2) < b ); // Top Half\n\t\t\tcase \"pointer\":\n\t\t\t\tdraggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);\n\t\t\t\tdraggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);\n\t\t\t\treturn isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );\n\t\t\tcase \"touch\":\n\t\t\t\treturn (\n\t\t\t\t\t(y1 >= t && y1 <= b) ||\t// Top edge touching\n\t\t\t\t\t(y2 >= t && y2 <= b) ||\t// Bottom edge touching\n\t\t\t\t\t(y1 < t && y2 > b)\t\t// Surrounded vertically\n\t\t\t\t) && (\n\t\t\t\t\t(x1 >= l && x1 <= r) ||\t// Left edge touching\n\t\t\t\t\t(x2 >= l && x2 <= r) ||\t// Right edge touching\n\t\t\t\t\t(x1 < l && x2 > r)\t\t// Surrounded horizontally\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t};\n\t\n\t/*\n\t\tThis manager tracks offsets of draggables and droppables\n\t*/\n\t$.ui.ddmanager = {\n\t\tcurrent: null,\n\t\tdroppables: { \"default\": [] },\n\t\tprepareOffsets: function(t, event) {\n\t\n\t\t\tvar i, j,\n\t\t\t\tm = $.ui.ddmanager.droppables[t.options.scope] || [],\n\t\t\t\ttype = event ? event.type : null, // workaround for #2317\n\t\t\t\tlist = (t.currentItem || t.element).find(\":data(ui-droppable)\").addBack();\n\t\n\t\t\tdroppablesLoop: for (i = 0; i < m.length; i++) {\n\t\n\t\t\t\t//No disabled and non-accepted\n\t\t\t\tif(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\t// Filter out elements in the current dragged item\n\t\t\t\tfor (j=0; j < list.length; j++) {\n\t\t\t\t\tif(list[j] === m[i].element[0]) {\n\t\t\t\t\t\tm[i].proportions.height = 0;\n\t\t\t\t\t\tcontinue droppablesLoop;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tm[i].visible = m[i].element.css(\"display\") !== \"none\";\n\t\t\t\tif(!m[i].visible) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\t//Activate the droppable if used directly from draggables\n\t\t\t\tif(type === \"mousedown\") {\n\t\t\t\t\tm[i]._activate.call(m[i], event);\n\t\t\t\t}\n\t\n\t\t\t\tm[i].offset = m[i].element.offset();\n\t\t\t\tm[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };\n\t\n\t\t\t}\n\t\n\t\t},\n\t\tdrop: function(draggable, event) {\n\t\n\t\t\tvar dropped = false;\n\t\t\t// Create a copy of the droppables in case the list changes during the drop (#9116)\n\t\t\t$.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {\n\t\n\t\t\t\tif(!this.options) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {\n\t\t\t\t\tdropped = this._drop.call(this, event) || dropped;\n\t\t\t\t}\n\t\n\t\t\t\tif (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\t\t\tthis.isout = true;\n\t\t\t\t\tthis.isover = false;\n\t\t\t\t\tthis._deactivate.call(this, event);\n\t\t\t\t}\n\t\n\t\t\t});\n\t\t\treturn dropped;\n\t\n\t\t},\n\t\tdragStart: function( draggable, event ) {\n\t\t\t//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)\n\t\t\tdraggable.element.parentsUntil( \"body\" ).bind( \"scroll.droppable\", function() {\n\t\t\t\tif( !draggable.options.refreshPositions ) {\n\t\t\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\tdrag: function(draggable, event) {\n\t\n\t\t\t//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.\n\t\t\tif(draggable.options.refreshPositions) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets(draggable, event);\n\t\t\t}\n\t\n\t\t\t//Run through all droppables and check their positions based on specific tolerance options\n\t\t\t$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {\n\t\n\t\t\t\tif(this.options.disabled || this.greedyChild || !this.visible) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tvar parentInstance, scope, parent,\n\t\t\t\t\tintersects = $.ui.intersect(draggable, this, this.options.tolerance),\n\t\t\t\t\tc = !intersects && this.isover ? \"isout\" : (intersects && !this.isover ? \"isover\" : null);\n\t\t\t\tif(!c) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tif (this.options.greedy) {\n\t\t\t\t\t// find droppable parents with same scope\n\t\t\t\t\tscope = this.options.scope;\n\t\t\t\t\tparent = this.element.parents(\":data(ui-droppable)\").filter(function () {\n\t\t\t\t\t\treturn $.data(this, \"ui-droppable\").options.scope === scope;\n\t\t\t\t\t});\n\t\n\t\t\t\t\tif (parent.length) {\n\t\t\t\t\t\tparentInstance = $.data(parent[0], \"ui-droppable\");\n\t\t\t\t\t\tparentInstance.greedyChild = (c === \"isover\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// we just moved into a greedy child\n\t\t\t\tif (parentInstance && c === \"isover\") {\n\t\t\t\t\tparentInstance.isover = false;\n\t\t\t\t\tparentInstance.isout = true;\n\t\t\t\t\tparentInstance._out.call(parentInstance, event);\n\t\t\t\t}\n\t\n\t\t\t\tthis[c] = true;\n\t\t\t\tthis[c === \"isout\" ? \"isover\" : \"isout\"] = false;\n\t\t\t\tthis[c === \"isover\" ? \"_over\" : \"_out\"].call(this, event);\n\t\n\t\t\t\t// we just moved out of a greedy child\n\t\t\t\tif (parentInstance && c === \"isout\") {\n\t\t\t\t\tparentInstance.isout = false;\n\t\t\t\t\tparentInstance.isover = true;\n\t\t\t\t\tparentInstance._over.call(parentInstance, event);\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t},\n\t\tdragStop: function( draggable, event ) {\n\t\t\tdraggable.element.parentsUntil( \"body\" ).unbind( \"scroll.droppable\" );\n\t\t\t//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)\n\t\t\tif( !draggable.options.refreshPositions ) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t\t}\n\t\t}\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\tfunction num(v) {\n\t\treturn parseInt(v, 10) || 0;\n\t}\n\t\n\tfunction isNumber(value) {\n\t\treturn !isNaN(parseInt(value, 10));\n\t}\n\t\n\t$.widget(\"ui.resizable\", $.ui.mouse, {\n\t\tversion: \"1.10.3\",\n\t\twidgetEventPrefix: \"resize\",\n\t\toptions: {\n\t\t\talsoResize: false,\n\t\t\tanimate: false,\n\t\t\tanimateDuration: \"slow\",\n\t\t\tanimateEasing: \"swing\",\n\t\t\taspectRatio: false,\n\t\t\tautoHide: false,\n\t\t\tcontainment: false,\n\t\t\tghost: false,\n\t\t\tgrid: false,\n\t\t\thandles: \"e,s,se\",\n\t\t\thelper: false,\n\t\t\tmaxHeight: null,\n\t\t\tmaxWidth: null,\n\t\t\tminHeight: 10,\n\t\t\tminWidth: 10,\n\t\t\t// See #7960\n\t\t\tzIndex: 90,\n\t\n\t\t\t// callbacks\n\t\t\tresize: null,\n\t\t\tstart: null,\n\t\t\tstop: null\n\t\t},\n\t\t_create: function() {\n\t\n\t\t\tvar n, i, handle, axis, hname,\n\t\t\t\tthat = this,\n\t\t\t\to = this.options;\n\t\t\tthis.element.addClass(\"ui-resizable\");\n\t\n\t\t\t$.extend(this, {\n\t\t\t\t_aspectRatio: !!(o.aspectRatio),\n\t\t\t\taspectRatio: o.aspectRatio,\n\t\t\t\toriginalElement: this.element,\n\t\t\t\t_proportionallyResizeElements: [],\n\t\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t\t});\n\t\n\t\t\t//Wrap the element if it cannot hold child nodes\n\t\t\tif(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {\n\t\n\t\t\t\t//Create a wrapper element and set the wrapper to the new current internal element\n\t\t\t\tthis.element.wrap(\n\t\t\t\t\t$(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({\n\t\t\t\t\t\tposition: this.element.css(\"position\"),\n\t\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\t\ttop: this.element.css(\"top\"),\n\t\t\t\t\t\tleft: this.element.css(\"left\")\n\t\t\t\t\t})\n\t\t\t\t);\n\t\n\t\t\t\t//Overwrite the original this.element\n\t\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\t\"ui-resizable\", this.element.data(\"ui-resizable\")\n\t\t\t\t);\n\t\n\t\t\t\tthis.elementIsWrapper = true;\n\t\n\t\t\t\t//Move margins to the wrapper\n\t\t\t\tthis.element.css({ marginLeft: this.originalElement.css(\"marginLeft\"), marginTop: this.originalElement.css(\"marginTop\"), marginRight: this.originalElement.css(\"marginRight\"), marginBottom: this.originalElement.css(\"marginBottom\") });\n\t\t\t\tthis.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});\n\t\n\t\t\t\t//Prevent Safari textarea resize\n\t\t\t\tthis.originalResizeStyle = this.originalElement.css(\"resize\");\n\t\t\t\tthis.originalElement.css(\"resize\", \"none\");\n\t\n\t\t\t\t//Push the actual element to our proportionallyResize internal array\n\t\t\t\tthis._proportionallyResizeElements.push(this.originalElement.css({ position: \"static\", zoom: 1, display: \"block\" }));\n\t\n\t\t\t\t// avoid IE jump (hard set the margin)\n\t\t\t\tthis.originalElement.css({ margin: this.originalElement.css(\"margin\") });\n\t\n\t\t\t\t// fix handlers offset\n\t\t\t\tthis._proportionallyResize();\n\t\n\t\t\t}\n\t\n\t\t\tthis.handles = o.handles || (!$(\".ui-resizable-handle\", this.element).length ? \"e,s,se\" : { n: \".ui-resizable-n\", e: \".ui-resizable-e\", s: \".ui-resizable-s\", w: \".ui-resizable-w\", se: \".ui-resizable-se\", sw: \".ui-resizable-sw\", ne: \".ui-resizable-ne\", nw: \".ui-resizable-nw\" });\n\t\t\tif(this.handles.constructor === String) {\n\t\n\t\t\t\tif ( this.handles === \"all\") {\n\t\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t\t}\n\t\n\t\t\t\tn = this.handles.split(\",\");\n\t\t\t\tthis.handles = {};\n\t\n\t\t\t\tfor(i = 0; i < n.length; i++) {\n\t\n\t\t\t\t\thandle = $.trim(n[i]);\n\t\t\t\t\thname = \"ui-resizable-\"+handle;\n\t\t\t\t\taxis = $(\"<div class='ui-resizable-handle \" + hname + \"'></div>\");\n\t\n\t\t\t\t\t// Apply zIndex to all handles - see #7960\n\t\t\t\t\taxis.css({ zIndex: o.zIndex });\n\t\n\t\t\t\t\t//TODO : What's going on here?\n\t\t\t\t\tif (\"se\" === handle) {\n\t\t\t\t\t\taxis.addClass(\"ui-icon ui-icon-gripsmall-diagonal-se\");\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//Insert into internal handles object and append to element\n\t\t\t\t\tthis.handles[handle] = \".ui-resizable-\"+handle;\n\t\t\t\t\tthis.element.append(axis);\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\tthis._renderAxis = function(target) {\n\t\n\t\t\t\tvar i, axis, padPos, padWrapper;\n\t\n\t\t\t\ttarget = target || this.element;\n\t\n\t\t\t\tfor(i in this.handles) {\n\t\n\t\t\t\t\tif(this.handles[i].constructor === String) {\n\t\t\t\t\t\tthis.handles[i] = $(this.handles[i], this.element).show();\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)\n\t\t\t\t\tif (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {\n\t\n\t\t\t\t\t\taxis = $(this.handles[i], this.element);\n\t\n\t\t\t\t\t\t//Checking the correct pad and border\n\t\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();\n\t\n\t\t\t\t\t\t//The padding type i have to apply...\n\t\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t\t/ne|nw|n/.test(i) ? \"Top\" :\n\t\t\t\t\t\t\t/se|sw|s/.test(i) ? \"Bottom\" :\n\t\t\t\t\t\t\t/^e$/.test(i) ? \"Right\" : \"Left\" ].join(\"\");\n\t\n\t\t\t\t\t\ttarget.css(padPos, padWrapper);\n\t\n\t\t\t\t\t\tthis._proportionallyResize();\n\t\n\t\t\t\t\t}\n\t\n\t\t\t\t\t//TODO: What's that good for? There's not anything to be executed left\n\t\t\t\t\tif(!$(this.handles[i]).length) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\n\t\t\t//TODO: make renderAxis a prototype function\n\t\t\tthis._renderAxis(this.element);\n\t\n\t\t\tthis._handles = $(\".ui-resizable-handle\", this.element)\n\t\t\t\t.disableSelection();\n\t\n\t\t\t//Matching axis name\n\t\t\tthis._handles.mouseover(function() {\n\t\t\t\tif (!that.resizing) {\n\t\t\t\t\tif (this.className) {\n\t\t\t\t\t\taxis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);\n\t\t\t\t\t}\n\t\t\t\t\t//Axis, default = se\n\t\t\t\t\tthat.axis = axis && axis[1] ? axis[1] : \"se\";\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\t//If we want to auto hide the elements\n\t\t\tif (o.autoHide) {\n\t\t\t\tthis._handles.hide();\n\t\t\t\t$(this.element)\n\t\t\t\t\t.addClass(\"ui-resizable-autohide\")\n\t\t\t\t\t.mouseenter(function() {\n\t\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(this).removeClass(\"ui-resizable-autohide\");\n\t\t\t\t\t\tthat._handles.show();\n\t\t\t\t\t})\n\t\t\t\t\t.mouseleave(function(){\n\t\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!that.resizing) {\n\t\t\t\t\t\t\t$(this).addClass(\"ui-resizable-autohide\");\n\t\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t}\n\t\n\t\t\t//Initialize the mouse interaction\n\t\t\tthis._mouseInit();\n\t\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\n\t\t\tthis._mouseDestroy();\n\t\n\t\t\tvar wrapper,\n\t\t\t\t_destroy = function(exp) {\n\t\t\t\t\t$(exp).removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\")\n\t\t\t\t\t\t.removeData(\"resizable\").removeData(\"ui-resizable\").unbind(\".resizable\").find(\".ui-resizable-handle\").remove();\n\t\t\t\t};\n\t\n\t\t\t//TODO: Unwrap at same DOM position\n\t\t\tif (this.elementIsWrapper) {\n\t\t\t\t_destroy(this.element);\n\t\t\t\twrapper = this.element;\n\t\t\t\tthis.originalElement.css({\n\t\t\t\t\tposition: wrapper.css(\"position\"),\n\t\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\t\ttop: wrapper.css(\"top\"),\n\t\t\t\t\tleft: wrapper.css(\"left\")\n\t\t\t\t}).insertAfter( wrapper );\n\t\t\t\twrapper.remove();\n\t\t\t}\n\t\n\t\t\tthis.originalElement.css(\"resize\", this.originalResizeStyle);\n\t\t\t_destroy(this.originalElement);\n\t\n\t\t\treturn this;\n\t\t},\n\t\n\t\t_mouseCapture: function(event) {\n\t\t\tvar i, handle,\n\t\t\t\tcapture = false;\n\t\n\t\t\tfor (i in this.handles) {\n\t\t\t\thandle = $(this.handles[i])[0];\n\t\t\t\tif (handle === event.target || $.contains(handle, event.target)) {\n\t\t\t\t\tcapture = true;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn !this.options.disabled && capture;\n\t\t},\n\t\n\t\t_mouseStart: function(event) {\n\t\n\t\t\tvar curleft, curtop, cursor,\n\t\t\t\to = this.options,\n\t\t\t\tiniPos = this.element.position(),\n\t\t\t\tel = this.element;\n\t\n\t\t\tthis.resizing = true;\n\t\n\t\t\t// bugfix for http://dev.jquery.com/ticket/1749\n\t\t\tif ( (/absolute/).test( el.css(\"position\") ) ) {\n\t\t\t\tel.css({ position: \"absolute\", top: el.css(\"top\"), left: el.css(\"left\") });\n\t\t\t} else if (el.is(\".ui-draggable\")) {\n\t\t\t\tel.css({ position: \"absolute\", top: iniPos.top, left: iniPos.left });\n\t\t\t}\n\t\n\t\t\tthis._renderProxy();\n\t\n\t\t\tcurleft = num(this.helper.css(\"left\"));\n\t\t\tcurtop = num(this.helper.css(\"top\"));\n\t\n\t\t\tif (o.containment) {\n\t\t\t\tcurleft += $(o.containment).scrollLeft() || 0;\n\t\t\t\tcurtop += $(o.containment).scrollTop() || 0;\n\t\t\t}\n\t\n\t\t\t//Store needed variables\n\t\t\tthis.offset = this.helper.offset();\n\t\t\tthis.position = { left: curleft, top: curtop };\n\t\t\tthis.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\t\tthis.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\t\tthis.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };\n\t\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\t\n\t\t\t//Aspect Ratio\n\t\t\tthis.aspectRatio = (typeof o.aspectRatio === \"number\") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);\n\t\n\t\t\tcursor = $(\".ui-resizable-\" + this.axis).css(\"cursor\");\n\t\t\t$(\"body\").css(\"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor);\n\t\n\t\t\tel.addClass(\"ui-resizable-resizing\");\n\t\t\tthis._propagate(\"start\", event);\n\t\t\treturn true;\n\t\t},\n\t\n\t\t_mouseDrag: function(event) {\n\t\n\t\t\t//Increase performance, avoid regex\n\t\t\tvar data,\n\t\t\t\tel = this.helper, props = {},\n\t\t\t\tsmp = this.originalMousePosition,\n\t\t\t\ta = this.axis,\n\t\t\t\tprevTop = this.position.top,\n\t\t\t\tprevLeft = this.position.left,\n\t\t\t\tprevWidth = this.size.width,\n\t\t\t\tprevHeight = this.size.height,\n\t\t\t\tdx = (event.pageX-smp.left)||0,\n\t\t\t\tdy = (event.pageY-smp.top)||0,\n\t\t\t\ttrigger = this._change[a];\n\t\n\t\t\tif (!trigger) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t// Calculate the attrs that will be change\n\t\t\tdata = trigger.apply(this, [event, dx, dy]);\n\t\n\t\t\t// Put this in the mouseDrag handler since the user can start pressing shift while resizing\n\t\t\tthis._updateVirtualBoundaries(event.shiftKey);\n\t\t\tif (this._aspectRatio || event.shiftKey) {\n\t\t\t\tdata = this._updateRatio(data, event);\n\t\t\t}\n\t\n\t\t\tdata = this._respectSize(data, event);\n\t\n\t\t\tthis._updateCache(data);\n\t\n\t\t\t// plugins callbacks need to be called first\n\t\t\tthis._propagate(\"resize\", event);\n\t\n\t\t\tif (this.position.top !== prevTop) {\n\t\t\t\tprops.top = this.position.top + \"px\";\n\t\t\t}\n\t\t\tif (this.position.left !== prevLeft) {\n\t\t\t\tprops.left = this.position.left + \"px\";\n\t\t\t}\n\t\t\tif (this.size.width !== prevWidth) {\n\t\t\t\tprops.width = this.size.width + \"px\";\n\t\t\t}\n\t\t\tif (this.size.height !== prevHeight) {\n\t\t\t\tprops.height = this.size.height + \"px\";\n\t\t\t}\n\t\t\tel.css(props);\n\t\n\t\t\tif (!this._helper && this._proportionallyResizeElements.length) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\n\t\t\t// Call the user callback if the element was resized\n\t\t\tif ( ! $.isEmptyObject(props) ) {\n\t\t\t\tthis._trigger(\"resize\", event, this.ui());\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_mouseStop: function(event) {\n\t\n\t\t\tthis.resizing = false;\n\t\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\t\to = this.options, that = this;\n\t\n\t\t\tif(this._helper) {\n\t\n\t\t\t\tpr = this._proportionallyResizeElements;\n\t\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName);\n\t\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], \"left\") /* TODO - jump height */ ? 0 : that.sizeDiff.height;\n\t\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\t\n\t\t\t\ts = { width: (that.helper.width()  - soffsetw), height: (that.helper.height() - soffseth) };\n\t\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) + (that.position.left - that.originalPosition.left)) || null;\n\t\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) + (that.position.top - that.originalPosition.top)) || null;\n\t\n\t\t\t\tif (!o.animate) {\n\t\t\t\t\tthis.element.css($.extend(s, { top: top, left: left }));\n\t\t\t\t}\n\t\n\t\t\t\tthat.helper.height(that.size.height);\n\t\t\t\tthat.helper.width(that.size.width);\n\t\n\t\t\t\tif (this._helper && !o.animate) {\n\t\t\t\t\tthis._proportionallyResize();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t$(\"body\").css(\"cursor\", \"auto\");\n\t\n\t\t\tthis.element.removeClass(\"ui-resizable-resizing\");\n\t\n\t\t\tthis._propagate(\"stop\", event);\n\t\n\t\t\tif (this._helper) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\n\t\t},\n\t\n\t\t_updateVirtualBoundaries: function(forceAspectRatio) {\n\t\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\t\to = this.options;\n\t\n\t\t\tb = {\n\t\t\t\tminWidth: isNumber(o.minWidth) ? o.minWidth : 0,\n\t\t\t\tmaxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,\n\t\t\t\tminHeight: isNumber(o.minHeight) ? o.minHeight : 0,\n\t\t\t\tmaxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity\n\t\t\t};\n\t\n\t\t\tif(this._aspectRatio || forceAspectRatio) {\n\t\t\t\t// We want to create an enclosing box whose aspect ration is the requested one\n\t\t\t\t// First, compute the \"projected\" size for each dimension based on the aspect ratio and other dimension\n\t\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\t\n\t\t\t\tif(pMinWidth > b.minWidth) {\n\t\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t\t}\n\t\t\t\tif(pMinHeight > b.minHeight) {\n\t\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t\t}\n\t\t\t\tif(pMaxWidth < b.maxWidth) {\n\t\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t\t}\n\t\t\t\tif(pMaxHeight < b.maxHeight) {\n\t\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._vBoundaries = b;\n\t\t},\n\t\n\t\t_updateCache: function(data) {\n\t\t\tthis.offset = this.helper.offset();\n\t\t\tif (isNumber(data.left)) {\n\t\t\t\tthis.position.left = data.left;\n\t\t\t}\n\t\t\tif (isNumber(data.top)) {\n\t\t\t\tthis.position.top = data.top;\n\t\t\t}\n\t\t\tif (isNumber(data.height)) {\n\t\t\t\tthis.size.height = data.height;\n\t\t\t}\n\t\t\tif (isNumber(data.width)) {\n\t\t\t\tthis.size.width = data.width;\n\t\t\t}\n\t\t},\n\t\n\t\t_updateRatio: function( data ) {\n\t\n\t\t\tvar cpos = this.position,\n\t\t\t\tcsize = this.size,\n\t\t\t\ta = this.axis;\n\t\n\t\t\tif (isNumber(data.height)) {\n\t\t\t\tdata.width = (data.height * this.aspectRatio);\n\t\t\t} else if (isNumber(data.width)) {\n\t\t\t\tdata.height = (data.width / this.aspectRatio);\n\t\t\t}\n\t\n\t\t\tif (a === \"sw\") {\n\t\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t\t\tdata.top = null;\n\t\t\t}\n\t\t\tif (a === \"nw\") {\n\t\t\t\tdata.top = cpos.top + (csize.height - data.height);\n\t\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t\t}\n\t\n\t\t\treturn data;\n\t\t},\n\t\n\t\t_respectSize: function( data ) {\n\t\n\t\t\tvar o = this._vBoundaries,\n\t\t\t\ta = this.axis,\n\t\t\t\tismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),\n\t\t\t\tisminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),\n\t\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\t\tdh = this.position.top + this.size.height,\n\t\t\t\tcw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);\n\t\t\tif (isminw) {\n\t\t\t\tdata.width = o.minWidth;\n\t\t\t}\n\t\t\tif (isminh) {\n\t\t\t\tdata.height = o.minHeight;\n\t\t\t}\n\t\t\tif (ismaxw) {\n\t\t\t\tdata.width = o.maxWidth;\n\t\t\t}\n\t\t\tif (ismaxh) {\n\t\t\t\tdata.height = o.maxHeight;\n\t\t\t}\n\t\n\t\t\tif (isminw && cw) {\n\t\t\t\tdata.left = dw - o.minWidth;\n\t\t\t}\n\t\t\tif (ismaxw && cw) {\n\t\t\t\tdata.left = dw - o.maxWidth;\n\t\t\t}\n\t\t\tif (isminh && ch) {\n\t\t\t\tdata.top = dh - o.minHeight;\n\t\t\t}\n\t\t\tif (ismaxh && ch) {\n\t\t\t\tdata.top = dh - o.maxHeight;\n\t\t\t}\n\t\n\t\t\t// fixing jump error on top/left - bug #2330\n\t\t\tif (!data.width && !data.height && !data.left && data.top) {\n\t\t\t\tdata.top = null;\n\t\t\t} else if (!data.width && !data.height && !data.top && data.left) {\n\t\t\t\tdata.left = null;\n\t\t\t}\n\t\n\t\t\treturn data;\n\t\t},\n\t\n\t\t_proportionallyResize: function() {\n\t\n\t\t\tif (!this._proportionallyResizeElements.length) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar i, j, borders, paddings, prel,\n\t\t\t\telement = this.helper || this.element;\n\t\n\t\t\tfor ( i=0; i < this._proportionallyResizeElements.length; i++) {\n\t\n\t\t\t\tprel = this._proportionallyResizeElements[i];\n\t\n\t\t\t\tif (!this.borderDif) {\n\t\t\t\t\tthis.borderDif = [];\n\t\t\t\t\tborders = [prel.css(\"borderTopWidth\"), prel.css(\"borderRightWidth\"), prel.css(\"borderBottomWidth\"), prel.css(\"borderLeftWidth\")];\n\t\t\t\t\tpaddings = [prel.css(\"paddingTop\"), prel.css(\"paddingRight\"), prel.css(\"paddingBottom\"), prel.css(\"paddingLeft\")];\n\t\n\t\t\t\t\tfor ( j = 0; j < borders.length; j++ ) {\n\t\t\t\t\t\tthis.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tprel.css({\n\t\t\t\t\theight: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,\n\t\t\t\t\twidth: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0\n\t\t\t\t});\n\t\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_renderProxy: function() {\n\t\n\t\t\tvar el = this.element, o = this.options;\n\t\t\tthis.elementOffset = el.offset();\n\t\n\t\t\tif(this._helper) {\n\t\n\t\t\t\tthis.helper = this.helper || $(\"<div style='overflow:hidden;'></div>\");\n\t\n\t\t\t\tthis.helper.addClass(this._helper).css({\n\t\t\t\t\twidth: this.element.outerWidth() - 1,\n\t\t\t\t\theight: this.element.outerHeight() - 1,\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tleft: this.elementOffset.left +\"px\",\n\t\t\t\t\ttop: this.elementOffset.top +\"px\",\n\t\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t\t});\n\t\n\t\t\t\tthis.helper\n\t\t\t\t\t.appendTo(\"body\")\n\t\t\t\t\t.disableSelection();\n\t\n\t\t\t} else {\n\t\t\t\tthis.helper = this.element;\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_change: {\n\t\t\te: function(event, dx) {\n\t\t\t\treturn { width: this.originalSize.width + dx };\n\t\t\t},\n\t\t\tw: function(event, dx) {\n\t\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t\t},\n\t\t\tn: function(event, dx, dy) {\n\t\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t\t},\n\t\t\ts: function(event, dx, dy) {\n\t\t\t\treturn { height: this.originalSize.height + dy };\n\t\t\t},\n\t\t\tse: function(event, dx, dy) {\n\t\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t\t},\n\t\t\tsw: function(event, dx, dy) {\n\t\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t\t},\n\t\t\tne: function(event, dx, dy) {\n\t\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t\t},\n\t\t\tnw: function(event, dx, dy) {\n\t\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t\t}\n\t\t},\n\t\n\t\t_propagate: function(n, event) {\n\t\t\t$.ui.plugin.call(this, n, [event, this.ui()]);\n\t\t\t(n !== \"resize\" && this._trigger(n, event, this.ui()));\n\t\t},\n\t\n\t\tplugins: {},\n\t\n\t\tui: function() {\n\t\t\treturn {\n\t\t\t\toriginalElement: this.originalElement,\n\t\t\t\telement: this.element,\n\t\t\t\thelper: this.helper,\n\t\t\t\tposition: this.position,\n\t\t\t\tsize: this.size,\n\t\t\t\toriginalSize: this.originalSize,\n\t\t\t\toriginalPosition: this.originalPosition\n\t\t\t};\n\t\t}\n\t\n\t});\n\t\n\t/*\n\t * Resizable Extensions\n\t */\n\t\n\t$.ui.plugin.add(\"resizable\", \"animate\", {\n\t\n\t\tstop: function( event ) {\n\t\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\t\to = that.options,\n\t\t\t\tpr = that._proportionallyResizeElements,\n\t\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName),\n\t\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], \"left\") /* TODO - jump height */ ? 0 : that.sizeDiff.height,\n\t\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\t\tstyle = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },\n\t\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) + (that.position.left - that.originalPosition.left)) || null,\n\t\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) + (that.position.top - that.originalPosition.top)) || null;\n\t\n\t\t\tthat.element.animate(\n\t\t\t\t$.extend(style, top && left ? { top: top, left: left } : {}), {\n\t\t\t\t\tduration: o.animateDuration,\n\t\t\t\t\teasing: o.animateEasing,\n\t\t\t\t\tstep: function() {\n\t\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\twidth: parseInt(that.element.css(\"width\"), 10),\n\t\t\t\t\t\t\theight: parseInt(that.element.css(\"height\"), 10),\n\t\t\t\t\t\t\ttop: parseInt(that.element.css(\"top\"), 10),\n\t\t\t\t\t\t\tleft: parseInt(that.element.css(\"left\"), 10)\n\t\t\t\t\t\t};\n\t\n\t\t\t\t\t\tif (pr && pr.length) {\n\t\t\t\t\t\t\t$(pr[0]).css({ width: data.width, height: data.height });\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// propagating resize, and updating values for each animation step\n\t\t\t\t\t\tthat._updateCache(data);\n\t\t\t\t\t\tthat._propagate(\"resize\", event);\n\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t\n\t});\n\t\n\t$.ui.plugin.add(\"resizable\", \"containment\", {\n\t\n\t\tstart: function() {\n\t\t\tvar element, p, co, ch, cw, width, height,\n\t\t\t\tthat = $(this).data(\"ui-resizable\"),\n\t\t\t\to = that.options,\n\t\t\t\tel = that.element,\n\t\t\t\toc = o.containment,\n\t\t\t\tce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;\n\t\n\t\t\tif (!ce) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthat.containerElement = $(ce);\n\t\n\t\t\tif (/document/.test(oc) || oc === document) {\n\t\t\t\tthat.containerOffset = { left: 0, top: 0 };\n\t\t\t\tthat.containerPosition = { left: 0, top: 0 };\n\t\n\t\t\t\tthat.parentData = {\n\t\t\t\t\telement: $(document), left: 0, top: 0,\n\t\t\t\t\twidth: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\t// i'm a node, so compute top, left, right, bottom\n\t\t\telse {\n\t\t\t\telement = $(ce);\n\t\t\t\tp = [];\n\t\t\t\t$([ \"Top\", \"Right\", \"Left\", \"Bottom\" ]).each(function(i, name) { p[i] = num(element.css(\"padding\" + name)); });\n\t\n\t\t\t\tthat.containerOffset = element.offset();\n\t\t\t\tthat.containerPosition = element.position();\n\t\t\t\tthat.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };\n\t\n\t\t\t\tco = that.containerOffset;\n\t\t\t\tch = that.containerSize.height;\n\t\t\t\tcw = that.containerSize.width;\n\t\t\t\twidth = ($.ui.hasScroll(ce, \"left\") ? ce.scrollWidth : cw );\n\t\t\t\theight = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);\n\t\n\t\t\t\tthat.parentData = {\n\t\t\t\t\telement: ce, left: co.left, top: co.top, width: width, height: height\n\t\t\t\t};\n\t\t\t}\n\t\t},\n\t\n\t\tresize: function( event ) {\n\t\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\t\tthat = $(this).data(\"ui-resizable\"),\n\t\t\t\to = that.options,\n\t\t\t\tco = that.containerOffset, cp = that.position,\n\t\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\t\tcop = { top:0, left:0 }, ce = that.containerElement;\n\t\n\t\t\tif (ce[0] !== document && (/static/).test(ce.css(\"position\"))) {\n\t\t\t\tcop = co;\n\t\t\t}\n\t\n\t\t\tif (cp.left < (that._helper ? co.left : 0)) {\n\t\t\t\tthat.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));\n\t\t\t\tif (pRatio) {\n\t\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\t}\n\t\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t\t}\n\t\n\t\t\tif (cp.top < (that._helper ? co.top : 0)) {\n\t\t\t\tthat.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);\n\t\t\t\tif (pRatio) {\n\t\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\t}\n\t\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t\t}\n\t\n\t\t\tthat.offset.left = that.parentData.left+that.position.left;\n\t\t\tthat.offset.top = that.parentData.top+that.position.top;\n\t\n\t\t\twoset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );\n\t\t\thoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );\n\t\n\t\t\tisParent = that.containerElement.get(0) === that.element.parent().get(0);\n\t\t\tisOffsetRelative = /relative|absolute/.test(that.containerElement.css(\"position\"));\n\t\n\t\t\tif(isParent && isOffsetRelative) {\n\t\t\t\twoset -= that.parentData.left;\n\t\t\t}\n\t\n\t\t\tif (woset + that.size.width >= that.parentData.width) {\n\t\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\t\tif (pRatio) {\n\t\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif (hoset + that.size.height >= that.parentData.height) {\n\t\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\t\tif (pRatio) {\n\t\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\tstop: function(){\n\t\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\t\to = that.options,\n\t\t\t\tco = that.containerOffset,\n\t\t\t\tcop = that.containerPosition,\n\t\t\t\tce = that.containerElement,\n\t\t\t\thelper = $(that.helper),\n\t\t\t\tho = helper.offset(),\n\t\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\t\n\t\t\tif (that._helper && !o.animate && (/relative/).test(ce.css(\"position\"))) {\n\t\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\t\t\t}\n\t\n\t\t\tif (that._helper && !o.animate && (/static/).test(ce.css(\"position\"))) {\n\t\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\t\t\t}\n\t\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"resizable\", \"alsoResize\", {\n\t\n\t\tstart: function () {\n\t\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\t\to = that.options,\n\t\t\t\t_store = function (exp) {\n\t\t\t\t\t$(exp).each(function() {\n\t\t\t\t\t\tvar el = $(this);\n\t\t\t\t\t\tel.data(\"ui-resizable-alsoresize\", {\n\t\t\t\t\t\t\twidth: parseInt(el.width(), 10), height: parseInt(el.height(), 10),\n\t\t\t\t\t\t\tleft: parseInt(el.css(\"left\"), 10), top: parseInt(el.css(\"top\"), 10)\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t};\n\t\n\t\t\tif (typeof(o.alsoResize) === \"object\" && !o.alsoResize.parentNode) {\n\t\t\t\tif (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }\n\t\t\t\telse { $.each(o.alsoResize, function (exp) { _store(exp); }); }\n\t\t\t}else{\n\t\t\t\t_store(o.alsoResize);\n\t\t\t}\n\t\t},\n\t\n\t\tresize: function (event, ui) {\n\t\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\t\to = that.options,\n\t\t\t\tos = that.originalSize,\n\t\t\t\top = that.originalPosition,\n\t\t\t\tdelta = {\n\t\t\t\t\theight: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,\n\t\t\t\t\ttop: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0\n\t\t\t\t},\n\t\n\t\t\t\t_alsoResize = function (exp, c) {\n\t\t\t\t\t$(exp).each(function() {\n\t\t\t\t\t\tvar el = $(this), start = $(this).data(\"ui-resizable-alsoresize\"), style = {},\n\t\t\t\t\t\t\tcss = c && c.length ? c : el.parents(ui.originalElement[0]).length ? [\"width\", \"height\"] : [\"width\", \"height\", \"top\", \"left\"];\n\t\n\t\t\t\t\t\t$.each(css, function (i, prop) {\n\t\t\t\t\t\t\tvar sum = (start[prop]||0) + (delta[prop]||0);\n\t\t\t\t\t\t\tif (sum && sum >= 0) {\n\t\t\t\t\t\t\t\tstyle[prop] = sum || null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\n\t\t\t\t\t\tel.css(style);\n\t\t\t\t\t});\n\t\t\t\t};\n\t\n\t\t\tif (typeof(o.alsoResize) === \"object\" && !o.alsoResize.nodeType) {\n\t\t\t\t$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });\n\t\t\t}else{\n\t\t\t\t_alsoResize(o.alsoResize);\n\t\t\t}\n\t\t},\n\t\n\t\tstop: function () {\n\t\t\t$(this).removeData(\"resizable-alsoresize\");\n\t\t}\n\t});\n\t\n\t$.ui.plugin.add(\"resizable\", \"ghost\", {\n\t\n\t\tstart: function() {\n\t\n\t\t\tvar that = $(this).data(\"ui-resizable\"), o = that.options, cs = that.size;\n\t\n\t\t\tthat.ghost = that.originalElement.clone();\n\t\t\tthat.ghost\n\t\t\t\t.css({ opacity: 0.25, display: \"block\", position: \"relative\", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })\n\t\t\t\t.addClass(\"ui-resizable-ghost\")\n\t\t\t\t.addClass(typeof o.ghost === \"string\" ? o.ghost : \"\");\n\t\n\t\t\tthat.ghost.appendTo(that.helper);\n\t\n\t\t},\n\t\n\t\tresize: function(){\n\t\t\tvar that = $(this).data(\"ui-resizable\");\n\t\t\tif (that.ghost) {\n\t\t\t\tthat.ghost.css({ position: \"relative\", height: that.size.height, width: that.size.width });\n\t\t\t}\n\t\t},\n\t\n\t\tstop: function() {\n\t\t\tvar that = $(this).data(\"ui-resizable\");\n\t\t\tif (that.ghost && that.helper) {\n\t\t\t\tthat.helper.get(0).removeChild(that.ghost.get(0));\n\t\t\t}\n\t\t}\n\t\n\t});\n\t\n\t$.ui.plugin.add(\"resizable\", \"grid\", {\n\t\n\t\tresize: function() {\n\t\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\t\to = that.options,\n\t\t\t\tcs = that.size,\n\t\t\t\tos = that.originalSize,\n\t\t\t\top = that.originalPosition,\n\t\t\t\ta = that.axis,\n\t\t\t\tgrid = typeof o.grid === \"number\" ? [o.grid, o.grid] : o.grid,\n\t\t\t\tgridX = (grid[0]||1),\n\t\t\t\tgridY = (grid[1]||1),\n\t\t\t\tox = Math.round((cs.width - os.width) / gridX) * gridX,\n\t\t\t\toy = Math.round((cs.height - os.height) / gridY) * gridY,\n\t\t\t\tnewWidth = os.width + ox,\n\t\t\t\tnewHeight = os.height + oy,\n\t\t\t\tisMaxWidth = o.maxWidth && (o.maxWidth < newWidth),\n\t\t\t\tisMaxHeight = o.maxHeight && (o.maxHeight < newHeight),\n\t\t\t\tisMinWidth = o.minWidth && (o.minWidth > newWidth),\n\t\t\t\tisMinHeight = o.minHeight && (o.minHeight > newHeight);\n\t\n\t\t\to.grid = grid;\n\t\n\t\t\tif (isMinWidth) {\n\t\t\t\tnewWidth = newWidth + gridX;\n\t\t\t}\n\t\t\tif (isMinHeight) {\n\t\t\t\tnewHeight = newHeight + gridY;\n\t\t\t}\n\t\t\tif (isMaxWidth) {\n\t\t\t\tnewWidth = newWidth - gridX;\n\t\t\t}\n\t\t\tif (isMaxHeight) {\n\t\t\t\tnewHeight = newHeight - gridY;\n\t\t\t}\n\t\n\t\t\tif (/^(se|s|e)$/.test(a)) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t} else if (/^(ne)$/.test(a)) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top - oy;\n\t\t\t} else if (/^(sw)$/.test(a)) {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.left = op.left - ox;\n\t\t\t} else {\n\t\t\t\tthat.size.width = newWidth;\n\t\t\t\tthat.size.height = newHeight;\n\t\t\t\tthat.position.top = op.top - oy;\n\t\t\t\tthat.position.left = op.left - ox;\n\t\t\t}\n\t\t}\n\t\n\t});\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.widget(\"ui.selectable\", $.ui.mouse, {\n\t\tversion: \"1.10.3\",\n\t\toptions: {\n\t\t\tappendTo: \"body\",\n\t\t\tautoRefresh: true,\n\t\t\tdistance: 0,\n\t\t\tfilter: \"*\",\n\t\t\ttolerance: \"touch\",\n\t\n\t\t\t// callbacks\n\t\t\tselected: null,\n\t\t\tselecting: null,\n\t\t\tstart: null,\n\t\t\tstop: null,\n\t\t\tunselected: null,\n\t\t\tunselecting: null\n\t\t},\n\t\t_create: function() {\n\t\t\tvar selectees,\n\t\t\t\tthat = this;\n\t\n\t\t\tthis.element.addClass(\"ui-selectable\");\n\t\n\t\t\tthis.dragged = false;\n\t\n\t\t\t// cache selectee children based on filter\n\t\t\tthis.refresh = function() {\n\t\t\t\tselectees = $(that.options.filter, that.element[0]);\n\t\t\t\tselectees.addClass(\"ui-selectee\");\n\t\t\t\tselectees.each(function() {\n\t\t\t\t\tvar $this = $(this),\n\t\t\t\t\t\tpos = $this.offset();\n\t\t\t\t\t$.data(this, \"selectable-item\", {\n\t\t\t\t\t\telement: this,\n\t\t\t\t\t\t$element: $this,\n\t\t\t\t\t\tleft: pos.left,\n\t\t\t\t\t\ttop: pos.top,\n\t\t\t\t\t\tright: pos.left + $this.outerWidth(),\n\t\t\t\t\t\tbottom: pos.top + $this.outerHeight(),\n\t\t\t\t\t\tstartselected: false,\n\t\t\t\t\t\tselected: $this.hasClass(\"ui-selected\"),\n\t\t\t\t\t\tselecting: $this.hasClass(\"ui-selecting\"),\n\t\t\t\t\t\tunselecting: $this.hasClass(\"ui-unselecting\")\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t};\n\t\t\tthis.refresh();\n\t\n\t\t\tthis.selectees = selectees.addClass(\"ui-selectee\");\n\t\n\t\t\tthis._mouseInit();\n\t\n\t\t\tthis.helper = $(\"<div class='ui-selectable-helper'></div>\");\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.selectees\n\t\t\t\t.removeClass(\"ui-selectee\")\n\t\t\t\t.removeData(\"selectable-item\");\n\t\t\tthis.element\n\t\t\t\t.removeClass(\"ui-selectable ui-selectable-disabled\");\n\t\t\tthis._mouseDestroy();\n\t\t},\n\t\n\t\t_mouseStart: function(event) {\n\t\t\tvar that = this,\n\t\t\t\toptions = this.options;\n\t\n\t\t\tthis.opos = [event.pageX, event.pageY];\n\t\n\t\t\tif (this.options.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis.selectees = $(options.filter, this.element[0]);\n\t\n\t\t\tthis._trigger(\"start\", event);\n\t\n\t\t\t$(options.appendTo).append(this.helper);\n\t\t\t// position helper (lasso)\n\t\t\tthis.helper.css({\n\t\t\t\t\"left\": event.pageX,\n\t\t\t\t\"top\": event.pageY,\n\t\t\t\t\"width\": 0,\n\t\t\t\t\"height\": 0\n\t\t\t});\n\t\n\t\t\tif (options.autoRefresh) {\n\t\t\t\tthis.refresh();\n\t\t\t}\n\t\n\t\t\tthis.selectees.filter(\".ui-selected\").each(function() {\n\t\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\t\tselectee.startselected = true;\n\t\t\t\tif (!event.metaKey && !event.ctrlKey) {\n\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\tselectee.selected = false;\n\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\t$(event.target).parents().addBack().each(function() {\n\t\t\t\tvar doSelect,\n\t\t\t\t\tselectee = $.data(this, \"selectable-item\");\n\t\t\t\tif (selectee) {\n\t\t\t\t\tdoSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass(\"ui-selected\");\n\t\t\t\t\tselectee.$element\n\t\t\t\t\t\t.removeClass(doSelect ? \"ui-unselecting\" : \"ui-selected\")\n\t\t\t\t\t\t.addClass(doSelect ? \"ui-selecting\" : \"ui-unselecting\");\n\t\t\t\t\tselectee.unselecting = !doSelect;\n\t\t\t\t\tselectee.selecting = doSelect;\n\t\t\t\t\tselectee.selected = doSelect;\n\t\t\t\t\t// selectable (UN)SELECTING callback\n\t\t\t\t\tif (doSelect) {\n\t\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t},\n\t\n\t\t_mouseDrag: function(event) {\n\t\n\t\t\tthis.dragged = true;\n\t\n\t\t\tif (this.options.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar tmp,\n\t\t\t\tthat = this,\n\t\t\t\toptions = this.options,\n\t\t\t\tx1 = this.opos[0],\n\t\t\t\ty1 = this.opos[1],\n\t\t\t\tx2 = event.pageX,\n\t\t\t\ty2 = event.pageY;\n\t\n\t\t\tif (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }\n\t\t\tif (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }\n\t\t\tthis.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});\n\t\n\t\t\tthis.selectees.each(function() {\n\t\t\t\tvar selectee = $.data(this, \"selectable-item\"),\n\t\t\t\t\thit = false;\n\t\n\t\t\t\t//prevent helper from being selected if appendTo: selectable\n\t\t\t\tif (!selectee || selectee.element === that.element[0]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tif (options.tolerance === \"touch\") {\n\t\t\t\t\thit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );\n\t\t\t\t} else if (options.tolerance === \"fit\") {\n\t\t\t\t\thit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);\n\t\t\t\t}\n\t\n\t\t\t\tif (hit) {\n\t\t\t\t\t// SELECT\n\t\t\t\t\tif (selectee.selected) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\t\tselectee.selected = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (selectee.unselecting) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\t\t\t\tselectee.unselecting = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (!selectee.selecting) {\n\t\t\t\t\t\tselectee.$element.addClass(\"ui-selecting\");\n\t\t\t\t\t\tselectee.selecting = true;\n\t\t\t\t\t\t// selectable SELECTING callback\n\t\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// UNSELECT\n\t\t\t\t\tif (selectee.selecting) {\n\t\t\t\t\t\tif ((event.metaKey || event.ctrlKey) && selectee.startselected) {\n\t\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\t\tselectee.$element.addClass(\"ui-selected\");\n\t\t\t\t\t\t\tselectee.selected = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\t\tif (selectee.startselected) {\n\t\t\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (selectee.selected) {\n\t\t\t\t\t\tif (!event.metaKey && !event.ctrlKey && !selectee.startselected) {\n\t\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\t\t\tselectee.selected = false;\n\t\n\t\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_mouseStop: function(event) {\n\t\t\tvar that = this;\n\t\n\t\t\tthis.dragged = false;\n\t\n\t\t\t$(\".ui-unselecting\", this.element[0]).each(function() {\n\t\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\t\tselectee.unselecting = false;\n\t\t\t\tselectee.startselected = false;\n\t\t\t\tthat._trigger(\"unselected\", event, {\n\t\t\t\t\tunselected: selectee.element\n\t\t\t\t});\n\t\t\t});\n\t\t\t$(\".ui-selecting\", this.element[0]).each(function() {\n\t\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\t\tselectee.$element.removeClass(\"ui-selecting\").addClass(\"ui-selected\");\n\t\t\t\tselectee.selecting = false;\n\t\t\t\tselectee.selected = true;\n\t\t\t\tselectee.startselected = true;\n\t\t\t\tthat._trigger(\"selected\", event, {\n\t\t\t\t\tselected: selectee.element\n\t\t\t\t});\n\t\t\t});\n\t\t\tthis._trigger(\"stop\", event);\n\t\n\t\t\tthis.helper.remove();\n\t\n\t\t\treturn false;\n\t\t}\n\t\n\t});\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t/*jshint loopfunc: true */\n\t\n\tfunction isOverAxis( x, reference, size ) {\n\t\treturn ( x > reference ) && ( x < ( reference + size ) );\n\t}\n\t\n\tfunction isFloating(item) {\n\t\treturn (/left|right/).test(item.css(\"float\")) || (/inline|table-cell/).test(item.css(\"display\"));\n\t}\n\t\n\t$.widget(\"ui.sortable\", $.ui.mouse, {\n\t\tversion: \"1.10.3\",\n\t\twidgetEventPrefix: \"sort\",\n\t\tready: false,\n\t\toptions: {\n\t\t\tappendTo: \"parent\",\n\t\t\taxis: false,\n\t\t\tconnectWith: false,\n\t\t\tcontainment: false,\n\t\t\tcursor: \"auto\",\n\t\t\tcursorAt: false,\n\t\t\tdropOnEmpty: true,\n\t\t\tforcePlaceholderSize: false,\n\t\t\tforceHelperSize: false,\n\t\t\tgrid: false,\n\t\t\thandle: false,\n\t\t\thelper: \"original\",\n\t\t\titems: \"> *\",\n\t\t\topacity: false,\n\t\t\tplaceholder: false,\n\t\t\trevert: false,\n\t\t\tscroll: true,\n\t\t\tscrollSensitivity: 20,\n\t\t\tscrollSpeed: 20,\n\t\t\tscope: \"default\",\n\t\t\ttolerance: \"intersect\",\n\t\t\tzIndex: 1000,\n\t\n\t\t\t// callbacks\n\t\t\tactivate: null,\n\t\t\tbeforeStop: null,\n\t\t\tchange: null,\n\t\t\tdeactivate: null,\n\t\t\tout: null,\n\t\t\tover: null,\n\t\t\treceive: null,\n\t\t\tremove: null,\n\t\t\tsort: null,\n\t\t\tstart: null,\n\t\t\tstop: null,\n\t\t\tupdate: null\n\t\t},\n\t\t_create: function() {\n\t\n\t\t\tvar o = this.options;\n\t\t\tthis.containerCache = {};\n\t\t\tthis.element.addClass(\"ui-sortable\");\n\t\n\t\t\t//Get the items\n\t\t\tthis.refresh();\n\t\n\t\t\t//Let's determine if the items are being displayed horizontally\n\t\t\tthis.floating = this.items.length ? o.axis === \"x\" || isFloating(this.items[0].item) : false;\n\t\n\t\t\t//Let's determine the parent's offset\n\t\t\tthis.offset = this.element.offset();\n\t\n\t\t\t//Initialize mouse events for interaction\n\t\t\tthis._mouseInit();\n\t\n\t\t\t//We're ready to go\n\t\t\tthis.ready = true;\n\t\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.element\n\t\t\t\t.removeClass(\"ui-sortable ui-sortable-disabled\");\n\t\t\tthis._mouseDestroy();\n\t\n\t\t\tfor ( var i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.items[i].item.removeData(this.widgetName + \"-item\");\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\t},\n\t\n\t\t_setOption: function(key, value){\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\tthis.options[ key ] = value;\n\t\n\t\t\t\tthis.widget().toggleClass( \"ui-sortable-disabled\", !!value );\n\t\t\t} else {\n\t\t\t\t// Don't call widget base _setOption for disable as it adds ui-state-disabled class\n\t\t\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t\t\t}\n\t\t},\n\t\n\t\t_mouseCapture: function(event, overrideHandle) {\n\t\t\tvar currentItem = null,\n\t\t\t\tvalidHandle = false,\n\t\t\t\tthat = this;\n\t\n\t\t\tif (this.reverting) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tif(this.options.disabled || this.options.type === \"static\") {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\t//We have to refresh the items data once first\n\t\t\tthis._refreshItems(event);\n\t\n\t\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\t\t$(event.target).parents().each(function() {\n\t\t\t\tif($.data(this, that.widgetName + \"-item\") === that) {\n\t\t\t\t\tcurrentItem = $(this);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif($.data(event.target, that.widgetName + \"-item\") === that) {\n\t\t\t\tcurrentItem = $(event.target);\n\t\t\t}\n\t\n\t\t\tif(!currentItem) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(this.options.handle && !overrideHandle) {\n\t\t\t\t$(this.options.handle, currentItem).find(\"*\").addBack().each(function() {\n\t\t\t\t\tif(this === event.target) {\n\t\t\t\t\t\tvalidHandle = true;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif(!validHandle) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tthis.currentItem = currentItem;\n\t\t\tthis._removeCurrentsFromItems();\n\t\t\treturn true;\n\t\n\t\t},\n\t\n\t\t_mouseStart: function(event, overrideHandle, noActivation) {\n\t\n\t\t\tvar i, body,\n\t\t\t\to = this.options;\n\t\n\t\t\tthis.currentContainer = this;\n\t\n\t\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture\n\t\t\tthis.refreshPositions();\n\t\n\t\t\t//Create and append the visible helper\n\t\t\tthis.helper = this._createHelper(event);\n\t\n\t\t\t//Cache the helper size\n\t\t\tthis._cacheHelperProportions();\n\t\n\t\t\t/*\n\t\t\t * - Position generation -\n\t\t\t * This block generates everything position related - it's the core of draggables.\n\t\t\t */\n\t\n\t\t\t//Cache the margins of the original element\n\t\t\tthis._cacheMargins();\n\t\n\t\t\t//Get the next scrolling parent\n\t\t\tthis.scrollParent = this.helper.scrollParent();\n\t\n\t\t\t//The element's absolute position on the page minus margins\n\t\t\tthis.offset = this.currentItem.offset();\n\t\t\tthis.offset = {\n\t\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\t\tleft: this.offset.left - this.margins.left\n\t\t\t};\n\t\n\t\t\t$.extend(this.offset, {\n\t\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t\t},\n\t\t\t\tparent: this._getParentOffset(),\n\t\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t\t});\n\t\n\t\t\t// Only after we got the offset, we can change the helper's position to absolute\n\t\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\t\tthis.helper.css(\"position\", \"absolute\");\n\t\t\tthis.cssPosition = this.helper.css(\"position\");\n\t\n\t\t\t//Generate the original position\n\t\t\tthis.originalPosition = this._generatePosition(event);\n\t\t\tthis.originalPageX = event.pageX;\n\t\t\tthis.originalPageY = event.pageY;\n\t\n\t\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\t\n\t\t\t//Cache the former DOM position\n\t\t\tthis.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };\n\t\n\t\t\t//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way\n\t\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\t\tthis.currentItem.hide();\n\t\t\t}\n\t\n\t\t\t//Create the placeholder\n\t\t\tthis._createPlaceholder();\n\t\n\t\t\t//Set a containment if given in the options\n\t\t\tif(o.containment) {\n\t\t\t\tthis._setContainment();\n\t\t\t}\n\t\n\t\t\tif( o.cursor && o.cursor !== \"auto\" ) { // cursor option\n\t\t\t\tbody = this.document.find( \"body\" );\n\t\n\t\t\t\t// support: IE\n\t\t\t\tthis.storedCursor = body.css( \"cursor\" );\n\t\t\t\tbody.css( \"cursor\", o.cursor );\n\t\n\t\t\t\tthis.storedStylesheet = $( \"<style>*{ cursor: \"+o.cursor+\" !important; }</style>\" ).appendTo( body );\n\t\t\t}\n\t\n\t\t\tif(o.opacity) { // opacity option\n\t\t\t\tif (this.helper.css(\"opacity\")) {\n\t\t\t\t\tthis._storedOpacity = this.helper.css(\"opacity\");\n\t\t\t\t}\n\t\t\t\tthis.helper.css(\"opacity\", o.opacity);\n\t\t\t}\n\t\n\t\t\tif(o.zIndex) { // zIndex option\n\t\t\t\tif (this.helper.css(\"zIndex\")) {\n\t\t\t\t\tthis._storedZIndex = this.helper.css(\"zIndex\");\n\t\t\t\t}\n\t\t\t\tthis.helper.css(\"zIndex\", o.zIndex);\n\t\t\t}\n\t\n\t\t\t//Prepare scrolling\n\t\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\t\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t\t}\n\t\n\t\t\t//Call callbacks\n\t\t\tthis._trigger(\"start\", event, this._uiHash());\n\t\n\t\t\t//Recache the helper size\n\t\t\tif(!this._preserveHelperProportions) {\n\t\t\t\tthis._cacheHelperProportions();\n\t\t\t}\n\t\n\t\n\t\t\t//Post \"activate\" events to possible containers\n\t\t\tif( !noActivation ) {\n\t\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\t\tthis.containers[ i ]._trigger( \"activate\", event, this._uiHash( this ) );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t//Prepare possible droppables\n\t\t\tif($.ui.ddmanager) {\n\t\t\t\t$.ui.ddmanager.current = this;\n\t\t\t}\n\t\n\t\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t\t}\n\t\n\t\t\tthis.dragging = true;\n\t\n\t\t\tthis.helper.addClass(\"ui-sortable-helper\");\n\t\t\tthis._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\t\t\treturn true;\n\t\n\t\t},\n\t\n\t\t_mouseDrag: function(event) {\n\t\t\tvar i, item, itemElement, intersection,\n\t\t\t\to = this.options,\n\t\t\t\tscrolled = false;\n\t\n\t\t\t//Compute the helpers position\n\t\t\tthis.position = this._generatePosition(event);\n\t\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\t\n\t\t\tif (!this.lastPositionAbs) {\n\t\t\t\tthis.lastPositionAbs = this.positionAbs;\n\t\t\t}\n\t\n\t\t\t//Do scrolling\n\t\t\tif(this.options.scroll) {\n\t\t\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\t\n\t\t\t\t\tif((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n\t\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\t\t} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {\n\t\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n\t\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\t\t} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {\n\t\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t\t\t}\n\t\n\t\t\t\t} else {\n\t\n\t\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\t\t} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\t\t} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t\t\t}\n\t\n\t\t\t\t}\n\t\n\t\t\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t//Regenerate the absolute position used for position checks\n\t\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\t\n\t\t\t//Set the helper position\n\t\t\tif(!this.options.axis || this.options.axis !== \"y\") {\n\t\t\t\tthis.helper[0].style.left = this.position.left+\"px\";\n\t\t\t}\n\t\t\tif(!this.options.axis || this.options.axis !== \"x\") {\n\t\t\t\tthis.helper[0].style.top = this.position.top+\"px\";\n\t\t\t}\n\t\n\t\t\t//Rearrange\n\t\t\tfor (i = this.items.length - 1; i >= 0; i--) {\n\t\n\t\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\t\titem = this.items[i];\n\t\t\t\titemElement = item.item[0];\n\t\t\t\tintersection = this._intersectsWithPointer(item);\n\t\t\t\tif (!intersection) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\t// Only put the placeholder inside the current Container, skip all\n\t\t\t\t// items form other containers. This works because when moving\n\t\t\t\t// an item from one container to another the\n\t\t\t\t// currentContainer is switched before the placeholder is moved.\n\t\t\t\t//\n\t\t\t\t// Without this moving items in \"sub-sortables\" can cause the placeholder to jitter\n\t\t\t\t// beetween the outer and inner container.\n\t\t\t\tif (item.instance !== this.currentContainer) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\t// cannot intersect with itself\n\t\t\t\t// no useless actions that have been done before\n\t\t\t\t// no action if the item moved is the parent of the item checked\n\t\t\t\tif (itemElement !== this.currentItem[0] &&\n\t\t\t\t\tthis.placeholder[intersection === 1 ? \"next\" : \"prev\"]()[0] !== itemElement &&\n\t\t\t\t\t!$.contains(this.placeholder[0], itemElement) &&\n\t\t\t\t\t(this.options.type === \"semi-dynamic\" ? !$.contains(this.element[0], itemElement) : true)\n\t\t\t\t) {\n\t\n\t\t\t\t\tthis.direction = intersection === 1 ? \"down\" : \"up\";\n\t\n\t\t\t\t\tif (this.options.tolerance === \"pointer\" || this._intersectsWithSides(item)) {\n\t\t\t\t\t\tthis._rearrange(event, item);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t//Post events to containers\n\t\t\tthis._contactContainers(event);\n\t\n\t\t\t//Interconnect with droppables\n\t\t\tif($.ui.ddmanager) {\n\t\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t\t}\n\t\n\t\t\t//Call callbacks\n\t\t\tthis._trigger(\"sort\", event, this._uiHash());\n\t\n\t\t\tthis.lastPositionAbs = this.positionAbs;\n\t\t\treturn false;\n\t\n\t\t},\n\t\n\t\t_mouseStop: function(event, noPropagation) {\n\t\n\t\t\tif(!event) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t//If we are using droppables, inform the manager about the drop\n\t\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\t\t$.ui.ddmanager.drop(this, event);\n\t\t\t}\n\t\n\t\t\tif(this.options.revert) {\n\t\t\t\tvar that = this,\n\t\t\t\t\tcur = this.placeholder.offset(),\n\t\t\t\t\taxis = this.options.axis,\n\t\t\t\t\tanimation = {};\n\t\n\t\t\t\tif ( !axis || axis === \"x\" ) {\n\t\t\t\t\tanimation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);\n\t\t\t\t}\n\t\t\t\tif ( !axis || axis === \"y\" ) {\n\t\t\t\t\tanimation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);\n\t\t\t\t}\n\t\t\t\tthis.reverting = true;\n\t\t\t\t$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {\n\t\t\t\t\tthat._clear(event);\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis._clear(event, noPropagation);\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\n\t\t},\n\t\n\t\tcancel: function() {\n\t\n\t\t\tif(this.dragging) {\n\t\n\t\t\t\tthis._mouseUp({ target: null });\n\t\n\t\t\t\tif(this.options.helper === \"original\") {\n\t\t\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t\t\t} else {\n\t\t\t\t\tthis.currentItem.show();\n\t\t\t\t}\n\t\n\t\t\t\t//Post deactivating events to containers\n\t\t\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\t\tthis.containers[i]._trigger(\"deactivate\", null, this._uiHash(this));\n\t\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\t\tthis.containers[i]._trigger(\"out\", null, this._uiHash(this));\n\t\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\tif (this.placeholder) {\n\t\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\t\t\tif(this.placeholder[0].parentNode) {\n\t\t\t\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\t\t\t\t}\n\t\t\t\tif(this.options.helper !== \"original\" && this.helper && this.helper[0].parentNode) {\n\t\t\t\t\tthis.helper.remove();\n\t\t\t\t}\n\t\n\t\t\t\t$.extend(this, {\n\t\t\t\t\thelper: null,\n\t\t\t\t\tdragging: false,\n\t\t\t\t\treverting: false,\n\t\t\t\t\t_noFinalSort: null\n\t\t\t\t});\n\t\n\t\t\t\tif(this.domPosition.prev) {\n\t\t\t\t\t$(this.domPosition.prev).after(this.currentItem);\n\t\t\t\t} else {\n\t\t\t\t\t$(this.domPosition.parent).prepend(this.currentItem);\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\n\t\t},\n\t\n\t\tserialize: function(o) {\n\t\n\t\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\t\tstr = [];\n\t\t\to = o || {};\n\t\n\t\t\t$(items).each(function() {\n\t\t\t\tvar res = ($(o.item || this).attr(o.attribute || \"id\") || \"\").match(o.expression || (/(.+)[\\-=_](.+)/));\n\t\t\t\tif (res) {\n\t\t\t\t\tstr.push((o.key || res[1]+\"[]\")+\"=\"+(o.key && o.expression ? res[1] : res[2]));\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tif(!str.length && o.key) {\n\t\t\t\tstr.push(o.key + \"=\");\n\t\t\t}\n\t\n\t\t\treturn str.join(\"&\");\n\t\n\t\t},\n\t\n\t\ttoArray: function(o) {\n\t\n\t\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\t\tret = [];\n\t\n\t\t\to = o || {};\n\t\n\t\t\titems.each(function() { ret.push($(o.item || this).attr(o.attribute || \"id\") || \"\"); });\n\t\t\treturn ret;\n\t\n\t\t},\n\t\n\t\t/* Be careful with the following core functions */\n\t\t_intersectsWith: function(item) {\n\t\n\t\t\tvar x1 = this.positionAbs.left,\n\t\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\t\ty1 = this.positionAbs.top,\n\t\t\t\ty2 = y1 + this.helperProportions.height,\n\t\t\t\tl = item.left,\n\t\t\t\tr = l + item.width,\n\t\t\t\tt = item.top,\n\t\t\t\tb = t + item.height,\n\t\t\t\tdyClick = this.offset.click.top,\n\t\t\t\tdxClick = this.offset.click.left,\n\t\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),\n\t\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),\n\t\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\t\n\t\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\t\tthis.options.forcePointerForContainers ||\n\t\t\t\t(this.options.tolerance !== \"pointer\" && this.helperProportions[this.floating ? \"width\" : \"height\"] > item[this.floating ? \"width\" : \"height\"])\n\t\t\t) {\n\t\t\t\treturn isOverElement;\n\t\t\t} else {\n\t\n\t\t\t\treturn (l < x1 + (this.helperProportions.width / 2) && // Right Half\n\t\t\t\t\tx2 - (this.helperProportions.width / 2) < r && // Left Half\n\t\t\t\t\tt < y1 + (this.helperProportions.height / 2) && // Bottom Half\n\t\t\t\t\ty2 - (this.helperProportions.height / 2) < b ); // Top Half\n\t\n\t\t\t}\n\t\t},\n\t\n\t\t_intersectsWithPointer: function(item) {\n\t\n\t\t\tvar isOverElementHeight = (this.options.axis === \"x\") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n\t\t\t\tisOverElementWidth = (this.options.axis === \"y\") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),\n\t\t\t\tisOverElement = isOverElementHeight && isOverElementWidth,\n\t\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\t\n\t\t\tif (!isOverElement) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\treturn this.floating ?\n\t\t\t\t( ((horizontalDirection && horizontalDirection === \"right\") || verticalDirection === \"down\") ? 2 : 1 )\n\t\t\t\t: ( verticalDirection && (verticalDirection === \"down\" ? 2 : 1) );\n\t\n\t\t},\n\t\n\t\t_intersectsWithSides: function(item) {\n\t\n\t\t\tvar isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),\n\t\t\t\tisOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),\n\t\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\t\n\t\t\tif (this.floating && horizontalDirection) {\n\t\t\t\treturn ((horizontalDirection === \"right\" && isOverRightHalf) || (horizontalDirection === \"left\" && !isOverRightHalf));\n\t\t\t} else {\n\t\t\t\treturn verticalDirection && ((verticalDirection === \"down\" && isOverBottomHalf) || (verticalDirection === \"up\" && !isOverBottomHalf));\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_getDragVerticalDirection: function() {\n\t\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\t\treturn delta !== 0 && (delta > 0 ? \"down\" : \"up\");\n\t\t},\n\t\n\t\t_getDragHorizontalDirection: function() {\n\t\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\t\treturn delta !== 0 && (delta > 0 ? \"right\" : \"left\");\n\t\t},\n\t\n\t\trefresh: function(event) {\n\t\t\tthis._refreshItems(event);\n\t\t\tthis.refreshPositions();\n\t\t\treturn this;\n\t\t},\n\t\n\t\t_connectWith: function() {\n\t\t\tvar options = this.options;\n\t\t\treturn options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;\n\t\t},\n\t\n\t\t_getItemsAsjQuery: function(connected) {\n\t\n\t\t\tvar i, j, cur, inst,\n\t\t\t\titems = [],\n\t\t\t\tqueries = [],\n\t\t\t\tconnectWith = this._connectWith();\n\t\n\t\t\tif(connectWith && connected) {\n\t\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\t\tfor ( j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), inst]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tqueries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), this]);\n\t\n\t\t\tfor (i = queries.length - 1; i >= 0; i--){\n\t\t\t\tqueries[i][0].each(function() {\n\t\t\t\t\titems.push(this);\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\treturn $(items);\n\t\n\t\t},\n\t\n\t\t_removeCurrentsFromItems: function() {\n\t\n\t\t\tvar list = this.currentItem.find(\":data(\" + this.widgetName + \"-item)\");\n\t\n\t\t\tthis.items = $.grep(this.items, function (item) {\n\t\t\t\tfor (var j=0; j < list.length; j++) {\n\t\t\t\t\tif(list[j] === item.item[0]) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t});\n\t\n\t\t},\n\t\n\t\t_refreshItems: function(event) {\n\t\n\t\t\tthis.items = [];\n\t\t\tthis.containers = [this];\n\t\n\t\t\tvar i, j, cur, inst, targetData, _queries, item, queriesLength,\n\t\t\t\titems = this.items,\n\t\t\t\tqueries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],\n\t\t\t\tconnectWith = this._connectWith();\n\t\n\t\t\tif(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down\n\t\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\t\tfor (j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);\n\t\t\t\t\t\t\tthis.containers.push(inst);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tfor (i = queries.length - 1; i >= 0; i--) {\n\t\t\t\ttargetData = queries[i][1];\n\t\t\t\t_queries = queries[i][0];\n\t\n\t\t\t\tfor (j=0, queriesLength = _queries.length; j < queriesLength; j++) {\n\t\t\t\t\titem = $(_queries[j]);\n\t\n\t\t\t\t\titem.data(this.widgetName + \"-item\", targetData); // Data for target checking (mouse manager)\n\t\n\t\t\t\t\titems.push({\n\t\t\t\t\t\titem: item,\n\t\t\t\t\t\tinstance: targetData,\n\t\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t},\n\t\n\t\trefreshPositions: function(fast) {\n\t\n\t\t\t//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change\n\t\t\tif(this.offsetParent && this.helper) {\n\t\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t\t}\n\t\n\t\t\tvar i, item, t, p;\n\t\n\t\t\tfor (i = this.items.length - 1; i >= 0; i--){\n\t\t\t\titem = this.items[i];\n\t\n\t\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\t\tif(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\tt = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;\n\t\n\t\t\t\tif (!fast) {\n\t\t\t\t\titem.width = t.outerWidth();\n\t\t\t\t\titem.height = t.outerHeight();\n\t\t\t\t}\n\t\n\t\t\t\tp = t.offset();\n\t\t\t\titem.left = p.left;\n\t\t\t\titem.top = p.top;\n\t\t\t}\n\t\n\t\t\tif(this.options.custom && this.options.custom.refreshContainers) {\n\t\t\t\tthis.options.custom.refreshContainers.call(this);\n\t\t\t} else {\n\t\t\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\t\tp = this.containers[i].element.offset();\n\t\t\t\t\tthis.containers[i].containerCache.left = p.left;\n\t\t\t\t\tthis.containers[i].containerCache.top = p.top;\n\t\t\t\t\tthis.containers[i].containerCache.width\t= this.containers[i].element.outerWidth();\n\t\t\t\t\tthis.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn this;\n\t\t},\n\t\n\t\t_createPlaceholder: function(that) {\n\t\t\tthat = that || this;\n\t\t\tvar className,\n\t\t\t\to = that.options;\n\t\n\t\t\tif(!o.placeholder || o.placeholder.constructor === String) {\n\t\t\t\tclassName = o.placeholder;\n\t\t\t\to.placeholder = {\n\t\t\t\t\telement: function() {\n\t\n\t\t\t\t\t\tvar nodeName = that.currentItem[0].nodeName.toLowerCase(),\n\t\t\t\t\t\t\telement = $( \"<\" + nodeName + \">\", that.document[0] )\n\t\t\t\t\t\t\t\t.addClass(className || that.currentItem[0].className+\" ui-sortable-placeholder\")\n\t\t\t\t\t\t\t\t.removeClass(\"ui-sortable-helper\");\n\t\n\t\t\t\t\t\tif ( nodeName === \"tr\" ) {\n\t\t\t\t\t\t\tthat.currentItem.children().each(function() {\n\t\t\t\t\t\t\t\t$( \"<td>&#160;</td>\", that.document[0] )\n\t\t\t\t\t\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t\t\t\t\t\t.appendTo( element );\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else if ( nodeName === \"img\" ) {\n\t\t\t\t\t\t\telement.attr( \"src\", that.currentItem.attr( \"src\" ) );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif ( !className ) {\n\t\t\t\t\t\t\telement.css( \"visibility\", \"hidden\" );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\treturn element;\n\t\t\t\t\t},\n\t\t\t\t\tupdate: function(container, p) {\n\t\n\t\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that\n\t\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified\n\t\t\t\t\t\tif(className && !o.forcePlaceholderSize) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item\n\t\t\t\t\t\tif(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css(\"paddingTop\")||0, 10) - parseInt(that.currentItem.css(\"paddingBottom\")||0, 10)); }\n\t\t\t\t\t\tif(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css(\"paddingLeft\")||0, 10) - parseInt(that.currentItem.css(\"paddingRight\")||0, 10)); }\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\t//Create the placeholder\n\t\t\tthat.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));\n\t\n\t\t\t//Append it after the actual current item\n\t\t\tthat.currentItem.after(that.placeholder);\n\t\n\t\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\t\to.placeholder.update(that, that.placeholder);\n\t\n\t\t},\n\t\n\t\t_contactContainers: function(event) {\n\t\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,\n\t\t\t\tinnermostContainer = null,\n\t\t\t\tinnermostIndex = null;\n\t\n\t\t\t// get innermost container that intersects with item\n\t\t\tfor (i = this.containers.length - 1; i >= 0; i--) {\n\t\n\t\t\t\t// never consider a container that's located within the item itself\n\t\t\t\tif($.contains(this.currentItem[0], this.containers[i].element[0])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\n\t\t\t\tif(this._intersectsWith(this.containers[i].containerCache)) {\n\t\n\t\t\t\t\t// if we've already found a container and it's more \"inner\" than this, then continue\n\t\t\t\t\tif(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tinnermostContainer = this.containers[i];\n\t\t\t\t\tinnermostIndex = i;\n\t\n\t\t\t\t} else {\n\t\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary\n\t\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\t\tthis.containers[i]._trigger(\"out\", event, this._uiHash(this));\n\t\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\t// if no intersecting containers found, return\n\t\t\tif(!innermostContainer) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// move the item into the container if it's not there already\n\t\t\tif(this.containers.length === 1) {\n\t\t\t\tif (!this.containers[innermostIndex].containerCache.over) {\n\t\t\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t\t\t}\n\t\t\t} else {\n\t\n\t\t\t\t//When entering a new container, we will find the item with the least distance and append our item near it\n\t\t\t\tdist = 10000;\n\t\t\t\titemWithLeastDistance = null;\n\t\t\t\tfloating = innermostContainer.floating || isFloating(this.currentItem);\n\t\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\t\tbase = this.positionAbs[posProperty] + this.offset.click[posProperty];\n\t\t\t\tfor (j = this.items.length - 1; j >= 0; j--) {\n\t\t\t\t\tif(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif(this.items[j].item[0] === this.currentItem[0]) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tcur = this.items[j].item.offset()[posProperty];\n\t\t\t\t\tnearBottom = false;\n\t\t\t\t\tif(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){\n\t\t\t\t\t\tnearBottom = true;\n\t\t\t\t\t\tcur += this.items[j][sizeProperty];\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif(Math.abs(cur - base) < dist) {\n\t\t\t\t\t\tdist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];\n\t\t\t\t\t\tthis.direction = nearBottom ? \"up\": \"down\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t//Check if dropOnEmpty is enabled\n\t\t\t\tif(!itemWithLeastDistance && !this.options.dropOnEmpty) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tif(this.currentContainer === this.containers[innermostIndex]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\titemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);\n\t\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\t\tthis.containers[innermostIndex]._trigger(\"change\", event, this._uiHash(this));\n\t\t\t\tthis.currentContainer = this.containers[innermostIndex];\n\t\n\t\t\t\t//Update the placeholder\n\t\t\t\tthis.options.placeholder.update(this.currentContainer, this.placeholder);\n\t\n\t\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t\t}\n\t\n\t\n\t\t},\n\t\n\t\t_createHelper: function(event) {\n\t\n\t\t\tvar o = this.options,\n\t\t\t\thelper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem);\n\t\n\t\t\t//Add the helper to the DOM if that didn't happen already\n\t\t\tif(!helper.parents(\"body\").length) {\n\t\t\t\t$(o.appendTo !== \"parent\" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);\n\t\t\t}\n\t\n\t\t\tif(helper[0] === this.currentItem[0]) {\n\t\t\t\tthis._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css(\"position\"), top: this.currentItem.css(\"top\"), left: this.currentItem.css(\"left\") };\n\t\t\t}\n\t\n\t\t\tif(!helper[0].style.width || o.forceHelperSize) {\n\t\t\t\thelper.width(this.currentItem.width());\n\t\t\t}\n\t\t\tif(!helper[0].style.height || o.forceHelperSize) {\n\t\t\t\thelper.height(this.currentItem.height());\n\t\t\t}\n\t\n\t\t\treturn helper;\n\t\n\t\t},\n\t\n\t\t_adjustOffsetFromHelper: function(obj) {\n\t\t\tif (typeof obj === \"string\") {\n\t\t\t\tobj = obj.split(\" \");\n\t\t\t}\n\t\t\tif ($.isArray(obj)) {\n\t\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t\t}\n\t\t\tif (\"left\" in obj) {\n\t\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t\t}\n\t\t\tif (\"right\" in obj) {\n\t\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t\t}\n\t\t\tif (\"top\" in obj) {\n\t\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t\t}\n\t\t\tif (\"bottom\" in obj) {\n\t\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t\t}\n\t\t},\n\t\n\t\t_getParentOffset: function() {\n\t\n\t\n\t\t\t//Get the offsetParent and cache its position\n\t\t\tthis.offsetParent = this.helper.offsetParent();\n\t\t\tvar po = this.offsetParent.offset();\n\t\n\t\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\t\tif(this.cssPosition === \"absolute\" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t\t}\n\t\n\t\t\t// This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t\t// with an ugly IE fix\n\t\t\tif( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie)) {\n\t\t\t\tpo = { top: 0, left: 0 };\n\t\t\t}\n\t\n\t\t\treturn {\n\t\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t\t};\n\t\n\t\t},\n\t\n\t\t_getRelativeOffset: function() {\n\t\n\t\t\tif(this.cssPosition === \"relative\") {\n\t\t\t\tvar p = this.currentItem.position();\n\t\t\t\treturn {\n\t\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn { top: 0, left: 0 };\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_cacheMargins: function() {\n\t\t\tthis.margins = {\n\t\t\t\tleft: (parseInt(this.currentItem.css(\"marginLeft\"),10) || 0),\n\t\t\t\ttop: (parseInt(this.currentItem.css(\"marginTop\"),10) || 0)\n\t\t\t};\n\t\t},\n\t\n\t\t_cacheHelperProportions: function() {\n\t\t\tthis.helperProportions = {\n\t\t\t\twidth: this.helper.outerWidth(),\n\t\t\t\theight: this.helper.outerHeight()\n\t\t\t};\n\t\t},\n\t\n\t\t_setContainment: function() {\n\t\n\t\t\tvar ce, co, over,\n\t\t\t\to = this.options;\n\t\t\tif(o.containment === \"parent\") {\n\t\t\t\to.containment = this.helper[0].parentNode;\n\t\t\t}\n\t\t\tif(o.containment === \"document\" || o.containment === \"window\") {\n\t\t\t\tthis.containment = [\n\t\t\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t\t$(o.containment === \"document\" ? document : window).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t\t($(o.containment === \"document\" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top\n\t\t\t\t];\n\t\t\t}\n\t\n\t\t\tif(!(/^(document|window|parent)$/).test(o.containment)) {\n\t\t\t\tce = $(o.containment)[0];\n\t\t\t\tco = $(o.containment).offset();\n\t\t\t\tover = ($(ce).css(\"overflow\") !== \"hidden\");\n\t\n\t\t\t\tthis.containment = [\n\t\t\t\t\tco.left + (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingLeft\"),10) || 0) - this.margins.left,\n\t\t\t\t\tco.top + (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingTop\"),10) || 0) - this.margins.top,\n\t\t\t\t\tco.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingRight\"),10) || 0) - this.helperProportions.width - this.margins.left,\n\t\t\t\t\tco.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingBottom\"),10) || 0) - this.helperProportions.height - this.margins.top\n\t\t\t\t];\n\t\t\t}\n\t\n\t\t},\n\t\n\t\t_convertPositionTo: function(d, pos) {\n\t\n\t\t\tif(!pos) {\n\t\t\t\tpos = this.position;\n\t\t\t}\n\t\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,\n\t\t\t\tscrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\t\n\t\t\treturn {\n\t\t\t\ttop: (\n\t\t\t\t\tpos.top\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.relative.top * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.top * mod -\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)\n\t\t\t\t),\n\t\t\t\tleft: (\n\t\t\t\t\tpos.left +\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.relative.left * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.left * mod\t-\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)\n\t\t\t\t)\n\t\t\t};\n\t\n\t\t},\n\t\n\t\t_generatePosition: function(event) {\n\t\n\t\t\tvar top, left,\n\t\t\t\to = this.options,\n\t\t\t\tpageX = event.pageX,\n\t\t\t\tpageY = event.pageY,\n\t\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\t\n\t\t\t// This is another very weird special case that only happens for relative elements:\n\t\t\t// 1. If the css position is relative\n\t\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\t\tif(this.cssPosition === \"relative\" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {\n\t\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t\t}\n\t\n\t\t\t/*\n\t\t\t * - Position constraining -\n\t\t\t * Constrain the position to a mix of grid, containment.\n\t\t\t */\n\t\n\t\t\tif(this.originalPosition) { //If we are not dragging yet, we won't check for options\n\t\n\t\t\t\tif(this.containment) {\n\t\t\t\t\tif(event.pageX - this.offset.click.left < this.containment[0]) {\n\t\t\t\t\t\tpageX = this.containment[0] + this.offset.click.left;\n\t\t\t\t\t}\n\t\t\t\t\tif(event.pageY - this.offset.click.top < this.containment[1]) {\n\t\t\t\t\t\tpageY = this.containment[1] + this.offset.click.top;\n\t\t\t\t\t}\n\t\t\t\t\tif(event.pageX - this.offset.click.left > this.containment[2]) {\n\t\t\t\t\t\tpageX = this.containment[2] + this.offset.click.left;\n\t\t\t\t\t}\n\t\t\t\t\tif(event.pageY - this.offset.click.top > this.containment[3]) {\n\t\t\t\t\t\tpageY = this.containment[3] + this.offset.click.top;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tif(o.grid) {\n\t\t\t\t\ttop = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];\n\t\t\t\t\tpageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\t\n\t\t\t\t\tleft = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];\n\t\t\t\t\tpageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t\t}\n\t\n\t\t\t}\n\t\n\t\t\treturn {\n\t\t\t\ttop: (\n\t\t\t\t\tpageY -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.click.top -\t\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t\tthis.offset.relative.top\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.top +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))\n\t\t\t\t),\n\t\t\t\tleft: (\n\t\t\t\t\tpageX -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\t\tthis.offset.click.left -\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\t\tthis.offset.relative.left\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\t\tthis.offset.parent.left +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))\n\t\t\t\t)\n\t\t\t};\n\t\n\t\t},\n\t\n\t\t_rearrange: function(event, i, a, hardRefresh) {\n\t\n\t\t\ta ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === \"down\" ? i.item[0] : i.item[0].nextSibling));\n\t\n\t\t\t//Various things done here to improve the performance:\n\t\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same\n\t\t\t// 4. this lets only the last addition to the timeout stack through\n\t\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\t\tvar counter = this.counter;\n\t\n\t\t\tthis._delay(function() {\n\t\t\t\tif(counter === this.counter) {\n\t\t\t\t\tthis.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t},\n\t\n\t\t_clear: function(event, noPropagation) {\n\t\n\t\t\tthis.reverting = false;\n\t\t\t// We delay all events that have to be triggered to after the point where the placeholder has been removed and\n\t\t\t// everything else normalized again\n\t\t\tvar i,\n\t\t\t\tdelayedTriggers = [];\n\t\n\t\t\t// We first have to update the dom position of the actual currentItem\n\t\t\t// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)\n\t\t\tif(!this._noFinalSort && this.currentItem.parent().length) {\n\t\t\t\tthis.placeholder.before(this.currentItem);\n\t\t\t}\n\t\t\tthis._noFinalSort = null;\n\t\n\t\t\tif(this.helper[0] === this.currentItem[0]) {\n\t\t\t\tfor(i in this._storedCSS) {\n\t\t\t\t\tif(this._storedCSS[i] === \"auto\" || this._storedCSS[i] === \"static\") {\n\t\t\t\t\t\tthis._storedCSS[i] = \"\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t\t} else {\n\t\t\t\tthis.currentItem.show();\n\t\t\t}\n\t\n\t\t\tif(this.fromOutside && !noPropagation) {\n\t\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"receive\", event, this._uiHash(this.fromOutside)); });\n\t\t\t}\n\t\t\tif((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(\".ui-sortable-helper\")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {\n\t\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"update\", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed\n\t\t\t}\n\t\n\t\t\t// Check if the items Container has Changed and trigger appropriate\n\t\t\t// events.\n\t\t\tif (this !== this.currentContainer) {\n\t\t\t\tif(!noPropagation) {\n\t\t\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"remove\", event, this._uiHash()); });\n\t\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"receive\", event, this._uiHash(this)); };  }).call(this, this.currentContainer));\n\t\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"update\", event, this._uiHash(this));  }; }).call(this, this.currentContainer));\n\t\t\t\t}\n\t\t\t}\n\t\n\t\n\t\t\t//Post events to containers\n\t\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tif(!noPropagation) {\n\t\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"deactivate\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t\t}\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"out\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t//Do what was originally in plugins\n\t\t\tif ( this.storedCursor ) {\n\t\t\t\tthis.document.find( \"body\" ).css( \"cursor\", this.storedCursor );\n\t\t\t\tthis.storedStylesheet.remove();\n\t\t\t}\n\t\t\tif(this._storedOpacity) {\n\t\t\t\tthis.helper.css(\"opacity\", this._storedOpacity);\n\t\t\t}\n\t\t\tif(this._storedZIndex) {\n\t\t\t\tthis.helper.css(\"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex);\n\t\t\t}\n\t\n\t\t\tthis.dragging = false;\n\t\t\tif(this.cancelHelperRemoval) {\n\t\t\t\tif(!noPropagation) {\n\t\t\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t\t\t} //Trigger all delayed events\n\t\t\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t\t\t}\n\t\n\t\t\t\tthis.fromOutside = false;\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tif(!noPropagation) {\n\t\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t\t}\n\t\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\t\n\t\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\t\t\tthis.helper = null;\n\t\n\t\t\tif(!noPropagation) {\n\t\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t\t} //Trigger all delayed events\n\t\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t\t}\n\t\n\t\t\tthis.fromOutside = false;\n\t\t\treturn true;\n\t\n\t\t},\n\t\n\t\t_trigger: function() {\n\t\t\tif ($.Widget.prototype._trigger.apply(this, arguments) === false) {\n\t\t\t\tthis.cancel();\n\t\t\t}\n\t\t},\n\t\n\t\t_uiHash: function(_inst) {\n\t\t\tvar inst = _inst || this;\n\t\t\treturn {\n\t\t\t\thelper: inst.helper,\n\t\t\t\tplaceholder: inst.placeholder || $([]),\n\t\t\t\tposition: inst.position,\n\t\t\t\toriginalPosition: inst.originalPosition,\n\t\t\t\toffset: inst.positionAbs,\n\t\t\t\titem: inst.currentItem,\n\t\t\t\tsender: _inst ? _inst.element : null\n\t\t\t};\n\t\t}\n\t\n\t});\n\t\n\t})(jQuery);\n\t\n\t(function($, undefined) {\n\t\n\tvar dataSpace = \"ui-effects-\";\n\t\n\t$.effects = {\n\t\teffect: {}\n\t};\n\t\n\t/*!\n\t * jQuery Color Animations v2.1.2\n\t * https://github.com/jquery/jquery-color\n\t *\n\t * Copyright 2013 jQuery Foundation and other contributors\n\t * Released under the MIT license.\n\t * http://jquery.org/license\n\t *\n\t * Date: Wed Jan 16 08:47:09 2013 -0600\n\t */\n\t(function( jQuery, undefined ) {\n\t\n\t\tvar stepHooks = \"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",\n\t\n\t\t// plusequals test for += 100 -= 100\n\t\trplusequals = /^([\\-+])=\\s*(\\d+\\.?\\d*)/,\n\t\t// a set of RE's that can match strings and generate color tuples.\n\t\tstringParsers = [{\n\t\t\t\tre: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\t\tparse: function( execResult ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\t\texecResult[ 2 ],\n\t\t\t\t\t\texecResult[ 3 ],\n\t\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tre: /rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\t\tparse: function( execResult ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\texecResult[ 1 ] * 2.55,\n\t\t\t\t\t\texecResult[ 2 ] * 2.55,\n\t\t\t\t\t\texecResult[ 3 ] * 2.55,\n\t\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\t\tre: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,\n\t\t\t\tparse: function( execResult ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tparseInt( execResult[ 1 ], 16 ),\n\t\t\t\t\t\tparseInt( execResult[ 2 ], 16 ),\n\t\t\t\t\t\tparseInt( execResult[ 3 ], 16 )\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\t\tre: /#([a-f0-9])([a-f0-9])([a-f0-9])/,\n\t\t\t\tparse: function( execResult ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\tparseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),\n\t\t\t\t\t\tparseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),\n\t\t\t\t\t\tparseInt( execResult[ 3 ] + execResult[ 3 ], 16 )\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tre: /hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\t\tspace: \"hsla\",\n\t\t\t\tparse: function( execResult ) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\t\texecResult[ 2 ] / 100,\n\t\t\t\t\t\texecResult[ 3 ] / 100,\n\t\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}],\n\t\n\t\t// jQuery.Color( )\n\t\tcolor = jQuery.Color = function( color, green, blue, alpha ) {\n\t\t\treturn new jQuery.Color.fn.parse( color, green, blue, alpha );\n\t\t},\n\t\tspaces = {\n\t\t\trgba: {\n\t\t\t\tprops: {\n\t\t\t\t\tred: {\n\t\t\t\t\t\tidx: 0,\n\t\t\t\t\t\ttype: \"byte\"\n\t\t\t\t\t},\n\t\t\t\t\tgreen: {\n\t\t\t\t\t\tidx: 1,\n\t\t\t\t\t\ttype: \"byte\"\n\t\t\t\t\t},\n\t\t\t\t\tblue: {\n\t\t\t\t\t\tidx: 2,\n\t\t\t\t\t\ttype: \"byte\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\n\t\t\thsla: {\n\t\t\t\tprops: {\n\t\t\t\t\thue: {\n\t\t\t\t\t\tidx: 0,\n\t\t\t\t\t\ttype: \"degrees\"\n\t\t\t\t\t},\n\t\t\t\t\tsaturation: {\n\t\t\t\t\t\tidx: 1,\n\t\t\t\t\t\ttype: \"percent\"\n\t\t\t\t\t},\n\t\t\t\t\tlightness: {\n\t\t\t\t\t\tidx: 2,\n\t\t\t\t\t\ttype: \"percent\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tpropTypes = {\n\t\t\t\"byte\": {\n\t\t\t\tfloor: true,\n\t\t\t\tmax: 255\n\t\t\t},\n\t\t\t\"percent\": {\n\t\t\t\tmax: 1\n\t\t\t},\n\t\t\t\"degrees\": {\n\t\t\t\tmod: 360,\n\t\t\t\tfloor: true\n\t\t\t}\n\t\t},\n\t\tsupport = color.support = {},\n\t\n\t\t// element for support tests\n\t\tsupportElem = jQuery( \"<p>\" )[ 0 ],\n\t\n\t\t// colors = jQuery.Color.names\n\t\tcolors,\n\t\n\t\t// local aliases of functions called often\n\t\teach = jQuery.each;\n\t\n\t// determine rgba support immediately\n\tsupportElem.style.cssText = \"background-color:rgba(1,1,1,.5)\";\n\tsupport.rgba = supportElem.style.backgroundColor.indexOf( \"rgba\" ) > -1;\n\t\n\t// define cache name and alpha properties\n\t// for rgba and hsla spaces\n\teach( spaces, function( spaceName, space ) {\n\t\tspace.cache = \"_\" + spaceName;\n\t\tspace.props.alpha = {\n\t\t\tidx: 3,\n\t\t\ttype: \"percent\",\n\t\t\tdef: 1\n\t\t};\n\t});\n\t\n\tfunction clamp( value, prop, allowEmpty ) {\n\t\tvar type = propTypes[ prop.type ] || {};\n\t\n\t\tif ( value == null ) {\n\t\t\treturn (allowEmpty || !prop.def) ? null : prop.def;\n\t\t}\n\t\n\t\t// ~~ is an short way of doing floor for positive numbers\n\t\tvalue = type.floor ? ~~value : parseFloat( value );\n\t\n\t\t// IE will pass in empty strings as value for alpha,\n\t\t// which will hit this case\n\t\tif ( isNaN( value ) ) {\n\t\t\treturn prop.def;\n\t\t}\n\t\n\t\tif ( type.mod ) {\n\t\t\t// we add mod before modding to make sure that negatives values\n\t\t\t// get converted properly: -10 -> 350\n\t\t\treturn (value + type.mod) % type.mod;\n\t\t}\n\t\n\t\t// for now all property types without mod have min and max\n\t\treturn 0 > value ? 0 : type.max < value ? type.max : value;\n\t}\n\t\n\tfunction stringParse( string ) {\n\t\tvar inst = color(),\n\t\t\trgba = inst._rgba = [];\n\t\n\t\tstring = string.toLowerCase();\n\t\n\t\teach( stringParsers, function( i, parser ) {\n\t\t\tvar parsed,\n\t\t\t\tmatch = parser.re.exec( string ),\n\t\t\t\tvalues = match && parser.parse( match ),\n\t\t\t\tspaceName = parser.space || \"rgba\";\n\t\n\t\t\tif ( values ) {\n\t\t\t\tparsed = inst[ spaceName ]( values );\n\t\n\t\t\t\t// if this was an rgba parse the assignment might happen twice\n\t\t\t\t// oh well....\n\t\t\t\tinst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];\n\t\t\t\trgba = inst._rgba = parsed._rgba;\n\t\n\t\t\t\t// exit each( stringParsers ) here because we matched\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\n\t\t// Found a stringParser that handled it\n\t\tif ( rgba.length ) {\n\t\n\t\t\t// if this came from a parsed string, force \"transparent\" when alpha is 0\n\t\t\t// chrome, (and maybe others) return \"transparent\" as rgba(0,0,0,0)\n\t\t\tif ( rgba.join() === \"0,0,0,0\" ) {\n\t\t\t\tjQuery.extend( rgba, colors.transparent );\n\t\t\t}\n\t\t\treturn inst;\n\t\t}\n\t\n\t\t// named colors\n\t\treturn colors[ string ];\n\t}\n\t\n\tcolor.fn = jQuery.extend( color.prototype, {\n\t\tparse: function( red, green, blue, alpha ) {\n\t\t\tif ( red === undefined ) {\n\t\t\t\tthis._rgba = [ null, null, null, null ];\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif ( red.jquery || red.nodeType ) {\n\t\t\t\tred = jQuery( red ).css( green );\n\t\t\t\tgreen = undefined;\n\t\t\t}\n\t\n\t\t\tvar inst = this,\n\t\t\t\ttype = jQuery.type( red ),\n\t\t\t\trgba = this._rgba = [];\n\t\n\t\t\t// more than 1 argument specified - assume ( red, green, blue, alpha )\n\t\t\tif ( green !== undefined ) {\n\t\t\t\tred = [ red, green, blue, alpha ];\n\t\t\t\ttype = \"array\";\n\t\t\t}\n\t\n\t\t\tif ( type === \"string\" ) {\n\t\t\t\treturn this.parse( stringParse( red ) || colors._default );\n\t\t\t}\n\t\n\t\t\tif ( type === \"array\" ) {\n\t\t\t\teach( spaces.rgba.props, function( key, prop ) {\n\t\t\t\t\trgba[ prop.idx ] = clamp( red[ prop.idx ], prop );\n\t\t\t\t});\n\t\t\t\treturn this;\n\t\t\t}\n\t\n\t\t\tif ( type === \"object\" ) {\n\t\t\t\tif ( red instanceof color ) {\n\t\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\t\tif ( red[ space.cache ] ) {\n\t\t\t\t\t\t\tinst[ space.cache ] = red[ space.cache ].slice();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\t\tvar cache = space.cache;\n\t\t\t\t\t\teach( space.props, function( key, prop ) {\n\t\n\t\t\t\t\t\t\t// if the cache doesn't exist, and we know how to convert\n\t\t\t\t\t\t\tif ( !inst[ cache ] && space.to ) {\n\t\n\t\t\t\t\t\t\t\t// if the value was null, we don't need to copy it\n\t\t\t\t\t\t\t\t// if the key was alpha, we don't need to copy it either\n\t\t\t\t\t\t\t\tif ( key === \"alpha\" || red[ key ] == null ) {\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tinst[ cache ] = space.to( inst._rgba );\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t// this is the only case where we allow nulls for ALL properties.\n\t\t\t\t\t\t\t// call clamp with alwaysAllowEmpty\n\t\t\t\t\t\t\tinst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );\n\t\t\t\t\t\t});\n\t\n\t\t\t\t\t\t// everything defined but alpha?\n\t\t\t\t\t\tif ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {\n\t\t\t\t\t\t\t// use the default of 1\n\t\t\t\t\t\t\tinst[ cache ][ 3 ] = 1;\n\t\t\t\t\t\t\tif ( space.from ) {\n\t\t\t\t\t\t\t\tinst._rgba = space.from( inst[ cache ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t},\n\t\tis: function( compare ) {\n\t\t\tvar is = color( compare ),\n\t\t\t\tsame = true,\n\t\t\t\tinst = this;\n\t\n\t\t\teach( spaces, function( _, space ) {\n\t\t\t\tvar localCache,\n\t\t\t\t\tisCache = is[ space.cache ];\n\t\t\t\tif (isCache) {\n\t\t\t\t\tlocalCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];\n\t\t\t\t\teach( space.props, function( _, prop ) {\n\t\t\t\t\t\tif ( isCache[ prop.idx ] != null ) {\n\t\t\t\t\t\t\tsame = ( isCache[ prop.idx ] === localCache[ prop.idx ] );\n\t\t\t\t\t\t\treturn same;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn same;\n\t\t\t});\n\t\t\treturn same;\n\t\t},\n\t\t_space: function() {\n\t\t\tvar used = [],\n\t\t\t\tinst = this;\n\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\tif ( inst[ space.cache ] ) {\n\t\t\t\t\tused.push( spaceName );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn used.pop();\n\t\t},\n\t\ttransition: function( other, distance ) {\n\t\t\tvar end = color( other ),\n\t\t\t\tspaceName = end._space(),\n\t\t\t\tspace = spaces[ spaceName ],\n\t\t\t\tstartColor = this.alpha() === 0 ? color( \"transparent\" ) : this,\n\t\t\t\tstart = startColor[ space.cache ] || space.to( startColor._rgba ),\n\t\t\t\tresult = start.slice();\n\t\n\t\t\tend = end[ space.cache ];\n\t\t\teach( space.props, function( key, prop ) {\n\t\t\t\tvar index = prop.idx,\n\t\t\t\t\tstartValue = start[ index ],\n\t\t\t\t\tendValue = end[ index ],\n\t\t\t\t\ttype = propTypes[ prop.type ] || {};\n\t\n\t\t\t\t// if null, don't override start value\n\t\t\t\tif ( endValue === null ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// if null - use end\n\t\t\t\tif ( startValue === null ) {\n\t\t\t\t\tresult[ index ] = endValue;\n\t\t\t\t} else {\n\t\t\t\t\tif ( type.mod ) {\n\t\t\t\t\t\tif ( endValue - startValue > type.mod / 2 ) {\n\t\t\t\t\t\t\tstartValue += type.mod;\n\t\t\t\t\t\t} else if ( startValue - endValue > type.mod / 2 ) {\n\t\t\t\t\t\t\tstartValue -= type.mod;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tresult[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn this[ spaceName ]( result );\n\t\t},\n\t\tblend: function( opaque ) {\n\t\t\t// if we are already opaque - return ourself\n\t\t\tif ( this._rgba[ 3 ] === 1 ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\n\t\t\tvar rgb = this._rgba.slice(),\n\t\t\t\ta = rgb.pop(),\n\t\t\t\tblend = color( opaque )._rgba;\n\t\n\t\t\treturn color( jQuery.map( rgb, function( v, i ) {\n\t\t\t\treturn ( 1 - a ) * blend[ i ] + a * v;\n\t\t\t}));\n\t\t},\n\t\ttoRgbaString: function() {\n\t\t\tvar prefix = \"rgba(\",\n\t\t\t\trgba = jQuery.map( this._rgba, function( v, i ) {\n\t\t\t\t\treturn v == null ? ( i > 2 ? 1 : 0 ) : v;\n\t\t\t\t});\n\t\n\t\t\tif ( rgba[ 3 ] === 1 ) {\n\t\t\t\trgba.pop();\n\t\t\t\tprefix = \"rgb(\";\n\t\t\t}\n\t\n\t\t\treturn prefix + rgba.join() + \")\";\n\t\t},\n\t\ttoHslaString: function() {\n\t\t\tvar prefix = \"hsla(\",\n\t\t\t\thsla = jQuery.map( this.hsla(), function( v, i ) {\n\t\t\t\t\tif ( v == null ) {\n\t\t\t\t\t\tv = i > 2 ? 1 : 0;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// catch 1 and 2\n\t\t\t\t\tif ( i && i < 3 ) {\n\t\t\t\t\t\tv = Math.round( v * 100 ) + \"%\";\n\t\t\t\t\t}\n\t\t\t\t\treturn v;\n\t\t\t\t});\n\t\n\t\t\tif ( hsla[ 3 ] === 1 ) {\n\t\t\t\thsla.pop();\n\t\t\t\tprefix = \"hsl(\";\n\t\t\t}\n\t\t\treturn prefix + hsla.join() + \")\";\n\t\t},\n\t\ttoHexString: function( includeAlpha ) {\n\t\t\tvar rgba = this._rgba.slice(),\n\t\t\t\talpha = rgba.pop();\n\t\n\t\t\tif ( includeAlpha ) {\n\t\t\t\trgba.push( ~~( alpha * 255 ) );\n\t\t\t}\n\t\n\t\t\treturn \"#\" + jQuery.map( rgba, function( v ) {\n\t\n\t\t\t\t// default to 0 when nulls exist\n\t\t\t\tv = ( v || 0 ).toString( 16 );\n\t\t\t\treturn v.length === 1 ? \"0\" + v : v;\n\t\t\t}).join(\"\");\n\t\t},\n\t\ttoString: function() {\n\t\t\treturn this._rgba[ 3 ] === 0 ? \"transparent\" : this.toRgbaString();\n\t\t}\n\t});\n\tcolor.fn.parse.prototype = color.fn;\n\t\n\t// hsla conversions adapted from:\n\t// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021\n\t\n\tfunction hue2rgb( p, q, h ) {\n\t\th = ( h + 1 ) % 1;\n\t\tif ( h * 6 < 1 ) {\n\t\t\treturn p + (q - p) * h * 6;\n\t\t}\n\t\tif ( h * 2 < 1) {\n\t\t\treturn q;\n\t\t}\n\t\tif ( h * 3 < 2 ) {\n\t\t\treturn p + (q - p) * ((2/3) - h) * 6;\n\t\t}\n\t\treturn p;\n\t}\n\t\n\tspaces.hsla.to = function ( rgba ) {\n\t\tif ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {\n\t\t\treturn [ null, null, null, rgba[ 3 ] ];\n\t\t}\n\t\tvar r = rgba[ 0 ] / 255,\n\t\t\tg = rgba[ 1 ] / 255,\n\t\t\tb = rgba[ 2 ] / 255,\n\t\t\ta = rgba[ 3 ],\n\t\t\tmax = Math.max( r, g, b ),\n\t\t\tmin = Math.min( r, g, b ),\n\t\t\tdiff = max - min,\n\t\t\tadd = max + min,\n\t\t\tl = add * 0.5,\n\t\t\th, s;\n\t\n\t\tif ( min === max ) {\n\t\t\th = 0;\n\t\t} else if ( r === max ) {\n\t\t\th = ( 60 * ( g - b ) / diff ) + 360;\n\t\t} else if ( g === max ) {\n\t\t\th = ( 60 * ( b - r ) / diff ) + 120;\n\t\t} else {\n\t\t\th = ( 60 * ( r - g ) / diff ) + 240;\n\t\t}\n\t\n\t\t// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%\n\t\t// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)\n\t\tif ( diff === 0 ) {\n\t\t\ts = 0;\n\t\t} else if ( l <= 0.5 ) {\n\t\t\ts = diff / add;\n\t\t} else {\n\t\t\ts = diff / ( 2 - add );\n\t\t}\n\t\treturn [ Math.round(h) % 360, s, l, a == null ? 1 : a ];\n\t};\n\t\n\tspaces.hsla.from = function ( hsla ) {\n\t\tif ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {\n\t\t\treturn [ null, null, null, hsla[ 3 ] ];\n\t\t}\n\t\tvar h = hsla[ 0 ] / 360,\n\t\t\ts = hsla[ 1 ],\n\t\t\tl = hsla[ 2 ],\n\t\t\ta = hsla[ 3 ],\n\t\t\tq = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,\n\t\t\tp = 2 * l - q;\n\t\n\t\treturn [\n\t\t\tMath.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),\n\t\t\tMath.round( hue2rgb( p, q, h ) * 255 ),\n\t\t\tMath.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),\n\t\t\ta\n\t\t];\n\t};\n\t\n\t\n\teach( spaces, function( spaceName, space ) {\n\t\tvar props = space.props,\n\t\t\tcache = space.cache,\n\t\t\tto = space.to,\n\t\t\tfrom = space.from;\n\t\n\t\t// makes rgba() and hsla()\n\t\tcolor.fn[ spaceName ] = function( value ) {\n\t\n\t\t\t// generate a cache for this space if it doesn't exist\n\t\t\tif ( to && !this[ cache ] ) {\n\t\t\t\tthis[ cache ] = to( this._rgba );\n\t\t\t}\n\t\t\tif ( value === undefined ) {\n\t\t\t\treturn this[ cache ].slice();\n\t\t\t}\n\t\n\t\t\tvar ret,\n\t\t\t\ttype = jQuery.type( value ),\n\t\t\t\tarr = ( type === \"array\" || type === \"object\" ) ? value : arguments,\n\t\t\t\tlocal = this[ cache ].slice();\n\t\n\t\t\teach( props, function( key, prop ) {\n\t\t\t\tvar val = arr[ type === \"object\" ? key : prop.idx ];\n\t\t\t\tif ( val == null ) {\n\t\t\t\t\tval = local[ prop.idx ];\n\t\t\t\t}\n\t\t\t\tlocal[ prop.idx ] = clamp( val, prop );\n\t\t\t});\n\t\n\t\t\tif ( from ) {\n\t\t\t\tret = color( from( local ) );\n\t\t\t\tret[ cache ] = local;\n\t\t\t\treturn ret;\n\t\t\t} else {\n\t\t\t\treturn color( local );\n\t\t\t}\n\t\t};\n\t\n\t\t// makes red() green() blue() alpha() hue() saturation() lightness()\n\t\teach( props, function( key, prop ) {\n\t\t\t// alpha is included in more than one space\n\t\t\tif ( color.fn[ key ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcolor.fn[ key ] = function( value ) {\n\t\t\t\tvar vtype = jQuery.type( value ),\n\t\t\t\t\tfn = ( key === \"alpha\" ? ( this._hsla ? \"hsla\" : \"rgba\" ) : spaceName ),\n\t\t\t\t\tlocal = this[ fn ](),\n\t\t\t\t\tcur = local[ prop.idx ],\n\t\t\t\t\tmatch;\n\t\n\t\t\t\tif ( vtype === \"undefined\" ) {\n\t\t\t\t\treturn cur;\n\t\t\t\t}\n\t\n\t\t\t\tif ( vtype === \"function\" ) {\n\t\t\t\t\tvalue = value.call( this, cur );\n\t\t\t\t\tvtype = jQuery.type( value );\n\t\t\t\t}\n\t\t\t\tif ( value == null && prop.empty ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tif ( vtype === \"string\" ) {\n\t\t\t\t\tmatch = rplusequals.exec( value );\n\t\t\t\t\tif ( match ) {\n\t\t\t\t\t\tvalue = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === \"+\" ? 1 : -1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlocal[ prop.idx ] = value;\n\t\t\t\treturn this[ fn ]( local );\n\t\t\t};\n\t\t});\n\t});\n\t\n\t// add cssHook and .fx.step function for each named hook.\n\t// accept a space separated string of properties\n\tcolor.hook = function( hook ) {\n\t\tvar hooks = hook.split( \" \" );\n\t\teach( hooks, function( i, hook ) {\n\t\t\tjQuery.cssHooks[ hook ] = {\n\t\t\t\tset: function( elem, value ) {\n\t\t\t\t\tvar parsed, curElem,\n\t\t\t\t\t\tbackgroundColor = \"\";\n\t\n\t\t\t\t\tif ( value !== \"transparent\" && ( jQuery.type( value ) !== \"string\" || ( parsed = stringParse( value ) ) ) ) {\n\t\t\t\t\t\tvalue = color( parsed || value );\n\t\t\t\t\t\tif ( !support.rgba && value._rgba[ 3 ] !== 1 ) {\n\t\t\t\t\t\t\tcurElem = hook === \"backgroundColor\" ? elem.parentNode : elem;\n\t\t\t\t\t\t\twhile (\n\t\t\t\t\t\t\t\t(backgroundColor === \"\" || backgroundColor === \"transparent\") &&\n\t\t\t\t\t\t\t\tcurElem && curElem.style\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tbackgroundColor = jQuery.css( curElem, \"backgroundColor\" );\n\t\t\t\t\t\t\t\t\tcurElem = curElem.parentNode;\n\t\t\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\tvalue = value.blend( backgroundColor && backgroundColor !== \"transparent\" ?\n\t\t\t\t\t\t\t\tbackgroundColor :\n\t\t\t\t\t\t\t\t\"_default\" );\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tvalue = value.toRgbaString();\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\telem.style[ hook ] = value;\n\t\t\t\t\t} catch( e ) {\n\t\t\t\t\t\t// wrapped to prevent IE from throwing errors on \"invalid\" values like 'auto' or 'inherit'\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tjQuery.fx.step[ hook ] = function( fx ) {\n\t\t\t\tif ( !fx.colorInit ) {\n\t\t\t\t\tfx.start = color( fx.elem, hook );\n\t\t\t\t\tfx.end = color( fx.end );\n\t\t\t\t\tfx.colorInit = true;\n\t\t\t\t}\n\t\t\t\tjQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );\n\t\t\t};\n\t\t});\n\t\n\t};\n\t\n\tcolor.hook( stepHooks );\n\t\n\tjQuery.cssHooks.borderColor = {\n\t\texpand: function( value ) {\n\t\t\tvar expanded = {};\n\t\n\t\t\teach( [ \"Top\", \"Right\", \"Bottom\", \"Left\" ], function( i, part ) {\n\t\t\t\texpanded[ \"border\" + part + \"Color\" ] = value;\n\t\t\t});\n\t\t\treturn expanded;\n\t\t}\n\t};\n\t\n\t// Basic color names only.\n\t// Usage of any of the other color names requires adding yourself or including\n\t// jquery.color.svg-names.js.\n\tcolors = jQuery.Color.names = {\n\t\t// 4.1. Basic color keywords\n\t\taqua: \"#00ffff\",\n\t\tblack: \"#000000\",\n\t\tblue: \"#0000ff\",\n\t\tfuchsia: \"#ff00ff\",\n\t\tgray: \"#808080\",\n\t\tgreen: \"#008000\",\n\t\tlime: \"#00ff00\",\n\t\tmaroon: \"#800000\",\n\t\tnavy: \"#000080\",\n\t\tolive: \"#808000\",\n\t\tpurple: \"#800080\",\n\t\tred: \"#ff0000\",\n\t\tsilver: \"#c0c0c0\",\n\t\tteal: \"#008080\",\n\t\twhite: \"#ffffff\",\n\t\tyellow: \"#ffff00\",\n\t\n\t\t// 4.2.3. \"transparent\" color keyword\n\t\ttransparent: [ null, null, null, 0 ],\n\t\n\t\t_default: \"#ffffff\"\n\t};\n\t\n\t})( jQuery );\n\t\n\t\n\t/******************************************************************************/\n\t/****************************** CLASS ANIMATIONS ******************************/\n\t/******************************************************************************/\n\t(function() {\n\t\n\tvar classAnimationActions = [ \"add\", \"remove\", \"toggle\" ],\n\t\tshorthandStyles = {\n\t\t\tborder: 1,\n\t\t\tborderBottom: 1,\n\t\t\tborderColor: 1,\n\t\t\tborderLeft: 1,\n\t\t\tborderRight: 1,\n\t\t\tborderTop: 1,\n\t\t\tborderWidth: 1,\n\t\t\tmargin: 1,\n\t\t\tpadding: 1\n\t\t};\n\t\n\t$.each([ \"borderLeftStyle\", \"borderRightStyle\", \"borderBottomStyle\", \"borderTopStyle\" ], function( _, prop ) {\n\t\t$.fx.step[ prop ] = function( fx ) {\n\t\t\tif ( fx.end !== \"none\" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {\n\t\t\t\tjQuery.style( fx.elem, prop, fx.end );\n\t\t\t\tfx.setAttr = true;\n\t\t\t}\n\t\t};\n\t});\n\t\n\tfunction getElementStyles( elem ) {\n\t\tvar key, len,\n\t\t\tstyle = elem.ownerDocument.defaultView ?\n\t\t\t\telem.ownerDocument.defaultView.getComputedStyle( elem, null ) :\n\t\t\t\telem.currentStyle,\n\t\t\tstyles = {};\n\t\n\t\tif ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {\n\t\t\tlen = style.length;\n\t\t\twhile ( len-- ) {\n\t\t\t\tkey = style[ len ];\n\t\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\t\tstyles[ $.camelCase( key ) ] = style[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t// support: Opera, IE <9\n\t\t} else {\n\t\t\tfor ( key in style ) {\n\t\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\t\tstyles[ key ] = style[ key ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn styles;\n\t}\n\t\n\t\n\tfunction styleDifference( oldStyle, newStyle ) {\n\t\tvar diff = {},\n\t\t\tname, value;\n\t\n\t\tfor ( name in newStyle ) {\n\t\t\tvalue = newStyle[ name ];\n\t\t\tif ( oldStyle[ name ] !== value ) {\n\t\t\t\tif ( !shorthandStyles[ name ] ) {\n\t\t\t\t\tif ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {\n\t\t\t\t\t\tdiff[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn diff;\n\t}\n\t\n\t// support: jQuery <1.8\n\tif ( !$.fn.addBack ) {\n\t\t$.fn.addBack = function( selector ) {\n\t\t\treturn this.add( selector == null ?\n\t\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t\t);\n\t\t};\n\t}\n\t\n\t$.effects.animateClass = function( value, duration, easing, callback ) {\n\t\tvar o = $.speed( duration, easing, callback );\n\t\n\t\treturn this.queue( function() {\n\t\t\tvar animated = $( this ),\n\t\t\t\tbaseClass = animated.attr( \"class\" ) || \"\",\n\t\t\t\tapplyClassChange,\n\t\t\t\tallAnimations = o.children ? animated.find( \"*\" ).addBack() : animated;\n\t\n\t\t\t// map the animated objects to store the original styles.\n\t\t\tallAnimations = allAnimations.map(function() {\n\t\t\t\tvar el = $( this );\n\t\t\t\treturn {\n\t\t\t\t\tel: el,\n\t\t\t\t\tstart: getElementStyles( this )\n\t\t\t\t};\n\t\t\t});\n\t\n\t\t\t// apply class change\n\t\t\tapplyClassChange = function() {\n\t\t\t\t$.each( classAnimationActions, function(i, action) {\n\t\t\t\t\tif ( value[ action ] ) {\n\t\t\t\t\t\tanimated[ action + \"Class\" ]( value[ action ] );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t\tapplyClassChange();\n\t\n\t\t\t// map all animated objects again - calculate new styles and diff\n\t\t\tallAnimations = allAnimations.map(function() {\n\t\t\t\tthis.end = getElementStyles( this.el[ 0 ] );\n\t\t\t\tthis.diff = styleDifference( this.start, this.end );\n\t\t\t\treturn this;\n\t\t\t});\n\t\n\t\t\t// apply original class\n\t\t\tanimated.attr( \"class\", baseClass );\n\t\n\t\t\t// map all animated objects again - this time collecting a promise\n\t\t\tallAnimations = allAnimations.map(function() {\n\t\t\t\tvar styleInfo = this,\n\t\t\t\t\tdfd = $.Deferred(),\n\t\t\t\t\topts = $.extend({}, o, {\n\t\t\t\t\t\tqueue: false,\n\t\t\t\t\t\tcomplete: function() {\n\t\t\t\t\t\t\tdfd.resolve( styleInfo );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\n\t\t\t\tthis.el.animate( this.diff, opts );\n\t\t\t\treturn dfd.promise();\n\t\t\t});\n\t\n\t\t\t// once all animations have completed:\n\t\t\t$.when.apply( $, allAnimations.get() ).done(function() {\n\t\n\t\t\t\t// set the final class\n\t\t\t\tapplyClassChange();\n\t\n\t\t\t\t// for each animated element,\n\t\t\t\t// clear all css properties that were animated\n\t\t\t\t$.each( arguments, function() {\n\t\t\t\t\tvar el = this.el;\n\t\t\t\t\t$.each( this.diff, function(key) {\n\t\t\t\t\t\tel.css( key, \"\" );\n\t\t\t\t\t});\n\t\t\t\t});\n\t\n\t\t\t\t// this is guarnteed to be there if you use jQuery.speed()\n\t\t\t\t// it also handles dequeuing the next anim...\n\t\t\t\to.complete.call( animated[ 0 ] );\n\t\t\t});\n\t\t});\n\t};\n\t\n\t$.fn.extend({\n\t\taddClass: (function( orig ) {\n\t\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\t\treturn speed ?\n\t\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t\t{ add: classNames }, speed, easing, callback ) :\n\t\t\t\t\torig.apply( this, arguments );\n\t\t\t};\n\t\t})( $.fn.addClass ),\n\t\n\t\tremoveClass: (function( orig ) {\n\t\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\t\treturn arguments.length > 1 ?\n\t\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t\t{ remove: classNames }, speed, easing, callback ) :\n\t\t\t\t\torig.apply( this, arguments );\n\t\t\t};\n\t\t})( $.fn.removeClass ),\n\t\n\t\ttoggleClass: (function( orig ) {\n\t\t\treturn function( classNames, force, speed, easing, callback ) {\n\t\t\t\tif ( typeof force === \"boolean\" || force === undefined ) {\n\t\t\t\t\tif ( !speed ) {\n\t\t\t\t\t\t// without speed parameter\n\t\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t\t\t(force ? { add: classNames } : { remove: classNames }),\n\t\t\t\t\t\t\tspeed, easing, callback );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// without force parameter\n\t\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t\t{ toggle: classNames }, force, speed, easing );\n\t\t\t\t}\n\t\t\t};\n\t\t})( $.fn.toggleClass ),\n\t\n\t\tswitchClass: function( remove, add, speed, easing, callback) {\n\t\t\treturn $.effects.animateClass.call( this, {\n\t\t\t\tadd: add,\n\t\t\t\tremove: remove\n\t\t\t}, speed, easing, callback );\n\t\t}\n\t});\n\t\n\t})();\n\t\n\t/******************************************************************************/\n\t/*********************************** EFFECTS **********************************/\n\t/******************************************************************************/\n\t\n\t(function() {\n\t\n\t$.extend( $.effects, {\n\t\tversion: \"1.10.3\",\n\t\n\t\t// Saves a set of properties in a data storage\n\t\tsave: function( element, set ) {\n\t\t\tfor( var i=0; i < set.length; i++ ) {\n\t\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\t\telement.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t// Restores a set of previously saved properties from a data storage\n\t\trestore: function( element, set ) {\n\t\t\tvar val, i;\n\t\t\tfor( i=0; i < set.length; i++ ) {\n\t\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\t\tval = element.data( dataSpace + set[ i ] );\n\t\t\t\t\t// support: jQuery 1.6.2\n\t\t\t\t\t// http://bugs.jquery.com/ticket/9917\n\t\t\t\t\t// jQuery 1.6.2 incorrectly returns undefined for any falsy value.\n\t\t\t\t\t// We can't differentiate between \"\" and 0 here, so we just assume\n\t\t\t\t\t// empty string since it's likely to be a more common value...\n\t\t\t\t\tif ( val === undefined ) {\n\t\t\t\t\t\tval = \"\";\n\t\t\t\t\t}\n\t\t\t\t\telement.css( set[ i ], val );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\tsetMode: function( el, mode ) {\n\t\t\tif (mode === \"toggle\") {\n\t\t\t\tmode = el.is( \":hidden\" ) ? \"show\" : \"hide\";\n\t\t\t}\n\t\t\treturn mode;\n\t\t},\n\t\n\t\t// Translates a [top,left] array into a baseline value\n\t\t// this should be a little more flexible in the future to handle a string & hash\n\t\tgetBaseline: function( origin, original ) {\n\t\t\tvar y, x;\n\t\t\tswitch ( origin[ 0 ] ) {\n\t\t\t\tcase \"top\": y = 0; break;\n\t\t\t\tcase \"middle\": y = 0.5; break;\n\t\t\t\tcase \"bottom\": y = 1; break;\n\t\t\t\tdefault: y = origin[ 0 ] / original.height;\n\t\t\t}\n\t\t\tswitch ( origin[ 1 ] ) {\n\t\t\t\tcase \"left\": x = 0; break;\n\t\t\t\tcase \"center\": x = 0.5; break;\n\t\t\t\tcase \"right\": x = 1; break;\n\t\t\t\tdefault: x = origin[ 1 ] / original.width;\n\t\t\t}\n\t\t\treturn {\n\t\t\t\tx: x,\n\t\t\t\ty: y\n\t\t\t};\n\t\t},\n\t\n\t\t// Wraps the element around a wrapper that copies position properties\n\t\tcreateWrapper: function( element ) {\n\t\n\t\t\t// if the element is already wrapped, return it\n\t\t\tif ( element.parent().is( \".ui-effects-wrapper\" )) {\n\t\t\t\treturn element.parent();\n\t\t\t}\n\t\n\t\t\t// wrap the element\n\t\t\tvar props = {\n\t\t\t\t\twidth: element.outerWidth(true),\n\t\t\t\t\theight: element.outerHeight(true),\n\t\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t\t},\n\t\t\t\twrapper = $( \"<div></div>\" )\n\t\t\t\t\t.addClass( \"ui-effects-wrapper\" )\n\t\t\t\t\t.css({\n\t\t\t\t\t\tfontSize: \"100%\",\n\t\t\t\t\t\tbackground: \"transparent\",\n\t\t\t\t\t\tborder: \"none\",\n\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\tpadding: 0\n\t\t\t\t\t}),\n\t\t\t\t// Store the size in case width/height are defined in % - Fixes #5245\n\t\t\t\tsize = {\n\t\t\t\t\twidth: element.width(),\n\t\t\t\t\theight: element.height()\n\t\t\t\t},\n\t\t\t\tactive = document.activeElement;\n\t\n\t\t\t// support: Firefox\n\t\t\t// Firefox incorrectly exposes anonymous content\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=561664\n\t\t\ttry {\n\t\t\t\tactive.id;\n\t\t\t} catch( e ) {\n\t\t\t\tactive = document.body;\n\t\t\t}\n\t\n\t\t\telement.wrap( wrapper );\n\t\n\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t$( active ).focus();\n\t\t\t}\n\t\n\t\t\twrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element\n\t\n\t\t\t// transfer positioning properties to the wrapper\n\t\t\tif ( element.css( \"position\" ) === \"static\" ) {\n\t\t\t\twrapper.css({ position: \"relative\" });\n\t\t\t\telement.css({ position: \"relative\" });\n\t\t\t} else {\n\t\t\t\t$.extend( props, {\n\t\t\t\t\tposition: element.css( \"position\" ),\n\t\t\t\t\tzIndex: element.css( \"z-index\" )\n\t\t\t\t});\n\t\t\t\t$.each([ \"top\", \"left\", \"bottom\", \"right\" ], function(i, pos) {\n\t\t\t\t\tprops[ pos ] = element.css( pos );\n\t\t\t\t\tif ( isNaN( parseInt( props[ pos ], 10 ) ) ) {\n\t\t\t\t\t\tprops[ pos ] = \"auto\";\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\telement.css({\n\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\ttop: 0,\n\t\t\t\t\tleft: 0,\n\t\t\t\t\tright: \"auto\",\n\t\t\t\t\tbottom: \"auto\"\n\t\t\t\t});\n\t\t\t}\n\t\t\telement.css(size);\n\t\n\t\t\treturn wrapper.css( props ).show();\n\t\t},\n\t\n\t\tremoveWrapper: function( element ) {\n\t\t\tvar active = document.activeElement;\n\t\n\t\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\t\telement.parent().replaceWith( element );\n\t\n\t\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t\t$( active ).focus();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\n\t\t\treturn element;\n\t\t},\n\t\n\t\tsetTransition: function( element, list, factor, value ) {\n\t\t\tvalue = value || {};\n\t\t\t$.each( list, function( i, x ) {\n\t\t\t\tvar unit = element.cssUnit( x );\n\t\t\t\tif ( unit[ 0 ] > 0 ) {\n\t\t\t\t\tvalue[ x ] = unit[ 0 ] * factor + unit[ 1 ];\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn value;\n\t\t}\n\t});\n\t\n\t// return an effect options object for the given parameters:\n\tfunction _normalizeArguments( effect, options, speed, callback ) {\n\t\n\t\t// allow passing all options as the first parameter\n\t\tif ( $.isPlainObject( effect ) ) {\n\t\t\toptions = effect;\n\t\t\teffect = effect.effect;\n\t\t}\n\t\n\t\t// convert to an object\n\t\teffect = { effect: effect };\n\t\n\t\t// catch (effect, null, ...)\n\t\tif ( options == null ) {\n\t\t\toptions = {};\n\t\t}\n\t\n\t\t// catch (effect, callback)\n\t\tif ( $.isFunction( options ) ) {\n\t\t\tcallback = options;\n\t\t\tspeed = null;\n\t\t\toptions = {};\n\t\t}\n\t\n\t\t// catch (effect, speed, ?)\n\t\tif ( typeof options === \"number\" || $.fx.speeds[ options ] ) {\n\t\t\tcallback = speed;\n\t\t\tspeed = options;\n\t\t\toptions = {};\n\t\t}\n\t\n\t\t// catch (effect, options, callback)\n\t\tif ( $.isFunction( speed ) ) {\n\t\t\tcallback = speed;\n\t\t\tspeed = null;\n\t\t}\n\t\n\t\t// add options to effect\n\t\tif ( options ) {\n\t\t\t$.extend( effect, options );\n\t\t}\n\t\n\t\tspeed = speed || options.duration;\n\t\teffect.duration = $.fx.off ? 0 :\n\t\t\ttypeof speed === \"number\" ? speed :\n\t\t\tspeed in $.fx.speeds ? $.fx.speeds[ speed ] :\n\t\t\t$.fx.speeds._default;\n\t\n\t\teffect.complete = callback || options.complete;\n\t\n\t\treturn effect;\n\t}\n\t\n\tfunction standardAnimationOption( option ) {\n\t\t// Valid standard speeds (nothing, number, named speed)\n\t\tif ( !option || typeof option === \"number\" || $.fx.speeds[ option ] ) {\n\t\t\treturn true;\n\t\t}\n\t\n\t\t// Invalid strings - treat as \"normal\" speed\n\t\tif ( typeof option === \"string\" && !$.effects.effect[ option ] ) {\n\t\t\treturn true;\n\t\t}\n\t\n\t\t// Complete callback\n\t\tif ( $.isFunction( option ) ) {\n\t\t\treturn true;\n\t\t}\n\t\n\t\t// Options hash (but not naming an effect)\n\t\tif ( typeof option === \"object\" && !option.effect ) {\n\t\t\treturn true;\n\t\t}\n\t\n\t\t// Didn't match any standard API\n\t\treturn false;\n\t}\n\t\n\t$.fn.extend({\n\t\teffect: function( /* effect, options, speed, callback */ ) {\n\t\t\tvar args = _normalizeArguments.apply( this, arguments ),\n\t\t\t\tmode = args.mode,\n\t\t\t\tqueue = args.queue,\n\t\t\t\teffectMethod = $.effects.effect[ args.effect ];\n\t\n\t\t\tif ( $.fx.off || !effectMethod ) {\n\t\t\t\t// delegate to the original method (e.g., .show()) if possible\n\t\t\t\tif ( mode ) {\n\t\t\t\t\treturn this[ mode ]( args.duration, args.complete );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.each( function() {\n\t\t\t\t\t\tif ( args.complete ) {\n\t\t\t\t\t\t\targs.complete.call( this );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tfunction run( next ) {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tcomplete = args.complete,\n\t\t\t\t\tmode = args.mode;\n\t\n\t\t\t\tfunction done() {\n\t\t\t\t\tif ( $.isFunction( complete ) ) {\n\t\t\t\t\t\tcomplete.call( elem[0] );\n\t\t\t\t\t}\n\t\t\t\t\tif ( $.isFunction( next ) ) {\n\t\t\t\t\t\tnext();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// If the element already has the correct final state, delegate to\n\t\t\t\t// the core methods so the internal tracking of \"olddisplay\" works.\n\t\t\t\tif ( elem.is( \":hidden\" ) ? mode === \"hide\" : mode === \"show\" ) {\n\t\t\t\t\telem[ mode ]();\n\t\t\t\t\tdone();\n\t\t\t\t} else {\n\t\t\t\t\teffectMethod.call( elem[0], args, done );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn queue === false ? this.each( run ) : this.queue( queue || \"fx\", run );\n\t\t},\n\t\n\t\tshow: (function( orig ) {\n\t\t\treturn function( option ) {\n\t\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\t\targs.mode = \"show\";\n\t\t\t\t\treturn this.effect.call( this, args );\n\t\t\t\t}\n\t\t\t};\n\t\t})( $.fn.show ),\n\t\n\t\thide: (function( orig ) {\n\t\t\treturn function( option ) {\n\t\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\t\targs.mode = \"hide\";\n\t\t\t\t\treturn this.effect.call( this, args );\n\t\t\t\t}\n\t\t\t};\n\t\t})( $.fn.hide ),\n\t\n\t\ttoggle: (function( orig ) {\n\t\t\treturn function( option ) {\n\t\t\t\tif ( standardAnimationOption( option ) || typeof option === \"boolean\" ) {\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\t\targs.mode = \"toggle\";\n\t\t\t\t\treturn this.effect.call( this, args );\n\t\t\t\t}\n\t\t\t};\n\t\t})( $.fn.toggle ),\n\t\n\t\t// helper functions\n\t\tcssUnit: function(key) {\n\t\t\tvar style = this.css( key ),\n\t\t\t\tval = [];\n\t\n\t\t\t$.each( [ \"em\", \"px\", \"%\", \"pt\" ], function( i, unit ) {\n\t\t\t\tif ( style.indexOf( unit ) > 0 ) {\n\t\t\t\t\tval = [ parseFloat( style ), unit ];\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn val;\n\t\t}\n\t});\n\t\n\t})();\n\t\n\t/******************************************************************************/\n\t/*********************************** EASING ***********************************/\n\t/******************************************************************************/\n\t\n\t(function() {\n\t\n\t// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\t\n\tvar baseEasings = {};\n\t\n\t$.each( [ \"Quad\", \"Cubic\", \"Quart\", \"Quint\", \"Expo\" ], function( i, name ) {\n\t\tbaseEasings[ name ] = function( p ) {\n\t\t\treturn Math.pow( p, i + 2 );\n\t\t};\n\t});\n\t\n\t$.extend( baseEasings, {\n\t\tSine: function ( p ) {\n\t\t\treturn 1 - Math.cos( p * Math.PI / 2 );\n\t\t},\n\t\tCirc: function ( p ) {\n\t\t\treturn 1 - Math.sqrt( 1 - p * p );\n\t\t},\n\t\tElastic: function( p ) {\n\t\t\treturn p === 0 || p === 1 ? p :\n\t\t\t\t-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );\n\t\t},\n\t\tBack: function( p ) {\n\t\t\treturn p * p * ( 3 * p - 2 );\n\t\t},\n\t\tBounce: function ( p ) {\n\t\t\tvar pow2,\n\t\t\t\tbounce = 4;\n\t\n\t\t\twhile ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}\n\t\t\treturn 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );\n\t\t}\n\t});\n\t\n\t$.each( baseEasings, function( name, easeIn ) {\n\t\t$.easing[ \"easeIn\" + name ] = easeIn;\n\t\t$.easing[ \"easeOut\" + name ] = function( p ) {\n\t\t\treturn 1 - easeIn( 1 - p );\n\t\t};\n\t\t$.easing[ \"easeInOut\" + name ] = function( p ) {\n\t\t\treturn p < 0.5 ?\n\t\t\t\teaseIn( p * 2 ) / 2 :\n\t\t\t\t1 - easeIn( p * -2 + 2 ) / 2;\n\t\t};\n\t});\n\t\n\t})();\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\tvar uid = 0,\n\t\thideProps = {},\n\t\tshowProps = {};\n\t\n\thideProps.height = hideProps.paddingTop = hideProps.paddingBottom =\n\t\thideProps.borderTopWidth = hideProps.borderBottomWidth = \"hide\";\n\tshowProps.height = showProps.paddingTop = showProps.paddingBottom =\n\t\tshowProps.borderTopWidth = showProps.borderBottomWidth = \"show\";\n\t\n\t$.widget( \"ui.accordion\", {\n\t\tversion: \"1.10.3\",\n\t\toptions: {\n\t\t\tactive: 0,\n\t\t\tanimate: {},\n\t\t\tcollapsible: false,\n\t\t\tevent: \"click\",\n\t\t\theader: \"> li > :first-child,> :not(li):even\",\n\t\t\theightStyle: \"auto\",\n\t\t\ticons: {\n\t\t\t\tactiveHeader: \"ui-icon-triangle-1-s\",\n\t\t\t\theader: \"ui-icon-triangle-1-e\"\n\t\t\t},\n\t\n\t\t\t// callbacks\n\t\t\tactivate: null,\n\t\t\tbeforeActivate: null\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\tvar options = this.options;\n\t\t\tthis.prevShow = this.prevHide = $();\n\t\t\tthis.element.addClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t\t// ARIA\n\t\t\t\t.attr( \"role\", \"tablist\" );\n\t\n\t\t\t// don't allow collapsible: false and active: false / null\n\t\t\tif ( !options.collapsible && (options.active === false || options.active == null) ) {\n\t\t\t\toptions.active = 0;\n\t\t\t}\n\t\n\t\t\tthis._processPanels();\n\t\t\t// handle negative values\n\t\t\tif ( options.active < 0 ) {\n\t\t\t\toptions.active += this.headers.length;\n\t\t\t}\n\t\t\tthis._refresh();\n\t\t},\n\t\n\t\t_getCreateEventData: function() {\n\t\t\treturn {\n\t\t\t\theader: this.active,\n\t\t\t\tpanel: !this.active.length ? $() : this.active.next(),\n\t\t\t\tcontent: !this.active.length ? $() : this.active.next()\n\t\t\t};\n\t\t},\n\t\n\t\t_createIcons: function() {\n\t\t\tvar icons = this.options.icons;\n\t\t\tif ( icons ) {\n\t\t\t\t$( \"<span>\" )\n\t\t\t\t\t.addClass( \"ui-accordion-header-icon ui-icon \" + icons.header )\n\t\t\t\t\t.prependTo( this.headers );\n\t\t\t\tthis.active.children( \".ui-accordion-header-icon\" )\n\t\t\t\t\t.removeClass( icons.header )\n\t\t\t\t\t.addClass( icons.activeHeader );\n\t\t\t\tthis.headers.addClass( \"ui-accordion-icons\" );\n\t\t\t}\n\t\t},\n\t\n\t\t_destroyIcons: function() {\n\t\t\tthis.headers\n\t\t\t\t.removeClass( \"ui-accordion-icons\" )\n\t\t\t\t.children( \".ui-accordion-header-icon\" )\n\t\t\t\t\t.remove();\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tvar contents;\n\t\n\t\t\t// clean up main element\n\t\t\tthis.element\n\t\t\t\t.removeClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t\t.removeAttr( \"role\" );\n\t\n\t\t\t// clean up headers\n\t\t\tthis.headers\n\t\t\t\t.removeClass( \"ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t\t.removeAttr( \"aria-controls\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.each(function() {\n\t\t\t\t\tif ( /^ui-accordion/.test( this.id ) ) {\n\t\t\t\t\t\tthis.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tthis._destroyIcons();\n\t\n\t\t\t// clean up content panels\n\t\t\tcontents = this.headers.next()\n\t\t\t\t.css( \"display\", \"\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t.removeClass( \"ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled\" )\n\t\t\t\t.each(function() {\n\t\t\t\t\tif ( /^ui-accordion/.test( this.id ) ) {\n\t\t\t\t\t\tthis.removeAttribute( \"id\" );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\t\tcontents.css( \"height\", \"\" );\n\t\t\t}\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"active\" ) {\n\t\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\t\tthis._activate( value );\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( key === \"event\" ) {\n\t\t\t\tif ( this.options.event ) {\n\t\t\t\t\tthis._off( this.headers, this.options.event );\n\t\t\t\t}\n\t\t\t\tthis._setupEvents( value );\n\t\t\t}\n\t\n\t\t\tthis._super( key, value );\n\t\n\t\t\t// setting collapsible: false while collapsed; open first panel\n\t\t\tif ( key === \"collapsible\" && !value && this.options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t}\n\t\n\t\t\tif ( key === \"icons\" ) {\n\t\t\t\tthis._destroyIcons();\n\t\t\t\tif ( value ) {\n\t\t\t\t\tthis._createIcons();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// #5332 - opacity doesn't cascade to positioned elements in IE\n\t\t\t// so we need to add the disabled class to the headers and panels\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\tthis.headers.add( this.headers.next() )\n\t\t\t\t\t.toggleClass( \"ui-state-disabled\", !!value );\n\t\t\t}\n\t\t},\n\t\n\t\t_keydown: function( event ) {\n\t\t\t/*jshint maxcomplexity:15*/\n\t\t\tif ( event.altKey || event.ctrlKey ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar keyCode = $.ui.keyCode,\n\t\t\t\tlength = this.headers.length,\n\t\t\t\tcurrentIndex = this.headers.index( event.target ),\n\t\t\t\ttoFocus = false;\n\t\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase keyCode.RIGHT:\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\ttoFocus = this.headers[ ( currentIndex + 1 ) % length ];\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.LEFT:\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\ttoFocus = this.headers[ ( currentIndex - 1 + length ) % length ];\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.SPACE:\n\t\t\t\tcase keyCode.ENTER:\n\t\t\t\t\tthis._eventHandler( event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.HOME:\n\t\t\t\t\ttoFocus = this.headers[ 0 ];\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.END:\n\t\t\t\t\ttoFocus = this.headers[ length - 1 ];\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\n\t\t\tif ( toFocus ) {\n\t\t\t\t$( event.target ).attr( \"tabIndex\", -1 );\n\t\t\t\t$( toFocus ).attr( \"tabIndex\", 0 );\n\t\t\t\ttoFocus.focus();\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\n\t\t_panelKeyDown : function( event ) {\n\t\t\tif ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {\n\t\t\t\t$( event.currentTarget ).prev().focus();\n\t\t\t}\n\t\t},\n\t\n\t\trefresh: function() {\n\t\t\tvar options = this.options;\n\t\t\tthis._processPanels();\n\t\n\t\t\t// was collapsed or no panel\n\t\t\tif ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// active false only when collapsible is true\n\t\t\t} else if ( options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t// was active, but active panel is gone\n\t\t\t} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t\t// all remaining panel are disabled\n\t\t\t\tif ( this.headers.length === this.headers.find(\".ui-state-disabled\").length ) {\n\t\t\t\t\toptions.active = false;\n\t\t\t\t\tthis.active = $();\n\t\t\t\t// activate previous panel\n\t\t\t\t} else {\n\t\t\t\t\tthis._activate( Math.max( 0, options.active - 1 ) );\n\t\t\t\t}\n\t\t\t// was active, active panel still exists\n\t\t\t} else {\n\t\t\t\t// make sure active index is correct\n\t\t\t\toptions.active = this.headers.index( this.active );\n\t\t\t}\n\t\n\t\t\tthis._destroyIcons();\n\t\n\t\t\tthis._refresh();\n\t\t},\n\t\n\t\t_processPanels: function() {\n\t\t\tthis.headers = this.element.find( this.options.header )\n\t\t\t\t.addClass( \"ui-accordion-header ui-helper-reset ui-state-default ui-corner-all\" );\n\t\n\t\t\tthis.headers.next()\n\t\t\t\t.addClass( \"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom\" )\n\t\t\t\t.filter(\":not(.ui-accordion-content-active)\")\n\t\t\t\t.hide();\n\t\t},\n\t\n\t\t_refresh: function() {\n\t\t\tvar maxHeight,\n\t\t\t\toptions = this.options,\n\t\t\t\theightStyle = options.heightStyle,\n\t\t\t\tparent = this.element.parent(),\n\t\t\t\taccordionId = this.accordionId = \"ui-accordion-\" +\n\t\t\t\t\t(this.element.attr( \"id\" ) || ++uid);\n\t\n\t\t\tthis.active = this._findActive( options.active )\n\t\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" )\n\t\t\t\t.removeClass( \"ui-corner-all\" );\n\t\t\tthis.active.next()\n\t\t\t\t.addClass( \"ui-accordion-content-active\" )\n\t\t\t\t.show();\n\t\n\t\t\tthis.headers\n\t\t\t\t.attr( \"role\", \"tab\" )\n\t\t\t\t.each(function( i ) {\n\t\t\t\t\tvar header = $( this ),\n\t\t\t\t\t\theaderId = header.attr( \"id\" ),\n\t\t\t\t\t\tpanel = header.next(),\n\t\t\t\t\t\tpanelId = panel.attr( \"id\" );\n\t\t\t\t\tif ( !headerId ) {\n\t\t\t\t\t\theaderId = accordionId + \"-header-\" + i;\n\t\t\t\t\t\theader.attr( \"id\", headerId );\n\t\t\t\t\t}\n\t\t\t\t\tif ( !panelId ) {\n\t\t\t\t\t\tpanelId = accordionId + \"-panel-\" + i;\n\t\t\t\t\t\tpanel.attr( \"id\", panelId );\n\t\t\t\t\t}\n\t\t\t\t\theader.attr( \"aria-controls\", panelId );\n\t\t\t\t\tpanel.attr( \"aria-labelledby\", headerId );\n\t\t\t\t})\n\t\t\t\t.next()\n\t\t\t\t\t.attr( \"role\", \"tabpanel\" );\n\t\n\t\t\tthis.headers\n\t\t\t\t.not( this.active )\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\t\ttabIndex: -1\n\t\t\t\t})\n\t\t\t\t.next()\n\t\t\t\t\t.attr({\n\t\t\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t\t\t})\n\t\t\t\t\t.hide();\n\t\n\t\t\t// make sure at least one header is in the tab order\n\t\t\tif ( !this.active.length ) {\n\t\t\t\tthis.headers.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t\t} else {\n\t\t\t\tthis.active.attr({\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t})\n\t\t\t\t.next()\n\t\t\t\t\t.attr({\n\t\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tthis._createIcons();\n\t\n\t\t\tthis._setupEvents( options.event );\n\t\n\t\t\tif ( heightStyle === \"fill\" ) {\n\t\t\t\tmaxHeight = parent.height();\n\t\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\t\tvar elem = $( this ),\n\t\t\t\t\t\tposition = elem.css( \"position\" );\n\t\n\t\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t\t});\n\t\n\t\t\t\tthis.headers.each(function() {\n\t\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t\t});\n\t\n\t\t\t\tthis.headers.next()\n\t\t\t\t\t.each(function() {\n\t\t\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t\t\t})\n\t\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\t\tmaxHeight = 0;\n\t\t\t\tthis.headers.next()\n\t\t\t\t\t.each(function() {\n\t\t\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).css( \"height\", \"\" ).height() );\n\t\t\t\t\t})\n\t\t\t\t\t.height( maxHeight );\n\t\t\t}\n\t\t},\n\t\n\t\t_activate: function( index ) {\n\t\t\tvar active = this._findActive( index )[ 0 ];\n\t\n\t\t\t// trying to activate the already active panel\n\t\t\tif ( active === this.active[ 0 ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// trying to collapse, simulate a click on the currently active header\n\t\t\tactive = active || this.active[ 0 ];\n\t\n\t\t\tthis._eventHandler({\n\t\t\t\ttarget: active,\n\t\t\t\tcurrentTarget: active,\n\t\t\t\tpreventDefault: $.noop\n\t\t\t});\n\t\t},\n\t\n\t\t_findActive: function( selector ) {\n\t\t\treturn typeof selector === \"number\" ? this.headers.eq( selector ) : $();\n\t\t},\n\t\n\t\t_setupEvents: function( event ) {\n\t\t\tvar events = {\n\t\t\t\tkeydown: \"_keydown\"\n\t\t\t};\n\t\t\tif ( event ) {\n\t\t\t\t$.each( event.split(\" \"), function( index, eventName ) {\n\t\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tthis._off( this.headers.add( this.headers.next() ) );\n\t\t\tthis._on( this.headers, events );\n\t\t\tthis._on( this.headers.next(), { keydown: \"_panelKeyDown\" });\n\t\t\tthis._hoverable( this.headers );\n\t\t\tthis._focusable( this.headers );\n\t\t},\n\t\n\t\t_eventHandler: function( event ) {\n\t\t\tvar options = this.options,\n\t\t\t\tactive = this.active,\n\t\t\t\tclicked = $( event.currentTarget ),\n\t\t\t\tclickedIsActive = clicked[ 0 ] === active[ 0 ],\n\t\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\t\ttoShow = collapsing ? $() : clicked.next(),\n\t\t\t\ttoHide = active.next(),\n\t\t\t\teventData = {\n\t\t\t\t\toldHeader: active,\n\t\t\t\t\toldPanel: toHide,\n\t\t\t\t\tnewHeader: collapsing ? $() : clicked,\n\t\t\t\t\tnewPanel: toShow\n\t\t\t\t};\n\t\n\t\t\tevent.preventDefault();\n\t\n\t\t\tif (\n\t\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t\t// allow canceling activation\n\t\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\toptions.active = collapsing ? false : this.headers.index( clicked );\n\t\n\t\t\t// when the call to ._toggle() comes after the class changes\n\t\t\t// it causes a very odd bug in IE 8 (see #6720)\n\t\t\tthis.active = clickedIsActive ? $() : clicked;\n\t\t\tthis._toggle( eventData );\n\t\n\t\t\t// switch classes\n\t\t\t// corner classes on the previously active header stay after the animation\n\t\t\tactive.removeClass( \"ui-accordion-header-active ui-state-active\" );\n\t\t\tif ( options.icons ) {\n\t\t\t\tactive.children( \".ui-accordion-header-icon\" )\n\t\t\t\t\t.removeClass( options.icons.activeHeader )\n\t\t\t\t\t.addClass( options.icons.header );\n\t\t\t}\n\t\n\t\t\tif ( !clickedIsActive ) {\n\t\t\t\tclicked\n\t\t\t\t\t.removeClass( \"ui-corner-all\" )\n\t\t\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" );\n\t\t\t\tif ( options.icons ) {\n\t\t\t\t\tclicked.children( \".ui-accordion-header-icon\" )\n\t\t\t\t\t\t.removeClass( options.icons.header )\n\t\t\t\t\t\t.addClass( options.icons.activeHeader );\n\t\t\t\t}\n\t\n\t\t\t\tclicked\n\t\t\t\t\t.next()\n\t\t\t\t\t.addClass( \"ui-accordion-content-active\" );\n\t\t\t}\n\t\t},\n\t\n\t\t_toggle: function( data ) {\n\t\t\tvar toShow = data.newPanel,\n\t\t\t\ttoHide = this.prevShow.length ? this.prevShow : data.oldPanel;\n\t\n\t\t\t// handle activating a panel during the animation for another activation\n\t\t\tthis.prevShow.add( this.prevHide ).stop( true, true );\n\t\t\tthis.prevShow = toShow;\n\t\t\tthis.prevHide = toHide;\n\t\n\t\t\tif ( this.options.animate ) {\n\t\t\t\tthis._animate( toShow, toHide, data );\n\t\t\t} else {\n\t\t\t\ttoHide.hide();\n\t\t\t\ttoShow.show();\n\t\t\t\tthis._toggleComplete( data );\n\t\t\t}\n\t\n\t\t\ttoHide.attr({\n\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t});\n\t\t\ttoHide.prev().attr( \"aria-selected\", \"false\" );\n\t\t\t// if we're switching panels, remove the old header from the tab order\n\t\t\t// if we're opening from collapsed state, remove the previous header from the tab order\n\t\t\t// if we're collapsing, then keep the collapsing header in the tab order\n\t\t\tif ( toShow.length && toHide.length ) {\n\t\t\t\ttoHide.prev().attr( \"tabIndex\", -1 );\n\t\t\t} else if ( toShow.length ) {\n\t\t\t\tthis.headers.filter(function() {\n\t\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t\t})\n\t\t\t\t.attr( \"tabIndex\", -1 );\n\t\t\t}\n\t\n\t\t\ttoShow\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t})\n\t\t\t\t.prev()\n\t\t\t\t\t.attr({\n\t\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\ttabIndex: 0\n\t\t\t\t\t});\n\t\t},\n\t\n\t\t_animate: function( toShow, toHide, data ) {\n\t\t\tvar total, easing, duration,\n\t\t\t\tthat = this,\n\t\t\t\tadjust = 0,\n\t\t\t\tdown = toShow.length &&\n\t\t\t\t\t( !toHide.length || ( toShow.index() < toHide.index() ) ),\n\t\t\t\tanimate = this.options.animate || {},\n\t\t\t\toptions = down && animate.down || animate,\n\t\t\t\tcomplete = function() {\n\t\t\t\t\tthat._toggleComplete( data );\n\t\t\t\t};\n\t\n\t\t\tif ( typeof options === \"number\" ) {\n\t\t\t\tduration = options;\n\t\t\t}\n\t\t\tif ( typeof options === \"string\" ) {\n\t\t\t\teasing = options;\n\t\t\t}\n\t\t\t// fall back from options to animation in case of partial down settings\n\t\t\teasing = easing || options.easing || animate.easing;\n\t\t\tduration = duration || options.duration || animate.duration;\n\t\n\t\t\tif ( !toHide.length ) {\n\t\t\t\treturn toShow.animate( showProps, duration, easing, complete );\n\t\t\t}\n\t\t\tif ( !toShow.length ) {\n\t\t\t\treturn toHide.animate( hideProps, duration, easing, complete );\n\t\t\t}\n\t\n\t\t\ttotal = toShow.show().outerHeight();\n\t\t\ttoHide.animate( hideProps, {\n\t\t\t\tduration: duration,\n\t\t\t\teasing: easing,\n\t\t\t\tstep: function( now, fx ) {\n\t\t\t\t\tfx.now = Math.round( now );\n\t\t\t\t}\n\t\t\t});\n\t\t\ttoShow\n\t\t\t\t.hide()\n\t\t\t\t.animate( showProps, {\n\t\t\t\t\tduration: duration,\n\t\t\t\t\teasing: easing,\n\t\t\t\t\tcomplete: complete,\n\t\t\t\t\tstep: function( now, fx ) {\n\t\t\t\t\t\tfx.now = Math.round( now );\n\t\t\t\t\t\tif ( fx.prop !== \"height\" ) {\n\t\t\t\t\t\t\tadjust += fx.now;\n\t\t\t\t\t\t} else if ( that.options.heightStyle !== \"content\" ) {\n\t\t\t\t\t\t\tfx.now = Math.round( total - toHide.outerHeight() - adjust );\n\t\t\t\t\t\t\tadjust = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t},\n\t\n\t\t_toggleComplete: function( data ) {\n\t\t\tvar toHide = data.oldPanel;\n\t\n\t\t\ttoHide\n\t\t\t\t.removeClass( \"ui-accordion-content-active\" )\n\t\t\t\t.prev()\n\t\t\t\t\t.removeClass( \"ui-corner-top\" )\n\t\t\t\t\t.addClass( \"ui-corner-all\" );\n\t\n\t\t\t// Work around for rendering bug in IE (#5421)\n\t\t\tif ( toHide.length ) {\n\t\t\t\ttoHide.parent()[0].className = toHide.parent()[0].className;\n\t\t\t}\n\t\n\t\t\tthis._trigger( \"activate\", null, data );\n\t\t}\n\t});\n\t\n\t})( jQuery );\n\t\n\t(function( $, undefined ) {\n\t\n\t// used to prevent race conditions with remote data sources\n\tvar requestIndex = 0;\n\t\n\t$.widget( \"ui.autocomplete\", {\n\t\tversion: \"1.10.3\",\n\t\tdefaultElement: \"<input>\",\n\t\toptions: {\n\t\t\tappendTo: null,\n\t\t\tautoFocus: false,\n\t\t\tdelay: 300,\n\t\t\tminLength: 1,\n\t\t\tposition: {\n\t\t\t\tmy: \"left top\",\n\t\t\t\tat: \"left bottom\",\n\t\t\t\tcollision: \"none\"\n\t\t\t},\n\t\t\tsource: null,\n\t\n\t\t\t// callbacks\n\t\t\tchange: null,\n\t\t\tclose: null,\n\t\t\tfocus: null,\n\t\t\topen: null,\n\t\t\tresponse: null,\n\t\t\tsearch: null,\n\t\t\tselect: null\n\t\t},\n\t\n\t\tpending: 0,\n\t\n\t\t_create: function() {\n\t\t\t// Some browsers only repeat keydown events, not keypress events,\n\t\t\t// so we use the suppressKeyPress flag to determine if we've already\n\t\t\t// handled the keydown event. #7269\n\t\t\t// Unfortunately the code for & in keypress is the same as the up arrow,\n\t\t\t// so we use the suppressKeyPressRepeat flag to avoid handling keypress\n\t\t\t// events when we know the keydown event was used to modify the\n\t\t\t// search term. #7799\n\t\t\tvar suppressKeyPress, suppressKeyPressRepeat, suppressInput,\n\t\t\t\tnodeName = this.element[0].nodeName.toLowerCase(),\n\t\t\t\tisTextarea = nodeName === \"textarea\",\n\t\t\t\tisInput = nodeName === \"input\";\n\t\n\t\t\tthis.isMultiLine =\n\t\t\t\t// Textareas are always multi-line\n\t\t\t\tisTextarea ? true :\n\t\t\t\t// Inputs are always single-line, even if inside a contentEditable element\n\t\t\t\t// IE also treats inputs as contentEditable\n\t\t\t\tisInput ? false :\n\t\t\t\t// All other element types are determined by whether or not they're contentEditable\n\t\t\t\tthis.element.prop( \"isContentEditable\" );\n\t\n\t\t\tthis.valueMethod = this.element[ isTextarea || isInput ? \"val\" : \"text\" ];\n\t\t\tthis.isNewMenu = true;\n\t\n\t\t\tthis.element\n\t\t\t\t.addClass( \"ui-autocomplete-input\" )\n\t\t\t\t.attr( \"autocomplete\", \"off\" );\n\t\n\t\t\tthis._on( this.element, {\n\t\t\t\tkeydown: function( event ) {\n\t\t\t\t\t/*jshint maxcomplexity:15*/\n\t\t\t\t\tif ( this.element.prop( \"readOnly\" ) ) {\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tsuppressInput = true;\n\t\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\tsuppressInput = false;\n\t\t\t\t\tsuppressKeyPressRepeat = false;\n\t\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.UP:\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.ENTER:\n\t\t\t\t\tcase keyCode.NUMPAD_ENTER:\n\t\t\t\t\t\t// when menu is open and has focus\n\t\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\t\t// #6055 - Opera still allows the keypress to occur\n\t\t\t\t\t\t\t// which causes forms to submit\n\t\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.TAB:\n\t\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.ESCAPE:\n\t\t\t\t\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\t\tthis._value( this.term );\n\t\t\t\t\t\t\tthis.close( event );\n\t\t\t\t\t\t\t// Different browsers have different default behavior for escape\n\t\t\t\t\t\t\t// Single press can mean undo or clear\n\t\t\t\t\t\t\t// Double press in IE means clear the whole form\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\t\t// search timeout should be triggered before the input value is changed\n\t\t\t\t\t\tthis._searchTimeout( event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tkeypress: function( event ) {\n\t\t\t\t\tif ( suppressKeyPress ) {\n\t\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( suppressKeyPressRepeat ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// replicate some key handlers to allow them to repeat in Firefox and Opera\n\t\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.UP:\n\t\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tinput: function( event ) {\n\t\t\t\t\tif ( suppressInput ) {\n\t\t\t\t\t\tsuppressInput = false;\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis._searchTimeout( event );\n\t\t\t\t},\n\t\t\t\tfocus: function() {\n\t\t\t\t\tthis.selectedItem = null;\n\t\t\t\t\tthis.previous = this._value();\n\t\t\t\t},\n\t\t\t\tblur: function( event ) {\n\t\t\t\t\tif ( this.cancelBlur ) {\n\t\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\tclearTimeout( this.searching );\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\tthis._change( event );\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tthis._initSource();\n\t\t\tthis.menu = $( \"<ul>\" )\n\t\t\t\t.addClass( \"ui-autocomplete ui-front\" )\n\t\t\t\t.appendTo( this._appendTo() )\n\t\t\t\t.menu({\n\t\t\t\t\t// disable ARIA support, the live region takes care of that\n\t\t\t\t\trole: null\n\t\t\t\t})\n\t\t\t\t.hide()\n\t\t\t\t.data( \"ui-menu\" );\n\t\n\t\t\tthis._on( this.menu.element, {\n\t\t\t\tmousedown: function( event ) {\n\t\t\t\t\t// prevent moving focus out of the text field\n\t\t\t\t\tevent.preventDefault();\n\t\n\t\t\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t\t\tthis.cancelBlur = true;\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\t});\n\t\n\t\t\t\t\t// clicking on the scrollbar causes focus to shift to the body\n\t\t\t\t\t// but we can't detect a mouseup or a click immediately afterward\n\t\t\t\t\t// so we have to track the next mousedown and close the menu if\n\t\t\t\t\t// the user clicks somewhere outside of the autocomplete\n\t\t\t\t\tvar menuElement = this.menu.element[ 0 ];\n\t\t\t\t\tif ( !$( event.target ).closest( \".ui-menu-item\" ).length ) {\n\t\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\t\tvar that = this;\n\t\t\t\t\t\t\tthis.document.one( \"mousedown\", function( event ) {\n\t\t\t\t\t\t\t\tif ( event.target !== that.element[ 0 ] &&\n\t\t\t\t\t\t\t\t\t\tevent.target !== menuElement &&\n\t\t\t\t\t\t\t\t\t\t!$.contains( menuElement, event.target ) ) {\n\t\t\t\t\t\t\t\t\tthat.close();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmenufocus: function( event, ui ) {\n\t\t\t\t\t// support: Firefox\n\t\t\t\t\t// Prevent accidental activation of menu items in Firefox (#7024 #9118)\n\t\t\t\t\tif ( this.isNewMenu ) {\n\t\t\t\t\t\tthis.isNewMenu = false;\n\t\t\t\t\t\tif ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\t\tthis.menu.blur();\n\t\n\t\t\t\t\t\t\tthis.document.one( \"mousemove\", function() {\n\t\t\t\t\t\t\t\t$( event.target ).trigger( event.originalEvent );\n\t\t\t\t\t\t\t});\n\t\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\n\t\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" );\n\t\t\t\t\tif ( false !== this._trigger( \"focus\", event, { item: item } ) ) {\n\t\t\t\t\t\t// use value to match what will end up in the input, if it was a key event\n\t\t\t\t\t\tif ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\t\tthis._value( item.value );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Normally the input is populated with the item's value as the\n\t\t\t\t\t\t// menu is navigated, causing screen readers to notice a change and\n\t\t\t\t\t\t// announce the item. Since the focus event was canceled, this doesn't\n\t\t\t\t\t\t// happen, so we update the live region so that screen readers can\n\t\t\t\t\t\t// still notice the change and announce it.\n\t\t\t\t\t\tthis.liveRegion.text( item.value );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmenuselect: function( event, ui ) {\n\t\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" ),\n\t\t\t\t\t\tprevious = this.previous;\n\t\n\t\t\t\t\t// only trigger when focus was lost (click on menu)\n\t\t\t\t\tif ( this.element[0] !== this.document[0].activeElement ) {\n\t\t\t\t\t\tthis.element.focus();\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\t// #6109 - IE triggers two focus events and the second\n\t\t\t\t\t\t// is asynchronous, so we need to reset the previous\n\t\t\t\t\t\t// term synchronously and asynchronously :-(\n\t\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\t\tthis.selectedItem = item;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\n\t\t\t\t\tif ( false !== this._trigger( \"select\", event, { item: item } ) ) {\n\t\t\t\t\t\tthis._value( item.value );\n\t\t\t\t\t}\n\t\t\t\t\t// reset the term after the select event\n\t\t\t\t\t// this allows custom select handling to work properly\n\t\t\t\t\tthis.term = this._value();\n\t\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\tthis.selectedItem = item;\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tthis.liveRegion = $( \"<span>\", {\n\t\t\t\t\trole: \"status\",\n\t\t\t\t\t\"aria-live\": \"polite\"\n\t\t\t\t})\n\t\t\t\t.addClass( \"ui-helper-hidden-accessible\" )\n\t\t\t\t.insertBefore( this.element );\n\t\n\t\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\t\tthis._on( this.window, {\n\t\t\t\tbeforeunload: function() {\n\t\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tclearTimeout( this.searching );\n\t\t\tthis.element\n\t\t\t\t.removeClass( \"ui-autocomplete-input\" )\n\t\t\t\t.removeAttr( \"autocomplete\" );\n\t\t\tthis.menu.element.remove();\n\t\t\tthis.liveRegion.remove();\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tthis._super( key, value );\n\t\t\tif ( key === \"source\" ) {\n\t\t\t\tthis._initSource();\n\t\t\t}\n\t\t\tif ( key === \"appendTo\" ) {\n\t\t\t\tthis.menu.element.appendTo( this._appendTo() );\n\t\t\t}\n\t\t\tif ( key === \"disabled\" && value && this.xhr ) {\n\t\t\t\tthis.xhr.abort();\n\t\t\t}\n\t\t},\n\t\n\t\t_appendTo: function() {\n\t\t\tvar element = this.options.appendTo;\n\t\n\t\t\tif ( element ) {\n\t\t\t\telement = element.jquery || element.nodeType ?\n\t\t\t\t\t$( element ) :\n\t\t\t\t\tthis.document.find( element ).eq( 0 );\n\t\t\t}\n\t\n\t\t\tif ( !element ) {\n\t\t\t\telement = this.element.closest( \".ui-front\" );\n\t\t\t}\n\t\n\t\t\tif ( !element.length ) {\n\t\t\t\telement = this.document[0].body;\n\t\t\t}\n\t\n\t\t\treturn element;\n\t\t},\n\t\n\t\t_initSource: function() {\n\t\t\tvar array, url,\n\t\t\t\tthat = this;\n\t\t\tif ( $.isArray(this.options.source) ) {\n\t\t\t\tarray = this.options.source;\n\t\t\t\tthis.source = function( request, response ) {\n\t\t\t\t\tresponse( $.ui.autocomplete.filter( array, request.term ) );\n\t\t\t\t};\n\t\t\t} else if ( typeof this.options.source === \"string\" ) {\n\t\t\t\turl = this.options.source;\n\t\t\t\tthis.source = function( request, response ) {\n\t\t\t\t\tif ( that.xhr ) {\n\t\t\t\t\t\tthat.xhr.abort();\n\t\t\t\t\t}\n\t\t\t\t\tthat.xhr = $.ajax({\n\t\t\t\t\t\turl: url,\n\t\t\t\t\t\tdata: request,\n\t\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t\t\tresponse( data );\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: function() {\n\t\t\t\t\t\t\tresponse( [] );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tthis.source = this.options.source;\n\t\t\t}\n\t\t},\n\t\n\t\t_searchTimeout: function( event ) {\n\t\t\tclearTimeout( this.searching );\n\t\t\tthis.searching = this._delay(function() {\n\t\t\t\t// only search if the value has changed\n\t\t\t\tif ( this.term !== this._value() ) {\n\t\t\t\t\tthis.selectedItem = null;\n\t\t\t\t\tthis.search( null, event );\n\t\t\t\t}\n\t\t\t}, this.options.delay );\n\t\t},\n\t\n\t\tsearch: function( value, event ) {\n\t\t\tvalue = value != null ? value : this._value();\n\t\n\t\t\t// always save the actual value, not the one passed as an argument\n\t\t\tthis.term = this._value();\n\t\n\t\t\tif ( value.length < this.options.minLength ) {\n\t\t\t\treturn this.close( event );\n\t\t\t}\n\t\n\t\t\tif ( this._trigger( \"search\", event ) === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\treturn this._search( value );\n\t\t},\n\t\n\t\t_search: function( value ) {\n\t\t\tthis.pending++;\n\t\t\tthis.element.addClass( \"ui-autocomplete-loading\" );\n\t\t\tthis.cancelSearch = false;\n\t\n\t\t\tthis.source( { term: value }, this._response() );\n\t\t},\n\t\n\t\t_response: function() {\n\t\t\tvar that = this,\n\t\t\t\tindex = ++requestIndex;\n\t\n\t\t\treturn function( content ) {\n\t\t\t\tif ( index === requestIndex ) {\n\t\t\t\t\tthat.__response( content );\n\t\t\t\t}\n\t\n\t\t\t\tthat.pending--;\n\t\t\t\tif ( !that.pending ) {\n\t\t\t\t\tthat.element.removeClass( \"ui-autocomplete-loading\" );\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\n\t\t__response: function( content ) {\n\t\t\tif ( content ) {\n\t\t\t\tcontent = this._normalize( content );\n\t\t\t}\n\t\t\tthis._trigger( \"response\", null, { content: content } );\n\t\t\tif ( !this.options.disabled && content && content.length && !this.cancelSearch ) {\n\t\t\t\tthis._suggest( content );\n\t\t\t\tthis._trigger( \"open\" );\n\t\t\t} else {\n\t\t\t\t// use ._close() instead of .close() so we don't cancel future searches\n\t\t\t\tthis._close();\n\t\t\t}\n\t\t},\n\t\n\t\tclose: function( event ) {\n\t\t\tthis.cancelSearch = true;\n\t\t\tthis._close( event );\n\t\t},\n\t\n\t\t_close: function( event ) {\n\t\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\t\tthis.menu.element.hide();\n\t\t\t\tthis.menu.blur();\n\t\t\t\tthis.isNewMenu = true;\n\t\t\t\tthis._trigger( \"close\", event );\n\t\t\t}\n\t\t},\n\t\n\t\t_change: function( event ) {\n\t\t\tif ( this.previous !== this._value() ) {\n\t\t\t\tthis._trigger( \"change\", event, { item: this.selectedItem } );\n\t\t\t}\n\t\t},\n\t\n\t\t_normalize: function( items ) {\n\t\t\t// assume all items have the right format when the first item is complete\n\t\t\tif ( items.length && items[0].label && items[0].value ) {\n\t\t\t\treturn items;\n\t\t\t}\n\t\t\treturn $.map( items, function( item ) {\n\t\t\t\tif ( typeof item === \"string\" ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tlabel: item,\n\t\t\t\t\t\tvalue: item\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn $.extend({\n\t\t\t\t\tlabel: item.label || item.value,\n\t\t\t\t\tvalue: item.value || item.label\n\t\t\t\t}, item );\n\t\t\t});\n\t\t},\n\t\n\t\t_suggest: function( items ) {\n\t\t\tvar ul = this.menu.element.empty();\n\t\t\tthis._renderMenu( ul, items );\n\t\t\tthis.isNewMenu = true;\n\t\t\tthis.menu.refresh();\n\t\n\t\t\t// size and position menu\n\t\t\tul.show();\n\t\t\tthis._resizeMenu();\n\t\t\tul.position( $.extend({\n\t\t\t\tof: this.element\n\t\t\t}, this.options.position ));\n\t\n\t\t\tif ( this.options.autoFocus ) {\n\t\t\t\tthis.menu.next();\n\t\t\t}\n\t\t},\n\t\n\t\t_resizeMenu: function() {\n\t\t\tvar ul = this.menu.element;\n\t\t\tul.outerWidth( Math.max(\n\t\t\t\t// Firefox wraps long text (possibly a rounding bug)\n\t\t\t\t// so we add 1px to avoid the wrapping (#7513)\n\t\t\t\tul.width( \"\" ).outerWidth() + 1,\n\t\t\t\tthis.element.outerWidth()\n\t\t\t) );\n\t\t},\n\t\n\t\t_renderMenu: function( ul, items ) {\n\t\t\tvar that = this;\n\t\t\t$.each( items, function( index, item ) {\n\t\t\t\tthat._renderItemData( ul, item );\n\t\t\t});\n\t\t},\n\t\n\t\t_renderItemData: function( ul, item ) {\n\t\t\treturn this._renderItem( ul, item ).data( \"ui-autocomplete-item\", item );\n\t\t},\n\t\n\t\t_renderItem: function( ul, item ) {\n\t\t\treturn $( \"<li>\" )\n\t\t\t\t.append( $( \"<a>\" ).text( item.label ) )\n\t\t\t\t.appendTo( ul );\n\t\t},\n\t\n\t\t_move: function( direction, event ) {\n\t\t\tif ( !this.menu.element.is( \":visible\" ) ) {\n\t\t\t\tthis.search( null, event );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.menu.isFirstItem() && /^previous/.test( direction ) ||\n\t\t\t\t\tthis.menu.isLastItem() && /^next/.test( direction ) ) {\n\t\t\t\tthis._value( this.term );\n\t\t\t\tthis.menu.blur();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.menu[ direction ]( event );\n\t\t},\n\t\n\t\twidget: function() {\n\t\t\treturn this.menu.element;\n\t\t},\n\t\n\t\t_value: function() {\n\t\t\treturn this.valueMethod.apply( this.element, arguments );\n\t\t},\n\t\n\t\t_keyEvent: function( keyEvent, event ) {\n\t\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\t\tthis._move( keyEvent, event );\n\t\n\t\t\t\t// prevents moving cursor to beginning/end of the text field in some browsers\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t}\n\t});\n\t\n\t$.extend( $.ui.autocomplete, {\n\t\tescapeRegex: function( value ) {\n\t\t\treturn value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n\t\t},\n\t\tfilter: function(array, term) {\n\t\t\tvar matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), \"i\" );\n\t\t\treturn $.grep( array, function(value) {\n\t\t\t\treturn matcher.test( value.label || value.value || value );\n\t\t\t});\n\t\t}\n\t});\n\t\n\t\n\t// live region extension, adding a `messages` option\n\t// NOTE: This is an experimental API. We are still investigating\n\t// a full solution for string manipulation and internationalization.\n\t$.widget( \"ui.autocomplete\", $.ui.autocomplete, {\n\t\toptions: {\n\t\t\tmessages: {\n\t\t\t\tnoResults: \"No search results.\",\n\t\t\t\tresults: function( amount ) {\n\t\t\t\t\treturn amount + ( amount > 1 ? \" results are\" : \" result is\" ) +\n\t\t\t\t\t\t\" available, use up and down arrow keys to navigate.\";\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t__response: function( content ) {\n\t\t\tvar message;\n\t\t\tthis._superApply( arguments );\n\t\t\tif ( this.options.disabled || this.cancelSearch ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( content && content.length ) {\n\t\t\t\tmessage = this.options.messages.results( content.length );\n\t\t\t} else {\n\t\t\t\tmessage = this.options.messages.noResults;\n\t\t\t}\n\t\t\tthis.liveRegion.text( message );\n\t\t}\n\t});\n\t\n\t}( jQuery ));\n\t\n\t(function( $, undefined ) {\n\t\n\tvar lastActive, startXPos, startYPos, clickDragged,\n\t\tbaseClasses = \"ui-button ui-widget ui-state-default ui-corner-all\",\n\t\tstateClasses = \"ui-state-hover ui-state-active \",\n\t\ttypeClasses = \"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",\n\t\tformResetHandler = function() {\n\t\t\tvar form = $( this );\n\t\t\tsetTimeout(function() {\n\t\t\t\tform.find( \":ui-button\" ).button( \"refresh\" );\n\t\t\t}, 1 );\n\t\t},\n\t\tradioGroup = function( radio ) {\n\t\t\tvar name = radio.name,\n\t\t\t\tform = radio.form,\n\t\t\t\tradios = $( [] );\n\t\t\tif ( name ) {\n\t\t\t\tname = name.replace( /'/g, \"\\\\'\" );\n\t\t\t\tif ( form ) {\n\t\t\t\t\tradios = $( form ).find( \"[name='\" + name + \"']\" );\n\t\t\t\t} else {\n\t\t\t\t\tradios = $( \"[name='\" + name + \"']\", radio.ownerDocument )\n\t\t\t\t\t\t.filter(function() {\n\t\t\t\t\t\t\treturn !this.form;\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn radios;\n\t\t};\n\t\n\t$.widget( \"ui.button\", {\n\t\tversion: \"1.10.3\",\n\t\tdefaultElement: \"<button>\",\n\t\toptions: {\n\t\t\tdisabled: null,\n\t\t\ttext: true,\n\t\t\tlabel: null,\n\t\t\ticons: {\n\t\t\t\tprimary: null,\n\t\t\t\tsecondary: null\n\t\t\t}\n\t\t},\n\t\t_create: function() {\n\t\t\tthis.element.closest( \"form\" )\n\t\t\t\t.unbind( \"reset\" + this.eventNamespace )\n\t\t\t\t.bind( \"reset\" + this.eventNamespace, formResetHandler );\n\t\n\t\t\tif ( typeof this.options.disabled !== \"boolean\" ) {\n\t\t\t\tthis.options.disabled = !!this.element.prop( \"disabled\" );\n\t\t\t} else {\n\t\t\t\tthis.element.prop( \"disabled\", this.options.disabled );\n\t\t\t}\n\t\n\t\t\tthis._determineButtonType();\n\t\t\tthis.hasTitle = !!this.buttonElement.attr( \"title\" );\n\t\n\t\t\tvar that = this,\n\t\t\t\toptions = this.options,\n\t\t\t\ttoggleButton = this.type === \"checkbox\" || this.type === \"radio\",\n\t\t\t\tactiveClass = !toggleButton ? \"ui-state-active\" : \"\",\n\t\t\t\tfocusClass = \"ui-state-focus\";\n\t\n\t\t\tif ( options.label === null ) {\n\t\t\t\toptions.label = (this.type === \"input\" ? this.buttonElement.val() : this.buttonElement.html());\n\t\t\t}\n\t\n\t\t\tthis._hoverable( this.buttonElement );\n\t\n\t\t\tthis.buttonElement\n\t\t\t\t.addClass( baseClasses )\n\t\t\t\t.attr( \"role\", \"button\" )\n\t\t\t\t.bind( \"mouseenter\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( this === lastActive ) {\n\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseleave\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).removeClass( activeClass );\n\t\t\t\t})\n\t\t\t\t.bind( \"click\" + this.eventNamespace, function( event ) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\n\t\t\tthis.element\n\t\t\t\t.bind( \"focus\" + this.eventNamespace, function() {\n\t\t\t\t\t// no need to check disabled, focus won't be triggered anyway\n\t\t\t\t\tthat.buttonElement.addClass( focusClass );\n\t\t\t\t})\n\t\t\t\t.bind( \"blur\" + this.eventNamespace, function() {\n\t\t\t\t\tthat.buttonElement.removeClass( focusClass );\n\t\t\t\t});\n\t\n\t\t\tif ( toggleButton ) {\n\t\t\t\tthis.element.bind( \"change\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( clickDragged ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthat.refresh();\n\t\t\t\t});\n\t\t\t\t// if mouse moves between mousedown and mouseup (drag) set clickDragged flag\n\t\t\t\t// prevents issue where button state changes but checkbox/radio checked state\n\t\t\t\t// does not in Firefox (see ticket #6970)\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.bind( \"mousedown\" + this.eventNamespace, function( event ) {\n\t\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tclickDragged = false;\n\t\t\t\t\t\tstartXPos = event.pageX;\n\t\t\t\t\t\tstartYPos = event.pageY;\n\t\t\t\t\t})\n\t\t\t\t\t.bind( \"mouseup\" + this.eventNamespace, function( event ) {\n\t\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( startXPos !== event.pageX || startYPos !== event.pageY ) {\n\t\t\t\t\t\t\tclickDragged = true;\n\t\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tif ( this.type === \"checkbox\" ) {\n\t\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if ( this.type === \"radio\" ) {\n\t\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\tthat.buttonElement.attr( \"aria-pressed\", \"true\" );\n\t\n\t\t\t\t\tvar radio = that.element[ 0 ];\n\t\t\t\t\tradioGroup( radio )\n\t\t\t\t\t\t.not( radio )\n\t\t\t\t\t\t.map(function() {\n\t\t\t\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.bind( \"mousedown\" + this.eventNamespace, function() {\n\t\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\tlastActive = this;\n\t\t\t\t\t\tthat.document.one( \"mouseup\", function() {\n\t\t\t\t\t\t\tlastActive = null;\n\t\t\t\t\t\t});\n\t\t\t\t\t})\n\t\t\t\t\t.bind( \"mouseup\" + this.eventNamespace, function() {\n\t\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t\t})\n\t\t\t\t\t.bind( \"keydown\" + this.eventNamespace, function(event) {\n\t\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {\n\t\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\t// see #8559, we bind to blur here in case the button element loses\n\t\t\t\t\t// focus between keydown and keyup, it would be left in an \"active\" state\n\t\t\t\t\t.bind( \"keyup\" + this.eventNamespace + \" blur\" + this.eventNamespace, function() {\n\t\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t\t});\n\t\n\t\t\t\tif ( this.buttonElement.is(\"a\") ) {\n\t\t\t\t\tthis.buttonElement.keyup(function(event) {\n\t\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\t\t// TODO pass through original event correctly (just as 2nd argument doesn't work)\n\t\t\t\t\t\t\t$( this ).click();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// TODO: pull out $.Widget's handling for the disabled option into\n\t\t\t// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can\n\t\t\t// be overridden by individual plugins\n\t\t\tthis._setOption( \"disabled\", options.disabled );\n\t\t\tthis._resetButton();\n\t\t},\n\t\n\t\t_determineButtonType: function() {\n\t\t\tvar ancestor, labelSelector, checked;\n\t\n\t\t\tif ( this.element.is(\"[type=checkbox]\") ) {\n\t\t\t\tthis.type = \"checkbox\";\n\t\t\t} else if ( this.element.is(\"[type=radio]\") ) {\n\t\t\t\tthis.type = \"radio\";\n\t\t\t} else if ( this.element.is(\"input\") ) {\n\t\t\t\tthis.type = \"input\";\n\t\t\t} else {\n\t\t\t\tthis.type = \"button\";\n\t\t\t}\n\t\n\t\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t\t// we don't search against the document in case the element\n\t\t\t\t// is disconnected from the DOM\n\t\t\t\tancestor = this.element.parents().last();\n\t\t\t\tlabelSelector = \"label[for='\" + this.element.attr(\"id\") + \"']\";\n\t\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\t\tancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();\n\t\t\t\t\tthis.buttonElement = ancestor.filter( labelSelector );\n\t\t\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.element.addClass( \"ui-helper-hidden-accessible\" );\n\t\n\t\t\t\tchecked = this.element.is( \":checked\" );\n\t\t\t\tif ( checked ) {\n\t\t\t\t\tthis.buttonElement.addClass( \"ui-state-active\" );\n\t\t\t\t}\n\t\t\t\tthis.buttonElement.prop( \"aria-pressed\", checked );\n\t\t\t} else {\n\t\t\t\tthis.buttonElement = this.element;\n\t\t\t}\n\t\t},\n\t\n\t\twidget: function() {\n\t\t\treturn this.buttonElement;\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.element\n\t\t\t\t.removeClass( \"ui-helper-hidden-accessible\" );\n\t\t\tthis.buttonElement\n\t\t\t\t.removeClass( baseClasses + \" \" + stateClasses + \" \" + typeClasses )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-pressed\" )\n\t\t\t\t.html( this.buttonElement.find(\".ui-button-text\").html() );\n\t\n\t\t\tif ( !this.hasTitle ) {\n\t\t\t\tthis.buttonElement.removeAttr( \"title\" );\n\t\t\t}\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tthis._super( key, value );\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\tthis.element.prop( \"disabled\", true );\n\t\t\t\t} else {\n\t\t\t\t\tthis.element.prop( \"disabled\", false );\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._resetButton();\n\t\t},\n\t\n\t\trefresh: function() {\n\t\t\t//See #8237 & #8828\n\t\t\tvar isDisabled = this.element.is( \"input, button\" ) ? this.element.is( \":disabled\" ) : this.element.hasClass( \"ui-button-disabled\" );\n\t\n\t\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\t\tthis._setOption( \"disabled\", isDisabled );\n\t\t\t}\n\t\t\tif ( this.type === \"radio\" ) {\n\t\t\t\tradioGroup( this.element[0] ).each(function() {\n\t\t\t\t\tif ( $( this ).is( \":checked\" ) ) {\n\t\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else if ( this.type === \"checkbox\" ) {\n\t\t\t\tif ( this.element.is( \":checked\" ) ) {\n\t\t\t\t\tthis.buttonElement\n\t\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t\t} else {\n\t\t\t\t\tthis.buttonElement\n\t\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t_resetButton: function() {\n\t\t\tif ( this.type === \"input\" ) {\n\t\t\t\tif ( this.options.label ) {\n\t\t\t\t\tthis.element.val( this.options.label );\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar buttonElement = this.buttonElement.removeClass( typeClasses ),\n\t\t\t\tbuttonText = $( \"<span></span>\", this.document[0] )\n\t\t\t\t\t.addClass( \"ui-button-text\" )\n\t\t\t\t\t.html( this.options.label )\n\t\t\t\t\t.appendTo( buttonElement.empty() )\n\t\t\t\t\t.text(),\n\t\t\t\ticons = this.options.icons,\n\t\t\t\tmultipleIcons = icons.primary && icons.secondary,\n\t\t\t\tbuttonClasses = [];\n\t\n\t\t\tif ( icons.primary || icons.secondary ) {\n\t\t\t\tif ( this.options.text ) {\n\t\t\t\t\tbuttonClasses.push( \"ui-button-text-icon\" + ( multipleIcons ? \"s\" : ( icons.primary ? \"-primary\" : \"-secondary\" ) ) );\n\t\t\t\t}\n\t\n\t\t\t\tif ( icons.primary ) {\n\t\t\t\t\tbuttonElement.prepend( \"<span class='ui-button-icon-primary ui-icon \" + icons.primary + \"'></span>\" );\n\t\t\t\t}\n\t\n\t\t\t\tif ( icons.secondary ) {\n\t\t\t\t\tbuttonElement.append( \"<span class='ui-button-icon-secondary ui-icon \" + icons.secondary + \"'></span>\" );\n\t\t\t\t}\n\t\n\t\t\t\tif ( !this.options.text ) {\n\t\t\t\t\tbuttonClasses.push( multipleIcons ? \"ui-button-icons-only\" : \"ui-button-icon-only\" );\n\t\n\t\t\t\t\tif ( !this.hasTitle ) {\n\t\t\t\t\t\tbuttonElement.attr( \"title\", $.trim( buttonText ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tbuttonClasses.push( \"ui-button-text-only\" );\n\t\t\t}\n\t\t\tbuttonElement.addClass( buttonClasses.join( \" \" ) );\n\t\t}\n\t});\n\t\n\t$.widget( \"ui.buttonset\", {\n\t\tversion: \"1.10.3\",\n\t\toptions: {\n\t\t\titems: \"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)\"\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\tthis.element.addClass( \"ui-buttonset\" );\n\t\t},\n\t\n\t\t_init: function() {\n\t\t\tthis.refresh();\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\tthis.buttons.button( \"option\", key, value );\n\t\t\t}\n\t\n\t\t\tthis._super( key, value );\n\t\t},\n\t\n\t\trefresh: function() {\n\t\t\tvar rtl = this.element.css( \"direction\" ) === \"rtl\";\n\t\n\t\t\tthis.buttons = this.element.find( this.options.items )\n\t\t\t\t.filter( \":ui-button\" )\n\t\t\t\t\t.button( \"refresh\" )\n\t\t\t\t.end()\n\t\t\t\t.not( \":ui-button\" )\n\t\t\t\t\t.button()\n\t\t\t\t.end()\n\t\t\t\t.map(function() {\n\t\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t\t})\n\t\t\t\t\t.removeClass( \"ui-corner-all ui-corner-left ui-corner-right\" )\n\t\t\t\t\t.filter( \":first\" )\n\t\t\t\t\t\t.addClass( rtl ? \"ui-corner-right\" : \"ui-corner-left\" )\n\t\t\t\t\t.end()\n\t\t\t\t\t.filter( \":last\" )\n\t\t\t\t\t\t.addClass( rtl ? \"ui-corner-left\" : \"ui-corner-right\" )\n\t\t\t\t\t.end()\n\t\t\t\t.end();\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.element.removeClass( \"ui-buttonset\" );\n\t\t\tthis.buttons\n\t\t\t\t.map(function() {\n\t\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t\t})\n\t\t\t\t\t.removeClass( \"ui-corner-left ui-corner-right\" )\n\t\t\t\t.end()\n\t\t\t\t.button( \"destroy\" );\n\t\t}\n\t});\n\t\n\t}( jQuery ) );\n\t\n\t(function( $, undefined ) {\n\t\n\t$.extend($.ui, { datepicker: { version: \"1.10.3\" } });\n\t\n\tvar PROP_NAME = \"datepicker\",\n\t\tinstActive;\n\t\n\t/* Date picker manager.\n\t   Use the singleton instance of this class, $.datepicker, to interact with the date picker.\n\t   Settings for (groups of) date pickers are maintained in an instance object,\n\t   allowing multiple different settings on the same page. */\n\t\n\tfunction Datepicker() {\n\t\tthis._curInst = null; // The current instance in use\n\t\tthis._keyEvent = false; // If the last event was a key event\n\t\tthis._disabledInputs = []; // List of date picker inputs that have been disabled\n\t\tthis._datepickerShowing = false; // True if the popup picker is showing , false if not\n\t\tthis._inDialog = false; // True if showing within a \"dialog\", false if not\n\t\tthis._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\n\t\tthis._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\n\t\tthis._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\n\t\tthis._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\n\t\tthis._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\n\t\tthis._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\n\t\tthis._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\n\t\tthis._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\n\t\tthis._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\n\t\tthis.regional = []; // Available regional settings, indexed by language code\n\t\tthis.regional[\"\"] = { // Default regional settings\n\t\t\tcloseText: \"Done\", // Display text for close link\n\t\t\tprevText: \"Prev\", // Display text for previous month link\n\t\t\tnextText: \"Next\", // Display text for next month link\n\t\t\tcurrentText: \"Today\", // Display text for current month link\n\t\t\tmonthNames: [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\n\t\t\t\t\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"], // Names of months for drop-down and formatting\n\t\t\tmonthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], // For formatting\n\t\t\tdayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], // For formatting\n\t\t\tdayNamesShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], // For formatting\n\t\t\tdayNamesMin: [\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"], // Column headings for days starting at Sunday\n\t\t\tweekHeader: \"Wk\", // Column header for week of the year\n\t\t\tdateFormat: \"mm/dd/yy\", // See format options on parseDate\n\t\t\tfirstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...\n\t\t\tisRTL: false, // True if right-to-left language, false if left-to-right\n\t\t\tshowMonthAfterYear: false, // True if the year select precedes month, false for month then year\n\t\t\tyearSuffix: \"\" // Additional text to append to the year in the month headers\n\t\t};\n\t\tthis._defaults = { // Global defaults for all the date picker instances\n\t\t\tshowOn: \"focus\", // \"focus\" for popup on focus,\n\t\t\t\t// \"button\" for trigger button, or \"both\" for either\n\t\t\tshowAnim: \"fadeIn\", // Name of jQuery animation for popup\n\t\t\tshowOptions: {}, // Options for enhanced animations\n\t\t\tdefaultDate: null, // Used when field is blank: actual date,\n\t\t\t\t// +/-number for offset from today, null for today\n\t\t\tappendText: \"\", // Display text following the input box, e.g. showing the format\n\t\t\tbuttonText: \"...\", // Text for trigger button\n\t\t\tbuttonImage: \"\", // URL for trigger button image\n\t\t\tbuttonImageOnly: false, // True if the image appears alone, false if it appears on a button\n\t\t\thideIfNoPrevNext: false, // True to hide next/previous month links\n\t\t\t\t// if not applicable, false to just disable them\n\t\t\tnavigationAsDateFormat: false, // True if date formatting applied to prev/today/next links\n\t\t\tgotoCurrent: false, // True if today link goes back to current selection instead\n\t\t\tchangeMonth: false, // True if month can be selected directly, false if only prev/next\n\t\t\tchangeYear: false, // True if year can be selected directly, false if only prev/next\n\t\t\tyearRange: \"c-10:c+10\", // Range of years to display in drop-down,\n\t\t\t\t// either relative to today's year (-nn:+nn), relative to currently displayed year\n\t\t\t\t// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\n\t\t\tshowOtherMonths: false, // True to show dates in other months, false to leave blank\n\t\t\tselectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable\n\t\t\tshowWeek: false, // True to show week of the year, false to not show it\n\t\t\tcalculateWeek: this.iso8601Week, // How to calculate the week of the year,\n\t\t\t\t// takes a Date and returns the number of the week for it\n\t\t\tshortYearCutoff: \"+10\", // Short year values < this are in the current century,\n\t\t\t\t// > this are in the previous century,\n\t\t\t\t// string value starting with \"+\" for current year + value\n\t\t\tminDate: null, // The earliest selectable date, or null for no limit\n\t\t\tmaxDate: null, // The latest selectable date, or null for no limit\n\t\t\tduration: \"fast\", // Duration of display/closure\n\t\t\tbeforeShowDay: null, // Function that takes a date and returns an array with\n\t\t\t\t// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n\t\t\t\t// [2] = cell title (optional), e.g. $.datepicker.noWeekends\n\t\t\tbeforeShow: null, // Function that takes an input field and\n\t\t\t\t// returns a set of custom settings for the date picker\n\t\t\tonSelect: null, // Define a callback function when a date is selected\n\t\t\tonChangeMonthYear: null, // Define a callback function when the month or year is changed\n\t\t\tonClose: null, // Define a callback function when the datepicker is closed\n\t\t\tnumberOfMonths: 1, // Number of months to show at a time\n\t\t\tshowCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)\n\t\t\tstepMonths: 1, // Number of months to step back/forward\n\t\t\tstepBigMonths: 12, // Number of months to step back/forward for the big links\n\t\t\taltField: \"\", // Selector for an alternate field to store selected dates into\n\t\t\taltFormat: \"\", // The date format to use for the alternate field\n\t\t\tconstrainInput: true, // The input is constrained by the current date format\n\t\t\tshowButtonPanel: false, // True to show button panel, false to not show it\n\t\t\tautoSize: false, // True to size the input for the date format, false to leave as is\n\t\t\tdisabled: false // The initial disabled state\n\t\t};\n\t\t$.extend(this._defaults, this.regional[\"\"]);\n\t\tthis.dpDiv = bindHover($(\"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));\n\t}\n\t\n\t$.extend(Datepicker.prototype, {\n\t\t/* Class name added to elements to indicate already configured with a date picker. */\n\t\tmarkerClassName: \"hasDatepicker\",\n\t\n\t\t//Keep track of the maximum number of rows displayed (see #7043)\n\t\tmaxRows: 4,\n\t\n\t\t// TODO rename to \"widget\" when switching to widget factory\n\t\t_widgetDatepicker: function() {\n\t\t\treturn this.dpDiv;\n\t\t},\n\t\n\t\t/* Override the default settings for all instances of the date picker.\n\t\t * @param  settings  object - the new settings to use as defaults (anonymous object)\n\t\t * @return the manager object\n\t\t */\n\t\tsetDefaults: function(settings) {\n\t\t\textendRemove(this._defaults, settings || {});\n\t\t\treturn this;\n\t\t},\n\t\n\t\t/* Attach the date picker to a jQuery selection.\n\t\t * @param  target\telement - the target input field or division or span\n\t\t * @param  settings  object - the new settings to use for this date picker instance (anonymous)\n\t\t */\n\t\t_attachDatepicker: function(target, settings) {\n\t\t\tvar nodeName, inline, inst;\n\t\t\tnodeName = target.nodeName.toLowerCase();\n\t\t\tinline = (nodeName === \"div\" || nodeName === \"span\");\n\t\t\tif (!target.id) {\n\t\t\t\tthis.uuid += 1;\n\t\t\t\ttarget.id = \"dp\" + this.uuid;\n\t\t\t}\n\t\t\tinst = this._newInst($(target), inline);\n\t\t\tinst.settings = $.extend({}, settings || {});\n\t\t\tif (nodeName === \"input\") {\n\t\t\t\tthis._connectDatepicker(target, inst);\n\t\t\t} else if (inline) {\n\t\t\t\tthis._inlineDatepicker(target, inst);\n\t\t\t}\n\t\t},\n\t\n\t\t/* Create a new instance object. */\n\t\t_newInst: function(target, inline) {\n\t\t\tvar id = target[0].id.replace(/([^A-Za-z0-9_\\-])/g, \"\\\\\\\\$1\"); // escape jQuery meta chars\n\t\t\treturn {id: id, input: target, // associated target\n\t\t\t\tselectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection\n\t\t\t\tdrawMonth: 0, drawYear: 0, // month being drawn\n\t\t\t\tinline: inline, // is datepicker inline or not\n\t\t\t\tdpDiv: (!inline ? this.dpDiv : // presentation div\n\t\t\t\tbindHover($(\"<div class='\" + this._inlineClass + \" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")))};\n\t\t},\n\t\n\t\t/* Attach the date picker to an input field. */\n\t\t_connectDatepicker: function(target, inst) {\n\t\t\tvar input = $(target);\n\t\t\tinst.append = $([]);\n\t\t\tinst.trigger = $([]);\n\t\t\tif (input.hasClass(this.markerClassName)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._attachments(input, inst);\n\t\t\tinput.addClass(this.markerClassName).keydown(this._doKeyDown).\n\t\t\t\tkeypress(this._doKeyPress).keyup(this._doKeyUp);\n\t\t\tthis._autoSize(inst);\n\t\t\t$.data(target, PROP_NAME, inst);\n\t\t\t//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)\n\t\t\tif( inst.settings.disabled ) {\n\t\t\t\tthis._disableDatepicker( target );\n\t\t\t}\n\t\t},\n\t\n\t\t/* Make attachments based on settings. */\n\t\t_attachments: function(input, inst) {\n\t\t\tvar showOn, buttonText, buttonImage,\n\t\t\t\tappendText = this._get(inst, \"appendText\"),\n\t\t\t\tisRTL = this._get(inst, \"isRTL\");\n\t\n\t\t\tif (inst.append) {\n\t\t\t\tinst.append.remove();\n\t\t\t}\n\t\t\tif (appendText) {\n\t\t\t\tinst.append = $(\"<span class='\" + this._appendClass + \"'>\" + appendText + \"</span>\");\n\t\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.append);\n\t\t\t}\n\t\n\t\t\tinput.unbind(\"focus\", this._showDatepicker);\n\t\n\t\t\tif (inst.trigger) {\n\t\t\t\tinst.trigger.remove();\n\t\t\t}\n\t\n\t\t\tshowOn = this._get(inst, \"showOn\");\n\t\t\tif (showOn === \"focus\" || showOn === \"both\") { // pop-up date picker when in the marked field\n\t\t\t\tinput.focus(this._showDatepicker);\n\t\t\t}\n\t\t\tif (showOn === \"button\" || showOn === \"both\") { // pop-up date picker when button clicked\n\t\t\t\tbuttonText = this._get(inst, \"buttonText\");\n\t\t\t\tbuttonImage = this._get(inst, \"buttonImage\");\n\t\t\t\tinst.trigger = $(this._get(inst, \"buttonImageOnly\") ?\n\t\t\t\t\t$(\"<img/>\").addClass(this._triggerClass).\n\t\t\t\t\t\tattr({ src: buttonImage, alt: buttonText, title: buttonText }) :\n\t\t\t\t\t$(\"<button type='button'></button>\").addClass(this._triggerClass).\n\t\t\t\t\t\thtml(!buttonImage ? buttonText : $(\"<img/>\").attr(\n\t\t\t\t\t\t{ src:buttonImage, alt:buttonText, title:buttonText })));\n\t\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.trigger);\n\t\t\t\tinst.trigger.click(function() {\n\t\t\t\t\tif ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {\n\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {\n\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\n\t\t/* Apply the maximum length for the date format. */\n\t\t_autoSize: function(inst) {\n\t\t\tif (this._get(inst, \"autoSize\") && !inst.inline) {\n\t\t\t\tvar findMax, max, maxI, i,\n\t\t\t\t\tdate = new Date(2009, 12 - 1, 20), // Ensure double digits\n\t\t\t\t\tdateFormat = this._get(inst, \"dateFormat\");\n\t\n\t\t\t\tif (dateFormat.match(/[DM]/)) {\n\t\t\t\t\tfindMax = function(names) {\n\t\t\t\t\t\tmax = 0;\n\t\t\t\t\t\tmaxI = 0;\n\t\t\t\t\t\tfor (i = 0; i < names.length; i++) {\n\t\t\t\t\t\t\tif (names[i].length > max) {\n\t\t\t\t\t\t\t\tmax = names[i].length;\n\t\t\t\t\t\t\t\tmaxI = i;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn maxI;\n\t\t\t\t\t};\n\t\t\t\t\tdate.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?\n\t\t\t\t\t\t\"monthNames\" : \"monthNamesShort\"))));\n\t\t\t\t\tdate.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?\n\t\t\t\t\t\t\"dayNames\" : \"dayNamesShort\"))) + 20 - date.getDay());\n\t\t\t\t}\n\t\t\t\tinst.input.attr(\"size\", this._formatDate(inst, date).length);\n\t\t\t}\n\t\t},\n\t\n\t\t/* Attach an inline date picker to a div. */\n\t\t_inlineDatepicker: function(target, inst) {\n\t\t\tvar divSpan = $(target);\n\t\t\tif (divSpan.hasClass(this.markerClassName)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdivSpan.addClass(this.markerClassName).append(inst.dpDiv);\n\t\t\t$.data(target, PROP_NAME, inst);\n\t\t\tthis._setDate(inst, this._getDefaultDate(inst), true);\n\t\t\tthis._updateDatepicker(inst);\n\t\t\tthis._updateAlternate(inst);\n\t\t\t//If disabled option is true, disable the datepicker before showing it (see ticket #5665)\n\t\t\tif( inst.settings.disabled ) {\n\t\t\t\tthis._disableDatepicker( target );\n\t\t\t}\n\t\t\t// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements\n\t\t\t// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height\n\t\t\tinst.dpDiv.css( \"display\", \"block\" );\n\t\t},\n\t\n\t\t/* Pop-up the date picker in a \"dialog\" box.\n\t\t * @param  input element - ignored\n\t\t * @param  date\tstring or Date - the initial date to display\n\t\t * @param  onSelect  function - the function to call when a date is selected\n\t\t * @param  settings  object - update the dialog date picker instance's settings (anonymous object)\n\t\t * @param  pos int[2] - coordinates for the dialog's position within the screen or\n\t\t *\t\t\t\t\tevent - with x/y coordinates or\n\t\t *\t\t\t\t\tleave empty for default (screen centre)\n\t\t * @return the manager object\n\t\t */\n\t\t_dialogDatepicker: function(input, date, onSelect, settings, pos) {\n\t\t\tvar id, browserWidth, browserHeight, scrollX, scrollY,\n\t\t\t\tinst = this._dialogInst; // internal instance\n\t\n\t\t\tif (!inst) {\n\t\t\t\tthis.uuid += 1;\n\t\t\t\tid = \"dp\" + this.uuid;\n\t\t\t\tthis._dialogInput = $(\"<input type='text' id='\" + id +\n\t\t\t\t\t\"' style='position: absolute; top: -100px; width: 0px;'/>\");\n\t\t\t\tthis._dialogInput.keydown(this._doKeyDown);\n\t\t\t\t$(\"body\").append(this._dialogInput);\n\t\t\t\tinst = this._dialogInst = this._newInst(this._dialogInput, false);\n\t\t\t\tinst.settings = {};\n\t\t\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\t\t}\n\t\t\textendRemove(inst.settings, settings || {});\n\t\t\tdate = (date && date.constructor === Date ? this._formatDate(inst, date) : date);\n\t\t\tthis._dialogInput.val(date);\n\t\n\t\t\tthis._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);\n\t\t\tif (!this._pos) {\n\t\t\t\tbrowserWidth = document.documentElement.clientWidth;\n\t\t\t\tbrowserHeight = document.documentElement.clientHeight;\n\t\t\t\tscrollX = document.documentElement.scrollLeft || document.body.scrollLeft;\n\t\t\t\tscrollY = document.documentElement.scrollTop || document.body.scrollTop;\n\t\t\t\tthis._pos = // should use actual width/height below\n\t\t\t\t\t[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];\n\t\t\t}\n\t\n\t\t\t// move input on screen for focus, but hidden behind dialog\n\t\t\tthis._dialogInput.css(\"left\", (this._pos[0] + 20) + \"px\").css(\"top\", this._pos[1] + \"px\");\n\t\t\tinst.settings.onSelect = onSelect;\n\t\t\tthis._inDialog = true;\n\t\t\tthis.dpDiv.addClass(this._dialogClass);\n\t\t\tthis._showDatepicker(this._dialogInput[0]);\n\t\t\tif ($.blockUI) {\n\t\t\t\t$.blockUI(this.dpDiv);\n\t\t\t}\n\t\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\t\treturn this;\n\t\t},\n\t\n\t\t/* Detach a datepicker from its control.\n\t\t * @param  target\telement - the target input field or division or span\n\t\t */\n\t\t_destroyDatepicker: function(target) {\n\t\t\tvar nodeName,\n\t\t\t\t$target = $(target),\n\t\t\t\tinst = $.data(target, PROP_NAME);\n\t\n\t\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tnodeName = target.nodeName.toLowerCase();\n\t\t\t$.removeData(target, PROP_NAME);\n\t\t\tif (nodeName === \"input\") {\n\t\t\t\tinst.append.remove();\n\t\t\t\tinst.trigger.remove();\n\t\t\t\t$target.removeClass(this.markerClassName).\n\t\t\t\t\tunbind(\"focus\", this._showDatepicker).\n\t\t\t\t\tunbind(\"keydown\", this._doKeyDown).\n\t\t\t\t\tunbind(\"keypress\", this._doKeyPress).\n\t\t\t\t\tunbind(\"keyup\", this._doKeyUp);\n\t\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\t\t$target.removeClass(this.markerClassName).empty();\n\t\t\t}\n\t\t},\n\t\n\t\t/* Enable the date picker to a jQuery selection.\n\t\t * @param  target\telement - the target input field or division or span\n\t\t */\n\t\t_enableDatepicker: function(target) {\n\t\t\tvar nodeName, inline,\n\t\t\t\t$target = $(target),\n\t\t\t\tinst = $.data(target, PROP_NAME);\n\t\n\t\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tnodeName = target.nodeName.toLowerCase();\n\t\t\tif (nodeName === \"input\") {\n\t\t\t\ttarget.disabled = false;\n\t\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\t\teach(function() { this.disabled = false; }).end().\n\t\t\t\t\tfilter(\"img\").css({opacity: \"1.0\", cursor: \"\"});\n\t\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\t\tinline.children().removeClass(\"ui-state-disabled\");\n\t\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\t\tprop(\"disabled\", false);\n\t\t\t}\n\t\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t\t},\n\t\n\t\t/* Disable the date picker to a jQuery selection.\n\t\t * @param  target\telement - the target input field or division or span\n\t\t */\n\t\t_disableDatepicker: function(target) {\n\t\t\tvar nodeName, inline,\n\t\t\t\t$target = $(target),\n\t\t\t\tinst = $.data(target, PROP_NAME);\n\t\n\t\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tnodeName = target.nodeName.toLowerCase();\n\t\t\tif (nodeName === \"input\") {\n\t\t\t\ttarget.disabled = true;\n\t\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\t\teach(function() { this.disabled = true; }).end().\n\t\t\t\t\tfilter(\"img\").css({opacity: \"0.5\", cursor: \"default\"});\n\t\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\t\tinline.children().addClass(\"ui-state-disabled\");\n\t\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\t\tprop(\"disabled\", true);\n\t\t\t}\n\t\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t\t\tthis._disabledInputs[this._disabledInputs.length] = target;\n\t\t},\n\t\n\t\t/* Is the first field in a jQuery collection disabled as a datepicker?\n\t\t * @param  target\telement - the target input field or division or span\n\t\t * @return boolean - true if disabled, false if enabled\n\t\t */\n\t\t_isDisabledDatepicker: function(target) {\n\t\t\tif (!target) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor (var i = 0; i < this._disabledInputs.length; i++) {\n\t\t\t\tif (this._disabledInputs[i] === target) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\n\t\t/* Retrieve the instance data for the target control.\n\t\t * @param  target  element - the target input field or division or span\n\t\t * @return  object - the associated instance data\n\t\t * @throws  error if a jQuery problem getting data\n\t\t */\n\t\t_getInst: function(target) {\n\t\t\ttry {\n\t\t\t\treturn $.data(target, PROP_NAME);\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t\tthrow \"Missing instance data for this datepicker\";\n\t\t\t}\n\t\t},\n\t\n\t\t/* Update or retrieve the settings for a date picker attached to an input field or division.\n\t\t * @param  target  element - the target input field or division or span\n\t\t * @param  name\tobject - the new settings to update or\n\t\t *\t\t\t\tstring - the name of the setting to change or retrieve,\n\t\t *\t\t\t\twhen retrieving also \"all\" for all instance settings or\n\t\t *\t\t\t\t\"defaults\" for all global defaults\n\t\t * @param  value   any - the new value for the setting\n\t\t *\t\t\t\t(omit if above is an object or to retrieve a value)\n\t\t */\n\t\t_optionDatepicker: function(target, name, value) {\n\t\t\tvar settings, date, minDate, maxDate,\n\t\t\t\tinst = this._getInst(target);\n\t\n\t\t\tif (arguments.length === 2 && typeof name === \"string\") {\n\t\t\t\treturn (name === \"defaults\" ? $.extend({}, $.datepicker._defaults) :\n\t\t\t\t\t(inst ? (name === \"all\" ? $.extend({}, inst.settings) :\n\t\t\t\t\tthis._get(inst, name)) : null));\n\t\t\t}\n\t\n\t\t\tsettings = name || {};\n\t\t\tif (typeof name === \"string\") {\n\t\t\t\tsettings = {};\n\t\t\t\tsettings[name] = value;\n\t\t\t}\n\t\n\t\t\tif (inst) {\n\t\t\t\tif (this._curInst === inst) {\n\t\t\t\t\tthis._hideDatepicker();\n\t\t\t\t}\n\t\n\t\t\t\tdate = this._getDateDatepicker(target, true);\n\t\t\t\tminDate = this._getMinMaxDate(inst, \"min\");\n\t\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\");\n\t\t\t\textendRemove(inst.settings, settings);\n\t\t\t\t// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided\n\t\t\t\tif (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {\n\t\t\t\t\tinst.settings.minDate = this._formatDate(inst, minDate);\n\t\t\t\t}\n\t\t\t\tif (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {\n\t\t\t\t\tinst.settings.maxDate = this._formatDate(inst, maxDate);\n\t\t\t\t}\n\t\t\t\tif ( \"disabled\" in settings ) {\n\t\t\t\t\tif ( settings.disabled ) {\n\t\t\t\t\t\tthis._disableDatepicker(target);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis._enableDatepicker(target);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._attachments($(target), inst);\n\t\t\t\tthis._autoSize(inst);\n\t\t\t\tthis._setDate(inst, date);\n\t\t\t\tthis._updateAlternate(inst);\n\t\t\t\tthis._updateDatepicker(inst);\n\t\t\t}\n\t\t},\n\t\n\t\t// change method deprecated\n\t\t_changeDatepicker: function(target, name, value) {\n\t\t\tthis._optionDatepicker(target, name, value);\n\t\t},\n\t\n\t\t/* Redraw the date picker attached to an input field or division.\n\t\t * @param  target  element - the target input field or division or span\n\t\t */\n\t\t_refreshDatepicker: function(target) {\n\t\t\tvar inst = this._getInst(target);\n\t\t\tif (inst) {\n\t\t\t\tthis._updateDatepicker(inst);\n\t\t\t}\n\t\t},\n\t\n\t\t/* Set the dates for a jQuery selection.\n\t\t * @param  target element - the target input field or division or span\n\t\t * @param  date\tDate - the new date\n\t\t */\n\t\t_setDateDatepicker: function(target, date) {\n\t\t\tvar inst = this._getInst(target);\n\t\t\tif (inst) {\n\t\t\t\tthis._setDate(inst, date);\n\t\t\t\tthis._updateDatepicker(inst);\n\t\t\t\tthis._updateAlternate(inst);\n\t\t\t}\n\t\t},\n\t\n\t\t/* Get the date(s) for the first entry in a jQuery selection.\n\t\t * @param  target element - the target input field or division or span\n\t\t * @param  noDefault boolean - true if no default date is to be used\n\t\t * @return Date - the current date\n\t\t */\n\t\t_getDateDatepicker: function(target, noDefault) {\n\t\t\tvar inst = this._getInst(target);\n\t\t\tif (inst && !inst.inline) {\n\t\t\t\tthis._setDateFromField(inst, noDefault);\n\t\t\t}\n\t\t\treturn (inst ? this._getDate(inst) : null);\n\t\t},\n\t\n\t\t/* Handle keystrokes. */\n\t\t_doKeyDown: function(event) {\n\t\t\tvar onSelect, dateStr, sel,\n\t\t\t\tinst = $.datepicker._getInst(event.target),\n\t\t\t\thandled = true,\n\t\t\t\tisRTL = inst.dpDiv.is(\".ui-datepicker-rtl\");\n\t\n\t\t\tinst._keyEvent = true;\n\t\t\tif ($.datepicker._datepickerShowing) {\n\t\t\t\tswitch (event.keyCode) {\n\t\t\t\t\tcase 9: $.datepicker._hideDatepicker();\n\t\t\t\t\t\t\thandled = false;\n\t\t\t\t\t\t\tbreak; // hide on tab out\n\t\t\t\t\tcase 13: sel = $(\"td.\" + $.datepicker._dayOverClass + \":not(.\" +\n\t\t\t\t\t\t\t\t\t\t$.datepicker._currentClass + \")\", inst.dpDiv);\n\t\t\t\t\t\t\tif (sel[0]) {\n\t\t\t\t\t\t\t\t$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\tonSelect = $.datepicker._get(inst, \"onSelect\");\n\t\t\t\t\t\t\tif (onSelect) {\n\t\t\t\t\t\t\t\tdateStr = $.datepicker._formatDate(inst);\n\t\n\t\t\t\t\t\t\t\t// trigger custom callback\n\t\t\t\t\t\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\treturn false; // don't submit the form\n\t\t\t\t\tcase 27: $.datepicker._hideDatepicker();\n\t\t\t\t\t\t\tbreak; // hide on escape\n\t\t\t\t\tcase 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t\tbreak; // previous month/year on page up/+ ctrl\n\t\t\t\t\tcase 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t\tbreak; // next month/year on page down/+ ctrl\n\t\t\t\t\tcase 35: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t\t$.datepicker._clearDate(event.target);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t\tbreak; // clear on ctrl or command +end\n\t\t\t\t\tcase 36: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t\t$.datepicker._gotoToday(event.target);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t\tbreak; // current on ctrl or command +home\n\t\t\t\t\tcase 37: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), \"D\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t\t// -1 day on ctrl or command +left\n\t\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// next month/year on alt +left on Mac\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 38: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, -7, \"D\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t\tbreak; // -1 week on ctrl or command +up\n\t\t\t\t\tcase 39: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), \"D\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t\t// +1 day on ctrl or command +right\n\t\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// next month/year on alt +right\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 40: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, +7, \"D\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t\tbreak; // +1 week on ctrl or command +down\n\t\t\t\t\tdefault: handled = false;\n\t\t\t\t}\n\t\t\t} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home\n\t\t\t\t$.datepicker._showDatepicker(this);\n\t\t\t} else {\n\t\t\t\thandled = false;\n\t\t\t}\n\t\n\t\t\tif (handled) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tevent.stopPropagation();\n\t\t\t}\n\t\t},\n\t\n\t\t/* Filter entered characters - based on date format. */\n\t\t_doKeyPress: function(event) {\n\t\t\tvar chars, chr,\n\t\t\t\tinst = $.datepicker._getInst(event.target);\n\t\n\t\t\tif ($.datepicker._get(inst, \"constrainInput\")) {\n\t\t\t\tchars = $.datepicker._possibleChars($.datepicker._get(inst, \"dateFormat\"));\n\t\t\t\tchr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);\n\t\t\t\treturn event.ctrlKey || event.metaKey || (chr < \" \" || !chars || chars.indexOf(chr) > -1);\n\t\t\t}\n\t\t},\n\t\n\t\t/* Synchronise manual entry and field/alternate field. */\n\t\t_doKeyUp: function(event) {\n\t\t\tvar date,\n\t\t\t\tinst = $.datepicker._getInst(event.target);\n\t\n\t\t\tif (inst.input.val() !== inst.lastVal) {\n\t\t\t\ttry {\n\t\t\t\t\tdate = $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t\t(inst.input ? inst.input.val() : null),\n\t\t\t\t\t\t$.datepicker._getFormatConfig(inst));\n\t\n\t\t\t\t\tif (date) { // only if valid\n\t\t\t\t\t\t$.datepicker._setDateFromField(inst);\n\t\t\t\t\t\t$.datepicker._updateAlternate(inst);\n\t\t\t\t\t\t$.datepicker._updateDatepicker(inst);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (err) {\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\t\n\t\t/* Pop-up the date picker for a given input field.\n\t\t * If false returned from beforeShow event handler do not show.\n\t\t * @param  input  element - the input field attached to the date picker or\n\t\t *\t\t\t\t\tevent - if triggered by focus\n\t\t */\n\t\t_showDatepicker: function(input) {\n\t\t\tinput = input.target || input;\n\t\t\tif (input.nodeName.toLowerCase() !== \"input\") { // find from button/image trigger\n\t\t\t\tinput = $(\"input\", input.parentNode)[0];\n\t\t\t}\n\t\n\t\t\tif ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar inst, beforeShow, beforeShowSettings, isFixed,\n\t\t\t\toffset, showAnim, duration;\n\t\n\t\t\tinst = $.datepicker._getInst(input);\n\t\t\tif ($.datepicker._curInst && $.datepicker._curInst !== inst) {\n\t\t\t\t$.datepicker._curInst.dpDiv.stop(true, true);\n\t\t\t\tif ( inst && $.datepicker._datepickerShowing ) {\n\t\t\t\t\t$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tbeforeShow = $.datepicker._get(inst, \"beforeShow\");\n\t\t\tbeforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};\n\t\t\tif(beforeShowSettings === false){\n\t\t\t\treturn;\n\t\t\t}\n\t\t\textendRemove(inst.settings, beforeShowSettings);\n\t\n\t\t\tinst.lastVal = null;\n\t\t\t$.datepicker._lastInput = input;\n\t\t\t$.datepicker._setDateFromField(inst);\n\t\n\t\t\tif ($.datepicker._inDialog) { // hide cursor\n\t\t\t\tinput.value = \"\";\n\t\t\t}\n\t\t\tif (!$.datepicker._pos) { // position below input\n\t\t\t\t$.datepicker._pos = $.datepicker._findPos(input);\n\t\t\t\t$.datepicker._pos[1] += input.offsetHeight; // add the height\n\t\t\t}\n\t\n\t\t\tisFixed = false;\n\t\t\t$(input).parents().each(function() {\n\t\t\t\tisFixed |= $(this).css(\"position\") === \"fixed\";\n\t\t\t\treturn !isFixed;\n\t\t\t});\n\t\n\t\t\toffset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};\n\t\t\t$.datepicker._pos = null;\n\t\t\t//to avoid flashes on Firefox\n\t\t\tinst.dpDiv.empty();\n\t\t\t// determine sizing offscreen\n\t\t\tinst.dpDiv.css({position: \"absolute\", display: \"block\", top: \"-1000px\"});\n\t\t\t$.datepicker._updateDatepicker(inst);\n\t\t\t// fix width for dynamic number of date pickers\n\t\t\t// and adjust position before showing\n\t\t\toffset = $.datepicker._checkOffset(inst, offset, isFixed);\n\t\t\tinst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?\n\t\t\t\t\"static\" : (isFixed ? \"fixed\" : \"absolute\")), display: \"none\",\n\t\t\t\tleft: offset.left + \"px\", top: offset.top + \"px\"});\n\t\n\t\t\tif (!inst.inline) {\n\t\t\t\tshowAnim = $.datepicker._get(inst, \"showAnim\");\n\t\t\t\tduration = $.datepicker._get(inst, \"duration\");\n\t\t\t\tinst.dpDiv.zIndex($(input).zIndex()+1);\n\t\t\t\t$.datepicker._datepickerShowing = true;\n\t\n\t\t\t\tif ( $.effects && $.effects.effect[ showAnim ] ) {\n\t\t\t\t\tinst.dpDiv.show(showAnim, $.datepicker._get(inst, \"showOptions\"), duration);\n\t\t\t\t} else {\n\t\t\t\t\tinst.dpDiv[showAnim || \"show\"](showAnim ? duration : null);\n\t\t\t\t}\n\t\n\t\t\t\tif ( $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\t\t\tinst.input.focus();\n\t\t\t\t}\n\t\n\t\t\t\t$.datepicker._curInst = inst;\n\t\t\t}\n\t\t},\n\t\n\t\t/* Generate the date picker content. */\n\t\t_updateDatepicker: function(inst) {\n\t\t\tthis.maxRows = 4; //Reset the max number of rows being displayed (see #7043)\n\t\t\tinstActive = inst; // for delegate hover events\n\t\t\tinst.dpDiv.empty().append(this._generateHTML(inst));\n\t\t\tthis._attachHandlers(inst);\n\t\t\tinst.dpDiv.find(\".\" + this._dayOverClass + \" a\").mouseover();\n\t\n\t\t\tvar origyearshtml,\n\t\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\t\tcols = numMonths[1],\n\t\t\t\twidth = 17;\n\t\n\t\t\tinst.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\");\n\t\t\tif (cols > 1) {\n\t\t\t\tinst.dpDiv.addClass(\"ui-datepicker-multi-\" + cols).css(\"width\", (width * cols) + \"em\");\n\t\t\t}\n\t\t\tinst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? \"add\" : \"remove\") +\n\t\t\t\t\"Class\"](\"ui-datepicker-multi\");\n\t\t\tinst.dpDiv[(this._get(inst, \"isRTL\") ? \"add\" : \"remove\") +\n\t\t\t\t\"Class\"](\"ui-datepicker-rtl\");\n\t\n\t\t\tif (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\t\tinst.input.focus();\n\t\t\t}\n\t\n\t\t\t// deffered render of the years select (to avoid flashes on Firefox)\n\t\t\tif( inst.yearshtml ){\n\t\t\t\torigyearshtml = inst.yearshtml;\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t//assure that inst.yearshtml didn't change.\n\t\t\t\t\tif( origyearshtml === inst.yearshtml && inst.yearshtml ){\n\t\t\t\t\t\tinst.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(inst.yearshtml);\n\t\t\t\t\t}\n\t\t\t\t\torigyearshtml = inst.yearshtml = null;\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t},\n\t\n\t\t// #6694 - don't focus the input if it's already focused\n\t\t// this breaks the change event in IE\n\t\t// Support: IE and jQuery <1.9\n\t\t_shouldFocusInput: function( inst ) {\n\t\t\treturn inst.input && inst.input.is( \":visible\" ) && !inst.input.is( \":disabled\" ) && !inst.input.is( \":focus\" );\n\t\t},\n\t\n\t\t/* Check positioning to remain on screen. */\n\t\t_checkOffset: function(inst, offset, isFixed) {\n\t\t\tvar dpWidth = inst.dpDiv.outerWidth(),\n\t\t\t\tdpHeight = inst.dpDiv.outerHeight(),\n\t\t\t\tinputWidth = inst.input ? inst.input.outerWidth() : 0,\n\t\t\t\tinputHeight = inst.input ? inst.input.outerHeight() : 0,\n\t\t\t\tviewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),\n\t\t\t\tviewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());\n\t\n\t\t\toffset.left -= (this._get(inst, \"isRTL\") ? (dpWidth - inputWidth) : 0);\n\t\t\toffset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;\n\t\t\toffset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;\n\t\n\t\t\t// now check if datepicker is showing outside window viewport - move to a better place if so.\n\t\t\toffset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?\n\t\t\t\tMath.abs(offset.left + dpWidth - viewWidth) : 0);\n\t\t\toffset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?\n\t\t\t\tMath.abs(dpHeight + inputHeight) : 0);\n\t\n\t\t\treturn offset;\n\t\t},\n\t\n\t\t/* Find an object's position on the screen. */\n\t\t_findPos: function(obj) {\n\t\t\tvar position,\n\t\t\t\tinst = this._getInst(obj),\n\t\t\t\tisRTL = this._get(inst, \"isRTL\");\n\t\n\t\t\twhile (obj && (obj.type === \"hidden\" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {\n\t\t\t\tobj = obj[isRTL ? \"previousSibling\" : \"nextSibling\"];\n\t\t\t}\n\t\n\t\t\tposition = $(obj).offset();\n\t\t\treturn [position.left, position.top];\n\t\t},\n\t\n\t\t/* Hide the date picker from view.\n\t\t * @param  input  element - the input field attached to the date picker\n\t\t */\n\t\t_hideDatepicker: function(input) {\n\t\t\tvar showAnim, duration, postProcess, onClose,\n\t\t\t\tinst = this._curInst;\n\t\n\t\t\tif (!inst || (input && inst !== $.data(input, PROP_NAME))) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif (this._datepickerShowing) {\n\t\t\t\tshowAnim = this._get(inst, \"showAnim\");\n\t\t\t\tduration = this._get(inst, \"duration\");\n\t\t\t\tpostProcess = function() {\n\t\t\t\t\t$.datepicker._tidyDialog(inst);\n\t\t\t\t};\n\t\n\t\t\t\t// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed\n\t\t\t\tif ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {\n\t\t\t\t\tinst.dpDiv.hide(showAnim, $.datepicker._get(inst, \"showOptions\"), duration, postProcess);\n\t\t\t\t} else {\n\t\t\t\t\tinst.dpDiv[(showAnim === \"slideDown\" ? \"slideUp\" :\n\t\t\t\t\t\t(showAnim === \"fadeIn\" ? \"fadeOut\" : \"hide\"))]((showAnim ? duration : null), postProcess);\n\t\t\t\t}\n\t\n\t\t\t\tif (!showAnim) {\n\t\t\t\t\tpostProcess();\n\t\t\t\t}\n\t\t\t\tthis._datepickerShowing = false;\n\t\n\t\t\t\tonClose = this._get(inst, \"onClose\");\n\t\t\t\tif (onClose) {\n\t\t\t\t\tonClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : \"\"), inst]);\n\t\t\t\t}\n\t\n\t\t\t\tthis._lastInput = null;\n\t\t\t\tif (this._inDialog) {\n\t\t\t\t\tthis._dialogInput.css({ position: \"absolute\", left: \"0\", top: \"-100px\" });\n\t\t\t\t\tif ($.blockUI) {\n\t\t\t\t\t\t$.unblockUI();\n\t\t\t\t\t\t$(\"body\").append(this.dpDiv);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis._inDialog = false;\n\t\t\t}\n\t\t},\n\t\n\t\t/* Tidy up after a dialog display. */\n\t\t_tidyDialog: function(inst) {\n\t\t\tinst.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\");\n\t\t},\n\t\n\t\t/* Close date picker if clicked elsewhere. */\n\t\t_checkExternalClick: function(event) {\n\t\t\tif (!$.datepicker._curInst) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar $target = $(event.target),\n\t\t\t\tinst = $.datepicker._getInst($target[0]);\n\t\n\t\t\tif ( ( ( $target[0].id !== $.datepicker._mainDivId &&\n\t\t\t\t\t$target.parents(\"#\" + $.datepicker._mainDivId).length === 0 &&\n\t\t\t\t\t!$target.hasClass($.datepicker.markerClassName) &&\n\t\t\t\t\t!$target.closest(\".\" + $.datepicker._triggerClass).length &&\n\t\t\t\t\t$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||\n\t\t\t\t( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t}\n\t\t},\n\t\n\t\t/* Adjust one of the date sub-fields. */\n\t\t_adjustDate: function(id, offset, period) {\n\t\t\tvar target = $(id),\n\t\t\t\tinst = this._getInst(target[0]);\n\t\n\t\t\tif (this._isDisabledDatepicker(target[0])) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._adjustInstDate(inst, offset +\n\t\t\t\t(period === \"M\" ? this._get(inst, \"showCurrentAtPos\") : 0), // undo positioning\n\t\t\t\tperiod);\n\t\t\tthis._updateDatepicker(inst);\n\t\t},\n\t\n\t\t/* Action for current link. */\n\t\t_gotoToday: function(id) {\n\t\t\tvar date,\n\t\t\t\ttarget = $(id),\n\t\t\t\tinst = this._getInst(target[0]);\n\t\n\t\t\tif (this._get(inst, \"gotoCurrent\") && inst.currentDay) {\n\t\t\t\tinst.selectedDay = inst.currentDay;\n\t\t\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth;\n\t\t\t\tinst.drawYear = inst.selectedYear = inst.currentYear;\n\t\t\t} else {\n\t\t\t\tdate = new Date();\n\t\t\t\tinst.selectedDay = date.getDate();\n\t\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t\t}\n\t\t\tthis._notifyChange(inst);\n\t\t\tthis._adjustDate(target);\n\t\t},\n\t\n\t\t/* Action for selecting a new month/year. */\n\t\t_selectMonthYear: function(id, select, period) {\n\t\t\tvar target = $(id),\n\t\t\t\tinst = this._getInst(target[0]);\n\t\n\t\t\tinst[\"selected\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\t\tinst[\"draw\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\t\t\tparseInt(select.options[select.selectedIndex].value,10);\n\t\n\t\t\tthis._notifyChange(inst);\n\t\t\tthis._adjustDate(target);\n\t\t},\n\t\n\t\t/* Action for selecting a day. */\n\t\t_selectDay: function(id, month, year, td) {\n\t\t\tvar inst,\n\t\t\t\ttarget = $(id);\n\t\n\t\t\tif ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tinst = this._getInst(target[0]);\n\t\t\tinst.selectedDay = inst.currentDay = $(\"a\", td).html();\n\t\t\tinst.selectedMonth = inst.currentMonth = month;\n\t\t\tinst.selectedYear = inst.currentYear = year;\n\t\t\tthis._selectDate(id, this._formatDate(inst,\n\t\t\t\tinst.currentDay, inst.currentMonth, inst.currentYear));\n\t\t},\n\t\n\t\t/* Erase the input field and hide the date picker. */\n\t\t_clearDate: function(id) {\n\t\t\tvar target = $(id);\n\t\t\tthis._selectDate(target, \"\");\n\t\t},\n\t\n\t\t/* Update the input field with the selected date. */\n\t\t_selectDate: function(id, dateStr) {\n\t\t\tvar onSelect,\n\t\t\t\ttarget = $(id),\n\t\t\t\tinst = this._getInst(target[0]);\n\t\n\t\t\tdateStr = (dateStr != null ? dateStr : this._formatDate(inst));\n\t\t\tif (inst.input) {\n\t\t\t\tinst.input.val(dateStr);\n\t\t\t}\n\t\t\tthis._updateAlternate(inst);\n\t\n\t\t\tonSelect = this._get(inst, \"onSelect\");\n\t\t\tif (onSelect) {\n\t\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback\n\t\t\t} else if (inst.input) {\n\t\t\t\tinst.input.trigger(\"change\"); // fire the change event\n\t\t\t}\n\t\n\t\t\tif (inst.inline){\n\t\t\t\tthis._updateDatepicker(inst);\n\t\t\t} else {\n\t\t\t\tthis._hideDatepicker();\n\t\t\t\tthis._lastInput = inst.input[0];\n\t\t\t\tif (typeof(inst.input[0]) !== \"object\") {\n\t\t\t\t\tinst.input.focus(); // restore focus\n\t\t\t\t}\n\t\t\t\tthis._lastInput = null;\n\t\t\t}\n\t\t},\n\t\n\t\t/* Update any alternate field to synchronise with the main field. */\n\t\t_updateAlternate: function(inst) {\n\t\t\tvar altFormat, date, dateStr,\n\t\t\t\taltField = this._get(inst, \"altField\");\n\t\n\t\t\tif (altField) { // update alternate field too\n\t\t\t\taltFormat = this._get(inst, \"altFormat\") || this._get(inst, \"dateFormat\");\n\t\t\t\tdate = this._getDate(inst);\n\t\t\t\tdateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));\n\t\t\t\t$(altField).each(function() { $(this).val(dateStr); });\n\t\t\t}\n\t\t},\n\t\n\t\t/* Set as beforeShowDay function to prevent selection of weekends.\n\t\t * @param  date  Date - the date to customise\n\t\t * @return [boolean, string] - is this date selectable?, what is its CSS class?\n\t\t */\n\t\tnoWeekends: function(date) {\n\t\t\tvar day = date.getDay();\n\t\t\treturn [(day > 0 && day < 6), \"\"];\n\t\t},\n\t\n\t\t/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.\n\t\t * @param  date  Date - the date to get the week for\n\t\t * @return  number - the number of the week within the year that contains this date\n\t\t */\n\t\tiso8601Week: function(date) {\n\t\t\tvar time,\n\t\t\t\tcheckDate = new Date(date.getTime());\n\t\n\t\t\t// Find Thursday of this week starting on Monday\n\t\t\tcheckDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n\t\n\t\t\ttime = checkDate.getTime();\n\t\t\tcheckDate.setMonth(0); // Compare with Jan 1\n\t\t\tcheckDate.setDate(1);\n\t\t\treturn Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;\n\t\t},\n\t\n\t\t/* Parse a string value into a date object.\n\t\t * See formatDate below for the possible formats.\n\t\t *\n\t\t * @param  format string - the expected format of the date\n\t\t * @param  value string - the date in the above format\n\t\t * @param  settings Object - attributes include:\n\t\t *\t\t\t\t\tshortYearCutoff  number - the cutoff year for determining the century (optional)\n\t\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t\t * @return  Date - the extracted date value or null if value is blank\n\t\t */\n\t\tparseDate: function (format, value, settings) {\n\t\t\tif (format == null || value == null) {\n\t\t\t\tthrow \"Invalid arguments\";\n\t\t\t}\n\t\n\t\t\tvalue = (typeof value === \"object\" ? value.toString() : value + \"\");\n\t\t\tif (value === \"\") {\n\t\t\t\treturn null;\n\t\t\t}\n\t\n\t\t\tvar iFormat, dim, extra,\n\t\t\t\tiValue = 0,\n\t\t\t\tshortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,\n\t\t\t\tshortYearCutoff = (typeof shortYearCutoffTemp !== \"string\" ? shortYearCutoffTemp :\n\t\t\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),\n\t\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\t\tyear = -1,\n\t\t\t\tmonth = -1,\n\t\t\t\tday = -1,\n\t\t\t\tdoy = -1,\n\t\t\t\tliteral = false,\n\t\t\t\tdate,\n\t\t\t\t// Check whether a format character is doubled\n\t\t\t\tlookAhead = function(match) {\n\t\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\tiFormat++;\n\t\t\t\t\t}\n\t\t\t\t\treturn matches;\n\t\t\t\t},\n\t\t\t\t// Extract a number from the string value\n\t\t\t\tgetNumber = function(match) {\n\t\t\t\t\tvar isDoubled = lookAhead(match),\n\t\t\t\t\t\tsize = (match === \"@\" ? 14 : (match === \"!\" ? 20 :\n\t\t\t\t\t\t(match === \"y\" && isDoubled ? 4 : (match === \"o\" ? 3 : 2)))),\n\t\t\t\t\t\tdigits = new RegExp(\"^\\\\d{1,\" + size + \"}\"),\n\t\t\t\t\t\tnum = value.substring(iValue).match(digits);\n\t\t\t\t\tif (!num) {\n\t\t\t\t\t\tthrow \"Missing number at position \" + iValue;\n\t\t\t\t\t}\n\t\t\t\t\tiValue += num[0].length;\n\t\t\t\t\treturn parseInt(num[0], 10);\n\t\t\t\t},\n\t\t\t\t// Extract a name from the string value and convert to an index\n\t\t\t\tgetName = function(match, shortNames, longNames) {\n\t\t\t\t\tvar index = -1,\n\t\t\t\t\t\tnames = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {\n\t\t\t\t\t\t\treturn [ [k, v] ];\n\t\t\t\t\t\t}).sort(function (a, b) {\n\t\t\t\t\t\t\treturn -(a[1].length - b[1].length);\n\t\t\t\t\t\t});\n\t\n\t\t\t\t\t$.each(names, function (i, pair) {\n\t\t\t\t\t\tvar name = pair[1];\n\t\t\t\t\t\tif (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n\t\t\t\t\t\t\tindex = pair[0];\n\t\t\t\t\t\t\tiValue += name.length;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tif (index !== -1) {\n\t\t\t\t\t\treturn index + 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow \"Unknown name at position \" + iValue;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t// Confirm that a literal character matches the string value\n\t\t\t\tcheckLiteral = function() {\n\t\t\t\t\tif (value.charAt(iValue) !== format.charAt(iFormat)) {\n\t\t\t\t\t\tthrow \"Unexpected literal at position \" + iValue;\n\t\t\t\t\t}\n\t\t\t\t\tiValue++;\n\t\t\t\t};\n\t\n\t\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\t\tif (literal) {\n\t\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\t\tliteral = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\t\tday = getNumber(\"d\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\t\tgetName(\"D\", dayNamesShort, dayNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\t\tdoy = getNumber(\"o\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\t\tmonth = getNumber(\"m\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\t\tmonth = getName(\"M\", monthNamesShort, monthNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\t\tyear = getNumber(\"y\");\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\t\tdate = new Date(getNumber(\"@\"));\n\t\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\t\tdate = new Date((getNumber(\"!\") - this._ticksTo1970) / 10000);\n\t\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tif (lookAhead(\"'\")){\n\t\t\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif (iValue < value.length){\n\t\t\t\textra = value.substr(iValue);\n\t\t\t\tif (!/^\\s+/.test(extra)) {\n\t\t\t\t\tthrow \"Extra/unparsed characters found in date: \" + extra;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif (year === -1) {\n\t\t\t\tyear = new Date().getFullYear();\n\t\t\t} else if (year < 100) {\n\t\t\t\tyear += new Date().getFullYear() - new Date().getFullYear() % 100 +\n\t\t\t\t\t(year <= shortYearCutoff ? 0 : -100);\n\t\t\t}\n\t\n\t\t\tif (doy > -1) {\n\t\t\t\tmonth = 1;\n\t\t\t\tday = doy;\n\t\t\t\tdo {\n\t\t\t\t\tdim = this._getDaysInMonth(year, month - 1);\n\t\t\t\t\tif (day <= dim) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmonth++;\n\t\t\t\t\tday -= dim;\n\t\t\t\t} while (true);\n\t\t\t}\n\t\n\t\t\tdate = this._daylightSavingAdjust(new Date(year, month - 1, day));\n\t\t\tif (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n\t\t\t\tthrow \"Invalid date\"; // E.g. 31/02/00\n\t\t\t}\n\t\t\treturn date;\n\t\t},\n\t\n\t\t/* Standard date formats. */\n\t\tATOM: \"yy-mm-dd\", // RFC 3339 (ISO 8601)\n\t\tCOOKIE: \"D, dd M yy\",\n\t\tISO_8601: \"yy-mm-dd\",\n\t\tRFC_822: \"D, d M y\",\n\t\tRFC_850: \"DD, dd-M-y\",\n\t\tRFC_1036: \"D, d M y\",\n\t\tRFC_1123: \"D, d M yy\",\n\t\tRFC_2822: \"D, d M yy\",\n\t\tRSS: \"D, d M y\", // RFC 822\n\t\tTICKS: \"!\",\n\t\tTIMESTAMP: \"@\",\n\t\tW3C: \"yy-mm-dd\", // ISO 8601\n\t\n\t\t_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +\n\t\t\tMath.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),\n\t\n\t\t/* Format a date object into a string value.\n\t\t * The format can be combinations of the following:\n\t\t * d  - day of month (no leading zero)\n\t\t * dd - day of month (two digit)\n\t\t * o  - day of year (no leading zeros)\n\t\t * oo - day of year (three digit)\n\t\t * D  - day name short\n\t\t * DD - day name long\n\t\t * m  - month of year (no leading zero)\n\t\t * mm - month of year (two digit)\n\t\t * M  - month name short\n\t\t * MM - month name long\n\t\t * y  - year (two digit)\n\t\t * yy - year (four digit)\n\t\t * @ - Unix timestamp (ms since 01/01/1970)\n\t\t * ! - Windows ticks (100ns since 01/01/0001)\n\t\t * \"...\" - literal text\n\t\t * '' - single quote\n\t\t *\n\t\t * @param  format string - the desired format of the date\n\t\t * @param  date Date - the date value to format\n\t\t * @param  settings Object - attributes include:\n\t\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t\t * @return  string - the date in the above format\n\t\t */\n\t\tformatDate: function (format, date, settings) {\n\t\t\tif (!date) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\n\t\t\tvar iFormat,\n\t\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\t\t// Check whether a format character is doubled\n\t\t\t\tlookAhead = function(match) {\n\t\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\tiFormat++;\n\t\t\t\t\t}\n\t\t\t\t\treturn matches;\n\t\t\t\t},\n\t\t\t\t// Format a number, with leading zero if necessary\n\t\t\t\tformatNumber = function(match, value, len) {\n\t\t\t\t\tvar num = \"\" + value;\n\t\t\t\t\tif (lookAhead(match)) {\n\t\t\t\t\t\twhile (num.length < len) {\n\t\t\t\t\t\t\tnum = \"0\" + num;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn num;\n\t\t\t\t},\n\t\t\t\t// Format a name, short or long as requested\n\t\t\t\tformatName = function(match, value, shortNames, longNames) {\n\t\t\t\t\treturn (lookAhead(match) ? longNames[value] : shortNames[value]);\n\t\t\t\t},\n\t\t\t\toutput = \"\",\n\t\t\t\tliteral = false;\n\t\n\t\t\tif (date) {\n\t\t\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\t\t\tif (literal) {\n\t\t\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\t\t\tliteral = false;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\t\t\toutput += formatNumber(\"d\", date.getDate(), 2);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\t\t\toutput += formatName(\"D\", date.getDay(), dayNamesShort, dayNames);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\t\t\toutput += formatNumber(\"o\",\n\t\t\t\t\t\t\t\t\tMath.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\t\t\toutput += formatNumber(\"m\", date.getMonth() + 1, 2);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\t\t\toutput += formatName(\"M\", date.getMonth(), monthNamesShort, monthNames);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\t\t\toutput += (lookAhead(\"y\") ? date.getFullYear() :\n\t\t\t\t\t\t\t\t\t(date.getYear() % 100 < 10 ? \"0\" : \"\") + date.getYear() % 100);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\t\t\toutput += date.getTime();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\t\t\toutput += date.getTime() * 10000 + this._ticksTo1970;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\t\t\toutput += \"'\";\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn output;\n\t\t},\n\t\n\t\t/* Extract all possible characters from the date format. */\n\t\t_possibleChars: function (format) {\n\t\t\tvar iFormat,\n\t\t\t\tchars = \"\",\n\t\t\t\tliteral = false,\n\t\t\t\t// Check whether a format character is doubled\n\t\t\t\tlookAhead = function(match) {\n\t\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\t\tif (matches) {\n\t\t\t\t\t\tiFormat++;\n\t\t\t\t\t}\n\t\t\t\t\treturn matches;\n\t\t\t\t};\n\t\n\t\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\t\tif (literal) {\n\t\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\t\tliteral = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\t\tcase \"d\": case \"m\": case \"y\": case \"@\":\n\t\t\t\t\t\t\tchars += \"0123456789\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"D\": case \"M\":\n\t\t\t\t\t\t\treturn null; // Accept anything\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\t\tchars += \"'\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn chars;\n\t\t},\n\t\n\t\t/* Get a setting value, defaulting if necessary. */\n\t\t_get: function(inst, name) {\n\t\t\treturn inst.settings[name] !== undefined ?\n\t\t\t\tinst.settings[name] : this._defaults[name];\n\t\t},\n\t\n\t\t/* Parse existing date and initialise date picker. */\n\t\t_setDateFromField: function(inst, noDefault) {\n\t\t\tif (inst.input.val() === inst.lastVal) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar dateFormat = this._get(inst, \"dateFormat\"),\n\t\t\t\tdates = inst.lastVal = inst.input ? inst.input.val() : null,\n\t\t\t\tdefaultDate = this._getDefaultDate(inst),\n\t\t\t\tdate = defaultDate,\n\t\t\t\tsettings = this._getFormatConfig(inst);\n\t\n\t\t\ttry {\n\t\t\t\tdate = this.parseDate(dateFormat, dates, settings) || defaultDate;\n\t\t\t} catch (event) {\n\t\t\t\tdates = (noDefault ? \"\" : dates);\n\t\t\t}\n\t\t\tinst.selectedDay = date.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t\tinst.currentDay = (dates ? date.getDate() : 0);\n\t\t\tinst.currentMonth = (dates ? date.getMonth() : 0);\n\t\t\tinst.currentYear = (dates ? date.getFullYear() : 0);\n\t\t\tthis._adjustInstDate(inst);\n\t\t},\n\t\n\t\t/* Retrieve the default date shown on opening. */\n\t\t_getDefaultDate: function(inst) {\n\t\t\treturn this._restrictMinMax(inst,\n\t\t\t\tthis._determineDate(inst, this._get(inst, \"defaultDate\"), new Date()));\n\t\t},\n\t\n\t\t/* A date may be specified as an exact value or a relative one. */\n\t\t_determineDate: function(inst, date, defaultDate) {\n\t\t\tvar offsetNumeric = function(offset) {\n\t\t\t\t\tvar date = new Date();\n\t\t\t\t\tdate.setDate(date.getDate() + offset);\n\t\t\t\t\treturn date;\n\t\t\t\t},\n\t\t\t\toffsetString = function(offset) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t\t\toffset, $.datepicker._getFormatConfig(inst));\n\t\t\t\t\t}\n\t\t\t\t\tcatch (e) {\n\t\t\t\t\t\t// Ignore\n\t\t\t\t\t}\n\t\n\t\t\t\t\tvar date = (offset.toLowerCase().match(/^c/) ?\n\t\t\t\t\t\t$.datepicker._getDate(inst) : null) || new Date(),\n\t\t\t\t\t\tyear = date.getFullYear(),\n\t\t\t\t\t\tmonth = date.getMonth(),\n\t\t\t\t\t\tday = date.getDate(),\n\t\t\t\t\t\tpattern = /([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,\n\t\t\t\t\t\tmatches = pattern.exec(offset);\n\t\n\t\t\t\t\twhile (matches) {\n\t\t\t\t\t\tswitch (matches[2] || \"d\") {\n\t\t\t\t\t\t\tcase \"d\" : case \"D\" :\n\t\t\t\t\t\t\t\tday += parseInt(matches[1],10); break;\n\t\t\t\t\t\t\tcase \"w\" : case \"W\" :\n\t\t\t\t\t\t\t\tday += parseInt(matches[1],10) * 7; break;\n\t\t\t\t\t\t\tcase \"m\" : case \"M\" :\n\t\t\t\t\t\t\t\tmonth += parseInt(matches[1],10);\n\t\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"y\": case \"Y\" :\n\t\t\t\t\t\t\t\tyear += parseInt(matches[1],10);\n\t\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatches = pattern.exec(offset);\n\t\t\t\t\t}\n\t\t\t\t\treturn new Date(year, month, day);\n\t\t\t\t},\n\t\t\t\tnewDate = (date == null || date === \"\" ? defaultDate : (typeof date === \"string\" ? offsetString(date) :\n\t\t\t\t\t(typeof date === \"number\" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));\n\t\n\t\t\tnewDate = (newDate && newDate.toString() === \"Invalid Date\" ? defaultDate : newDate);\n\t\t\tif (newDate) {\n\t\t\t\tnewDate.setHours(0);\n\t\t\t\tnewDate.setMinutes(0);\n\t\t\t\tnewDate.setSeconds(0);\n\t\t\t\tnewDate.setMilliseconds(0);\n\t\t\t}\n\t\t\treturn this._daylightSavingAdjust(newDate);\n\t\t},\n\t\n\t\t/* Handle switch to/from daylight saving.\n\t\t * Hours may be non-zero on daylight saving cut-over:\n\t\t * > 12 when midnight changeover, but then cannot generate\n\t\t * midnight datetime, so jump to 1AM, otherwise reset.\n\t\t * @param  date  (Date) the date to check\n\t\t * @return  (Date) the corrected date\n\t\t */\n\t\t_daylightSavingAdjust: function(date) {\n\t\t\tif (!date) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tdate.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\t\t\treturn date;\n\t\t},\n\t\n\t\t/* Set the date(s) directly. */\n\t\t_setDate: function(inst, date, noChange) {\n\t\t\tvar clear = !date,\n\t\t\t\torigMonth = inst.selectedMonth,\n\t\t\t\torigYear = inst.selectedYear,\n\t\t\t\tnewDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));\n\t\n\t\t\tinst.selectedDay = inst.currentDay = newDate.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();\n\t\t\tif ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {\n\t\t\t\tthis._notifyChange(inst);\n\t\t\t}\n\t\t\tthis._adjustInstDate(inst);\n\t\t\tif (inst.input) {\n\t\t\t\tinst.input.val(clear ? \"\" : this._formatDate(inst));\n\t\t\t}\n\t\t},\n\t\n\t\t/* Retrieve the date(s) directly. */\n\t\t_getDate: function(inst) {\n\t\t\tvar startDate = (!inst.currentYear || (inst.input && inst.input.val() === \"\") ? null :\n\t\t\t\tthis._daylightSavingAdjust(new Date(\n\t\t\t\tinst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\t\t\treturn startDate;\n\t\t},\n\t\n\t\t/* Attach the onxxx handlers.  These are declared statically so\n\t\t * they work with static code transformers like Caja.\n\t\t */\n\t\t_attachHandlers: function(inst) {\n\t\t\tvar stepMonths = this._get(inst, \"stepMonths\"),\n\t\t\t\tid = \"#\" + inst.id.replace( /\\\\\\\\/g, \"\\\\\" );\n\t\t\tinst.dpDiv.find(\"[data-handler]\").map(function () {\n\t\t\t\tvar handler = {\n\t\t\t\t\tprev: function () {\n\t\t\t\t\t\t$.datepicker._adjustDate(id, -stepMonths, \"M\");\n\t\t\t\t\t},\n\t\t\t\t\tnext: function () {\n\t\t\t\t\t\t$.datepicker._adjustDate(id, +stepMonths, \"M\");\n\t\t\t\t\t},\n\t\t\t\t\thide: function () {\n\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t},\n\t\t\t\t\ttoday: function () {\n\t\t\t\t\t\t$.datepicker._gotoToday(id);\n\t\t\t\t\t},\n\t\t\t\t\tselectDay: function () {\n\t\t\t\t\t\t$.datepicker._selectDay(id, +this.getAttribute(\"data-month\"), +this.getAttribute(\"data-year\"), this);\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t},\n\t\t\t\t\tselectMonth: function () {\n\t\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"M\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t},\n\t\t\t\t\tselectYear: function () {\n\t\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"Y\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t$(this).bind(this.getAttribute(\"data-event\"), handler[this.getAttribute(\"data-handler\")]);\n\t\t\t});\n\t\t},\n\t\n\t\t/* Generate the HTML for the current state of the date picker. */\n\t\t_generateHTML: function(inst) {\n\t\t\tvar maxDraw, prevText, prev, nextText, next, currentText, gotoDate,\n\t\t\t\tcontrols, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,\n\t\t\t\tmonthNames, monthNamesShort, beforeShowDay, showOtherMonths,\n\t\t\t\tselectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,\n\t\t\t\tcornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,\n\t\t\t\tprintDate, dRow, tbody, daySettings, otherMonth, unselectable,\n\t\t\t\ttempDate = new Date(),\n\t\t\t\ttoday = this._daylightSavingAdjust(\n\t\t\t\t\tnew Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time\n\t\t\t\tisRTL = this._get(inst, \"isRTL\"),\n\t\t\t\tshowButtonPanel = this._get(inst, \"showButtonPanel\"),\n\t\t\t\thideIfNoPrevNext = this._get(inst, \"hideIfNoPrevNext\"),\n\t\t\t\tnavigationAsDateFormat = this._get(inst, \"navigationAsDateFormat\"),\n\t\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\t\tshowCurrentAtPos = this._get(inst, \"showCurrentAtPos\"),\n\t\t\t\tstepMonths = this._get(inst, \"stepMonths\"),\n\t\t\t\tisMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),\n\t\t\t\tcurrentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :\n\t\t\t\t\tnew Date(inst.currentYear, inst.currentMonth, inst.currentDay))),\n\t\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\t\tdrawMonth = inst.drawMonth - showCurrentAtPos,\n\t\t\t\tdrawYear = inst.drawYear;\n\t\n\t\t\tif (drawMonth < 0) {\n\t\t\t\tdrawMonth += 12;\n\t\t\t\tdrawYear--;\n\t\t\t}\n\t\t\tif (maxDate) {\n\t\t\t\tmaxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),\n\t\t\t\t\tmaxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));\n\t\t\t\tmaxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);\n\t\t\t\twhile (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {\n\t\t\t\t\tdrawMonth--;\n\t\t\t\t\tif (drawMonth < 0) {\n\t\t\t\t\t\tdrawMonth = 11;\n\t\t\t\t\t\tdrawYear--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tinst.drawMonth = drawMonth;\n\t\t\tinst.drawYear = drawYear;\n\t\n\t\t\tprevText = this._get(inst, \"prevText\");\n\t\t\tprevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,\n\t\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),\n\t\t\t\tthis._getFormatConfig(inst)));\n\t\n\t\t\tprev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?\n\t\t\t\t\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'\" +\n\t\t\t\t\" title='\" + prevText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\" :\n\t\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+ prevText +\"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\"));\n\t\n\t\t\tnextText = this._get(inst, \"nextText\");\n\t\t\tnextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,\n\t\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),\n\t\t\t\tthis._getFormatConfig(inst)));\n\t\n\t\t\tnext = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?\n\t\t\t\t\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'\" +\n\t\t\t\t\" title='\" + nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\" :\n\t\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+ nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\"));\n\t\n\t\t\tcurrentText = this._get(inst, \"currentText\");\n\t\t\tgotoDate = (this._get(inst, \"gotoCurrent\") && inst.currentDay ? currentDate : today);\n\t\t\tcurrentText = (!navigationAsDateFormat ? currentText :\n\t\t\t\tthis.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));\n\t\n\t\t\tcontrols = (!inst.inline ? \"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\" +\n\t\t\t\tthis._get(inst, \"closeText\") + \"</button>\" : \"\");\n\t\n\t\t\tbuttonPanel = (showButtonPanel) ? \"<div class='ui-datepicker-buttonpane ui-widget-content'>\" + (isRTL ? controls : \"\") +\n\t\t\t\t(this._isInRange(inst, gotoDate) ? \"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'\" +\n\t\t\t\t\">\" + currentText + \"</button>\" : \"\") + (isRTL ? \"\" : controls) + \"</div>\" : \"\";\n\t\n\t\t\tfirstDay = parseInt(this._get(inst, \"firstDay\"),10);\n\t\t\tfirstDay = (isNaN(firstDay) ? 0 : firstDay);\n\t\n\t\t\tshowWeek = this._get(inst, \"showWeek\");\n\t\t\tdayNames = this._get(inst, \"dayNames\");\n\t\t\tdayNamesMin = this._get(inst, \"dayNamesMin\");\n\t\t\tmonthNames = this._get(inst, \"monthNames\");\n\t\t\tmonthNamesShort = this._get(inst, \"monthNamesShort\");\n\t\t\tbeforeShowDay = this._get(inst, \"beforeShowDay\");\n\t\t\tshowOtherMonths = this._get(inst, \"showOtherMonths\");\n\t\t\tselectOtherMonths = this._get(inst, \"selectOtherMonths\");\n\t\t\tdefaultDate = this._getDefaultDate(inst);\n\t\t\thtml = \"\";\n\t\t\tdow;\n\t\t\tfor (row = 0; row < numMonths[0]; row++) {\n\t\t\t\tgroup = \"\";\n\t\t\t\tthis.maxRows = 4;\n\t\t\t\tfor (col = 0; col < numMonths[1]; col++) {\n\t\t\t\t\tselectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));\n\t\t\t\t\tcornerClass = \" ui-corner-all\";\n\t\t\t\t\tcalender = \"\";\n\t\t\t\t\tif (isMultiMonth) {\n\t\t\t\t\t\tcalender += \"<div class='ui-datepicker-group\";\n\t\t\t\t\t\tif (numMonths[1] > 1) {\n\t\t\t\t\t\t\tswitch (col) {\n\t\t\t\t\t\t\t\tcase 0: calender += \" ui-datepicker-group-first\";\n\t\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"right\" : \"left\"); break;\n\t\t\t\t\t\t\t\tcase numMonths[1]-1: calender += \" ui-datepicker-group-last\";\n\t\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"left\" : \"right\"); break;\n\t\t\t\t\t\t\t\tdefault: calender += \" ui-datepicker-group-middle\"; cornerClass = \"\"; break;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalender += \"'>\";\n\t\t\t\t\t}\n\t\t\t\t\tcalender += \"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\" + cornerClass + \"'>\" +\n\t\t\t\t\t\t(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : \"\") +\n\t\t\t\t\t\t(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : \"\") +\n\t\t\t\t\t\tthis._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\t\t\t\trow > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers\n\t\t\t\t\t\t\"</div><table class='ui-datepicker-calendar'><thead>\" +\n\t\t\t\t\t\t\"<tr>\";\n\t\t\t\t\tthead = (showWeek ? \"<th class='ui-datepicker-week-col'>\" + this._get(inst, \"weekHeader\") + \"</th>\" : \"\");\n\t\t\t\t\tfor (dow = 0; dow < 7; dow++) { // days of the week\n\t\t\t\t\t\tday = (dow + firstDay) % 7;\n\t\t\t\t\t\tthead += \"<th\" + ((dow + firstDay + 6) % 7 >= 5 ? \" class='ui-datepicker-week-end'\" : \"\") + \">\" +\n\t\t\t\t\t\t\t\"<span title='\" + dayNames[day] + \"'>\" + dayNamesMin[day] + \"</span></th>\";\n\t\t\t\t\t}\n\t\t\t\t\tcalender += thead + \"</tr></thead><tbody>\";\n\t\t\t\t\tdaysInMonth = this._getDaysInMonth(drawYear, drawMonth);\n\t\t\t\t\tif (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {\n\t\t\t\t\t\tinst.selectedDay = Math.min(inst.selectedDay, daysInMonth);\n\t\t\t\t\t}\n\t\t\t\t\tleadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;\n\t\t\t\t\tcurRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate\n\t\t\t\t\tnumRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)\n\t\t\t\t\tthis.maxRows = numRows;\n\t\t\t\t\tprintDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));\n\t\t\t\t\tfor (dRow = 0; dRow < numRows; dRow++) { // create date picker rows\n\t\t\t\t\t\tcalender += \"<tr>\";\n\t\t\t\t\t\ttbody = (!showWeek ? \"\" : \"<td class='ui-datepicker-week-col'>\" +\n\t\t\t\t\t\t\tthis._get(inst, \"calculateWeek\")(printDate) + \"</td>\");\n\t\t\t\t\t\tfor (dow = 0; dow < 7; dow++) { // create date picker days\n\t\t\t\t\t\t\tdaySettings = (beforeShowDay ?\n\t\t\t\t\t\t\t\tbeforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, \"\"]);\n\t\t\t\t\t\t\totherMonth = (printDate.getMonth() !== drawMonth);\n\t\t\t\t\t\t\tunselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||\n\t\t\t\t\t\t\t\t(minDate && printDate < minDate) || (maxDate && printDate > maxDate);\n\t\t\t\t\t\t\ttbody += \"<td class='\" +\n\t\t\t\t\t\t\t\t((dow + firstDay + 6) % 7 >= 5 ? \" ui-datepicker-week-end\" : \"\") + // highlight weekends\n\t\t\t\t\t\t\t\t(otherMonth ? \" ui-datepicker-other-month\" : \"\") + // highlight days from other months\n\t\t\t\t\t\t\t\t((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key\n\t\t\t\t\t\t\t\t(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?\n\t\t\t\t\t\t\t\t// or defaultDate is current printedDate and defaultDate is selectedDate\n\t\t\t\t\t\t\t\t\" \" + this._dayOverClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t\t(unselectable ? \" \" + this._unselectableClass + \" ui-state-disabled\": \"\") +  // highlight unselectable days\n\t\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \"\" : \" \" + daySettings[1] + // highlight custom dates\n\t\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" \" + this._currentClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-datepicker-today\" : \"\")) + \"'\" + // highlight today (if different)\n\t\t\t\t\t\t\t\t((!otherMonth || showOtherMonths) && daySettings[2] ? \" title='\" + daySettings[2].replace(/'/g, \"&#39;\") + \"'\" : \"\") + // cell title\n\t\t\t\t\t\t\t\t(unselectable ? \"\" : \" data-handler='selectDay' data-event='click' data-month='\" + printDate.getMonth() + \"' data-year='\" + printDate.getFullYear() + \"'\") + \">\" + // actions\n\t\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \"&#xa0;\" : // display for other months\n\t\t\t\t\t\t\t\t(unselectable ? \"<span class='ui-state-default'>\" + printDate.getDate() + \"</span>\" : \"<a class='ui-state-default\" +\n\t\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-state-highlight\" : \"\") +\n\t\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" ui-state-active\" : \"\") + // highlight selected day\n\t\t\t\t\t\t\t\t(otherMonth ? \" ui-priority-secondary\" : \"\") + // distinguish dates from other months\n\t\t\t\t\t\t\t\t\"' href='#'>\" + printDate.getDate() + \"</a>\")) + \"</td>\"; // display selectable date\n\t\t\t\t\t\t\tprintDate.setDate(printDate.getDate() + 1);\n\t\t\t\t\t\t\tprintDate = this._daylightSavingAdjust(printDate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalender += tbody + \"</tr>\";\n\t\t\t\t\t}\n\t\t\t\t\tdrawMonth++;\n\t\t\t\t\tif (drawMonth > 11) {\n\t\t\t\t\t\tdrawMonth = 0;\n\t\t\t\t\t\tdrawYear++;\n\t\t\t\t\t}\n\t\t\t\t\tcalender += \"</tbody></table>\" + (isMultiMonth ? \"</div>\" +\n\t\t\t\t\t\t\t\t((numMonths[0] > 0 && col === numMonths[1]-1) ? \"<div class='ui-datepicker-row-break'></div>\" : \"\") : \"\");\n\t\t\t\t\tgroup += calender;\n\t\t\t\t}\n\t\t\t\thtml += group;\n\t\t\t}\n\t\t\thtml += buttonPanel;\n\t\t\tinst._keyEvent = false;\n\t\t\treturn html;\n\t\t},\n\t\n\t\t/* Generate the month and year header. */\n\t\t_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\t\tsecondary, monthNames, monthNamesShort) {\n\t\n\t\t\tvar inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,\n\t\t\t\tchangeMonth = this._get(inst, \"changeMonth\"),\n\t\t\t\tchangeYear = this._get(inst, \"changeYear\"),\n\t\t\t\tshowMonthAfterYear = this._get(inst, \"showMonthAfterYear\"),\n\t\t\t\thtml = \"<div class='ui-datepicker-title'>\",\n\t\t\t\tmonthHtml = \"\";\n\t\n\t\t\t// month selection\n\t\t\tif (secondary || !changeMonth) {\n\t\t\t\tmonthHtml += \"<span class='ui-datepicker-month'>\" + monthNames[drawMonth] + \"</span>\";\n\t\t\t} else {\n\t\t\t\tinMinYear = (minDate && minDate.getFullYear() === drawYear);\n\t\t\t\tinMaxYear = (maxDate && maxDate.getFullYear() === drawYear);\n\t\t\t\tmonthHtml += \"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\";\n\t\t\t\tfor ( month = 0; month < 12; month++) {\n\t\t\t\t\tif ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {\n\t\t\t\t\t\tmonthHtml += \"<option value='\" + month + \"'\" +\n\t\t\t\t\t\t\t(month === drawMonth ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\t\">\" + monthNamesShort[month] + \"</option>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmonthHtml += \"</select>\";\n\t\t\t}\n\t\n\t\t\tif (!showMonthAfterYear) {\n\t\t\t\thtml += monthHtml + (secondary || !(changeMonth && changeYear) ? \"&#xa0;\" : \"\");\n\t\t\t}\n\t\n\t\t\t// year selection\n\t\t\tif ( !inst.yearshtml ) {\n\t\t\t\tinst.yearshtml = \"\";\n\t\t\t\tif (secondary || !changeYear) {\n\t\t\t\t\thtml += \"<span class='ui-datepicker-year'>\" + drawYear + \"</span>\";\n\t\t\t\t} else {\n\t\t\t\t\t// determine range of years to display\n\t\t\t\t\tyears = this._get(inst, \"yearRange\").split(\":\");\n\t\t\t\t\tthisYear = new Date().getFullYear();\n\t\t\t\t\tdetermineYear = function(value) {\n\t\t\t\t\t\tvar year = (value.match(/c[+\\-].*/) ? drawYear + parseInt(value.substring(1), 10) :\n\t\t\t\t\t\t\t(value.match(/[+\\-].*/) ? thisYear + parseInt(value, 10) :\n\t\t\t\t\t\t\tparseInt(value, 10)));\n\t\t\t\t\t\treturn (isNaN(year) ? thisYear : year);\n\t\t\t\t\t};\n\t\t\t\t\tyear = determineYear(years[0]);\n\t\t\t\t\tendYear = Math.max(year, determineYear(years[1] || \"\"));\n\t\t\t\t\tyear = (minDate ? Math.max(year, minDate.getFullYear()) : year);\n\t\t\t\t\tendYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);\n\t\t\t\t\tinst.yearshtml += \"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";\n\t\t\t\t\tfor (; year <= endYear; year++) {\n\t\t\t\t\t\tinst.yearshtml += \"<option value='\" + year + \"'\" +\n\t\t\t\t\t\t\t(year === drawYear ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\t\">\" + year + \"</option>\";\n\t\t\t\t\t}\n\t\t\t\t\tinst.yearshtml += \"</select>\";\n\t\n\t\t\t\t\thtml += inst.yearshtml;\n\t\t\t\t\tinst.yearshtml = null;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\thtml += this._get(inst, \"yearSuffix\");\n\t\t\tif (showMonthAfterYear) {\n\t\t\t\thtml += (secondary || !(changeMonth && changeYear) ? \"&#xa0;\" : \"\") + monthHtml;\n\t\t\t}\n\t\t\thtml += \"</div>\"; // Close datepicker_header\n\t\t\treturn html;\n\t\t},\n\t\n\t\t/* Adjust one of the date sub-fields. */\n\t\t_adjustInstDate: function(inst, offset, period) {\n\t\t\tvar year = inst.drawYear + (period === \"Y\" ? offset : 0),\n\t\t\t\tmonth = inst.drawMonth + (period === \"M\" ? offset : 0),\n\t\t\t\tday = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === \"D\" ? offset : 0),\n\t\t\t\tdate = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));\n\t\n\t\t\tinst.selectedDay = date.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t\tif (period === \"M\" || period === \"Y\") {\n\t\t\t\tthis._notifyChange(inst);\n\t\t\t}\n\t\t},\n\t\n\t\t/* Ensure a date is within any min/max bounds. */\n\t\t_restrictMinMax: function(inst, date) {\n\t\t\tvar minDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\t\tnewDate = (minDate && date < minDate ? minDate : date);\n\t\t\treturn (maxDate && newDate > maxDate ? maxDate : newDate);\n\t\t},\n\t\n\t\t/* Notify change of month/year. */\n\t\t_notifyChange: function(inst) {\n\t\t\tvar onChange = this._get(inst, \"onChangeMonthYear\");\n\t\t\tif (onChange) {\n\t\t\t\tonChange.apply((inst.input ? inst.input[0] : null),\n\t\t\t\t\t[inst.selectedYear, inst.selectedMonth + 1, inst]);\n\t\t\t}\n\t\t},\n\t\n\t\t/* Determine the number of months to show. */\n\t\t_getNumberOfMonths: function(inst) {\n\t\t\tvar numMonths = this._get(inst, \"numberOfMonths\");\n\t\t\treturn (numMonths == null ? [1, 1] : (typeof numMonths === \"number\" ? [1, numMonths] : numMonths));\n\t\t},\n\t\n\t\t/* Determine the current maximum date - ensure no time components are set. */\n\t\t_getMinMaxDate: function(inst, minMax) {\n\t\t\treturn this._determineDate(inst, this._get(inst, minMax + \"Date\"), null);\n\t\t},\n\t\n\t\t/* Find the number of days in a given month. */\n\t\t_getDaysInMonth: function(year, month) {\n\t\t\treturn 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();\n\t\t},\n\t\n\t\t/* Find the day of the week of the first of a month. */\n\t\t_getFirstDayOfMonth: function(year, month) {\n\t\t\treturn new Date(year, month, 1).getDay();\n\t\t},\n\t\n\t\t/* Determines if we should allow a \"next/prev\" month display change. */\n\t\t_canAdjustMonth: function(inst, offset, curYear, curMonth) {\n\t\t\tvar numMonths = this._getNumberOfMonths(inst),\n\t\t\t\tdate = this._daylightSavingAdjust(new Date(curYear,\n\t\t\t\tcurMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));\n\t\n\t\t\tif (offset < 0) {\n\t\t\t\tdate.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));\n\t\t\t}\n\t\t\treturn this._isInRange(inst, date);\n\t\t},\n\t\n\t\t/* Is the given date in the accepted range? */\n\t\t_isInRange: function(inst, date) {\n\t\t\tvar yearSplit, currentYear,\n\t\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\t\tminYear = null,\n\t\t\t\tmaxYear = null,\n\t\t\t\tyears = this._get(inst, \"yearRange\");\n\t\t\t\tif (years){\n\t\t\t\t\tyearSplit = years.split(\":\");\n\t\t\t\t\tcurrentYear = new Date().getFullYear();\n\t\t\t\t\tminYear = parseInt(yearSplit[0], 10);\n\t\t\t\t\tmaxYear = parseInt(yearSplit[1], 10);\n\t\t\t\t\tif ( yearSplit[0].match(/[+\\-].*/) ) {\n\t\t\t\t\t\tminYear += currentYear;\n\t\t\t\t\t}\n\t\t\t\t\tif ( yearSplit[1].match(/[+\\-].*/) ) {\n\t\t\t\t\t\tmaxYear += currentYear;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\treturn ((!minDate || date.getTime() >= minDate.getTime()) &&\n\t\t\t\t(!maxDate || date.getTime() <= maxDate.getTime()) &&\n\t\t\t\t(!minYear || date.getFullYear() >= minYear) &&\n\t\t\t\t(!maxYear || date.getFullYear() <= maxYear));\n\t\t},\n\t\n\t\t/* Provide the configuration settings for formatting/parsing. */\n\t\t_getFormatConfig: function(inst) {\n\t\t\tvar shortYearCutoff = this._get(inst, \"shortYearCutoff\");\n\t\t\tshortYearCutoff = (typeof shortYearCutoff !== \"string\" ? shortYearCutoff :\n\t\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));\n\t\t\treturn {shortYearCutoff: shortYearCutoff,\n\t\t\t\tdayNamesShort: this._get(inst, \"dayNamesShort\"), dayNames: this._get(inst, \"dayNames\"),\n\t\t\t\tmonthNamesShort: this._get(inst, \"monthNamesShort\"), monthNames: this._get(inst, \"monthNames\")};\n\t\t},\n\t\n\t\t/* Format the given date for display. */\n\t\t_formatDate: function(inst, day, month, year) {\n\t\t\tif (!day) {\n\t\t\t\tinst.currentDay = inst.selectedDay;\n\t\t\t\tinst.currentMonth = inst.selectedMonth;\n\t\t\t\tinst.currentYear = inst.selectedYear;\n\t\t\t}\n\t\t\tvar date = (day ? (typeof day === \"object\" ? day :\n\t\t\t\tthis._daylightSavingAdjust(new Date(year, month, day))) :\n\t\t\t\tthis._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\t\treturn this.formatDate(this._get(inst, \"dateFormat\"), date, this._getFormatConfig(inst));\n\t\t}\n\t});\n\t\n\t/*\n\t * Bind hover events for datepicker elements.\n\t * Done via delegate so the binding only occurs once in the lifetime of the parent div.\n\t * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.\n\t */\n\tfunction bindHover(dpDiv) {\n\t\tvar selector = \"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";\n\t\treturn dpDiv.delegate(selector, \"mouseout\", function() {\n\t\t\t\t$(this).removeClass(\"ui-state-hover\");\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t\t$(this).removeClass(\"ui-datepicker-prev-hover\");\n\t\t\t\t}\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t\t$(this).removeClass(\"ui-datepicker-next-hover\");\n\t\t\t\t}\n\t\t\t})\n\t\t\t.delegate(selector, \"mouseover\", function(){\n\t\t\t\tif (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {\n\t\t\t\t\t$(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\");\n\t\t\t\t\t$(this).addClass(\"ui-state-hover\");\n\t\t\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t\t\t$(this).addClass(\"ui-datepicker-prev-hover\");\n\t\t\t\t\t}\n\t\t\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t\t\t$(this).addClass(\"ui-datepicker-next-hover\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t}\n\t\n\t/* jQuery extend now ignores nulls! */\n\tfunction extendRemove(target, props) {\n\t\t$.extend(target, props);\n\t\tfor (var name in props) {\n\t\t\tif (props[name] == null) {\n\t\t\t\ttarget[name] = props[name];\n\t\t\t}\n\t\t}\n\t\treturn target;\n\t}\n\t\n\t/* Invoke the datepicker functionality.\n\t   @param  options  string - a command, optionally followed by additional parameters or\n\t\t\t\t\t\tObject - settings for attaching new datepicker functionality\n\t   @return  jQuery object */\n\t$.fn.datepicker = function(options){\n\t\n\t\t/* Verify an empty collection wasn't passed - Fixes #6976 */\n\t\tif ( !this.length ) {\n\t\t\treturn this;\n\t\t}\n\t\n\t\t/* Initialise the date picker. */\n\t\tif (!$.datepicker.initialized) {\n\t\t\t$(document).mousedown($.datepicker._checkExternalClick);\n\t\t\t$.datepicker.initialized = true;\n\t\t}\n\t\n\t\t/* Append datepicker main container to body if not exist. */\n\t\tif ($(\"#\"+$.datepicker._mainDivId).length === 0) {\n\t\t\t$(\"body\").append($.datepicker.dpDiv);\n\t\t}\n\t\n\t\tvar otherArgs = Array.prototype.slice.call(arguments, 1);\n\t\tif (typeof options === \"string\" && (options === \"isDisabled\" || options === \"getDate\" || options === \"widget\")) {\n\t\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t\t}\n\t\tif (options === \"option\" && arguments.length === 2 && typeof arguments[1] === \"string\") {\n\t\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t\t}\n\t\treturn this.each(function() {\n\t\t\ttypeof options === \"string\" ?\n\t\t\t\t$.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\t\t\tapply($.datepicker, [this].concat(otherArgs)) :\n\t\t\t\t$.datepicker._attachDatepicker(this, options);\n\t\t});\n\t};\n\t\n\t$.datepicker = new Datepicker(); // singleton instance\n\t$.datepicker.initialized = false;\n\t$.datepicker.uuid = new Date().getTime();\n\t$.datepicker.version = \"1.10.3\";\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\tvar sizeRelatedOptions = {\n\t\t\tbuttons: true,\n\t\t\theight: true,\n\t\t\tmaxHeight: true,\n\t\t\tmaxWidth: true,\n\t\t\tminHeight: true,\n\t\t\tminWidth: true,\n\t\t\twidth: true\n\t\t},\n\t\tresizableRelatedOptions = {\n\t\t\tmaxHeight: true,\n\t\t\tmaxWidth: true,\n\t\t\tminHeight: true,\n\t\t\tminWidth: true\n\t\t};\n\t\n\t$.widget( \"ui.dialog\", {\n\t\tversion: \"1.10.3\",\n\t\toptions: {\n\t\t\tappendTo: \"body\",\n\t\t\tautoOpen: true,\n\t\t\tbuttons: [],\n\t\t\tcloseOnEscape: true,\n\t\t\tcloseText: \"close\",\n\t\t\tdialogClass: \"\",\n\t\t\tdraggable: true,\n\t\t\thide: null,\n\t\t\theight: \"auto\",\n\t\t\tmaxHeight: null,\n\t\t\tmaxWidth: null,\n\t\t\tminHeight: 150,\n\t\t\tminWidth: 150,\n\t\t\tmodal: false,\n\t\t\tposition: {\n\t\t\t\tmy: \"center\",\n\t\t\t\tat: \"center\",\n\t\t\t\tof: window,\n\t\t\t\tcollision: \"fit\",\n\t\t\t\t// Ensure the titlebar is always visible\n\t\t\t\tusing: function( pos ) {\n\t\t\t\t\tvar topOffset = $( this ).css( pos ).offset().top;\n\t\t\t\t\tif ( topOffset < 0 ) {\n\t\t\t\t\t\t$( this ).css( \"top\", pos.top - topOffset );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\tresizable: true,\n\t\t\tshow: null,\n\t\t\ttitle: null,\n\t\t\twidth: 300,\n\t\n\t\t\t// callbacks\n\t\t\tbeforeClose: null,\n\t\t\tclose: null,\n\t\t\tdrag: null,\n\t\t\tdragStart: null,\n\t\t\tdragStop: null,\n\t\t\tfocus: null,\n\t\t\topen: null,\n\t\t\tresize: null,\n\t\t\tresizeStart: null,\n\t\t\tresizeStop: null\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\tthis.originalCss = {\n\t\t\t\tdisplay: this.element[0].style.display,\n\t\t\t\twidth: this.element[0].style.width,\n\t\t\t\tminHeight: this.element[0].style.minHeight,\n\t\t\t\tmaxHeight: this.element[0].style.maxHeight,\n\t\t\t\theight: this.element[0].style.height\n\t\t\t};\n\t\t\tthis.originalPosition = {\n\t\t\t\tparent: this.element.parent(),\n\t\t\t\tindex: this.element.parent().children().index( this.element )\n\t\t\t};\n\t\t\tthis.originalTitle = this.element.attr(\"title\");\n\t\t\tthis.options.title = this.options.title || this.originalTitle;\n\t\n\t\t\tthis._createWrapper();\n\t\n\t\t\tthis.element\n\t\t\t\t.show()\n\t\t\t\t.removeAttr(\"title\")\n\t\t\t\t.addClass(\"ui-dialog-content ui-widget-content\")\n\t\t\t\t.appendTo( this.uiDialog );\n\t\n\t\t\tthis._createTitlebar();\n\t\t\tthis._createButtonPane();\n\t\n\t\t\tif ( this.options.draggable && $.fn.draggable ) {\n\t\t\t\tthis._makeDraggable();\n\t\t\t}\n\t\t\tif ( this.options.resizable && $.fn.resizable ) {\n\t\t\t\tthis._makeResizable();\n\t\t\t}\n\t\n\t\t\tthis._isOpen = false;\n\t\t},\n\t\n\t\t_init: function() {\n\t\t\tif ( this.options.autoOpen ) {\n\t\t\t\tthis.open();\n\t\t\t}\n\t\t},\n\t\n\t\t_appendTo: function() {\n\t\t\tvar element = this.options.appendTo;\n\t\t\tif ( element && (element.jquery || element.nodeType) ) {\n\t\t\t\treturn $( element );\n\t\t\t}\n\t\t\treturn this.document.find( element || \"body\" ).eq( 0 );\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tvar next,\n\t\t\t\toriginalPosition = this.originalPosition;\n\t\n\t\t\tthis._destroyOverlay();\n\t\n\t\t\tthis.element\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.removeClass(\"ui-dialog-content ui-widget-content\")\n\t\t\t\t.css( this.originalCss )\n\t\t\t\t// Without detaching first, the following becomes really slow\n\t\t\t\t.detach();\n\t\n\t\t\tthis.uiDialog.stop( true, true ).remove();\n\t\n\t\t\tif ( this.originalTitle ) {\n\t\t\t\tthis.element.attr( \"title\", this.originalTitle );\n\t\t\t}\n\t\n\t\t\tnext = originalPosition.parent.children().eq( originalPosition.index );\n\t\t\t// Don't try to place the dialog next to itself (#8613)\n\t\t\tif ( next.length && next[0] !== this.element[0] ) {\n\t\t\t\tnext.before( this.element );\n\t\t\t} else {\n\t\t\t\toriginalPosition.parent.append( this.element );\n\t\t\t}\n\t\t},\n\t\n\t\twidget: function() {\n\t\t\treturn this.uiDialog;\n\t\t},\n\t\n\t\tdisable: $.noop,\n\t\tenable: $.noop,\n\t\n\t\tclose: function( event ) {\n\t\t\tvar that = this;\n\t\n\t\t\tif ( !this._isOpen || this._trigger( \"beforeClose\", event ) === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis._isOpen = false;\n\t\t\tthis._destroyOverlay();\n\t\n\t\t\tif ( !this.opener.filter(\":focusable\").focus().length ) {\n\t\t\t\t// Hiding a focused element doesn't trigger blur in WebKit\n\t\t\t\t// so in case we have nothing to focus on, explicitly blur the active element\n\t\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=47182\n\t\t\t\t$( this.document[0].activeElement ).blur();\n\t\t\t}\n\t\n\t\t\tthis._hide( this.uiDialog, this.options.hide, function() {\n\t\t\t\tthat._trigger( \"close\", event );\n\t\t\t});\n\t\t},\n\t\n\t\tisOpen: function() {\n\t\t\treturn this._isOpen;\n\t\t},\n\t\n\t\tmoveToTop: function() {\n\t\t\tthis._moveToTop();\n\t\t},\n\t\n\t\t_moveToTop: function( event, silent ) {\n\t\t\tvar moved = !!this.uiDialog.nextAll(\":visible\").insertBefore( this.uiDialog ).length;\n\t\t\tif ( moved && !silent ) {\n\t\t\t\tthis._trigger( \"focus\", event );\n\t\t\t}\n\t\t\treturn moved;\n\t\t},\n\t\n\t\topen: function() {\n\t\t\tvar that = this;\n\t\t\tif ( this._isOpen ) {\n\t\t\t\tif ( this._moveToTop() ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis._isOpen = true;\n\t\t\tthis.opener = $( this.document[0].activeElement );\n\t\n\t\t\tthis._size();\n\t\t\tthis._position();\n\t\t\tthis._createOverlay();\n\t\t\tthis._moveToTop( null, true );\n\t\t\tthis._show( this.uiDialog, this.options.show, function() {\n\t\t\t\tthat._focusTabbable();\n\t\t\t\tthat._trigger(\"focus\");\n\t\t\t});\n\t\n\t\t\tthis._trigger(\"open\");\n\t\t},\n\t\n\t\t_focusTabbable: function() {\n\t\t\t// Set focus to the first match:\n\t\t\t// 1. First element inside the dialog matching [autofocus]\n\t\t\t// 2. Tabbable element inside the content element\n\t\t\t// 3. Tabbable element inside the buttonpane\n\t\t\t// 4. The close button\n\t\t\t// 5. The dialog itself\n\t\t\tvar hasFocus = this.element.find(\"[autofocus]\");\n\t\t\tif ( !hasFocus.length ) {\n\t\t\t\thasFocus = this.element.find(\":tabbable\");\n\t\t\t}\n\t\t\tif ( !hasFocus.length ) {\n\t\t\t\thasFocus = this.uiDialogButtonPane.find(\":tabbable\");\n\t\t\t}\n\t\t\tif ( !hasFocus.length ) {\n\t\t\t\thasFocus = this.uiDialogTitlebarClose.filter(\":tabbable\");\n\t\t\t}\n\t\t\tif ( !hasFocus.length ) {\n\t\t\t\thasFocus = this.uiDialog;\n\t\t\t}\n\t\t\thasFocus.eq( 0 ).focus();\n\t\t},\n\t\n\t\t_keepFocus: function( event ) {\n\t\t\tfunction checkFocus() {\n\t\t\t\tvar activeElement = this.document[0].activeElement,\n\t\t\t\t\tisActive = this.uiDialog[0] === activeElement ||\n\t\t\t\t\t\t$.contains( this.uiDialog[0], activeElement );\n\t\t\t\tif ( !isActive ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tcheckFocus.call( this );\n\t\t\t// support: IE\n\t\t\t// IE <= 8 doesn't prevent moving focus even with event.preventDefault()\n\t\t\t// so we check again later\n\t\t\tthis._delay( checkFocus );\n\t\t},\n\t\n\t\t_createWrapper: function() {\n\t\t\tthis.uiDialog = $(\"<div>\")\n\t\t\t\t.addClass( \"ui-dialog ui-widget ui-widget-content ui-corner-all ui-front \" +\n\t\t\t\t\tthis.options.dialogClass )\n\t\t\t\t.hide()\n\t\t\t\t.attr({\n\t\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\trole: \"dialog\"\n\t\t\t\t})\n\t\t\t\t.appendTo( this._appendTo() );\n\t\n\t\t\tthis._on( this.uiDialog, {\n\t\t\t\tkeydown: function( event ) {\n\t\t\t\t\tif ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.close( event );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// prevent tabbing out of dialogs\n\t\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tvar tabbables = this.uiDialog.find(\":tabbable\"),\n\t\t\t\t\t\tfirst = tabbables.filter(\":first\"),\n\t\t\t\t\t\tlast  = tabbables.filter(\":last\");\n\t\n\t\t\t\t\tif ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {\n\t\t\t\t\t\tfirst.focus( 1 );\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {\n\t\t\t\t\t\tlast.focus( 1 );\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tmousedown: function( event ) {\n\t\t\t\t\tif ( this._moveToTop( event ) ) {\n\t\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\t// We assume that any existing aria-describedby attribute means\n\t\t\t// that the dialog content is marked up properly\n\t\t\t// otherwise we brute force the content as the description\n\t\t\tif ( !this.element.find(\"[aria-describedby]\").length ) {\n\t\t\t\tthis.uiDialog.attr({\n\t\t\t\t\t\"aria-describedby\": this.element.uniqueId().attr(\"id\")\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\n\t\t_createTitlebar: function() {\n\t\t\tvar uiDialogTitle;\n\t\n\t\t\tthis.uiDialogTitlebar = $(\"<div>\")\n\t\t\t\t.addClass(\"ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix\")\n\t\t\t\t.prependTo( this.uiDialog );\n\t\t\tthis._on( this.uiDialogTitlebar, {\n\t\t\t\tmousedown: function( event ) {\n\t\t\t\t\t// Don't prevent click on close button (#8838)\n\t\t\t\t\t// Focusing a dialog that is partially scrolled out of view\n\t\t\t\t\t// causes the browser to scroll it into view, preventing the click event\n\t\t\t\t\tif ( !$( event.target ).closest(\".ui-dialog-titlebar-close\") ) {\n\t\t\t\t\t\t// Dialog isn't getting focus when dragging (#8063)\n\t\t\t\t\t\tthis.uiDialog.focus();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tthis.uiDialogTitlebarClose = $(\"<button></button>\")\n\t\t\t\t.button({\n\t\t\t\t\tlabel: this.options.closeText,\n\t\t\t\t\ticons: {\n\t\t\t\t\t\tprimary: \"ui-icon-closethick\"\n\t\t\t\t\t},\n\t\t\t\t\ttext: false\n\t\t\t\t})\n\t\t\t\t.addClass(\"ui-dialog-titlebar-close\")\n\t\t\t\t.appendTo( this.uiDialogTitlebar );\n\t\t\tthis._on( this.uiDialogTitlebarClose, {\n\t\t\t\tclick: function( event ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.close( event );\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tuiDialogTitle = $(\"<span>\")\n\t\t\t\t.uniqueId()\n\t\t\t\t.addClass(\"ui-dialog-title\")\n\t\t\t\t.prependTo( this.uiDialogTitlebar );\n\t\t\tthis._title( uiDialogTitle );\n\t\n\t\t\tthis.uiDialog.attr({\n\t\t\t\t\"aria-labelledby\": uiDialogTitle.attr(\"id\")\n\t\t\t});\n\t\t},\n\t\n\t\t_title: function( title ) {\n\t\t\tif ( !this.options.title ) {\n\t\t\t\ttitle.html(\"&#160;\");\n\t\t\t}\n\t\t\ttitle.text( this.options.title );\n\t\t},\n\t\n\t\t_createButtonPane: function() {\n\t\t\tthis.uiDialogButtonPane = $(\"<div>\")\n\t\t\t\t.addClass(\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\");\n\t\n\t\t\tthis.uiButtonSet = $(\"<div>\")\n\t\t\t\t.addClass(\"ui-dialog-buttonset\")\n\t\t\t\t.appendTo( this.uiDialogButtonPane );\n\t\n\t\t\tthis._createButtons();\n\t\t},\n\t\n\t\t_createButtons: function() {\n\t\t\tvar that = this,\n\t\t\t\tbuttons = this.options.buttons;\n\t\n\t\t\t// if we already have a button pane, remove it\n\t\t\tthis.uiDialogButtonPane.remove();\n\t\t\tthis.uiButtonSet.empty();\n\t\n\t\t\tif ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {\n\t\t\t\tthis.uiDialog.removeClass(\"ui-dialog-buttons\");\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t$.each( buttons, function( name, props ) {\n\t\t\t\tvar click, buttonOptions;\n\t\t\t\tprops = $.isFunction( props ) ?\n\t\t\t\t\t{ click: props, text: name } :\n\t\t\t\t\tprops;\n\t\t\t\t// Default to a non-submitting button\n\t\t\t\tprops = $.extend( { type: \"button\" }, props );\n\t\t\t\t// Change the context for the click callback to be the main element\n\t\t\t\tclick = props.click;\n\t\t\t\tprops.click = function() {\n\t\t\t\t\tclick.apply( that.element[0], arguments );\n\t\t\t\t};\n\t\t\t\tbuttonOptions = {\n\t\t\t\t\ticons: props.icons,\n\t\t\t\t\ttext: props.showText\n\t\t\t\t};\n\t\t\t\tdelete props.icons;\n\t\t\t\tdelete props.showText;\n\t\t\t\t$( \"<button></button>\", props )\n\t\t\t\t\t.button( buttonOptions )\n\t\t\t\t\t.appendTo( that.uiButtonSet );\n\t\t\t});\n\t\t\tthis.uiDialog.addClass(\"ui-dialog-buttons\");\n\t\t\tthis.uiDialogButtonPane.appendTo( this.uiDialog );\n\t\t},\n\t\n\t\t_makeDraggable: function() {\n\t\t\tvar that = this,\n\t\t\t\toptions = this.options;\n\t\n\t\t\tfunction filteredUi( ui ) {\n\t\t\t\treturn {\n\t\t\t\t\tposition: ui.position,\n\t\t\t\t\toffset: ui.offset\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tthis.uiDialog.draggable({\n\t\t\t\tcancel: \".ui-dialog-content, .ui-dialog-titlebar-close\",\n\t\t\t\thandle: \".ui-dialog-titlebar\",\n\t\t\t\tcontainment: \"document\",\n\t\t\t\tstart: function( event, ui ) {\n\t\t\t\t\t$( this ).addClass(\"ui-dialog-dragging\");\n\t\t\t\t\tthat._blockFrames();\n\t\t\t\t\tthat._trigger( \"dragStart\", event, filteredUi( ui ) );\n\t\t\t\t},\n\t\t\t\tdrag: function( event, ui ) {\n\t\t\t\t\tthat._trigger( \"drag\", event, filteredUi( ui ) );\n\t\t\t\t},\n\t\t\t\tstop: function( event, ui ) {\n\t\t\t\t\toptions.position = [\n\t\t\t\t\t\tui.position.left - that.document.scrollLeft(),\n\t\t\t\t\t\tui.position.top - that.document.scrollTop()\n\t\t\t\t\t];\n\t\t\t\t\t$( this ).removeClass(\"ui-dialog-dragging\");\n\t\t\t\t\tthat._unblockFrames();\n\t\t\t\t\tthat._trigger( \"dragStop\", event, filteredUi( ui ) );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_makeResizable: function() {\n\t\t\tvar that = this,\n\t\t\t\toptions = this.options,\n\t\t\t\thandles = options.resizable,\n\t\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\t\tposition = this.uiDialog.css(\"position\"),\n\t\t\t\tresizeHandles = typeof handles === \"string\" ?\n\t\t\t\t\thandles\t:\n\t\t\t\t\t\"n,e,s,w,se,sw,ne,nw\";\n\t\n\t\t\tfunction filteredUi( ui ) {\n\t\t\t\treturn {\n\t\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\t\tposition: ui.position,\n\t\t\t\t\tsize: ui.size\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\tthis.uiDialog.resizable({\n\t\t\t\tcancel: \".ui-dialog-content\",\n\t\t\t\tcontainment: \"document\",\n\t\t\t\talsoResize: this.element,\n\t\t\t\tmaxWidth: options.maxWidth,\n\t\t\t\tmaxHeight: options.maxHeight,\n\t\t\t\tminWidth: options.minWidth,\n\t\t\t\tminHeight: this._minHeight(),\n\t\t\t\thandles: resizeHandles,\n\t\t\t\tstart: function( event, ui ) {\n\t\t\t\t\t$( this ).addClass(\"ui-dialog-resizing\");\n\t\t\t\t\tthat._blockFrames();\n\t\t\t\t\tthat._trigger( \"resizeStart\", event, filteredUi( ui ) );\n\t\t\t\t},\n\t\t\t\tresize: function( event, ui ) {\n\t\t\t\t\tthat._trigger( \"resize\", event, filteredUi( ui ) );\n\t\t\t\t},\n\t\t\t\tstop: function( event, ui ) {\n\t\t\t\t\toptions.height = $( this ).height();\n\t\t\t\t\toptions.width = $( this ).width();\n\t\t\t\t\t$( this ).removeClass(\"ui-dialog-resizing\");\n\t\t\t\t\tthat._unblockFrames();\n\t\t\t\t\tthat._trigger( \"resizeStop\", event, filteredUi( ui ) );\n\t\t\t\t}\n\t\t\t})\n\t\t\t.css( \"position\", position );\n\t\t},\n\t\n\t\t_minHeight: function() {\n\t\t\tvar options = this.options;\n\t\n\t\t\treturn options.height === \"auto\" ?\n\t\t\t\toptions.minHeight :\n\t\t\t\tMath.min( options.minHeight, options.height );\n\t\t},\n\t\n\t\t_position: function() {\n\t\t\t// Need to show the dialog to get the actual offset in the position plugin\n\t\t\tvar isVisible = this.uiDialog.is(\":visible\");\n\t\t\tif ( !isVisible ) {\n\t\t\t\tthis.uiDialog.show();\n\t\t\t}\n\t\t\tthis.uiDialog.position( this.options.position );\n\t\t\tif ( !isVisible ) {\n\t\t\t\tthis.uiDialog.hide();\n\t\t\t}\n\t\t},\n\t\n\t\t_setOptions: function( options ) {\n\t\t\tvar that = this,\n\t\t\t\tresize = false,\n\t\t\t\tresizableOptions = {};\n\t\n\t\t\t$.each( options, function( key, value ) {\n\t\t\t\tthat._setOption( key, value );\n\t\n\t\t\t\tif ( key in sizeRelatedOptions ) {\n\t\t\t\t\tresize = true;\n\t\t\t\t}\n\t\t\t\tif ( key in resizableRelatedOptions ) {\n\t\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tif ( resize ) {\n\t\t\t\tthis._size();\n\t\t\t\tthis._position();\n\t\t\t}\n\t\t\tif ( this.uiDialog.is(\":data(ui-resizable)\") ) {\n\t\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t\t}\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\t/*jshint maxcomplexity:15*/\n\t\t\tvar isDraggable, isResizable,\n\t\t\t\tuiDialog = this.uiDialog;\n\t\n\t\t\tif ( key === \"dialogClass\" ) {\n\t\t\t\tuiDialog\n\t\t\t\t\t.removeClass( this.options.dialogClass )\n\t\t\t\t\t.addClass( value );\n\t\t\t}\n\t\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis._super( key, value );\n\t\n\t\t\tif ( key === \"appendTo\" ) {\n\t\t\t\tthis.uiDialog.appendTo( this._appendTo() );\n\t\t\t}\n\t\n\t\t\tif ( key === \"buttons\" ) {\n\t\t\t\tthis._createButtons();\n\t\t\t}\n\t\n\t\t\tif ( key === \"closeText\" ) {\n\t\t\t\tthis.uiDialogTitlebarClose.button({\n\t\t\t\t\t// Ensure that we always pass a string\n\t\t\t\t\tlabel: \"\" + value\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tif ( key === \"draggable\" ) {\n\t\t\t\tisDraggable = uiDialog.is(\":data(ui-draggable)\");\n\t\t\t\tif ( isDraggable && !value ) {\n\t\t\t\t\tuiDialog.draggable(\"destroy\");\n\t\t\t\t}\n\t\n\t\t\t\tif ( !isDraggable && value ) {\n\t\t\t\t\tthis._makeDraggable();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( key === \"position\" ) {\n\t\t\t\tthis._position();\n\t\t\t}\n\t\n\t\t\tif ( key === \"resizable\" ) {\n\t\t\t\t// currently resizable, becoming non-resizable\n\t\t\t\tisResizable = uiDialog.is(\":data(ui-resizable)\");\n\t\t\t\tif ( isResizable && !value ) {\n\t\t\t\t\tuiDialog.resizable(\"destroy\");\n\t\t\t\t}\n\t\n\t\t\t\t// currently resizable, changing handles\n\t\t\t\tif ( isResizable && typeof value === \"string\" ) {\n\t\t\t\t\tuiDialog.resizable( \"option\", \"handles\", value );\n\t\t\t\t}\n\t\n\t\t\t\t// currently non-resizable, becoming resizable\n\t\t\t\tif ( !isResizable && value !== false ) {\n\t\t\t\t\tthis._makeResizable();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( key === \"title\" ) {\n\t\t\t\tthis._title( this.uiDialogTitlebar.find(\".ui-dialog-title\") );\n\t\t\t}\n\t\t},\n\t\n\t\t_size: function() {\n\t\t\t// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t\t// divs will both have width and height set, so we need to reset them\n\t\t\tvar nonContentHeight, minContentHeight, maxContentHeight,\n\t\t\t\toptions = this.options;\n\t\n\t\t\t// Reset content sizing\n\t\t\tthis.element.show().css({\n\t\t\t\twidth: \"auto\",\n\t\t\t\tminHeight: 0,\n\t\t\t\tmaxHeight: \"none\",\n\t\t\t\theight: 0\n\t\t\t});\n\t\n\t\t\tif ( options.minWidth > options.width ) {\n\t\t\t\toptions.width = options.minWidth;\n\t\t\t}\n\t\n\t\t\t// reset wrapper sizing\n\t\t\t// determine the height of all the non-content elements\n\t\t\tnonContentHeight = this.uiDialog.css({\n\t\t\t\t\theight: \"auto\",\n\t\t\t\t\twidth: options.width\n\t\t\t\t})\n\t\t\t\t.outerHeight();\n\t\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\t\tmaxContentHeight = typeof options.maxHeight === \"number\" ?\n\t\t\t\tMath.max( 0, options.maxHeight - nonContentHeight ) :\n\t\t\t\t\"none\";\n\t\n\t\t\tif ( options.height === \"auto\" ) {\n\t\t\t\tthis.element.css({\n\t\t\t\t\tminHeight: minContentHeight,\n\t\t\t\t\tmaxHeight: maxContentHeight,\n\t\t\t\t\theight: \"auto\"\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tthis.element.height( Math.max( 0, options.height - nonContentHeight ) );\n\t\t\t}\n\t\n\t\t\tif (this.uiDialog.is(\":data(ui-resizable)\") ) {\n\t\t\t\tthis.uiDialog.resizable( \"option\", \"minHeight\", this._minHeight() );\n\t\t\t}\n\t\t},\n\t\n\t\t_blockFrames: function() {\n\t\t\tthis.iframeBlocks = this.document.find( \"iframe\" ).map(function() {\n\t\t\t\tvar iframe = $( this );\n\t\n\t\t\t\treturn $( \"<div>\" )\n\t\t\t\t\t.css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\twidth: iframe.outerWidth(),\n\t\t\t\t\t\theight: iframe.outerHeight()\n\t\t\t\t\t})\n\t\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t\t.offset( iframe.offset() )[0];\n\t\t\t});\n\t\t},\n\t\n\t\t_unblockFrames: function() {\n\t\t\tif ( this.iframeBlocks ) {\n\t\t\t\tthis.iframeBlocks.remove();\n\t\t\t\tdelete this.iframeBlocks;\n\t\t\t}\n\t\t},\n\t\n\t\t_allowInteraction: function( event ) {\n\t\t\tif ( $( event.target ).closest(\".ui-dialog\").length ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\n\t\t\t// TODO: Remove hack when datepicker implements\n\t\t\t// the .ui-front logic (#8989)\n\t\t\treturn !!$( event.target ).closest(\".ui-datepicker\").length;\n\t\t},\n\t\n\t\t_createOverlay: function() {\n\t\t\tif ( !this.options.modal ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tvar that = this,\n\t\t\t\twidgetFullName = this.widgetFullName;\n\t\t\tif ( !$.ui.dialog.overlayInstances ) {\n\t\t\t\t// Prevent use of anchors and inputs.\n\t\t\t\t// We use a delay in case the overlay is created from an\n\t\t\t\t// event that we're going to be cancelling. (#2804)\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\t// Handle .dialog().dialog(\"close\") (#4065)\n\t\t\t\t\tif ( $.ui.dialog.overlayInstances ) {\n\t\t\t\t\t\tthis.document.bind( \"focusin.dialog\", function( event ) {\n\t\t\t\t\t\t\tif ( !that._allowInteraction( event ) ) {\n\t\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t\t$(\".ui-dialog:visible:last .ui-dialog-content\")\n\t\t\t\t\t\t\t\t\t.data( widgetFullName )._focusTabbable();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tthis.overlay = $(\"<div>\")\n\t\t\t\t.addClass(\"ui-widget-overlay ui-front\")\n\t\t\t\t.appendTo( this._appendTo() );\n\t\t\tthis._on( this.overlay, {\n\t\t\t\tmousedown: \"_keepFocus\"\n\t\t\t});\n\t\t\t$.ui.dialog.overlayInstances++;\n\t\t},\n\t\n\t\t_destroyOverlay: function() {\n\t\t\tif ( !this.options.modal ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( this.overlay ) {\n\t\t\t\t$.ui.dialog.overlayInstances--;\n\t\n\t\t\t\tif ( !$.ui.dialog.overlayInstances ) {\n\t\t\t\t\tthis.document.unbind( \"focusin.dialog\" );\n\t\t\t\t}\n\t\t\t\tthis.overlay.remove();\n\t\t\t\tthis.overlay = null;\n\t\t\t}\n\t\t}\n\t});\n\t\n\t$.ui.dialog.overlayInstances = 0;\n\t\n\t// DEPRECATED\n\tif ( $.uiBackCompat !== false ) {\n\t\t// position option with array notation\n\t\t// just override with old implementation\n\t\t$.widget( \"ui.dialog\", $.ui.dialog, {\n\t\t\t_position: function() {\n\t\t\t\tvar position = this.options.position,\n\t\t\t\t\tmyAt = [],\n\t\t\t\t\toffset = [ 0, 0 ],\n\t\t\t\t\tisVisible;\n\t\n\t\t\t\tif ( position ) {\n\t\t\t\t\tif ( typeof position === \"string\" || (typeof position === \"object\" && \"0\" in position ) ) {\n\t\t\t\t\t\tmyAt = position.split ? position.split(\" \") : [ position[0], position[1] ];\n\t\t\t\t\t\tif ( myAt.length === 1 ) {\n\t\t\t\t\t\t\tmyAt[1] = myAt[0];\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t$.each( [ \"left\", \"top\" ], function( i, offsetPosition ) {\n\t\t\t\t\t\t\tif ( +myAt[ i ] === myAt[ i ] ) {\n\t\t\t\t\t\t\t\toffset[ i ] = myAt[ i ];\n\t\t\t\t\t\t\t\tmyAt[ i ] = offsetPosition;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\n\t\t\t\t\t\tposition = {\n\t\t\t\t\t\t\tmy: myAt[0] + (offset[0] < 0 ? offset[0] : \"+\" + offset[0]) + \" \" +\n\t\t\t\t\t\t\t\tmyAt[1] + (offset[1] < 0 ? offset[1] : \"+\" + offset[1]),\n\t\t\t\t\t\t\tat: myAt.join(\" \")\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\n\t\t\t\t\tposition = $.extend( {}, $.ui.dialog.prototype.options.position, position );\n\t\t\t\t} else {\n\t\t\t\t\tposition = $.ui.dialog.prototype.options.position;\n\t\t\t\t}\n\t\n\t\t\t\t// need to show the dialog to get the actual offset in the position plugin\n\t\t\t\tisVisible = this.uiDialog.is(\":visible\");\n\t\t\t\tif ( !isVisible ) {\n\t\t\t\t\tthis.uiDialog.show();\n\t\t\t\t}\n\t\t\t\tthis.uiDialog.position( position );\n\t\t\t\tif ( !isVisible ) {\n\t\t\t\t\tthis.uiDialog.hide();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\t\n\t}( jQuery ) );\n\t\n\t(function( $, undefined ) {\n\t\n\tvar rvertical = /up|down|vertical/,\n\t\trpositivemotion = /up|left|vertical|horizontal/;\n\t\n\t$.effects.effect.blind = function( o, done ) {\n\t\t// Create element\n\t\tvar el = $( this ),\n\t\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\t\tdirection = o.direction || \"up\",\n\t\t\tvertical = rvertical.test( direction ),\n\t\t\tref = vertical ? \"height\" : \"width\",\n\t\t\tref2 = vertical ? \"top\" : \"left\",\n\t\t\tmotion = rpositivemotion.test( direction ),\n\t\t\tanimation = {},\n\t\t\tshow = mode === \"show\",\n\t\t\twrapper, distance, margin;\n\t\n\t\t// if already wrapped, the wrapper's properties are my property. #6245\n\t\tif ( el.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\t$.effects.save( el.parent(), props );\n\t\t} else {\n\t\t\t$.effects.save( el, props );\n\t\t}\n\t\tel.show();\n\t\twrapper = $.effects.createWrapper( el ).css({\n\t\t\toverflow: \"hidden\"\n\t\t});\n\t\n\t\tdistance = wrapper[ ref ]();\n\t\tmargin = parseFloat( wrapper.css( ref2 ) ) || 0;\n\t\n\t\tanimation[ ref ] = show ? distance : 0;\n\t\tif ( !motion ) {\n\t\t\tel\n\t\t\t\t.css( vertical ? \"bottom\" : \"right\", 0 )\n\t\t\t\t.css( vertical ? \"top\" : \"left\", \"auto\" )\n\t\t\t\t.css({ position: \"absolute\" });\n\t\n\t\t\tanimation[ ref2 ] = show ? margin : distance + margin;\n\t\t}\n\t\n\t\t// start at 0 if we are showing\n\t\tif ( show ) {\n\t\t\twrapper.css( ref, 0 );\n\t\t\tif ( ! motion ) {\n\t\t\t\twrapper.css( ref2, margin + distance );\n\t\t\t}\n\t\t}\n\t\n\t\t// Animate\n\t\twrapper.animate( animation, {\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tqueue: false,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\tel.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( el, props );\n\t\t\t\t$.effects.removeWrapper( el );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n\t\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.bounce = function( o, done ) {\n\t\tvar el = $( this ),\n\t\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\n\t\t\t// defaults:\n\t\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\t\thide = mode === \"hide\",\n\t\t\tshow = mode === \"show\",\n\t\t\tdirection = o.direction || \"up\",\n\t\t\tdistance = o.distance,\n\t\t\ttimes = o.times || 5,\n\t\n\t\t\t// number of internal animations\n\t\t\tanims = times * 2 + ( show || hide ? 1 : 0 ),\n\t\t\tspeed = o.duration / anims,\n\t\t\teasing = o.easing,\n\t\n\t\t\t// utility:\n\t\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\t\tmotion = ( direction === \"up\" || direction === \"left\" ),\n\t\t\ti,\n\t\t\tupAnim,\n\t\t\tdownAnim,\n\t\n\t\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\t\tqueue = el.queue(),\n\t\t\tqueuelen = queue.length;\n\t\n\t\t// Avoid touching opacity to prevent clearType and PNG issues in IE\n\t\tif ( show || hide ) {\n\t\t\tprops.push( \"opacity\" );\n\t\t}\n\t\n\t\t$.effects.save( el, props );\n\t\tel.show();\n\t\t$.effects.createWrapper( el ); // Create Wrapper\n\t\n\t\t// default distance for the BIGGEST bounce is the outer Distance / 3\n\t\tif ( !distance ) {\n\t\t\tdistance = el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]() / 3;\n\t\t}\n\t\n\t\tif ( show ) {\n\t\t\tdownAnim = { opacity: 1 };\n\t\t\tdownAnim[ ref ] = 0;\n\t\n\t\t\t// if we are showing, force opacity 0 and set the initial position\n\t\t\t// then do the \"first\" animation\n\t\t\tel.css( \"opacity\", 0 )\n\t\t\t\t.css( ref, motion ? -distance * 2 : distance * 2 )\n\t\t\t\t.animate( downAnim, speed, easing );\n\t\t}\n\t\n\t\t// start at the smallest distance if we are hiding\n\t\tif ( hide ) {\n\t\t\tdistance = distance / Math.pow( 2, times - 1 );\n\t\t}\n\t\n\t\tdownAnim = {};\n\t\tdownAnim[ ref ] = 0;\n\t\t// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here\n\t\tfor ( i = 0; i < times; i++ ) {\n\t\t\tupAnim = {};\n\t\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\t\n\t\t\tel.animate( upAnim, speed, easing )\n\t\t\t\t.animate( downAnim, speed, easing );\n\t\n\t\t\tdistance = hide ? distance * 2 : distance / 2;\n\t\t}\n\t\n\t\t// Last Bounce when Hiding\n\t\tif ( hide ) {\n\t\t\tupAnim = { opacity: 0 };\n\t\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\t\n\t\t\tel.animate( upAnim, speed, easing );\n\t\t}\n\t\n\t\tel.queue(function() {\n\t\t\tif ( hide ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t});\n\t\n\t\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\t\tif ( queuelen > 1) {\n\t\t\tqueue.splice.apply( queue,\n\t\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t\t}\n\t\tel.dequeue();\n\t\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.clip = function( o, done ) {\n\t\t// Create element\n\t\tvar el = $( this ),\n\t\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\t\tshow = mode === \"show\",\n\t\t\tdirection = o.direction || \"vertical\",\n\t\t\tvert = direction === \"vertical\",\n\t\t\tsize = vert ? \"height\" : \"width\",\n\t\t\tposition = vert ? \"top\" : \"left\",\n\t\t\tanimation = {},\n\t\t\twrapper, animate, distance;\n\t\n\t\t// Save & Show\n\t\t$.effects.save( el, props );\n\t\tel.show();\n\t\n\t\t// Create Wrapper\n\t\twrapper = $.effects.createWrapper( el ).css({\n\t\t\toverflow: \"hidden\"\n\t\t});\n\t\tanimate = ( el[0].tagName === \"IMG\" ) ? wrapper : el;\n\t\tdistance = animate[ size ]();\n\t\n\t\t// Shift\n\t\tif ( show ) {\n\t\t\tanimate.css( size, 0 );\n\t\t\tanimate.css( position, distance / 2 );\n\t\t}\n\t\n\t\t// Create Animation Object:\n\t\tanimation[ size ] = show ? distance : 0;\n\t\tanimation[ position ] = show ? 0 : distance / 2;\n\t\n\t\t// Animate\n\t\tanimate.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( !show ) {\n\t\t\t\t\tel.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( el, props );\n\t\t\t\t$.effects.removeWrapper( el );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n\t\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.drop = function( o, done ) {\n\t\n\t\tvar el = $( this ),\n\t\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"opacity\", \"height\", \"width\" ],\n\t\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\t\tshow = mode === \"show\",\n\t\t\tdirection = o.direction || \"left\",\n\t\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\t\tmotion = ( direction === \"up\" || direction === \"left\" ) ? \"pos\" : \"neg\",\n\t\t\tanimation = {\n\t\t\t\topacity: show ? 1 : 0\n\t\t\t},\n\t\t\tdistance;\n\t\n\t\t// Adjust\n\t\t$.effects.save( el, props );\n\t\tel.show();\n\t\t$.effects.createWrapper( el );\n\t\n\t\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\": \"outerWidth\" ]( true ) / 2;\n\t\n\t\tif ( show ) {\n\t\t\tel\n\t\t\t\t.css( \"opacity\", 0 )\n\t\t\t\t.css( ref, motion === \"pos\" ? -distance : distance );\n\t\t}\n\t\n\t\t// Animation\n\t\tanimation[ ref ] = ( show ?\n\t\t\t( motion === \"pos\" ? \"+=\" : \"-=\" ) :\n\t\t\t( motion === \"pos\" ? \"-=\" : \"+=\" ) ) +\n\t\t\tdistance;\n\t\n\t\t// Animate\n\t\tel.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\tel.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( el, props );\n\t\t\t\t$.effects.removeWrapper( el );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.explode = function( o, done ) {\n\t\n\t\tvar rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,\n\t\t\tcells = rows,\n\t\t\tel = $( this ),\n\t\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\t\tshow = mode === \"show\",\n\t\n\t\t\t// show and then visibility:hidden the element before calculating offset\n\t\t\toffset = el.show().css( \"visibility\", \"hidden\" ).offset(),\n\t\n\t\t\t// width and height of a piece\n\t\t\twidth = Math.ceil( el.outerWidth() / cells ),\n\t\t\theight = Math.ceil( el.outerHeight() / rows ),\n\t\t\tpieces = [],\n\t\n\t\t\t// loop\n\t\t\ti, j, left, top, mx, my;\n\t\n\t\t// children animate complete:\n\t\tfunction childComplete() {\n\t\t\tpieces.push( this );\n\t\t\tif ( pieces.length === rows * cells ) {\n\t\t\t\tanimComplete();\n\t\t\t}\n\t\t}\n\t\n\t\t// clone the element for each row and cell.\n\t\tfor( i = 0; i < rows ; i++ ) { // ===>\n\t\t\ttop = offset.top + i * height;\n\t\t\tmy = i - ( rows - 1 ) / 2 ;\n\t\n\t\t\tfor( j = 0; j < cells ; j++ ) { // |||\n\t\t\t\tleft = offset.left + j * width;\n\t\t\t\tmx = j - ( cells - 1 ) / 2 ;\n\t\n\t\t\t\t// Create a clone of the now hidden main element that will be absolute positioned\n\t\t\t\t// within a wrapper div off the -left and -top equal to size of our pieces\n\t\t\t\tel\n\t\t\t\t\t.clone()\n\t\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t\t.wrap( \"<div></div>\" )\n\t\t\t\t\t.css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\tvisibility: \"visible\",\n\t\t\t\t\t\tleft: -j * width,\n\t\t\t\t\t\ttop: -i * height\n\t\t\t\t\t})\n\t\n\t\t\t\t// select the wrapper - make it overflow: hidden and absolute positioned based on\n\t\t\t\t// where the original was located +left and +top equal to the size of pieces\n\t\t\t\t\t.parent()\n\t\t\t\t\t.addClass( \"ui-effects-explode\" )\n\t\t\t\t\t.css({\n\t\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\t\twidth: width,\n\t\t\t\t\t\theight: height,\n\t\t\t\t\t\tleft: left + ( show ? mx * width : 0 ),\n\t\t\t\t\t\ttop: top + ( show ? my * height : 0 ),\n\t\t\t\t\t\topacity: show ? 0 : 1\n\t\t\t\t\t}).animate({\n\t\t\t\t\t\tleft: left + ( show ? 0 : mx * width ),\n\t\t\t\t\t\ttop: top + ( show ? 0 : my * height ),\n\t\t\t\t\t\topacity: show ? 1 : 0\n\t\t\t\t\t}, o.duration || 500, o.easing, childComplete );\n\t\t\t}\n\t\t}\n\t\n\t\tfunction animComplete() {\n\t\t\tel.css({\n\t\t\t\tvisibility: \"visible\"\n\t\t\t});\n\t\t\t$( pieces ).remove();\n\t\t\tif ( !show ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\tdone();\n\t\t}\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.fade = function( o, done ) {\n\t\tvar el = $( this ),\n\t\t\tmode = $.effects.setMode( el, o.mode || \"toggle\" );\n\t\n\t\tel.animate({\n\t\t\topacity: mode\n\t\t}, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: done\n\t\t});\n\t};\n\t\n\t})( jQuery );\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.fold = function( o, done ) {\n\t\n\t\t// Create element\n\t\tvar el = $( this ),\n\t\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\t\tshow = mode === \"show\",\n\t\t\thide = mode === \"hide\",\n\t\t\tsize = o.size || 15,\n\t\t\tpercent = /([0-9]+)%/.exec( size ),\n\t\t\thorizFirst = !!o.horizFirst,\n\t\t\twidthFirst = show !== horizFirst,\n\t\t\tref = widthFirst ? [ \"width\", \"height\" ] : [ \"height\", \"width\" ],\n\t\t\tduration = o.duration / 2,\n\t\t\twrapper, distance,\n\t\t\tanimation1 = {},\n\t\t\tanimation2 = {};\n\t\n\t\t$.effects.save( el, props );\n\t\tel.show();\n\t\n\t\t// Create Wrapper\n\t\twrapper = $.effects.createWrapper( el ).css({\n\t\t\toverflow: \"hidden\"\n\t\t});\n\t\tdistance = widthFirst ?\n\t\t\t[ wrapper.width(), wrapper.height() ] :\n\t\t\t[ wrapper.height(), wrapper.width() ];\n\t\n\t\tif ( percent ) {\n\t\t\tsize = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];\n\t\t}\n\t\tif ( show ) {\n\t\t\twrapper.css( horizFirst ? {\n\t\t\t\theight: 0,\n\t\t\t\twidth: size\n\t\t\t} : {\n\t\t\t\theight: size,\n\t\t\t\twidth: 0\n\t\t\t});\n\t\t}\n\t\n\t\t// Animation\n\t\tanimation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;\n\t\tanimation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;\n\t\n\t\t// Animate\n\t\twrapper\n\t\t\t.animate( animation1, duration, o.easing )\n\t\t\t.animate( animation2, duration, o.easing, function() {\n\t\t\t\tif ( hide ) {\n\t\t\t\t\tel.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( el, props );\n\t\t\t\t$.effects.removeWrapper( el );\n\t\t\t\tdone();\n\t\t\t});\n\t\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.highlight = function( o, done ) {\n\t\tvar elem = $( this ),\n\t\t\tprops = [ \"backgroundImage\", \"backgroundColor\", \"opacity\" ],\n\t\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\t\tanimation = {\n\t\t\t\tbackgroundColor: elem.css( \"backgroundColor\" )\n\t\t\t};\n\t\n\t\tif (mode === \"hide\") {\n\t\t\tanimation.opacity = 0;\n\t\t}\n\t\n\t\t$.effects.save( elem, props );\n\t\n\t\telem\n\t\t\t.show()\n\t\t\t.css({\n\t\t\t\tbackgroundImage: \"none\",\n\t\t\t\tbackgroundColor: o.color || \"#ffff99\"\n\t\t\t})\n\t\t\t.animate( animation, {\n\t\t\t\tqueue: false,\n\t\t\t\tduration: o.duration,\n\t\t\t\teasing: o.easing,\n\t\t\t\tcomplete: function() {\n\t\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\t\telem.hide();\n\t\t\t\t\t}\n\t\t\t\t\t$.effects.restore( elem, props );\n\t\t\t\t\tdone();\n\t\t\t\t}\n\t\t\t});\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.pulsate = function( o, done ) {\n\t\tvar elem = $( this ),\n\t\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\t\tshow = mode === \"show\",\n\t\t\thide = mode === \"hide\",\n\t\t\tshowhide = ( show || mode === \"hide\" ),\n\t\n\t\t\t// showing or hiding leaves of the \"last\" animation\n\t\t\tanims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),\n\t\t\tduration = o.duration / anims,\n\t\t\tanimateTo = 0,\n\t\t\tqueue = elem.queue(),\n\t\t\tqueuelen = queue.length,\n\t\t\ti;\n\t\n\t\tif ( show || !elem.is(\":visible\")) {\n\t\t\telem.css( \"opacity\", 0 ).show();\n\t\t\tanimateTo = 1;\n\t\t}\n\t\n\t\t// anims - 1 opacity \"toggles\"\n\t\tfor ( i = 1; i < anims; i++ ) {\n\t\t\telem.animate({\n\t\t\t\topacity: animateTo\n\t\t\t}, duration, o.easing );\n\t\t\tanimateTo = 1 - animateTo;\n\t\t}\n\t\n\t\telem.animate({\n\t\t\topacity: animateTo\n\t\t}, duration, o.easing);\n\t\n\t\telem.queue(function() {\n\t\t\tif ( hide ) {\n\t\t\t\telem.hide();\n\t\t\t}\n\t\t\tdone();\n\t\t});\n\t\n\t\t// We just queued up \"anims\" animations, we need to put them next in the queue\n\t\tif ( queuelen > 1 ) {\n\t\t\tqueue.splice.apply( queue,\n\t\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t\t}\n\t\telem.dequeue();\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.puff = function( o, done ) {\n\t\tvar elem = $( this ),\n\t\t\tmode = $.effects.setMode( elem, o.mode || \"hide\" ),\n\t\t\thide = mode === \"hide\",\n\t\t\tpercent = parseInt( o.percent, 10 ) || 150,\n\t\t\tfactor = percent / 100,\n\t\t\toriginal = {\n\t\t\t\theight: elem.height(),\n\t\t\t\twidth: elem.width(),\n\t\t\t\touterHeight: elem.outerHeight(),\n\t\t\t\touterWidth: elem.outerWidth()\n\t\t\t};\n\t\n\t\t$.extend( o, {\n\t\t\teffect: \"scale\",\n\t\t\tqueue: false,\n\t\t\tfade: true,\n\t\t\tmode: mode,\n\t\t\tcomplete: done,\n\t\t\tpercent: hide ? percent : 100,\n\t\t\tfrom: hide ?\n\t\t\t\toriginal :\n\t\t\t\t{\n\t\t\t\t\theight: original.height * factor,\n\t\t\t\t\twidth: original.width * factor,\n\t\t\t\t\touterHeight: original.outerHeight * factor,\n\t\t\t\t\touterWidth: original.outerWidth * factor\n\t\t\t\t}\n\t\t});\n\t\n\t\telem.effect( o );\n\t};\n\t\n\t$.effects.effect.scale = function( o, done ) {\n\t\n\t\t// Create element\n\t\tvar el = $( this ),\n\t\t\toptions = $.extend( true, {}, o ),\n\t\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\t\tpercent = parseInt( o.percent, 10 ) ||\n\t\t\t\t( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === \"hide\" ? 0 : 100 ) ),\n\t\t\tdirection = o.direction || \"both\",\n\t\t\torigin = o.origin,\n\t\t\toriginal = {\n\t\t\t\theight: el.height(),\n\t\t\t\twidth: el.width(),\n\t\t\t\touterHeight: el.outerHeight(),\n\t\t\t\touterWidth: el.outerWidth()\n\t\t\t},\n\t\t\tfactor = {\n\t\t\t\ty: direction !== \"horizontal\" ? (percent / 100) : 1,\n\t\t\t\tx: direction !== \"vertical\" ? (percent / 100) : 1\n\t\t\t};\n\t\n\t\t// We are going to pass this effect to the size effect:\n\t\toptions.effect = \"size\";\n\t\toptions.queue = false;\n\t\toptions.complete = done;\n\t\n\t\t// Set default origin and restore for show/hide\n\t\tif ( mode !== \"effect\" ) {\n\t\t\toptions.origin = origin || [\"middle\",\"center\"];\n\t\t\toptions.restore = true;\n\t\t}\n\t\n\t\toptions.from = o.from || ( mode === \"show\" ? {\n\t\t\theight: 0,\n\t\t\twidth: 0,\n\t\t\touterHeight: 0,\n\t\t\touterWidth: 0\n\t\t} : original );\n\t\toptions.to = {\n\t\t\theight: original.height * factor.y,\n\t\t\twidth: original.width * factor.x,\n\t\t\touterHeight: original.outerHeight * factor.y,\n\t\t\touterWidth: original.outerWidth * factor.x\n\t\t};\n\t\n\t\t// Fade option to support puff\n\t\tif ( options.fade ) {\n\t\t\tif ( mode === \"show\" ) {\n\t\t\t\toptions.from.opacity = 0;\n\t\t\t\toptions.to.opacity = 1;\n\t\t\t}\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\toptions.from.opacity = 1;\n\t\t\t\toptions.to.opacity = 0;\n\t\t\t}\n\t\t}\n\t\n\t\t// Animate\n\t\tel.effect( options );\n\t\n\t};\n\t\n\t$.effects.effect.size = function( o, done ) {\n\t\n\t\t// Create element\n\t\tvar original, baseline, factor,\n\t\t\tel = $( this ),\n\t\t\tprops0 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\", \"overflow\", \"opacity\" ],\n\t\n\t\t\t// Always restore\n\t\t\tprops1 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"overflow\", \"opacity\" ],\n\t\n\t\t\t// Copy for children\n\t\t\tprops2 = [ \"width\", \"height\", \"overflow\" ],\n\t\t\tcProps = [ \"fontSize\" ],\n\t\t\tvProps = [ \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\" ],\n\t\t\thProps = [ \"borderLeftWidth\", \"borderRightWidth\", \"paddingLeft\", \"paddingRight\" ],\n\t\n\t\t\t// Set options\n\t\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\t\trestore = o.restore || mode !== \"effect\",\n\t\t\tscale = o.scale || \"both\",\n\t\t\torigin = o.origin || [ \"middle\", \"center\" ],\n\t\t\tposition = el.css( \"position\" ),\n\t\t\tprops = restore ? props0 : props1,\n\t\t\tzero = {\n\t\t\t\theight: 0,\n\t\t\t\twidth: 0,\n\t\t\t\touterHeight: 0,\n\t\t\t\touterWidth: 0\n\t\t\t};\n\t\n\t\tif ( mode === \"show\" ) {\n\t\t\tel.show();\n\t\t}\n\t\toriginal = {\n\t\t\theight: el.height(),\n\t\t\twidth: el.width(),\n\t\t\touterHeight: el.outerHeight(),\n\t\t\touterWidth: el.outerWidth()\n\t\t};\n\t\n\t\tif ( o.mode === \"toggle\" && mode === \"show\" ) {\n\t\t\tel.from = o.to || zero;\n\t\t\tel.to = o.from || original;\n\t\t} else {\n\t\t\tel.from = o.from || ( mode === \"show\" ? zero : original );\n\t\t\tel.to = o.to || ( mode === \"hide\" ? zero : original );\n\t\t}\n\t\n\t\t// Set scaling factor\n\t\tfactor = {\n\t\t\tfrom: {\n\t\t\t\ty: el.from.height / original.height,\n\t\t\t\tx: el.from.width / original.width\n\t\t\t},\n\t\t\tto: {\n\t\t\t\ty: el.to.height / original.height,\n\t\t\t\tx: el.to.width / original.width\n\t\t\t}\n\t\t};\n\t\n\t\t// Scale the css box\n\t\tif ( scale === \"box\" || scale === \"both\" ) {\n\t\n\t\t\t// Vertical props scaling\n\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\tprops = props.concat( vProps );\n\t\t\t\tel.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );\n\t\t\t\tel.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );\n\t\t\t}\n\t\n\t\t\t// Horizontal props scaling\n\t\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\t\tprops = props.concat( hProps );\n\t\t\t\tel.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );\n\t\t\t\tel.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );\n\t\t\t}\n\t\t}\n\t\n\t\t// Scale the content\n\t\tif ( scale === \"content\" || scale === \"both\" ) {\n\t\n\t\t\t// Vertical props scaling\n\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\tprops = props.concat( cProps ).concat( props2 );\n\t\t\t\tel.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );\n\t\t\t\tel.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );\n\t\t\t}\n\t\t}\n\t\n\t\t$.effects.save( el, props );\n\t\tel.show();\n\t\t$.effects.createWrapper( el );\n\t\tel.css( \"overflow\", \"hidden\" ).css( el.from );\n\t\n\t\t// Adjust\n\t\tif (origin) { // Calculate baseline shifts\n\t\t\tbaseline = $.effects.getBaseline( origin, original );\n\t\t\tel.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;\n\t\t\tel.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;\n\t\t\tel.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;\n\t\t\tel.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;\n\t\t}\n\t\tel.css( el.from ); // set top & left\n\t\n\t\t// Animate\n\t\tif ( scale === \"content\" || scale === \"both\" ) { // Scale the children\n\t\n\t\t\t// Add margins/font-size\n\t\t\tvProps = vProps.concat([ \"marginTop\", \"marginBottom\" ]).concat(cProps);\n\t\t\thProps = hProps.concat([ \"marginLeft\", \"marginRight\" ]);\n\t\t\tprops2 = props0.concat(vProps).concat(hProps);\n\t\n\t\t\tel.find( \"*[width]\" ).each( function(){\n\t\t\t\tvar child = $( this ),\n\t\t\t\t\tc_original = {\n\t\t\t\t\t\theight: child.height(),\n\t\t\t\t\t\twidth: child.width(),\n\t\t\t\t\t\touterHeight: child.outerHeight(),\n\t\t\t\t\t\touterWidth: child.outerWidth()\n\t\t\t\t\t};\n\t\t\t\tif (restore) {\n\t\t\t\t\t$.effects.save(child, props2);\n\t\t\t\t}\n\t\n\t\t\t\tchild.from = {\n\t\t\t\t\theight: c_original.height * factor.from.y,\n\t\t\t\t\twidth: c_original.width * factor.from.x,\n\t\t\t\t\touterHeight: c_original.outerHeight * factor.from.y,\n\t\t\t\t\touterWidth: c_original.outerWidth * factor.from.x\n\t\t\t\t};\n\t\t\t\tchild.to = {\n\t\t\t\t\theight: c_original.height * factor.to.y,\n\t\t\t\t\twidth: c_original.width * factor.to.x,\n\t\t\t\t\touterHeight: c_original.height * factor.to.y,\n\t\t\t\t\touterWidth: c_original.width * factor.to.x\n\t\t\t\t};\n\t\n\t\t\t\t// Vertical props scaling\n\t\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\t\tchild.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );\n\t\t\t\t\tchild.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );\n\t\t\t\t}\n\t\n\t\t\t\t// Horizontal props scaling\n\t\t\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\t\t\tchild.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );\n\t\t\t\t\tchild.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );\n\t\t\t\t}\n\t\n\t\t\t\t// Animate children\n\t\t\t\tchild.css( child.from );\n\t\t\t\tchild.animate( child.to, o.duration, o.easing, function() {\n\t\n\t\t\t\t\t// Restore children\n\t\t\t\t\tif ( restore ) {\n\t\t\t\t\t\t$.effects.restore( child, props2 );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\t\n\t\t// Animate\n\t\tel.animate( el.to, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( el.to.opacity === 0 ) {\n\t\t\t\t\tel.css( \"opacity\", el.from.opacity );\n\t\t\t\t}\n\t\t\t\tif( mode === \"hide\" ) {\n\t\t\t\t\tel.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( el, props );\n\t\t\t\tif ( !restore ) {\n\t\n\t\t\t\t\t// we need to calculate our new positioning based on the scaling\n\t\t\t\t\tif ( position === \"static\" ) {\n\t\t\t\t\t\tel.css({\n\t\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\t\ttop: el.to.top,\n\t\t\t\t\t\t\tleft: el.to.left\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$.each([ \"top\", \"left\" ], function( idx, pos ) {\n\t\t\t\t\t\t\tel.css( pos, function( _, str ) {\n\t\t\t\t\t\t\t\tvar val = parseInt( str, 10 ),\n\t\t\t\t\t\t\t\t\ttoRef = idx ? el.to.left : el.to.top;\n\t\n\t\t\t\t\t\t\t\t// if original was \"auto\", recalculate the new value from wrapper\n\t\t\t\t\t\t\t\tif ( str === \"auto\" ) {\n\t\t\t\t\t\t\t\t\treturn toRef + \"px\";\n\t\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\t\treturn val + toRef + \"px\";\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t$.effects.removeWrapper( el );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n\t\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.shake = function( o, done ) {\n\t\n\t\tvar el = $( this ),\n\t\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\t\tdirection = o.direction || \"left\",\n\t\t\tdistance = o.distance || 20,\n\t\t\ttimes = o.times || 3,\n\t\t\tanims = times * 2 + 1,\n\t\t\tspeed = Math.round(o.duration/anims),\n\t\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\t\tanimation = {},\n\t\t\tanimation1 = {},\n\t\t\tanimation2 = {},\n\t\t\ti,\n\t\n\t\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\t\tqueue = el.queue(),\n\t\t\tqueuelen = queue.length;\n\t\n\t\t$.effects.save( el, props );\n\t\tel.show();\n\t\t$.effects.createWrapper( el );\n\t\n\t\t// Animation\n\t\tanimation[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance;\n\t\tanimation1[ ref ] = ( positiveMotion ? \"+=\" : \"-=\" ) + distance * 2;\n\t\tanimation2[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance * 2;\n\t\n\t\t// Animate\n\t\tel.animate( animation, speed, o.easing );\n\t\n\t\t// Shakes\n\t\tfor ( i = 1; i < times; i++ ) {\n\t\t\tel.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );\n\t\t}\n\t\tel\n\t\t\t.animate( animation1, speed, o.easing )\n\t\t\t.animate( animation, speed / 2, o.easing )\n\t\t\t.queue(function() {\n\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\tel.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( el, props );\n\t\t\t\t$.effects.removeWrapper( el );\n\t\t\t\tdone();\n\t\t\t});\n\t\n\t\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\t\tif ( queuelen > 1) {\n\t\t\tqueue.splice.apply( queue,\n\t\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t\t}\n\t\tel.dequeue();\n\t\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.slide = function( o, done ) {\n\t\n\t\t// Create element\n\t\tvar el = $( this ),\n\t\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\" ],\n\t\t\tmode = $.effects.setMode( el, o.mode || \"show\" ),\n\t\t\tshow = mode === \"show\",\n\t\t\tdirection = o.direction || \"left\",\n\t\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\t\tdistance,\n\t\t\tanimation = {};\n\t\n\t\t// Adjust\n\t\t$.effects.save( el, props );\n\t\tel.show();\n\t\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true );\n\t\n\t\t$.effects.createWrapper( el ).css({\n\t\t\toverflow: \"hidden\"\n\t\t});\n\t\n\t\tif ( show ) {\n\t\t\tel.css( ref, positiveMotion ? (isNaN(distance) ? \"-\" + distance : -distance) : distance );\n\t\t}\n\t\n\t\t// Animation\n\t\tanimation[ ref ] = ( show ?\n\t\t\t( positiveMotion ? \"+=\" : \"-=\") :\n\t\t\t( positiveMotion ? \"-=\" : \"+=\")) +\n\t\t\tdistance;\n\t\n\t\t// Animate\n\t\tel.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\tel.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( el, props );\n\t\t\t\t$.effects.removeWrapper( el );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.effects.effect.transfer = function( o, done ) {\n\t\tvar elem = $( this ),\n\t\t\ttarget = $( o.to ),\n\t\t\ttargetFixed = target.css( \"position\" ) === \"fixed\",\n\t\t\tbody = $(\"body\"),\n\t\t\tfixTop = targetFixed ? body.scrollTop() : 0,\n\t\t\tfixLeft = targetFixed ? body.scrollLeft() : 0,\n\t\t\tendPosition = target.offset(),\n\t\t\tanimation = {\n\t\t\t\ttop: endPosition.top - fixTop ,\n\t\t\t\tleft: endPosition.left - fixLeft ,\n\t\t\t\theight: target.innerHeight(),\n\t\t\t\twidth: target.innerWidth()\n\t\t\t},\n\t\t\tstartPosition = elem.offset(),\n\t\t\ttransfer = $( \"<div class='ui-effects-transfer'></div>\" )\n\t\t\t\t.appendTo( document.body )\n\t\t\t\t.addClass( o.className )\n\t\t\t\t.css({\n\t\t\t\t\ttop: startPosition.top - fixTop ,\n\t\t\t\t\tleft: startPosition.left - fixLeft ,\n\t\t\t\t\theight: elem.innerHeight(),\n\t\t\t\t\twidth: elem.innerWidth(),\n\t\t\t\t\tposition: targetFixed ? \"fixed\" : \"absolute\"\n\t\t\t\t})\n\t\t\t\t.animate( animation, o.duration, o.easing, function() {\n\t\t\t\t\ttransfer.remove();\n\t\t\t\t\tdone();\n\t\t\t\t});\n\t};\n\t\n\t})(jQuery);\n\t\n\t(function( $, undefined ) {\n\t\n\t$.widget( \"ui.menu\", {\n\t\tversion: \"1.10.3\",\n\t\tdefaultElement: \"<ul>\",\n\t\tdelay: 300,\n\t\toptions: {\n\t\t\ticons: {\n\t\t\t\tsubmenu: \"ui-icon-carat-1-e\"\n\t\t\t},\n\t\t\tmenus: \"ul\",\n\t\t\tposition: {\n\t\t\t\tmy: \"left top\",\n\t\t\t\tat: \"right top\"\n\t\t\t},\n\t\t\trole: \"menu\",\n\t\n\t\t\t// callbacks\n\t\t\tblur: null,\n\t\t\tfocus: null,\n\t\t\tselect: null\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\tthis.activeMenu = this.element;\n\t\t\t// flag used to prevent firing of the click handler\n\t\t\t// as the event bubbles up through nested menus\n\t\t\tthis.mouseHandled = false;\n\t\t\tthis.element\n\t\t\t\t.uniqueId()\n\t\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t\t.toggleClass( \"ui-menu-icons\", !!this.element.find( \".ui-icon\" ).length )\n\t\t\t\t.attr({\n\t\t\t\t\trole: this.options.role,\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t})\n\t\t\t\t// need to catch all clicks on disabled menu\n\t\t\t\t// not possible through _on\n\t\t\t\t.bind( \"click\" + this.eventNamespace, $.proxy(function( event ) {\n\t\t\t\t\tif ( this.options.disabled ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t}, this ));\n\t\n\t\t\tif ( this.options.disabled ) {\n\t\t\t\tthis.element\n\t\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t\t}\n\t\n\t\t\tthis._on({\n\t\t\t\t// Prevent focus from sticking to links inside menu after clicking\n\t\t\t\t// them (focus should always stay on UL during navigation).\n\t\t\t\t\"mousedown .ui-menu-item > a\": function( event ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t},\n\t\t\t\t\"click .ui-state-disabled > a\": function( event ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t},\n\t\t\t\t\"click .ui-menu-item:has(a)\": function( event ) {\n\t\t\t\t\tvar target = $( event.target ).closest( \".ui-menu-item\" );\n\t\t\t\t\tif ( !this.mouseHandled && target.not( \".ui-state-disabled\" ).length ) {\n\t\t\t\t\t\tthis.mouseHandled = true;\n\t\n\t\t\t\t\t\tthis.select( event );\n\t\t\t\t\t\t// Open submenu on click\n\t\t\t\t\t\tif ( target.has( \".ui-menu\" ).length ) {\n\t\t\t\t\t\t\tthis.expand( event );\n\t\t\t\t\t\t} else if ( !this.element.is( \":focus\" ) ) {\n\t\t\t\t\t\t\t// Redirect focus to the menu\n\t\t\t\t\t\t\tthis.element.trigger( \"focus\", [ true ] );\n\t\n\t\t\t\t\t\t\t// If the active item is on the top level, let it stay active.\n\t\t\t\t\t\t\t// Otherwise, blur the active item since it is no longer visible.\n\t\t\t\t\t\t\tif ( this.active && this.active.parents( \".ui-menu\" ).length === 1 ) {\n\t\t\t\t\t\t\t\tclearTimeout( this.timer );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"mouseenter .ui-menu-item\": function( event ) {\n\t\t\t\t\tvar target = $( event.currentTarget );\n\t\t\t\t\t// Remove ui-state-active class from siblings of the newly focused menu item\n\t\t\t\t\t// to avoid a jump caused by adjacent elements both having a class with a border\n\t\t\t\t\ttarget.siblings().children( \".ui-state-active\" ).removeClass( \"ui-state-active\" );\n\t\t\t\t\tthis.focus( event, target );\n\t\t\t\t},\n\t\t\t\tmouseleave: \"collapseAll\",\n\t\t\t\t\"mouseleave .ui-menu\": \"collapseAll\",\n\t\t\t\tfocus: function( event, keepActiveItem ) {\n\t\t\t\t\t// If there's already an active item, keep it active\n\t\t\t\t\t// If not, activate the first item\n\t\t\t\t\tvar item = this.active || this.element.children( \".ui-menu-item\" ).eq( 0 );\n\t\n\t\t\t\t\tif ( !keepActiveItem ) {\n\t\t\t\t\t\tthis.focus( event, item );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tblur: function( event ) {\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tif ( !$.contains( this.element[0], this.document[0].activeElement ) ) {\n\t\t\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t},\n\t\t\t\tkeydown: \"_keydown\"\n\t\t\t});\n\t\n\t\t\tthis.refresh();\n\t\n\t\t\t// Clicks outside of a menu collapse any open menus\n\t\t\tthis._on( this.document, {\n\t\t\t\tclick: function( event ) {\n\t\t\t\t\tif ( !$( event.target ).closest( \".ui-menu\" ).length ) {\n\t\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t\t}\n\t\n\t\t\t\t\t// Reset the mouseHandled flag\n\t\t\t\t\tthis.mouseHandled = false;\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\t// Destroy (sub)menus\n\t\t\tthis.element\n\t\t\t\t.removeAttr( \"aria-activedescendant\" )\n\t\t\t\t.find( \".ui-menu\" ).addBack()\n\t\t\t\t\t.removeClass( \"ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons\" )\n\t\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t\t\t.removeUniqueId()\n\t\t\t\t\t.show();\n\t\n\t\t\t// Destroy menu items\n\t\t\tthis.element.find( \".ui-menu-item\" )\n\t\t\t\t.removeClass( \"ui-menu-item\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t\t.children( \"a\" )\n\t\t\t\t\t.removeUniqueId()\n\t\t\t\t\t.removeClass( \"ui-corner-all ui-state-hover\" )\n\t\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t\t.removeAttr( \"aria-haspopup\" )\n\t\t\t\t\t.children().each( function() {\n\t\t\t\t\t\tvar elem = $( this );\n\t\t\t\t\t\tif ( elem.data( \"ui-menu-submenu-carat\" ) ) {\n\t\t\t\t\t\t\telem.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\n\t\t\t// Destroy menu dividers\n\t\t\tthis.element.find( \".ui-menu-divider\" ).removeClass( \"ui-menu-divider ui-widget-content\" );\n\t\t},\n\t\n\t\t_keydown: function( event ) {\n\t\t\t/*jshint maxcomplexity:20*/\n\t\t\tvar match, prev, character, skip, regex,\n\t\t\t\tpreventDefault = true;\n\t\n\t\t\tfunction escape( value ) {\n\t\t\t\treturn value.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" );\n\t\t\t}\n\t\n\t\t\tswitch ( event.keyCode ) {\n\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tthis.previousPage( event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tthis.nextPage( event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tthis._move( \"first\", \"first\", event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tthis._move( \"last\", \"last\", event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tthis.previous( event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tthis.next( event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\tthis.collapse( event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tthis.expand( event );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.ENTER:\n\t\t\tcase $.ui.keyCode.SPACE:\n\t\t\t\tthis._activate( event );\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\t\tthis.collapse( event );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tpreventDefault = false;\n\t\t\t\tprev = this.previousFilter || \"\";\n\t\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\t\tskip = false;\n\t\n\t\t\t\tclearTimeout( this.filterTimer );\n\t\n\t\t\t\tif ( character === prev ) {\n\t\t\t\t\tskip = true;\n\t\t\t\t} else {\n\t\t\t\t\tcharacter = prev + character;\n\t\t\t\t}\n\t\n\t\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t\t});\n\t\t\t\tmatch = skip && match.index( this.active.next() ) !== -1 ?\n\t\t\t\t\tthis.active.nextAll( \".ui-menu-item\" ) :\n\t\t\t\t\tmatch;\n\t\n\t\t\t\t// If no matches on the current filter, reset to the last character pressed\n\t\t\t\t// to move down the menu to the first item that starts with that character\n\t\t\t\tif ( !match.length ) {\n\t\t\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t\t\t});\n\t\t\t\t}\n\t\n\t\t\t\tif ( match.length ) {\n\t\t\t\t\tthis.focus( event, match );\n\t\t\t\t\tif ( match.length > 1 ) {\n\t\t\t\t\t\tthis.previousFilter = character;\n\t\t\t\t\t\tthis.filterTimer = this._delay(function() {\n\t\t\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t\t\t}, 1000 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( preventDefault ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\n\t\t_activate: function( event ) {\n\t\t\tif ( !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\t\tif ( this.active.children( \"a[aria-haspopup='true']\" ).length ) {\n\t\t\t\t\tthis.expand( event );\n\t\t\t\t} else {\n\t\t\t\t\tthis.select( event );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\trefresh: function() {\n\t\t\tvar menus,\n\t\t\t\ticon = this.options.icons.submenu,\n\t\t\t\tsubmenus = this.element.find( this.options.menus );\n\t\n\t\t\t// Initialize nested menus\n\t\t\tsubmenus.filter( \":not(.ui-menu)\" )\n\t\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t\t.hide()\n\t\t\t\t.attr({\n\t\t\t\t\trole: this.options.role,\n\t\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t\t})\n\t\t\t\t.each(function() {\n\t\t\t\t\tvar menu = $( this ),\n\t\t\t\t\t\titem = menu.prev( \"a\" ),\n\t\t\t\t\t\tsubmenuCarat = $( \"<span>\" )\n\t\t\t\t\t\t\t.addClass( \"ui-menu-icon ui-icon \" + icon )\n\t\t\t\t\t\t\t.data( \"ui-menu-submenu-carat\", true );\n\t\n\t\t\t\t\titem\n\t\t\t\t\t\t.attr( \"aria-haspopup\", \"true\" )\n\t\t\t\t\t\t.prepend( submenuCarat );\n\t\t\t\t\tmenu.attr( \"aria-labelledby\", item.attr( \"id\" ) );\n\t\t\t\t});\n\t\n\t\t\tmenus = submenus.add( this.element );\n\t\n\t\t\t// Don't refresh list items that are already adapted\n\t\t\tmenus.children( \":not(.ui-menu-item):has(a)\" )\n\t\t\t\t.addClass( \"ui-menu-item\" )\n\t\t\t\t.attr( \"role\", \"presentation\" )\n\t\t\t\t.children( \"a\" )\n\t\t\t\t\t.uniqueId()\n\t\t\t\t\t.addClass( \"ui-corner-all\" )\n\t\t\t\t\t.attr({\n\t\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\t\trole: this._itemRole()\n\t\t\t\t\t});\n\t\n\t\t\t// Initialize unlinked menu-items containing spaces and/or dashes only as dividers\n\t\t\tmenus.children( \":not(.ui-menu-item)\" ).each(function() {\n\t\t\t\tvar item = $( this );\n\t\t\t\t// hyphen, em dash, en dash\n\t\t\t\tif ( !/[^\\-\\u2014\\u2013\\s]/.test( item.text() ) ) {\n\t\t\t\t\titem.addClass( \"ui-widget-content ui-menu-divider\" );\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\t// Add aria-disabled attribute to any disabled menu item\n\t\t\tmenus.children( \".ui-state-disabled\" ).attr( \"aria-disabled\", \"true\" );\n\t\n\t\t\t// If the active item has been removed, blur the menu\n\t\t\tif ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t\tthis.blur();\n\t\t\t}\n\t\t},\n\t\n\t\t_itemRole: function() {\n\t\t\treturn {\n\t\t\t\tmenu: \"menuitem\",\n\t\t\t\tlistbox: \"option\"\n\t\t\t}[ this.options.role ];\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"icons\" ) {\n\t\t\t\tthis.element.find( \".ui-menu-icon\" )\n\t\t\t\t\t.removeClass( this.options.icons.submenu )\n\t\t\t\t\t.addClass( value.submenu );\n\t\t\t}\n\t\t\tthis._super( key, value );\n\t\t},\n\t\n\t\tfocus: function( event, item ) {\n\t\t\tvar nested, focused;\n\t\t\tthis.blur( event, event && event.type === \"focus\" );\n\t\n\t\t\tthis._scrollIntoView( item );\n\t\n\t\t\tthis.active = item.first();\n\t\t\tfocused = this.active.children( \"a\" ).addClass( \"ui-state-focus\" );\n\t\t\t// Only update aria-activedescendant if there's a role\n\t\t\t// otherwise we assume focus is managed elsewhere\n\t\t\tif ( this.options.role ) {\n\t\t\t\tthis.element.attr( \"aria-activedescendant\", focused.attr( \"id\" ) );\n\t\t\t}\n\t\n\t\t\t// Highlight active parent menu item, if any\n\t\t\tthis.active\n\t\t\t\t.parent()\n\t\t\t\t.closest( \".ui-menu-item\" )\n\t\t\t\t.children( \"a:first\" )\n\t\t\t\t.addClass( \"ui-state-active\" );\n\t\n\t\t\tif ( event && event.type === \"keydown\" ) {\n\t\t\t\tthis._close();\n\t\t\t} else {\n\t\t\t\tthis.timer = this._delay(function() {\n\t\t\t\t\tthis._close();\n\t\t\t\t}, this.delay );\n\t\t\t}\n\t\n\t\t\tnested = item.children( \".ui-menu\" );\n\t\t\tif ( nested.length && ( /^mouse/.test( event.type ) ) ) {\n\t\t\t\tthis._startOpening(nested);\n\t\t\t}\n\t\t\tthis.activeMenu = item.parent();\n\t\n\t\t\tthis._trigger( \"focus\", event, { item: item } );\n\t\t},\n\t\n\t\t_scrollIntoView: function( item ) {\n\t\t\tvar borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;\n\t\t\tif ( this._hasScroll() ) {\n\t\t\t\tborderTop = parseFloat( $.css( this.activeMenu[0], \"borderTopWidth\" ) ) || 0;\n\t\t\t\tpaddingTop = parseFloat( $.css( this.activeMenu[0], \"paddingTop\" ) ) || 0;\n\t\t\t\toffset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;\n\t\t\t\tscroll = this.activeMenu.scrollTop();\n\t\t\t\telementHeight = this.activeMenu.height();\n\t\t\t\titemHeight = item.height();\n\t\n\t\t\t\tif ( offset < 0 ) {\n\t\t\t\t\tthis.activeMenu.scrollTop( scroll + offset );\n\t\t\t\t} else if ( offset + itemHeight > elementHeight ) {\n\t\t\t\t\tthis.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\tblur: function( event, fromFocus ) {\n\t\t\tif ( !fromFocus ) {\n\t\t\t\tclearTimeout( this.timer );\n\t\t\t}\n\t\n\t\t\tif ( !this.active ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis.active.children( \"a\" ).removeClass( \"ui-state-focus\" );\n\t\t\tthis.active = null;\n\t\n\t\t\tthis._trigger( \"blur\", event, { item: this.active } );\n\t\t},\n\t\n\t\t_startOpening: function( submenu ) {\n\t\t\tclearTimeout( this.timer );\n\t\n\t\t\t// Don't open if already open fixes a Firefox bug that caused a .5 pixel\n\t\t\t// shift in the submenu position when mousing over the carat icon\n\t\t\tif ( submenu.attr( \"aria-hidden\" ) !== \"true\" ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis.timer = this._delay(function() {\n\t\t\t\tthis._close();\n\t\t\t\tthis._open( submenu );\n\t\t\t}, this.delay );\n\t\t},\n\t\n\t\t_open: function( submenu ) {\n\t\t\tvar position = $.extend({\n\t\t\t\tof: this.active\n\t\t\t}, this.options.position );\n\t\n\t\t\tclearTimeout( this.timer );\n\t\t\tthis.element.find( \".ui-menu\" ).not( submenu.parents( \".ui-menu\" ) )\n\t\t\t\t.hide()\n\t\t\t\t.attr( \"aria-hidden\", \"true\" );\n\t\n\t\t\tsubmenu\n\t\t\t\t.show()\n\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t.attr( \"aria-expanded\", \"true\" )\n\t\t\t\t.position( position );\n\t\t},\n\t\n\t\tcollapseAll: function( event, all ) {\n\t\t\tclearTimeout( this.timer );\n\t\t\tthis.timer = this._delay(function() {\n\t\t\t\t// If we were passed an event, look for the submenu that contains the event\n\t\t\t\tvar currentMenu = all ? this.element :\n\t\t\t\t\t$( event && event.target ).closest( this.element.find( \".ui-menu\" ) );\n\t\n\t\t\t\t// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway\n\t\t\t\tif ( !currentMenu.length ) {\n\t\t\t\t\tcurrentMenu = this.element;\n\t\t\t\t}\n\t\n\t\t\t\tthis._close( currentMenu );\n\t\n\t\t\t\tthis.blur( event );\n\t\t\t\tthis.activeMenu = currentMenu;\n\t\t\t}, this.delay );\n\t\t},\n\t\n\t\t// With no arguments, closes the currently active menu - if nothing is active\n\t\t// it closes all menus.  If passed an argument, it will search for menus BELOW\n\t\t_close: function( startMenu ) {\n\t\t\tif ( !startMenu ) {\n\t\t\t\tstartMenu = this.active ? this.active.parent() : this.element;\n\t\t\t}\n\t\n\t\t\tstartMenu\n\t\t\t\t.find( \".ui-menu\" )\n\t\t\t\t\t.hide()\n\t\t\t\t\t.attr( \"aria-hidden\", \"true\" )\n\t\t\t\t\t.attr( \"aria-expanded\", \"false\" )\n\t\t\t\t.end()\n\t\t\t\t.find( \"a.ui-state-active\" )\n\t\t\t\t\t.removeClass( \"ui-state-active\" );\n\t\t},\n\t\n\t\tcollapse: function( event ) {\n\t\t\tvar newItem = this.active &&\n\t\t\t\tthis.active.parent().closest( \".ui-menu-item\", this.element );\n\t\t\tif ( newItem && newItem.length ) {\n\t\t\t\tthis._close();\n\t\t\t\tthis.focus( event, newItem );\n\t\t\t}\n\t\t},\n\t\n\t\texpand: function( event ) {\n\t\t\tvar newItem = this.active &&\n\t\t\t\tthis.active\n\t\t\t\t\t.children( \".ui-menu \" )\n\t\t\t\t\t.children( \".ui-menu-item\" )\n\t\t\t\t\t.first();\n\t\n\t\t\tif ( newItem && newItem.length ) {\n\t\t\t\tthis._open( newItem.parent() );\n\t\n\t\t\t\t// Delay so Firefox will not hide activedescendant change in expanding submenu from AT\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tthis.focus( event, newItem );\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\n\t\tnext: function( event ) {\n\t\t\tthis._move( \"next\", \"first\", event );\n\t\t},\n\t\n\t\tprevious: function( event ) {\n\t\t\tthis._move( \"prev\", \"last\", event );\n\t\t},\n\t\n\t\tisFirstItem: function() {\n\t\t\treturn this.active && !this.active.prevAll( \".ui-menu-item\" ).length;\n\t\t},\n\t\n\t\tisLastItem: function() {\n\t\t\treturn this.active && !this.active.nextAll( \".ui-menu-item\" ).length;\n\t\t},\n\t\n\t\t_move: function( direction, filter, event ) {\n\t\t\tvar next;\n\t\t\tif ( this.active ) {\n\t\t\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\t\t\tnext = this.active\n\t\t\t\t\t\t[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( \".ui-menu-item\" )\n\t\t\t\t\t\t.eq( -1 );\n\t\t\t\t} else {\n\t\t\t\t\tnext = this.active\n\t\t\t\t\t\t[ direction + \"All\" ]( \".ui-menu-item\" )\n\t\t\t\t\t\t.eq( 0 );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !next || !next.length || !this.active ) {\n\t\t\t\tnext = this.activeMenu.children( \".ui-menu-item\" )[ filter ]();\n\t\t\t}\n\t\n\t\t\tthis.focus( event, next );\n\t\t},\n\t\n\t\tnextPage: function( event ) {\n\t\t\tvar item, base, height;\n\t\n\t\t\tif ( !this.active ) {\n\t\t\t\tthis.next( event );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.isLastItem() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this._hasScroll() ) {\n\t\t\t\tbase = this.active.offset().top;\n\t\t\t\theight = this.element.height();\n\t\t\t\tthis.active.nextAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\t\titem = $( this );\n\t\t\t\t\treturn item.offset().top - base - height < 0;\n\t\t\t\t});\n\t\n\t\t\t\tthis.focus( event, item );\n\t\t\t} else {\n\t\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" )\n\t\t\t\t\t[ !this.active ? \"first\" : \"last\" ]() );\n\t\t\t}\n\t\t},\n\t\n\t\tpreviousPage: function( event ) {\n\t\t\tvar item, base, height;\n\t\t\tif ( !this.active ) {\n\t\t\t\tthis.next( event );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this.isFirstItem() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( this._hasScroll() ) {\n\t\t\t\tbase = this.active.offset().top;\n\t\t\t\theight = this.element.height();\n\t\t\t\tthis.active.prevAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\t\titem = $( this );\n\t\t\t\t\treturn item.offset().top - base + height > 0;\n\t\t\t\t});\n\t\n\t\t\t\tthis.focus( event, item );\n\t\t\t} else {\n\t\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" ).first() );\n\t\t\t}\n\t\t},\n\t\n\t\t_hasScroll: function() {\n\t\t\treturn this.element.outerHeight() < this.element.prop( \"scrollHeight\" );\n\t\t},\n\t\n\t\tselect: function( event ) {\n\t\t\t// TODO: It should never be possible to not have an active item at this\n\t\t\t// point, but the tests don't trigger mouseenter before click.\n\t\t\tthis.active = this.active || $( event.target ).closest( \".ui-menu-item\" );\n\t\t\tvar ui = { item: this.active };\n\t\t\tif ( !this.active.has( \".ui-menu\" ).length ) {\n\t\t\t\tthis.collapseAll( event, true );\n\t\t\t}\n\t\t\tthis._trigger( \"select\", event, ui );\n\t\t}\n\t});\n\t\n\t}( jQuery ));\n\t\n\t(function( $, undefined ) {\n\t\n\t$.ui = $.ui || {};\n\t\n\tvar cachedScrollbarWidth,\n\t\tmax = Math.max,\n\t\tabs = Math.abs,\n\t\tround = Math.round,\n\t\trhorizontal = /left|center|right/,\n\t\trvertical = /top|center|bottom/,\n\t\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\t\trposition = /^\\w+/,\n\t\trpercent = /%$/,\n\t\t_position = $.fn.position;\n\t\n\tfunction getOffsets( offsets, width, height ) {\n\t\treturn [\n\t\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t\t];\n\t}\n\t\n\tfunction parseCss( element, property ) {\n\t\treturn parseInt( $.css( element, property ), 10 ) || 0;\n\t}\n\t\n\tfunction getDimensions( elem ) {\n\t\tvar raw = elem[0];\n\t\tif ( raw.nodeType === 9 ) {\n\t\t\treturn {\n\t\t\t\twidth: elem.width(),\n\t\t\t\theight: elem.height(),\n\t\t\t\toffset: { top: 0, left: 0 }\n\t\t\t};\n\t\t}\n\t\tif ( $.isWindow( raw ) ) {\n\t\t\treturn {\n\t\t\t\twidth: elem.width(),\n\t\t\t\theight: elem.height(),\n\t\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t\t};\n\t\t}\n\t\tif ( raw.preventDefault ) {\n\t\t\treturn {\n\t\t\t\twidth: 0,\n\t\t\t\theight: 0,\n\t\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t\t};\n\t\t}\n\t\treturn {\n\t\t\twidth: elem.outerWidth(),\n\t\t\theight: elem.outerHeight(),\n\t\t\toffset: elem.offset()\n\t\t};\n\t}\n\t\n\t$.position = {\n\t\tscrollbarWidth: function() {\n\t\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\t\treturn cachedScrollbarWidth;\n\t\t\t}\n\t\t\tvar w1, w2,\n\t\t\t\tdiv = $( \"<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\" ),\n\t\t\t\tinnerDiv = div.children()[0];\n\t\n\t\t\t$( \"body\" ).append( div );\n\t\t\tw1 = innerDiv.offsetWidth;\n\t\t\tdiv.css( \"overflow\", \"scroll\" );\n\t\n\t\t\tw2 = innerDiv.offsetWidth;\n\t\n\t\t\tif ( w1 === w2 ) {\n\t\t\t\tw2 = div[0].clientWidth;\n\t\t\t}\n\t\n\t\t\tdiv.remove();\n\t\n\t\t\treturn (cachedScrollbarWidth = w1 - w2);\n\t\t},\n\t\tgetScrollInfo: function( within ) {\n\t\t\tvar overflowX = within.isWindow ? \"\" : within.element.css( \"overflow-x\" ),\n\t\t\t\toverflowY = within.isWindow ? \"\" : within.element.css( \"overflow-y\" ),\n\t\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t\t( overflowX === \"auto\" && within.width < within.element[0].scrollWidth ),\n\t\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t\t( overflowY === \"auto\" && within.height < within.element[0].scrollHeight );\n\t\t\treturn {\n\t\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t\t};\n\t\t},\n\t\tgetWithinInfo: function( element ) {\n\t\t\tvar withinElement = $( element || window ),\n\t\t\t\tisWindow = $.isWindow( withinElement[0] );\n\t\t\treturn {\n\t\t\t\telement: withinElement,\n\t\t\t\tisWindow: isWindow,\n\t\t\t\toffset: withinElement.offset() || { left: 0, top: 0 },\n\t\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\t\twidth: isWindow ? withinElement.width() : withinElement.outerWidth(),\n\t\t\t\theight: isWindow ? withinElement.height() : withinElement.outerHeight()\n\t\t\t};\n\t\t}\n\t};\n\t\n\t$.fn.position = function( options ) {\n\t\tif ( !options || !options.of ) {\n\t\t\treturn _position.apply( this, arguments );\n\t\t}\n\t\n\t\t// make a copy, we don't want to modify arguments\n\t\toptions = $.extend( {}, options );\n\t\n\t\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\t\t\ttarget = $( options.of ),\n\t\t\twithin = $.position.getWithinInfo( options.within ),\n\t\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\t\toffsets = {};\n\t\n\t\tdimensions = getDimensions( target );\n\t\tif ( target[0].preventDefault ) {\n\t\t\t// force left top to allow flipping\n\t\t\toptions.at = \"left top\";\n\t\t}\n\t\ttargetWidth = dimensions.width;\n\t\ttargetHeight = dimensions.height;\n\t\ttargetOffset = dimensions.offset;\n\t\t// clone to reuse original targetOffset later\n\t\tbasePosition = $.extend( {}, targetOffset );\n\t\n\t\t// force my and at to have valid horizontal and vertical positions\n\t\t// if a value is missing or invalid, it will be converted to center\n\t\t$.each( [ \"my\", \"at\" ], function() {\n\t\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\t\thorizontalOffset,\n\t\t\t\tverticalOffset;\n\t\n\t\t\tif ( pos.length === 1) {\n\t\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t\t}\n\t\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\t\n\t\t\t// calculate offsets\n\t\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\t\toffsets[ this ] = [\n\t\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t\t];\n\t\n\t\t\t// reduce to just the positions without the offsets\n\t\t\toptions[ this ] = [\n\t\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t\t];\n\t\t});\n\t\n\t\t// normalize collision option\n\t\tif ( collision.length === 1 ) {\n\t\t\tcollision[ 1 ] = collision[ 0 ];\n\t\t}\n\t\n\t\tif ( options.at[ 0 ] === \"right\" ) {\n\t\t\tbasePosition.left += targetWidth;\n\t\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\t\tbasePosition.left += targetWidth / 2;\n\t\t}\n\t\n\t\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\t\tbasePosition.top += targetHeight;\n\t\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\t\tbasePosition.top += targetHeight / 2;\n\t\t}\n\t\n\t\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\t\tbasePosition.left += atOffset[ 0 ];\n\t\tbasePosition.top += atOffset[ 1 ];\n\t\n\t\treturn this.each(function() {\n\t\t\tvar collisionPosition, using,\n\t\t\t\telem = $( this ),\n\t\t\t\telemWidth = elem.outerWidth(),\n\t\t\t\telemHeight = elem.outerHeight(),\n\t\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) + scrollInfo.width,\n\t\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) + scrollInfo.height,\n\t\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\t\n\t\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\t\tposition.left -= elemWidth;\n\t\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\t\tposition.left -= elemWidth / 2;\n\t\t\t}\n\t\n\t\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\t\tposition.top -= elemHeight;\n\t\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\t\tposition.top -= elemHeight / 2;\n\t\t\t}\n\t\n\t\t\tposition.left += myOffset[ 0 ];\n\t\t\tposition.top += myOffset[ 1 ];\n\t\n\t\t\t// if the browser doesn't support fractions, then round for consistent results\n\t\t\tif ( !$.support.offsetFractions ) {\n\t\t\t\tposition.left = round( position.left );\n\t\t\t\tposition.top = round( position.top );\n\t\t\t}\n\t\n\t\t\tcollisionPosition = {\n\t\t\t\tmarginLeft: marginLeft,\n\t\t\t\tmarginTop: marginTop\n\t\t\t};\n\t\n\t\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\t\tmy: options.my,\n\t\t\t\t\t\tat: options.at,\n\t\t\t\t\t\twithin: within,\n\t\t\t\t\t\telem : elem\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tif ( options.using ) {\n\t\t\t\t// adds feedback as second argument to using callback, if present\n\t\t\t\tusing = function( props ) {\n\t\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\t\tfeedback = {\n\t\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t\t};\n\t\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t\t}\n\t\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t\t}\n\t\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t\t}\n\t\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t\t};\n\t\t\t}\n\t\n\t\t\telem.offset( $.extend( position, { using: using } ) );\n\t\t});\n\t};\n\t\n\t$.ui.position = {\n\t\tfit: {\n\t\t\tleft: function( position, data ) {\n\t\t\t\tvar within = data.within,\n\t\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\t\touterWidth = within.width,\n\t\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\t\tnewOverRight;\n\t\n\t\t\t\t// element is wider than within\n\t\t\t\tif ( data.collisionWidth > outerWidth ) {\n\t\t\t\t\t// element is initially over the left side of within\n\t\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\t\t\tposition.left += overLeft - newOverRight;\n\t\t\t\t\t// element is initially over right side of within\n\t\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t// element is initially over both left and right sides of within\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t// too far left -> align with left edge\n\t\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\t\tposition.left += overLeft;\n\t\t\t\t// too far right -> align with right edge\n\t\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\t\tposition.left -= overRight;\n\t\t\t\t// adjust based on position and margin\n\t\t\t\t} else {\n\t\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t\t}\n\t\t\t},\n\t\t\ttop: function( position, data ) {\n\t\t\t\tvar within = data.within,\n\t\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\t\touterHeight = data.within.height,\n\t\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\t\tnewOverBottom;\n\t\n\t\t\t\t// element is taller than within\n\t\t\t\tif ( data.collisionHeight > outerHeight ) {\n\t\t\t\t\t// element is initially over the top of within\n\t\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\t\t\tposition.top += overTop - newOverBottom;\n\t\t\t\t\t// element is initially over bottom of within\n\t\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t// element is initially over both top and bottom of within\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t// too far up -> align with top\n\t\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\t\tposition.top += overTop;\n\t\t\t\t// too far down -> align with bottom edge\n\t\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\t\tposition.top -= overBottom;\n\t\t\t\t// adjust based on position and margin\n\t\t\t\t} else {\n\t\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tflip: {\n\t\t\tleft: function( position, data ) {\n\t\t\t\tvar within = data.within,\n\t\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\t\touterWidth = within.width,\n\t\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t\t0,\n\t\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t\t0,\n\t\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\t\tnewOverRight,\n\t\t\t\t\tnewOverLeft;\n\t\n\t\t\t\tif ( overLeft < 0 ) {\n\t\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( overRight > 0 ) {\n\t\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;\n\t\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\ttop: function( position, data ) {\n\t\t\t\tvar within = data.within,\n\t\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\t\touterHeight = within.height,\n\t\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\t\tmyOffset = top ?\n\t\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t\t0,\n\t\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t\t0,\n\t\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\t\tnewOverTop,\n\t\t\t\t\tnewOverBottom;\n\t\t\t\tif ( overTop < 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {\n\t\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ( overBottom > 0 ) {\n\t\t\t\t\tnewOverTop = position.top -  data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;\n\t\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {\n\t\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tflipfit: {\n\t\t\tleft: function() {\n\t\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t\t},\n\t\t\ttop: function() {\n\t\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t\t}\n\t\t}\n\t};\n\t\n\t// fraction support test\n\t(function () {\n\t\tvar testElement, testElementParent, testElementStyle, offsetLeft, i,\n\t\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ],\n\t\t\tdiv = document.createElement( \"div\" );\n\t\n\t\t//Create a \"fake body\" for testing based on method used in jQuery.support\n\t\ttestElement = document.createElement( body ? \"div\" : \"body\" );\n\t\ttestElementStyle = {\n\t\t\tvisibility: \"hidden\",\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\tborder: 0,\n\t\t\tmargin: 0,\n\t\t\tbackground: \"none\"\n\t\t};\n\t\tif ( body ) {\n\t\t\t$.extend( testElementStyle, {\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: \"-1000px\",\n\t\t\t\ttop: \"-1000px\"\n\t\t\t});\n\t\t}\n\t\tfor ( i in testElementStyle ) {\n\t\t\ttestElement.style[ i ] = testElementStyle[ i ];\n\t\t}\n\t\ttestElement.appendChild( div );\n\t\ttestElementParent = body || document.documentElement;\n\t\ttestElementParent.insertBefore( testElement, testElementParent.firstChild );\n\t\n\t\tdiv.style.cssText = \"position: absolute; left: 10.7432222px;\";\n\t\n\t\toffsetLeft = $( div ).offset().left;\n\t\t$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;\n\t\n\t\ttestElement.innerHTML = \"\";\n\t\ttestElementParent.removeChild( testElement );\n\t})();\n\t\n\t}( jQuery ) );\n\t\n\t(function( $, undefined ) {\n\t\n\t$.widget( \"ui.progressbar\", {\n\t\tversion: \"1.10.3\",\n\t\toptions: {\n\t\t\tmax: 100,\n\t\t\tvalue: 0,\n\t\n\t\t\tchange: null,\n\t\t\tcomplete: null\n\t\t},\n\t\n\t\tmin: 0,\n\t\n\t\t_create: function() {\n\t\t\t// Constrain initial value\n\t\t\tthis.oldValue = this.options.value = this._constrainedValue();\n\t\n\t\t\tthis.element\n\t\t\t\t.addClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t\t.attr({\n\t\t\t\t\t// Only set static values, aria-valuenow and aria-valuemax are\n\t\t\t\t\t// set inside _refreshValue()\n\t\t\t\t\trole: \"progressbar\",\n\t\t\t\t\t\"aria-valuemin\": this.min\n\t\t\t\t});\n\t\n\t\t\tthis.valueDiv = $( \"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>\" )\n\t\t\t\t.appendTo( this.element );\n\t\n\t\t\tthis._refreshValue();\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.element\n\t\t\t\t.removeClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t\t.removeAttr( \"aria-valuenow\" );\n\t\n\t\t\tthis.valueDiv.remove();\n\t\t},\n\t\n\t\tvalue: function( newValue ) {\n\t\t\tif ( newValue === undefined ) {\n\t\t\t\treturn this.options.value;\n\t\t\t}\n\t\n\t\t\tthis.options.value = this._constrainedValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t},\n\t\n\t\t_constrainedValue: function( newValue ) {\n\t\t\tif ( newValue === undefined ) {\n\t\t\t\tnewValue = this.options.value;\n\t\t\t}\n\t\n\t\t\tthis.indeterminate = newValue === false;\n\t\n\t\t\t// sanitize value\n\t\t\tif ( typeof newValue !== \"number\" ) {\n\t\t\t\tnewValue = 0;\n\t\t\t}\n\t\n\t\t\treturn this.indeterminate ? false :\n\t\t\t\tMath.min( this.options.max, Math.max( this.min, newValue ) );\n\t\t},\n\t\n\t\t_setOptions: function( options ) {\n\t\t\t// Ensure \"value\" option is set after other values (like max)\n\t\t\tvar value = options.value;\n\t\t\tdelete options.value;\n\t\n\t\t\tthis._super( options );\n\t\n\t\t\tthis.options.value = this._constrainedValue( value );\n\t\t\tthis._refreshValue();\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"max\" ) {\n\t\t\t\t// Don't allow a max less than min\n\t\t\t\tvalue = Math.max( this.min, value );\n\t\t\t}\n\t\n\t\t\tthis._super( key, value );\n\t\t},\n\t\n\t\t_percentage: function() {\n\t\t\treturn this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );\n\t\t},\n\t\n\t\t_refreshValue: function() {\n\t\t\tvar value = this.options.value,\n\t\t\t\tpercentage = this._percentage();\n\t\n\t\t\tthis.valueDiv\n\t\t\t\t.toggle( this.indeterminate || value > this.min )\n\t\t\t\t.toggleClass( \"ui-corner-right\", value === this.options.max )\n\t\t\t\t.width( percentage.toFixed(0) + \"%\" );\n\t\n\t\t\tthis.element.toggleClass( \"ui-progressbar-indeterminate\", this.indeterminate );\n\t\n\t\t\tif ( this.indeterminate ) {\n\t\t\t\tthis.element.removeAttr( \"aria-valuenow\" );\n\t\t\t\tif ( !this.overlayDiv ) {\n\t\t\t\t\tthis.overlayDiv = $( \"<div class='ui-progressbar-overlay'></div>\" ).appendTo( this.valueDiv );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthis.element.attr({\n\t\t\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t\t\t\"aria-valuenow\": value\n\t\t\t\t});\n\t\t\t\tif ( this.overlayDiv ) {\n\t\t\t\t\tthis.overlayDiv.remove();\n\t\t\t\t\tthis.overlayDiv = null;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( this.oldValue !== value ) {\n\t\t\t\tthis.oldValue = value;\n\t\t\t\tthis._trigger( \"change\" );\n\t\t\t}\n\t\t\tif ( value === this.options.max ) {\n\t\t\t\tthis._trigger( \"complete\" );\n\t\t\t}\n\t\t}\n\t});\n\t\n\t})( jQuery );\n\t\n\t(function( $, undefined ) {\n\t\n\t// number of pages in a slider\n\t// (how many times can you page up/down to go through the whole range)\n\tvar numPages = 5;\n\t\n\t$.widget( \"ui.slider\", $.ui.mouse, {\n\t\tversion: \"1.10.3\",\n\t\twidgetEventPrefix: \"slide\",\n\t\n\t\toptions: {\n\t\t\tanimate: false,\n\t\t\tdistance: 0,\n\t\t\tmax: 100,\n\t\t\tmin: 0,\n\t\t\torientation: \"horizontal\",\n\t\t\trange: false,\n\t\t\tstep: 1,\n\t\t\tvalue: 0,\n\t\t\tvalues: null,\n\t\n\t\t\t// callbacks\n\t\t\tchange: null,\n\t\t\tslide: null,\n\t\t\tstart: null,\n\t\t\tstop: null\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\tthis._keySliding = false;\n\t\t\tthis._mouseSliding = false;\n\t\t\tthis._animateOff = true;\n\t\t\tthis._handleIndex = null;\n\t\t\tthis._detectOrientation();\n\t\t\tthis._mouseInit();\n\t\n\t\t\tthis.element\n\t\t\t\t.addClass( \"ui-slider\" +\n\t\t\t\t\t\" ui-slider-\" + this.orientation +\n\t\t\t\t\t\" ui-widget\" +\n\t\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\t\" ui-corner-all\");\n\t\n\t\t\tthis._refresh();\n\t\t\tthis._setOption( \"disabled\", this.options.disabled );\n\t\n\t\t\tthis._animateOff = false;\n\t\t},\n\t\n\t\t_refresh: function() {\n\t\t\tthis._createRange();\n\t\t\tthis._createHandles();\n\t\t\tthis._setupEvents();\n\t\t\tthis._refreshValue();\n\t\t},\n\t\n\t\t_createHandles: function() {\n\t\t\tvar i, handleCount,\n\t\t\t\toptions = this.options,\n\t\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ).addClass( \"ui-state-default ui-corner-all\" ),\n\t\t\t\thandle = \"<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>\",\n\t\t\t\thandles = [];\n\t\n\t\t\thandleCount = ( options.values && options.values.length ) || 1;\n\t\n\t\t\tif ( existingHandles.length > handleCount ) {\n\t\t\t\texistingHandles.slice( handleCount ).remove();\n\t\t\t\texistingHandles = existingHandles.slice( 0, handleCount );\n\t\t\t}\n\t\n\t\t\tfor ( i = existingHandles.length; i < handleCount; i++ ) {\n\t\t\t\thandles.push( handle );\n\t\t\t}\n\t\n\t\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( this.element ) );\n\t\n\t\t\tthis.handle = this.handles.eq( 0 );\n\t\n\t\t\tthis.handles.each(function( i ) {\n\t\t\t\t$( this ).data( \"ui-slider-handle-index\", i );\n\t\t\t});\n\t\t},\n\t\n\t\t_createRange: function() {\n\t\t\tvar options = this.options,\n\t\t\t\tclasses = \"\";\n\t\n\t\t\tif ( options.range ) {\n\t\t\t\tif ( options.range === true ) {\n\t\t\t\t\tif ( !options.values ) {\n\t\t\t\t\t\toptions.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t\t} else if ( options.values.length && options.values.length !== 2 ) {\n\t\t\t\t\t\toptions.values = [ options.values[0], options.values[0] ];\n\t\t\t\t\t} else if ( $.isArray( options.values ) ) {\n\t\t\t\t\t\toptions.values = options.values.slice(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\tif ( !this.range || !this.range.length ) {\n\t\t\t\t\tthis.range = $( \"<div></div>\" )\n\t\t\t\t\t\t.appendTo( this.element );\n\t\n\t\t\t\t\tclasses = \"ui-slider-range\" +\n\t\t\t\t\t// note: this isn't the most fittingly semantic framework class for this element,\n\t\t\t\t\t// but worked best visually with a variety of themes\n\t\t\t\t\t\" ui-widget-header ui-corner-all\";\n\t\t\t\t} else {\n\t\t\t\t\tthis.range.removeClass( \"ui-slider-range-min ui-slider-range-max\" )\n\t\t\t\t\t\t// Handle range switching from true to min/max\n\t\t\t\t\t\t.css({\n\t\t\t\t\t\t\t\"left\": \"\",\n\t\t\t\t\t\t\t\"bottom\": \"\"\n\t\t\t\t\t\t});\n\t\t\t\t}\n\t\n\t\t\t\tthis.range.addClass( classes +\n\t\t\t\t\t( ( options.range === \"min\" || options.range === \"max\" ) ? \" ui-slider-range-\" + options.range : \"\" ) );\n\t\t\t} else {\n\t\t\t\tthis.range = $([]);\n\t\t\t}\n\t\t},\n\t\n\t\t_setupEvents: function() {\n\t\t\tvar elements = this.handles.add( this.range ).filter( \"a\" );\n\t\t\tthis._off( elements );\n\t\t\tthis._on( elements, this._handleEvents );\n\t\t\tthis._hoverable( elements );\n\t\t\tthis._focusable( elements );\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.handles.remove();\n\t\t\tthis.range.remove();\n\t\n\t\t\tthis.element\n\t\t\t\t.removeClass( \"ui-slider\" +\n\t\t\t\t\t\" ui-slider-horizontal\" +\n\t\t\t\t\t\" ui-slider-vertical\" +\n\t\t\t\t\t\" ui-widget\" +\n\t\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\t\" ui-corner-all\" );\n\t\n\t\t\tthis._mouseDestroy();\n\t\t},\n\t\n\t\t_mouseCapture: function( event ) {\n\t\t\tvar position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,\n\t\t\t\tthat = this,\n\t\t\t\to = this.options;\n\t\n\t\t\tif ( o.disabled ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tthis.elementSize = {\n\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\theight: this.element.outerHeight()\n\t\t\t};\n\t\t\tthis.elementOffset = this.element.offset();\n\t\n\t\t\tposition = { x: event.pageX, y: event.pageY };\n\t\t\tnormValue = this._normValueFromMouse( position );\n\t\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\t\tthis.handles.each(function( i ) {\n\t\t\t\tvar thisDistance = Math.abs( normValue - that.values(i) );\n\t\t\t\tif (( distance > thisDistance ) ||\n\t\t\t\t\t( distance === thisDistance &&\n\t\t\t\t\t\t(i === that._lastChangedValue || that.values(i) === o.min ))) {\n\t\t\t\t\tdistance = thisDistance;\n\t\t\t\t\tclosestHandle = $( this );\n\t\t\t\t\tindex = i;\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tallowed = this._start( event, index );\n\t\t\tif ( allowed === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis._mouseSliding = true;\n\t\n\t\t\tthis._handleIndex = index;\n\t\n\t\t\tclosestHandle\n\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t.focus();\n\t\n\t\t\toffset = closestHandle.offset();\n\t\t\tmouseOverHandle = !$( event.target ).parents().addBack().is( \".ui-slider-handle\" );\n\t\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t\t( parseInt( closestHandle.css(\"borderTopWidth\"), 10 ) || 0 ) -\n\t\t\t\t\t( parseInt( closestHandle.css(\"borderBottomWidth\"), 10 ) || 0) +\n\t\t\t\t\t( parseInt( closestHandle.css(\"marginTop\"), 10 ) || 0)\n\t\t\t};\n\t\n\t\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\t\tthis._slide( event, index, normValue );\n\t\t\t}\n\t\t\tthis._animateOff = true;\n\t\t\treturn true;\n\t\t},\n\t\n\t\t_mouseStart: function() {\n\t\t\treturn true;\n\t\t},\n\t\n\t\t_mouseDrag: function( event ) {\n\t\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\t\tnormValue = this._normValueFromMouse( position );\n\t\n\t\t\tthis._slide( event, this._handleIndex, normValue );\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_mouseStop: function( event ) {\n\t\t\tthis.handles.removeClass( \"ui-state-active\" );\n\t\t\tthis._mouseSliding = false;\n\t\n\t\t\tthis._stop( event, this._handleIndex );\n\t\t\tthis._change( event, this._handleIndex );\n\t\n\t\t\tthis._handleIndex = null;\n\t\t\tthis._clickOffset = null;\n\t\t\tthis._animateOff = false;\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_detectOrientation: function() {\n\t\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t\t},\n\t\n\t\t_normValueFromMouse: function( position ) {\n\t\t\tvar pixelTotal,\n\t\t\t\tpixelMouse,\n\t\t\t\tpercentMouse,\n\t\t\t\tvalueTotal,\n\t\t\t\tvalueMouse;\n\t\n\t\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\t\tpixelTotal = this.elementSize.width;\n\t\t\t\tpixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t\t} else {\n\t\t\t\tpixelTotal = this.elementSize.height;\n\t\t\t\tpixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t\t}\n\t\n\t\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\t\tif ( percentMouse > 1 ) {\n\t\t\t\tpercentMouse = 1;\n\t\t\t}\n\t\t\tif ( percentMouse < 0 ) {\n\t\t\t\tpercentMouse = 0;\n\t\t\t}\n\t\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\t\tpercentMouse = 1 - percentMouse;\n\t\t\t}\n\t\n\t\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\t\n\t\t\treturn this._trimAlignValue( valueMouse );\n\t\t},\n\t\n\t\t_start: function( event, index ) {\n\t\t\tvar uiHash = {\n\t\t\t\thandle: this.handles[ index ],\n\t\t\t\tvalue: this.value()\n\t\t\t};\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\tuiHash.values = this.values();\n\t\t\t}\n\t\t\treturn this._trigger( \"start\", event, uiHash );\n\t\t},\n\t\n\t\t_slide: function( event, index, newVal ) {\n\t\t\tvar otherVal,\n\t\t\t\tnewValues,\n\t\t\t\tallowed;\n\t\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\n\t\t\t\tif ( ( this.options.values.length === 2 && this.options.range === true ) &&\n\t\t\t\t\t\t( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )\n\t\t\t\t\t) {\n\t\t\t\t\tnewVal = otherVal;\n\t\t\t\t}\n\t\n\t\t\t\tif ( newVal !== this.values( index ) ) {\n\t\t\t\t\tnewValues = this.values();\n\t\t\t\t\tnewValues[ index ] = newVal;\n\t\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\t\tvalue: newVal,\n\t\t\t\t\t\tvalues: newValues\n\t\t\t\t\t} );\n\t\t\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\t\tthis.values( index, newVal, true );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( newVal !== this.value() ) {\n\t\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\t\tvalue: newVal\n\t\t\t\t\t} );\n\t\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\t\tthis.value( newVal );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t_stop: function( event, index ) {\n\t\t\tvar uiHash = {\n\t\t\t\thandle: this.handles[ index ],\n\t\t\t\tvalue: this.value()\n\t\t\t};\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\tuiHash.values = this.values();\n\t\t\t}\n\t\n\t\t\tthis._trigger( \"stop\", event, uiHash );\n\t\t},\n\t\n\t\t_change: function( event, index ) {\n\t\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\t\t\t\tvar uiHash = {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: this.value()\n\t\t\t\t};\n\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\t\tuiHash.values = this.values();\n\t\t\t\t}\n\t\n\t\t\t\t//store the last changed value index for reference when handles overlap\n\t\t\t\tthis._lastChangedValue = index;\n\t\n\t\t\t\tthis._trigger( \"change\", event, uiHash );\n\t\t\t}\n\t\t},\n\t\n\t\tvalue: function( newValue ) {\n\t\t\tif ( arguments.length ) {\n\t\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\treturn this._value();\n\t\t},\n\t\n\t\tvalues: function( index, newValue ) {\n\t\t\tvar vals,\n\t\t\t\tnewValues,\n\t\t\t\ti;\n\t\n\t\t\tif ( arguments.length > 1 ) {\n\t\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, index );\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( arguments.length ) {\n\t\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\t\tvals = this.options.values;\n\t\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\t\tthis._change( null, i );\n\t\t\t\t\t}\n\t\t\t\t\tthis._refreshValue();\n\t\t\t\t} else {\n\t\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\t\treturn this._values( index );\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn this.value();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn this._values();\n\t\t\t}\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tvar i,\n\t\t\t\tvalsLength = 0;\n\t\n\t\t\tif ( key === \"range\" && this.options.range === true ) {\n\t\t\t\tif ( value === \"min\" ) {\n\t\t\t\t\tthis.options.value = this._values( 0 );\n\t\t\t\t\tthis.options.values = null;\n\t\t\t\t} else if ( value === \"max\" ) {\n\t\t\t\t\tthis.options.value = this._values( this.options.values.length-1 );\n\t\t\t\t\tthis.options.values = null;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\t\tvalsLength = this.options.values.length;\n\t\t\t}\n\t\n\t\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\t\n\t\t\tswitch ( key ) {\n\t\t\t\tcase \"orientation\":\n\t\t\t\t\tthis._detectOrientation();\n\t\t\t\t\tthis.element\n\t\t\t\t\t\t.removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t\t.addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\t\tthis._refreshValue();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"value\":\n\t\t\t\t\tthis._animateOff = true;\n\t\t\t\t\tthis._refreshValue();\n\t\t\t\t\tthis._change( null, 0 );\n\t\t\t\t\tthis._animateOff = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"values\":\n\t\t\t\t\tthis._animateOff = true;\n\t\t\t\t\tthis._refreshValue();\n\t\t\t\t\tfor ( i = 0; i < valsLength; i += 1 ) {\n\t\t\t\t\t\tthis._change( null, i );\n\t\t\t\t\t}\n\t\t\t\t\tthis._animateOff = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"min\":\n\t\t\t\tcase \"max\":\n\t\t\t\t\tthis._animateOff = true;\n\t\t\t\t\tthis._refreshValue();\n\t\t\t\t\tthis._animateOff = false;\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"range\":\n\t\t\t\t\tthis._animateOff = true;\n\t\t\t\t\tthis._refresh();\n\t\t\t\t\tthis._animateOff = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\n\t\t//internal value getter\n\t\t// _value() returns value trimmed by min and max, aligned by step\n\t\t_value: function() {\n\t\t\tvar val = this.options.value;\n\t\t\tval = this._trimAlignValue( val );\n\t\n\t\t\treturn val;\n\t\t},\n\t\n\t\t//internal values getter\n\t\t// _values() returns array of values trimmed by min and max, aligned by step\n\t\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t\t_values: function( index ) {\n\t\t\tvar val,\n\t\t\t\tvals,\n\t\t\t\ti;\n\t\n\t\t\tif ( arguments.length ) {\n\t\t\t\tval = this.options.values[ index ];\n\t\t\t\tval = this._trimAlignValue( val );\n\t\n\t\t\t\treturn val;\n\t\t\t} else if ( this.options.values && this.options.values.length ) {\n\t\t\t\t// .slice() creates a copy of the array\n\t\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\t\tvals = this.options.values.slice();\n\t\t\t\tfor ( i = 0; i < vals.length; i+= 1) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t\t}\n\t\n\t\t\t\treturn vals;\n\t\t\t} else {\n\t\t\t\treturn [];\n\t\t\t}\n\t\t},\n\t\n\t\t// returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t\t_trimAlignValue: function( val ) {\n\t\t\tif ( val <= this._valueMin() ) {\n\t\t\t\treturn this._valueMin();\n\t\t\t}\n\t\t\tif ( val >= this._valueMax() ) {\n\t\t\t\treturn this._valueMax();\n\t\t\t}\n\t\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\t\tvalModStep = (val - this._valueMin()) % step,\n\t\t\t\talignValue = val - valModStep;\n\t\n\t\t\tif ( Math.abs(valModStep) * 2 >= step ) {\n\t\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t\t}\n\t\n\t\t\t// Since JavaScript has problems with large floats, round\n\t\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\t\treturn parseFloat( alignValue.toFixed(5) );\n\t\t},\n\t\n\t\t_valueMin: function() {\n\t\t\treturn this.options.min;\n\t\t},\n\t\n\t\t_valueMax: function() {\n\t\t\treturn this.options.max;\n\t\t},\n\t\n\t\t_refreshValue: function() {\n\t\t\tvar lastValPercent, valPercent, value, valueMin, valueMax,\n\t\t\t\toRange = this.options.range,\n\t\t\t\to = this.options,\n\t\t\t\tthat = this,\n\t\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\t\t_set = {};\n\t\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tthis.handles.each(function( i ) {\n\t\t\t\t\tvalPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;\n\t\t\t\t\t_set[ that.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\t\tif ( that.options.range === true ) {\n\t\t\t\t\t\tif ( that.orientation === \"horizontal\" ) {\n\t\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { left: valPercent + \"%\" }, o.animate );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { width: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { bottom: ( valPercent ) + \"%\" }, o.animate );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { height: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tlastValPercent = valPercent;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tvalue = this.value();\n\t\t\t\tvalueMin = this._valueMin();\n\t\t\t\tvalueMax = this._valueMax();\n\t\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t\t0;\n\t\t\t\t_set[ this.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\n\t\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { width: valPercent + \"%\" }, o.animate );\n\t\t\t\t}\n\t\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { width: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t}\n\t\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { height: valPercent + \"%\" }, o.animate );\n\t\t\t\t}\n\t\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { height: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t_handleEvents: {\n\t\t\tkeydown: function( event ) {\n\t\t\t\t/*jshint maxcomplexity:25*/\n\t\t\t\tvar allowed, curVal, newVal, step,\n\t\t\t\t\tindex = $( event.target ).data( \"ui-slider-handle-index\" );\n\t\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tif ( !this._keySliding ) {\n\t\t\t\t\t\t\tthis._keySliding = true;\n\t\t\t\t\t\t\t$( event.target ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\t\tallowed = this._start( event, index );\n\t\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\n\t\t\t\tstep = this.options.step;\n\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\tcurVal = newVal = this.values( index );\n\t\t\t\t} else {\n\t\t\t\t\tcurVal = newVal = this.value();\n\t\t\t\t}\n\t\n\t\t\t\tswitch ( event.keyCode ) {\n\t\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\t\tnewVal = this._valueMin();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\t\tnewVal = this._valueMax();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\t\tnewVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\t\tnewVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\t\tif ( curVal === this._valueMax() ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewVal = this._trimAlignValue( curVal + step );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\t\tif ( curVal === this._valueMin() ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tnewVal = this._trimAlignValue( curVal - step );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\n\t\t\t\tthis._slide( event, index, newVal );\n\t\t\t},\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\tkeyup: function( event ) {\n\t\t\t\tvar index = $( event.target ).data( \"ui-slider-handle-index\" );\n\t\n\t\t\t\tif ( this._keySliding ) {\n\t\t\t\t\tthis._keySliding = false;\n\t\t\t\t\tthis._stop( event, index );\n\t\t\t\t\tthis._change( event, index );\n\t\t\t\t\t$( event.target ).removeClass( \"ui-state-active\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t});\n\t\n\t}(jQuery));\n\t\n\t(function( $ ) {\n\t\n\tfunction modifier( fn ) {\n\t\treturn function() {\n\t\t\tvar previous = this.element.val();\n\t\t\tfn.apply( this, arguments );\n\t\t\tthis._refresh();\n\t\t\tif ( previous !== this.element.val() ) {\n\t\t\t\tthis._trigger( \"change\" );\n\t\t\t}\n\t\t};\n\t}\n\t\n\t$.widget( \"ui.spinner\", {\n\t\tversion: \"1.10.3\",\n\t\tdefaultElement: \"<input>\",\n\t\twidgetEventPrefix: \"spin\",\n\t\toptions: {\n\t\t\tculture: null,\n\t\t\ticons: {\n\t\t\t\tdown: \"ui-icon-triangle-1-s\",\n\t\t\t\tup: \"ui-icon-triangle-1-n\"\n\t\t\t},\n\t\t\tincremental: true,\n\t\t\tmax: null,\n\t\t\tmin: null,\n\t\t\tnumberFormat: null,\n\t\t\tpage: 10,\n\t\t\tstep: 1,\n\t\n\t\t\tchange: null,\n\t\t\tspin: null,\n\t\t\tstart: null,\n\t\t\tstop: null\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\t// handle string values that need to be parsed\n\t\t\tthis._setOption( \"max\", this.options.max );\n\t\t\tthis._setOption( \"min\", this.options.min );\n\t\t\tthis._setOption( \"step\", this.options.step );\n\t\n\t\t\t// format the value, but don't constrain\n\t\t\tthis._value( this.element.val(), true );\n\t\n\t\t\tthis._draw();\n\t\t\tthis._on( this._events );\n\t\t\tthis._refresh();\n\t\n\t\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\t\tthis._on( this.window, {\n\t\t\t\tbeforeunload: function() {\n\t\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_getCreateOptions: function() {\n\t\t\tvar options = {},\n\t\t\t\telement = this.element;\n\t\n\t\t\t$.each( [ \"min\", \"max\", \"step\" ], function( i, option ) {\n\t\t\t\tvar value = element.attr( option );\n\t\t\t\tif ( value !== undefined && value.length ) {\n\t\t\t\t\toptions[ option ] = value;\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\treturn options;\n\t\t},\n\t\n\t\t_events: {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this._start( event ) && this._keydown( event ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\tkeyup: \"_stop\",\n\t\t\tfocus: function() {\n\t\t\t\tthis.previous = this.element.val();\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tif ( this.cancelBlur ) {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tthis._stop();\n\t\t\t\tthis._refresh();\n\t\t\t\tif ( this.previous !== this.element.val() ) {\n\t\t\t\t\tthis._trigger( \"change\", event );\n\t\t\t\t}\n\t\t\t},\n\t\t\tmousewheel: function( event, delta ) {\n\t\t\t\tif ( !delta ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( !this.spinning && !this._start( event ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\n\t\t\t\tthis._spin( (delta > 0 ? 1 : -1) * this.options.step, event );\n\t\t\t\tclearTimeout( this.mousewheelTimer );\n\t\t\t\tthis.mousewheelTimer = this._delay(function() {\n\t\t\t\t\tif ( this.spinning ) {\n\t\t\t\t\t\tthis._stop( event );\n\t\t\t\t\t}\n\t\t\t\t}, 100 );\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"mousedown .ui-spinner-button\": function( event ) {\n\t\t\t\tvar previous;\n\t\n\t\t\t\t// We never want the buttons to have focus; whenever the user is\n\t\t\t\t// interacting with the spinner, the focus should be on the input.\n\t\t\t\t// If the input is focused then this.previous is properly set from\n\t\t\t\t// when the input first received focus. If the input is not focused\n\t\t\t\t// then we need to set this.previous based on the value before spinning.\n\t\t\t\tprevious = this.element[0] === this.document[0].activeElement ?\n\t\t\t\t\tthis.previous : this.element.val();\n\t\t\t\tfunction checkFocus() {\n\t\t\t\t\tvar isActive = this.element[0] === this.document[0].activeElement;\n\t\t\t\t\tif ( !isActive ) {\n\t\t\t\t\t\tthis.element.focus();\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\t// support: IE\n\t\t\t\t\t\t// IE sets focus asynchronously, so we need to check if focus\n\t\t\t\t\t\t// moved off of the input because the user clicked on the button.\n\t\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\t// ensure focus is on (or stays on) the text field\n\t\t\t\tevent.preventDefault();\n\t\t\t\tcheckFocus.call( this );\n\t\n\t\t\t\t// support: IE\n\t\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t\t// and check (again) if focus moved off of the input.\n\t\t\t\tthis.cancelBlur = true;\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\tcheckFocus.call( this );\n\t\t\t\t});\n\t\n\t\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t\t},\n\t\t\t\"mouseup .ui-spinner-button\": \"_stop\",\n\t\t\t\"mouseenter .ui-spinner-button\": function( event ) {\n\t\t\t\t// button will add ui-state-active if mouse was down while mouseleave and kept down\n\t\t\t\tif ( !$( event.currentTarget ).hasClass( \"ui-state-active\" ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\n\t\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t\t},\n\t\t\t// TODO: do we really want to consider this a stop?\n\t\t\t// shouldn't we just stop the repeater and wait until mouseup before\n\t\t\t// we trigger the stop event?\n\t\t\t\"mouseleave .ui-spinner-button\": \"_stop\"\n\t\t},\n\t\n\t\t_draw: function() {\n\t\t\tvar uiSpinner = this.uiSpinner = this.element\n\t\t\t\t.addClass( \"ui-spinner-input\" )\n\t\t\t\t.attr( \"autocomplete\", \"off\" )\n\t\t\t\t.wrap( this._uiSpinnerHtml() )\n\t\t\t\t.parent()\n\t\t\t\t\t// add buttons\n\t\t\t\t\t.append( this._buttonHtml() );\n\t\n\t\t\tthis.element.attr( \"role\", \"spinbutton\" );\n\t\n\t\t\t// button bindings\n\t\t\tthis.buttons = uiSpinner.find( \".ui-spinner-button\" )\n\t\t\t\t.attr( \"tabIndex\", -1 )\n\t\t\t\t.button()\n\t\t\t\t.removeClass( \"ui-corner-all\" );\n\t\n\t\t\t// IE 6 doesn't understand height: 50% for the buttons\n\t\t\t// unless the wrapper has an explicit height\n\t\t\tif ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&\n\t\t\t\t\tuiSpinner.height() > 0 ) {\n\t\t\t\tuiSpinner.height( uiSpinner.height() );\n\t\t\t}\n\t\n\t\t\t// disable spinner if element was already disabled\n\t\t\tif ( this.options.disabled ) {\n\t\t\t\tthis.disable();\n\t\t\t}\n\t\t},\n\t\n\t\t_keydown: function( event ) {\n\t\t\tvar options = this.options,\n\t\t\t\tkeyCode = $.ui.keyCode;\n\t\n\t\t\tswitch ( event.keyCode ) {\n\t\t\tcase keyCode.UP:\n\t\t\t\tthis._repeat( null, 1, event );\n\t\t\t\treturn true;\n\t\t\tcase keyCode.DOWN:\n\t\t\t\tthis._repeat( null, -1, event );\n\t\t\t\treturn true;\n\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\tthis._repeat( null, options.page, event );\n\t\t\t\treturn true;\n\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\tthis._repeat( null, -options.page, event );\n\t\t\t\treturn true;\n\t\t\t}\n\t\n\t\t\treturn false;\n\t\t},\n\t\n\t\t_uiSpinnerHtml: function() {\n\t\t\treturn \"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>\";\n\t\t},\n\t\n\t\t_buttonHtml: function() {\n\t\t\treturn \"\" +\n\t\t\t\t\"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>\" +\n\t\t\t\t\t\"<span class='ui-icon \" + this.options.icons.up + \"'>&#9650;</span>\" +\n\t\t\t\t\"</a>\" +\n\t\t\t\t\"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>\" +\n\t\t\t\t\t\"<span class='ui-icon \" + this.options.icons.down + \"'>&#9660;</span>\" +\n\t\t\t\t\"</a>\";\n\t\t},\n\t\n\t\t_start: function( event ) {\n\t\t\tif ( !this.spinning && this._trigger( \"start\", event ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\n\t\t\tif ( !this.counter ) {\n\t\t\t\tthis.counter = 1;\n\t\t\t}\n\t\t\tthis.spinning = true;\n\t\t\treturn true;\n\t\t},\n\t\n\t\t_repeat: function( i, steps, event ) {\n\t\t\ti = i || 500;\n\t\n\t\t\tclearTimeout( this.timer );\n\t\t\tthis.timer = this._delay(function() {\n\t\t\t\tthis._repeat( 40, steps, event );\n\t\t\t}, i );\n\t\n\t\t\tthis._spin( steps * this.options.step, event );\n\t\t},\n\t\n\t\t_spin: function( step, event ) {\n\t\t\tvar value = this.value() || 0;\n\t\n\t\t\tif ( !this.counter ) {\n\t\t\t\tthis.counter = 1;\n\t\t\t}\n\t\n\t\t\tvalue = this._adjustValue( value + step * this._increment( this.counter ) );\n\t\n\t\t\tif ( !this.spinning || this._trigger( \"spin\", event, { value: value } ) !== false) {\n\t\t\t\tthis._value( value );\n\t\t\t\tthis.counter++;\n\t\t\t}\n\t\t},\n\t\n\t\t_increment: function( i ) {\n\t\t\tvar incremental = this.options.incremental;\n\t\n\t\t\tif ( incremental ) {\n\t\t\t\treturn $.isFunction( incremental ) ?\n\t\t\t\t\tincremental( i ) :\n\t\t\t\t\tMath.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );\n\t\t\t}\n\t\n\t\t\treturn 1;\n\t\t},\n\t\n\t\t_precision: function() {\n\t\t\tvar precision = this._precisionOf( this.options.step );\n\t\t\tif ( this.options.min !== null ) {\n\t\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t\t}\n\t\t\treturn precision;\n\t\t},\n\t\n\t\t_precisionOf: function( num ) {\n\t\t\tvar str = num.toString(),\n\t\t\t\tdecimal = str.indexOf( \".\" );\n\t\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t\t},\n\t\n\t\t_adjustValue: function( value ) {\n\t\t\tvar base, aboveMin,\n\t\t\t\toptions = this.options;\n\t\n\t\t\t// make sure we're at a valid step\n\t\t\t// - find out where we are relative to the base (min or 0)\n\t\t\tbase = options.min !== null ? options.min : 0;\n\t\t\taboveMin = value - base;\n\t\t\t// - round to the nearest step\n\t\t\taboveMin = Math.round(aboveMin / options.step) * options.step;\n\t\t\t// - rounding is based on 0, so adjust back to our base\n\t\t\tvalue = base + aboveMin;\n\t\n\t\t\t// fix precision from bad JS floating point math\n\t\t\tvalue = parseFloat( value.toFixed( this._precision() ) );\n\t\n\t\t\t// clamp the value\n\t\t\tif ( options.max !== null && value > options.max) {\n\t\t\t\treturn options.max;\n\t\t\t}\n\t\t\tif ( options.min !== null && value < options.min ) {\n\t\t\t\treturn options.min;\n\t\t\t}\n\t\n\t\t\treturn value;\n\t\t},\n\t\n\t\t_stop: function( event ) {\n\t\t\tif ( !this.spinning ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tclearTimeout( this.timer );\n\t\t\tclearTimeout( this.mousewheelTimer );\n\t\t\tthis.counter = 0;\n\t\t\tthis.spinning = false;\n\t\t\tthis._trigger( \"stop\", event );\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"culture\" || key === \"numberFormat\" ) {\n\t\t\t\tvar prevValue = this._parse( this.element.val() );\n\t\t\t\tthis.options[ key ] = value;\n\t\t\t\tthis.element.val( this._format( prevValue ) );\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( key === \"max\" || key === \"min\" || key === \"step\" ) {\n\t\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\t\tvalue = this._parse( value );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( key === \"icons\" ) {\n\t\t\t\tthis.buttons.first().find( \".ui-icon\" )\n\t\t\t\t\t.removeClass( this.options.icons.up )\n\t\t\t\t\t.addClass( value.up );\n\t\t\t\tthis.buttons.last().find( \".ui-icon\" )\n\t\t\t\t\t.removeClass( this.options.icons.down )\n\t\t\t\t\t.addClass( value.down );\n\t\t\t}\n\t\n\t\t\tthis._super( key, value );\n\t\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\tif ( value ) {\n\t\t\t\t\tthis.element.prop( \"disabled\", true );\n\t\t\t\t\tthis.buttons.button( \"disable\" );\n\t\t\t\t} else {\n\t\t\t\t\tthis.element.prop( \"disabled\", false );\n\t\t\t\t\tthis.buttons.button( \"enable\" );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\n\t\t_setOptions: modifier(function( options ) {\n\t\t\tthis._super( options );\n\t\t\tthis._value( this.element.val() );\n\t\t}),\n\t\n\t\t_parse: function( val ) {\n\t\t\tif ( typeof val === \"string\" && val !== \"\" ) {\n\t\t\t\tval = window.Globalize && this.options.numberFormat ?\n\t\t\t\t\tGlobalize.parseFloat( val, 10, this.options.culture ) : +val;\n\t\t\t}\n\t\t\treturn val === \"\" || isNaN( val ) ? null : val;\n\t\t},\n\t\n\t\t_format: function( value ) {\n\t\t\tif ( value === \"\" ) {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t\treturn window.Globalize && this.options.numberFormat ?\n\t\t\t\tGlobalize.format( value, this.options.numberFormat, this.options.culture ) :\n\t\t\t\tvalue;\n\t\t},\n\t\n\t\t_refresh: function() {\n\t\t\tthis.element.attr({\n\t\t\t\t\"aria-valuemin\": this.options.min,\n\t\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t\t// TODO: what should we do with values that can't be parsed?\n\t\t\t\t\"aria-valuenow\": this._parse( this.element.val() )\n\t\t\t});\n\t\t},\n\t\n\t\t// update the value without triggering change\n\t\t_value: function( value, allowAny ) {\n\t\t\tvar parsed;\n\t\t\tif ( value !== \"\" ) {\n\t\t\t\tparsed = this._parse( value );\n\t\t\t\tif ( parsed !== null ) {\n\t\t\t\t\tif ( !allowAny ) {\n\t\t\t\t\t\tparsed = this._adjustValue( parsed );\n\t\t\t\t\t}\n\t\t\t\t\tvalue = this._format( parsed );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.element.val( value );\n\t\t\tthis._refresh();\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tthis.element\n\t\t\t\t.removeClass( \"ui-spinner-input\" )\n\t\t\t\t.prop( \"disabled\", false )\n\t\t\t\t.removeAttr( \"autocomplete\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t\t.removeAttr( \"aria-valuenow\" );\n\t\t\tthis.uiSpinner.replaceWith( this.element );\n\t\t},\n\t\n\t\tstepUp: modifier(function( steps ) {\n\t\t\tthis._stepUp( steps );\n\t\t}),\n\t\t_stepUp: function( steps ) {\n\t\t\tif ( this._start() ) {\n\t\t\t\tthis._spin( (steps || 1) * this.options.step );\n\t\t\t\tthis._stop();\n\t\t\t}\n\t\t},\n\t\n\t\tstepDown: modifier(function( steps ) {\n\t\t\tthis._stepDown( steps );\n\t\t}),\n\t\t_stepDown: function( steps ) {\n\t\t\tif ( this._start() ) {\n\t\t\t\tthis._spin( (steps || 1) * -this.options.step );\n\t\t\t\tthis._stop();\n\t\t\t}\n\t\t},\n\t\n\t\tpageUp: modifier(function( pages ) {\n\t\t\tthis._stepUp( (pages || 1) * this.options.page );\n\t\t}),\n\t\n\t\tpageDown: modifier(function( pages ) {\n\t\t\tthis._stepDown( (pages || 1) * this.options.page );\n\t\t}),\n\t\n\t\tvalue: function( newVal ) {\n\t\t\tif ( !arguments.length ) {\n\t\t\t\treturn this._parse( this.element.val() );\n\t\t\t}\n\t\t\tmodifier( this._value ).call( this, newVal );\n\t\t},\n\t\n\t\twidget: function() {\n\t\t\treturn this.uiSpinner;\n\t\t}\n\t});\n\t\n\t}( jQuery ) );\n\t\n\t(function( $, undefined ) {\n\t\n\tvar tabId = 0,\n\t\trhash = /#.*$/;\n\t\n\tfunction getNextTabId() {\n\t\treturn ++tabId;\n\t}\n\t\n\tfunction isLocal( anchor ) {\n\t\treturn anchor.hash.length > 1 &&\n\t\t\tdecodeURIComponent( anchor.href.replace( rhash, \"\" ) ) ===\n\t\t\t\tdecodeURIComponent( location.href.replace( rhash, \"\" ) );\n\t}\n\t\n\t$.widget( \"ui.tabs\", {\n\t\tversion: \"1.10.3\",\n\t\tdelay: 300,\n\t\toptions: {\n\t\t\tactive: null,\n\t\t\tcollapsible: false,\n\t\t\tevent: \"click\",\n\t\t\theightStyle: \"content\",\n\t\t\thide: null,\n\t\t\tshow: null,\n\t\n\t\t\t// callbacks\n\t\t\tactivate: null,\n\t\t\tbeforeActivate: null,\n\t\t\tbeforeLoad: null,\n\t\t\tload: null\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\tvar that = this,\n\t\t\t\toptions = this.options;\n\t\n\t\t\tthis.running = false;\n\t\n\t\t\tthis.element\n\t\t\t\t.addClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t\t.toggleClass( \"ui-tabs-collapsible\", options.collapsible )\n\t\t\t\t// Prevent users from focusing disabled tabs via click\n\t\t\t\t.delegate( \".ui-tabs-nav > li\", \"mousedown\" + this.eventNamespace, function( event ) {\n\t\t\t\t\tif ( $( this ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// support: IE <9\n\t\t\t\t// Preventing the default action in mousedown doesn't prevent IE\n\t\t\t\t// from focusing the element, so if the anchor gets focused, blur.\n\t\t\t\t// We don't have to worry about focusing the previously focused\n\t\t\t\t// element since clicking on a non-focusable element should focus\n\t\t\t\t// the body anyway.\n\t\t\t\t.delegate( \".ui-tabs-anchor\", \"focus\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( $( this ).closest( \"li\" ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\t\tthis.blur();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\n\t\t\tthis._processTabs();\n\t\t\toptions.active = this._initialActive();\n\t\n\t\t\t// Take disabling tabs via class attribute from HTML\n\t\t\t// into account and update option properly.\n\t\t\tif ( $.isArray( options.disabled ) ) {\n\t\t\t\toptions.disabled = $.unique( options.disabled.concat(\n\t\t\t\t\t$.map( this.tabs.filter( \".ui-state-disabled\" ), function( li ) {\n\t\t\t\t\t\treturn that.tabs.index( li );\n\t\t\t\t\t})\n\t\t\t\t) ).sort();\n\t\t\t}\n\t\n\t\t\t// check for length avoids error when initializing empty list\n\t\t\tif ( this.options.active !== false && this.anchors.length ) {\n\t\t\t\tthis.active = this._findActive( options.active );\n\t\t\t} else {\n\t\t\t\tthis.active = $();\n\t\t\t}\n\t\n\t\t\tthis._refresh();\n\t\n\t\t\tif ( this.active.length ) {\n\t\t\t\tthis.load( options.active );\n\t\t\t}\n\t\t},\n\t\n\t\t_initialActive: function() {\n\t\t\tvar active = this.options.active,\n\t\t\t\tcollapsible = this.options.collapsible,\n\t\t\t\tlocationHash = location.hash.substring( 1 );\n\t\n\t\t\tif ( active === null ) {\n\t\t\t\t// check the fragment identifier in the URL\n\t\t\t\tif ( locationHash ) {\n\t\t\t\t\tthis.tabs.each(function( i, tab ) {\n\t\t\t\t\t\tif ( $( tab ).attr( \"aria-controls\" ) === locationHash ) {\n\t\t\t\t\t\t\tactive = i;\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\n\t\t\t\t// check for a tab marked active via a class\n\t\t\t\tif ( active === null ) {\n\t\t\t\t\tactive = this.tabs.index( this.tabs.filter( \".ui-tabs-active\" ) );\n\t\t\t\t}\n\t\n\t\t\t\t// no active tab, set to false\n\t\t\t\tif ( active === null || active === -1 ) {\n\t\t\t\t\tactive = this.tabs.length ? 0 : false;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// handle numbers: negative, out of range\n\t\t\tif ( active !== false ) {\n\t\t\t\tactive = this.tabs.index( this.tabs.eq( active ) );\n\t\t\t\tif ( active === -1 ) {\n\t\t\t\t\tactive = collapsible ? false : 0;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// don't allow collapsible: false and active: false\n\t\t\tif ( !collapsible && active === false && this.anchors.length ) {\n\t\t\t\tactive = 0;\n\t\t\t}\n\t\n\t\t\treturn active;\n\t\t},\n\t\n\t\t_getCreateEventData: function() {\n\t\t\treturn {\n\t\t\t\ttab: this.active,\n\t\t\t\tpanel: !this.active.length ? $() : this._getPanelForTab( this.active )\n\t\t\t};\n\t\t},\n\t\n\t\t_tabKeydown: function( event ) {\n\t\t\t/*jshint maxcomplexity:15*/\n\t\t\tvar focusedTab = $( this.document[0].activeElement ).closest( \"li\" ),\n\t\t\t\tselectedIndex = this.tabs.index( focusedTab ),\n\t\t\t\tgoingForward = true;\n\t\n\t\t\tif ( this._handlePageNav( event ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\t\tselectedIndex++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tgoingForward = false;\n\t\t\t\t\tselectedIndex--;\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tselectedIndex = this.anchors.length - 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tselectedIndex = 0;\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.SPACE:\n\t\t\t\t\t// Activate only, no collapsing\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tclearTimeout( this.activating );\n\t\t\t\t\tthis._activate( selectedIndex );\n\t\t\t\t\treturn;\n\t\t\t\tcase $.ui.keyCode.ENTER:\n\t\t\t\t\t// Toggle (cancel delayed activation, allow collapsing)\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tclearTimeout( this.activating );\n\t\t\t\t\t// Determine if we should collapse or activate\n\t\t\t\t\tthis._activate( selectedIndex === this.options.active ? false : selectedIndex );\n\t\t\t\t\treturn;\n\t\t\t\tdefault:\n\t\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// Focus the appropriate tab, based on which key was pressed\n\t\t\tevent.preventDefault();\n\t\t\tclearTimeout( this.activating );\n\t\t\tselectedIndex = this._focusNextTab( selectedIndex, goingForward );\n\t\n\t\t\t// Navigating with control key will prevent automatic activation\n\t\t\tif ( !event.ctrlKey ) {\n\t\t\t\t// Update aria-selected immediately so that AT think the tab is already selected.\n\t\t\t\t// Otherwise AT may confuse the user by stating that they need to activate the tab,\n\t\t\t\t// but the tab will already be activated by the time the announcement finishes.\n\t\t\t\tfocusedTab.attr( \"aria-selected\", \"false\" );\n\t\t\t\tthis.tabs.eq( selectedIndex ).attr( \"aria-selected\", \"true\" );\n\t\n\t\t\t\tthis.activating = this._delay(function() {\n\t\t\t\t\tthis.option( \"active\", selectedIndex );\n\t\t\t\t}, this.delay );\n\t\t\t}\n\t\t},\n\t\n\t\t_panelKeydown: function( event ) {\n\t\t\tif ( this._handlePageNav( event ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// Ctrl+up moves focus to the current tab\n\t\t\tif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.active.focus();\n\t\t\t}\n\t\t},\n\t\n\t\t// Alt+page up/down moves focus to the previous/next tab (and activates)\n\t\t_handlePageNav: function( event ) {\n\t\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {\n\t\t\t\tthis._activate( this._focusNextTab( this.options.active - 1, false ) );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {\n\t\t\t\tthis._activate( this._focusNextTab( this.options.active + 1, true ) );\n\t\t\t\treturn true;\n\t\t\t}\n\t\t},\n\t\n\t\t_findNextTab: function( index, goingForward ) {\n\t\t\tvar lastTabIndex = this.tabs.length - 1;\n\t\n\t\t\tfunction constrain() {\n\t\t\t\tif ( index > lastTabIndex ) {\n\t\t\t\t\tindex = 0;\n\t\t\t\t}\n\t\t\t\tif ( index < 0 ) {\n\t\t\t\t\tindex = lastTabIndex;\n\t\t\t\t}\n\t\t\t\treturn index;\n\t\t\t}\n\t\n\t\t\twhile ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {\n\t\t\t\tindex = goingForward ? index + 1 : index - 1;\n\t\t\t}\n\t\n\t\t\treturn index;\n\t\t},\n\t\n\t\t_focusNextTab: function( index, goingForward ) {\n\t\t\tindex = this._findNextTab( index, goingForward );\n\t\t\tthis.tabs.eq( index ).focus();\n\t\t\treturn index;\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tif ( key === \"active\" ) {\n\t\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\t\tthis._activate( value );\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\t// don't use the widget factory's disabled handling\n\t\t\t\tthis._setupDisabled( value );\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis._super( key, value);\n\t\n\t\t\tif ( key === \"collapsible\" ) {\n\t\t\t\tthis.element.toggleClass( \"ui-tabs-collapsible\", value );\n\t\t\t\t// Setting collapsible: false while collapsed; open first panel\n\t\t\t\tif ( !value && this.options.active === false ) {\n\t\t\t\t\tthis._activate( 0 );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tif ( key === \"event\" ) {\n\t\t\t\tthis._setupEvents( value );\n\t\t\t}\n\t\n\t\t\tif ( key === \"heightStyle\" ) {\n\t\t\t\tthis._setupHeightStyle( value );\n\t\t\t}\n\t\t},\n\t\n\t\t_tabId: function( tab ) {\n\t\t\treturn tab.attr( \"aria-controls\" ) || \"ui-tabs-\" + getNextTabId();\n\t\t},\n\t\n\t\t_sanitizeSelector: function( hash ) {\n\t\t\treturn hash ? hash.replace( /[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\" ) : \"\";\n\t\t},\n\t\n\t\trefresh: function() {\n\t\t\tvar options = this.options,\n\t\t\t\tlis = this.tablist.children( \":has(a[href])\" );\n\t\n\t\t\t// get disabled tabs from class attribute from HTML\n\t\t\t// this will get converted to a boolean if needed in _refresh()\n\t\t\toptions.disabled = $.map( lis.filter( \".ui-state-disabled\" ), function( tab ) {\n\t\t\t\treturn lis.index( tab );\n\t\t\t});\n\t\n\t\t\tthis._processTabs();\n\t\n\t\t\t// was collapsed or no tabs\n\t\t\tif ( options.active === false || !this.anchors.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// was active, but active tab is gone\n\t\t\t} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t\t// all remaining tabs are disabled\n\t\t\t\tif ( this.tabs.length === options.disabled.length ) {\n\t\t\t\t\toptions.active = false;\n\t\t\t\t\tthis.active = $();\n\t\t\t\t// activate previous tab\n\t\t\t\t} else {\n\t\t\t\t\tthis._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );\n\t\t\t\t}\n\t\t\t// was active, active tab still exists\n\t\t\t} else {\n\t\t\t\t// make sure active index is correct\n\t\t\t\toptions.active = this.tabs.index( this.active );\n\t\t\t}\n\t\n\t\t\tthis._refresh();\n\t\t},\n\t\n\t\t_refresh: function() {\n\t\t\tthis._setupDisabled( this.options.disabled );\n\t\t\tthis._setupEvents( this.options.event );\n\t\t\tthis._setupHeightStyle( this.options.heightStyle );\n\t\n\t\t\tthis.tabs.not( this.active ).attr({\n\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\ttabIndex: -1\n\t\t\t});\n\t\t\tthis.panels.not( this._getPanelForTab( this.active ) )\n\t\t\t\t.hide()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t\t});\n\t\n\t\t\t// Make sure one tab is in the tab order\n\t\t\tif ( !this.active.length ) {\n\t\t\t\tthis.tabs.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t\t} else {\n\t\t\t\tthis.active\n\t\t\t\t\t.addClass( \"ui-tabs-active ui-state-active\" )\n\t\t\t\t\t.attr({\n\t\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\t\ttabIndex: 0\n\t\t\t\t\t});\n\t\t\t\tthis._getPanelForTab( this.active )\n\t\t\t\t\t.show()\n\t\t\t\t\t.attr({\n\t\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\n\t\t_processTabs: function() {\n\t\t\tvar that = this;\n\t\n\t\t\tthis.tablist = this._getList()\n\t\t\t\t.addClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t\t.attr( \"role\", \"tablist\" );\n\t\n\t\t\tthis.tabs = this.tablist.find( \"> li:has(a[href])\" )\n\t\t\t\t.addClass( \"ui-state-default ui-corner-top\" )\n\t\t\t\t.attr({\n\t\t\t\t\trole: \"tab\",\n\t\t\t\t\ttabIndex: -1\n\t\t\t\t});\n\t\n\t\t\tthis.anchors = this.tabs.map(function() {\n\t\t\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t\t\t})\n\t\t\t\t.addClass( \"ui-tabs-anchor\" )\n\t\t\t\t.attr({\n\t\t\t\t\trole: \"presentation\",\n\t\t\t\t\ttabIndex: -1\n\t\t\t\t});\n\t\n\t\t\tthis.panels = $();\n\t\n\t\t\tthis.anchors.each(function( i, anchor ) {\n\t\t\t\tvar selector, panel, panelId,\n\t\t\t\t\tanchorId = $( anchor ).uniqueId().attr( \"id\" ),\n\t\t\t\t\ttab = $( anchor ).closest( \"li\" ),\n\t\t\t\t\toriginalAriaControls = tab.attr( \"aria-controls\" );\n\t\n\t\t\t\t// inline tab\n\t\t\t\tif ( isLocal( anchor ) ) {\n\t\t\t\t\tselector = anchor.hash;\n\t\t\t\t\tpanel = that.element.find( that._sanitizeSelector( selector ) );\n\t\t\t\t// remote tab\n\t\t\t\t} else {\n\t\t\t\t\tpanelId = that._tabId( tab );\n\t\t\t\t\tselector = \"#\" + panelId;\n\t\t\t\t\tpanel = that.element.find( selector );\n\t\t\t\t\tif ( !panel.length ) {\n\t\t\t\t\t\tpanel = that._createPanel( panelId );\n\t\t\t\t\t\tpanel.insertAfter( that.panels[ i - 1 ] || that.tablist );\n\t\t\t\t\t}\n\t\t\t\t\tpanel.attr( \"aria-live\", \"polite\" );\n\t\t\t\t}\n\t\n\t\t\t\tif ( panel.length) {\n\t\t\t\t\tthat.panels = that.panels.add( panel );\n\t\t\t\t}\n\t\t\t\tif ( originalAriaControls ) {\n\t\t\t\t\ttab.data( \"ui-tabs-aria-controls\", originalAriaControls );\n\t\t\t\t}\n\t\t\t\ttab.attr({\n\t\t\t\t\t\"aria-controls\": selector.substring( 1 ),\n\t\t\t\t\t\"aria-labelledby\": anchorId\n\t\t\t\t});\n\t\t\t\tpanel.attr( \"aria-labelledby\", anchorId );\n\t\t\t});\n\t\n\t\t\tthis.panels\n\t\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t\t.attr( \"role\", \"tabpanel\" );\n\t\t},\n\t\n\t\t// allow overriding how to find the list for rare usage scenarios (#7715)\n\t\t_getList: function() {\n\t\t\treturn this.element.find( \"ol,ul\" ).eq( 0 );\n\t\t},\n\t\n\t\t_createPanel: function( id ) {\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.attr( \"id\", id )\n\t\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t\t.data( \"ui-tabs-destroy\", true );\n\t\t},\n\t\n\t\t_setupDisabled: function( disabled ) {\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tif ( !disabled.length ) {\n\t\t\t\t\tdisabled = false;\n\t\t\t\t} else if ( disabled.length === this.anchors.length ) {\n\t\t\t\t\tdisabled = true;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// disable tabs\n\t\t\tfor ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {\n\t\t\t\tif ( disabled === true || $.inArray( i, disabled ) !== -1 ) {\n\t\t\t\t\t$( li )\n\t\t\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t\t\t} else {\n\t\t\t\t\t$( li )\n\t\t\t\t\t\t.removeClass( \"ui-state-disabled\" )\n\t\t\t\t\t\t.removeAttr( \"aria-disabled\" );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\tthis.options.disabled = disabled;\n\t\t},\n\t\n\t\t_setupEvents: function( event ) {\n\t\t\tvar events = {\n\t\t\t\tclick: function( event ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t};\n\t\t\tif ( event ) {\n\t\t\t\t$.each( event.split(\" \"), function( index, eventName ) {\n\t\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tthis._off( this.anchors.add( this.tabs ).add( this.panels ) );\n\t\t\tthis._on( this.anchors, events );\n\t\t\tthis._on( this.tabs, { keydown: \"_tabKeydown\" } );\n\t\t\tthis._on( this.panels, { keydown: \"_panelKeydown\" } );\n\t\n\t\t\tthis._focusable( this.tabs );\n\t\t\tthis._hoverable( this.tabs );\n\t\t},\n\t\n\t\t_setupHeightStyle: function( heightStyle ) {\n\t\t\tvar maxHeight,\n\t\t\t\tparent = this.element.parent();\n\t\n\t\t\tif ( heightStyle === \"fill\" ) {\n\t\t\t\tmaxHeight = parent.height();\n\t\t\t\tmaxHeight -= this.element.outerHeight() - this.element.height();\n\t\n\t\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\t\tvar elem = $( this ),\n\t\t\t\t\t\tposition = elem.css( \"position\" );\n\t\n\t\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t\t});\n\t\n\t\t\t\tthis.element.children().not( this.panels ).each(function() {\n\t\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t\t});\n\t\n\t\t\t\tthis.panels.each(function() {\n\t\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t\t})\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\t\tmaxHeight = 0;\n\t\t\t\tthis.panels.each(function() {\n\t\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t\t}).height( maxHeight );\n\t\t\t}\n\t\t},\n\t\n\t\t_eventHandler: function( event ) {\n\t\t\tvar options = this.options,\n\t\t\t\tactive = this.active,\n\t\t\t\tanchor = $( event.currentTarget ),\n\t\t\t\ttab = anchor.closest( \"li\" ),\n\t\t\t\tclickedIsActive = tab[ 0 ] === active[ 0 ],\n\t\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\t\ttoShow = collapsing ? $() : this._getPanelForTab( tab ),\n\t\t\t\ttoHide = !active.length ? $() : this._getPanelForTab( active ),\n\t\t\t\teventData = {\n\t\t\t\t\toldTab: active,\n\t\t\t\t\toldPanel: toHide,\n\t\t\t\t\tnewTab: collapsing ? $() : tab,\n\t\t\t\t\tnewPanel: toShow\n\t\t\t\t};\n\t\n\t\t\tevent.preventDefault();\n\t\n\t\t\tif ( tab.hasClass( \"ui-state-disabled\" ) ||\n\t\t\t\t\t// tab is already loading\n\t\t\t\t\ttab.hasClass( \"ui-tabs-loading\" ) ||\n\t\t\t\t\t// can't switch durning an animation\n\t\t\t\t\tthis.running ||\n\t\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t\t// allow canceling activation\n\t\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\toptions.active = collapsing ? false : this.tabs.index( tab );\n\t\n\t\t\tthis.active = clickedIsActive ? $() : tab;\n\t\t\tif ( this.xhr ) {\n\t\t\t\tthis.xhr.abort();\n\t\t\t}\n\t\n\t\t\tif ( !toHide.length && !toShow.length ) {\n\t\t\t\t$.error( \"jQuery UI Tabs: Mismatching fragment identifier.\" );\n\t\t\t}\n\t\n\t\t\tif ( toShow.length ) {\n\t\t\t\tthis.load( this.tabs.index( tab ), event );\n\t\t\t}\n\t\t\tthis._toggle( event, eventData );\n\t\t},\n\t\n\t\t// handles show/hide for selecting tabs\n\t\t_toggle: function( event, eventData ) {\n\t\t\tvar that = this,\n\t\t\t\ttoShow = eventData.newPanel,\n\t\t\t\ttoHide = eventData.oldPanel;\n\t\n\t\t\tthis.running = true;\n\t\n\t\t\tfunction complete() {\n\t\t\t\tthat.running = false;\n\t\t\t\tthat._trigger( \"activate\", event, eventData );\n\t\t\t}\n\t\n\t\t\tfunction show() {\n\t\t\t\teventData.newTab.closest( \"li\" ).addClass( \"ui-tabs-active ui-state-active\" );\n\t\n\t\t\t\tif ( toShow.length && that.options.show ) {\n\t\t\t\t\tthat._show( toShow, that.options.show, complete );\n\t\t\t\t} else {\n\t\t\t\t\ttoShow.show();\n\t\t\t\t\tcomplete();\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\t// start out by hiding, then showing, then completing\n\t\t\tif ( toHide.length && this.options.hide ) {\n\t\t\t\tthis._hide( toHide, this.options.hide, function() {\n\t\t\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\t\t\tshow();\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\t\ttoHide.hide();\n\t\t\t\tshow();\n\t\t\t}\n\t\n\t\t\ttoHide.attr({\n\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t});\n\t\t\teventData.oldTab.attr( \"aria-selected\", \"false\" );\n\t\t\t// If we're switching tabs, remove the old tab from the tab order.\n\t\t\t// If we're opening from collapsed state, remove the previous tab from the tab order.\n\t\t\t// If we're collapsing, then keep the collapsing tab in the tab order.\n\t\t\tif ( toShow.length && toHide.length ) {\n\t\t\t\teventData.oldTab.attr( \"tabIndex\", -1 );\n\t\t\t} else if ( toShow.length ) {\n\t\t\t\tthis.tabs.filter(function() {\n\t\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t\t})\n\t\t\t\t.attr( \"tabIndex\", -1 );\n\t\t\t}\n\t\n\t\t\ttoShow.attr({\n\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t});\n\t\t\teventData.newTab.attr({\n\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\ttabIndex: 0\n\t\t\t});\n\t\t},\n\t\n\t\t_activate: function( index ) {\n\t\t\tvar anchor,\n\t\t\t\tactive = this._findActive( index );\n\t\n\t\t\t// trying to activate the already active panel\n\t\t\tif ( active[ 0 ] === this.active[ 0 ] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// trying to collapse, simulate a click on the current active header\n\t\t\tif ( !active.length ) {\n\t\t\t\tactive = this.active;\n\t\t\t}\n\t\n\t\t\tanchor = active.find( \".ui-tabs-anchor\" )[ 0 ];\n\t\t\tthis._eventHandler({\n\t\t\t\ttarget: anchor,\n\t\t\t\tcurrentTarget: anchor,\n\t\t\t\tpreventDefault: $.noop\n\t\t\t});\n\t\t},\n\t\n\t\t_findActive: function( index ) {\n\t\t\treturn index === false ? $() : this.tabs.eq( index );\n\t\t},\n\t\n\t\t_getIndex: function( index ) {\n\t\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\t\tif ( typeof index === \"string\" ) {\n\t\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" + index + \"']\" ) );\n\t\t\t}\n\t\n\t\t\treturn index;\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tif ( this.xhr ) {\n\t\t\t\tthis.xhr.abort();\n\t\t\t}\n\t\n\t\t\tthis.element.removeClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible\" );\n\t\n\t\t\tthis.tablist\n\t\t\t\t.removeClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t\t.removeAttr( \"role\" );\n\t\n\t\t\tthis.anchors\n\t\t\t\t.removeClass( \"ui-tabs-anchor\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.removeUniqueId();\n\t\n\t\t\tthis.tabs.add( this.panels ).each(function() {\n\t\t\t\tif ( $.data( this, \"ui-tabs-destroy\" ) ) {\n\t\t\t\t\t$( this ).remove();\n\t\t\t\t} else {\n\t\t\t\t\t$( this )\n\t\t\t\t\t\t.removeClass( \"ui-state-default ui-state-active ui-state-disabled \" +\n\t\t\t\t\t\t\t\"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel\" )\n\t\t\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t\t\t.removeAttr( \"aria-live\" )\n\t\t\t\t\t\t.removeAttr( \"aria-busy\" )\n\t\t\t\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t\t\t.removeAttr( \"role\" );\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tthis.tabs.each(function() {\n\t\t\t\tvar li = $( this ),\n\t\t\t\t\tprev = li.data( \"ui-tabs-aria-controls\" );\n\t\t\t\tif ( prev ) {\n\t\t\t\t\tli\n\t\t\t\t\t\t.attr( \"aria-controls\", prev )\n\t\t\t\t\t\t.removeData( \"ui-tabs-aria-controls\" );\n\t\t\t\t} else {\n\t\t\t\t\tli.removeAttr( \"aria-controls\" );\n\t\t\t\t}\n\t\t\t});\n\t\n\t\t\tthis.panels.show();\n\t\n\t\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\t\tthis.panels.css( \"height\", \"\" );\n\t\t\t}\n\t\t},\n\t\n\t\tenable: function( index ) {\n\t\t\tvar disabled = this.options.disabled;\n\t\t\tif ( disabled === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( index === undefined ) {\n\t\t\t\tdisabled = false;\n\t\t\t} else {\n\t\t\t\tindex = this._getIndex( index );\n\t\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\t\tdisabled = $.map( disabled, function( num ) {\n\t\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tdisabled = $.map( this.tabs, function( li, num ) {\n\t\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._setupDisabled( disabled );\n\t\t},\n\t\n\t\tdisable: function( index ) {\n\t\t\tvar disabled = this.options.disabled;\n\t\t\tif ( disabled === true ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( index === undefined ) {\n\t\t\t\tdisabled = true;\n\t\t\t} else {\n\t\t\t\tindex = this._getIndex( index );\n\t\t\t\tif ( $.inArray( index, disabled ) !== -1 ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\t\tdisabled = $.merge( [ index ], disabled ).sort();\n\t\t\t\t} else {\n\t\t\t\t\tdisabled = [ index ];\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._setupDisabled( disabled );\n\t\t},\n\t\n\t\tload: function( index, event ) {\n\t\t\tindex = this._getIndex( index );\n\t\t\tvar that = this,\n\t\t\t\ttab = this.tabs.eq( index ),\n\t\t\t\tanchor = tab.find( \".ui-tabs-anchor\" ),\n\t\t\t\tpanel = this._getPanelForTab( tab ),\n\t\t\t\teventData = {\n\t\t\t\t\ttab: tab,\n\t\t\t\t\tpanel: panel\n\t\t\t\t};\n\t\n\t\t\t// not remote\n\t\t\tif ( isLocal( anchor[ 0 ] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );\n\t\n\t\t\t// support: jQuery <1.8\n\t\t\t// jQuery <1.8 returns false if the request is canceled in beforeSend,\n\t\t\t// but as of 1.8, $.ajax() always returns a jqXHR object.\n\t\t\tif ( this.xhr && this.xhr.statusText !== \"canceled\" ) {\n\t\t\t\ttab.addClass( \"ui-tabs-loading\" );\n\t\t\t\tpanel.attr( \"aria-busy\", \"true\" );\n\t\n\t\t\t\tthis.xhr\n\t\t\t\t\t.success(function( response ) {\n\t\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\tpanel.html( response );\n\t\t\t\t\t\t\tthat._trigger( \"load\", event, eventData );\n\t\t\t\t\t\t}, 1 );\n\t\t\t\t\t})\n\t\t\t\t\t.complete(function( jqXHR, status ) {\n\t\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\tif ( status === \"abort\" ) {\n\t\t\t\t\t\t\t\tthat.panels.stop( false, true );\n\t\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t\ttab.removeClass( \"ui-tabs-loading\" );\n\t\t\t\t\t\t\tpanel.removeAttr( \"aria-busy\" );\n\t\n\t\t\t\t\t\t\tif ( jqXHR === that.xhr ) {\n\t\t\t\t\t\t\t\tdelete that.xhr;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 1 );\n\t\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\n\t\t_ajaxSettings: function( anchor, event, eventData ) {\n\t\t\tvar that = this;\n\t\t\treturn {\n\t\t\t\turl: anchor.attr( \"href\" ),\n\t\t\t\tbeforeSend: function( jqXHR, settings ) {\n\t\t\t\t\treturn that._trigger( \"beforeLoad\", event,\n\t\t\t\t\t\t$.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );\n\t\t\t\t}\n\t\t\t};\n\t\t},\n\t\n\t\t_getPanelForTab: function( tab ) {\n\t\t\tvar id = $( tab ).attr( \"aria-controls\" );\n\t\t\treturn this.element.find( this._sanitizeSelector( \"#\" + id ) );\n\t\t}\n\t});\n\t\n\t})( jQuery );\n\t\n\t(function( $ ) {\n\t\n\tvar increments = 0;\n\t\n\tfunction addDescribedBy( elem, id ) {\n\t\tvar describedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ );\n\t\tdescribedby.push( id );\n\t\telem\n\t\t\t.data( \"ui-tooltip-id\", id )\n\t\t\t.attr( \"aria-describedby\", $.trim( describedby.join( \" \" ) ) );\n\t}\n\t\n\tfunction removeDescribedBy( elem ) {\n\t\tvar id = elem.data( \"ui-tooltip-id\" ),\n\t\t\tdescribedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ ),\n\t\t\tindex = $.inArray( id, describedby );\n\t\tif ( index !== -1 ) {\n\t\t\tdescribedby.splice( index, 1 );\n\t\t}\n\t\n\t\telem.removeData( \"ui-tooltip-id\" );\n\t\tdescribedby = $.trim( describedby.join( \" \" ) );\n\t\tif ( describedby ) {\n\t\t\telem.attr( \"aria-describedby\", describedby );\n\t\t} else {\n\t\t\telem.removeAttr( \"aria-describedby\" );\n\t\t}\n\t}\n\t\n\t$.widget( \"ui.tooltip\", {\n\t\tversion: \"1.10.3\",\n\t\toptions: {\n\t\t\tcontent: function() {\n\t\t\t\t// support: IE<9, Opera in jQuery <1.7\n\t\t\t\t// .text() can't accept undefined, so coerce to a string\n\t\t\t\tvar title = $( this ).attr( \"title\" ) || \"\";\n\t\t\t\t// Escape title, since we're going from an attribute to raw HTML\n\t\t\t\treturn $( \"<a>\" ).text( title ).html();\n\t\t\t},\n\t\t\thide: true,\n\t\t\t// Disabled elements have inconsistent behavior across browsers (#8661)\n\t\t\titems: \"[title]:not([disabled])\",\n\t\t\tposition: {\n\t\t\t\tmy: \"left top+15\",\n\t\t\t\tat: \"left bottom\",\n\t\t\t\tcollision: \"flipfit flip\"\n\t\t\t},\n\t\t\tshow: true,\n\t\t\ttooltipClass: null,\n\t\t\ttrack: false,\n\t\n\t\t\t// callbacks\n\t\t\tclose: null,\n\t\t\topen: null\n\t\t},\n\t\n\t\t_create: function() {\n\t\t\tthis._on({\n\t\t\t\tmouseover: \"open\",\n\t\t\t\tfocusin: \"open\"\n\t\t\t});\n\t\n\t\t\t// IDs of generated tooltips, needed for destroy\n\t\t\tthis.tooltips = {};\n\t\t\t// IDs of parent tooltips where we removed the title attribute\n\t\t\tthis.parents = {};\n\t\n\t\t\tif ( this.options.disabled ) {\n\t\t\t\tthis._disable();\n\t\t\t}\n\t\t},\n\t\n\t\t_setOption: function( key, value ) {\n\t\t\tvar that = this;\n\t\n\t\t\tif ( key === \"disabled\" ) {\n\t\t\t\tthis[ value ? \"_disable\" : \"_enable\" ]();\n\t\t\t\tthis.options[ key ] = value;\n\t\t\t\t// disable element style changes\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tthis._super( key, value );\n\t\n\t\t\tif ( key === \"content\" ) {\n\t\t\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\t\t\tthat._updateContent( element );\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\n\t\t_disable: function() {\n\t\t\tvar that = this;\n\t\n\t\t\t// close open tooltips\n\t\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\t\tvar event = $.Event( \"blur\" );\n\t\t\t\tevent.target = event.currentTarget = element[0];\n\t\t\t\tthat.close( event, true );\n\t\t\t});\n\t\n\t\t\t// remove title attributes to prevent native tooltips\n\t\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\t\tvar element = $( this );\n\t\t\t\tif ( element.is( \"[title]\" ) ) {\n\t\t\t\t\telement\n\t\t\t\t\t\t.data( \"ui-tooltip-title\", element.attr( \"title\" ) )\n\t\t\t\t\t\t.attr( \"title\", \"\" );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\t_enable: function() {\n\t\t\t// restore title attributes\n\t\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\t\tvar element = $( this );\n\t\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t\t}\n\t\t\t});\n\t\t},\n\t\n\t\topen: function( event ) {\n\t\t\tvar that = this,\n\t\t\t\ttarget = $( event ? event.target : this.element )\n\t\t\t\t\t// we need closest here due to mouseover bubbling,\n\t\t\t\t\t// but always pointing at the same event target\n\t\t\t\t\t.closest( this.options.items );\n\t\n\t\t\t// No element to show a tooltip for or the tooltip is already open\n\t\t\tif ( !target.length || target.data( \"ui-tooltip-id\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\tif ( target.attr( \"title\" ) ) {\n\t\t\t\ttarget.data( \"ui-tooltip-title\", target.attr( \"title\" ) );\n\t\t\t}\n\t\n\t\t\ttarget.data( \"ui-tooltip-open\", true );\n\t\n\t\t\t// kill parent tooltips, custom or native, for hover\n\t\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\t\ttarget.parents().each(function() {\n\t\t\t\t\tvar parent = $( this ),\n\t\t\t\t\t\tblurEvent;\n\t\t\t\t\tif ( parent.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\t\tblurEvent = $.Event( \"blur\" );\n\t\t\t\t\t\tblurEvent.target = blurEvent.currentTarget = this;\n\t\t\t\t\t\tthat.close( blurEvent, true );\n\t\t\t\t\t}\n\t\t\t\t\tif ( parent.attr( \"title\" ) ) {\n\t\t\t\t\t\tparent.uniqueId();\n\t\t\t\t\t\tthat.parents[ this.id ] = {\n\t\t\t\t\t\t\telement: this,\n\t\t\t\t\t\t\ttitle: parent.attr( \"title\" )\n\t\t\t\t\t\t};\n\t\t\t\t\t\tparent.attr( \"title\", \"\" );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tthis._updateContent( target, event );\n\t\t},\n\t\n\t\t_updateContent: function( target, event ) {\n\t\t\tvar content,\n\t\t\t\tcontentOption = this.options.content,\n\t\t\t\tthat = this,\n\t\t\t\teventType = event ? event.type : null;\n\t\n\t\t\tif ( typeof contentOption === \"string\" ) {\n\t\t\t\treturn this._open( event, target, contentOption );\n\t\t\t}\n\t\n\t\t\tcontent = contentOption.call( target[0], function( response ) {\n\t\t\t\t// ignore async response if tooltip was closed already\n\t\t\t\tif ( !target.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// IE may instantly serve a cached response for ajax requests\n\t\t\t\t// delay this call to _open so the other call to _open runs first\n\t\t\t\tthat._delay(function() {\n\t\t\t\t\t// jQuery creates a special event for focusin when it doesn't\n\t\t\t\t\t// exist natively. To improve performance, the native event\n\t\t\t\t\t// object is reused and the type is changed. Therefore, we can't\n\t\t\t\t\t// rely on the type being correct after the event finished\n\t\t\t\t\t// bubbling, so we set it back to the previous value. (#8740)\n\t\t\t\t\tif ( event ) {\n\t\t\t\t\t\tevent.type = eventType;\n\t\t\t\t\t}\n\t\t\t\t\tthis._open( event, target, response );\n\t\t\t\t});\n\t\t\t});\n\t\t\tif ( content ) {\n\t\t\t\tthis._open( event, target, content );\n\t\t\t}\n\t\t},\n\t\n\t\t_open: function( event, target, content ) {\n\t\t\tvar tooltip, events, delayedShow,\n\t\t\t\tpositionOption = $.extend( {}, this.options.position );\n\t\n\t\t\tif ( !content ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// Content can be updated multiple times. If the tooltip already\n\t\t\t// exists, then just update the content and bail.\n\t\t\ttooltip = this._find( target );\n\t\t\tif ( tooltip.length ) {\n\t\t\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// if we have a title, clear it to prevent the native tooltip\n\t\t\t// we have to check first to avoid defining a title if none exists\n\t\t\t// (we don't want to cause an element to start matching [title])\n\t\t\t//\n\t\t\t// We use removeAttr only for key events, to allow IE to export the correct\n\t\t\t// accessible attributes. For mouse events, set to empty string to avoid\n\t\t\t// native tooltip showing up (happens only when removing inside mouseover).\n\t\t\tif ( target.is( \"[title]\" ) ) {\n\t\t\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\t\t\ttarget.attr( \"title\", \"\" );\n\t\t\t\t} else {\n\t\t\t\t\ttarget.removeAttr( \"title\" );\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\ttooltip = this._tooltip( target );\n\t\t\taddDescribedBy( target, tooltip.attr( \"id\" ) );\n\t\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\t\n\t\t\tfunction position( event ) {\n\t\t\t\tpositionOption.of = event;\n\t\t\t\tif ( tooltip.is( \":hidden\" ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttooltip.position( positionOption );\n\t\t\t}\n\t\t\tif ( this.options.track && event && /^mouse/.test( event.type ) ) {\n\t\t\t\tthis._on( this.document, {\n\t\t\t\t\tmousemove: position\n\t\t\t\t});\n\t\t\t\t// trigger once to override element-relative positioning\n\t\t\t\tposition( event );\n\t\t\t} else {\n\t\t\t\ttooltip.position( $.extend({\n\t\t\t\t\tof: target\n\t\t\t\t}, this.options.position ) );\n\t\t\t}\n\t\n\t\t\ttooltip.hide();\n\t\n\t\t\tthis._show( tooltip, this.options.show );\n\t\t\t// Handle tracking tooltips that are shown with a delay (#8644). As soon\n\t\t\t// as the tooltip is visible, position the tooltip using the most recent\n\t\t\t// event.\n\t\t\tif ( this.options.show && this.options.show.delay ) {\n\t\t\t\tdelayedShow = this.delayedShow = setInterval(function() {\n\t\t\t\t\tif ( tooltip.is( \":visible\" ) ) {\n\t\t\t\t\t\tposition( positionOption.of );\n\t\t\t\t\t\tclearInterval( delayedShow );\n\t\t\t\t\t}\n\t\t\t\t}, $.fx.interval );\n\t\t\t}\n\t\n\t\t\tthis._trigger( \"open\", event, { tooltip: tooltip } );\n\t\n\t\t\tevents = {\n\t\t\t\tkeyup: function( event ) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\t\tvar fakeEvent = $.Event(event);\n\t\t\t\t\t\tfakeEvent.currentTarget = target[0];\n\t\t\t\t\t\tthis.close( fakeEvent, true );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tremove: function() {\n\t\t\t\t\tthis._removeTooltip( tooltip );\n\t\t\t\t}\n\t\t\t};\n\t\t\tif ( !event || event.type === \"mouseover\" ) {\n\t\t\t\tevents.mouseleave = \"close\";\n\t\t\t}\n\t\t\tif ( !event || event.type === \"focusin\" ) {\n\t\t\t\tevents.focusout = \"close\";\n\t\t\t}\n\t\t\tthis._on( true, target, events );\n\t\t},\n\t\n\t\tclose: function( event ) {\n\t\t\tvar that = this,\n\t\t\t\ttarget = $( event ? event.currentTarget : this.element ),\n\t\t\t\ttooltip = this._find( target );\n\t\n\t\t\t// disabling closes the tooltip, so we need to track when we're closing\n\t\t\t// to avoid an infinite loop in case the tooltip becomes disabled on close\n\t\t\tif ( this.closing ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\n\t\t\t// Clear the interval for delayed tracking tooltips\n\t\t\tclearInterval( this.delayedShow );\n\t\n\t\t\t// only set title if we had one before (see comment in _open())\n\t\t\tif ( target.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\ttarget.attr( \"title\", target.data( \"ui-tooltip-title\" ) );\n\t\t\t}\n\t\n\t\t\tremoveDescribedBy( target );\n\t\n\t\t\ttooltip.stop( true );\n\t\t\tthis._hide( tooltip, this.options.hide, function() {\n\t\t\t\tthat._removeTooltip( $( this ) );\n\t\t\t});\n\t\n\t\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\t\tthis._off( target, \"mouseleave focusout keyup\" );\n\t\t\t// Remove 'remove' binding only on delegated targets\n\t\t\tif ( target[0] !== this.element[0] ) {\n\t\t\t\tthis._off( target, \"remove\" );\n\t\t\t}\n\t\t\tthis._off( this.document, \"mousemove\" );\n\t\n\t\t\tif ( event && event.type === \"mouseleave\" ) {\n\t\t\t\t$.each( this.parents, function( id, parent ) {\n\t\t\t\t\t$( parent.element ).attr( \"title\", parent.title );\n\t\t\t\t\tdelete that.parents[ id ];\n\t\t\t\t});\n\t\t\t}\n\t\n\t\t\tthis.closing = true;\n\t\t\tthis._trigger( \"close\", event, { tooltip: tooltip } );\n\t\t\tthis.closing = false;\n\t\t},\n\t\n\t\t_tooltip: function( element ) {\n\t\t\tvar id = \"ui-tooltip-\" + increments++,\n\t\t\t\ttooltip = $( \"<div>\" )\n\t\t\t\t\t.attr({\n\t\t\t\t\t\tid: id,\n\t\t\t\t\t\trole: \"tooltip\"\n\t\t\t\t\t})\n\t\t\t\t\t.addClass( \"ui-tooltip ui-widget ui-corner-all ui-widget-content \" +\n\t\t\t\t\t\t( this.options.tooltipClass || \"\" ) );\n\t\t\t$( \"<div>\" )\n\t\t\t\t.addClass( \"ui-tooltip-content\" )\n\t\t\t\t.appendTo( tooltip );\n\t\t\ttooltip.appendTo( this.document[0].body );\n\t\t\tthis.tooltips[ id ] = element;\n\t\t\treturn tooltip;\n\t\t},\n\t\n\t\t_find: function( target ) {\n\t\t\tvar id = target.data( \"ui-tooltip-id\" );\n\t\t\treturn id ? $( \"#\" + id ) : $();\n\t\t},\n\t\n\t\t_removeTooltip: function( tooltip ) {\n\t\t\ttooltip.remove();\n\t\t\tdelete this.tooltips[ tooltip.attr( \"id\" ) ];\n\t\t},\n\t\n\t\t_destroy: function() {\n\t\t\tvar that = this;\n\t\n\t\t\t// close open tooltips\n\t\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\t\t// Delegate to close method to handle common cleanup\n\t\t\t\tvar event = $.Event( \"blur\" );\n\t\t\t\tevent.target = event.currentTarget = element[0];\n\t\t\t\tthat.close( event, true );\n\t\n\t\t\t\t// Remove immediately; destroying an open tooltip doesn't use the\n\t\t\t\t// hide animation\n\t\t\t\t$( \"#\" + id ).remove();\n\t\n\t\t\t\t// Restore the title\n\t\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t\t\telement.removeData( \"ui-tooltip-title\" );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\t\n\t}( jQuery ) );\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","/**\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/_test/range_media.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 2\n// module chunks = 0 1 2 3 4 5 6","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\n\r\n\r\nlet nm = provide('domUtil');\r\n\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\n\r\nexport default DayRange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/day-range.ts","var jQuery = require('jquery');\n\n/*! jQuery UI - v1.10.3 - 2013-05-03\n* http://jqueryui.com\n* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js\n* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */\n(function( $, undefined ) {\n\nvar uuid = 0,\n\truniqueId = /^ui-id-\\d+$/;\n\n// $.ui might exist from components with no dependencies, e.g., $.ui.position\n$.ui = $.ui || {};\n\n$.extend( $.ui, {\n\tversion: \"1.10.3\",\n\n\tkeyCode: {\n\t\tBACKSPACE: 8,\n\t\tCOMMA: 188,\n\t\tDELETE: 46,\n\t\tDOWN: 40,\n\t\tEND: 35,\n\t\tENTER: 13,\n\t\tESCAPE: 27,\n\t\tHOME: 36,\n\t\tLEFT: 37,\n\t\tNUMPAD_ADD: 107,\n\t\tNUMPAD_DECIMAL: 110,\n\t\tNUMPAD_DIVIDE: 111,\n\t\tNUMPAD_ENTER: 108,\n\t\tNUMPAD_MULTIPLY: 106,\n\t\tNUMPAD_SUBTRACT: 109,\n\t\tPAGE_DOWN: 34,\n\t\tPAGE_UP: 33,\n\t\tPERIOD: 190,\n\t\tRIGHT: 39,\n\t\tSPACE: 32,\n\t\tTAB: 9,\n\t\tUP: 38\n\t}\n});\n\n// plugins\n$.fn.extend({\n\tfocus: (function( orig ) {\n\t\treturn function( delay, fn ) {\n\t\t\treturn typeof delay === \"number\" ?\n\t\t\t\tthis.each(function() {\n\t\t\t\t\tvar elem = this;\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t$( elem ).focus();\n\t\t\t\t\t\tif ( fn ) {\n\t\t\t\t\t\t\tfn.call( elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}, delay );\n\t\t\t\t}) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.focus ),\n\n\tscrollParent: function() {\n\t\tvar scrollParent;\n\t\tif (($.ui.ie && (/(static|relative)/).test(this.css(\"position\"))) || (/absolute/).test(this.css(\"position\"))) {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(relative|absolute|fixed)/).test($.css(this,\"position\")) && (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t}).eq(0);\n\t\t} else {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t}).eq(0);\n\t\t}\n\n\t\treturn (/fixed/).test(this.css(\"position\")) || !scrollParent.length ? $(document) : scrollParent;\n\t},\n\n\tzIndex: function( zIndex ) {\n\t\tif ( zIndex !== undefined ) {\n\t\t\treturn this.css( \"zIndex\", zIndex );\n\t\t}\n\n\t\tif ( this.length ) {\n\t\t\tvar elem = $( this[ 0 ] ), position, value;\n\t\t\twhile ( elem.length && elem[ 0 ] !== document ) {\n\t\t\t\t// Ignore z-index if position is set to a value where z-index is ignored by the browser\n\t\t\t\t// This makes behavior of this function consistent across browsers\n\t\t\t\t// WebKit always returns auto if the element is positioned\n\t\t\t\tposition = elem.css( \"position\" );\n\t\t\t\tif ( position === \"absolute\" || position === \"relative\" || position === \"fixed\" ) {\n\t\t\t\t\t// IE returns 0 when zIndex is not specified\n\t\t\t\t\t// other browsers return a string\n\t\t\t\t\t// we ignore the case of nested elements with an explicit value of 0\n\t\t\t\t\t// <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n\t\t\t\t\tvalue = parseInt( elem.css( \"zIndex\" ), 10 );\n\t\t\t\t\tif ( !isNaN( value ) && value !== 0 ) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telem = elem.parent();\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t},\n\n\tuniqueId: function() {\n\t\treturn this.each(function() {\n\t\t\tif ( !this.id ) {\n\t\t\t\tthis.id = \"ui-id-\" + (++uuid);\n\t\t\t}\n\t\t});\n\t},\n\n\tremoveUniqueId: function() {\n\t\treturn this.each(function() {\n\t\t\tif ( runiqueId.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t});\n\t}\n});\n\n// selectors\nfunction focusable( element, isTabIndexNotNaN ) {\n\tvar map, mapName, img,\n\t\tnodeName = element.nodeName.toLowerCase();\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap=#\" + mapName + \"]\" )[0];\n\t\treturn !!img && visible( img );\n\t}\n\treturn ( /input|select|textarea|button|object/.test( nodeName ) ?\n\t\t!element.disabled :\n\t\t\"a\" === nodeName ?\n\t\t\telement.href || isTabIndexNotNaN :\n\t\t\tisTabIndexNotNaN) &&\n\t\t// the element and all of its ancestors must be visible\n\t\tvisible( element );\n}\n\nfunction visible( element ) {\n\treturn $.expr.filters.visible( element ) &&\n\t\t!$( element ).parents().addBack().filter(function() {\n\t\t\treturn $.css( this, \"visibility\" ) === \"hidden\";\n\t\t}).length;\n}\n\n$.extend( $.expr[ \":\" ], {\n\tdata: $.expr.createPseudo ?\n\t\t$.expr.createPseudo(function( dataName ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t};\n\t\t}) :\n\t\t// support: jQuery <1.8\n\t\tfunction( elem, i, match ) {\n\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t},\n\n\tfocusable: function( element ) {\n\t\treturn focusable( element, !isNaN( $.attr( element, \"tabindex\" ) ) );\n\t},\n\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\tisTabIndexNaN = isNaN( tabIndex );\n\t\treturn ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );\n\t}\n});\n\n// support: jQuery <1.8\nif ( !$( \"<a>\" ).outerWidth( 1 ).jquery ) {\n\t$.each( [ \"Width\", \"Height\" ], function( i, name ) {\n\t\tvar side = name === \"Width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ],\n\t\t\ttype = name.toLowerCase(),\n\t\t\torig = {\n\t\t\t\tinnerWidth: $.fn.innerWidth,\n\t\t\t\tinnerHeight: $.fn.innerHeight,\n\t\t\t\touterWidth: $.fn.outerWidth,\n\t\t\t\touterHeight: $.fn.outerHeight\n\t\t\t};\n\n\t\tfunction reduce( elem, size, border, margin ) {\n\t\t\t$.each( side, function() {\n\t\t\t\tsize -= parseFloat( $.css( elem, \"padding\" + this ) ) || 0;\n\t\t\t\tif ( border ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"border\" + this + \"Width\" ) ) || 0;\n\t\t\t\t}\n\t\t\t\tif ( margin ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"margin\" + this ) ) || 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn size;\n\t\t}\n\n\t\t$.fn[ \"inner\" + name ] = function( size ) {\n\t\t\tif ( size === undefined ) {\n\t\t\t\treturn orig[ \"inner\" + name ].call( this );\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\t$( this ).css( type, reduce( this, size ) + \"px\" );\n\t\t\t});\n\t\t};\n\n\t\t$.fn[ \"outer\" + name] = function( size, margin ) {\n\t\t\tif ( typeof size !== \"number\" ) {\n\t\t\t\treturn orig[ \"outer\" + name ].call( this, size );\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\t$( this).css( type, reduce( this, size, true, margin ) + \"px\" );\n\t\t\t});\n\t\t};\n\t});\n}\n\n// support: jQuery <1.8\nif ( !$.fn.addBack ) {\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)\nif ( $( \"<a>\" ).data( \"a-b\", \"a\" ).removeData( \"a-b\" ).data( \"a-b\" ) ) {\n\t$.fn.removeData = (function( removeData ) {\n\t\treturn function( key ) {\n\t\t\tif ( arguments.length ) {\n\t\t\t\treturn removeData.call( this, $.camelCase( key ) );\n\t\t\t} else {\n\t\t\t\treturn removeData.call( this );\n\t\t\t}\n\t\t};\n\t})( $.fn.removeData );\n}\n\n\n\n\n\n// deprecated\n$.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n\n$.support.selectstart = \"onselectstart\" in document.createElement( \"div\" );\n$.fn.extend({\n\tdisableSelection: function() {\n\t\treturn this.bind( ( $.support.selectstart ? \"selectstart\" : \"mousedown\" ) +\n\t\t\t\".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t},\n\n\tenableSelection: function() {\n\t\treturn this.unbind( \".ui-disableSelection\" );\n\t}\n});\n\n$.extend( $.ui, {\n\t// $.ui.plugin is deprecated. Use $.widget() extensions instead.\n\tplugin: {\n\t\tadd: function( module, option, set ) {\n\t\t\tvar i,\n\t\t\t\tproto = $.ui[ module ].prototype;\n\t\t\tfor ( i in set ) {\n\t\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t\t}\n\t\t},\n\t\tcall: function( instance, name, args ) {\n\t\t\tvar i,\n\t\t\t\tset = instance.plugins[ name ];\n\t\t\tif ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// only used by resizable\n\thasScroll: function( el, a ) {\n\n\t\t//If overflow is hidden, the element might have extra content, but the user wants to hide it\n\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\") {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\thas = false;\n\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\tel[ scroll ] = 1;\n\t\thas = ( el[ scroll ] > 0 );\n\t\tel[ scroll ] = 0;\n\t\treturn has;\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\nvar uuid = 0,\n\tslice = Array.prototype.slice,\n\t_cleanData = $.cleanData;\n$.cleanData = function( elems ) {\n\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\ttry {\n\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t// http://bugs.jquery.com/ticket/8235\n\t\t} catch( e ) {}\n\t}\n\t_cleanData( elems );\n};\n\n$.widget = function( name, base, prototype ) {\n\tvar fullName, existingConstructor, constructor, basePrototype,\n\t\t// proxiedPrototype allows the provided prototype to remain unmodified\n\t\t// so that it can be used as a mixin for multiple widgets (#8876)\n\t\tproxiedPrototype = {},\n\t\tnamespace = name.split( \".\" )[ 0 ];\n\n\tname = name.split( \".\" )[ 1 ];\n\tfullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\t// create selector for plugin\n\t$.expr[ \":\" ][ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\t\t// allow instantiation without \"new\" keyword\n\t\tif ( !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\t// extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\t\t// copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\t\t// track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t});\n\n\tbasePrototype = new base();\n\t// we need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( !$.isFunction( value ) ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = (function() {\n\t\t\tvar _super = function() {\n\t\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t\t},\n\t\t\t\t_superApply = function( args ) {\n\t\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t\t};\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super,\n\t\t\t\t\t__superApply = this._superApply,\n\t\t\t\t\treturnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t})();\n\t});\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t});\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor, child._proto );\n\t\t});\n\t\t// remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n};\n\n$.widget.extend = function( target ) {\n\tvar input = slice.call( arguments, 1 ),\n\t\tinputIndex = 0,\n\t\tinputLength = input.length,\n\t\tkey,\n\t\tvalue;\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\",\n\t\t\targs = slice.call( arguments, 1 ),\n\t\t\treturnValue = this;\n\n\t\t// allow multiple hashes to be passed on init\n\t\toptions = !isMethodCall && args.length ?\n\t\t\t$.widget.extend.apply( null, [ options ].concat(args) ) :\n\t\t\toptions;\n\n\t\tif ( isMethodCall ) {\n\t\t\tthis.each(function() {\n\t\t\t\tvar methodValue,\n\t\t\t\t\tinstance = $.data( this, fullName );\n\t\t\t\tif ( !instance ) {\n\t\t\t\t\treturn $.error( \"cannot call methods on \" + name + \" prior to initialization; \" +\n\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t}\n\t\t\t\tif ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name + \" widget instance\" );\n\t\t\t\t}\n\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\tmethodValue;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.each(function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} )._init();\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\toptions: {\n\t\tdisabled: false,\n\n\t\t// callbacks\n\t\tcreate: null\n\t},\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = uuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.document = $( element.style ?\n\t\t\t\t// element within the document\n\t\t\t\telement.ownerDocument :\n\t\t\t\t// element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[0].defaultView || this.document[0].parentWindow );\n\t\t}\n\n\t\tthis._create();\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\t_getCreateOptions: $.noop,\n\t_getCreateEventData: $.noop,\n\t_create: $.noop,\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tthis._destroy();\n\t\t// we can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.unbind( this.eventNamespace )\n\t\t\t// 1.9 BC for #7810\n\t\t\t// TODO remove dual storage\n\t\t\t.removeData( this.widgetName )\n\t\t\t.removeData( this.widgetFullName )\n\t\t\t// support: jquery <1.6.3\n\t\t\t// http://bugs.jquery.com/ticket/9413\n\t\t\t.removeData( $.camelCase( this.widgetFullName ) );\n\t\tthis.widget()\n\t\t\t.unbind( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t.removeClass(\n\t\t\t\tthis.widgetFullName + \"-disabled \" +\n\t\t\t\t\"ui-state-disabled\" );\n\n\t\t// clean up events and states\n\t\tthis.bindings.unbind( this.eventNamespace );\n\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t},\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key,\n\t\t\tparts,\n\t\t\tcurOption,\n\t\t\ti;\n\n\t\tif ( arguments.length === 0 ) {\n\t\t\t// don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\t\t\t// handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\t_setOption: function( key, value ) {\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.widget()\n\t\t\t\t.toggleClass( this.widgetFullName + \"-disabled ui-state-disabled\", !!value )\n\t\t\t\t.attr( \"aria-disabled\", value );\n\t\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tenable: function() {\n\t\treturn this._setOption( \"disabled\", false );\n\t},\n\tdisable: function() {\n\t\treturn this._setOption( \"disabled\", true );\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement,\n\t\t\tinstance = this;\n\n\t\t// no suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// no element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\t// accept selectors, DOM elements\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\t\t\t\t// allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^(\\w+)\\s*(.*)$/ ),\n\t\t\t\teventName = match[1] + instance.eventNamespace,\n\t\t\t\tselector = match[2];\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.delegate( selector, eventName, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.bind( eventName, handlerProxy );\n\t\t\t}\n\t\t});\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = (eventName || \"\").split( \" \" ).join( this.eventNamespace + \" \" ) + this.eventNamespace;\n\t\telement.unbind( eventName ).undelegate( eventName );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-hover\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-focus\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig,\n\t\t\tcallback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\t\t// the original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( $.isFunction( callback ) &&\n\t\t\tcallback.apply( this.element[0], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\t\tvar hasOptions,\n\t\t\teffectName = !options ?\n\t\t\t\tmethod :\n\t\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\t\tdefaultEffect :\n\t\t\t\t\toptions.effect || defaultEffect;\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t}\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue(function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t});\n\t\t}\n\t};\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\nvar mouseHandled = false;\n$( document ).mouseup( function() {\n\tmouseHandled = false;\n});\n\n$.widget(\"ui.mouse\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tcancel: \"input,textarea,button,select,option\",\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar that = this;\n\n\t\tthis.element\n\t\t\t.bind(\"mousedown.\"+this.widgetName, function(event) {\n\t\t\t\treturn that._mouseDown(event);\n\t\t\t})\n\t\t\t.bind(\"click.\"+this.widgetName, function(event) {\n\t\t\t\tif (true === $.data(event.target, that.widgetName + \".preventClickEvent\")) {\n\t\t\t\t\t$.removeData(event.target, that.widgetName + \".preventClickEvent\");\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.unbind(\".\"+this.widgetName);\n\t\tif ( this._mouseMoveDelegate ) {\n\t\t\t$(document)\n\t\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\t\t}\n\t},\n\n\t_mouseDown: function(event) {\n\t\t// don't let more than one widget handle mouseStart\n\t\tif( mouseHandled ) { return; }\n\n\t\t// we may have missed mouseup (out of window)\n\t\t(this._mouseStarted && this._mouseUp(event));\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar that = this,\n\t\t\tbtnIsLeft = (event.which === 1),\n\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t// disabled inputs (#7620)\n\t\t\telIsCancel = (typeof this.options.cancel === \"string\" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);\n\t\tif (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif (!this.mouseDelayMet) {\n\t\t\tthis._mouseDelayTimer = setTimeout(function() {\n\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t}, this.options.delay);\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted = (this._mouseStart(event) !== false);\n\t\t\tif (!this._mouseStarted) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif (true === $.data(event.target, this.widgetName + \".preventClickEvent\")) {\n\t\t\t$.removeData(event.target, this.widgetName + \".preventClickEvent\");\n\t\t}\n\n\t\t// these delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function(event) {\n\t\t\treturn that._mouseMove(event);\n\t\t};\n\t\tthis._mouseUpDelegate = function(event) {\n\t\t\treturn that._mouseUp(event);\n\t\t};\n\t\t$(document)\n\t\t\t.bind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.bind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\n\t\tevent.preventDefault();\n\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function(event) {\n\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\tif ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {\n\t\t\treturn this._mouseUp(event);\n\t\t}\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseDrag(event);\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t(this._mouseStart(this._mouseDownEvent, event) !== false);\n\t\t\t(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function(event) {\n\t\t$(document)\n\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif (event.target === this._mouseDownEvent.target) {\n\t\t\t\t$.data(event.target, this.widgetName + \".preventClickEvent\", true);\n\t\t\t}\n\n\t\t\tthis._mouseStop(event);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseDistanceMet: function(event) {\n\t\treturn (Math.max(\n\t\t\t\tMath.abs(this._mouseDownEvent.pageX - event.pageX),\n\t\t\t\tMath.abs(this._mouseDownEvent.pageY - event.pageY)\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function(/* event */) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function(/* event */) {},\n\t_mouseDrag: function(/* event */) {},\n\t_mouseStop: function(/* event */) {},\n\t_mouseCapture: function(/* event */) { return true; }\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.draggable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false,\n\n\t\t// callbacks\n\t\tdrag: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tif (this.options.helper === \"original\" && !(/^(?:r|a|f)/).test(this.element.css(\"position\"))) {\n\t\t\tthis.element[0].style.position = \"relative\";\n\t\t}\n\t\tif (this.options.addClasses){\n\t\t\tthis.element.addClass(\"ui-draggable\");\n\t\t}\n\t\tif (this.options.disabled){\n\t\t\tthis.element.addClass(\"ui-draggable-disabled\");\n\t\t}\n\n\t\tthis._mouseInit();\n\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeClass( \"ui-draggable ui-draggable-dragging ui-draggable-disabled\" );\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function(event) {\n\n\t\tvar o = this.options;\n\n\t\t// among others, prevent a drag on a resizable-handle\n\t\tif (this.helper || o.disabled || $(event.target).closest(\".ui-resizable-handle\").length > 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle(event);\n\t\tif (!this.handle) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$(o.iframeFix === true ? \"iframe\" : o.iframeFix).each(function() {\n\t\t\t$(\"<div class='ui-draggable-iframeFix' style='background: #fff;'></div>\")\n\t\t\t.css({\n\t\t\t\twidth: this.offsetWidth+\"px\", height: this.offsetHeight+\"px\",\n\t\t\t\tposition: \"absolute\", opacity: \"0.001\", zIndex: 1000\n\t\t\t})\n\t\t\t.css($(this).offset())\n\t\t\t.appendTo(\"body\");\n\t\t});\n\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\tthis.helper.addClass(\"ui-draggable-dragging\");\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\tthis.scrollParent = this.helper.scrollParent();\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tthis.offsetParentCssPosition = this.offsetParent.css( \"position\" );\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.positionAbs = this.element.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t//Reset scroll cache\n\t\tthis.offset.scroll = false;\n\n\t\t$.extend(this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t});\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition(event);\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\n\t\t//Set a containment if given in the options\n\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif(this._trigger(\"start\", event) === false) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t}\n\n\n\t\tthis._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStart(this, event);\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function(event, noPropagation) {\n\t\t// reset any necessary cached properties (see #5009)\n\t\tif ( this.offsetParentCssPosition === \"fixed\" ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition(event);\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif (!noPropagation) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif(this._trigger(\"drag\", event, ui) === false) {\n\t\t\t\tthis._mouseUp({});\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tif(!this.options.axis || this.options.axis !== \"y\") {\n\t\t\tthis.helper[0].style.left = this.position.left+\"px\";\n\t\t}\n\t\tif(!this.options.axis || this.options.axis !== \"x\") {\n\t\t\tthis.helper[0].style.top = this.position.top+\"px\";\n\t\t}\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar that = this,\n\t\t\tdropped = false;\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\tdropped = $.ui.ddmanager.drop(this, event);\n\t\t}\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif(this.dropped) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\n\t\t//if the original element is no longer in the DOM don't bother to continue (see #8269)\n\t\tif ( this.options.helper === \"original\" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif((this.options.revert === \"invalid\" && !dropped) || (this.options.revert === \"valid\" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {\n\t\t\t$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {\n\t\t\t\tif(that._trigger(\"stop\", event) !== false) {\n\t\t\t\t\tthat._clear();\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tif(this._trigger(\"stop\", event) !== false) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseUp: function(event) {\n\t\t//Remove frame helpers\n\t\t$(\"div.ui-draggable-iframeFix\").each(function() {\n\t\t\tthis.parentNode.removeChild(this);\n\t\t});\n\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)\n\t\tif( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStop(this, event);\n\t\t}\n\n\t\treturn $.ui.mouse.prototype._mouseUp.call(this, event);\n\t},\n\n\tcancel: function() {\n\n\t\tif(this.helper.is(\".ui-draggable-dragging\")) {\n\t\t\tthis._mouseUp({});\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\t_getHandle: function(event) {\n\t\treturn this.options.handle ?\n\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\ttrue;\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options,\n\t\t\thelper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === \"clone\" ? this.element.clone().removeAttr(\"id\") : this.element);\n\n\t\tif(!helper.parents(\"body\").length) {\n\t\t\thelper.appendTo((o.appendTo === \"parent\" ? this.element[0].parentNode : o.appendTo));\n\t\t}\n\n\t\tif(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css(\"position\"))) {\n\t\t\thelper.css(\"position\", \"absolute\");\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function(obj) {\n\t\tif (typeof obj === \"string\") {\n\t\t\tobj = obj.split(\" \");\n\t\t}\n\t\tif ($.isArray(obj)) {\n\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t}\n\t\tif (\"left\" in obj) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif (\"right\" in obj) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif (\"top\" in obj) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif (\"bottom\" in obj) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\tif(this.cssPosition === \"absolute\" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t//This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t//Ugly IE fix\n\t\tif((this.offsetParent[0] === document.body) ||\n\t\t\t(this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie)) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif(this.cssPosition === \"relative\") {\n\t\t\tvar p = this.element.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.element.css(\"marginLeft\"),10) || 0),\n\t\t\ttop: (parseInt(this.element.css(\"marginTop\"),10) || 0),\n\t\t\tright: (parseInt(this.element.css(\"marginRight\"),10) || 0),\n\t\t\tbottom: (parseInt(this.element.css(\"marginBottom\"),10) || 0)\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar over, c, ce,\n\t\t\to = this.options;\n\n\t\tif ( !o.containment ) {\n\t\t\tthis.containment = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"document\") {\n\t\t\tthis.containment = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment.constructor === Array ) {\n\t\t\tthis.containment = o.containment;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\n\t\tc = $( o.containment );\n\t\tce = c[ 0 ];\n\n\t\tif( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tover = c.css( \"overflow\" ) !== \"hidden\";\n\n\t\tthis.containment = [\n\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ) ,\n\t\t\t( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) - ( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,\n\t\t\t( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) - ( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top  - this.margins.bottom\n\t\t];\n\t\tthis.relative_container = c;\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif(!pos) {\n\t\t\tpos = this.position;\n\t\t}\n\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;\n\n\t\t//Cache the scroll\n\t\tif (!this.offset.scroll) {\n\t\t\tthis.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpos.top\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.top * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top * mod -\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpos.left +\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.left * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left * mod\t-\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function(event) {\n\n\t\tvar containment, co, top, left,\n\t\t\to = this.options,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY;\n\n\t\t//Cache the scroll\n\t\tif (!this.offset.scroll) {\n\t\t\tthis.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\t// If we are not dragging yet, we won't check for options\n\t\tif ( this.originalPosition ) {\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( this.relative_container ){\n\t\t\t\t\tco = this.relative_container.offset();\n\t\t\t\t\tcontainment = [\n\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t}\n\n\t\t\t\tif(event.pageX - this.offset.click.left < containment[0]) {\n\t\t\t\t\tpageX = containment[0] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top < containment[1]) {\n\t\t\t\t\tpageY = containment[1] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif(event.pageX - this.offset.click.left > containment[2]) {\n\t\t\t\t\tpageX = containment[2] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top > containment[3]) {\n\t\t\t\t\tpageY = containment[3] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(o.grid) {\n\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)\n\t\t\t\ttop = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;\n\t\t\t\tpageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tleft = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;\n\t\t\t\tpageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpageY -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.top\t-\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.top -\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpageX -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.left -\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.left -\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis.helper.removeClass(\"ui-draggable-dragging\");\n\t\tif(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function(type, event, ui) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call(this, type, [event, ui]);\n\t\t//The absolute position has to be recalculated after plugins\n\t\tif(type === \"drag\") {\n\t\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\t\t}\n\t\treturn $.Widget.prototype._trigger.call(this, type, event, ui);\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function() {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n});\n\n$.ui.plugin.add(\"draggable\", \"connectToSortable\", {\n\tstart: function(event, ui) {\n\n\t\tvar inst = $(this).data(\"ui-draggable\"), o = inst.options,\n\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\t\tinst.sortables = [];\n\t\t$(o.connectToSortable).each(function() {\n\t\t\tvar sortable = $.data(this, \"ui-sortable\");\n\t\t\tif (sortable && !sortable.options.disabled) {\n\t\t\t\tinst.sortables.push({\n\t\t\t\t\tinstance: sortable,\n\t\t\t\t\tshouldRevert: sortable.options.revert\n\t\t\t\t});\n\t\t\t\tsortable.refreshPositions();\t// Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).\n\t\t\t\tsortable._trigger(\"activate\", event, uiSortable);\n\t\t\t}\n\t\t});\n\n\t},\n\tstop: function(event, ui) {\n\n\t\t//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper\n\t\tvar inst = $(this).data(\"ui-draggable\"),\n\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\n\t\t$.each(inst.sortables, function() {\n\t\t\tif(this.instance.isOver) {\n\n\t\t\t\tthis.instance.isOver = 0;\n\n\t\t\t\tinst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance\n\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)\n\n\t\t\t\t//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: \"valid/invalid\"\n\t\t\t\tif(this.shouldRevert) {\n\t\t\t\t\tthis.instance.options.revert = this.shouldRevert;\n\t\t\t\t}\n\n\t\t\t\t//Trigger the stop of the sortable\n\t\t\t\tthis.instance._mouseStop(event);\n\n\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\n\t\t\t\t//If the helper has been the original item, restore properties in the sortable\n\t\t\t\tif(inst.options.helper === \"original\") {\n\t\t\t\t\tthis.instance.currentItem.css({ top: \"auto\", left: \"auto\" });\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance\n\t\t\t\tthis.instance._trigger(\"deactivate\", event, uiSortable);\n\t\t\t}\n\n\t\t});\n\n\t},\n\tdrag: function(event, ui) {\n\n\t\tvar inst = $(this).data(\"ui-draggable\"), that = this;\n\n\t\t$.each(inst.sortables, function() {\n\n\t\t\tvar innermostIntersecting = false,\n\t\t\t\tthisSortable = this;\n\n\t\t\t//Copy over some variables to allow calling the sortable's native _intersectsWith\n\t\t\tthis.instance.positionAbs = inst.positionAbs;\n\t\t\tthis.instance.helperProportions = inst.helperProportions;\n\t\t\tthis.instance.offset.click = inst.offset.click;\n\n\t\t\tif(this.instance._intersectsWith(this.instance.containerCache)) {\n\t\t\t\tinnermostIntersecting = true;\n\t\t\t\t$.each(inst.sortables, function () {\n\t\t\t\t\tthis.instance.positionAbs = inst.positionAbs;\n\t\t\t\t\tthis.instance.helperProportions = inst.helperProportions;\n\t\t\t\t\tthis.instance.offset.click = inst.offset.click;\n\t\t\t\t\tif (this !== thisSortable &&\n\t\t\t\t\t\tthis.instance._intersectsWith(this.instance.containerCache) &&\n\t\t\t\t\t\t$.contains(thisSortable.instance.element[0], this.instance.element[0])\n\t\t\t\t\t) {\n\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t}\n\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t});\n\t\t\t}\n\n\n\t\t\tif(innermostIntersecting) {\n\t\t\t\t//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once\n\t\t\t\tif(!this.instance.isOver) {\n\n\t\t\t\t\tthis.instance.isOver = 1;\n\t\t\t\t\t//Now we fake the start of dragging for the sortable instance,\n\t\t\t\t\t//by cloning the list group item, appending it to the sortable and using it as inst.currentItem\n\t\t\t\t\t//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)\n\t\t\t\t\tthis.instance.currentItem = $(that).clone().removeAttr(\"id\").appendTo(this.instance.element).data(\"ui-sortable-item\", true);\n\t\t\t\t\tthis.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it\n\t\t\t\t\tthis.instance.options.helper = function() { return ui.helper[0]; };\n\n\t\t\t\t\tevent.target = this.instance.currentItem[0];\n\t\t\t\t\tthis.instance._mouseCapture(event, true);\n\t\t\t\t\tthis.instance._mouseStart(event, true, true);\n\n\t\t\t\t\t//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes\n\t\t\t\t\tthis.instance.offset.click.top = inst.offset.click.top;\n\t\t\t\t\tthis.instance.offset.click.left = inst.offset.click.left;\n\t\t\t\t\tthis.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;\n\t\t\t\t\tthis.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;\n\n\t\t\t\t\tinst._trigger(\"toSortable\", event);\n\t\t\t\t\tinst.dropped = this.instance.element; //draggable revert needs that\n\t\t\t\t\t//hack so receive/update callbacks work (mostly)\n\t\t\t\t\tinst.currentItem = inst.element;\n\t\t\t\t\tthis.instance.fromOutside = inst;\n\n\t\t\t\t}\n\n\t\t\t\t//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable\n\t\t\t\tif(this.instance.currentItem) {\n\t\t\t\t\tthis.instance._mouseDrag(event);\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t//If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval\n\t\t\t\tif(this.instance.isOver) {\n\n\t\t\t\t\tthis.instance.isOver = 0;\n\t\t\t\t\tthis.instance.cancelHelperRemoval = true;\n\n\t\t\t\t\t//Prevent reverting on this forced stop\n\t\t\t\t\tthis.instance.options.revert = false;\n\n\t\t\t\t\t// The out event needs to be triggered independently\n\t\t\t\t\tthis.instance._trigger(\"out\", event, this.instance._uiHash(this.instance));\n\n\t\t\t\t\tthis.instance._mouseStop(event, true);\n\t\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\n\t\t\t\t\t//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size\n\t\t\t\t\tthis.instance.currentItem.remove();\n\t\t\t\t\tif(this.instance.placeholder) {\n\t\t\t\t\t\tthis.instance.placeholder.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tinst._trigger(\"fromSortable\", event);\n\t\t\t\t\tinst.dropped = false; //draggable revert needs that\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"cursor\", {\n\tstart: function() {\n\t\tvar t = $(\"body\"), o = $(this).data(\"ui-draggable\").options;\n\t\tif (t.css(\"cursor\")) {\n\t\t\to._cursor = t.css(\"cursor\");\n\t\t}\n\t\tt.css(\"cursor\", o.cursor);\n\t},\n\tstop: function() {\n\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\tif (o._cursor) {\n\t\t\t$(\"body\").css(\"cursor\", o._cursor);\n\t\t}\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"opacity\", {\n\tstart: function(event, ui) {\n\t\tvar t = $(ui.helper), o = $(this).data(\"ui-draggable\").options;\n\t\tif(t.css(\"opacity\")) {\n\t\t\to._opacity = t.css(\"opacity\");\n\t\t}\n\t\tt.css(\"opacity\", o.opacity);\n\t},\n\tstop: function(event, ui) {\n\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\tif(o._opacity) {\n\t\t\t$(ui.helper).css(\"opacity\", o._opacity);\n\t\t}\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"scroll\", {\n\tstart: function() {\n\t\tvar i = $(this).data(\"ui-draggable\");\n\t\tif(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== \"HTML\") {\n\t\t\ti.overflowOffset = i.scrollParent.offset();\n\t\t}\n\t},\n\tdrag: function( event ) {\n\n\t\tvar i = $(this).data(\"ui-draggable\"), o = i.options, scrolled = false;\n\n\t\tif(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== \"HTML\") {\n\n\t\t\tif(!o.axis || o.axis !== \"x\") {\n\t\t\t\tif((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\t} else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!o.axis || o.axis !== \"y\") {\n\t\t\t\tif((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif(!o.axis || o.axis !== \"x\") {\n\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\t} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!o.axis || o.axis !== \"y\") {\n\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\t} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(i, event);\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"snap\", {\n\tstart: function() {\n\n\t\tvar i = $(this).data(\"ui-draggable\"),\n\t\t\to = i.options;\n\n\t\ti.snapElements = [];\n\n\t\t$(o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap).each(function() {\n\t\t\tvar $t = $(this),\n\t\t\t\t$o = $t.offset();\n\t\t\tif(this !== i.element[0]) {\n\t\t\t\ti.snapElements.push({\n\t\t\t\t\titem: this,\n\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t},\n\tdrag: function(event, ui) {\n\n\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\tinst = $(this).data(\"ui-draggable\"),\n\t\t\to = inst.options,\n\t\t\td = o.snapTolerance,\n\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor (i = inst.snapElements.length - 1; i >= 0; i--){\n\n\t\t\tl = inst.snapElements[i].left;\n\t\t\tr = l + inst.snapElements[i].width;\n\t\t\tt = inst.snapElements[i].top;\n\t\t\tb = t + inst.snapElements[i].height;\n\n\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {\n\t\t\t\tif(inst.snapElements[i].snapping) {\n\t\t\t\t\t(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t\t}\n\t\t\t\tinst.snapElements[i].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(o.snapMode !== \"inner\") {\n\t\t\t\tts = Math.abs(t - y2) <= d;\n\t\t\t\tbs = Math.abs(b - y1) <= d;\n\t\t\t\tls = Math.abs(l - x2) <= d;\n\t\t\t\trs = Math.abs(r - x1) <= d;\n\t\t\t\tif(ts) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(bs) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(ls) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t\tif(rs) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfirst = (ts || bs || ls || rs);\n\n\t\t\tif(o.snapMode !== \"outer\") {\n\t\t\t\tts = Math.abs(t - y1) <= d;\n\t\t\t\tbs = Math.abs(b - y2) <= d;\n\t\t\t\tls = Math.abs(l - x1) <= d;\n\t\t\t\trs = Math.abs(r - x2) <= d;\n\t\t\t\tif(ts) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(bs) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(ls) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t\tif(rs) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {\n\t\t\t\t(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t}\n\t\t\tinst.snapElements[i].snapping = (ts || bs || ls || rs || first);\n\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"stack\", {\n\tstart: function() {\n\t\tvar min,\n\t\t\to = this.data(\"ui-draggable\").options,\n\t\t\tgroup = $.makeArray($(o.stack)).sort(function(a,b) {\n\t\t\t\treturn (parseInt($(a).css(\"zIndex\"),10) || 0) - (parseInt($(b).css(\"zIndex\"),10) || 0);\n\t\t\t});\n\n\t\tif (!group.length) { return; }\n\n\t\tmin = parseInt($(group[0]).css(\"zIndex\"), 10) || 0;\n\t\t$(group).each(function(i) {\n\t\t\t$(this).css(\"zIndex\", min + i);\n\t\t});\n\t\tthis.css(\"zIndex\", (min + group.length));\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"zIndex\", {\n\tstart: function(event, ui) {\n\t\tvar t = $(ui.helper), o = $(this).data(\"ui-draggable\").options;\n\t\tif(t.css(\"zIndex\")) {\n\t\t\to._zIndex = t.css(\"zIndex\");\n\t\t}\n\t\tt.css(\"zIndex\", o.zIndex);\n\t},\n\tstop: function(event, ui) {\n\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\tif(o._zIndex) {\n\t\t\t$(ui.helper).css(\"zIndex\", o._zIndex);\n\t\t}\n\t}\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nfunction isOverAxis( x, reference, size ) {\n\treturn ( x > reference ) && ( x < ( reference + size ) );\n}\n\n$.widget(\"ui.droppable\", {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"drop\",\n\toptions: {\n\t\taccept: \"*\",\n\t\tactiveClass: false,\n\t\taddClasses: true,\n\t\tgreedy: false,\n\t\thoverClass: false,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tdeactivate: null,\n\t\tdrop: null,\n\t\tout: null,\n\t\tover: null\n\t},\n\t_create: function() {\n\n\t\tvar o = this.options,\n\t\t\taccept = o.accept;\n\n\t\tthis.isover = false;\n\t\tthis.isout = true;\n\n\t\tthis.accept = $.isFunction(accept) ? accept : function(d) {\n\t\t\treturn d.is(accept);\n\t\t};\n\n\t\t//Store the droppable's proportions\n\t\tthis.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };\n\n\t\t// Add the reference and positions to the manager\n\t\t$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];\n\t\t$.ui.ddmanager.droppables[o.scope].push(this);\n\n\t\t(o.addClasses && this.element.addClass(\"ui-droppable\"));\n\n\t},\n\n\t_destroy: function() {\n\t\tvar i = 0,\n\t\t\tdrop = $.ui.ddmanager.droppables[this.options.scope];\n\n\t\tfor ( ; i < drop.length; i++ ) {\n\t\t\tif ( drop[i] === this ) {\n\t\t\t\tdrop.splice(i, 1);\n\t\t\t}\n\t\t}\n\n\t\tthis.element.removeClass(\"ui-droppable ui-droppable-disabled\");\n\t},\n\n\t_setOption: function(key, value) {\n\n\t\tif(key === \"accept\") {\n\t\t\tthis.accept = $.isFunction(value) ? value : function(d) {\n\t\t\t\treturn d.is(value);\n\t\t\t};\n\t\t}\n\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t},\n\n\t_activate: function(event) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif(this.options.activeClass) {\n\t\t\tthis.element.addClass(this.options.activeClass);\n\t\t}\n\t\tif(draggable){\n\t\t\tthis._trigger(\"activate\", event, this.ui(draggable));\n\t\t}\n\t},\n\n\t_deactivate: function(event) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif(this.options.activeClass) {\n\t\t\tthis.element.removeClass(this.options.activeClass);\n\t\t}\n\t\tif(draggable){\n\t\t\tthis._trigger(\"deactivate\", event, this.ui(draggable));\n\t\t}\n\t},\n\n\t_over: function(event) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.hoverClass) {\n\t\t\t\tthis.element.addClass(this.options.hoverClass);\n\t\t\t}\n\t\t\tthis._trigger(\"over\", event, this.ui(draggable));\n\t\t}\n\n\t},\n\n\t_out: function(event) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.hoverClass) {\n\t\t\t\tthis.element.removeClass(this.options.hoverClass);\n\t\t\t}\n\t\t\tthis._trigger(\"out\", event, this.ui(draggable));\n\t\t}\n\n\t},\n\n\t_drop: function(event,custom) {\n\n\t\tvar draggable = custom || $.ui.ddmanager.current,\n\t\t\tchildrenIntersection = false;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.element.find(\":data(ui-droppable)\").not(\".ui-draggable-dragging\").each(function() {\n\t\t\tvar inst = $.data(this, \"ui-droppable\");\n\t\t\tif(\n\t\t\t\tinst.options.greedy &&\n\t\t\t\t!inst.options.disabled &&\n\t\t\t\tinst.options.scope === draggable.options.scope &&\n\t\t\t\tinst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&\n\t\t\t\t$.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)\n\t\t\t) { childrenIntersection = true; return false; }\n\t\t});\n\t\tif(childrenIntersection) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.activeClass) {\n\t\t\t\tthis.element.removeClass(this.options.activeClass);\n\t\t\t}\n\t\t\tif(this.options.hoverClass) {\n\t\t\t\tthis.element.removeClass(this.options.hoverClass);\n\t\t\t}\n\t\t\tthis._trigger(\"drop\", event, this.ui(draggable));\n\t\t\treturn this.element;\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tui: function(c) {\n\t\treturn {\n\t\t\tdraggable: (c.currentItem || c.element),\n\t\t\thelper: c.helper,\n\t\t\tposition: c.position,\n\t\t\toffset: c.positionAbs\n\t\t};\n\t}\n\n});\n\n$.ui.intersect = function(draggable, droppable, toleranceMode) {\n\n\tif (!droppable.offset) {\n\t\treturn false;\n\t}\n\n\tvar draggableLeft, draggableTop,\n\t\tx1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,\n\t\ty1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,\n\t\tl = droppable.offset.left, r = l + droppable.proportions.width,\n\t\tt = droppable.offset.top, b = t + droppable.proportions.height;\n\n\tswitch (toleranceMode) {\n\t\tcase \"fit\":\n\t\t\treturn (l <= x1 && x2 <= r && t <= y1 && y2 <= b);\n\t\tcase \"intersect\":\n\t\t\treturn (l < x1 + (draggable.helperProportions.width / 2) && // Right Half\n\t\t\t\tx2 - (draggable.helperProportions.width / 2) < r && // Left Half\n\t\t\t\tt < y1 + (draggable.helperProportions.height / 2) && // Bottom Half\n\t\t\t\ty2 - (draggable.helperProportions.height / 2) < b ); // Top Half\n\t\tcase \"pointer\":\n\t\t\tdraggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);\n\t\t\tdraggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);\n\t\t\treturn isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );\n\t\tcase \"touch\":\n\t\t\treturn (\n\t\t\t\t(y1 >= t && y1 <= b) ||\t// Top edge touching\n\t\t\t\t(y2 >= t && y2 <= b) ||\t// Bottom edge touching\n\t\t\t\t(y1 < t && y2 > b)\t\t// Surrounded vertically\n\t\t\t) && (\n\t\t\t\t(x1 >= l && x1 <= r) ||\t// Left edge touching\n\t\t\t\t(x2 >= l && x2 <= r) ||\t// Right edge touching\n\t\t\t\t(x1 < l && x2 > r)\t\t// Surrounded horizontally\n\t\t\t);\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\n};\n\n/*\n\tThis manager tracks offsets of draggables and droppables\n*/\n$.ui.ddmanager = {\n\tcurrent: null,\n\tdroppables: { \"default\": [] },\n\tprepareOffsets: function(t, event) {\n\n\t\tvar i, j,\n\t\t\tm = $.ui.ddmanager.droppables[t.options.scope] || [],\n\t\t\ttype = event ? event.type : null, // workaround for #2317\n\t\t\tlist = (t.currentItem || t.element).find(\":data(ui-droppable)\").addBack();\n\n\t\tdroppablesLoop: for (i = 0; i < m.length; i++) {\n\n\t\t\t//No disabled and non-accepted\n\t\t\tif(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Filter out elements in the current dragged item\n\t\t\tfor (j=0; j < list.length; j++) {\n\t\t\t\tif(list[j] === m[i].element[0]) {\n\t\t\t\t\tm[i].proportions.height = 0;\n\t\t\t\t\tcontinue droppablesLoop;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tm[i].visible = m[i].element.css(\"display\") !== \"none\";\n\t\t\tif(!m[i].visible) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//Activate the droppable if used directly from draggables\n\t\t\tif(type === \"mousedown\") {\n\t\t\t\tm[i]._activate.call(m[i], event);\n\t\t\t}\n\n\t\t\tm[i].offset = m[i].element.offset();\n\t\t\tm[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };\n\n\t\t}\n\n\t},\n\tdrop: function(draggable, event) {\n\n\t\tvar dropped = false;\n\t\t// Create a copy of the droppables in case the list changes during the drop (#9116)\n\t\t$.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {\n\n\t\t\tif(!this.options) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {\n\t\t\t\tdropped = this._drop.call(this, event) || dropped;\n\t\t\t}\n\n\t\t\tif (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\t\tthis.isout = true;\n\t\t\t\tthis.isover = false;\n\t\t\t\tthis._deactivate.call(this, event);\n\t\t\t}\n\n\t\t});\n\t\treturn dropped;\n\n\t},\n\tdragStart: function( draggable, event ) {\n\t\t//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)\n\t\tdraggable.element.parentsUntil( \"body\" ).bind( \"scroll.droppable\", function() {\n\t\t\tif( !draggable.options.refreshPositions ) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t\t}\n\t\t});\n\t},\n\tdrag: function(draggable, event) {\n\n\t\t//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.\n\t\tif(draggable.options.refreshPositions) {\n\t\t\t$.ui.ddmanager.prepareOffsets(draggable, event);\n\t\t}\n\n\t\t//Run through all droppables and check their positions based on specific tolerance options\n\t\t$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {\n\n\t\t\tif(this.options.disabled || this.greedyChild || !this.visible) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar parentInstance, scope, parent,\n\t\t\t\tintersects = $.ui.intersect(draggable, this, this.options.tolerance),\n\t\t\t\tc = !intersects && this.isover ? \"isout\" : (intersects && !this.isover ? \"isover\" : null);\n\t\t\tif(!c) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.options.greedy) {\n\t\t\t\t// find droppable parents with same scope\n\t\t\t\tscope = this.options.scope;\n\t\t\t\tparent = this.element.parents(\":data(ui-droppable)\").filter(function () {\n\t\t\t\t\treturn $.data(this, \"ui-droppable\").options.scope === scope;\n\t\t\t\t});\n\n\t\t\t\tif (parent.length) {\n\t\t\t\t\tparentInstance = $.data(parent[0], \"ui-droppable\");\n\t\t\t\t\tparentInstance.greedyChild = (c === \"isover\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// we just moved into a greedy child\n\t\t\tif (parentInstance && c === \"isover\") {\n\t\t\t\tparentInstance.isover = false;\n\t\t\t\tparentInstance.isout = true;\n\t\t\t\tparentInstance._out.call(parentInstance, event);\n\t\t\t}\n\n\t\t\tthis[c] = true;\n\t\t\tthis[c === \"isout\" ? \"isover\" : \"isout\"] = false;\n\t\t\tthis[c === \"isover\" ? \"_over\" : \"_out\"].call(this, event);\n\n\t\t\t// we just moved out of a greedy child\n\t\t\tif (parentInstance && c === \"isout\") {\n\t\t\t\tparentInstance.isout = false;\n\t\t\t\tparentInstance.isover = true;\n\t\t\t\tparentInstance._over.call(parentInstance, event);\n\t\t\t}\n\t\t});\n\n\t},\n\tdragStop: function( draggable, event ) {\n\t\tdraggable.element.parentsUntil( \"body\" ).unbind( \"scroll.droppable\" );\n\t\t//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)\n\t\tif( !draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\t}\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nfunction num(v) {\n\treturn parseInt(v, 10) || 0;\n}\n\nfunction isNumber(value) {\n\treturn !isNaN(parseInt(value, 10));\n}\n\n$.widget(\"ui.resizable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\t\t// See #7960\n\t\tzIndex: 90,\n\n\t\t// callbacks\n\t\tresize: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tvar n, i, handle, axis, hname,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\t\tthis.element.addClass(\"ui-resizable\");\n\n\t\t$.extend(this, {\n\t\t\t_aspectRatio: !!(o.aspectRatio),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t});\n\n\t\t//Wrap the element if it cannot hold child nodes\n\t\tif(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {\n\n\t\t\t//Create a wrapper element and set the wrapper to the new current internal element\n\t\t\tthis.element.wrap(\n\t\t\t\t$(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({\n\t\t\t\t\tposition: this.element.css(\"position\"),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css(\"top\"),\n\t\t\t\t\tleft: this.element.css(\"left\")\n\t\t\t\t})\n\t\t\t);\n\n\t\t\t//Overwrite the original this.element\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"ui-resizable\", this.element.data(\"ui-resizable\")\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\t//Move margins to the wrapper\n\t\t\tthis.element.css({ marginLeft: this.originalElement.css(\"marginLeft\"), marginTop: this.originalElement.css(\"marginTop\"), marginRight: this.originalElement.css(\"marginRight\"), marginBottom: this.originalElement.css(\"marginBottom\") });\n\t\t\tthis.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});\n\n\t\t\t//Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css(\"resize\");\n\t\t\tthis.originalElement.css(\"resize\", \"none\");\n\n\t\t\t//Push the actual element to our proportionallyResize internal array\n\t\t\tthis._proportionallyResizeElements.push(this.originalElement.css({ position: \"static\", zoom: 1, display: \"block\" }));\n\n\t\t\t// avoid IE jump (hard set the margin)\n\t\t\tthis.originalElement.css({ margin: this.originalElement.css(\"margin\") });\n\n\t\t\t// fix handlers offset\n\t\t\tthis._proportionallyResize();\n\n\t\t}\n\n\t\tthis.handles = o.handles || (!$(\".ui-resizable-handle\", this.element).length ? \"e,s,se\" : { n: \".ui-resizable-n\", e: \".ui-resizable-e\", s: \".ui-resizable-s\", w: \".ui-resizable-w\", se: \".ui-resizable-se\", sw: \".ui-resizable-sw\", ne: \".ui-resizable-ne\", nw: \".ui-resizable-nw\" });\n\t\tif(this.handles.constructor === String) {\n\n\t\t\tif ( this.handles === \"all\") {\n\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t}\n\n\t\t\tn = this.handles.split(\",\");\n\t\t\tthis.handles = {};\n\n\t\t\tfor(i = 0; i < n.length; i++) {\n\n\t\t\t\thandle = $.trim(n[i]);\n\t\t\t\thname = \"ui-resizable-\"+handle;\n\t\t\t\taxis = $(\"<div class='ui-resizable-handle \" + hname + \"'></div>\");\n\n\t\t\t\t// Apply zIndex to all handles - see #7960\n\t\t\t\taxis.css({ zIndex: o.zIndex });\n\n\t\t\t\t//TODO : What's going on here?\n\t\t\t\tif (\"se\" === handle) {\n\t\t\t\t\taxis.addClass(\"ui-icon ui-icon-gripsmall-diagonal-se\");\n\t\t\t\t}\n\n\t\t\t\t//Insert into internal handles object and append to element\n\t\t\t\tthis.handles[handle] = \".ui-resizable-\"+handle;\n\t\t\t\tthis.element.append(axis);\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function(target) {\n\n\t\t\tvar i, axis, padPos, padWrapper;\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor(i in this.handles) {\n\n\t\t\t\tif(this.handles[i].constructor === String) {\n\t\t\t\t\tthis.handles[i] = $(this.handles[i], this.element).show();\n\t\t\t\t}\n\n\t\t\t\t//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)\n\t\t\t\tif (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {\n\n\t\t\t\t\taxis = $(this.handles[i], this.element);\n\n\t\t\t\t\t//Checking the correct pad and border\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();\n\n\t\t\t\t\t//The padding type i have to apply...\n\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t/ne|nw|n/.test(i) ? \"Top\" :\n\t\t\t\t\t\t/se|sw|s/.test(i) ? \"Bottom\" :\n\t\t\t\t\t\t/^e$/.test(i) ? \"Right\" : \"Left\" ].join(\"\");\n\n\t\t\t\t\ttarget.css(padPos, padWrapper);\n\n\t\t\t\t\tthis._proportionallyResize();\n\n\t\t\t\t}\n\n\t\t\t\t//TODO: What's that good for? There's not anything to be executed left\n\t\t\t\tif(!$(this.handles[i]).length) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//TODO: make renderAxis a prototype function\n\t\tthis._renderAxis(this.element);\n\n\t\tthis._handles = $(\".ui-resizable-handle\", this.element)\n\t\t\t.disableSelection();\n\n\t\t//Matching axis name\n\t\tthis._handles.mouseover(function() {\n\t\t\tif (!that.resizing) {\n\t\t\t\tif (this.className) {\n\t\t\t\t\taxis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);\n\t\t\t\t}\n\t\t\t\t//Axis, default = se\n\t\t\t\tthat.axis = axis && axis[1] ? axis[1] : \"se\";\n\t\t\t}\n\t\t});\n\n\t\t//If we want to auto hide the elements\n\t\tif (o.autoHide) {\n\t\t\tthis._handles.hide();\n\t\t\t$(this.element)\n\t\t\t\t.addClass(\"ui-resizable-autohide\")\n\t\t\t\t.mouseenter(function() {\n\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$(this).removeClass(\"ui-resizable-autohide\");\n\t\t\t\t\tthat._handles.show();\n\t\t\t\t})\n\t\t\t\t.mouseleave(function(){\n\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (!that.resizing) {\n\t\t\t\t\t\t$(this).addClass(\"ui-resizable-autohide\");\n\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\n\t\t//Initialize the mouse interaction\n\t\tthis._mouseInit();\n\n\t},\n\n\t_destroy: function() {\n\n\t\tthis._mouseDestroy();\n\n\t\tvar wrapper,\n\t\t\t_destroy = function(exp) {\n\t\t\t\t$(exp).removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\")\n\t\t\t\t\t.removeData(\"resizable\").removeData(\"ui-resizable\").unbind(\".resizable\").find(\".ui-resizable-handle\").remove();\n\t\t\t};\n\n\t\t//TODO: Unwrap at same DOM position\n\t\tif (this.elementIsWrapper) {\n\t\t\t_destroy(this.element);\n\t\t\twrapper = this.element;\n\t\t\tthis.originalElement.css({\n\t\t\t\tposition: wrapper.css(\"position\"),\n\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\ttop: wrapper.css(\"top\"),\n\t\t\t\tleft: wrapper.css(\"left\")\n\t\t\t}).insertAfter( wrapper );\n\t\t\twrapper.remove();\n\t\t}\n\n\t\tthis.originalElement.css(\"resize\", this.originalResizeStyle);\n\t\t_destroy(this.originalElement);\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function(event) {\n\t\tvar i, handle,\n\t\t\tcapture = false;\n\n\t\tfor (i in this.handles) {\n\t\t\thandle = $(this.handles[i])[0];\n\t\t\tif (handle === event.target || $.contains(handle, event.target)) {\n\t\t\t\tcapture = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && capture;\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar curleft, curtop, cursor,\n\t\t\to = this.options,\n\t\t\tiniPos = this.element.position(),\n\t\t\tel = this.element;\n\n\t\tthis.resizing = true;\n\n\t\t// bugfix for http://dev.jquery.com/ticket/1749\n\t\tif ( (/absolute/).test( el.css(\"position\") ) ) {\n\t\t\tel.css({ position: \"absolute\", top: el.css(\"top\"), left: el.css(\"left\") });\n\t\t} else if (el.is(\".ui-draggable\")) {\n\t\t\tel.css({ position: \"absolute\", top: iniPos.top, left: iniPos.left });\n\t\t}\n\n\t\tthis._renderProxy();\n\n\t\tcurleft = num(this.helper.css(\"left\"));\n\t\tcurtop = num(this.helper.css(\"top\"));\n\n\t\tif (o.containment) {\n\t\t\tcurleft += $(o.containment).scrollLeft() || 0;\n\t\t\tcurtop += $(o.containment).scrollTop() || 0;\n\t\t}\n\n\t\t//Store needed variables\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\t\tthis.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\tthis.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\t//Aspect Ratio\n\t\tthis.aspectRatio = (typeof o.aspectRatio === \"number\") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);\n\n\t\tcursor = $(\".ui-resizable-\" + this.axis).css(\"cursor\");\n\t\t$(\"body\").css(\"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor);\n\n\t\tel.addClass(\"ui-resizable-resizing\");\n\t\tthis._propagate(\"start\", event);\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\t//Increase performance, avoid regex\n\t\tvar data,\n\t\t\tel = this.helper, props = {},\n\t\t\tsmp = this.originalMousePosition,\n\t\t\ta = this.axis,\n\t\t\tprevTop = this.position.top,\n\t\t\tprevLeft = this.position.left,\n\t\t\tprevWidth = this.size.width,\n\t\t\tprevHeight = this.size.height,\n\t\t\tdx = (event.pageX-smp.left)||0,\n\t\t\tdy = (event.pageY-smp.top)||0,\n\t\t\ttrigger = this._change[a];\n\n\t\tif (!trigger) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Calculate the attrs that will be change\n\t\tdata = trigger.apply(this, [event, dx, dy]);\n\n\t\t// Put this in the mouseDrag handler since the user can start pressing shift while resizing\n\t\tthis._updateVirtualBoundaries(event.shiftKey);\n\t\tif (this._aspectRatio || event.shiftKey) {\n\t\t\tdata = this._updateRatio(data, event);\n\t\t}\n\n\t\tdata = this._respectSize(data, event);\n\n\t\tthis._updateCache(data);\n\n\t\t// plugins callbacks need to be called first\n\t\tthis._propagate(\"resize\", event);\n\n\t\tif (this.position.top !== prevTop) {\n\t\t\tprops.top = this.position.top + \"px\";\n\t\t}\n\t\tif (this.position.left !== prevLeft) {\n\t\t\tprops.left = this.position.left + \"px\";\n\t\t}\n\t\tif (this.size.width !== prevWidth) {\n\t\t\tprops.width = this.size.width + \"px\";\n\t\t}\n\t\tif (this.size.height !== prevHeight) {\n\t\t\tprops.height = this.size.height + \"px\";\n\t\t}\n\t\tel.css(props);\n\n\t\tif (!this._helper && this._proportionallyResizeElements.length) {\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\t// Call the user callback if the element was resized\n\t\tif ( ! $.isEmptyObject(props) ) {\n\t\t\tthis._trigger(\"resize\", event, this.ui());\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\tthis.resizing = false;\n\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\to = this.options, that = this;\n\n\t\tif(this._helper) {\n\n\t\t\tpr = this._proportionallyResizeElements;\n\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName);\n\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], \"left\") /* TODO - jump height */ ? 0 : that.sizeDiff.height;\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\n\t\t\ts = { width: (that.helper.width()  - soffsetw), height: (that.helper.height() - soffseth) };\n\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) + (that.position.left - that.originalPosition.left)) || null;\n\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) + (that.position.top - that.originalPosition.top)) || null;\n\n\t\t\tif (!o.animate) {\n\t\t\t\tthis.element.css($.extend(s, { top: top, left: left }));\n\t\t\t}\n\n\t\t\tthat.helper.height(that.size.height);\n\t\t\tthat.helper.width(that.size.width);\n\n\t\t\tif (this._helper && !o.animate) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\t}\n\n\t\t$(\"body\").css(\"cursor\", \"auto\");\n\n\t\tthis.element.removeClass(\"ui-resizable-resizing\");\n\n\t\tthis._propagate(\"stop\", event);\n\n\t\tif (this._helper) {\n\t\t\tthis.helper.remove();\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\t_updateVirtualBoundaries: function(forceAspectRatio) {\n\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\to = this.options;\n\n\t\tb = {\n\t\t\tminWidth: isNumber(o.minWidth) ? o.minWidth : 0,\n\t\t\tmaxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,\n\t\t\tminHeight: isNumber(o.minHeight) ? o.minHeight : 0,\n\t\t\tmaxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity\n\t\t};\n\n\t\tif(this._aspectRatio || forceAspectRatio) {\n\t\t\t// We want to create an enclosing box whose aspect ration is the requested one\n\t\t\t// First, compute the \"projected\" size for each dimension based on the aspect ratio and other dimension\n\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\n\t\t\tif(pMinWidth > b.minWidth) {\n\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t}\n\t\t\tif(pMinHeight > b.minHeight) {\n\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t}\n\t\t\tif(pMaxWidth < b.maxWidth) {\n\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t}\n\t\t\tif(pMaxHeight < b.maxHeight) {\n\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t}\n\t\t}\n\t\tthis._vBoundaries = b;\n\t},\n\n\t_updateCache: function(data) {\n\t\tthis.offset = this.helper.offset();\n\t\tif (isNumber(data.left)) {\n\t\t\tthis.position.left = data.left;\n\t\t}\n\t\tif (isNumber(data.top)) {\n\t\t\tthis.position.top = data.top;\n\t\t}\n\t\tif (isNumber(data.height)) {\n\t\t\tthis.size.height = data.height;\n\t\t}\n\t\tif (isNumber(data.width)) {\n\t\t\tthis.size.width = data.width;\n\t\t}\n\t},\n\n\t_updateRatio: function( data ) {\n\n\t\tvar cpos = this.position,\n\t\t\tcsize = this.size,\n\t\t\ta = this.axis;\n\n\t\tif (isNumber(data.height)) {\n\t\t\tdata.width = (data.height * this.aspectRatio);\n\t\t} else if (isNumber(data.width)) {\n\t\t\tdata.height = (data.width / this.aspectRatio);\n\t\t}\n\n\t\tif (a === \"sw\") {\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t\tdata.top = null;\n\t\t}\n\t\tif (a === \"nw\") {\n\t\t\tdata.top = cpos.top + (csize.height - data.height);\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function( data ) {\n\n\t\tvar o = this._vBoundaries,\n\t\t\ta = this.axis,\n\t\t\tismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),\n\t\t\tisminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),\n\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\tdh = this.position.top + this.size.height,\n\t\t\tcw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);\n\t\tif (isminw) {\n\t\t\tdata.width = o.minWidth;\n\t\t}\n\t\tif (isminh) {\n\t\t\tdata.height = o.minHeight;\n\t\t}\n\t\tif (ismaxw) {\n\t\t\tdata.width = o.maxWidth;\n\t\t}\n\t\tif (ismaxh) {\n\t\t\tdata.height = o.maxHeight;\n\t\t}\n\n\t\tif (isminw && cw) {\n\t\t\tdata.left = dw - o.minWidth;\n\t\t}\n\t\tif (ismaxw && cw) {\n\t\t\tdata.left = dw - o.maxWidth;\n\t\t}\n\t\tif (isminh && ch) {\n\t\t\tdata.top = dh - o.minHeight;\n\t\t}\n\t\tif (ismaxh && ch) {\n\t\t\tdata.top = dh - o.maxHeight;\n\t\t}\n\n\t\t// fixing jump error on top/left - bug #2330\n\t\tif (!data.width && !data.height && !data.left && data.top) {\n\t\t\tdata.top = null;\n\t\t} else if (!data.width && !data.height && !data.top && data.left) {\n\t\t\tdata.left = null;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tif (!this._proportionallyResizeElements.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar i, j, borders, paddings, prel,\n\t\t\telement = this.helper || this.element;\n\n\t\tfor ( i=0; i < this._proportionallyResizeElements.length; i++) {\n\n\t\t\tprel = this._proportionallyResizeElements[i];\n\n\t\t\tif (!this.borderDif) {\n\t\t\t\tthis.borderDif = [];\n\t\t\t\tborders = [prel.css(\"borderTopWidth\"), prel.css(\"borderRightWidth\"), prel.css(\"borderBottomWidth\"), prel.css(\"borderLeftWidth\")];\n\t\t\t\tpaddings = [prel.css(\"paddingTop\"), prel.css(\"paddingRight\"), prel.css(\"paddingBottom\"), prel.css(\"paddingLeft\")];\n\n\t\t\t\tfor ( j = 0; j < borders.length; j++ ) {\n\t\t\t\t\tthis.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprel.css({\n\t\t\t\theight: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,\n\t\t\t\twidth: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0\n\t\t\t});\n\n\t\t}\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif(this._helper) {\n\n\t\t\tthis.helper = this.helper || $(\"<div style='overflow:hidden;'></div>\");\n\n\t\t\tthis.helper.addClass(this._helper).css({\n\t\t\t\twidth: this.element.outerWidth() - 1,\n\t\t\t\theight: this.element.outerHeight() - 1,\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: this.elementOffset.left +\"px\",\n\t\t\t\ttop: this.elementOffset.top +\"px\",\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t});\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo(\"body\")\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function(event, dx) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function(event, dx) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function(event, dx, dy) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function(event, dx, dy) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t},\n\t\tsw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t},\n\t\tne: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t},\n\t\tnw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t}\n\t},\n\n\t_propagate: function(n, event) {\n\t\t$.ui.plugin.call(this, n, [event, this.ui()]);\n\t\t(n !== \"resize\" && this._trigger(n, event, this.ui()));\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n});\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add(\"resizable\", \"animate\", {\n\n\tstop: function( event ) {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tpr = that._proportionallyResizeElements,\n\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName),\n\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], \"left\") /* TODO - jump height */ ? 0 : that.sizeDiff.height,\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\tstyle = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },\n\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) + (that.position.left - that.originalPosition.left)) || null,\n\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) + (that.position.top - that.originalPosition.top)) || null;\n\n\t\tthat.element.animate(\n\t\t\t$.extend(style, top && left ? { top: top, left: left } : {}), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseInt(that.element.css(\"width\"), 10),\n\t\t\t\t\t\theight: parseInt(that.element.css(\"height\"), 10),\n\t\t\t\t\t\ttop: parseInt(that.element.css(\"top\"), 10),\n\t\t\t\t\t\tleft: parseInt(that.element.css(\"left\"), 10)\n\t\t\t\t\t};\n\n\t\t\t\t\tif (pr && pr.length) {\n\t\t\t\t\t\t$(pr[0]).css({ width: data.width, height: data.height });\n\t\t\t\t\t}\n\n\t\t\t\t\t// propagating resize, and updating values for each animation step\n\t\t\t\t\tthat._updateCache(data);\n\t\t\t\t\tthat._propagate(\"resize\", event);\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n});\n\n$.ui.plugin.add(\"resizable\", \"containment\", {\n\n\tstart: function() {\n\t\tvar element, p, co, ch, cw, width, height,\n\t\t\tthat = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tel = that.element,\n\t\t\toc = o.containment,\n\t\t\tce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;\n\n\t\tif (!ce) {\n\t\t\treturn;\n\t\t}\n\n\t\tthat.containerElement = $(ce);\n\n\t\tif (/document/.test(oc) || oc === document) {\n\t\t\tthat.containerOffset = { left: 0, top: 0 };\n\t\t\tthat.containerPosition = { left: 0, top: 0 };\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: $(document), left: 0, top: 0,\n\t\t\t\twidth: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t}\n\n\t\t// i'm a node, so compute top, left, right, bottom\n\t\telse {\n\t\t\telement = $(ce);\n\t\t\tp = [];\n\t\t\t$([ \"Top\", \"Right\", \"Left\", \"Bottom\" ]).each(function(i, name) { p[i] = num(element.css(\"padding\" + name)); });\n\n\t\t\tthat.containerOffset = element.offset();\n\t\t\tthat.containerPosition = element.position();\n\t\t\tthat.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };\n\n\t\t\tco = that.containerOffset;\n\t\t\tch = that.containerSize.height;\n\t\t\tcw = that.containerSize.width;\n\t\t\twidth = ($.ui.hasScroll(ce, \"left\") ? ce.scrollWidth : cw );\n\t\t\theight = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: ce, left: co.left, top: co.top, width: width, height: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function( event ) {\n\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\tthat = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset, cp = that.position,\n\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\tcop = { top:0, left:0 }, ce = that.containerElement;\n\n\t\tif (ce[0] !== document && (/static/).test(ce.css(\"position\"))) {\n\t\t\tcop = co;\n\t\t}\n\n\t\tif (cp.left < (that._helper ? co.left : 0)) {\n\t\t\tthat.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t}\n\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif (cp.top < (that._helper ? co.top : 0)) {\n\t\t\tthat.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t}\n\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t}\n\n\t\tthat.offset.left = that.parentData.left+that.position.left;\n\t\tthat.offset.top = that.parentData.top+that.position.top;\n\n\t\twoset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );\n\t\thoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );\n\n\t\tisParent = that.containerElement.get(0) === that.element.parent().get(0);\n\t\tisOffsetRelative = /relative|absolute/.test(that.containerElement.css(\"position\"));\n\n\t\tif(isParent && isOffsetRelative) {\n\t\t\twoset -= that.parentData.left;\n\t\t}\n\n\t\tif (woset + that.size.width >= that.parentData.width) {\n\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t}\n\t\t}\n\n\t\tif (hoset + that.size.height >= that.parentData.height) {\n\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t}\n\t\t}\n\t},\n\n\tstop: function(){\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcop = that.containerPosition,\n\t\t\tce = that.containerElement,\n\t\t\thelper = $(that.helper),\n\t\t\tho = helper.offset(),\n\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\n\t\tif (that._helper && !o.animate && (/relative/).test(ce.css(\"position\"))) {\n\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\t\t}\n\n\t\tif (that._helper && !o.animate && (/static/).test(ce.css(\"position\"))) {\n\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"alsoResize\", {\n\n\tstart: function () {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\t_store = function (exp) {\n\t\t\t\t$(exp).each(function() {\n\t\t\t\t\tvar el = $(this);\n\t\t\t\t\tel.data(\"ui-resizable-alsoresize\", {\n\t\t\t\t\t\twidth: parseInt(el.width(), 10), height: parseInt(el.height(), 10),\n\t\t\t\t\t\tleft: parseInt(el.css(\"left\"), 10), top: parseInt(el.css(\"top\"), 10)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t};\n\n\t\tif (typeof(o.alsoResize) === \"object\" && !o.alsoResize.parentNode) {\n\t\t\tif (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }\n\t\t\telse { $.each(o.alsoResize, function (exp) { _store(exp); }); }\n\t\t}else{\n\t\t\t_store(o.alsoResize);\n\t\t}\n\t},\n\n\tresize: function (event, ui) {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\tdelta = {\n\t\t\t\theight: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,\n\t\t\t\ttop: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0\n\t\t\t},\n\n\t\t\t_alsoResize = function (exp, c) {\n\t\t\t\t$(exp).each(function() {\n\t\t\t\t\tvar el = $(this), start = $(this).data(\"ui-resizable-alsoresize\"), style = {},\n\t\t\t\t\t\tcss = c && c.length ? c : el.parents(ui.originalElement[0]).length ? [\"width\", \"height\"] : [\"width\", \"height\", \"top\", \"left\"];\n\n\t\t\t\t\t$.each(css, function (i, prop) {\n\t\t\t\t\t\tvar sum = (start[prop]||0) + (delta[prop]||0);\n\t\t\t\t\t\tif (sum && sum >= 0) {\n\t\t\t\t\t\t\tstyle[prop] = sum || null;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tel.css(style);\n\t\t\t\t});\n\t\t\t};\n\n\t\tif (typeof(o.alsoResize) === \"object\" && !o.alsoResize.nodeType) {\n\t\t\t$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });\n\t\t}else{\n\t\t\t_alsoResize(o.alsoResize);\n\t\t}\n\t},\n\n\tstop: function () {\n\t\t$(this).removeData(\"resizable-alsoresize\");\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"ghost\", {\n\n\tstart: function() {\n\n\t\tvar that = $(this).data(\"ui-resizable\"), o = that.options, cs = that.size;\n\n\t\tthat.ghost = that.originalElement.clone();\n\t\tthat.ghost\n\t\t\t.css({ opacity: 0.25, display: \"block\", position: \"relative\", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })\n\t\t\t.addClass(\"ui-resizable-ghost\")\n\t\t\t.addClass(typeof o.ghost === \"string\" ? o.ghost : \"\");\n\n\t\tthat.ghost.appendTo(that.helper);\n\n\t},\n\n\tresize: function(){\n\t\tvar that = $(this).data(\"ui-resizable\");\n\t\tif (that.ghost) {\n\t\t\tthat.ghost.css({ position: \"relative\", height: that.size.height, width: that.size.width });\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $(this).data(\"ui-resizable\");\n\t\tif (that.ghost && that.helper) {\n\t\t\tthat.helper.get(0).removeChild(that.ghost.get(0));\n\t\t}\n\t}\n\n});\n\n$.ui.plugin.add(\"resizable\", \"grid\", {\n\n\tresize: function() {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tcs = that.size,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\ta = that.axis,\n\t\t\tgrid = typeof o.grid === \"number\" ? [o.grid, o.grid] : o.grid,\n\t\t\tgridX = (grid[0]||1),\n\t\t\tgridY = (grid[1]||1),\n\t\t\tox = Math.round((cs.width - os.width) / gridX) * gridX,\n\t\t\toy = Math.round((cs.height - os.height) / gridY) * gridY,\n\t\t\tnewWidth = os.width + ox,\n\t\t\tnewHeight = os.height + oy,\n\t\t\tisMaxWidth = o.maxWidth && (o.maxWidth < newWidth),\n\t\t\tisMaxHeight = o.maxHeight && (o.maxHeight < newHeight),\n\t\t\tisMinWidth = o.minWidth && (o.minWidth > newWidth),\n\t\t\tisMinHeight = o.minHeight && (o.minHeight > newHeight);\n\n\t\to.grid = grid;\n\n\t\tif (isMinWidth) {\n\t\t\tnewWidth = newWidth + gridX;\n\t\t}\n\t\tif (isMinHeight) {\n\t\t\tnewHeight = newHeight + gridY;\n\t\t}\n\t\tif (isMaxWidth) {\n\t\t\tnewWidth = newWidth - gridX;\n\t\t}\n\t\tif (isMaxHeight) {\n\t\t\tnewHeight = newHeight - gridY;\n\t\t}\n\n\t\tif (/^(se|s|e)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t} else if (/^(ne)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t} else if (/^(sw)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.left = op.left - ox;\n\t\t} else {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t\tthat.position.left = op.left - ox;\n\t\t}\n\t}\n\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.selectable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoRefresh: true,\n\t\tdistance: 0,\n\t\tfilter: \"*\",\n\t\ttolerance: \"touch\",\n\n\t\t// callbacks\n\t\tselected: null,\n\t\tselecting: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tunselected: null,\n\t\tunselecting: null\n\t},\n\t_create: function() {\n\t\tvar selectees,\n\t\t\tthat = this;\n\n\t\tthis.element.addClass(\"ui-selectable\");\n\n\t\tthis.dragged = false;\n\n\t\t// cache selectee children based on filter\n\t\tthis.refresh = function() {\n\t\t\tselectees = $(that.options.filter, that.element[0]);\n\t\t\tselectees.addClass(\"ui-selectee\");\n\t\t\tselectees.each(function() {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\tpos = $this.offset();\n\t\t\t\t$.data(this, \"selectable-item\", {\n\t\t\t\t\telement: this,\n\t\t\t\t\t$element: $this,\n\t\t\t\t\tleft: pos.left,\n\t\t\t\t\ttop: pos.top,\n\t\t\t\t\tright: pos.left + $this.outerWidth(),\n\t\t\t\t\tbottom: pos.top + $this.outerHeight(),\n\t\t\t\t\tstartselected: false,\n\t\t\t\t\tselected: $this.hasClass(\"ui-selected\"),\n\t\t\t\t\tselecting: $this.hasClass(\"ui-selecting\"),\n\t\t\t\t\tunselecting: $this.hasClass(\"ui-unselecting\")\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\tthis.refresh();\n\n\t\tthis.selectees = selectees.addClass(\"ui-selectee\");\n\n\t\tthis._mouseInit();\n\n\t\tthis.helper = $(\"<div class='ui-selectable-helper'></div>\");\n\t},\n\n\t_destroy: function() {\n\t\tthis.selectees\n\t\t\t.removeClass(\"ui-selectee\")\n\t\t\t.removeData(\"selectable-item\");\n\t\tthis.element\n\t\t\t.removeClass(\"ui-selectable ui-selectable-disabled\");\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseStart: function(event) {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.opos = [event.pageX, event.pageY];\n\n\t\tif (this.options.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectees = $(options.filter, this.element[0]);\n\n\t\tthis._trigger(\"start\", event);\n\n\t\t$(options.appendTo).append(this.helper);\n\t\t// position helper (lasso)\n\t\tthis.helper.css({\n\t\t\t\"left\": event.pageX,\n\t\t\t\"top\": event.pageY,\n\t\t\t\"width\": 0,\n\t\t\t\"height\": 0\n\t\t});\n\n\t\tif (options.autoRefresh) {\n\t\t\tthis.refresh();\n\t\t}\n\n\t\tthis.selectees.filter(\".ui-selected\").each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.startselected = true;\n\t\t\tif (!event.metaKey && !event.ctrlKey) {\n\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\tselectee.selected = false;\n\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\tselectee.unselecting = true;\n\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t$(event.target).parents().addBack().each(function() {\n\t\t\tvar doSelect,\n\t\t\t\tselectee = $.data(this, \"selectable-item\");\n\t\t\tif (selectee) {\n\t\t\t\tdoSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass(\"ui-selected\");\n\t\t\t\tselectee.$element\n\t\t\t\t\t.removeClass(doSelect ? \"ui-unselecting\" : \"ui-selected\")\n\t\t\t\t\t.addClass(doSelect ? \"ui-selecting\" : \"ui-unselecting\");\n\t\t\t\tselectee.unselecting = !doSelect;\n\t\t\t\tselectee.selecting = doSelect;\n\t\t\t\tselectee.selected = doSelect;\n\t\t\t\t// selectable (UN)SELECTING callback\n\t\t\t\tif (doSelect) {\n\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\tthis.dragged = true;\n\n\t\tif (this.options.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tmp,\n\t\t\tthat = this,\n\t\t\toptions = this.options,\n\t\t\tx1 = this.opos[0],\n\t\t\ty1 = this.opos[1],\n\t\t\tx2 = event.pageX,\n\t\t\ty2 = event.pageY;\n\n\t\tif (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }\n\t\tif (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }\n\t\tthis.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});\n\n\t\tthis.selectees.each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\"),\n\t\t\t\thit = false;\n\n\t\t\t//prevent helper from being selected if appendTo: selectable\n\t\t\tif (!selectee || selectee.element === that.element[0]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (options.tolerance === \"touch\") {\n\t\t\t\thit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );\n\t\t\t} else if (options.tolerance === \"fit\") {\n\t\t\t\thit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);\n\t\t\t}\n\n\t\t\tif (hit) {\n\t\t\t\t// SELECT\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\tselectee.selected = false;\n\t\t\t\t}\n\t\t\t\tif (selectee.unselecting) {\n\t\t\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\t\t\tselectee.unselecting = false;\n\t\t\t\t}\n\t\t\t\tif (!selectee.selecting) {\n\t\t\t\t\tselectee.$element.addClass(\"ui-selecting\");\n\t\t\t\t\tselectee.selecting = true;\n\t\t\t\t\t// selectable SELECTING callback\n\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// UNSELECT\n\t\t\t\tif (selectee.selecting) {\n\t\t\t\t\tif ((event.metaKey || event.ctrlKey) && selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tselectee.$element.addClass(\"ui-selected\");\n\t\t\t\t\t\tselectee.selected = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tif (selectee.startselected) {\n\t\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tif (!event.metaKey && !event.ctrlKey && !selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\t\tselectee.selected = false;\n\n\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\t\tvar that = this;\n\n\t\tthis.dragged = false;\n\n\t\t$(\".ui-unselecting\", this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\tselectee.unselecting = false;\n\t\t\tselectee.startselected = false;\n\t\t\tthat._trigger(\"unselected\", event, {\n\t\t\t\tunselected: selectee.element\n\t\t\t});\n\t\t});\n\t\t$(\".ui-selecting\", this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass(\"ui-selecting\").addClass(\"ui-selected\");\n\t\t\tselectee.selecting = false;\n\t\t\tselectee.selected = true;\n\t\t\tselectee.startselected = true;\n\t\t\tthat._trigger(\"selected\", event, {\n\t\t\t\tselected: selectee.element\n\t\t\t});\n\t\t});\n\t\tthis._trigger(\"stop\", event);\n\n\t\tthis.helper.remove();\n\n\t\treturn false;\n\t}\n\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n/*jshint loopfunc: true */\n\nfunction isOverAxis( x, reference, size ) {\n\treturn ( x > reference ) && ( x < ( reference + size ) );\n}\n\nfunction isFloating(item) {\n\treturn (/left|right/).test(item.css(\"float\")) || (/inline|table-cell/).test(item.css(\"display\"));\n}\n\n$.widget(\"ui.sortable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"sort\",\n\tready: false,\n\toptions: {\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectWith: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tdropOnEmpty: true,\n\t\tforcePlaceholderSize: false,\n\t\tforceHelperSize: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\titems: \"> *\",\n\t\topacity: false,\n\t\tplaceholder: false,\n\t\trevert: false,\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\t\tzIndex: 1000,\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeStop: null,\n\t\tchange: null,\n\t\tdeactivate: null,\n\t\tout: null,\n\t\tover: null,\n\t\treceive: null,\n\t\tremove: null,\n\t\tsort: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tupdate: null\n\t},\n\t_create: function() {\n\n\t\tvar o = this.options;\n\t\tthis.containerCache = {};\n\t\tthis.element.addClass(\"ui-sortable\");\n\n\t\t//Get the items\n\t\tthis.refresh();\n\n\t\t//Let's determine if the items are being displayed horizontally\n\t\tthis.floating = this.items.length ? o.axis === \"x\" || isFloating(this.items[0].item) : false;\n\n\t\t//Let's determine the parent's offset\n\t\tthis.offset = this.element.offset();\n\n\t\t//Initialize mouse events for interaction\n\t\tthis._mouseInit();\n\n\t\t//We're ready to go\n\t\tthis.ready = true;\n\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass(\"ui-sortable ui-sortable-disabled\");\n\t\tthis._mouseDestroy();\n\n\t\tfor ( var i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\tthis.items[i].item.removeData(this.widgetName + \"-item\");\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function(key, value){\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.options[ key ] = value;\n\n\t\t\tthis.widget().toggleClass( \"ui-sortable-disabled\", !!value );\n\t\t} else {\n\t\t\t// Don't call widget base _setOption for disable as it adds ui-state-disabled class\n\t\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t\t}\n\t},\n\n\t_mouseCapture: function(event, overrideHandle) {\n\t\tvar currentItem = null,\n\t\t\tvalidHandle = false,\n\t\t\tthat = this;\n\n\t\tif (this.reverting) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(this.options.disabled || this.options.type === \"static\") {\n\t\t\treturn false;\n\t\t}\n\n\t\t//We have to refresh the items data once first\n\t\tthis._refreshItems(event);\n\n\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\t$(event.target).parents().each(function() {\n\t\t\tif($.data(this, that.widgetName + \"-item\") === that) {\n\t\t\t\tcurrentItem = $(this);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tif($.data(event.target, that.widgetName + \"-item\") === that) {\n\t\t\tcurrentItem = $(event.target);\n\t\t}\n\n\t\tif(!currentItem) {\n\t\t\treturn false;\n\t\t}\n\t\tif(this.options.handle && !overrideHandle) {\n\t\t\t$(this.options.handle, currentItem).find(\"*\").addBack().each(function() {\n\t\t\t\tif(this === event.target) {\n\t\t\t\t\tvalidHandle = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(!validHandle) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tthis.currentItem = currentItem;\n\t\tthis._removeCurrentsFromItems();\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function(event, overrideHandle, noActivation) {\n\n\t\tvar i, body,\n\t\t\to = this.options;\n\n\t\tthis.currentContainer = this;\n\n\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture\n\t\tthis.refreshPositions();\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Get the next scrolling parent\n\t\tthis.scrollParent = this.helper.scrollParent();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.currentItem.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t$.extend(this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t});\n\n\t\t// Only after we got the offset, we can change the helper's position to absolute\n\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\tthis.helper.css(\"position\", \"absolute\");\n\t\tthis.cssPosition = this.helper.css(\"position\");\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this._generatePosition(event);\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\n\t\t//Cache the former DOM position\n\t\tthis.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };\n\n\t\t//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way\n\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\tthis.currentItem.hide();\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthis._createPlaceholder();\n\n\t\t//Set a containment if given in the options\n\t\tif(o.containment) {\n\t\t\tthis._setContainment();\n\t\t}\n\n\t\tif( o.cursor && o.cursor !== \"auto\" ) { // cursor option\n\t\t\tbody = this.document.find( \"body\" );\n\n\t\t\t// support: IE\n\t\t\tthis.storedCursor = body.css( \"cursor\" );\n\t\t\tbody.css( \"cursor\", o.cursor );\n\n\t\t\tthis.storedStylesheet = $( \"<style>*{ cursor: \"+o.cursor+\" !important; }</style>\" ).appendTo( body );\n\t\t}\n\n\t\tif(o.opacity) { // opacity option\n\t\t\tif (this.helper.css(\"opacity\")) {\n\t\t\t\tthis._storedOpacity = this.helper.css(\"opacity\");\n\t\t\t}\n\t\t\tthis.helper.css(\"opacity\", o.opacity);\n\t\t}\n\n\t\tif(o.zIndex) { // zIndex option\n\t\t\tif (this.helper.css(\"zIndex\")) {\n\t\t\t\tthis._storedZIndex = this.helper.css(\"zIndex\");\n\t\t\t}\n\t\t\tthis.helper.css(\"zIndex\", o.zIndex);\n\t\t}\n\n\t\t//Prepare scrolling\n\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger(\"start\", event, this._uiHash());\n\n\t\t//Recache the helper size\n\t\tif(!this._preserveHelperProportions) {\n\t\t\tthis._cacheHelperProportions();\n\t\t}\n\n\n\t\t//Post \"activate\" events to possible containers\n\t\tif( !noActivation ) {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"activate\", event, this._uiHash( this ) );\n\t\t\t}\n\t\t}\n\n\t\t//Prepare possible droppables\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t}\n\n\t\tthis.dragging = true;\n\n\t\tthis.helper.addClass(\"ui-sortable-helper\");\n\t\tthis._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\t\treturn true;\n\n\t},\n\n\t_mouseDrag: function(event) {\n\t\tvar i, item, itemElement, intersection,\n\t\t\to = this.options,\n\t\t\tscrolled = false;\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition(event);\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\tif (!this.lastPositionAbs) {\n\t\t\tthis.lastPositionAbs = this.positionAbs;\n\t\t}\n\n\t\t//Do scrolling\n\t\tif(this.options.scroll) {\n\t\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\n\t\t\t\tif((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\t} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t\tif((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\t} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t\t}\n\n\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\t} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t\t}\n\t\t}\n\n\t\t//Regenerate the absolute position used for position checks\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Set the helper position\n\t\tif(!this.options.axis || this.options.axis !== \"y\") {\n\t\t\tthis.helper[0].style.left = this.position.left+\"px\";\n\t\t}\n\t\tif(!this.options.axis || this.options.axis !== \"x\") {\n\t\t\tthis.helper[0].style.top = this.position.top+\"px\";\n\t\t}\n\n\t\t//Rearrange\n\t\tfor (i = this.items.length - 1; i >= 0; i--) {\n\n\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\titem = this.items[i];\n\t\t\titemElement = item.item[0];\n\t\t\tintersection = this._intersectsWithPointer(item);\n\t\t\tif (!intersection) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Only put the placeholder inside the current Container, skip all\n\t\t\t// items form other containers. This works because when moving\n\t\t\t// an item from one container to another the\n\t\t\t// currentContainer is switched before the placeholder is moved.\n\t\t\t//\n\t\t\t// Without this moving items in \"sub-sortables\" can cause the placeholder to jitter\n\t\t\t// beetween the outer and inner container.\n\t\t\tif (item.instance !== this.currentContainer) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// cannot intersect with itself\n\t\t\t// no useless actions that have been done before\n\t\t\t// no action if the item moved is the parent of the item checked\n\t\t\tif (itemElement !== this.currentItem[0] &&\n\t\t\t\tthis.placeholder[intersection === 1 ? \"next\" : \"prev\"]()[0] !== itemElement &&\n\t\t\t\t!$.contains(this.placeholder[0], itemElement) &&\n\t\t\t\t(this.options.type === \"semi-dynamic\" ? !$.contains(this.element[0], itemElement) : true)\n\t\t\t) {\n\n\t\t\t\tthis.direction = intersection === 1 ? \"down\" : \"up\";\n\n\t\t\t\tif (this.options.tolerance === \"pointer\" || this._intersectsWithSides(item)) {\n\t\t\t\t\tthis._rearrange(event, item);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tthis._contactContainers(event);\n\n\t\t//Interconnect with droppables\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger(\"sort\", event, this._uiHash());\n\n\t\tthis.lastPositionAbs = this.positionAbs;\n\t\treturn false;\n\n\t},\n\n\t_mouseStop: function(event, noPropagation) {\n\n\t\tif(!event) {\n\t\t\treturn;\n\t\t}\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\t$.ui.ddmanager.drop(this, event);\n\t\t}\n\n\t\tif(this.options.revert) {\n\t\t\tvar that = this,\n\t\t\t\tcur = this.placeholder.offset(),\n\t\t\t\taxis = this.options.axis,\n\t\t\t\tanimation = {};\n\n\t\t\tif ( !axis || axis === \"x\" ) {\n\t\t\t\tanimation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);\n\t\t\t}\n\t\t\tif ( !axis || axis === \"y\" ) {\n\t\t\t\tanimation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);\n\t\t\t}\n\t\t\tthis.reverting = true;\n\t\t\t$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {\n\t\t\t\tthat._clear(event);\n\t\t\t});\n\t\t} else {\n\t\t\tthis._clear(event, noPropagation);\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tcancel: function() {\n\n\t\tif(this.dragging) {\n\n\t\t\tthis._mouseUp({ target: null });\n\n\t\t\tif(this.options.helper === \"original\") {\n\t\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t\t} else {\n\t\t\t\tthis.currentItem.show();\n\t\t\t}\n\n\t\t\t//Post deactivating events to containers\n\t\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tthis.containers[i]._trigger(\"deactivate\", null, this._uiHash(this));\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", null, this._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.placeholder) {\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\t\tif(this.placeholder[0].parentNode) {\n\t\t\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\t\t\t}\n\t\t\tif(this.options.helper !== \"original\" && this.helper && this.helper[0].parentNode) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\n\t\t\t$.extend(this, {\n\t\t\t\thelper: null,\n\t\t\t\tdragging: false,\n\t\t\t\treverting: false,\n\t\t\t\t_noFinalSort: null\n\t\t\t});\n\n\t\t\tif(this.domPosition.prev) {\n\t\t\t\t$(this.domPosition.prev).after(this.currentItem);\n\t\t\t} else {\n\t\t\t\t$(this.domPosition.parent).prepend(this.currentItem);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tserialize: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\tstr = [];\n\t\to = o || {};\n\n\t\t$(items).each(function() {\n\t\t\tvar res = ($(o.item || this).attr(o.attribute || \"id\") || \"\").match(o.expression || (/(.+)[\\-=_](.+)/));\n\t\t\tif (res) {\n\t\t\t\tstr.push((o.key || res[1]+\"[]\")+\"=\"+(o.key && o.expression ? res[1] : res[2]));\n\t\t\t}\n\t\t});\n\n\t\tif(!str.length && o.key) {\n\t\t\tstr.push(o.key + \"=\");\n\t\t}\n\n\t\treturn str.join(\"&\");\n\n\t},\n\n\ttoArray: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\tret = [];\n\n\t\to = o || {};\n\n\t\titems.each(function() { ret.push($(o.item || this).attr(o.attribute || \"id\") || \"\"); });\n\t\treturn ret;\n\n\t},\n\n\t/* Be careful with the following core functions */\n\t_intersectsWith: function(item) {\n\n\t\tvar x1 = this.positionAbs.left,\n\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\ty1 = this.positionAbs.top,\n\t\t\ty2 = y1 + this.helperProportions.height,\n\t\t\tl = item.left,\n\t\t\tr = l + item.width,\n\t\t\tt = item.top,\n\t\t\tb = t + item.height,\n\t\t\tdyClick = this.offset.click.top,\n\t\t\tdxClick = this.offset.click.left,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\tthis.options.forcePointerForContainers ||\n\t\t\t(this.options.tolerance !== \"pointer\" && this.helperProportions[this.floating ? \"width\" : \"height\"] > item[this.floating ? \"width\" : \"height\"])\n\t\t) {\n\t\t\treturn isOverElement;\n\t\t} else {\n\n\t\t\treturn (l < x1 + (this.helperProportions.width / 2) && // Right Half\n\t\t\t\tx2 - (this.helperProportions.width / 2) < r && // Left Half\n\t\t\t\tt < y1 + (this.helperProportions.height / 2) && // Bottom Half\n\t\t\t\ty2 - (this.helperProportions.height / 2) < b ); // Top Half\n\n\t\t}\n\t},\n\n\t_intersectsWithPointer: function(item) {\n\n\t\tvar isOverElementHeight = (this.options.axis === \"x\") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n\t\t\tisOverElementWidth = (this.options.axis === \"y\") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth,\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (!isOverElement) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.floating ?\n\t\t\t( ((horizontalDirection && horizontalDirection === \"right\") || verticalDirection === \"down\") ? 2 : 1 )\n\t\t\t: ( verticalDirection && (verticalDirection === \"down\" ? 2 : 1) );\n\n\t},\n\n\t_intersectsWithSides: function(item) {\n\n\t\tvar isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),\n\t\t\tisOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (this.floating && horizontalDirection) {\n\t\t\treturn ((horizontalDirection === \"right\" && isOverRightHalf) || (horizontalDirection === \"left\" && !isOverRightHalf));\n\t\t} else {\n\t\t\treturn verticalDirection && ((verticalDirection === \"down\" && isOverBottomHalf) || (verticalDirection === \"up\" && !isOverBottomHalf));\n\t\t}\n\n\t},\n\n\t_getDragVerticalDirection: function() {\n\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\treturn delta !== 0 && (delta > 0 ? \"down\" : \"up\");\n\t},\n\n\t_getDragHorizontalDirection: function() {\n\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\treturn delta !== 0 && (delta > 0 ? \"right\" : \"left\");\n\t},\n\n\trefresh: function(event) {\n\t\tthis._refreshItems(event);\n\t\tthis.refreshPositions();\n\t\treturn this;\n\t},\n\n\t_connectWith: function() {\n\t\tvar options = this.options;\n\t\treturn options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;\n\t},\n\n\t_getItemsAsjQuery: function(connected) {\n\n\t\tvar i, j, cur, inst,\n\t\t\titems = [],\n\t\t\tqueries = [],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif(connectWith && connected) {\n\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), inst]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tqueries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), this]);\n\n\t\tfor (i = queries.length - 1; i >= 0; i--){\n\t\t\tqueries[i][0].each(function() {\n\t\t\t\titems.push(this);\n\t\t\t});\n\t\t}\n\n\t\treturn $(items);\n\n\t},\n\n\t_removeCurrentsFromItems: function() {\n\n\t\tvar list = this.currentItem.find(\":data(\" + this.widgetName + \"-item)\");\n\n\t\tthis.items = $.grep(this.items, function (item) {\n\t\t\tfor (var j=0; j < list.length; j++) {\n\t\t\t\tif(list[j] === item.item[0]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\n\t},\n\n\t_refreshItems: function(event) {\n\n\t\tthis.items = [];\n\t\tthis.containers = [this];\n\n\t\tvar i, j, cur, inst, targetData, _queries, item, queriesLength,\n\t\t\titems = this.items,\n\t\t\tqueries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down\n\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\tfor (j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);\n\t\t\t\t\t\tthis.containers.push(inst);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i = queries.length - 1; i >= 0; i--) {\n\t\t\ttargetData = queries[i][1];\n\t\t\t_queries = queries[i][0];\n\n\t\t\tfor (j=0, queriesLength = _queries.length; j < queriesLength; j++) {\n\t\t\t\titem = $(_queries[j]);\n\n\t\t\t\titem.data(this.widgetName + \"-item\", targetData); // Data for target checking (mouse manager)\n\n\t\t\t\titems.push({\n\t\t\t\t\titem: item,\n\t\t\t\t\tinstance: targetData,\n\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t},\n\n\trefreshPositions: function(fast) {\n\n\t\t//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change\n\t\tif(this.offsetParent && this.helper) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\tvar i, item, t, p;\n\n\t\tfor (i = this.items.length - 1; i >= 0; i--){\n\t\t\titem = this.items[i];\n\n\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\tif(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tt = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;\n\n\t\t\tif (!fast) {\n\t\t\t\titem.width = t.outerWidth();\n\t\t\t\titem.height = t.outerHeight();\n\t\t\t}\n\n\t\t\tp = t.offset();\n\t\t\titem.left = p.left;\n\t\t\titem.top = p.top;\n\t\t}\n\n\t\tif(this.options.custom && this.options.custom.refreshContainers) {\n\t\t\tthis.options.custom.refreshContainers.call(this);\n\t\t} else {\n\t\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tp = this.containers[i].element.offset();\n\t\t\t\tthis.containers[i].containerCache.left = p.left;\n\t\t\t\tthis.containers[i].containerCache.top = p.top;\n\t\t\t\tthis.containers[i].containerCache.width\t= this.containers[i].element.outerWidth();\n\t\t\t\tthis.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_createPlaceholder: function(that) {\n\t\tthat = that || this;\n\t\tvar className,\n\t\t\to = that.options;\n\n\t\tif(!o.placeholder || o.placeholder.constructor === String) {\n\t\t\tclassName = o.placeholder;\n\t\t\to.placeholder = {\n\t\t\t\telement: function() {\n\n\t\t\t\t\tvar nodeName = that.currentItem[0].nodeName.toLowerCase(),\n\t\t\t\t\t\telement = $( \"<\" + nodeName + \">\", that.document[0] )\n\t\t\t\t\t\t\t.addClass(className || that.currentItem[0].className+\" ui-sortable-placeholder\")\n\t\t\t\t\t\t\t.removeClass(\"ui-sortable-helper\");\n\n\t\t\t\t\tif ( nodeName === \"tr\" ) {\n\t\t\t\t\t\tthat.currentItem.children().each(function() {\n\t\t\t\t\t\t\t$( \"<td>&#160;</td>\", that.document[0] )\n\t\t\t\t\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t\t\t\t\t.appendTo( element );\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if ( nodeName === \"img\" ) {\n\t\t\t\t\t\telement.attr( \"src\", that.currentItem.attr( \"src\" ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !className ) {\n\t\t\t\t\t\telement.css( \"visibility\", \"hidden\" );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element;\n\t\t\t\t},\n\t\t\t\tupdate: function(container, p) {\n\n\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that\n\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified\n\t\t\t\t\tif(className && !o.forcePlaceholderSize) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item\n\t\t\t\t\tif(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css(\"paddingTop\")||0, 10) - parseInt(that.currentItem.css(\"paddingBottom\")||0, 10)); }\n\t\t\t\t\tif(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css(\"paddingLeft\")||0, 10) - parseInt(that.currentItem.css(\"paddingRight\")||0, 10)); }\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthat.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));\n\n\t\t//Append it after the actual current item\n\t\tthat.currentItem.after(that.placeholder);\n\n\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\to.placeholder.update(that, that.placeholder);\n\n\t},\n\n\t_contactContainers: function(event) {\n\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,\n\t\t\tinnermostContainer = null,\n\t\t\tinnermostIndex = null;\n\n\t\t// get innermost container that intersects with item\n\t\tfor (i = this.containers.length - 1; i >= 0; i--) {\n\n\t\t\t// never consider a container that's located within the item itself\n\t\t\tif($.contains(this.currentItem[0], this.containers[i].element[0])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(this._intersectsWith(this.containers[i].containerCache)) {\n\n\t\t\t\t// if we've already found a container and it's more \"inner\" than this, then continue\n\t\t\t\tif(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tinnermostContainer = this.containers[i];\n\t\t\t\tinnermostIndex = i;\n\n\t\t\t} else {\n\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", event, this._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// if no intersecting containers found, return\n\t\tif(!innermostContainer) {\n\t\t\treturn;\n\t\t}\n\n\t\t// move the item into the container if it's not there already\n\t\tif(this.containers.length === 1) {\n\t\t\tif (!this.containers[innermostIndex].containerCache.over) {\n\t\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t\t}\n\t\t} else {\n\n\t\t\t//When entering a new container, we will find the item with the least distance and append our item near it\n\t\t\tdist = 10000;\n\t\t\titemWithLeastDistance = null;\n\t\t\tfloating = innermostContainer.floating || isFloating(this.currentItem);\n\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\tbase = this.positionAbs[posProperty] + this.offset.click[posProperty];\n\t\t\tfor (j = this.items.length - 1; j >= 0; j--) {\n\t\t\t\tif(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(this.items[j].item[0] === this.currentItem[0]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcur = this.items[j].item.offset()[posProperty];\n\t\t\t\tnearBottom = false;\n\t\t\t\tif(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){\n\t\t\t\t\tnearBottom = true;\n\t\t\t\t\tcur += this.items[j][sizeProperty];\n\t\t\t\t}\n\n\t\t\t\tif(Math.abs(cur - base) < dist) {\n\t\t\t\t\tdist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];\n\t\t\t\t\tthis.direction = nearBottom ? \"up\": \"down\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if dropOnEmpty is enabled\n\t\t\tif(!itemWithLeastDistance && !this.options.dropOnEmpty) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(this.currentContainer === this.containers[innermostIndex]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);\n\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\tthis.containers[innermostIndex]._trigger(\"change\", event, this._uiHash(this));\n\t\t\tthis.currentContainer = this.containers[innermostIndex];\n\n\t\t\t//Update the placeholder\n\t\t\tthis.options.placeholder.update(this.currentContainer, this.placeholder);\n\n\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t}\n\n\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options,\n\t\t\thelper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem);\n\n\t\t//Add the helper to the DOM if that didn't happen already\n\t\tif(!helper.parents(\"body\").length) {\n\t\t\t$(o.appendTo !== \"parent\" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);\n\t\t}\n\n\t\tif(helper[0] === this.currentItem[0]) {\n\t\t\tthis._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css(\"position\"), top: this.currentItem.css(\"top\"), left: this.currentItem.css(\"left\") };\n\t\t}\n\n\t\tif(!helper[0].style.width || o.forceHelperSize) {\n\t\t\thelper.width(this.currentItem.width());\n\t\t}\n\t\tif(!helper[0].style.height || o.forceHelperSize) {\n\t\t\thelper.height(this.currentItem.height());\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function(obj) {\n\t\tif (typeof obj === \"string\") {\n\t\t\tobj = obj.split(\" \");\n\t\t}\n\t\tif ($.isArray(obj)) {\n\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t}\n\t\tif (\"left\" in obj) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif (\"right\" in obj) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif (\"top\" in obj) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif (\"bottom\" in obj) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\tif(this.cssPosition === \"absolute\" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t// This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t// with an ugly IE fix\n\t\tif( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie)) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif(this.cssPosition === \"relative\") {\n\t\t\tvar p = this.currentItem.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.currentItem.css(\"marginLeft\"),10) || 0),\n\t\t\ttop: (parseInt(this.currentItem.css(\"marginTop\"),10) || 0)\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar ce, co, over,\n\t\t\to = this.options;\n\t\tif(o.containment === \"parent\") {\n\t\t\to.containment = this.helper[0].parentNode;\n\t\t}\n\t\tif(o.containment === \"document\" || o.containment === \"window\") {\n\t\t\tthis.containment = [\n\t\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$(o.containment === \"document\" ? document : window).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t($(o.containment === \"document\" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t\tif(!(/^(document|window|parent)$/).test(o.containment)) {\n\t\t\tce = $(o.containment)[0];\n\t\t\tco = $(o.containment).offset();\n\t\t\tover = ($(ce).css(\"overflow\") !== \"hidden\");\n\n\t\t\tthis.containment = [\n\t\t\t\tco.left + (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingLeft\"),10) || 0) - this.margins.left,\n\t\t\t\tco.top + (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingTop\"),10) || 0) - this.margins.top,\n\t\t\t\tco.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingRight\"),10) || 0) - this.helperProportions.width - this.margins.left,\n\t\t\t\tco.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingBottom\"),10) || 0) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif(!pos) {\n\t\t\tpos = this.position;\n\t\t}\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,\n\t\t\tscrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpos.top\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.top * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top * mod -\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpos.left +\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.left * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left * mod\t-\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function(event) {\n\n\t\tvar top, left,\n\t\t\to = this.options,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\t// This is another very weird special case that only happens for relative elements:\n\t\t// 1. If the css position is relative\n\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\tif(this.cssPosition === \"relative\" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {\n\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif(this.originalPosition) { //If we are not dragging yet, we won't check for options\n\n\t\t\tif(this.containment) {\n\t\t\t\tif(event.pageX - this.offset.click.left < this.containment[0]) {\n\t\t\t\t\tpageX = this.containment[0] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top < this.containment[1]) {\n\t\t\t\t\tpageY = this.containment[1] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif(event.pageX - this.offset.click.left > this.containment[2]) {\n\t\t\t\t\tpageX = this.containment[2] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top > this.containment[3]) {\n\t\t\t\t\tpageY = this.containment[3] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(o.grid) {\n\t\t\t\ttop = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];\n\t\t\t\tpageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tleft = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];\n\t\t\t\tpageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpageY -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.top -\t\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.top\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpageX -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.left -\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.left\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_rearrange: function(event, i, a, hardRefresh) {\n\n\t\ta ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === \"down\" ? i.item[0] : i.item[0].nextSibling));\n\n\t\t//Various things done here to improve the performance:\n\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same\n\t\t// 4. this lets only the last addition to the timeout stack through\n\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\tvar counter = this.counter;\n\n\t\tthis._delay(function() {\n\t\t\tif(counter === this.counter) {\n\t\t\t\tthis.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove\n\t\t\t}\n\t\t});\n\n\t},\n\n\t_clear: function(event, noPropagation) {\n\n\t\tthis.reverting = false;\n\t\t// We delay all events that have to be triggered to after the point where the placeholder has been removed and\n\t\t// everything else normalized again\n\t\tvar i,\n\t\t\tdelayedTriggers = [];\n\n\t\t// We first have to update the dom position of the actual currentItem\n\t\t// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)\n\t\tif(!this._noFinalSort && this.currentItem.parent().length) {\n\t\t\tthis.placeholder.before(this.currentItem);\n\t\t}\n\t\tthis._noFinalSort = null;\n\n\t\tif(this.helper[0] === this.currentItem[0]) {\n\t\t\tfor(i in this._storedCSS) {\n\t\t\t\tif(this._storedCSS[i] === \"auto\" || this._storedCSS[i] === \"static\") {\n\t\t\t\t\tthis._storedCSS[i] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t} else {\n\t\t\tthis.currentItem.show();\n\t\t}\n\n\t\tif(this.fromOutside && !noPropagation) {\n\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"receive\", event, this._uiHash(this.fromOutside)); });\n\t\t}\n\t\tif((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(\".ui-sortable-helper\")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {\n\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"update\", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed\n\t\t}\n\n\t\t// Check if the items Container has Changed and trigger appropriate\n\t\t// events.\n\t\tif (this !== this.currentContainer) {\n\t\t\tif(!noPropagation) {\n\t\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"remove\", event, this._uiHash()); });\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"receive\", event, this._uiHash(this)); };  }).call(this, this.currentContainer));\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"update\", event, this._uiHash(this));  }; }).call(this, this.currentContainer));\n\t\t\t}\n\t\t}\n\n\n\t\t//Post events to containers\n\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\tif(!noPropagation) {\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"deactivate\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t}\n\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"out\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t}\n\t\t}\n\n\t\t//Do what was originally in plugins\n\t\tif ( this.storedCursor ) {\n\t\t\tthis.document.find( \"body\" ).css( \"cursor\", this.storedCursor );\n\t\t\tthis.storedStylesheet.remove();\n\t\t}\n\t\tif(this._storedOpacity) {\n\t\t\tthis.helper.css(\"opacity\", this._storedOpacity);\n\t\t}\n\t\tif(this._storedZIndex) {\n\t\t\tthis.helper.css(\"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex);\n\t\t}\n\n\t\tthis.dragging = false;\n\t\tif(this.cancelHelperRemoval) {\n\t\t\tif(!noPropagation) {\n\t\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t\t} //Trigger all delayed events\n\t\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t\t}\n\n\t\t\tthis.fromOutside = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!noPropagation) {\n\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t}\n\n\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\n\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\n\t\tif(!noPropagation) {\n\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t} //Trigger all delayed events\n\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t}\n\n\t\tthis.fromOutside = false;\n\t\treturn true;\n\n\t},\n\n\t_trigger: function() {\n\t\tif ($.Widget.prototype._trigger.apply(this, arguments) === false) {\n\t\t\tthis.cancel();\n\t\t}\n\t},\n\n\t_uiHash: function(_inst) {\n\t\tvar inst = _inst || this;\n\t\treturn {\n\t\t\thelper: inst.helper,\n\t\t\tplaceholder: inst.placeholder || $([]),\n\t\t\tposition: inst.position,\n\t\t\toriginalPosition: inst.originalPosition,\n\t\t\toffset: inst.positionAbs,\n\t\t\titem: inst.currentItem,\n\t\t\tsender: _inst ? _inst.element : null\n\t\t};\n\t}\n\n});\n\n})(jQuery);\n\n(function($, undefined) {\n\nvar dataSpace = \"ui-effects-\";\n\n$.effects = {\n\teffect: {}\n};\n\n/*!\n * jQuery Color Animations v2.1.2\n * https://github.com/jquery/jquery-color\n *\n * Copyright 2013 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * Date: Wed Jan 16 08:47:09 2013 -0600\n */\n(function( jQuery, undefined ) {\n\n\tvar stepHooks = \"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",\n\n\t// plusequals test for += 100 -= 100\n\trplusequals = /^([\\-+])=\\s*(\\d+\\.?\\d*)/,\n\t// a set of RE's that can match strings and generate color tuples.\n\tstringParsers = [{\n\t\t\tre: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ],\n\t\t\t\t\texecResult[ 3 ],\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ] * 2.55,\n\t\t\t\t\texecResult[ 2 ] * 2.55,\n\t\t\t\t\texecResult[ 3 ] * 2.55,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9])([a-f0-9])([a-f0-9])/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ] + execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tspace: \"hsla\",\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ] / 100,\n\t\t\t\t\texecResult[ 3 ] / 100,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}],\n\n\t// jQuery.Color( )\n\tcolor = jQuery.Color = function( color, green, blue, alpha ) {\n\t\treturn new jQuery.Color.fn.parse( color, green, blue, alpha );\n\t},\n\tspaces = {\n\t\trgba: {\n\t\t\tprops: {\n\t\t\t\tred: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tgreen: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tblue: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thsla: {\n\t\t\tprops: {\n\t\t\t\thue: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"degrees\"\n\t\t\t\t},\n\t\t\t\tsaturation: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t},\n\t\t\t\tlightness: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tpropTypes = {\n\t\t\"byte\": {\n\t\t\tfloor: true,\n\t\t\tmax: 255\n\t\t},\n\t\t\"percent\": {\n\t\t\tmax: 1\n\t\t},\n\t\t\"degrees\": {\n\t\t\tmod: 360,\n\t\t\tfloor: true\n\t\t}\n\t},\n\tsupport = color.support = {},\n\n\t// element for support tests\n\tsupportElem = jQuery( \"<p>\" )[ 0 ],\n\n\t// colors = jQuery.Color.names\n\tcolors,\n\n\t// local aliases of functions called often\n\teach = jQuery.each;\n\n// determine rgba support immediately\nsupportElem.style.cssText = \"background-color:rgba(1,1,1,.5)\";\nsupport.rgba = supportElem.style.backgroundColor.indexOf( \"rgba\" ) > -1;\n\n// define cache name and alpha properties\n// for rgba and hsla spaces\neach( spaces, function( spaceName, space ) {\n\tspace.cache = \"_\" + spaceName;\n\tspace.props.alpha = {\n\t\tidx: 3,\n\t\ttype: \"percent\",\n\t\tdef: 1\n\t};\n});\n\nfunction clamp( value, prop, allowEmpty ) {\n\tvar type = propTypes[ prop.type ] || {};\n\n\tif ( value == null ) {\n\t\treturn (allowEmpty || !prop.def) ? null : prop.def;\n\t}\n\n\t// ~~ is an short way of doing floor for positive numbers\n\tvalue = type.floor ? ~~value : parseFloat( value );\n\n\t// IE will pass in empty strings as value for alpha,\n\t// which will hit this case\n\tif ( isNaN( value ) ) {\n\t\treturn prop.def;\n\t}\n\n\tif ( type.mod ) {\n\t\t// we add mod before modding to make sure that negatives values\n\t\t// get converted properly: -10 -> 350\n\t\treturn (value + type.mod) % type.mod;\n\t}\n\n\t// for now all property types without mod have min and max\n\treturn 0 > value ? 0 : type.max < value ? type.max : value;\n}\n\nfunction stringParse( string ) {\n\tvar inst = color(),\n\t\trgba = inst._rgba = [];\n\n\tstring = string.toLowerCase();\n\n\teach( stringParsers, function( i, parser ) {\n\t\tvar parsed,\n\t\t\tmatch = parser.re.exec( string ),\n\t\t\tvalues = match && parser.parse( match ),\n\t\t\tspaceName = parser.space || \"rgba\";\n\n\t\tif ( values ) {\n\t\t\tparsed = inst[ spaceName ]( values );\n\n\t\t\t// if this was an rgba parse the assignment might happen twice\n\t\t\t// oh well....\n\t\t\tinst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];\n\t\t\trgba = inst._rgba = parsed._rgba;\n\n\t\t\t// exit each( stringParsers ) here because we matched\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t// Found a stringParser that handled it\n\tif ( rgba.length ) {\n\n\t\t// if this came from a parsed string, force \"transparent\" when alpha is 0\n\t\t// chrome, (and maybe others) return \"transparent\" as rgba(0,0,0,0)\n\t\tif ( rgba.join() === \"0,0,0,0\" ) {\n\t\t\tjQuery.extend( rgba, colors.transparent );\n\t\t}\n\t\treturn inst;\n\t}\n\n\t// named colors\n\treturn colors[ string ];\n}\n\ncolor.fn = jQuery.extend( color.prototype, {\n\tparse: function( red, green, blue, alpha ) {\n\t\tif ( red === undefined ) {\n\t\t\tthis._rgba = [ null, null, null, null ];\n\t\t\treturn this;\n\t\t}\n\t\tif ( red.jquery || red.nodeType ) {\n\t\t\tred = jQuery( red ).css( green );\n\t\t\tgreen = undefined;\n\t\t}\n\n\t\tvar inst = this,\n\t\t\ttype = jQuery.type( red ),\n\t\t\trgba = this._rgba = [];\n\n\t\t// more than 1 argument specified - assume ( red, green, blue, alpha )\n\t\tif ( green !== undefined ) {\n\t\t\tred = [ red, green, blue, alpha ];\n\t\t\ttype = \"array\";\n\t\t}\n\n\t\tif ( type === \"string\" ) {\n\t\t\treturn this.parse( stringParse( red ) || colors._default );\n\t\t}\n\n\t\tif ( type === \"array\" ) {\n\t\t\teach( spaces.rgba.props, function( key, prop ) {\n\t\t\t\trgba[ prop.idx ] = clamp( red[ prop.idx ], prop );\n\t\t\t});\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( type === \"object\" ) {\n\t\t\tif ( red instanceof color ) {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tif ( red[ space.cache ] ) {\n\t\t\t\t\t\tinst[ space.cache ] = red[ space.cache ].slice();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tvar cache = space.cache;\n\t\t\t\t\teach( space.props, function( key, prop ) {\n\n\t\t\t\t\t\t// if the cache doesn't exist, and we know how to convert\n\t\t\t\t\t\tif ( !inst[ cache ] && space.to ) {\n\n\t\t\t\t\t\t\t// if the value was null, we don't need to copy it\n\t\t\t\t\t\t\t// if the key was alpha, we don't need to copy it either\n\t\t\t\t\t\t\tif ( key === \"alpha\" || red[ key ] == null ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinst[ cache ] = space.to( inst._rgba );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// this is the only case where we allow nulls for ALL properties.\n\t\t\t\t\t\t// call clamp with alwaysAllowEmpty\n\t\t\t\t\t\tinst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );\n\t\t\t\t\t});\n\n\t\t\t\t\t// everything defined but alpha?\n\t\t\t\t\tif ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {\n\t\t\t\t\t\t// use the default of 1\n\t\t\t\t\t\tinst[ cache ][ 3 ] = 1;\n\t\t\t\t\t\tif ( space.from ) {\n\t\t\t\t\t\t\tinst._rgba = space.from( inst[ cache ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t},\n\tis: function( compare ) {\n\t\tvar is = color( compare ),\n\t\t\tsame = true,\n\t\t\tinst = this;\n\n\t\teach( spaces, function( _, space ) {\n\t\t\tvar localCache,\n\t\t\t\tisCache = is[ space.cache ];\n\t\t\tif (isCache) {\n\t\t\t\tlocalCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];\n\t\t\t\teach( space.props, function( _, prop ) {\n\t\t\t\t\tif ( isCache[ prop.idx ] != null ) {\n\t\t\t\t\t\tsame = ( isCache[ prop.idx ] === localCache[ prop.idx ] );\n\t\t\t\t\t\treturn same;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn same;\n\t\t});\n\t\treturn same;\n\t},\n\t_space: function() {\n\t\tvar used = [],\n\t\t\tinst = this;\n\t\teach( spaces, function( spaceName, space ) {\n\t\t\tif ( inst[ space.cache ] ) {\n\t\t\t\tused.push( spaceName );\n\t\t\t}\n\t\t});\n\t\treturn used.pop();\n\t},\n\ttransition: function( other, distance ) {\n\t\tvar end = color( other ),\n\t\t\tspaceName = end._space(),\n\t\t\tspace = spaces[ spaceName ],\n\t\t\tstartColor = this.alpha() === 0 ? color( \"transparent\" ) : this,\n\t\t\tstart = startColor[ space.cache ] || space.to( startColor._rgba ),\n\t\t\tresult = start.slice();\n\n\t\tend = end[ space.cache ];\n\t\teach( space.props, function( key, prop ) {\n\t\t\tvar index = prop.idx,\n\t\t\t\tstartValue = start[ index ],\n\t\t\t\tendValue = end[ index ],\n\t\t\t\ttype = propTypes[ prop.type ] || {};\n\n\t\t\t// if null, don't override start value\n\t\t\tif ( endValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if null - use end\n\t\t\tif ( startValue === null ) {\n\t\t\t\tresult[ index ] = endValue;\n\t\t\t} else {\n\t\t\t\tif ( type.mod ) {\n\t\t\t\t\tif ( endValue - startValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue += type.mod;\n\t\t\t\t\t} else if ( startValue - endValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue -= type.mod;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );\n\t\t\t}\n\t\t});\n\t\treturn this[ spaceName ]( result );\n\t},\n\tblend: function( opaque ) {\n\t\t// if we are already opaque - return ourself\n\t\tif ( this._rgba[ 3 ] === 1 ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar rgb = this._rgba.slice(),\n\t\t\ta = rgb.pop(),\n\t\t\tblend = color( opaque )._rgba;\n\n\t\treturn color( jQuery.map( rgb, function( v, i ) {\n\t\t\treturn ( 1 - a ) * blend[ i ] + a * v;\n\t\t}));\n\t},\n\ttoRgbaString: function() {\n\t\tvar prefix = \"rgba(\",\n\t\t\trgba = jQuery.map( this._rgba, function( v, i ) {\n\t\t\t\treturn v == null ? ( i > 2 ? 1 : 0 ) : v;\n\t\t\t});\n\n\t\tif ( rgba[ 3 ] === 1 ) {\n\t\t\trgba.pop();\n\t\t\tprefix = \"rgb(\";\n\t\t}\n\n\t\treturn prefix + rgba.join() + \")\";\n\t},\n\ttoHslaString: function() {\n\t\tvar prefix = \"hsla(\",\n\t\t\thsla = jQuery.map( this.hsla(), function( v, i ) {\n\t\t\t\tif ( v == null ) {\n\t\t\t\t\tv = i > 2 ? 1 : 0;\n\t\t\t\t}\n\n\t\t\t\t// catch 1 and 2\n\t\t\t\tif ( i && i < 3 ) {\n\t\t\t\t\tv = Math.round( v * 100 ) + \"%\";\n\t\t\t\t}\n\t\t\t\treturn v;\n\t\t\t});\n\n\t\tif ( hsla[ 3 ] === 1 ) {\n\t\t\thsla.pop();\n\t\t\tprefix = \"hsl(\";\n\t\t}\n\t\treturn prefix + hsla.join() + \")\";\n\t},\n\ttoHexString: function( includeAlpha ) {\n\t\tvar rgba = this._rgba.slice(),\n\t\t\talpha = rgba.pop();\n\n\t\tif ( includeAlpha ) {\n\t\t\trgba.push( ~~( alpha * 255 ) );\n\t\t}\n\n\t\treturn \"#\" + jQuery.map( rgba, function( v ) {\n\n\t\t\t// default to 0 when nulls exist\n\t\t\tv = ( v || 0 ).toString( 16 );\n\t\t\treturn v.length === 1 ? \"0\" + v : v;\n\t\t}).join(\"\");\n\t},\n\ttoString: function() {\n\t\treturn this._rgba[ 3 ] === 0 ? \"transparent\" : this.toRgbaString();\n\t}\n});\ncolor.fn.parse.prototype = color.fn;\n\n// hsla conversions adapted from:\n// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021\n\nfunction hue2rgb( p, q, h ) {\n\th = ( h + 1 ) % 1;\n\tif ( h * 6 < 1 ) {\n\t\treturn p + (q - p) * h * 6;\n\t}\n\tif ( h * 2 < 1) {\n\t\treturn q;\n\t}\n\tif ( h * 3 < 2 ) {\n\t\treturn p + (q - p) * ((2/3) - h) * 6;\n\t}\n\treturn p;\n}\n\nspaces.hsla.to = function ( rgba ) {\n\tif ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {\n\t\treturn [ null, null, null, rgba[ 3 ] ];\n\t}\n\tvar r = rgba[ 0 ] / 255,\n\t\tg = rgba[ 1 ] / 255,\n\t\tb = rgba[ 2 ] / 255,\n\t\ta = rgba[ 3 ],\n\t\tmax = Math.max( r, g, b ),\n\t\tmin = Math.min( r, g, b ),\n\t\tdiff = max - min,\n\t\tadd = max + min,\n\t\tl = add * 0.5,\n\t\th, s;\n\n\tif ( min === max ) {\n\t\th = 0;\n\t} else if ( r === max ) {\n\t\th = ( 60 * ( g - b ) / diff ) + 360;\n\t} else if ( g === max ) {\n\t\th = ( 60 * ( b - r ) / diff ) + 120;\n\t} else {\n\t\th = ( 60 * ( r - g ) / diff ) + 240;\n\t}\n\n\t// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%\n\t// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)\n\tif ( diff === 0 ) {\n\t\ts = 0;\n\t} else if ( l <= 0.5 ) {\n\t\ts = diff / add;\n\t} else {\n\t\ts = diff / ( 2 - add );\n\t}\n\treturn [ Math.round(h) % 360, s, l, a == null ? 1 : a ];\n};\n\nspaces.hsla.from = function ( hsla ) {\n\tif ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {\n\t\treturn [ null, null, null, hsla[ 3 ] ];\n\t}\n\tvar h = hsla[ 0 ] / 360,\n\t\ts = hsla[ 1 ],\n\t\tl = hsla[ 2 ],\n\t\ta = hsla[ 3 ],\n\t\tq = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,\n\t\tp = 2 * l - q;\n\n\treturn [\n\t\tMath.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),\n\t\ta\n\t];\n};\n\n\neach( spaces, function( spaceName, space ) {\n\tvar props = space.props,\n\t\tcache = space.cache,\n\t\tto = space.to,\n\t\tfrom = space.from;\n\n\t// makes rgba() and hsla()\n\tcolor.fn[ spaceName ] = function( value ) {\n\n\t\t// generate a cache for this space if it doesn't exist\n\t\tif ( to && !this[ cache ] ) {\n\t\t\tthis[ cache ] = to( this._rgba );\n\t\t}\n\t\tif ( value === undefined ) {\n\t\t\treturn this[ cache ].slice();\n\t\t}\n\n\t\tvar ret,\n\t\t\ttype = jQuery.type( value ),\n\t\t\tarr = ( type === \"array\" || type === \"object\" ) ? value : arguments,\n\t\t\tlocal = this[ cache ].slice();\n\n\t\teach( props, function( key, prop ) {\n\t\t\tvar val = arr[ type === \"object\" ? key : prop.idx ];\n\t\t\tif ( val == null ) {\n\t\t\t\tval = local[ prop.idx ];\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = clamp( val, prop );\n\t\t});\n\n\t\tif ( from ) {\n\t\t\tret = color( from( local ) );\n\t\t\tret[ cache ] = local;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn color( local );\n\t\t}\n\t};\n\n\t// makes red() green() blue() alpha() hue() saturation() lightness()\n\teach( props, function( key, prop ) {\n\t\t// alpha is included in more than one space\n\t\tif ( color.fn[ key ] ) {\n\t\t\treturn;\n\t\t}\n\t\tcolor.fn[ key ] = function( value ) {\n\t\t\tvar vtype = jQuery.type( value ),\n\t\t\t\tfn = ( key === \"alpha\" ? ( this._hsla ? \"hsla\" : \"rgba\" ) : spaceName ),\n\t\t\t\tlocal = this[ fn ](),\n\t\t\t\tcur = local[ prop.idx ],\n\t\t\t\tmatch;\n\n\t\t\tif ( vtype === \"undefined\" ) {\n\t\t\t\treturn cur;\n\t\t\t}\n\n\t\t\tif ( vtype === \"function\" ) {\n\t\t\t\tvalue = value.call( this, cur );\n\t\t\t\tvtype = jQuery.type( value );\n\t\t\t}\n\t\t\tif ( value == null && prop.empty ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif ( vtype === \"string\" ) {\n\t\t\t\tmatch = rplusequals.exec( value );\n\t\t\t\tif ( match ) {\n\t\t\t\t\tvalue = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === \"+\" ? 1 : -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = value;\n\t\t\treturn this[ fn ]( local );\n\t\t};\n\t});\n});\n\n// add cssHook and .fx.step function for each named hook.\n// accept a space separated string of properties\ncolor.hook = function( hook ) {\n\tvar hooks = hook.split( \" \" );\n\teach( hooks, function( i, hook ) {\n\t\tjQuery.cssHooks[ hook ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar parsed, curElem,\n\t\t\t\t\tbackgroundColor = \"\";\n\n\t\t\t\tif ( value !== \"transparent\" && ( jQuery.type( value ) !== \"string\" || ( parsed = stringParse( value ) ) ) ) {\n\t\t\t\t\tvalue = color( parsed || value );\n\t\t\t\t\tif ( !support.rgba && value._rgba[ 3 ] !== 1 ) {\n\t\t\t\t\t\tcurElem = hook === \"backgroundColor\" ? elem.parentNode : elem;\n\t\t\t\t\t\twhile (\n\t\t\t\t\t\t\t(backgroundColor === \"\" || backgroundColor === \"transparent\") &&\n\t\t\t\t\t\t\tcurElem && curElem.style\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbackgroundColor = jQuery.css( curElem, \"backgroundColor\" );\n\t\t\t\t\t\t\t\tcurElem = curElem.parentNode;\n\t\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvalue = value.blend( backgroundColor && backgroundColor !== \"transparent\" ?\n\t\t\t\t\t\t\tbackgroundColor :\n\t\t\t\t\t\t\t\"_default\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = value.toRgbaString();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\telem.style[ hook ] = value;\n\t\t\t\t} catch( e ) {\n\t\t\t\t\t// wrapped to prevent IE from throwing errors on \"invalid\" values like 'auto' or 'inherit'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tjQuery.fx.step[ hook ] = function( fx ) {\n\t\t\tif ( !fx.colorInit ) {\n\t\t\t\tfx.start = color( fx.elem, hook );\n\t\t\t\tfx.end = color( fx.end );\n\t\t\t\tfx.colorInit = true;\n\t\t\t}\n\t\t\tjQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );\n\t\t};\n\t});\n\n};\n\ncolor.hook( stepHooks );\n\njQuery.cssHooks.borderColor = {\n\texpand: function( value ) {\n\t\tvar expanded = {};\n\n\t\teach( [ \"Top\", \"Right\", \"Bottom\", \"Left\" ], function( i, part ) {\n\t\t\texpanded[ \"border\" + part + \"Color\" ] = value;\n\t\t});\n\t\treturn expanded;\n\t}\n};\n\n// Basic color names only.\n// Usage of any of the other color names requires adding yourself or including\n// jquery.color.svg-names.js.\ncolors = jQuery.Color.names = {\n\t// 4.1. Basic color keywords\n\taqua: \"#00ffff\",\n\tblack: \"#000000\",\n\tblue: \"#0000ff\",\n\tfuchsia: \"#ff00ff\",\n\tgray: \"#808080\",\n\tgreen: \"#008000\",\n\tlime: \"#00ff00\",\n\tmaroon: \"#800000\",\n\tnavy: \"#000080\",\n\tolive: \"#808000\",\n\tpurple: \"#800080\",\n\tred: \"#ff0000\",\n\tsilver: \"#c0c0c0\",\n\tteal: \"#008080\",\n\twhite: \"#ffffff\",\n\tyellow: \"#ffff00\",\n\n\t// 4.2.3. \"transparent\" color keyword\n\ttransparent: [ null, null, null, 0 ],\n\n\t_default: \"#ffffff\"\n};\n\n})( jQuery );\n\n\n/******************************************************************************/\n/****************************** CLASS ANIMATIONS ******************************/\n/******************************************************************************/\n(function() {\n\nvar classAnimationActions = [ \"add\", \"remove\", \"toggle\" ],\n\tshorthandStyles = {\n\t\tborder: 1,\n\t\tborderBottom: 1,\n\t\tborderColor: 1,\n\t\tborderLeft: 1,\n\t\tborderRight: 1,\n\t\tborderTop: 1,\n\t\tborderWidth: 1,\n\t\tmargin: 1,\n\t\tpadding: 1\n\t};\n\n$.each([ \"borderLeftStyle\", \"borderRightStyle\", \"borderBottomStyle\", \"borderTopStyle\" ], function( _, prop ) {\n\t$.fx.step[ prop ] = function( fx ) {\n\t\tif ( fx.end !== \"none\" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {\n\t\t\tjQuery.style( fx.elem, prop, fx.end );\n\t\t\tfx.setAttr = true;\n\t\t}\n\t};\n});\n\nfunction getElementStyles( elem ) {\n\tvar key, len,\n\t\tstyle = elem.ownerDocument.defaultView ?\n\t\t\telem.ownerDocument.defaultView.getComputedStyle( elem, null ) :\n\t\t\telem.currentStyle,\n\t\tstyles = {};\n\n\tif ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {\n\t\tlen = style.length;\n\t\twhile ( len-- ) {\n\t\t\tkey = style[ len ];\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ $.camelCase( key ) ] = style[ key ];\n\t\t\t}\n\t\t}\n\t// support: Opera, IE <9\n\t} else {\n\t\tfor ( key in style ) {\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ key ] = style[ key ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn styles;\n}\n\n\nfunction styleDifference( oldStyle, newStyle ) {\n\tvar diff = {},\n\t\tname, value;\n\n\tfor ( name in newStyle ) {\n\t\tvalue = newStyle[ name ];\n\t\tif ( oldStyle[ name ] !== value ) {\n\t\t\tif ( !shorthandStyles[ name ] ) {\n\t\t\t\tif ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {\n\t\t\t\t\tdiff[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn diff;\n}\n\n// support: jQuery <1.8\nif ( !$.fn.addBack ) {\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n$.effects.animateClass = function( value, duration, easing, callback ) {\n\tvar o = $.speed( duration, easing, callback );\n\n\treturn this.queue( function() {\n\t\tvar animated = $( this ),\n\t\t\tbaseClass = animated.attr( \"class\" ) || \"\",\n\t\t\tapplyClassChange,\n\t\t\tallAnimations = o.children ? animated.find( \"*\" ).addBack() : animated;\n\n\t\t// map the animated objects to store the original styles.\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tvar el = $( this );\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tstart: getElementStyles( this )\n\t\t\t};\n\t\t});\n\n\t\t// apply class change\n\t\tapplyClassChange = function() {\n\t\t\t$.each( classAnimationActions, function(i, action) {\n\t\t\t\tif ( value[ action ] ) {\n\t\t\t\t\tanimated[ action + \"Class\" ]( value[ action ] );\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tapplyClassChange();\n\n\t\t// map all animated objects again - calculate new styles and diff\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tthis.end = getElementStyles( this.el[ 0 ] );\n\t\t\tthis.diff = styleDifference( this.start, this.end );\n\t\t\treturn this;\n\t\t});\n\n\t\t// apply original class\n\t\tanimated.attr( \"class\", baseClass );\n\n\t\t// map all animated objects again - this time collecting a promise\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tvar styleInfo = this,\n\t\t\t\tdfd = $.Deferred(),\n\t\t\t\topts = $.extend({}, o, {\n\t\t\t\t\tqueue: false,\n\t\t\t\t\tcomplete: function() {\n\t\t\t\t\t\tdfd.resolve( styleInfo );\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\tthis.el.animate( this.diff, opts );\n\t\t\treturn dfd.promise();\n\t\t});\n\n\t\t// once all animations have completed:\n\t\t$.when.apply( $, allAnimations.get() ).done(function() {\n\n\t\t\t// set the final class\n\t\t\tapplyClassChange();\n\n\t\t\t// for each animated element,\n\t\t\t// clear all css properties that were animated\n\t\t\t$.each( arguments, function() {\n\t\t\t\tvar el = this.el;\n\t\t\t\t$.each( this.diff, function(key) {\n\t\t\t\t\tel.css( key, \"\" );\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// this is guarnteed to be there if you use jQuery.speed()\n\t\t\t// it also handles dequeuing the next anim...\n\t\t\to.complete.call( animated[ 0 ] );\n\t\t});\n\t});\n};\n\n$.fn.extend({\n\taddClass: (function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn speed ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ add: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.addClass ),\n\n\tremoveClass: (function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn arguments.length > 1 ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ remove: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.removeClass ),\n\n\ttoggleClass: (function( orig ) {\n\t\treturn function( classNames, force, speed, easing, callback ) {\n\t\t\tif ( typeof force === \"boolean\" || force === undefined ) {\n\t\t\t\tif ( !speed ) {\n\t\t\t\t\t// without speed parameter\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t\t(force ? { add: classNames } : { remove: classNames }),\n\t\t\t\t\t\tspeed, easing, callback );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// without force parameter\n\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t{ toggle: classNames }, force, speed, easing );\n\t\t\t}\n\t\t};\n\t})( $.fn.toggleClass ),\n\n\tswitchClass: function( remove, add, speed, easing, callback) {\n\t\treturn $.effects.animateClass.call( this, {\n\t\t\tadd: add,\n\t\t\tremove: remove\n\t\t}, speed, easing, callback );\n\t}\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EFFECTS **********************************/\n/******************************************************************************/\n\n(function() {\n\n$.extend( $.effects, {\n\tversion: \"1.10.3\",\n\n\t// Saves a set of properties in a data storage\n\tsave: function( element, set ) {\n\t\tfor( var i=0; i < set.length; i++ ) {\n\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\telement.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Restores a set of previously saved properties from a data storage\n\trestore: function( element, set ) {\n\t\tvar val, i;\n\t\tfor( i=0; i < set.length; i++ ) {\n\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\tval = element.data( dataSpace + set[ i ] );\n\t\t\t\t// support: jQuery 1.6.2\n\t\t\t\t// http://bugs.jquery.com/ticket/9917\n\t\t\t\t// jQuery 1.6.2 incorrectly returns undefined for any falsy value.\n\t\t\t\t// We can't differentiate between \"\" and 0 here, so we just assume\n\t\t\t\t// empty string since it's likely to be a more common value...\n\t\t\t\tif ( val === undefined ) {\n\t\t\t\t\tval = \"\";\n\t\t\t\t}\n\t\t\t\telement.css( set[ i ], val );\n\t\t\t}\n\t\t}\n\t},\n\n\tsetMode: function( el, mode ) {\n\t\tif (mode === \"toggle\") {\n\t\t\tmode = el.is( \":hidden\" ) ? \"show\" : \"hide\";\n\t\t}\n\t\treturn mode;\n\t},\n\n\t// Translates a [top,left] array into a baseline value\n\t// this should be a little more flexible in the future to handle a string & hash\n\tgetBaseline: function( origin, original ) {\n\t\tvar y, x;\n\t\tswitch ( origin[ 0 ] ) {\n\t\t\tcase \"top\": y = 0; break;\n\t\t\tcase \"middle\": y = 0.5; break;\n\t\t\tcase \"bottom\": y = 1; break;\n\t\t\tdefault: y = origin[ 0 ] / original.height;\n\t\t}\n\t\tswitch ( origin[ 1 ] ) {\n\t\t\tcase \"left\": x = 0; break;\n\t\t\tcase \"center\": x = 0.5; break;\n\t\t\tcase \"right\": x = 1; break;\n\t\t\tdefault: x = origin[ 1 ] / original.width;\n\t\t}\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t},\n\n\t// Wraps the element around a wrapper that copies position properties\n\tcreateWrapper: function( element ) {\n\n\t\t// if the element is already wrapped, return it\n\t\tif ( element.parent().is( \".ui-effects-wrapper\" )) {\n\t\t\treturn element.parent();\n\t\t}\n\n\t\t// wrap the element\n\t\tvar props = {\n\t\t\t\twidth: element.outerWidth(true),\n\t\t\t\theight: element.outerHeight(true),\n\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t},\n\t\t\twrapper = $( \"<div></div>\" )\n\t\t\t\t.addClass( \"ui-effects-wrapper\" )\n\t\t\t\t.css({\n\t\t\t\t\tfontSize: \"100%\",\n\t\t\t\t\tbackground: \"transparent\",\n\t\t\t\t\tborder: \"none\",\n\t\t\t\t\tmargin: 0,\n\t\t\t\t\tpadding: 0\n\t\t\t\t}),\n\t\t\t// Store the size in case width/height are defined in % - Fixes #5245\n\t\t\tsize = {\n\t\t\t\twidth: element.width(),\n\t\t\t\theight: element.height()\n\t\t\t},\n\t\t\tactive = document.activeElement;\n\n\t\t// support: Firefox\n\t\t// Firefox incorrectly exposes anonymous content\n\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=561664\n\t\ttry {\n\t\t\tactive.id;\n\t\t} catch( e ) {\n\t\t\tactive = document.body;\n\t\t}\n\n\t\telement.wrap( wrapper );\n\n\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t$( active ).focus();\n\t\t}\n\n\t\twrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element\n\n\t\t// transfer positioning properties to the wrapper\n\t\tif ( element.css( \"position\" ) === \"static\" ) {\n\t\t\twrapper.css({ position: \"relative\" });\n\t\t\telement.css({ position: \"relative\" });\n\t\t} else {\n\t\t\t$.extend( props, {\n\t\t\t\tposition: element.css( \"position\" ),\n\t\t\t\tzIndex: element.css( \"z-index\" )\n\t\t\t});\n\t\t\t$.each([ \"top\", \"left\", \"bottom\", \"right\" ], function(i, pos) {\n\t\t\t\tprops[ pos ] = element.css( pos );\n\t\t\t\tif ( isNaN( parseInt( props[ pos ], 10 ) ) ) {\n\t\t\t\t\tprops[ pos ] = \"auto\";\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.css({\n\t\t\t\tposition: \"relative\",\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\tright: \"auto\",\n\t\t\t\tbottom: \"auto\"\n\t\t\t});\n\t\t}\n\t\telement.css(size);\n\n\t\treturn wrapper.css( props ).show();\n\t},\n\n\tremoveWrapper: function( element ) {\n\t\tvar active = document.activeElement;\n\n\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\telement.parent().replaceWith( element );\n\n\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t$( active ).focus();\n\t\t\t}\n\t\t}\n\n\n\t\treturn element;\n\t},\n\n\tsetTransition: function( element, list, factor, value ) {\n\t\tvalue = value || {};\n\t\t$.each( list, function( i, x ) {\n\t\t\tvar unit = element.cssUnit( x );\n\t\t\tif ( unit[ 0 ] > 0 ) {\n\t\t\t\tvalue[ x ] = unit[ 0 ] * factor + unit[ 1 ];\n\t\t\t}\n\t\t});\n\t\treturn value;\n\t}\n});\n\n// return an effect options object for the given parameters:\nfunction _normalizeArguments( effect, options, speed, callback ) {\n\n\t// allow passing all options as the first parameter\n\tif ( $.isPlainObject( effect ) ) {\n\t\toptions = effect;\n\t\teffect = effect.effect;\n\t}\n\n\t// convert to an object\n\teffect = { effect: effect };\n\n\t// catch (effect, null, ...)\n\tif ( options == null ) {\n\t\toptions = {};\n\t}\n\n\t// catch (effect, callback)\n\tif ( $.isFunction( options ) ) {\n\t\tcallback = options;\n\t\tspeed = null;\n\t\toptions = {};\n\t}\n\n\t// catch (effect, speed, ?)\n\tif ( typeof options === \"number\" || $.fx.speeds[ options ] ) {\n\t\tcallback = speed;\n\t\tspeed = options;\n\t\toptions = {};\n\t}\n\n\t// catch (effect, options, callback)\n\tif ( $.isFunction( speed ) ) {\n\t\tcallback = speed;\n\t\tspeed = null;\n\t}\n\n\t// add options to effect\n\tif ( options ) {\n\t\t$.extend( effect, options );\n\t}\n\n\tspeed = speed || options.duration;\n\teffect.duration = $.fx.off ? 0 :\n\t\ttypeof speed === \"number\" ? speed :\n\t\tspeed in $.fx.speeds ? $.fx.speeds[ speed ] :\n\t\t$.fx.speeds._default;\n\n\teffect.complete = callback || options.complete;\n\n\treturn effect;\n}\n\nfunction standardAnimationOption( option ) {\n\t// Valid standard speeds (nothing, number, named speed)\n\tif ( !option || typeof option === \"number\" || $.fx.speeds[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Invalid strings - treat as \"normal\" speed\n\tif ( typeof option === \"string\" && !$.effects.effect[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Complete callback\n\tif ( $.isFunction( option ) ) {\n\t\treturn true;\n\t}\n\n\t// Options hash (but not naming an effect)\n\tif ( typeof option === \"object\" && !option.effect ) {\n\t\treturn true;\n\t}\n\n\t// Didn't match any standard API\n\treturn false;\n}\n\n$.fn.extend({\n\teffect: function( /* effect, options, speed, callback */ ) {\n\t\tvar args = _normalizeArguments.apply( this, arguments ),\n\t\t\tmode = args.mode,\n\t\t\tqueue = args.queue,\n\t\t\teffectMethod = $.effects.effect[ args.effect ];\n\n\t\tif ( $.fx.off || !effectMethod ) {\n\t\t\t// delegate to the original method (e.g., .show()) if possible\n\t\t\tif ( mode ) {\n\t\t\t\treturn this[ mode ]( args.duration, args.complete );\n\t\t\t} else {\n\t\t\t\treturn this.each( function() {\n\t\t\t\t\tif ( args.complete ) {\n\t\t\t\t\t\targs.complete.call( this );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfunction run( next ) {\n\t\t\tvar elem = $( this ),\n\t\t\t\tcomplete = args.complete,\n\t\t\t\tmode = args.mode;\n\n\t\t\tfunction done() {\n\t\t\t\tif ( $.isFunction( complete ) ) {\n\t\t\t\t\tcomplete.call( elem[0] );\n\t\t\t\t}\n\t\t\t\tif ( $.isFunction( next ) ) {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the element already has the correct final state, delegate to\n\t\t\t// the core methods so the internal tracking of \"olddisplay\" works.\n\t\t\tif ( elem.is( \":hidden\" ) ? mode === \"hide\" : mode === \"show\" ) {\n\t\t\t\telem[ mode ]();\n\t\t\t\tdone();\n\t\t\t} else {\n\t\t\t\teffectMethod.call( elem[0], args, done );\n\t\t\t}\n\t\t}\n\n\t\treturn queue === false ? this.each( run ) : this.queue( queue || \"fx\", run );\n\t},\n\n\tshow: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"show\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.show ),\n\n\thide: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"hide\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.hide ),\n\n\ttoggle: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) || typeof option === \"boolean\" ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"toggle\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.toggle ),\n\n\t// helper functions\n\tcssUnit: function(key) {\n\t\tvar style = this.css( key ),\n\t\t\tval = [];\n\n\t\t$.each( [ \"em\", \"px\", \"%\", \"pt\" ], function( i, unit ) {\n\t\t\tif ( style.indexOf( unit ) > 0 ) {\n\t\t\t\tval = [ parseFloat( style ), unit ];\n\t\t\t}\n\t\t});\n\t\treturn val;\n\t}\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EASING ***********************************/\n/******************************************************************************/\n\n(function() {\n\n// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\nvar baseEasings = {};\n\n$.each( [ \"Quad\", \"Cubic\", \"Quart\", \"Quint\", \"Expo\" ], function( i, name ) {\n\tbaseEasings[ name ] = function( p ) {\n\t\treturn Math.pow( p, i + 2 );\n\t};\n});\n\n$.extend( baseEasings, {\n\tSine: function ( p ) {\n\t\treturn 1 - Math.cos( p * Math.PI / 2 );\n\t},\n\tCirc: function ( p ) {\n\t\treturn 1 - Math.sqrt( 1 - p * p );\n\t},\n\tElastic: function( p ) {\n\t\treturn p === 0 || p === 1 ? p :\n\t\t\t-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );\n\t},\n\tBack: function( p ) {\n\t\treturn p * p * ( 3 * p - 2 );\n\t},\n\tBounce: function ( p ) {\n\t\tvar pow2,\n\t\t\tbounce = 4;\n\n\t\twhile ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}\n\t\treturn 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );\n\t}\n});\n\n$.each( baseEasings, function( name, easeIn ) {\n\t$.easing[ \"easeIn\" + name ] = easeIn;\n\t$.easing[ \"easeOut\" + name ] = function( p ) {\n\t\treturn 1 - easeIn( 1 - p );\n\t};\n\t$.easing[ \"easeInOut\" + name ] = function( p ) {\n\t\treturn p < 0.5 ?\n\t\t\teaseIn( p * 2 ) / 2 :\n\t\t\t1 - easeIn( p * -2 + 2 ) / 2;\n\t};\n});\n\n})();\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nvar uid = 0,\n\thideProps = {},\n\tshowProps = {};\n\nhideProps.height = hideProps.paddingTop = hideProps.paddingBottom =\n\thideProps.borderTopWidth = hideProps.borderBottomWidth = \"hide\";\nshowProps.height = showProps.paddingTop = showProps.paddingBottom =\n\tshowProps.borderTopWidth = showProps.borderBottomWidth = \"show\";\n\n$.widget( \"ui.accordion\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tactive: 0,\n\t\tanimate: {},\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theader: \"> li > :first-child,> :not(li):even\",\n\t\theightStyle: \"auto\",\n\t\ticons: {\n\t\t\tactiveHeader: \"ui-icon-triangle-1-s\",\n\t\t\theader: \"ui-icon-triangle-1-e\"\n\t\t},\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null\n\t},\n\n\t_create: function() {\n\t\tvar options = this.options;\n\t\tthis.prevShow = this.prevHide = $();\n\t\tthis.element.addClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t// ARIA\n\t\t\t.attr( \"role\", \"tablist\" );\n\n\t\t// don't allow collapsible: false and active: false / null\n\t\tif ( !options.collapsible && (options.active === false || options.active == null) ) {\n\t\t\toptions.active = 0;\n\t\t}\n\n\t\tthis._processPanels();\n\t\t// handle negative values\n\t\tif ( options.active < 0 ) {\n\t\t\toptions.active += this.headers.length;\n\t\t}\n\t\tthis._refresh();\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\theader: this.active,\n\t\t\tpanel: !this.active.length ? $() : this.active.next(),\n\t\t\tcontent: !this.active.length ? $() : this.active.next()\n\t\t};\n\t},\n\n\t_createIcons: function() {\n\t\tvar icons = this.options.icons;\n\t\tif ( icons ) {\n\t\t\t$( \"<span>\" )\n\t\t\t\t.addClass( \"ui-accordion-header-icon ui-icon \" + icons.header )\n\t\t\t\t.prependTo( this.headers );\n\t\t\tthis.active.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.removeClass( icons.header )\n\t\t\t\t.addClass( icons.activeHeader );\n\t\t\tthis.headers.addClass( \"ui-accordion-icons\" );\n\t\t}\n\t},\n\n\t_destroyIcons: function() {\n\t\tthis.headers\n\t\t\t.removeClass( \"ui-accordion-icons\" )\n\t\t\t.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.remove();\n\t},\n\n\t_destroy: function() {\n\t\tvar contents;\n\n\t\t// clean up main element\n\t\tthis.element\n\t\t\t.removeClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t.removeAttr( \"role\" );\n\n\t\t// clean up headers\n\t\tthis.headers\n\t\t\t.removeClass( \"ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t.removeAttr( \"aria-controls\" )\n\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t.each(function() {\n\t\t\t\tif ( /^ui-accordion/.test( this.id ) ) {\n\t\t\t\t\tthis.removeAttribute( \"id\" );\n\t\t\t\t}\n\t\t\t});\n\t\tthis._destroyIcons();\n\n\t\t// clean up content panels\n\t\tcontents = this.headers.next()\n\t\t\t.css( \"display\", \"\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t.removeClass( \"ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled\" )\n\t\t\t.each(function() {\n\t\t\t\tif ( /^ui-accordion/.test( this.id ) ) {\n\t\t\t\t\tthis.removeAttribute( \"id\" );\n\t\t\t\t}\n\t\t\t});\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tcontents.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tif ( this.options.event ) {\n\t\t\t\tthis._off( this.headers, this.options.event );\n\t\t\t}\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\t// setting collapsible: false while collapsed; open first panel\n\t\tif ( key === \"collapsible\" && !value && this.options.active === false ) {\n\t\t\tthis._activate( 0 );\n\t\t}\n\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis._destroyIcons();\n\t\t\tif ( value ) {\n\t\t\t\tthis._createIcons();\n\t\t\t}\n\t\t}\n\n\t\t// #5332 - opacity doesn't cascade to positioned elements in IE\n\t\t// so we need to add the disabled class to the headers and panels\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.headers.add( this.headers.next() )\n\t\t\t\t.toggleClass( \"ui-state-disabled\", !!value );\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\t/*jshint maxcomplexity:15*/\n\t\tif ( event.altKey || event.ctrlKey ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar keyCode = $.ui.keyCode,\n\t\t\tlength = this.headers.length,\n\t\t\tcurrentIndex = this.headers.index( event.target ),\n\t\t\ttoFocus = false;\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase keyCode.RIGHT:\n\t\t\tcase keyCode.DOWN:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex + 1 ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.LEFT:\n\t\t\tcase keyCode.UP:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex - 1 + length ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.SPACE:\n\t\t\tcase keyCode.ENTER:\n\t\t\t\tthis._eventHandler( event );\n\t\t\t\tbreak;\n\t\t\tcase keyCode.HOME:\n\t\t\t\ttoFocus = this.headers[ 0 ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.END:\n\t\t\t\ttoFocus = this.headers[ length - 1 ];\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( toFocus ) {\n\t\t\t$( event.target ).attr( \"tabIndex\", -1 );\n\t\t\t$( toFocus ).attr( \"tabIndex\", 0 );\n\t\t\ttoFocus.focus();\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_panelKeyDown : function( event ) {\n\t\tif ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {\n\t\t\t$( event.currentTarget ).prev().focus();\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options;\n\t\tthis._processPanels();\n\n\t\t// was collapsed or no panel\n\t\tif ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\t\t// active false only when collapsible is true\n\t\t} else if ( options.active === false ) {\n\t\t\tthis._activate( 0 );\n\t\t// was active, but active panel is gone\n\t\t} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t// all remaining panel are disabled\n\t\t\tif ( this.headers.length === this.headers.find(\".ui-state-disabled\").length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// activate previous panel\n\t\t\t} else {\n\t\t\t\tthis._activate( Math.max( 0, options.active - 1 ) );\n\t\t\t}\n\t\t// was active, active panel still exists\n\t\t} else {\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.headers.index( this.active );\n\t\t}\n\n\t\tthis._destroyIcons();\n\n\t\tthis._refresh();\n\t},\n\n\t_processPanels: function() {\n\t\tthis.headers = this.element.find( this.options.header )\n\t\t\t.addClass( \"ui-accordion-header ui-helper-reset ui-state-default ui-corner-all\" );\n\n\t\tthis.headers.next()\n\t\t\t.addClass( \"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom\" )\n\t\t\t.filter(\":not(.ui-accordion-content-active)\")\n\t\t\t.hide();\n\t},\n\n\t_refresh: function() {\n\t\tvar maxHeight,\n\t\t\toptions = this.options,\n\t\t\theightStyle = options.heightStyle,\n\t\t\tparent = this.element.parent(),\n\t\t\taccordionId = this.accordionId = \"ui-accordion-\" +\n\t\t\t\t(this.element.attr( \"id\" ) || ++uid);\n\n\t\tthis.active = this._findActive( options.active )\n\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" )\n\t\t\t.removeClass( \"ui-corner-all\" );\n\t\tthis.active.next()\n\t\t\t.addClass( \"ui-accordion-content-active\" )\n\t\t\t.show();\n\n\t\tthis.headers\n\t\t\t.attr( \"role\", \"tab\" )\n\t\t\t.each(function( i ) {\n\t\t\t\tvar header = $( this ),\n\t\t\t\t\theaderId = header.attr( \"id\" ),\n\t\t\t\t\tpanel = header.next(),\n\t\t\t\t\tpanelId = panel.attr( \"id\" );\n\t\t\t\tif ( !headerId ) {\n\t\t\t\t\theaderId = accordionId + \"-header-\" + i;\n\t\t\t\t\theader.attr( \"id\", headerId );\n\t\t\t\t}\n\t\t\t\tif ( !panelId ) {\n\t\t\t\t\tpanelId = accordionId + \"-panel-\" + i;\n\t\t\t\t\tpanel.attr( \"id\", panelId );\n\t\t\t\t}\n\t\t\t\theader.attr( \"aria-controls\", panelId );\n\t\t\t\tpanel.attr( \"aria-labelledby\", headerId );\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr( \"role\", \"tabpanel\" );\n\n\t\tthis.headers\n\t\t\t.not( this.active )\n\t\t\t.attr({\n\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\ttabIndex: -1\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t\t})\n\t\t\t\t.hide();\n\n\t\t// make sure at least one header is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.headers.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active.attr({\n\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\ttabIndex: 0\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t});\n\t\t}\n\n\t\tthis._createIcons();\n\n\t\tthis._setupEvents( options.event );\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.headers.each(function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t\t})\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).css( \"height\", \"\" ).height() );\n\t\t\t\t})\n\t\t\t\t.height( maxHeight );\n\t\t}\n\t},\n\n\t_activate: function( index ) {\n\t\tvar active = this._findActive( index )[ 0 ];\n\n\t\t// trying to activate the already active panel\n\t\tif ( active === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// trying to collapse, simulate a click on the currently active header\n\t\tactive = active || this.active[ 0 ];\n\n\t\tthis._eventHandler({\n\t\t\ttarget: active,\n\t\t\tcurrentTarget: active,\n\t\t\tpreventDefault: $.noop\n\t\t});\n\t},\n\n\t_findActive: function( selector ) {\n\t\treturn typeof selector === \"number\" ? this.headers.eq( selector ) : $();\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {\n\t\t\tkeydown: \"_keydown\"\n\t\t};\n\t\tif ( event ) {\n\t\t\t$.each( event.split(\" \"), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t});\n\t\t}\n\n\t\tthis._off( this.headers.add( this.headers.next() ) );\n\t\tthis._on( this.headers, events );\n\t\tthis._on( this.headers.next(), { keydown: \"_panelKeyDown\" });\n\t\tthis._hoverable( this.headers );\n\t\tthis._focusable( this.headers );\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tclicked = $( event.currentTarget ),\n\t\t\tclickedIsActive = clicked[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : clicked.next(),\n\t\t\ttoHide = active.next(),\n\t\t\teventData = {\n\t\t\t\toldHeader: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewHeader: collapsing ? $() : clicked,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif (\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.headers.index( clicked );\n\n\t\t// when the call to ._toggle() comes after the class changes\n\t\t// it causes a very odd bug in IE 8 (see #6720)\n\t\tthis.active = clickedIsActive ? $() : clicked;\n\t\tthis._toggle( eventData );\n\n\t\t// switch classes\n\t\t// corner classes on the previously active header stay after the animation\n\t\tactive.removeClass( \"ui-accordion-header-active ui-state-active\" );\n\t\tif ( options.icons ) {\n\t\t\tactive.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.removeClass( options.icons.activeHeader )\n\t\t\t\t.addClass( options.icons.header );\n\t\t}\n\n\t\tif ( !clickedIsActive ) {\n\t\t\tclicked\n\t\t\t\t.removeClass( \"ui-corner-all\" )\n\t\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" );\n\t\t\tif ( options.icons ) {\n\t\t\t\tclicked.children( \".ui-accordion-header-icon\" )\n\t\t\t\t\t.removeClass( options.icons.header )\n\t\t\t\t\t.addClass( options.icons.activeHeader );\n\t\t\t}\n\n\t\t\tclicked\n\t\t\t\t.next()\n\t\t\t\t.addClass( \"ui-accordion-content-active\" );\n\t\t}\n\t},\n\n\t_toggle: function( data ) {\n\t\tvar toShow = data.newPanel,\n\t\t\ttoHide = this.prevShow.length ? this.prevShow : data.oldPanel;\n\n\t\t// handle activating a panel during the animation for another activation\n\t\tthis.prevShow.add( this.prevHide ).stop( true, true );\n\t\tthis.prevShow = toShow;\n\t\tthis.prevHide = toHide;\n\n\t\tif ( this.options.animate ) {\n\t\t\tthis._animate( toShow, toHide, data );\n\t\t} else {\n\t\t\ttoHide.hide();\n\t\t\ttoShow.show();\n\t\t\tthis._toggleComplete( data );\n\t\t}\n\n\t\ttoHide.attr({\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\"aria-hidden\": \"true\"\n\t\t});\n\t\ttoHide.prev().attr( \"aria-selected\", \"false\" );\n\t\t// if we're switching panels, remove the old header from the tab order\n\t\t// if we're opening from collapsed state, remove the previous header from the tab order\n\t\t// if we're collapsing, then keep the collapsing header in the tab order\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\ttoHide.prev().attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.headers.filter(function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t})\n\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow\n\t\t\t.attr({\n\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t})\n\t\t\t.prev()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t});\n\t},\n\n\t_animate: function( toShow, toHide, data ) {\n\t\tvar total, easing, duration,\n\t\t\tthat = this,\n\t\t\tadjust = 0,\n\t\t\tdown = toShow.length &&\n\t\t\t\t( !toHide.length || ( toShow.index() < toHide.index() ) ),\n\t\t\tanimate = this.options.animate || {},\n\t\t\toptions = down && animate.down || animate,\n\t\t\tcomplete = function() {\n\t\t\t\tthat._toggleComplete( data );\n\t\t\t};\n\n\t\tif ( typeof options === \"number\" ) {\n\t\t\tduration = options;\n\t\t}\n\t\tif ( typeof options === \"string\" ) {\n\t\t\teasing = options;\n\t\t}\n\t\t// fall back from options to animation in case of partial down settings\n\t\teasing = easing || options.easing || animate.easing;\n\t\tduration = duration || options.duration || animate.duration;\n\n\t\tif ( !toHide.length ) {\n\t\t\treturn toShow.animate( showProps, duration, easing, complete );\n\t\t}\n\t\tif ( !toShow.length ) {\n\t\t\treturn toHide.animate( hideProps, duration, easing, complete );\n\t\t}\n\n\t\ttotal = toShow.show().outerHeight();\n\t\ttoHide.animate( hideProps, {\n\t\t\tduration: duration,\n\t\t\teasing: easing,\n\t\t\tstep: function( now, fx ) {\n\t\t\t\tfx.now = Math.round( now );\n\t\t\t}\n\t\t});\n\t\ttoShow\n\t\t\t.hide()\n\t\t\t.animate( showProps, {\n\t\t\t\tduration: duration,\n\t\t\t\teasing: easing,\n\t\t\t\tcomplete: complete,\n\t\t\t\tstep: function( now, fx ) {\n\t\t\t\t\tfx.now = Math.round( now );\n\t\t\t\t\tif ( fx.prop !== \"height\" ) {\n\t\t\t\t\t\tadjust += fx.now;\n\t\t\t\t\t} else if ( that.options.heightStyle !== \"content\" ) {\n\t\t\t\t\t\tfx.now = Math.round( total - toHide.outerHeight() - adjust );\n\t\t\t\t\t\tadjust = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\t_toggleComplete: function( data ) {\n\t\tvar toHide = data.oldPanel;\n\n\t\ttoHide\n\t\t\t.removeClass( \"ui-accordion-content-active\" )\n\t\t\t.prev()\n\t\t\t\t.removeClass( \"ui-corner-top\" )\n\t\t\t\t.addClass( \"ui-corner-all\" );\n\n\t\t// Work around for rendering bug in IE (#5421)\n\t\tif ( toHide.length ) {\n\t\t\ttoHide.parent()[0].className = toHide.parent()[0].className;\n\t\t}\n\n\t\tthis._trigger( \"activate\", null, data );\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// used to prevent race conditions with remote data sources\nvar requestIndex = 0;\n\n$.widget( \"ui.autocomplete\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<input>\",\n\toptions: {\n\t\tappendTo: null,\n\t\tautoFocus: false,\n\t\tdelay: 300,\n\t\tminLength: 1,\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"none\"\n\t\t},\n\t\tsource: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tclose: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresponse: null,\n\t\tsearch: null,\n\t\tselect: null\n\t},\n\n\tpending: 0,\n\n\t_create: function() {\n\t\t// Some browsers only repeat keydown events, not keypress events,\n\t\t// so we use the suppressKeyPress flag to determine if we've already\n\t\t// handled the keydown event. #7269\n\t\t// Unfortunately the code for & in keypress is the same as the up arrow,\n\t\t// so we use the suppressKeyPressRepeat flag to avoid handling keypress\n\t\t// events when we know the keydown event was used to modify the\n\t\t// search term. #7799\n\t\tvar suppressKeyPress, suppressKeyPressRepeat, suppressInput,\n\t\t\tnodeName = this.element[0].nodeName.toLowerCase(),\n\t\t\tisTextarea = nodeName === \"textarea\",\n\t\t\tisInput = nodeName === \"input\";\n\n\t\tthis.isMultiLine =\n\t\t\t// Textareas are always multi-line\n\t\t\tisTextarea ? true :\n\t\t\t// Inputs are always single-line, even if inside a contentEditable element\n\t\t\t// IE also treats inputs as contentEditable\n\t\t\tisInput ? false :\n\t\t\t// All other element types are determined by whether or not they're contentEditable\n\t\t\tthis.element.prop( \"isContentEditable\" );\n\n\t\tthis.valueMethod = this.element[ isTextarea || isInput ? \"val\" : \"text\" ];\n\t\tthis.isNewMenu = true;\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-autocomplete-input\" )\n\t\t\t.attr( \"autocomplete\", \"off\" );\n\n\t\tthis._on( this.element, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\t/*jshint maxcomplexity:15*/\n\t\t\t\tif ( this.element.prop( \"readOnly\" ) ) {\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tsuppressInput = true;\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsuppressKeyPress = false;\n\t\t\t\tsuppressInput = false;\n\t\t\t\tsuppressKeyPressRepeat = false;\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ENTER:\n\t\t\t\tcase keyCode.NUMPAD_ENTER:\n\t\t\t\t\t// when menu is open and has focus\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\t// #6055 - Opera still allows the keypress to occur\n\t\t\t\t\t\t// which causes forms to submit\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.TAB:\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ESCAPE:\n\t\t\t\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tthis._value( this.term );\n\t\t\t\t\t\tthis.close( event );\n\t\t\t\t\t\t// Different browsers have different default behavior for escape\n\t\t\t\t\t\t// Single press can mean undo or clear\n\t\t\t\t\t\t// Double press in IE means clear the whole form\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\t// search timeout should be triggered before the input value is changed\n\t\t\t\t\tthis._searchTimeout( event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tkeypress: function( event ) {\n\t\t\t\tif ( suppressKeyPress ) {\n\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( suppressKeyPressRepeat ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// replicate some key handlers to allow them to repeat in Firefox and Opera\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tinput: function( event ) {\n\t\t\t\tif ( suppressInput ) {\n\t\t\t\t\tsuppressInput = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._searchTimeout( event );\n\t\t\t},\n\t\t\tfocus: function() {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.previous = this._value();\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tif ( this.cancelBlur ) {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearTimeout( this.searching );\n\t\t\t\tthis.close( event );\n\t\t\t\tthis._change( event );\n\t\t\t}\n\t\t});\n\n\t\tthis._initSource();\n\t\tthis.menu = $( \"<ul>\" )\n\t\t\t.addClass( \"ui-autocomplete ui-front\" )\n\t\t\t.appendTo( this._appendTo() )\n\t\t\t.menu({\n\t\t\t\t// disable ARIA support, the live region takes care of that\n\t\t\t\trole: null\n\t\t\t})\n\t\t\t.hide()\n\t\t\t.data( \"ui-menu\" );\n\n\t\tthis._on( this.menu.element, {\n\t\t\tmousedown: function( event ) {\n\t\t\t\t// prevent moving focus out of the text field\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t\tthis.cancelBlur = true;\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t});\n\n\t\t\t\t// clicking on the scrollbar causes focus to shift to the body\n\t\t\t\t// but we can't detect a mouseup or a click immediately afterward\n\t\t\t\t// so we have to track the next mousedown and close the menu if\n\t\t\t\t// the user clicks somewhere outside of the autocomplete\n\t\t\t\tvar menuElement = this.menu.element[ 0 ];\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu-item\" ).length ) {\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tvar that = this;\n\t\t\t\t\t\tthis.document.one( \"mousedown\", function( event ) {\n\t\t\t\t\t\t\tif ( event.target !== that.element[ 0 ] &&\n\t\t\t\t\t\t\t\t\tevent.target !== menuElement &&\n\t\t\t\t\t\t\t\t\t!$.contains( menuElement, event.target ) ) {\n\t\t\t\t\t\t\t\tthat.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenufocus: function( event, ui ) {\n\t\t\t\t// support: Firefox\n\t\t\t\t// Prevent accidental activation of menu items in Firefox (#7024 #9118)\n\t\t\t\tif ( this.isNewMenu ) {\n\t\t\t\t\tthis.isNewMenu = false;\n\t\t\t\t\tif ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis.menu.blur();\n\n\t\t\t\t\t\tthis.document.one( \"mousemove\", function() {\n\t\t\t\t\t\t\t$( event.target ).trigger( event.originalEvent );\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" );\n\t\t\t\tif ( false !== this._trigger( \"focus\", event, { item: item } ) ) {\n\t\t\t\t\t// use value to match what will end up in the input, if it was a key event\n\t\t\t\t\tif ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis._value( item.value );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Normally the input is populated with the item's value as the\n\t\t\t\t\t// menu is navigated, causing screen readers to notice a change and\n\t\t\t\t\t// announce the item. Since the focus event was canceled, this doesn't\n\t\t\t\t\t// happen, so we update the live region so that screen readers can\n\t\t\t\t\t// still notice the change and announce it.\n\t\t\t\t\tthis.liveRegion.text( item.value );\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenuselect: function( event, ui ) {\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" ),\n\t\t\t\t\tprevious = this.previous;\n\n\t\t\t\t// only trigger when focus was lost (click on menu)\n\t\t\t\tif ( this.element[0] !== this.document[0].activeElement ) {\n\t\t\t\t\tthis.element.focus();\n\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t// #6109 - IE triggers two focus events and the second\n\t\t\t\t\t// is asynchronous, so we need to reset the previous\n\t\t\t\t\t// term synchronously and asynchronously :-(\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\tthis.selectedItem = item;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif ( false !== this._trigger( \"select\", event, { item: item } ) ) {\n\t\t\t\t\tthis._value( item.value );\n\t\t\t\t}\n\t\t\t\t// reset the term after the select event\n\t\t\t\t// this allows custom select handling to work properly\n\t\t\t\tthis.term = this._value();\n\n\t\t\t\tthis.close( event );\n\t\t\t\tthis.selectedItem = item;\n\t\t\t}\n\t\t});\n\n\t\tthis.liveRegion = $( \"<span>\", {\n\t\t\t\trole: \"status\",\n\t\t\t\t\"aria-live\": \"polite\"\n\t\t\t})\n\t\t\t.addClass( \"ui-helper-hidden-accessible\" )\n\t\t\t.insertBefore( this.element );\n\n\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_destroy: function() {\n\t\tclearTimeout( this.searching );\n\t\tthis.element\n\t\t\t.removeClass( \"ui-autocomplete-input\" )\n\t\t\t.removeAttr( \"autocomplete\" );\n\t\tthis.menu.element.remove();\n\t\tthis.liveRegion.remove();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"source\" ) {\n\t\t\tthis._initSource();\n\t\t}\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menu.element.appendTo( this._appendTo() );\n\t\t}\n\t\tif ( key === \"disabled\" && value && this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\n\t\tif ( element ) {\n\t\t\telement = element.jquery || element.nodeType ?\n\t\t\t\t$( element ) :\n\t\t\t\tthis.document.find( element ).eq( 0 );\n\t\t}\n\n\t\tif ( !element ) {\n\t\t\telement = this.element.closest( \".ui-front\" );\n\t\t}\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[0].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_initSource: function() {\n\t\tvar array, url,\n\t\t\tthat = this;\n\t\tif ( $.isArray(this.options.source) ) {\n\t\t\tarray = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tresponse( $.ui.autocomplete.filter( array, request.term ) );\n\t\t\t};\n\t\t} else if ( typeof this.options.source === \"string\" ) {\n\t\t\turl = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tif ( that.xhr ) {\n\t\t\t\t\tthat.xhr.abort();\n\t\t\t\t}\n\t\t\t\tthat.xhr = $.ajax({\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: request,\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t\tresponse( data );\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\tresponse( [] );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t} else {\n\t\t\tthis.source = this.options.source;\n\t\t}\n\t},\n\n\t_searchTimeout: function( event ) {\n\t\tclearTimeout( this.searching );\n\t\tthis.searching = this._delay(function() {\n\t\t\t// only search if the value has changed\n\t\t\tif ( this.term !== this._value() ) {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.search( null, event );\n\t\t\t}\n\t\t}, this.options.delay );\n\t},\n\n\tsearch: function( value, event ) {\n\t\tvalue = value != null ? value : this._value();\n\n\t\t// always save the actual value, not the one passed as an argument\n\t\tthis.term = this._value();\n\n\t\tif ( value.length < this.options.minLength ) {\n\t\t\treturn this.close( event );\n\t\t}\n\n\t\tif ( this._trigger( \"search\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._search( value );\n\t},\n\n\t_search: function( value ) {\n\t\tthis.pending++;\n\t\tthis.element.addClass( \"ui-autocomplete-loading\" );\n\t\tthis.cancelSearch = false;\n\n\t\tthis.source( { term: value }, this._response() );\n\t},\n\n\t_response: function() {\n\t\tvar that = this,\n\t\t\tindex = ++requestIndex;\n\n\t\treturn function( content ) {\n\t\t\tif ( index === requestIndex ) {\n\t\t\t\tthat.__response( content );\n\t\t\t}\n\n\t\t\tthat.pending--;\n\t\t\tif ( !that.pending ) {\n\t\t\t\tthat.element.removeClass( \"ui-autocomplete-loading\" );\n\t\t\t}\n\t\t};\n\t},\n\n\t__response: function( content ) {\n\t\tif ( content ) {\n\t\t\tcontent = this._normalize( content );\n\t\t}\n\t\tthis._trigger( \"response\", null, { content: content } );\n\t\tif ( !this.options.disabled && content && content.length && !this.cancelSearch ) {\n\t\t\tthis._suggest( content );\n\t\t\tthis._trigger( \"open\" );\n\t\t} else {\n\t\t\t// use ._close() instead of .close() so we don't cancel future searches\n\t\t\tthis._close();\n\t\t}\n\t},\n\n\tclose: function( event ) {\n\t\tthis.cancelSearch = true;\n\t\tthis._close( event );\n\t},\n\n\t_close: function( event ) {\n\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.menu.element.hide();\n\t\t\tthis.menu.blur();\n\t\t\tthis.isNewMenu = true;\n\t\t\tthis._trigger( \"close\", event );\n\t\t}\n\t},\n\n\t_change: function( event ) {\n\t\tif ( this.previous !== this._value() ) {\n\t\t\tthis._trigger( \"change\", event, { item: this.selectedItem } );\n\t\t}\n\t},\n\n\t_normalize: function( items ) {\n\t\t// assume all items have the right format when the first item is complete\n\t\tif ( items.length && items[0].label && items[0].value ) {\n\t\t\treturn items;\n\t\t}\n\t\treturn $.map( items, function( item ) {\n\t\t\tif ( typeof item === \"string\" ) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: item,\n\t\t\t\t\tvalue: item\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn $.extend({\n\t\t\t\tlabel: item.label || item.value,\n\t\t\t\tvalue: item.value || item.label\n\t\t\t}, item );\n\t\t});\n\t},\n\n\t_suggest: function( items ) {\n\t\tvar ul = this.menu.element.empty();\n\t\tthis._renderMenu( ul, items );\n\t\tthis.isNewMenu = true;\n\t\tthis.menu.refresh();\n\n\t\t// size and position menu\n\t\tul.show();\n\t\tthis._resizeMenu();\n\t\tul.position( $.extend({\n\t\t\tof: this.element\n\t\t}, this.options.position ));\n\n\t\tif ( this.options.autoFocus ) {\n\t\t\tthis.menu.next();\n\t\t}\n\t},\n\n\t_resizeMenu: function() {\n\t\tvar ul = this.menu.element;\n\t\tul.outerWidth( Math.max(\n\t\t\t// Firefox wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping (#7513)\n\t\t\tul.width( \"\" ).outerWidth() + 1,\n\t\t\tthis.element.outerWidth()\n\t\t) );\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar that = this;\n\t\t$.each( items, function( index, item ) {\n\t\t\tthat._renderItemData( ul, item );\n\t\t});\n\t},\n\n\t_renderItemData: function( ul, item ) {\n\t\treturn this._renderItem( ul, item ).data( \"ui-autocomplete-item\", item );\n\t},\n\n\t_renderItem: function( ul, item ) {\n\t\treturn $( \"<li>\" )\n\t\t\t.append( $( \"<a>\" ).text( item.label ) )\n\t\t\t.appendTo( ul );\n\t},\n\n\t_move: function( direction, event ) {\n\t\tif ( !this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.search( null, event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.menu.isFirstItem() && /^previous/.test( direction ) ||\n\t\t\t\tthis.menu.isLastItem() && /^next/.test( direction ) ) {\n\t\t\tthis._value( this.term );\n\t\t\tthis.menu.blur();\n\t\t\treturn;\n\t\t}\n\t\tthis.menu[ direction ]( event );\n\t},\n\n\twidget: function() {\n\t\treturn this.menu.element;\n\t},\n\n\t_value: function() {\n\t\treturn this.valueMethod.apply( this.element, arguments );\n\t},\n\n\t_keyEvent: function( keyEvent, event ) {\n\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis._move( keyEvent, event );\n\n\t\t\t// prevents moving cursor to beginning/end of the text field in some browsers\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n});\n\n$.extend( $.ui.autocomplete, {\n\tescapeRegex: function( value ) {\n\t\treturn value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n\t},\n\tfilter: function(array, term) {\n\t\tvar matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), \"i\" );\n\t\treturn $.grep( array, function(value) {\n\t\t\treturn matcher.test( value.label || value.value || value );\n\t\t});\n\t}\n});\n\n\n// live region extension, adding a `messages` option\n// NOTE: This is an experimental API. We are still investigating\n// a full solution for string manipulation and internationalization.\n$.widget( \"ui.autocomplete\", $.ui.autocomplete, {\n\toptions: {\n\t\tmessages: {\n\t\t\tnoResults: \"No search results.\",\n\t\t\tresults: function( amount ) {\n\t\t\t\treturn amount + ( amount > 1 ? \" results are\" : \" result is\" ) +\n\t\t\t\t\t\" available, use up and down arrow keys to navigate.\";\n\t\t\t}\n\t\t}\n\t},\n\n\t__response: function( content ) {\n\t\tvar message;\n\t\tthis._superApply( arguments );\n\t\tif ( this.options.disabled || this.cancelSearch ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( content && content.length ) {\n\t\t\tmessage = this.options.messages.results( content.length );\n\t\t} else {\n\t\t\tmessage = this.options.messages.noResults;\n\t\t}\n\t\tthis.liveRegion.text( message );\n\t}\n});\n\n}( jQuery ));\n\n(function( $, undefined ) {\n\nvar lastActive, startXPos, startYPos, clickDragged,\n\tbaseClasses = \"ui-button ui-widget ui-state-default ui-corner-all\",\n\tstateClasses = \"ui-state-hover ui-state-active \",\n\ttypeClasses = \"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",\n\tformResetHandler = function() {\n\t\tvar form = $( this );\n\t\tsetTimeout(function() {\n\t\t\tform.find( \":ui-button\" ).button( \"refresh\" );\n\t\t}, 1 );\n\t},\n\tradioGroup = function( radio ) {\n\t\tvar name = radio.name,\n\t\t\tform = radio.form,\n\t\t\tradios = $( [] );\n\t\tif ( name ) {\n\t\t\tname = name.replace( /'/g, \"\\\\'\" );\n\t\t\tif ( form ) {\n\t\t\t\tradios = $( form ).find( \"[name='\" + name + \"']\" );\n\t\t\t} else {\n\t\t\t\tradios = $( \"[name='\" + name + \"']\", radio.ownerDocument )\n\t\t\t\t\t.filter(function() {\n\t\t\t\t\t\treturn !this.form;\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn radios;\n\t};\n\n$.widget( \"ui.button\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<button>\",\n\toptions: {\n\t\tdisabled: null,\n\t\ttext: true,\n\t\tlabel: null,\n\t\ticons: {\n\t\t\tprimary: null,\n\t\t\tsecondary: null\n\t\t}\n\t},\n\t_create: function() {\n\t\tthis.element.closest( \"form\" )\n\t\t\t.unbind( \"reset\" + this.eventNamespace )\n\t\t\t.bind( \"reset\" + this.eventNamespace, formResetHandler );\n\n\t\tif ( typeof this.options.disabled !== \"boolean\" ) {\n\t\t\tthis.options.disabled = !!this.element.prop( \"disabled\" );\n\t\t} else {\n\t\t\tthis.element.prop( \"disabled\", this.options.disabled );\n\t\t}\n\n\t\tthis._determineButtonType();\n\t\tthis.hasTitle = !!this.buttonElement.attr( \"title\" );\n\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\ttoggleButton = this.type === \"checkbox\" || this.type === \"radio\",\n\t\t\tactiveClass = !toggleButton ? \"ui-state-active\" : \"\",\n\t\t\tfocusClass = \"ui-state-focus\";\n\n\t\tif ( options.label === null ) {\n\t\t\toptions.label = (this.type === \"input\" ? this.buttonElement.val() : this.buttonElement.html());\n\t\t}\n\n\t\tthis._hoverable( this.buttonElement );\n\n\t\tthis.buttonElement\n\t\t\t.addClass( baseClasses )\n\t\t\t.attr( \"role\", \"button\" )\n\t\t\t.bind( \"mouseenter\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( this === lastActive ) {\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bind( \"mouseleave\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).removeClass( activeClass );\n\t\t\t})\n\t\t\t.bind( \"click\" + this.eventNamespace, function( event ) {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.element\n\t\t\t.bind( \"focus\" + this.eventNamespace, function() {\n\t\t\t\t// no need to check disabled, focus won't be triggered anyway\n\t\t\t\tthat.buttonElement.addClass( focusClass );\n\t\t\t})\n\t\t\t.bind( \"blur\" + this.eventNamespace, function() {\n\t\t\t\tthat.buttonElement.removeClass( focusClass );\n\t\t\t});\n\n\t\tif ( toggleButton ) {\n\t\t\tthis.element.bind( \"change\" + this.eventNamespace, function() {\n\t\t\t\tif ( clickDragged ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthat.refresh();\n\t\t\t});\n\t\t\t// if mouse moves between mousedown and mouseup (drag) set clickDragged flag\n\t\t\t// prevents issue where button state changes but checkbox/radio checked state\n\t\t\t// does not in Firefox (see ticket #6970)\n\t\t\tthis.buttonElement\n\t\t\t\t.bind( \"mousedown\" + this.eventNamespace, function( event ) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tclickDragged = false;\n\t\t\t\t\tstartXPos = event.pageX;\n\t\t\t\t\tstartYPos = event.pageY;\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseup\" + this.eventNamespace, function( event ) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( startXPos !== event.pageX || startYPos !== event.pageY ) {\n\t\t\t\t\t\tclickDragged = true;\n\t\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" ) {\n\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else if ( this.type === \"radio\" ) {\n\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\tthat.buttonElement.attr( \"aria-pressed\", \"true\" );\n\n\t\t\t\tvar radio = that.element[ 0 ];\n\t\t\t\tradioGroup( radio )\n\t\t\t\t\t.not( radio )\n\t\t\t\t\t.map(function() {\n\t\t\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t\t\t})\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t});\n\t\t} else {\n\t\t\tthis.buttonElement\n\t\t\t\t.bind( \"mousedown\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\tlastActive = this;\n\t\t\t\t\tthat.document.one( \"mouseup\", function() {\n\t\t\t\t\t\tlastActive = null;\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseup\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t})\n\t\t\t\t.bind( \"keydown\" + this.eventNamespace, function(event) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {\n\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// see #8559, we bind to blur here in case the button element loses\n\t\t\t\t// focus between keydown and keyup, it would be left in an \"active\" state\n\t\t\t\t.bind( \"keyup\" + this.eventNamespace + \" blur\" + this.eventNamespace, function() {\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t});\n\n\t\t\tif ( this.buttonElement.is(\"a\") ) {\n\t\t\t\tthis.buttonElement.keyup(function(event) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\t// TODO pass through original event correctly (just as 2nd argument doesn't work)\n\t\t\t\t\t\t$( this ).click();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// TODO: pull out $.Widget's handling for the disabled option into\n\t\t// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can\n\t\t// be overridden by individual plugins\n\t\tthis._setOption( \"disabled\", options.disabled );\n\t\tthis._resetButton();\n\t},\n\n\t_determineButtonType: function() {\n\t\tvar ancestor, labelSelector, checked;\n\n\t\tif ( this.element.is(\"[type=checkbox]\") ) {\n\t\t\tthis.type = \"checkbox\";\n\t\t} else if ( this.element.is(\"[type=radio]\") ) {\n\t\t\tthis.type = \"radio\";\n\t\t} else if ( this.element.is(\"input\") ) {\n\t\t\tthis.type = \"input\";\n\t\t} else {\n\t\t\tthis.type = \"button\";\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t// we don't search against the document in case the element\n\t\t\t// is disconnected from the DOM\n\t\t\tancestor = this.element.parents().last();\n\t\t\tlabelSelector = \"label[for='\" + this.element.attr(\"id\") + \"']\";\n\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\tancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();\n\t\t\t\tthis.buttonElement = ancestor.filter( labelSelector );\n\t\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.element.addClass( \"ui-helper-hidden-accessible\" );\n\n\t\t\tchecked = this.element.is( \":checked\" );\n\t\t\tif ( checked ) {\n\t\t\t\tthis.buttonElement.addClass( \"ui-state-active\" );\n\t\t\t}\n\t\t\tthis.buttonElement.prop( \"aria-pressed\", checked );\n\t\t} else {\n\t\t\tthis.buttonElement = this.element;\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.buttonElement;\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-helper-hidden-accessible\" );\n\t\tthis.buttonElement\n\t\t\t.removeClass( baseClasses + \" \" + stateClasses + \" \" + typeClasses )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-pressed\" )\n\t\t\t.html( this.buttonElement.find(\".ui-button-text\").html() );\n\n\t\tif ( !this.hasTitle ) {\n\t\t\tthis.buttonElement.removeAttr( \"title\" );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"disabled\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.prop( \"disabled\", true );\n\t\t\t} else {\n\t\t\t\tthis.element.prop( \"disabled\", false );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._resetButton();\n\t},\n\n\trefresh: function() {\n\t\t//See #8237 & #8828\n\t\tvar isDisabled = this.element.is( \"input, button\" ) ? this.element.is( \":disabled\" ) : this.element.hasClass( \"ui-button-disabled\" );\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOption( \"disabled\", isDisabled );\n\t\t}\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tradioGroup( this.element[0] ).each(function() {\n\t\t\t\tif ( $( this ).is( \":checked\" ) ) {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t\t}\n\t\t\t});\n\t\t} else if ( this.type === \"checkbox\" ) {\n\t\t\tif ( this.element.is( \":checked\" ) ) {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t} else {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t_resetButton: function() {\n\t\tif ( this.type === \"input\" ) {\n\t\t\tif ( this.options.label ) {\n\t\t\t\tthis.element.val( this.options.label );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tvar buttonElement = this.buttonElement.removeClass( typeClasses ),\n\t\t\tbuttonText = $( \"<span></span>\", this.document[0] )\n\t\t\t\t.addClass( \"ui-button-text\" )\n\t\t\t\t.html( this.options.label )\n\t\t\t\t.appendTo( buttonElement.empty() )\n\t\t\t\t.text(),\n\t\t\ticons = this.options.icons,\n\t\t\tmultipleIcons = icons.primary && icons.secondary,\n\t\t\tbuttonClasses = [];\n\n\t\tif ( icons.primary || icons.secondary ) {\n\t\t\tif ( this.options.text ) {\n\t\t\t\tbuttonClasses.push( \"ui-button-text-icon\" + ( multipleIcons ? \"s\" : ( icons.primary ? \"-primary\" : \"-secondary\" ) ) );\n\t\t\t}\n\n\t\t\tif ( icons.primary ) {\n\t\t\t\tbuttonElement.prepend( \"<span class='ui-button-icon-primary ui-icon \" + icons.primary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( icons.secondary ) {\n\t\t\t\tbuttonElement.append( \"<span class='ui-button-icon-secondary ui-icon \" + icons.secondary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( !this.options.text ) {\n\t\t\t\tbuttonClasses.push( multipleIcons ? \"ui-button-icons-only\" : \"ui-button-icon-only\" );\n\n\t\t\t\tif ( !this.hasTitle ) {\n\t\t\t\t\tbuttonElement.attr( \"title\", $.trim( buttonText ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tbuttonClasses.push( \"ui-button-text-only\" );\n\t\t}\n\t\tbuttonElement.addClass( buttonClasses.join( \" \" ) );\n\t}\n});\n\n$.widget( \"ui.buttonset\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\titems: \"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)\"\n\t},\n\n\t_create: function() {\n\t\tthis.element.addClass( \"ui-buttonset\" );\n\t},\n\n\t_init: function() {\n\t\tthis.refresh();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.buttons.button( \"option\", key, value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\trefresh: function() {\n\t\tvar rtl = this.element.css( \"direction\" ) === \"rtl\";\n\n\t\tthis.buttons = this.element.find( this.options.items )\n\t\t\t.filter( \":ui-button\" )\n\t\t\t\t.button( \"refresh\" )\n\t\t\t.end()\n\t\t\t.not( \":ui-button\" )\n\t\t\t\t.button()\n\t\t\t.end()\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-all ui-corner-left ui-corner-right\" )\n\t\t\t\t.filter( \":first\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-right\" : \"ui-corner-left\" )\n\t\t\t\t.end()\n\t\t\t\t.filter( \":last\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-left\" : \"ui-corner-right\" )\n\t\t\t\t.end()\n\t\t\t.end();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeClass( \"ui-buttonset\" );\n\t\tthis.buttons\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-left ui-corner-right\" )\n\t\t\t.end()\n\t\t\t.button( \"destroy\" );\n\t}\n});\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\n$.extend($.ui, { datepicker: { version: \"1.10.3\" } });\n\nvar PROP_NAME = \"datepicker\",\n\tinstActive;\n\n/* Date picker manager.\n   Use the singleton instance of this class, $.datepicker, to interact with the date picker.\n   Settings for (groups of) date pickers are maintained in an instance object,\n   allowing multiple different settings on the same page. */\n\nfunction Datepicker() {\n\tthis._curInst = null; // The current instance in use\n\tthis._keyEvent = false; // If the last event was a key event\n\tthis._disabledInputs = []; // List of date picker inputs that have been disabled\n\tthis._datepickerShowing = false; // True if the popup picker is showing , false if not\n\tthis._inDialog = false; // True if showing within a \"dialog\", false if not\n\tthis._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\n\tthis._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\n\tthis._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\n\tthis._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\n\tthis._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\n\tthis._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\n\tthis._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\n\tthis._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\n\tthis._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\n\tthis.regional = []; // Available regional settings, indexed by language code\n\tthis.regional[\"\"] = { // Default regional settings\n\t\tcloseText: \"Done\", // Display text for close link\n\t\tprevText: \"Prev\", // Display text for previous month link\n\t\tnextText: \"Next\", // Display text for next month link\n\t\tcurrentText: \"Today\", // Display text for current month link\n\t\tmonthNames: [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\n\t\t\t\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"], // Names of months for drop-down and formatting\n\t\tmonthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], // For formatting\n\t\tdayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], // For formatting\n\t\tdayNamesShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], // For formatting\n\t\tdayNamesMin: [\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"], // Column headings for days starting at Sunday\n\t\tweekHeader: \"Wk\", // Column header for week of the year\n\t\tdateFormat: \"mm/dd/yy\", // See format options on parseDate\n\t\tfirstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...\n\t\tisRTL: false, // True if right-to-left language, false if left-to-right\n\t\tshowMonthAfterYear: false, // True if the year select precedes month, false for month then year\n\t\tyearSuffix: \"\" // Additional text to append to the year in the month headers\n\t};\n\tthis._defaults = { // Global defaults for all the date picker instances\n\t\tshowOn: \"focus\", // \"focus\" for popup on focus,\n\t\t\t// \"button\" for trigger button, or \"both\" for either\n\t\tshowAnim: \"fadeIn\", // Name of jQuery animation for popup\n\t\tshowOptions: {}, // Options for enhanced animations\n\t\tdefaultDate: null, // Used when field is blank: actual date,\n\t\t\t// +/-number for offset from today, null for today\n\t\tappendText: \"\", // Display text following the input box, e.g. showing the format\n\t\tbuttonText: \"...\", // Text for trigger button\n\t\tbuttonImage: \"\", // URL for trigger button image\n\t\tbuttonImageOnly: false, // True if the image appears alone, false if it appears on a button\n\t\thideIfNoPrevNext: false, // True to hide next/previous month links\n\t\t\t// if not applicable, false to just disable them\n\t\tnavigationAsDateFormat: false, // True if date formatting applied to prev/today/next links\n\t\tgotoCurrent: false, // True if today link goes back to current selection instead\n\t\tchangeMonth: false, // True if month can be selected directly, false if only prev/next\n\t\tchangeYear: false, // True if year can be selected directly, false if only prev/next\n\t\tyearRange: \"c-10:c+10\", // Range of years to display in drop-down,\n\t\t\t// either relative to today's year (-nn:+nn), relative to currently displayed year\n\t\t\t// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\n\t\tshowOtherMonths: false, // True to show dates in other months, false to leave blank\n\t\tselectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable\n\t\tshowWeek: false, // True to show week of the year, false to not show it\n\t\tcalculateWeek: this.iso8601Week, // How to calculate the week of the year,\n\t\t\t// takes a Date and returns the number of the week for it\n\t\tshortYearCutoff: \"+10\", // Short year values < this are in the current century,\n\t\t\t// > this are in the previous century,\n\t\t\t// string value starting with \"+\" for current year + value\n\t\tminDate: null, // The earliest selectable date, or null for no limit\n\t\tmaxDate: null, // The latest selectable date, or null for no limit\n\t\tduration: \"fast\", // Duration of display/closure\n\t\tbeforeShowDay: null, // Function that takes a date and returns an array with\n\t\t\t// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n\t\t\t// [2] = cell title (optional), e.g. $.datepicker.noWeekends\n\t\tbeforeShow: null, // Function that takes an input field and\n\t\t\t// returns a set of custom settings for the date picker\n\t\tonSelect: null, // Define a callback function when a date is selected\n\t\tonChangeMonthYear: null, // Define a callback function when the month or year is changed\n\t\tonClose: null, // Define a callback function when the datepicker is closed\n\t\tnumberOfMonths: 1, // Number of months to show at a time\n\t\tshowCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)\n\t\tstepMonths: 1, // Number of months to step back/forward\n\t\tstepBigMonths: 12, // Number of months to step back/forward for the big links\n\t\taltField: \"\", // Selector for an alternate field to store selected dates into\n\t\taltFormat: \"\", // The date format to use for the alternate field\n\t\tconstrainInput: true, // The input is constrained by the current date format\n\t\tshowButtonPanel: false, // True to show button panel, false to not show it\n\t\tautoSize: false, // True to size the input for the date format, false to leave as is\n\t\tdisabled: false // The initial disabled state\n\t};\n\t$.extend(this._defaults, this.regional[\"\"]);\n\tthis.dpDiv = bindHover($(\"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));\n}\n\n$.extend(Datepicker.prototype, {\n\t/* Class name added to elements to indicate already configured with a date picker. */\n\tmarkerClassName: \"hasDatepicker\",\n\n\t//Keep track of the maximum number of rows displayed (see #7043)\n\tmaxRows: 4,\n\n\t// TODO rename to \"widget\" when switching to widget factory\n\t_widgetDatepicker: function() {\n\t\treturn this.dpDiv;\n\t},\n\n\t/* Override the default settings for all instances of the date picker.\n\t * @param  settings  object - the new settings to use as defaults (anonymous object)\n\t * @return the manager object\n\t */\n\tsetDefaults: function(settings) {\n\t\textendRemove(this._defaults, settings || {});\n\t\treturn this;\n\t},\n\n\t/* Attach the date picker to a jQuery selection.\n\t * @param  target\telement - the target input field or division or span\n\t * @param  settings  object - the new settings to use for this date picker instance (anonymous)\n\t */\n\t_attachDatepicker: function(target, settings) {\n\t\tvar nodeName, inline, inst;\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tinline = (nodeName === \"div\" || nodeName === \"span\");\n\t\tif (!target.id) {\n\t\t\tthis.uuid += 1;\n\t\t\ttarget.id = \"dp\" + this.uuid;\n\t\t}\n\t\tinst = this._newInst($(target), inline);\n\t\tinst.settings = $.extend({}, settings || {});\n\t\tif (nodeName === \"input\") {\n\t\t\tthis._connectDatepicker(target, inst);\n\t\t} else if (inline) {\n\t\t\tthis._inlineDatepicker(target, inst);\n\t\t}\n\t},\n\n\t/* Create a new instance object. */\n\t_newInst: function(target, inline) {\n\t\tvar id = target[0].id.replace(/([^A-Za-z0-9_\\-])/g, \"\\\\\\\\$1\"); // escape jQuery meta chars\n\t\treturn {id: id, input: target, // associated target\n\t\t\tselectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection\n\t\t\tdrawMonth: 0, drawYear: 0, // month being drawn\n\t\t\tinline: inline, // is datepicker inline or not\n\t\t\tdpDiv: (!inline ? this.dpDiv : // presentation div\n\t\t\tbindHover($(\"<div class='\" + this._inlineClass + \" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")))};\n\t},\n\n\t/* Attach the date picker to an input field. */\n\t_connectDatepicker: function(target, inst) {\n\t\tvar input = $(target);\n\t\tinst.append = $([]);\n\t\tinst.trigger = $([]);\n\t\tif (input.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tthis._attachments(input, inst);\n\t\tinput.addClass(this.markerClassName).keydown(this._doKeyDown).\n\t\t\tkeypress(this._doKeyPress).keyup(this._doKeyUp);\n\t\tthis._autoSize(inst);\n\t\t$.data(target, PROP_NAME, inst);\n\t\t//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t},\n\n\t/* Make attachments based on settings. */\n\t_attachments: function(input, inst) {\n\t\tvar showOn, buttonText, buttonImage,\n\t\t\tappendText = this._get(inst, \"appendText\"),\n\t\t\tisRTL = this._get(inst, \"isRTL\");\n\n\t\tif (inst.append) {\n\t\t\tinst.append.remove();\n\t\t}\n\t\tif (appendText) {\n\t\t\tinst.append = $(\"<span class='\" + this._appendClass + \"'>\" + appendText + \"</span>\");\n\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.append);\n\t\t}\n\n\t\tinput.unbind(\"focus\", this._showDatepicker);\n\n\t\tif (inst.trigger) {\n\t\t\tinst.trigger.remove();\n\t\t}\n\n\t\tshowOn = this._get(inst, \"showOn\");\n\t\tif (showOn === \"focus\" || showOn === \"both\") { // pop-up date picker when in the marked field\n\t\t\tinput.focus(this._showDatepicker);\n\t\t}\n\t\tif (showOn === \"button\" || showOn === \"both\") { // pop-up date picker when button clicked\n\t\t\tbuttonText = this._get(inst, \"buttonText\");\n\t\t\tbuttonImage = this._get(inst, \"buttonImage\");\n\t\t\tinst.trigger = $(this._get(inst, \"buttonImageOnly\") ?\n\t\t\t\t$(\"<img/>\").addClass(this._triggerClass).\n\t\t\t\t\tattr({ src: buttonImage, alt: buttonText, title: buttonText }) :\n\t\t\t\t$(\"<button type='button'></button>\").addClass(this._triggerClass).\n\t\t\t\t\thtml(!buttonImage ? buttonText : $(\"<img/>\").attr(\n\t\t\t\t\t{ src:buttonImage, alt:buttonText, title:buttonText })));\n\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.trigger);\n\t\t\tinst.trigger.click(function() {\n\t\t\t\tif ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t} else {\n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t},\n\n\t/* Apply the maximum length for the date format. */\n\t_autoSize: function(inst) {\n\t\tif (this._get(inst, \"autoSize\") && !inst.inline) {\n\t\t\tvar findMax, max, maxI, i,\n\t\t\t\tdate = new Date(2009, 12 - 1, 20), // Ensure double digits\n\t\t\t\tdateFormat = this._get(inst, \"dateFormat\");\n\n\t\t\tif (dateFormat.match(/[DM]/)) {\n\t\t\t\tfindMax = function(names) {\n\t\t\t\t\tmax = 0;\n\t\t\t\t\tmaxI = 0;\n\t\t\t\t\tfor (i = 0; i < names.length; i++) {\n\t\t\t\t\t\tif (names[i].length > max) {\n\t\t\t\t\t\t\tmax = names[i].length;\n\t\t\t\t\t\t\tmaxI = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn maxI;\n\t\t\t\t};\n\t\t\t\tdate.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?\n\t\t\t\t\t\"monthNames\" : \"monthNamesShort\"))));\n\t\t\t\tdate.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?\n\t\t\t\t\t\"dayNames\" : \"dayNamesShort\"))) + 20 - date.getDay());\n\t\t\t}\n\t\t\tinst.input.attr(\"size\", this._formatDate(inst, date).length);\n\t\t}\n\t},\n\n\t/* Attach an inline date picker to a div. */\n\t_inlineDatepicker: function(target, inst) {\n\t\tvar divSpan = $(target);\n\t\tif (divSpan.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tdivSpan.addClass(this.markerClassName).append(inst.dpDiv);\n\t\t$.data(target, PROP_NAME, inst);\n\t\tthis._setDate(inst, this._getDefaultDate(inst), true);\n\t\tthis._updateDatepicker(inst);\n\t\tthis._updateAlternate(inst);\n\t\t//If disabled option is true, disable the datepicker before showing it (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t\t// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements\n\t\t// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height\n\t\tinst.dpDiv.css( \"display\", \"block\" );\n\t},\n\n\t/* Pop-up the date picker in a \"dialog\" box.\n\t * @param  input element - ignored\n\t * @param  date\tstring or Date - the initial date to display\n\t * @param  onSelect  function - the function to call when a date is selected\n\t * @param  settings  object - update the dialog date picker instance's settings (anonymous object)\n\t * @param  pos int[2] - coordinates for the dialog's position within the screen or\n\t *\t\t\t\t\tevent - with x/y coordinates or\n\t *\t\t\t\t\tleave empty for default (screen centre)\n\t * @return the manager object\n\t */\n\t_dialogDatepicker: function(input, date, onSelect, settings, pos) {\n\t\tvar id, browserWidth, browserHeight, scrollX, scrollY,\n\t\t\tinst = this._dialogInst; // internal instance\n\n\t\tif (!inst) {\n\t\t\tthis.uuid += 1;\n\t\t\tid = \"dp\" + this.uuid;\n\t\t\tthis._dialogInput = $(\"<input type='text' id='\" + id +\n\t\t\t\t\"' style='position: absolute; top: -100px; width: 0px;'/>\");\n\t\t\tthis._dialogInput.keydown(this._doKeyDown);\n\t\t\t$(\"body\").append(this._dialogInput);\n\t\t\tinst = this._dialogInst = this._newInst(this._dialogInput, false);\n\t\t\tinst.settings = {};\n\t\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\t}\n\t\textendRemove(inst.settings, settings || {});\n\t\tdate = (date && date.constructor === Date ? this._formatDate(inst, date) : date);\n\t\tthis._dialogInput.val(date);\n\n\t\tthis._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);\n\t\tif (!this._pos) {\n\t\t\tbrowserWidth = document.documentElement.clientWidth;\n\t\t\tbrowserHeight = document.documentElement.clientHeight;\n\t\t\tscrollX = document.documentElement.scrollLeft || document.body.scrollLeft;\n\t\t\tscrollY = document.documentElement.scrollTop || document.body.scrollTop;\n\t\t\tthis._pos = // should use actual width/height below\n\t\t\t\t[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];\n\t\t}\n\n\t\t// move input on screen for focus, but hidden behind dialog\n\t\tthis._dialogInput.css(\"left\", (this._pos[0] + 20) + \"px\").css(\"top\", this._pos[1] + \"px\");\n\t\tinst.settings.onSelect = onSelect;\n\t\tthis._inDialog = true;\n\t\tthis.dpDiv.addClass(this._dialogClass);\n\t\tthis._showDatepicker(this._dialogInput[0]);\n\t\tif ($.blockUI) {\n\t\t\t$.blockUI(this.dpDiv);\n\t\t}\n\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\treturn this;\n\t},\n\n\t/* Detach a datepicker from its control.\n\t * @param  target\telement - the target input field or division or span\n\t */\n\t_destroyDatepicker: function(target) {\n\t\tvar nodeName,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\t$.removeData(target, PROP_NAME);\n\t\tif (nodeName === \"input\") {\n\t\t\tinst.append.remove();\n\t\t\tinst.trigger.remove();\n\t\t\t$target.removeClass(this.markerClassName).\n\t\t\t\tunbind(\"focus\", this._showDatepicker).\n\t\t\t\tunbind(\"keydown\", this._doKeyDown).\n\t\t\t\tunbind(\"keypress\", this._doKeyPress).\n\t\t\t\tunbind(\"keyup\", this._doKeyUp);\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\t$target.removeClass(this.markerClassName).empty();\n\t\t}\n\t},\n\n\t/* Enable the date picker to a jQuery selection.\n\t * @param  target\telement - the target input field or division or span\n\t */\n\t_enableDatepicker: function(target) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName === \"input\") {\n\t\t\ttarget.disabled = false;\n\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\teach(function() { this.disabled = false; }).end().\n\t\t\t\tfilter(\"img\").css({opacity: \"1.0\", cursor: \"\"});\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\tinline.children().removeClass(\"ui-state-disabled\");\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tprop(\"disabled\", false);\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t},\n\n\t/* Disable the date picker to a jQuery selection.\n\t * @param  target\telement - the target input field or division or span\n\t */\n\t_disableDatepicker: function(target) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName === \"input\") {\n\t\t\ttarget.disabled = true;\n\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\teach(function() { this.disabled = true; }).end().\n\t\t\t\tfilter(\"img\").css({opacity: \"0.5\", cursor: \"default\"});\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\tinline.children().addClass(\"ui-state-disabled\");\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tprop(\"disabled\", true);\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t\tthis._disabledInputs[this._disabledInputs.length] = target;\n\t},\n\n\t/* Is the first field in a jQuery collection disabled as a datepicker?\n\t * @param  target\telement - the target input field or division or span\n\t * @return boolean - true if disabled, false if enabled\n\t */\n\t_isDisabledDatepicker: function(target) {\n\t\tif (!target) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var i = 0; i < this._disabledInputs.length; i++) {\n\t\t\tif (this._disabledInputs[i] === target) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\n\t/* Retrieve the instance data for the target control.\n\t * @param  target  element - the target input field or division or span\n\t * @return  object - the associated instance data\n\t * @throws  error if a jQuery problem getting data\n\t */\n\t_getInst: function(target) {\n\t\ttry {\n\t\t\treturn $.data(target, PROP_NAME);\n\t\t}\n\t\tcatch (err) {\n\t\t\tthrow \"Missing instance data for this datepicker\";\n\t\t}\n\t},\n\n\t/* Update or retrieve the settings for a date picker attached to an input field or division.\n\t * @param  target  element - the target input field or division or span\n\t * @param  name\tobject - the new settings to update or\n\t *\t\t\t\tstring - the name of the setting to change or retrieve,\n\t *\t\t\t\twhen retrieving also \"all\" for all instance settings or\n\t *\t\t\t\t\"defaults\" for all global defaults\n\t * @param  value   any - the new value for the setting\n\t *\t\t\t\t(omit if above is an object or to retrieve a value)\n\t */\n\t_optionDatepicker: function(target, name, value) {\n\t\tvar settings, date, minDate, maxDate,\n\t\t\tinst = this._getInst(target);\n\n\t\tif (arguments.length === 2 && typeof name === \"string\") {\n\t\t\treturn (name === \"defaults\" ? $.extend({}, $.datepicker._defaults) :\n\t\t\t\t(inst ? (name === \"all\" ? $.extend({}, inst.settings) :\n\t\t\t\tthis._get(inst, name)) : null));\n\t\t}\n\n\t\tsettings = name || {};\n\t\tif (typeof name === \"string\") {\n\t\t\tsettings = {};\n\t\t\tsettings[name] = value;\n\t\t}\n\n\t\tif (inst) {\n\t\t\tif (this._curInst === inst) {\n\t\t\t\tthis._hideDatepicker();\n\t\t\t}\n\n\t\t\tdate = this._getDateDatepicker(target, true);\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\");\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\");\n\t\t\textendRemove(inst.settings, settings);\n\t\t\t// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided\n\t\t\tif (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {\n\t\t\t\tinst.settings.minDate = this._formatDate(inst, minDate);\n\t\t\t}\n\t\t\tif (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {\n\t\t\t\tinst.settings.maxDate = this._formatDate(inst, maxDate);\n\t\t\t}\n\t\t\tif ( \"disabled\" in settings ) {\n\t\t\t\tif ( settings.disabled ) {\n\t\t\t\t\tthis._disableDatepicker(target);\n\t\t\t\t} else {\n\t\t\t\t\tthis._enableDatepicker(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._attachments($(target), inst);\n\t\t\tthis._autoSize(inst);\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateAlternate(inst);\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t// change method deprecated\n\t_changeDatepicker: function(target, name, value) {\n\t\tthis._optionDatepicker(target, name, value);\n\t},\n\n\t/* Redraw the date picker attached to an input field or division.\n\t * @param  target  element - the target input field or division or span\n\t */\n\t_refreshDatepicker: function(target) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t/* Set the dates for a jQuery selection.\n\t * @param  target element - the target input field or division or span\n\t * @param  date\tDate - the new date\n\t */\n\t_setDateDatepicker: function(target, date) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateDatepicker(inst);\n\t\t\tthis._updateAlternate(inst);\n\t\t}\n\t},\n\n\t/* Get the date(s) for the first entry in a jQuery selection.\n\t * @param  target element - the target input field or division or span\n\t * @param  noDefault boolean - true if no default date is to be used\n\t * @return Date - the current date\n\t */\n\t_getDateDatepicker: function(target, noDefault) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst && !inst.inline) {\n\t\t\tthis._setDateFromField(inst, noDefault);\n\t\t}\n\t\treturn (inst ? this._getDate(inst) : null);\n\t},\n\n\t/* Handle keystrokes. */\n\t_doKeyDown: function(event) {\n\t\tvar onSelect, dateStr, sel,\n\t\t\tinst = $.datepicker._getInst(event.target),\n\t\t\thandled = true,\n\t\t\tisRTL = inst.dpDiv.is(\".ui-datepicker-rtl\");\n\n\t\tinst._keyEvent = true;\n\t\tif ($.datepicker._datepickerShowing) {\n\t\t\tswitch (event.keyCode) {\n\t\t\t\tcase 9: $.datepicker._hideDatepicker();\n\t\t\t\t\t\thandled = false;\n\t\t\t\t\t\tbreak; // hide on tab out\n\t\t\t\tcase 13: sel = $(\"td.\" + $.datepicker._dayOverClass + \":not(.\" +\n\t\t\t\t\t\t\t\t\t$.datepicker._currentClass + \")\", inst.dpDiv);\n\t\t\t\t\t\tif (sel[0]) {\n\t\t\t\t\t\t\t$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonSelect = $.datepicker._get(inst, \"onSelect\");\n\t\t\t\t\t\tif (onSelect) {\n\t\t\t\t\t\t\tdateStr = $.datepicker._formatDate(inst);\n\n\t\t\t\t\t\t\t// trigger custom callback\n\t\t\t\t\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn false; // don't submit the form\n\t\t\t\tcase 27: $.datepicker._hideDatepicker();\n\t\t\t\t\t\tbreak; // hide on escape\n\t\t\t\tcase 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\tbreak; // previous month/year on page up/+ ctrl\n\t\t\t\tcase 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\tbreak; // next month/year on page down/+ ctrl\n\t\t\t\tcase 35: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._clearDate(event.target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // clear on ctrl or command +end\n\t\t\t\tcase 36: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._gotoToday(event.target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // current on ctrl or command +home\n\t\t\t\tcase 37: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// -1 day on ctrl or command +left\n\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// next month/year on alt +left on Mac\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 38: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, -7, \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // -1 week on ctrl or command +up\n\t\t\t\tcase 39: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// +1 day on ctrl or command +right\n\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// next month/year on alt +right\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 40: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, +7, \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // +1 week on ctrl or command +down\n\t\t\t\tdefault: handled = false;\n\t\t\t}\n\t\t} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home\n\t\t\t$.datepicker._showDatepicker(this);\n\t\t} else {\n\t\t\thandled = false;\n\t\t}\n\n\t\tif (handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t},\n\n\t/* Filter entered characters - based on date format. */\n\t_doKeyPress: function(event) {\n\t\tvar chars, chr,\n\t\t\tinst = $.datepicker._getInst(event.target);\n\n\t\tif ($.datepicker._get(inst, \"constrainInput\")) {\n\t\t\tchars = $.datepicker._possibleChars($.datepicker._get(inst, \"dateFormat\"));\n\t\t\tchr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);\n\t\t\treturn event.ctrlKey || event.metaKey || (chr < \" \" || !chars || chars.indexOf(chr) > -1);\n\t\t}\n\t},\n\n\t/* Synchronise manual entry and field/alternate field. */\n\t_doKeyUp: function(event) {\n\t\tvar date,\n\t\t\tinst = $.datepicker._getInst(event.target);\n\n\t\tif (inst.input.val() !== inst.lastVal) {\n\t\t\ttry {\n\t\t\t\tdate = $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t(inst.input ? inst.input.val() : null),\n\t\t\t\t\t$.datepicker._getFormatConfig(inst));\n\n\t\t\t\tif (date) { // only if valid\n\t\t\t\t\t$.datepicker._setDateFromField(inst);\n\t\t\t\t\t$.datepicker._updateAlternate(inst);\n\t\t\t\t\t$.datepicker._updateDatepicker(inst);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t},\n\n\t/* Pop-up the date picker for a given input field.\n\t * If false returned from beforeShow event handler do not show.\n\t * @param  input  element - the input field attached to the date picker or\n\t *\t\t\t\t\tevent - if triggered by focus\n\t */\n\t_showDatepicker: function(input) {\n\t\tinput = input.target || input;\n\t\tif (input.nodeName.toLowerCase() !== \"input\") { // find from button/image trigger\n\t\t\tinput = $(\"input\", input.parentNode)[0];\n\t\t}\n\n\t\tif ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here\n\t\t\treturn;\n\t\t}\n\n\t\tvar inst, beforeShow, beforeShowSettings, isFixed,\n\t\t\toffset, showAnim, duration;\n\n\t\tinst = $.datepicker._getInst(input);\n\t\tif ($.datepicker._curInst && $.datepicker._curInst !== inst) {\n\t\t\t$.datepicker._curInst.dpDiv.stop(true, true);\n\t\t\tif ( inst && $.datepicker._datepickerShowing ) {\n\t\t\t\t$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );\n\t\t\t}\n\t\t}\n\n\t\tbeforeShow = $.datepicker._get(inst, \"beforeShow\");\n\t\tbeforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};\n\t\tif(beforeShowSettings === false){\n\t\t\treturn;\n\t\t}\n\t\textendRemove(inst.settings, beforeShowSettings);\n\n\t\tinst.lastVal = null;\n\t\t$.datepicker._lastInput = input;\n\t\t$.datepicker._setDateFromField(inst);\n\n\t\tif ($.datepicker._inDialog) { // hide cursor\n\t\t\tinput.value = \"\";\n\t\t}\n\t\tif (!$.datepicker._pos) { // position below input\n\t\t\t$.datepicker._pos = $.datepicker._findPos(input);\n\t\t\t$.datepicker._pos[1] += input.offsetHeight; // add the height\n\t\t}\n\n\t\tisFixed = false;\n\t\t$(input).parents().each(function() {\n\t\t\tisFixed |= $(this).css(\"position\") === \"fixed\";\n\t\t\treturn !isFixed;\n\t\t});\n\n\t\toffset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};\n\t\t$.datepicker._pos = null;\n\t\t//to avoid flashes on Firefox\n\t\tinst.dpDiv.empty();\n\t\t// determine sizing offscreen\n\t\tinst.dpDiv.css({position: \"absolute\", display: \"block\", top: \"-1000px\"});\n\t\t$.datepicker._updateDatepicker(inst);\n\t\t// fix width for dynamic number of date pickers\n\t\t// and adjust position before showing\n\t\toffset = $.datepicker._checkOffset(inst, offset, isFixed);\n\t\tinst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?\n\t\t\t\"static\" : (isFixed ? \"fixed\" : \"absolute\")), display: \"none\",\n\t\t\tleft: offset.left + \"px\", top: offset.top + \"px\"});\n\n\t\tif (!inst.inline) {\n\t\t\tshowAnim = $.datepicker._get(inst, \"showAnim\");\n\t\t\tduration = $.datepicker._get(inst, \"duration\");\n\t\t\tinst.dpDiv.zIndex($(input).zIndex()+1);\n\t\t\t$.datepicker._datepickerShowing = true;\n\n\t\t\tif ( $.effects && $.effects.effect[ showAnim ] ) {\n\t\t\t\tinst.dpDiv.show(showAnim, $.datepicker._get(inst, \"showOptions\"), duration);\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[showAnim || \"show\"](showAnim ? duration : null);\n\t\t\t}\n\n\t\t\tif ( $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\t\tinst.input.focus();\n\t\t\t}\n\n\t\t\t$.datepicker._curInst = inst;\n\t\t}\n\t},\n\n\t/* Generate the date picker content. */\n\t_updateDatepicker: function(inst) {\n\t\tthis.maxRows = 4; //Reset the max number of rows being displayed (see #7043)\n\t\tinstActive = inst; // for delegate hover events\n\t\tinst.dpDiv.empty().append(this._generateHTML(inst));\n\t\tthis._attachHandlers(inst);\n\t\tinst.dpDiv.find(\".\" + this._dayOverClass + \" a\").mouseover();\n\n\t\tvar origyearshtml,\n\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\tcols = numMonths[1],\n\t\t\twidth = 17;\n\n\t\tinst.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\");\n\t\tif (cols > 1) {\n\t\t\tinst.dpDiv.addClass(\"ui-datepicker-multi-\" + cols).css(\"width\", (width * cols) + \"em\");\n\t\t}\n\t\tinst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? \"add\" : \"remove\") +\n\t\t\t\"Class\"](\"ui-datepicker-multi\");\n\t\tinst.dpDiv[(this._get(inst, \"isRTL\") ? \"add\" : \"remove\") +\n\t\t\t\"Class\"](\"ui-datepicker-rtl\");\n\n\t\tif (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\tinst.input.focus();\n\t\t}\n\n\t\t// deffered render of the years select (to avoid flashes on Firefox)\n\t\tif( inst.yearshtml ){\n\t\t\torigyearshtml = inst.yearshtml;\n\t\t\tsetTimeout(function(){\n\t\t\t\t//assure that inst.yearshtml didn't change.\n\t\t\t\tif( origyearshtml === inst.yearshtml && inst.yearshtml ){\n\t\t\t\t\tinst.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(inst.yearshtml);\n\t\t\t\t}\n\t\t\t\torigyearshtml = inst.yearshtml = null;\n\t\t\t}, 0);\n\t\t}\n\t},\n\n\t// #6694 - don't focus the input if it's already focused\n\t// this breaks the change event in IE\n\t// Support: IE and jQuery <1.9\n\t_shouldFocusInput: function( inst ) {\n\t\treturn inst.input && inst.input.is( \":visible\" ) && !inst.input.is( \":disabled\" ) && !inst.input.is( \":focus\" );\n\t},\n\n\t/* Check positioning to remain on screen. */\n\t_checkOffset: function(inst, offset, isFixed) {\n\t\tvar dpWidth = inst.dpDiv.outerWidth(),\n\t\t\tdpHeight = inst.dpDiv.outerHeight(),\n\t\t\tinputWidth = inst.input ? inst.input.outerWidth() : 0,\n\t\t\tinputHeight = inst.input ? inst.input.outerHeight() : 0,\n\t\t\tviewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),\n\t\t\tviewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());\n\n\t\toffset.left -= (this._get(inst, \"isRTL\") ? (dpWidth - inputWidth) : 0);\n\t\toffset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;\n\t\toffset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;\n\n\t\t// now check if datepicker is showing outside window viewport - move to a better place if so.\n\t\toffset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?\n\t\t\tMath.abs(offset.left + dpWidth - viewWidth) : 0);\n\t\toffset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?\n\t\t\tMath.abs(dpHeight + inputHeight) : 0);\n\n\t\treturn offset;\n\t},\n\n\t/* Find an object's position on the screen. */\n\t_findPos: function(obj) {\n\t\tvar position,\n\t\t\tinst = this._getInst(obj),\n\t\t\tisRTL = this._get(inst, \"isRTL\");\n\n\t\twhile (obj && (obj.type === \"hidden\" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {\n\t\t\tobj = obj[isRTL ? \"previousSibling\" : \"nextSibling\"];\n\t\t}\n\n\t\tposition = $(obj).offset();\n\t\treturn [position.left, position.top];\n\t},\n\n\t/* Hide the date picker from view.\n\t * @param  input  element - the input field attached to the date picker\n\t */\n\t_hideDatepicker: function(input) {\n\t\tvar showAnim, duration, postProcess, onClose,\n\t\t\tinst = this._curInst;\n\n\t\tif (!inst || (input && inst !== $.data(input, PROP_NAME))) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._datepickerShowing) {\n\t\t\tshowAnim = this._get(inst, \"showAnim\");\n\t\t\tduration = this._get(inst, \"duration\");\n\t\t\tpostProcess = function() {\n\t\t\t\t$.datepicker._tidyDialog(inst);\n\t\t\t};\n\n\t\t\t// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed\n\t\t\tif ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {\n\t\t\t\tinst.dpDiv.hide(showAnim, $.datepicker._get(inst, \"showOptions\"), duration, postProcess);\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[(showAnim === \"slideDown\" ? \"slideUp\" :\n\t\t\t\t\t(showAnim === \"fadeIn\" ? \"fadeOut\" : \"hide\"))]((showAnim ? duration : null), postProcess);\n\t\t\t}\n\n\t\t\tif (!showAnim) {\n\t\t\t\tpostProcess();\n\t\t\t}\n\t\t\tthis._datepickerShowing = false;\n\n\t\t\tonClose = this._get(inst, \"onClose\");\n\t\t\tif (onClose) {\n\t\t\t\tonClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : \"\"), inst]);\n\t\t\t}\n\n\t\t\tthis._lastInput = null;\n\t\t\tif (this._inDialog) {\n\t\t\t\tthis._dialogInput.css({ position: \"absolute\", left: \"0\", top: \"-100px\" });\n\t\t\t\tif ($.blockUI) {\n\t\t\t\t\t$.unblockUI();\n\t\t\t\t\t$(\"body\").append(this.dpDiv);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._inDialog = false;\n\t\t}\n\t},\n\n\t/* Tidy up after a dialog display. */\n\t_tidyDialog: function(inst) {\n\t\tinst.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\");\n\t},\n\n\t/* Close date picker if clicked elsewhere. */\n\t_checkExternalClick: function(event) {\n\t\tif (!$.datepicker._curInst) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $target = $(event.target),\n\t\t\tinst = $.datepicker._getInst($target[0]);\n\n\t\tif ( ( ( $target[0].id !== $.datepicker._mainDivId &&\n\t\t\t\t$target.parents(\"#\" + $.datepicker._mainDivId).length === 0 &&\n\t\t\t\t!$target.hasClass($.datepicker.markerClassName) &&\n\t\t\t\t!$target.closest(\".\" + $.datepicker._triggerClass).length &&\n\t\t\t\t$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||\n\t\t\t( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {\n\t\t\t\t$.datepicker._hideDatepicker();\n\t\t}\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustDate: function(id, offset, period) {\n\t\tvar target = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tif (this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\t\tthis._adjustInstDate(inst, offset +\n\t\t\t(period === \"M\" ? this._get(inst, \"showCurrentAtPos\") : 0), // undo positioning\n\t\t\tperiod);\n\t\tthis._updateDatepicker(inst);\n\t},\n\n\t/* Action for current link. */\n\t_gotoToday: function(id) {\n\t\tvar date,\n\t\t\ttarget = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tif (this._get(inst, \"gotoCurrent\") && inst.currentDay) {\n\t\t\tinst.selectedDay = inst.currentDay;\n\t\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth;\n\t\t\tinst.drawYear = inst.selectedYear = inst.currentYear;\n\t\t} else {\n\t\t\tdate = new Date();\n\t\t\tinst.selectedDay = date.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t}\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a new month/year. */\n\t_selectMonthYear: function(id, select, period) {\n\t\tvar target = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tinst[\"selected\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\tinst[\"draw\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\t\tparseInt(select.options[select.selectedIndex].value,10);\n\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a day. */\n\t_selectDay: function(id, month, year, td) {\n\t\tvar inst,\n\t\t\ttarget = $(id);\n\n\t\tif ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\n\t\tinst = this._getInst(target[0]);\n\t\tinst.selectedDay = inst.currentDay = $(\"a\", td).html();\n\t\tinst.selectedMonth = inst.currentMonth = month;\n\t\tinst.selectedYear = inst.currentYear = year;\n\t\tthis._selectDate(id, this._formatDate(inst,\n\t\t\tinst.currentDay, inst.currentMonth, inst.currentYear));\n\t},\n\n\t/* Erase the input field and hide the date picker. */\n\t_clearDate: function(id) {\n\t\tvar target = $(id);\n\t\tthis._selectDate(target, \"\");\n\t},\n\n\t/* Update the input field with the selected date. */\n\t_selectDate: function(id, dateStr) {\n\t\tvar onSelect,\n\t\t\ttarget = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tdateStr = (dateStr != null ? dateStr : this._formatDate(inst));\n\t\tif (inst.input) {\n\t\t\tinst.input.val(dateStr);\n\t\t}\n\t\tthis._updateAlternate(inst);\n\n\t\tonSelect = this._get(inst, \"onSelect\");\n\t\tif (onSelect) {\n\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback\n\t\t} else if (inst.input) {\n\t\t\tinst.input.trigger(\"change\"); // fire the change event\n\t\t}\n\n\t\tif (inst.inline){\n\t\t\tthis._updateDatepicker(inst);\n\t\t} else {\n\t\t\tthis._hideDatepicker();\n\t\t\tthis._lastInput = inst.input[0];\n\t\t\tif (typeof(inst.input[0]) !== \"object\") {\n\t\t\t\tinst.input.focus(); // restore focus\n\t\t\t}\n\t\t\tthis._lastInput = null;\n\t\t}\n\t},\n\n\t/* Update any alternate field to synchronise with the main field. */\n\t_updateAlternate: function(inst) {\n\t\tvar altFormat, date, dateStr,\n\t\t\taltField = this._get(inst, \"altField\");\n\n\t\tif (altField) { // update alternate field too\n\t\t\taltFormat = this._get(inst, \"altFormat\") || this._get(inst, \"dateFormat\");\n\t\t\tdate = this._getDate(inst);\n\t\t\tdateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));\n\t\t\t$(altField).each(function() { $(this).val(dateStr); });\n\t\t}\n\t},\n\n\t/* Set as beforeShowDay function to prevent selection of weekends.\n\t * @param  date  Date - the date to customise\n\t * @return [boolean, string] - is this date selectable?, what is its CSS class?\n\t */\n\tnoWeekends: function(date) {\n\t\tvar day = date.getDay();\n\t\treturn [(day > 0 && day < 6), \"\"];\n\t},\n\n\t/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.\n\t * @param  date  Date - the date to get the week for\n\t * @return  number - the number of the week within the year that contains this date\n\t */\n\tiso8601Week: function(date) {\n\t\tvar time,\n\t\t\tcheckDate = new Date(date.getTime());\n\n\t\t// Find Thursday of this week starting on Monday\n\t\tcheckDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n\n\t\ttime = checkDate.getTime();\n\t\tcheckDate.setMonth(0); // Compare with Jan 1\n\t\tcheckDate.setDate(1);\n\t\treturn Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;\n\t},\n\n\t/* Parse a string value into a date object.\n\t * See formatDate below for the possible formats.\n\t *\n\t * @param  format string - the expected format of the date\n\t * @param  value string - the date in the above format\n\t * @param  settings Object - attributes include:\n\t *\t\t\t\t\tshortYearCutoff  number - the cutoff year for determining the century (optional)\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return  Date - the extracted date value or null if value is blank\n\t */\n\tparseDate: function (format, value, settings) {\n\t\tif (format == null || value == null) {\n\t\t\tthrow \"Invalid arguments\";\n\t\t}\n\n\t\tvalue = (typeof value === \"object\" ? value.toString() : value + \"\");\n\t\tif (value === \"\") {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar iFormat, dim, extra,\n\t\t\tiValue = 0,\n\t\t\tshortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,\n\t\t\tshortYearCutoff = (typeof shortYearCutoffTemp !== \"string\" ? shortYearCutoffTemp :\n\t\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),\n\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\tyear = -1,\n\t\t\tmonth = -1,\n\t\t\tday = -1,\n\t\t\tdoy = -1,\n\t\t\tliteral = false,\n\t\t\tdate,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\t\t\t// Extract a number from the string value\n\t\t\tgetNumber = function(match) {\n\t\t\t\tvar isDoubled = lookAhead(match),\n\t\t\t\t\tsize = (match === \"@\" ? 14 : (match === \"!\" ? 20 :\n\t\t\t\t\t(match === \"y\" && isDoubled ? 4 : (match === \"o\" ? 3 : 2)))),\n\t\t\t\t\tdigits = new RegExp(\"^\\\\d{1,\" + size + \"}\"),\n\t\t\t\t\tnum = value.substring(iValue).match(digits);\n\t\t\t\tif (!num) {\n\t\t\t\t\tthrow \"Missing number at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue += num[0].length;\n\t\t\t\treturn parseInt(num[0], 10);\n\t\t\t},\n\t\t\t// Extract a name from the string value and convert to an index\n\t\t\tgetName = function(match, shortNames, longNames) {\n\t\t\t\tvar index = -1,\n\t\t\t\t\tnames = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {\n\t\t\t\t\t\treturn [ [k, v] ];\n\t\t\t\t\t}).sort(function (a, b) {\n\t\t\t\t\t\treturn -(a[1].length - b[1].length);\n\t\t\t\t\t});\n\n\t\t\t\t$.each(names, function (i, pair) {\n\t\t\t\t\tvar name = pair[1];\n\t\t\t\t\tif (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n\t\t\t\t\t\tindex = pair[0];\n\t\t\t\t\t\tiValue += name.length;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\treturn index + 1;\n\t\t\t\t} else {\n\t\t\t\t\tthrow \"Unknown name at position \" + iValue;\n\t\t\t\t}\n\t\t\t},\n\t\t\t// Confirm that a literal character matches the string value\n\t\t\tcheckLiteral = function() {\n\t\t\t\tif (value.charAt(iValue) !== format.charAt(iFormat)) {\n\t\t\t\t\tthrow \"Unexpected literal at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue++;\n\t\t\t};\n\n\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\tif (literal) {\n\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\tday = getNumber(\"d\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\tgetName(\"D\", dayNamesShort, dayNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\tdoy = getNumber(\"o\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\tmonth = getNumber(\"m\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\tmonth = getName(\"M\", monthNamesShort, monthNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\tyear = getNumber(\"y\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\tdate = new Date(getNumber(\"@\"));\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\tdate = new Date((getNumber(\"!\") - this._ticksTo1970) / 10000);\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\")){\n\t\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (iValue < value.length){\n\t\t\textra = value.substr(iValue);\n\t\t\tif (!/^\\s+/.test(extra)) {\n\t\t\t\tthrow \"Extra/unparsed characters found in date: \" + extra;\n\t\t\t}\n\t\t}\n\n\t\tif (year === -1) {\n\t\t\tyear = new Date().getFullYear();\n\t\t} else if (year < 100) {\n\t\t\tyear += new Date().getFullYear() - new Date().getFullYear() % 100 +\n\t\t\t\t(year <= shortYearCutoff ? 0 : -100);\n\t\t}\n\n\t\tif (doy > -1) {\n\t\t\tmonth = 1;\n\t\t\tday = doy;\n\t\t\tdo {\n\t\t\t\tdim = this._getDaysInMonth(year, month - 1);\n\t\t\t\tif (day <= dim) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmonth++;\n\t\t\t\tday -= dim;\n\t\t\t} while (true);\n\t\t}\n\n\t\tdate = this._daylightSavingAdjust(new Date(year, month - 1, day));\n\t\tif (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n\t\t\tthrow \"Invalid date\"; // E.g. 31/02/00\n\t\t}\n\t\treturn date;\n\t},\n\n\t/* Standard date formats. */\n\tATOM: \"yy-mm-dd\", // RFC 3339 (ISO 8601)\n\tCOOKIE: \"D, dd M yy\",\n\tISO_8601: \"yy-mm-dd\",\n\tRFC_822: \"D, d M y\",\n\tRFC_850: \"DD, dd-M-y\",\n\tRFC_1036: \"D, d M y\",\n\tRFC_1123: \"D, d M yy\",\n\tRFC_2822: \"D, d M yy\",\n\tRSS: \"D, d M y\", // RFC 822\n\tTICKS: \"!\",\n\tTIMESTAMP: \"@\",\n\tW3C: \"yy-mm-dd\", // ISO 8601\n\n\t_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +\n\t\tMath.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),\n\n\t/* Format a date object into a string value.\n\t * The format can be combinations of the following:\n\t * d  - day of month (no leading zero)\n\t * dd - day of month (two digit)\n\t * o  - day of year (no leading zeros)\n\t * oo - day of year (three digit)\n\t * D  - day name short\n\t * DD - day name long\n\t * m  - month of year (no leading zero)\n\t * mm - month of year (two digit)\n\t * M  - month name short\n\t * MM - month name long\n\t * y  - year (two digit)\n\t * yy - year (four digit)\n\t * @ - Unix timestamp (ms since 01/01/1970)\n\t * ! - Windows ticks (100ns since 01/01/0001)\n\t * \"...\" - literal text\n\t * '' - single quote\n\t *\n\t * @param  format string - the desired format of the date\n\t * @param  date Date - the date value to format\n\t * @param  settings Object - attributes include:\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return  string - the date in the above format\n\t */\n\tformatDate: function (format, date, settings) {\n\t\tif (!date) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tvar iFormat,\n\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\t\t\t// Format a number, with leading zero if necessary\n\t\t\tformatNumber = function(match, value, len) {\n\t\t\t\tvar num = \"\" + value;\n\t\t\t\tif (lookAhead(match)) {\n\t\t\t\t\twhile (num.length < len) {\n\t\t\t\t\t\tnum = \"0\" + num;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn num;\n\t\t\t},\n\t\t\t// Format a name, short or long as requested\n\t\t\tformatName = function(match, value, shortNames, longNames) {\n\t\t\t\treturn (lookAhead(match) ? longNames[value] : shortNames[value]);\n\t\t\t},\n\t\t\toutput = \"\",\n\t\t\tliteral = false;\n\n\t\tif (date) {\n\t\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\t\tif (literal) {\n\t\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\t\tliteral = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\t\toutput += formatNumber(\"d\", date.getDate(), 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\t\toutput += formatName(\"D\", date.getDay(), dayNamesShort, dayNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\t\toutput += formatNumber(\"o\",\n\t\t\t\t\t\t\t\tMath.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\t\toutput += formatNumber(\"m\", date.getMonth() + 1, 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\t\toutput += formatName(\"M\", date.getMonth(), monthNamesShort, monthNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\t\toutput += (lookAhead(\"y\") ? date.getFullYear() :\n\t\t\t\t\t\t\t\t(date.getYear() % 100 < 10 ? \"0\" : \"\") + date.getYear() % 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\t\toutput += date.getTime();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\t\toutput += date.getTime() * 10000 + this._ticksTo1970;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\t\toutput += \"'\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t},\n\n\t/* Extract all possible characters from the date format. */\n\t_possibleChars: function (format) {\n\t\tvar iFormat,\n\t\t\tchars = \"\",\n\t\t\tliteral = false,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t};\n\n\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\tif (literal) {\n\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase \"d\": case \"m\": case \"y\": case \"@\":\n\t\t\t\t\t\tchars += \"0123456789\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\": case \"M\":\n\t\t\t\t\t\treturn null; // Accept anything\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\tchars += \"'\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn chars;\n\t},\n\n\t/* Get a setting value, defaulting if necessary. */\n\t_get: function(inst, name) {\n\t\treturn inst.settings[name] !== undefined ?\n\t\t\tinst.settings[name] : this._defaults[name];\n\t},\n\n\t/* Parse existing date and initialise date picker. */\n\t_setDateFromField: function(inst, noDefault) {\n\t\tif (inst.input.val() === inst.lastVal) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar dateFormat = this._get(inst, \"dateFormat\"),\n\t\t\tdates = inst.lastVal = inst.input ? inst.input.val() : null,\n\t\t\tdefaultDate = this._getDefaultDate(inst),\n\t\t\tdate = defaultDate,\n\t\t\tsettings = this._getFormatConfig(inst);\n\n\t\ttry {\n\t\t\tdate = this.parseDate(dateFormat, dates, settings) || defaultDate;\n\t\t} catch (event) {\n\t\t\tdates = (noDefault ? \"\" : dates);\n\t\t}\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tinst.currentDay = (dates ? date.getDate() : 0);\n\t\tinst.currentMonth = (dates ? date.getMonth() : 0);\n\t\tinst.currentYear = (dates ? date.getFullYear() : 0);\n\t\tthis._adjustInstDate(inst);\n\t},\n\n\t/* Retrieve the default date shown on opening. */\n\t_getDefaultDate: function(inst) {\n\t\treturn this._restrictMinMax(inst,\n\t\t\tthis._determineDate(inst, this._get(inst, \"defaultDate\"), new Date()));\n\t},\n\n\t/* A date may be specified as an exact value or a relative one. */\n\t_determineDate: function(inst, date, defaultDate) {\n\t\tvar offsetNumeric = function(offset) {\n\t\t\t\tvar date = new Date();\n\t\t\t\tdate.setDate(date.getDate() + offset);\n\t\t\t\treturn date;\n\t\t\t},\n\t\t\toffsetString = function(offset) {\n\t\t\t\ttry {\n\t\t\t\t\treturn $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t\toffset, $.datepicker._getFormatConfig(inst));\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\n\t\t\t\tvar date = (offset.toLowerCase().match(/^c/) ?\n\t\t\t\t\t$.datepicker._getDate(inst) : null) || new Date(),\n\t\t\t\t\tyear = date.getFullYear(),\n\t\t\t\t\tmonth = date.getMonth(),\n\t\t\t\t\tday = date.getDate(),\n\t\t\t\t\tpattern = /([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,\n\t\t\t\t\tmatches = pattern.exec(offset);\n\n\t\t\t\twhile (matches) {\n\t\t\t\t\tswitch (matches[2] || \"d\") {\n\t\t\t\t\t\tcase \"d\" : case \"D\" :\n\t\t\t\t\t\t\tday += parseInt(matches[1],10); break;\n\t\t\t\t\t\tcase \"w\" : case \"W\" :\n\t\t\t\t\t\t\tday += parseInt(matches[1],10) * 7; break;\n\t\t\t\t\t\tcase \"m\" : case \"M\" :\n\t\t\t\t\t\t\tmonth += parseInt(matches[1],10);\n\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\": case \"Y\" :\n\t\t\t\t\t\t\tyear += parseInt(matches[1],10);\n\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmatches = pattern.exec(offset);\n\t\t\t\t}\n\t\t\t\treturn new Date(year, month, day);\n\t\t\t},\n\t\t\tnewDate = (date == null || date === \"\" ? defaultDate : (typeof date === \"string\" ? offsetString(date) :\n\t\t\t\t(typeof date === \"number\" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));\n\n\t\tnewDate = (newDate && newDate.toString() === \"Invalid Date\" ? defaultDate : newDate);\n\t\tif (newDate) {\n\t\t\tnewDate.setHours(0);\n\t\t\tnewDate.setMinutes(0);\n\t\t\tnewDate.setSeconds(0);\n\t\t\tnewDate.setMilliseconds(0);\n\t\t}\n\t\treturn this._daylightSavingAdjust(newDate);\n\t},\n\n\t/* Handle switch to/from daylight saving.\n\t * Hours may be non-zero on daylight saving cut-over:\n\t * > 12 when midnight changeover, but then cannot generate\n\t * midnight datetime, so jump to 1AM, otherwise reset.\n\t * @param  date  (Date) the date to check\n\t * @return  (Date) the corrected date\n\t */\n\t_daylightSavingAdjust: function(date) {\n\t\tif (!date) {\n\t\t\treturn null;\n\t\t}\n\t\tdate.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\t\treturn date;\n\t},\n\n\t/* Set the date(s) directly. */\n\t_setDate: function(inst, date, noChange) {\n\t\tvar clear = !date,\n\t\t\torigMonth = inst.selectedMonth,\n\t\t\torigYear = inst.selectedYear,\n\t\t\tnewDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));\n\n\t\tinst.selectedDay = inst.currentDay = newDate.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();\n\t\tinst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();\n\t\tif ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {\n\t\t\tthis._notifyChange(inst);\n\t\t}\n\t\tthis._adjustInstDate(inst);\n\t\tif (inst.input) {\n\t\t\tinst.input.val(clear ? \"\" : this._formatDate(inst));\n\t\t}\n\t},\n\n\t/* Retrieve the date(s) directly. */\n\t_getDate: function(inst) {\n\t\tvar startDate = (!inst.currentYear || (inst.input && inst.input.val() === \"\") ? null :\n\t\t\tthis._daylightSavingAdjust(new Date(\n\t\t\tinst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\t\treturn startDate;\n\t},\n\n\t/* Attach the onxxx handlers.  These are declared statically so\n\t * they work with static code transformers like Caja.\n\t */\n\t_attachHandlers: function(inst) {\n\t\tvar stepMonths = this._get(inst, \"stepMonths\"),\n\t\t\tid = \"#\" + inst.id.replace( /\\\\\\\\/g, \"\\\\\" );\n\t\tinst.dpDiv.find(\"[data-handler]\").map(function () {\n\t\t\tvar handler = {\n\t\t\t\tprev: function () {\n\t\t\t\t\t$.datepicker._adjustDate(id, -stepMonths, \"M\");\n\t\t\t\t},\n\t\t\t\tnext: function () {\n\t\t\t\t\t$.datepicker._adjustDate(id, +stepMonths, \"M\");\n\t\t\t\t},\n\t\t\t\thide: function () {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t},\n\t\t\t\ttoday: function () {\n\t\t\t\t\t$.datepicker._gotoToday(id);\n\t\t\t\t},\n\t\t\t\tselectDay: function () {\n\t\t\t\t\t$.datepicker._selectDay(id, +this.getAttribute(\"data-month\"), +this.getAttribute(\"data-year\"), this);\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectMonth: function () {\n\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"M\");\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectYear: function () {\n\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"Y\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\t$(this).bind(this.getAttribute(\"data-event\"), handler[this.getAttribute(\"data-handler\")]);\n\t\t});\n\t},\n\n\t/* Generate the HTML for the current state of the date picker. */\n\t_generateHTML: function(inst) {\n\t\tvar maxDraw, prevText, prev, nextText, next, currentText, gotoDate,\n\t\t\tcontrols, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,\n\t\t\tmonthNames, monthNamesShort, beforeShowDay, showOtherMonths,\n\t\t\tselectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,\n\t\t\tcornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,\n\t\t\tprintDate, dRow, tbody, daySettings, otherMonth, unselectable,\n\t\t\ttempDate = new Date(),\n\t\t\ttoday = this._daylightSavingAdjust(\n\t\t\t\tnew Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time\n\t\t\tisRTL = this._get(inst, \"isRTL\"),\n\t\t\tshowButtonPanel = this._get(inst, \"showButtonPanel\"),\n\t\t\thideIfNoPrevNext = this._get(inst, \"hideIfNoPrevNext\"),\n\t\t\tnavigationAsDateFormat = this._get(inst, \"navigationAsDateFormat\"),\n\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\tshowCurrentAtPos = this._get(inst, \"showCurrentAtPos\"),\n\t\t\tstepMonths = this._get(inst, \"stepMonths\"),\n\t\t\tisMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),\n\t\t\tcurrentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :\n\t\t\t\tnew Date(inst.currentYear, inst.currentMonth, inst.currentDay))),\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tdrawMonth = inst.drawMonth - showCurrentAtPos,\n\t\t\tdrawYear = inst.drawYear;\n\n\t\tif (drawMonth < 0) {\n\t\t\tdrawMonth += 12;\n\t\t\tdrawYear--;\n\t\t}\n\t\tif (maxDate) {\n\t\t\tmaxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),\n\t\t\t\tmaxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));\n\t\t\tmaxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);\n\t\t\twhile (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {\n\t\t\t\tdrawMonth--;\n\t\t\t\tif (drawMonth < 0) {\n\t\t\t\t\tdrawMonth = 11;\n\t\t\t\t\tdrawYear--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinst.drawMonth = drawMonth;\n\t\tinst.drawYear = drawYear;\n\n\t\tprevText = this._get(inst, \"prevText\");\n\t\tprevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\n\t\tprev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?\n\t\t\t\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'\" +\n\t\t\t\" title='\" + prevText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\" :\n\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+ prevText +\"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\"));\n\n\t\tnextText = this._get(inst, \"nextText\");\n\t\tnextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\n\t\tnext = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?\n\t\t\t\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'\" +\n\t\t\t\" title='\" + nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\" :\n\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+ nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\"));\n\n\t\tcurrentText = this._get(inst, \"currentText\");\n\t\tgotoDate = (this._get(inst, \"gotoCurrent\") && inst.currentDay ? currentDate : today);\n\t\tcurrentText = (!navigationAsDateFormat ? currentText :\n\t\t\tthis.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));\n\n\t\tcontrols = (!inst.inline ? \"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\" +\n\t\t\tthis._get(inst, \"closeText\") + \"</button>\" : \"\");\n\n\t\tbuttonPanel = (showButtonPanel) ? \"<div class='ui-datepicker-buttonpane ui-widget-content'>\" + (isRTL ? controls : \"\") +\n\t\t\t(this._isInRange(inst, gotoDate) ? \"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'\" +\n\t\t\t\">\" + currentText + \"</button>\" : \"\") + (isRTL ? \"\" : controls) + \"</div>\" : \"\";\n\n\t\tfirstDay = parseInt(this._get(inst, \"firstDay\"),10);\n\t\tfirstDay = (isNaN(firstDay) ? 0 : firstDay);\n\n\t\tshowWeek = this._get(inst, \"showWeek\");\n\t\tdayNames = this._get(inst, \"dayNames\");\n\t\tdayNamesMin = this._get(inst, \"dayNamesMin\");\n\t\tmonthNames = this._get(inst, \"monthNames\");\n\t\tmonthNamesShort = this._get(inst, \"monthNamesShort\");\n\t\tbeforeShowDay = this._get(inst, \"beforeShowDay\");\n\t\tshowOtherMonths = this._get(inst, \"showOtherMonths\");\n\t\tselectOtherMonths = this._get(inst, \"selectOtherMonths\");\n\t\tdefaultDate = this._getDefaultDate(inst);\n\t\thtml = \"\";\n\t\tdow;\n\t\tfor (row = 0; row < numMonths[0]; row++) {\n\t\t\tgroup = \"\";\n\t\t\tthis.maxRows = 4;\n\t\t\tfor (col = 0; col < numMonths[1]; col++) {\n\t\t\t\tselectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));\n\t\t\t\tcornerClass = \" ui-corner-all\";\n\t\t\t\tcalender = \"\";\n\t\t\t\tif (isMultiMonth) {\n\t\t\t\t\tcalender += \"<div class='ui-datepicker-group\";\n\t\t\t\t\tif (numMonths[1] > 1) {\n\t\t\t\t\t\tswitch (col) {\n\t\t\t\t\t\t\tcase 0: calender += \" ui-datepicker-group-first\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"right\" : \"left\"); break;\n\t\t\t\t\t\t\tcase numMonths[1]-1: calender += \" ui-datepicker-group-last\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"left\" : \"right\"); break;\n\t\t\t\t\t\t\tdefault: calender += \" ui-datepicker-group-middle\"; cornerClass = \"\"; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcalender += \"'>\";\n\t\t\t\t}\n\t\t\t\tcalender += \"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\" + cornerClass + \"'>\" +\n\t\t\t\t\t(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : \"\") +\n\t\t\t\t\t(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : \"\") +\n\t\t\t\t\tthis._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\t\t\trow > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers\n\t\t\t\t\t\"</div><table class='ui-datepicker-calendar'><thead>\" +\n\t\t\t\t\t\"<tr>\";\n\t\t\t\tthead = (showWeek ? \"<th class='ui-datepicker-week-col'>\" + this._get(inst, \"weekHeader\") + \"</th>\" : \"\");\n\t\t\t\tfor (dow = 0; dow < 7; dow++) { // days of the week\n\t\t\t\t\tday = (dow + firstDay) % 7;\n\t\t\t\t\tthead += \"<th\" + ((dow + firstDay + 6) % 7 >= 5 ? \" class='ui-datepicker-week-end'\" : \"\") + \">\" +\n\t\t\t\t\t\t\"<span title='\" + dayNames[day] + \"'>\" + dayNamesMin[day] + \"</span></th>\";\n\t\t\t\t}\n\t\t\t\tcalender += thead + \"</tr></thead><tbody>\";\n\t\t\t\tdaysInMonth = this._getDaysInMonth(drawYear, drawMonth);\n\t\t\t\tif (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {\n\t\t\t\t\tinst.selectedDay = Math.min(inst.selectedDay, daysInMonth);\n\t\t\t\t}\n\t\t\t\tleadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;\n\t\t\t\tcurRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate\n\t\t\t\tnumRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)\n\t\t\t\tthis.maxRows = numRows;\n\t\t\t\tprintDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));\n\t\t\t\tfor (dRow = 0; dRow < numRows; dRow++) { // create date picker rows\n\t\t\t\t\tcalender += \"<tr>\";\n\t\t\t\t\ttbody = (!showWeek ? \"\" : \"<td class='ui-datepicker-week-col'>\" +\n\t\t\t\t\t\tthis._get(inst, \"calculateWeek\")(printDate) + \"</td>\");\n\t\t\t\t\tfor (dow = 0; dow < 7; dow++) { // create date picker days\n\t\t\t\t\t\tdaySettings = (beforeShowDay ?\n\t\t\t\t\t\t\tbeforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, \"\"]);\n\t\t\t\t\t\totherMonth = (printDate.getMonth() !== drawMonth);\n\t\t\t\t\t\tunselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||\n\t\t\t\t\t\t\t(minDate && printDate < minDate) || (maxDate && printDate > maxDate);\n\t\t\t\t\t\ttbody += \"<td class='\" +\n\t\t\t\t\t\t\t((dow + firstDay + 6) % 7 >= 5 ? \" ui-datepicker-week-end\" : \"\") + // highlight weekends\n\t\t\t\t\t\t\t(otherMonth ? \" ui-datepicker-other-month\" : \"\") + // highlight days from other months\n\t\t\t\t\t\t\t((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key\n\t\t\t\t\t\t\t(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?\n\t\t\t\t\t\t\t// or defaultDate is current printedDate and defaultDate is selectedDate\n\t\t\t\t\t\t\t\" \" + this._dayOverClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(unselectable ? \" \" + this._unselectableClass + \" ui-state-disabled\": \"\") +  // highlight unselectable days\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \"\" : \" \" + daySettings[1] + // highlight custom dates\n\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" \" + this._currentClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-datepicker-today\" : \"\")) + \"'\" + // highlight today (if different)\n\t\t\t\t\t\t\t((!otherMonth || showOtherMonths) && daySettings[2] ? \" title='\" + daySettings[2].replace(/'/g, \"&#39;\") + \"'\" : \"\") + // cell title\n\t\t\t\t\t\t\t(unselectable ? \"\" : \" data-handler='selectDay' data-event='click' data-month='\" + printDate.getMonth() + \"' data-year='\" + printDate.getFullYear() + \"'\") + \">\" + // actions\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \"&#xa0;\" : // display for other months\n\t\t\t\t\t\t\t(unselectable ? \"<span class='ui-state-default'>\" + printDate.getDate() + \"</span>\" : \"<a class='ui-state-default\" +\n\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-state-highlight\" : \"\") +\n\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" ui-state-active\" : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(otherMonth ? \" ui-priority-secondary\" : \"\") + // distinguish dates from other months\n\t\t\t\t\t\t\t\"' href='#'>\" + printDate.getDate() + \"</a>\")) + \"</td>\"; // display selectable date\n\t\t\t\t\t\tprintDate.setDate(printDate.getDate() + 1);\n\t\t\t\t\t\tprintDate = this._daylightSavingAdjust(printDate);\n\t\t\t\t\t}\n\t\t\t\t\tcalender += tbody + \"</tr>\";\n\t\t\t\t}\n\t\t\t\tdrawMonth++;\n\t\t\t\tif (drawMonth > 11) {\n\t\t\t\t\tdrawMonth = 0;\n\t\t\t\t\tdrawYear++;\n\t\t\t\t}\n\t\t\t\tcalender += \"</tbody></table>\" + (isMultiMonth ? \"</div>\" +\n\t\t\t\t\t\t\t((numMonths[0] > 0 && col === numMonths[1]-1) ? \"<div class='ui-datepicker-row-break'></div>\" : \"\") : \"\");\n\t\t\t\tgroup += calender;\n\t\t\t}\n\t\t\thtml += group;\n\t\t}\n\t\thtml += buttonPanel;\n\t\tinst._keyEvent = false;\n\t\treturn html;\n\t},\n\n\t/* Generate the month and year header. */\n\t_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\tsecondary, monthNames, monthNamesShort) {\n\n\t\tvar inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,\n\t\t\tchangeMonth = this._get(inst, \"changeMonth\"),\n\t\t\tchangeYear = this._get(inst, \"changeYear\"),\n\t\t\tshowMonthAfterYear = this._get(inst, \"showMonthAfterYear\"),\n\t\t\thtml = \"<div class='ui-datepicker-title'>\",\n\t\t\tmonthHtml = \"\";\n\n\t\t// month selection\n\t\tif (secondary || !changeMonth) {\n\t\t\tmonthHtml += \"<span class='ui-datepicker-month'>\" + monthNames[drawMonth] + \"</span>\";\n\t\t} else {\n\t\t\tinMinYear = (minDate && minDate.getFullYear() === drawYear);\n\t\t\tinMaxYear = (maxDate && maxDate.getFullYear() === drawYear);\n\t\t\tmonthHtml += \"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\";\n\t\t\tfor ( month = 0; month < 12; month++) {\n\t\t\t\tif ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {\n\t\t\t\t\tmonthHtml += \"<option value='\" + month + \"'\" +\n\t\t\t\t\t\t(month === drawMonth ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\">\" + monthNamesShort[month] + \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tmonthHtml += \"</select>\";\n\t\t}\n\n\t\tif (!showMonthAfterYear) {\n\t\t\thtml += monthHtml + (secondary || !(changeMonth && changeYear) ? \"&#xa0;\" : \"\");\n\t\t}\n\n\t\t// year selection\n\t\tif ( !inst.yearshtml ) {\n\t\t\tinst.yearshtml = \"\";\n\t\t\tif (secondary || !changeYear) {\n\t\t\t\thtml += \"<span class='ui-datepicker-year'>\" + drawYear + \"</span>\";\n\t\t\t} else {\n\t\t\t\t// determine range of years to display\n\t\t\t\tyears = this._get(inst, \"yearRange\").split(\":\");\n\t\t\t\tthisYear = new Date().getFullYear();\n\t\t\t\tdetermineYear = function(value) {\n\t\t\t\t\tvar year = (value.match(/c[+\\-].*/) ? drawYear + parseInt(value.substring(1), 10) :\n\t\t\t\t\t\t(value.match(/[+\\-].*/) ? thisYear + parseInt(value, 10) :\n\t\t\t\t\t\tparseInt(value, 10)));\n\t\t\t\t\treturn (isNaN(year) ? thisYear : year);\n\t\t\t\t};\n\t\t\t\tyear = determineYear(years[0]);\n\t\t\t\tendYear = Math.max(year, determineYear(years[1] || \"\"));\n\t\t\t\tyear = (minDate ? Math.max(year, minDate.getFullYear()) : year);\n\t\t\t\tendYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);\n\t\t\t\tinst.yearshtml += \"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";\n\t\t\t\tfor (; year <= endYear; year++) {\n\t\t\t\t\tinst.yearshtml += \"<option value='\" + year + \"'\" +\n\t\t\t\t\t\t(year === drawYear ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\">\" + year + \"</option>\";\n\t\t\t\t}\n\t\t\t\tinst.yearshtml += \"</select>\";\n\n\t\t\t\thtml += inst.yearshtml;\n\t\t\t\tinst.yearshtml = null;\n\t\t\t}\n\t\t}\n\n\t\thtml += this._get(inst, \"yearSuffix\");\n\t\tif (showMonthAfterYear) {\n\t\t\thtml += (secondary || !(changeMonth && changeYear) ? \"&#xa0;\" : \"\") + monthHtml;\n\t\t}\n\t\thtml += \"</div>\"; // Close datepicker_header\n\t\treturn html;\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustInstDate: function(inst, offset, period) {\n\t\tvar year = inst.drawYear + (period === \"Y\" ? offset : 0),\n\t\t\tmonth = inst.drawMonth + (period === \"M\" ? offset : 0),\n\t\t\tday = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === \"D\" ? offset : 0),\n\t\t\tdate = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));\n\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tif (period === \"M\" || period === \"Y\") {\n\t\t\tthis._notifyChange(inst);\n\t\t}\n\t},\n\n\t/* Ensure a date is within any min/max bounds. */\n\t_restrictMinMax: function(inst, date) {\n\t\tvar minDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tnewDate = (minDate && date < minDate ? minDate : date);\n\t\treturn (maxDate && newDate > maxDate ? maxDate : newDate);\n\t},\n\n\t/* Notify change of month/year. */\n\t_notifyChange: function(inst) {\n\t\tvar onChange = this._get(inst, \"onChangeMonthYear\");\n\t\tif (onChange) {\n\t\t\tonChange.apply((inst.input ? inst.input[0] : null),\n\t\t\t\t[inst.selectedYear, inst.selectedMonth + 1, inst]);\n\t\t}\n\t},\n\n\t/* Determine the number of months to show. */\n\t_getNumberOfMonths: function(inst) {\n\t\tvar numMonths = this._get(inst, \"numberOfMonths\");\n\t\treturn (numMonths == null ? [1, 1] : (typeof numMonths === \"number\" ? [1, numMonths] : numMonths));\n\t},\n\n\t/* Determine the current maximum date - ensure no time components are set. */\n\t_getMinMaxDate: function(inst, minMax) {\n\t\treturn this._determineDate(inst, this._get(inst, minMax + \"Date\"), null);\n\t},\n\n\t/* Find the number of days in a given month. */\n\t_getDaysInMonth: function(year, month) {\n\t\treturn 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();\n\t},\n\n\t/* Find the day of the week of the first of a month. */\n\t_getFirstDayOfMonth: function(year, month) {\n\t\treturn new Date(year, month, 1).getDay();\n\t},\n\n\t/* Determines if we should allow a \"next/prev\" month display change. */\n\t_canAdjustMonth: function(inst, offset, curYear, curMonth) {\n\t\tvar numMonths = this._getNumberOfMonths(inst),\n\t\t\tdate = this._daylightSavingAdjust(new Date(curYear,\n\t\t\tcurMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));\n\n\t\tif (offset < 0) {\n\t\t\tdate.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));\n\t\t}\n\t\treturn this._isInRange(inst, date);\n\t},\n\n\t/* Is the given date in the accepted range? */\n\t_isInRange: function(inst, date) {\n\t\tvar yearSplit, currentYear,\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tminYear = null,\n\t\t\tmaxYear = null,\n\t\t\tyears = this._get(inst, \"yearRange\");\n\t\t\tif (years){\n\t\t\t\tyearSplit = years.split(\":\");\n\t\t\t\tcurrentYear = new Date().getFullYear();\n\t\t\t\tminYear = parseInt(yearSplit[0], 10);\n\t\t\t\tmaxYear = parseInt(yearSplit[1], 10);\n\t\t\t\tif ( yearSplit[0].match(/[+\\-].*/) ) {\n\t\t\t\t\tminYear += currentYear;\n\t\t\t\t}\n\t\t\t\tif ( yearSplit[1].match(/[+\\-].*/) ) {\n\t\t\t\t\tmaxYear += currentYear;\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn ((!minDate || date.getTime() >= minDate.getTime()) &&\n\t\t\t(!maxDate || date.getTime() <= maxDate.getTime()) &&\n\t\t\t(!minYear || date.getFullYear() >= minYear) &&\n\t\t\t(!maxYear || date.getFullYear() <= maxYear));\n\t},\n\n\t/* Provide the configuration settings for formatting/parsing. */\n\t_getFormatConfig: function(inst) {\n\t\tvar shortYearCutoff = this._get(inst, \"shortYearCutoff\");\n\t\tshortYearCutoff = (typeof shortYearCutoff !== \"string\" ? shortYearCutoff :\n\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));\n\t\treturn {shortYearCutoff: shortYearCutoff,\n\t\t\tdayNamesShort: this._get(inst, \"dayNamesShort\"), dayNames: this._get(inst, \"dayNames\"),\n\t\t\tmonthNamesShort: this._get(inst, \"monthNamesShort\"), monthNames: this._get(inst, \"monthNames\")};\n\t},\n\n\t/* Format the given date for display. */\n\t_formatDate: function(inst, day, month, year) {\n\t\tif (!day) {\n\t\t\tinst.currentDay = inst.selectedDay;\n\t\t\tinst.currentMonth = inst.selectedMonth;\n\t\t\tinst.currentYear = inst.selectedYear;\n\t\t}\n\t\tvar date = (day ? (typeof day === \"object\" ? day :\n\t\t\tthis._daylightSavingAdjust(new Date(year, month, day))) :\n\t\t\tthis._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\treturn this.formatDate(this._get(inst, \"dateFormat\"), date, this._getFormatConfig(inst));\n\t}\n});\n\n/*\n * Bind hover events for datepicker elements.\n * Done via delegate so the binding only occurs once in the lifetime of the parent div.\n * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.\n */\nfunction bindHover(dpDiv) {\n\tvar selector = \"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";\n\treturn dpDiv.delegate(selector, \"mouseout\", function() {\n\t\t\t$(this).removeClass(\"ui-state-hover\");\n\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t$(this).removeClass(\"ui-datepicker-prev-hover\");\n\t\t\t}\n\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t$(this).removeClass(\"ui-datepicker-next-hover\");\n\t\t\t}\n\t\t})\n\t\t.delegate(selector, \"mouseover\", function(){\n\t\t\tif (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {\n\t\t\t\t$(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\");\n\t\t\t\t$(this).addClass(\"ui-state-hover\");\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t\t$(this).addClass(\"ui-datepicker-prev-hover\");\n\t\t\t\t}\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t\t$(this).addClass(\"ui-datepicker-next-hover\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n}\n\n/* jQuery extend now ignores nulls! */\nfunction extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}\n\n/* Invoke the datepicker functionality.\n   @param  options  string - a command, optionally followed by additional parameters or\n\t\t\t\t\tObject - settings for attaching new datepicker functionality\n   @return  jQuery object */\n$.fn.datepicker = function(options){\n\n\t/* Verify an empty collection wasn't passed - Fixes #6976 */\n\tif ( !this.length ) {\n\t\treturn this;\n\t}\n\n\t/* Initialise the date picker. */\n\tif (!$.datepicker.initialized) {\n\t\t$(document).mousedown($.datepicker._checkExternalClick);\n\t\t$.datepicker.initialized = true;\n\t}\n\n\t/* Append datepicker main container to body if not exist. */\n\tif ($(\"#\"+$.datepicker._mainDivId).length === 0) {\n\t\t$(\"body\").append($.datepicker.dpDiv);\n\t}\n\n\tvar otherArgs = Array.prototype.slice.call(arguments, 1);\n\tif (typeof options === \"string\" && (options === \"isDisabled\" || options === \"getDate\" || options === \"widget\")) {\n\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t}\n\tif (options === \"option\" && arguments.length === 2 && typeof arguments[1] === \"string\") {\n\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t}\n\treturn this.each(function() {\n\t\ttypeof options === \"string\" ?\n\t\t\t$.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\t\tapply($.datepicker, [this].concat(otherArgs)) :\n\t\t\t$.datepicker._attachDatepicker(this, options);\n\t});\n};\n\n$.datepicker = new Datepicker(); // singleton instance\n$.datepicker.initialized = false;\n$.datepicker.uuid = new Date().getTime();\n$.datepicker.version = \"1.10.3\";\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nvar sizeRelatedOptions = {\n\t\tbuttons: true,\n\t\theight: true,\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true,\n\t\twidth: true\n\t},\n\tresizableRelatedOptions = {\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true\n\t};\n\n$.widget( \"ui.dialog\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoOpen: true,\n\t\tbuttons: [],\n\t\tcloseOnEscape: true,\n\t\tcloseText: \"close\",\n\t\tdialogClass: \"\",\n\t\tdraggable: true,\n\t\thide: null,\n\t\theight: \"auto\",\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 150,\n\t\tminWidth: 150,\n\t\tmodal: false,\n\t\tposition: {\n\t\t\tmy: \"center\",\n\t\t\tat: \"center\",\n\t\t\tof: window,\n\t\t\tcollision: \"fit\",\n\t\t\t// Ensure the titlebar is always visible\n\t\t\tusing: function( pos ) {\n\t\t\t\tvar topOffset = $( this ).css( pos ).offset().top;\n\t\t\t\tif ( topOffset < 0 ) {\n\t\t\t\t\t$( this ).css( \"top\", pos.top - topOffset );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresizable: true,\n\t\tshow: null,\n\t\ttitle: null,\n\t\twidth: 300,\n\n\t\t// callbacks\n\t\tbeforeClose: null,\n\t\tclose: null,\n\t\tdrag: null,\n\t\tdragStart: null,\n\t\tdragStop: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresize: null,\n\t\tresizeStart: null,\n\t\tresizeStop: null\n\t},\n\n\t_create: function() {\n\t\tthis.originalCss = {\n\t\t\tdisplay: this.element[0].style.display,\n\t\t\twidth: this.element[0].style.width,\n\t\t\tminHeight: this.element[0].style.minHeight,\n\t\t\tmaxHeight: this.element[0].style.maxHeight,\n\t\t\theight: this.element[0].style.height\n\t\t};\n\t\tthis.originalPosition = {\n\t\t\tparent: this.element.parent(),\n\t\t\tindex: this.element.parent().children().index( this.element )\n\t\t};\n\t\tthis.originalTitle = this.element.attr(\"title\");\n\t\tthis.options.title = this.options.title || this.originalTitle;\n\n\t\tthis._createWrapper();\n\n\t\tthis.element\n\t\t\t.show()\n\t\t\t.removeAttr(\"title\")\n\t\t\t.addClass(\"ui-dialog-content ui-widget-content\")\n\t\t\t.appendTo( this.uiDialog );\n\n\t\tthis._createTitlebar();\n\t\tthis._createButtonPane();\n\n\t\tif ( this.options.draggable && $.fn.draggable ) {\n\t\t\tthis._makeDraggable();\n\t\t}\n\t\tif ( this.options.resizable && $.fn.resizable ) {\n\t\t\tthis._makeResizable();\n\t\t}\n\n\t\tthis._isOpen = false;\n\t},\n\n\t_init: function() {\n\t\tif ( this.options.autoOpen ) {\n\t\t\tthis.open();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\t\tif ( element && (element.jquery || element.nodeType) ) {\n\t\t\treturn $( element );\n\t\t}\n\t\treturn this.document.find( element || \"body\" ).eq( 0 );\n\t},\n\n\t_destroy: function() {\n\t\tvar next,\n\t\t\toriginalPosition = this.originalPosition;\n\n\t\tthis._destroyOverlay();\n\n\t\tthis.element\n\t\t\t.removeUniqueId()\n\t\t\t.removeClass(\"ui-dialog-content ui-widget-content\")\n\t\t\t.css( this.originalCss )\n\t\t\t// Without detaching first, the following becomes really slow\n\t\t\t.detach();\n\n\t\tthis.uiDialog.stop( true, true ).remove();\n\n\t\tif ( this.originalTitle ) {\n\t\t\tthis.element.attr( \"title\", this.originalTitle );\n\t\t}\n\n\t\tnext = originalPosition.parent.children().eq( originalPosition.index );\n\t\t// Don't try to place the dialog next to itself (#8613)\n\t\tif ( next.length && next[0] !== this.element[0] ) {\n\t\t\tnext.before( this.element );\n\t\t} else {\n\t\t\toriginalPosition.parent.append( this.element );\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.uiDialog;\n\t},\n\n\tdisable: $.noop,\n\tenable: $.noop,\n\n\tclose: function( event ) {\n\t\tvar that = this;\n\n\t\tif ( !this._isOpen || this._trigger( \"beforeClose\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = false;\n\t\tthis._destroyOverlay();\n\n\t\tif ( !this.opener.filter(\":focusable\").focus().length ) {\n\t\t\t// Hiding a focused element doesn't trigger blur in WebKit\n\t\t\t// so in case we have nothing to focus on, explicitly blur the active element\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=47182\n\t\t\t$( this.document[0].activeElement ).blur();\n\t\t}\n\n\t\tthis._hide( this.uiDialog, this.options.hide, function() {\n\t\t\tthat._trigger( \"close\", event );\n\t\t});\n\t},\n\n\tisOpen: function() {\n\t\treturn this._isOpen;\n\t},\n\n\tmoveToTop: function() {\n\t\tthis._moveToTop();\n\t},\n\n\t_moveToTop: function( event, silent ) {\n\t\tvar moved = !!this.uiDialog.nextAll(\":visible\").insertBefore( this.uiDialog ).length;\n\t\tif ( moved && !silent ) {\n\t\t\tthis._trigger( \"focus\", event );\n\t\t}\n\t\treturn moved;\n\t},\n\n\topen: function() {\n\t\tvar that = this;\n\t\tif ( this._isOpen ) {\n\t\t\tif ( this._moveToTop() ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = true;\n\t\tthis.opener = $( this.document[0].activeElement );\n\n\t\tthis._size();\n\t\tthis._position();\n\t\tthis._createOverlay();\n\t\tthis._moveToTop( null, true );\n\t\tthis._show( this.uiDialog, this.options.show, function() {\n\t\t\tthat._focusTabbable();\n\t\t\tthat._trigger(\"focus\");\n\t\t});\n\n\t\tthis._trigger(\"open\");\n\t},\n\n\t_focusTabbable: function() {\n\t\t// Set focus to the first match:\n\t\t// 1. First element inside the dialog matching [autofocus]\n\t\t// 2. Tabbable element inside the content element\n\t\t// 3. Tabbable element inside the buttonpane\n\t\t// 4. The close button\n\t\t// 5. The dialog itself\n\t\tvar hasFocus = this.element.find(\"[autofocus]\");\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.element.find(\":tabbable\");\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogButtonPane.find(\":tabbable\");\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogTitlebarClose.filter(\":tabbable\");\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialog;\n\t\t}\n\t\thasFocus.eq( 0 ).focus();\n\t},\n\n\t_keepFocus: function( event ) {\n\t\tfunction checkFocus() {\n\t\t\tvar activeElement = this.document[0].activeElement,\n\t\t\t\tisActive = this.uiDialog[0] === activeElement ||\n\t\t\t\t\t$.contains( this.uiDialog[0], activeElement );\n\t\t\tif ( !isActive ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t}\n\t\tevent.preventDefault();\n\t\tcheckFocus.call( this );\n\t\t// support: IE\n\t\t// IE <= 8 doesn't prevent moving focus even with event.preventDefault()\n\t\t// so we check again later\n\t\tthis._delay( checkFocus );\n\t},\n\n\t_createWrapper: function() {\n\t\tthis.uiDialog = $(\"<div>\")\n\t\t\t.addClass( \"ui-dialog ui-widget ui-widget-content ui-corner-all ui-front \" +\n\t\t\t\tthis.options.dialogClass )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: \"dialog\"\n\t\t\t})\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._on( this.uiDialog, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// prevent tabbing out of dialogs\n\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar tabbables = this.uiDialog.find(\":tabbable\"),\n\t\t\t\t\tfirst = tabbables.filter(\":first\"),\n\t\t\t\t\tlast  = tabbables.filter(\":last\");\n\n\t\t\t\tif ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {\n\t\t\t\t\tfirst.focus( 1 );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {\n\t\t\t\t\tlast.focus( 1 );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\tmousedown: function( event ) {\n\t\t\t\tif ( this._moveToTop( event ) ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// We assume that any existing aria-describedby attribute means\n\t\t// that the dialog content is marked up properly\n\t\t// otherwise we brute force the content as the description\n\t\tif ( !this.element.find(\"[aria-describedby]\").length ) {\n\t\t\tthis.uiDialog.attr({\n\t\t\t\t\"aria-describedby\": this.element.uniqueId().attr(\"id\")\n\t\t\t});\n\t\t}\n\t},\n\n\t_createTitlebar: function() {\n\t\tvar uiDialogTitle;\n\n\t\tthis.uiDialogTitlebar = $(\"<div>\")\n\t\t\t.addClass(\"ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix\")\n\t\t\t.prependTo( this.uiDialog );\n\t\tthis._on( this.uiDialogTitlebar, {\n\t\t\tmousedown: function( event ) {\n\t\t\t\t// Don't prevent click on close button (#8838)\n\t\t\t\t// Focusing a dialog that is partially scrolled out of view\n\t\t\t\t// causes the browser to scroll it into view, preventing the click event\n\t\t\t\tif ( !$( event.target ).closest(\".ui-dialog-titlebar-close\") ) {\n\t\t\t\t\t// Dialog isn't getting focus when dragging (#8063)\n\t\t\t\t\tthis.uiDialog.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.uiDialogTitlebarClose = $(\"<button></button>\")\n\t\t\t.button({\n\t\t\t\tlabel: this.options.closeText,\n\t\t\t\ticons: {\n\t\t\t\t\tprimary: \"ui-icon-closethick\"\n\t\t\t\t},\n\t\t\t\ttext: false\n\t\t\t})\n\t\t\t.addClass(\"ui-dialog-titlebar-close\")\n\t\t\t.appendTo( this.uiDialogTitlebar );\n\t\tthis._on( this.uiDialogTitlebarClose, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t});\n\n\t\tuiDialogTitle = $(\"<span>\")\n\t\t\t.uniqueId()\n\t\t\t.addClass(\"ui-dialog-title\")\n\t\t\t.prependTo( this.uiDialogTitlebar );\n\t\tthis._title( uiDialogTitle );\n\n\t\tthis.uiDialog.attr({\n\t\t\t\"aria-labelledby\": uiDialogTitle.attr(\"id\")\n\t\t});\n\t},\n\n\t_title: function( title ) {\n\t\tif ( !this.options.title ) {\n\t\t\ttitle.html(\"&#160;\");\n\t\t}\n\t\ttitle.text( this.options.title );\n\t},\n\n\t_createButtonPane: function() {\n\t\tthis.uiDialogButtonPane = $(\"<div>\")\n\t\t\t.addClass(\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\");\n\n\t\tthis.uiButtonSet = $(\"<div>\")\n\t\t\t.addClass(\"ui-dialog-buttonset\")\n\t\t\t.appendTo( this.uiDialogButtonPane );\n\n\t\tthis._createButtons();\n\t},\n\n\t_createButtons: function() {\n\t\tvar that = this,\n\t\t\tbuttons = this.options.buttons;\n\n\t\t// if we already have a button pane, remove it\n\t\tthis.uiDialogButtonPane.remove();\n\t\tthis.uiButtonSet.empty();\n\n\t\tif ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {\n\t\t\tthis.uiDialog.removeClass(\"ui-dialog-buttons\");\n\t\t\treturn;\n\t\t}\n\n\t\t$.each( buttons, function( name, props ) {\n\t\t\tvar click, buttonOptions;\n\t\t\tprops = $.isFunction( props ) ?\n\t\t\t\t{ click: props, text: name } :\n\t\t\t\tprops;\n\t\t\t// Default to a non-submitting button\n\t\t\tprops = $.extend( { type: \"button\" }, props );\n\t\t\t// Change the context for the click callback to be the main element\n\t\t\tclick = props.click;\n\t\t\tprops.click = function() {\n\t\t\t\tclick.apply( that.element[0], arguments );\n\t\t\t};\n\t\t\tbuttonOptions = {\n\t\t\t\ticons: props.icons,\n\t\t\t\ttext: props.showText\n\t\t\t};\n\t\t\tdelete props.icons;\n\t\t\tdelete props.showText;\n\t\t\t$( \"<button></button>\", props )\n\t\t\t\t.button( buttonOptions )\n\t\t\t\t.appendTo( that.uiButtonSet );\n\t\t});\n\t\tthis.uiDialog.addClass(\"ui-dialog-buttons\");\n\t\tthis.uiDialogButtonPane.appendTo( this.uiDialog );\n\t},\n\n\t_makeDraggable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\tposition: ui.position,\n\t\t\t\toffset: ui.offset\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.draggable({\n\t\t\tcancel: \".ui-dialog-content, .ui-dialog-titlebar-close\",\n\t\t\thandle: \".ui-dialog-titlebar\",\n\t\t\tcontainment: \"document\",\n\t\t\tstart: function( event, ui ) {\n\t\t\t\t$( this ).addClass(\"ui-dialog-dragging\");\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"dragStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tdrag: function( event, ui ) {\n\t\t\t\tthat._trigger( \"drag\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\toptions.position = [\n\t\t\t\t\tui.position.left - that.document.scrollLeft(),\n\t\t\t\t\tui.position.top - that.document.scrollTop()\n\t\t\t\t];\n\t\t\t\t$( this ).removeClass(\"ui-dialog-dragging\");\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"dragStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t});\n\t},\n\n\t_makeResizable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\thandles = options.resizable,\n\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\tposition = this.uiDialog.css(\"position\"),\n\t\t\tresizeHandles = typeof handles === \"string\" ?\n\t\t\t\thandles\t:\n\t\t\t\t\"n,e,s,w,se,sw,ne,nw\";\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\tposition: ui.position,\n\t\t\t\tsize: ui.size\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.resizable({\n\t\t\tcancel: \".ui-dialog-content\",\n\t\t\tcontainment: \"document\",\n\t\t\talsoResize: this.element,\n\t\t\tmaxWidth: options.maxWidth,\n\t\t\tmaxHeight: options.maxHeight,\n\t\t\tminWidth: options.minWidth,\n\t\t\tminHeight: this._minHeight(),\n\t\t\thandles: resizeHandles,\n\t\t\tstart: function( event, ui ) {\n\t\t\t\t$( this ).addClass(\"ui-dialog-resizing\");\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"resizeStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tresize: function( event, ui ) {\n\t\t\t\tthat._trigger( \"resize\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\toptions.height = $( this ).height();\n\t\t\t\toptions.width = $( this ).width();\n\t\t\t\t$( this ).removeClass(\"ui-dialog-resizing\");\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"resizeStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t})\n\t\t.css( \"position\", position );\n\t},\n\n\t_minHeight: function() {\n\t\tvar options = this.options;\n\n\t\treturn options.height === \"auto\" ?\n\t\t\toptions.minHeight :\n\t\t\tMath.min( options.minHeight, options.height );\n\t},\n\n\t_position: function() {\n\t\t// Need to show the dialog to get the actual offset in the position plugin\n\t\tvar isVisible = this.uiDialog.is(\":visible\");\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.show();\n\t\t}\n\t\tthis.uiDialog.position( this.options.position );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.hide();\n\t\t}\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar that = this,\n\t\t\tresize = false,\n\t\t\tresizableOptions = {};\n\n\t\t$.each( options, function( key, value ) {\n\t\t\tthat._setOption( key, value );\n\n\t\t\tif ( key in sizeRelatedOptions ) {\n\t\t\t\tresize = true;\n\t\t\t}\n\t\t\tif ( key in resizableRelatedOptions ) {\n\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t}\n\t\t});\n\n\t\tif ( resize ) {\n\t\t\tthis._size();\n\t\t\tthis._position();\n\t\t}\n\t\tif ( this.uiDialog.is(\":data(ui-resizable)\") ) {\n\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\t/*jshint maxcomplexity:15*/\n\t\tvar isDraggable, isResizable,\n\t\t\tuiDialog = this.uiDialog;\n\n\t\tif ( key === \"dialogClass\" ) {\n\t\t\tuiDialog\n\t\t\t\t.removeClass( this.options.dialogClass )\n\t\t\t\t.addClass( value );\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.uiDialog.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"buttons\" ) {\n\t\t\tthis._createButtons();\n\t\t}\n\n\t\tif ( key === \"closeText\" ) {\n\t\t\tthis.uiDialogTitlebarClose.button({\n\t\t\t\t// Ensure that we always pass a string\n\t\t\t\tlabel: \"\" + value\n\t\t\t});\n\t\t}\n\n\t\tif ( key === \"draggable\" ) {\n\t\t\tisDraggable = uiDialog.is(\":data(ui-draggable)\");\n\t\t\tif ( isDraggable && !value ) {\n\t\t\t\tuiDialog.draggable(\"destroy\");\n\t\t\t}\n\n\t\t\tif ( !isDraggable && value ) {\n\t\t\t\tthis._makeDraggable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"position\" ) {\n\t\t\tthis._position();\n\t\t}\n\n\t\tif ( key === \"resizable\" ) {\n\t\t\t// currently resizable, becoming non-resizable\n\t\t\tisResizable = uiDialog.is(\":data(ui-resizable)\");\n\t\t\tif ( isResizable && !value ) {\n\t\t\t\tuiDialog.resizable(\"destroy\");\n\t\t\t}\n\n\t\t\t// currently resizable, changing handles\n\t\t\tif ( isResizable && typeof value === \"string\" ) {\n\t\t\t\tuiDialog.resizable( \"option\", \"handles\", value );\n\t\t\t}\n\n\t\t\t// currently non-resizable, becoming resizable\n\t\t\tif ( !isResizable && value !== false ) {\n\t\t\t\tthis._makeResizable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"title\" ) {\n\t\t\tthis._title( this.uiDialogTitlebar.find(\".ui-dialog-title\") );\n\t\t}\n\t},\n\n\t_size: function() {\n\t\t// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t// divs will both have width and height set, so we need to reset them\n\t\tvar nonContentHeight, minContentHeight, maxContentHeight,\n\t\t\toptions = this.options;\n\n\t\t// Reset content sizing\n\t\tthis.element.show().css({\n\t\t\twidth: \"auto\",\n\t\t\tminHeight: 0,\n\t\t\tmaxHeight: \"none\",\n\t\t\theight: 0\n\t\t});\n\n\t\tif ( options.minWidth > options.width ) {\n\t\t\toptions.width = options.minWidth;\n\t\t}\n\n\t\t// reset wrapper sizing\n\t\t// determine the height of all the non-content elements\n\t\tnonContentHeight = this.uiDialog.css({\n\t\t\t\theight: \"auto\",\n\t\t\t\twidth: options.width\n\t\t\t})\n\t\t\t.outerHeight();\n\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\tmaxContentHeight = typeof options.maxHeight === \"number\" ?\n\t\t\tMath.max( 0, options.maxHeight - nonContentHeight ) :\n\t\t\t\"none\";\n\n\t\tif ( options.height === \"auto\" ) {\n\t\t\tthis.element.css({\n\t\t\t\tminHeight: minContentHeight,\n\t\t\t\tmaxHeight: maxContentHeight,\n\t\t\t\theight: \"auto\"\n\t\t\t});\n\t\t} else {\n\t\t\tthis.element.height( Math.max( 0, options.height - nonContentHeight ) );\n\t\t}\n\n\t\tif (this.uiDialog.is(\":data(ui-resizable)\") ) {\n\t\t\tthis.uiDialog.resizable( \"option\", \"minHeight\", this._minHeight() );\n\t\t}\n\t},\n\n\t_blockFrames: function() {\n\t\tthis.iframeBlocks = this.document.find( \"iframe\" ).map(function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\twidth: iframe.outerWidth(),\n\t\t\t\t\theight: iframe.outerHeight()\n\t\t\t\t})\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.offset( iframe.offset() )[0];\n\t\t});\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_allowInteraction: function( event ) {\n\t\tif ( $( event.target ).closest(\".ui-dialog\").length ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Remove hack when datepicker implements\n\t\t// the .ui-front logic (#8989)\n\t\treturn !!$( event.target ).closest(\".ui-datepicker\").length;\n\t},\n\n\t_createOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar that = this,\n\t\t\twidgetFullName = this.widgetFullName;\n\t\tif ( !$.ui.dialog.overlayInstances ) {\n\t\t\t// Prevent use of anchors and inputs.\n\t\t\t// We use a delay in case the overlay is created from an\n\t\t\t// event that we're going to be cancelling. (#2804)\n\t\t\tthis._delay(function() {\n\t\t\t\t// Handle .dialog().dialog(\"close\") (#4065)\n\t\t\t\tif ( $.ui.dialog.overlayInstances ) {\n\t\t\t\t\tthis.document.bind( \"focusin.dialog\", function( event ) {\n\t\t\t\t\t\tif ( !that._allowInteraction( event ) ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t$(\".ui-dialog:visible:last .ui-dialog-content\")\n\t\t\t\t\t\t\t\t.data( widgetFullName )._focusTabbable();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.overlay = $(\"<div>\")\n\t\t\t.addClass(\"ui-widget-overlay ui-front\")\n\t\t\t.appendTo( this._appendTo() );\n\t\tthis._on( this.overlay, {\n\t\t\tmousedown: \"_keepFocus\"\n\t\t});\n\t\t$.ui.dialog.overlayInstances++;\n\t},\n\n\t_destroyOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.overlay ) {\n\t\t\t$.ui.dialog.overlayInstances--;\n\n\t\t\tif ( !$.ui.dialog.overlayInstances ) {\n\t\t\t\tthis.document.unbind( \"focusin.dialog\" );\n\t\t\t}\n\t\t\tthis.overlay.remove();\n\t\t\tthis.overlay = null;\n\t\t}\n\t}\n});\n\n$.ui.dialog.overlayInstances = 0;\n\n// DEPRECATED\nif ( $.uiBackCompat !== false ) {\n\t// position option with array notation\n\t// just override with old implementation\n\t$.widget( \"ui.dialog\", $.ui.dialog, {\n\t\t_position: function() {\n\t\t\tvar position = this.options.position,\n\t\t\t\tmyAt = [],\n\t\t\t\toffset = [ 0, 0 ],\n\t\t\t\tisVisible;\n\n\t\t\tif ( position ) {\n\t\t\t\tif ( typeof position === \"string\" || (typeof position === \"object\" && \"0\" in position ) ) {\n\t\t\t\t\tmyAt = position.split ? position.split(\" \") : [ position[0], position[1] ];\n\t\t\t\t\tif ( myAt.length === 1 ) {\n\t\t\t\t\t\tmyAt[1] = myAt[0];\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each( [ \"left\", \"top\" ], function( i, offsetPosition ) {\n\t\t\t\t\t\tif ( +myAt[ i ] === myAt[ i ] ) {\n\t\t\t\t\t\t\toffset[ i ] = myAt[ i ];\n\t\t\t\t\t\t\tmyAt[ i ] = offsetPosition;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tposition = {\n\t\t\t\t\t\tmy: myAt[0] + (offset[0] < 0 ? offset[0] : \"+\" + offset[0]) + \" \" +\n\t\t\t\t\t\t\tmyAt[1] + (offset[1] < 0 ? offset[1] : \"+\" + offset[1]),\n\t\t\t\t\t\tat: myAt.join(\" \")\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tposition = $.extend( {}, $.ui.dialog.prototype.options.position, position );\n\t\t\t} else {\n\t\t\t\tposition = $.ui.dialog.prototype.options.position;\n\t\t\t}\n\n\t\t\t// need to show the dialog to get the actual offset in the position plugin\n\t\t\tisVisible = this.uiDialog.is(\":visible\");\n\t\t\tif ( !isVisible ) {\n\t\t\t\tthis.uiDialog.show();\n\t\t\t}\n\t\t\tthis.uiDialog.position( position );\n\t\t\tif ( !isVisible ) {\n\t\t\t\tthis.uiDialog.hide();\n\t\t\t}\n\t\t}\n\t});\n}\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\nvar rvertical = /up|down|vertical/,\n\trpositivemotion = /up|left|vertical|horizontal/;\n\n$.effects.effect.blind = function( o, done ) {\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tdirection = o.direction || \"up\",\n\t\tvertical = rvertical.test( direction ),\n\t\tref = vertical ? \"height\" : \"width\",\n\t\tref2 = vertical ? \"top\" : \"left\",\n\t\tmotion = rpositivemotion.test( direction ),\n\t\tanimation = {},\n\t\tshow = mode === \"show\",\n\t\twrapper, distance, margin;\n\n\t// if already wrapped, the wrapper's properties are my property. #6245\n\tif ( el.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t$.effects.save( el.parent(), props );\n\t} else {\n\t\t$.effects.save( el, props );\n\t}\n\tel.show();\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\n\tdistance = wrapper[ ref ]();\n\tmargin = parseFloat( wrapper.css( ref2 ) ) || 0;\n\n\tanimation[ ref ] = show ? distance : 0;\n\tif ( !motion ) {\n\t\tel\n\t\t\t.css( vertical ? \"bottom\" : \"right\", 0 )\n\t\t\t.css( vertical ? \"top\" : \"left\", \"auto\" )\n\t\t\t.css({ position: \"absolute\" });\n\n\t\tanimation[ ref2 ] = show ? margin : distance + margin;\n\t}\n\n\t// start at 0 if we are showing\n\tif ( show ) {\n\t\twrapper.css( ref, 0 );\n\t\tif ( ! motion ) {\n\t\t\twrapper.css( ref2, margin + distance );\n\t\t}\n\t}\n\n\t// Animate\n\twrapper.animate( animation, {\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tqueue: false,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.bounce = function( o, done ) {\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\n\t\t// defaults:\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\thide = mode === \"hide\",\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"up\",\n\t\tdistance = o.distance,\n\t\ttimes = o.times || 5,\n\n\t\t// number of internal animations\n\t\tanims = times * 2 + ( show || hide ? 1 : 0 ),\n\t\tspeed = o.duration / anims,\n\t\teasing = o.easing,\n\n\t\t// utility:\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ),\n\t\ti,\n\t\tupAnim,\n\t\tdownAnim,\n\n\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\tqueue = el.queue(),\n\t\tqueuelen = queue.length;\n\n\t// Avoid touching opacity to prevent clearType and PNG issues in IE\n\tif ( show || hide ) {\n\t\tprops.push( \"opacity\" );\n\t}\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el ); // Create Wrapper\n\n\t// default distance for the BIGGEST bounce is the outer Distance / 3\n\tif ( !distance ) {\n\t\tdistance = el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]() / 3;\n\t}\n\n\tif ( show ) {\n\t\tdownAnim = { opacity: 1 };\n\t\tdownAnim[ ref ] = 0;\n\n\t\t// if we are showing, force opacity 0 and set the initial position\n\t\t// then do the \"first\" animation\n\t\tel.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion ? -distance * 2 : distance * 2 )\n\t\t\t.animate( downAnim, speed, easing );\n\t}\n\n\t// start at the smallest distance if we are hiding\n\tif ( hide ) {\n\t\tdistance = distance / Math.pow( 2, times - 1 );\n\t}\n\n\tdownAnim = {};\n\tdownAnim[ ref ] = 0;\n\t// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here\n\tfor ( i = 0; i < times; i++ ) {\n\t\tupAnim = {};\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\tel.animate( upAnim, speed, easing )\n\t\t\t.animate( downAnim, speed, easing );\n\n\t\tdistance = hide ? distance * 2 : distance / 2;\n\t}\n\n\t// Last Bounce when Hiding\n\tif ( hide ) {\n\t\tupAnim = { opacity: 0 };\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\tel.animate( upAnim, speed, easing );\n\t}\n\n\tel.queue(function() {\n\t\tif ( hide ) {\n\t\t\tel.hide();\n\t\t}\n\t\t$.effects.restore( el, props );\n\t\t$.effects.removeWrapper( el );\n\t\tdone();\n\t});\n\n\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\tif ( queuelen > 1) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\tel.dequeue();\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.clip = function( o, done ) {\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"vertical\",\n\t\tvert = direction === \"vertical\",\n\t\tsize = vert ? \"height\" : \"width\",\n\t\tposition = vert ? \"top\" : \"left\",\n\t\tanimation = {},\n\t\twrapper, animate, distance;\n\n\t// Save & Show\n\t$.effects.save( el, props );\n\tel.show();\n\n\t// Create Wrapper\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\tanimate = ( el[0].tagName === \"IMG\" ) ? wrapper : el;\n\tdistance = animate[ size ]();\n\n\t// Shift\n\tif ( show ) {\n\t\tanimate.css( size, 0 );\n\t\tanimate.css( position, distance / 2 );\n\t}\n\n\t// Create Animation Object:\n\tanimation[ size ] = show ? distance : 0;\n\tanimation[ position ] = show ? 0 : distance / 2;\n\n\t// Animate\n\tanimate.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( !show ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.drop = function( o, done ) {\n\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"opacity\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"left\",\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ) ? \"pos\" : \"neg\",\n\t\tanimation = {\n\t\t\topacity: show ? 1 : 0\n\t\t},\n\t\tdistance;\n\n\t// Adjust\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\n\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\": \"outerWidth\" ]( true ) / 2;\n\n\tif ( show ) {\n\t\tel\n\t\t\t.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion === \"pos\" ? -distance : distance );\n\t}\n\n\t// Animation\n\tanimation[ ref ] = ( show ?\n\t\t( motion === \"pos\" ? \"+=\" : \"-=\" ) :\n\t\t( motion === \"pos\" ? \"-=\" : \"+=\" ) ) +\n\t\tdistance;\n\n\t// Animate\n\tel.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.explode = function( o, done ) {\n\n\tvar rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,\n\t\tcells = rows,\n\t\tel = $( this ),\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\n\t\t// show and then visibility:hidden the element before calculating offset\n\t\toffset = el.show().css( \"visibility\", \"hidden\" ).offset(),\n\n\t\t// width and height of a piece\n\t\twidth = Math.ceil( el.outerWidth() / cells ),\n\t\theight = Math.ceil( el.outerHeight() / rows ),\n\t\tpieces = [],\n\n\t\t// loop\n\t\ti, j, left, top, mx, my;\n\n\t// children animate complete:\n\tfunction childComplete() {\n\t\tpieces.push( this );\n\t\tif ( pieces.length === rows * cells ) {\n\t\t\tanimComplete();\n\t\t}\n\t}\n\n\t// clone the element for each row and cell.\n\tfor( i = 0; i < rows ; i++ ) { // ===>\n\t\ttop = offset.top + i * height;\n\t\tmy = i - ( rows - 1 ) / 2 ;\n\n\t\tfor( j = 0; j < cells ; j++ ) { // |||\n\t\t\tleft = offset.left + j * width;\n\t\t\tmx = j - ( cells - 1 ) / 2 ;\n\n\t\t\t// Create a clone of the now hidden main element that will be absolute positioned\n\t\t\t// within a wrapper div off the -left and -top equal to size of our pieces\n\t\t\tel\n\t\t\t\t.clone()\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.wrap( \"<div></div>\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tvisibility: \"visible\",\n\t\t\t\t\tleft: -j * width,\n\t\t\t\t\ttop: -i * height\n\t\t\t\t})\n\n\t\t\t// select the wrapper - make it overflow: hidden and absolute positioned based on\n\t\t\t// where the original was located +left and +top equal to the size of pieces\n\t\t\t\t.parent()\n\t\t\t\t.addClass( \"ui-effects-explode\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\twidth: width,\n\t\t\t\t\theight: height,\n\t\t\t\t\tleft: left + ( show ? mx * width : 0 ),\n\t\t\t\t\ttop: top + ( show ? my * height : 0 ),\n\t\t\t\t\topacity: show ? 0 : 1\n\t\t\t\t}).animate({\n\t\t\t\t\tleft: left + ( show ? 0 : mx * width ),\n\t\t\t\t\ttop: top + ( show ? 0 : my * height ),\n\t\t\t\t\topacity: show ? 1 : 0\n\t\t\t\t}, o.duration || 500, o.easing, childComplete );\n\t\t}\n\t}\n\n\tfunction animComplete() {\n\t\tel.css({\n\t\t\tvisibility: \"visible\"\n\t\t});\n\t\t$( pieces ).remove();\n\t\tif ( !show ) {\n\t\t\tel.hide();\n\t\t}\n\t\tdone();\n\t}\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.fade = function( o, done ) {\n\tvar el = $( this ),\n\t\tmode = $.effects.setMode( el, o.mode || \"toggle\" );\n\n\tel.animate({\n\t\topacity: mode\n\t}, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: done\n\t});\n};\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n$.effects.effect.fold = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tsize = o.size || 15,\n\t\tpercent = /([0-9]+)%/.exec( size ),\n\t\thorizFirst = !!o.horizFirst,\n\t\twidthFirst = show !== horizFirst,\n\t\tref = widthFirst ? [ \"width\", \"height\" ] : [ \"height\", \"width\" ],\n\t\tduration = o.duration / 2,\n\t\twrapper, distance,\n\t\tanimation1 = {},\n\t\tanimation2 = {};\n\n\t$.effects.save( el, props );\n\tel.show();\n\n\t// Create Wrapper\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\tdistance = widthFirst ?\n\t\t[ wrapper.width(), wrapper.height() ] :\n\t\t[ wrapper.height(), wrapper.width() ];\n\n\tif ( percent ) {\n\t\tsize = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];\n\t}\n\tif ( show ) {\n\t\twrapper.css( horizFirst ? {\n\t\t\theight: 0,\n\t\t\twidth: size\n\t\t} : {\n\t\t\theight: size,\n\t\t\twidth: 0\n\t\t});\n\t}\n\n\t// Animation\n\tanimation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;\n\tanimation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;\n\n\t// Animate\n\twrapper\n\t\t.animate( animation1, duration, o.easing )\n\t\t.animate( animation2, duration, o.easing, function() {\n\t\t\tif ( hide ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.highlight = function( o, done ) {\n\tvar elem = $( this ),\n\t\tprops = [ \"backgroundImage\", \"backgroundColor\", \"opacity\" ],\n\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\tanimation = {\n\t\t\tbackgroundColor: elem.css( \"backgroundColor\" )\n\t\t};\n\n\tif (mode === \"hide\") {\n\t\tanimation.opacity = 0;\n\t}\n\n\t$.effects.save( elem, props );\n\n\telem\n\t\t.show()\n\t\t.css({\n\t\t\tbackgroundImage: \"none\",\n\t\t\tbackgroundColor: o.color || \"#ffff99\"\n\t\t})\n\t\t.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\telem.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( elem, props );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.pulsate = function( o, done ) {\n\tvar elem = $( this ),\n\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tshowhide = ( show || mode === \"hide\" ),\n\n\t\t// showing or hiding leaves of the \"last\" animation\n\t\tanims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),\n\t\tduration = o.duration / anims,\n\t\tanimateTo = 0,\n\t\tqueue = elem.queue(),\n\t\tqueuelen = queue.length,\n\t\ti;\n\n\tif ( show || !elem.is(\":visible\")) {\n\t\telem.css( \"opacity\", 0 ).show();\n\t\tanimateTo = 1;\n\t}\n\n\t// anims - 1 opacity \"toggles\"\n\tfor ( i = 1; i < anims; i++ ) {\n\t\telem.animate({\n\t\t\topacity: animateTo\n\t\t}, duration, o.easing );\n\t\tanimateTo = 1 - animateTo;\n\t}\n\n\telem.animate({\n\t\topacity: animateTo\n\t}, duration, o.easing);\n\n\telem.queue(function() {\n\t\tif ( hide ) {\n\t\t\telem.hide();\n\t\t}\n\t\tdone();\n\t});\n\n\t// We just queued up \"anims\" animations, we need to put them next in the queue\n\tif ( queuelen > 1 ) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\telem.dequeue();\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.puff = function( o, done ) {\n\tvar elem = $( this ),\n\t\tmode = $.effects.setMode( elem, o.mode || \"hide\" ),\n\t\thide = mode === \"hide\",\n\t\tpercent = parseInt( o.percent, 10 ) || 150,\n\t\tfactor = percent / 100,\n\t\toriginal = {\n\t\t\theight: elem.height(),\n\t\t\twidth: elem.width(),\n\t\t\touterHeight: elem.outerHeight(),\n\t\t\touterWidth: elem.outerWidth()\n\t\t};\n\n\t$.extend( o, {\n\t\teffect: \"scale\",\n\t\tqueue: false,\n\t\tfade: true,\n\t\tmode: mode,\n\t\tcomplete: done,\n\t\tpercent: hide ? percent : 100,\n\t\tfrom: hide ?\n\t\t\toriginal :\n\t\t\t{\n\t\t\t\theight: original.height * factor,\n\t\t\t\twidth: original.width * factor,\n\t\t\t\touterHeight: original.outerHeight * factor,\n\t\t\t\touterWidth: original.outerWidth * factor\n\t\t\t}\n\t});\n\n\telem.effect( o );\n};\n\n$.effects.effect.scale = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\toptions = $.extend( true, {}, o ),\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\tpercent = parseInt( o.percent, 10 ) ||\n\t\t\t( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === \"hide\" ? 0 : 100 ) ),\n\t\tdirection = o.direction || \"both\",\n\t\torigin = o.origin,\n\t\toriginal = {\n\t\t\theight: el.height(),\n\t\t\twidth: el.width(),\n\t\t\touterHeight: el.outerHeight(),\n\t\t\touterWidth: el.outerWidth()\n\t\t},\n\t\tfactor = {\n\t\t\ty: direction !== \"horizontal\" ? (percent / 100) : 1,\n\t\t\tx: direction !== \"vertical\" ? (percent / 100) : 1\n\t\t};\n\n\t// We are going to pass this effect to the size effect:\n\toptions.effect = \"size\";\n\toptions.queue = false;\n\toptions.complete = done;\n\n\t// Set default origin and restore for show/hide\n\tif ( mode !== \"effect\" ) {\n\t\toptions.origin = origin || [\"middle\",\"center\"];\n\t\toptions.restore = true;\n\t}\n\n\toptions.from = o.from || ( mode === \"show\" ? {\n\t\theight: 0,\n\t\twidth: 0,\n\t\touterHeight: 0,\n\t\touterWidth: 0\n\t} : original );\n\toptions.to = {\n\t\theight: original.height * factor.y,\n\t\twidth: original.width * factor.x,\n\t\touterHeight: original.outerHeight * factor.y,\n\t\touterWidth: original.outerWidth * factor.x\n\t};\n\n\t// Fade option to support puff\n\tif ( options.fade ) {\n\t\tif ( mode === \"show\" ) {\n\t\t\toptions.from.opacity = 0;\n\t\t\toptions.to.opacity = 1;\n\t\t}\n\t\tif ( mode === \"hide\" ) {\n\t\t\toptions.from.opacity = 1;\n\t\t\toptions.to.opacity = 0;\n\t\t}\n\t}\n\n\t// Animate\n\tel.effect( options );\n\n};\n\n$.effects.effect.size = function( o, done ) {\n\n\t// Create element\n\tvar original, baseline, factor,\n\t\tel = $( this ),\n\t\tprops0 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\", \"overflow\", \"opacity\" ],\n\n\t\t// Always restore\n\t\tprops1 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"overflow\", \"opacity\" ],\n\n\t\t// Copy for children\n\t\tprops2 = [ \"width\", \"height\", \"overflow\" ],\n\t\tcProps = [ \"fontSize\" ],\n\t\tvProps = [ \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\" ],\n\t\thProps = [ \"borderLeftWidth\", \"borderRightWidth\", \"paddingLeft\", \"paddingRight\" ],\n\n\t\t// Set options\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\trestore = o.restore || mode !== \"effect\",\n\t\tscale = o.scale || \"both\",\n\t\torigin = o.origin || [ \"middle\", \"center\" ],\n\t\tposition = el.css( \"position\" ),\n\t\tprops = restore ? props0 : props1,\n\t\tzero = {\n\t\t\theight: 0,\n\t\t\twidth: 0,\n\t\t\touterHeight: 0,\n\t\t\touterWidth: 0\n\t\t};\n\n\tif ( mode === \"show\" ) {\n\t\tel.show();\n\t}\n\toriginal = {\n\t\theight: el.height(),\n\t\twidth: el.width(),\n\t\touterHeight: el.outerHeight(),\n\t\touterWidth: el.outerWidth()\n\t};\n\n\tif ( o.mode === \"toggle\" && mode === \"show\" ) {\n\t\tel.from = o.to || zero;\n\t\tel.to = o.from || original;\n\t} else {\n\t\tel.from = o.from || ( mode === \"show\" ? zero : original );\n\t\tel.to = o.to || ( mode === \"hide\" ? zero : original );\n\t}\n\n\t// Set scaling factor\n\tfactor = {\n\t\tfrom: {\n\t\t\ty: el.from.height / original.height,\n\t\t\tx: el.from.width / original.width\n\t\t},\n\t\tto: {\n\t\t\ty: el.to.height / original.height,\n\t\t\tx: el.to.width / original.width\n\t\t}\n\t};\n\n\t// Scale the css box\n\tif ( scale === \"box\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tprops = props.concat( vProps );\n\t\t\tel.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );\n\t\t\tel.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );\n\t\t}\n\n\t\t// Horizontal props scaling\n\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\tprops = props.concat( hProps );\n\t\t\tel.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );\n\t\t\tel.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );\n\t\t}\n\t}\n\n\t// Scale the content\n\tif ( scale === \"content\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tprops = props.concat( cProps ).concat( props2 );\n\t\t\tel.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );\n\t\t\tel.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );\n\t\t}\n\t}\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\tel.css( \"overflow\", \"hidden\" ).css( el.from );\n\n\t// Adjust\n\tif (origin) { // Calculate baseline shifts\n\t\tbaseline = $.effects.getBaseline( origin, original );\n\t\tel.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;\n\t\tel.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;\n\t\tel.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;\n\t\tel.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;\n\t}\n\tel.css( el.from ); // set top & left\n\n\t// Animate\n\tif ( scale === \"content\" || scale === \"both\" ) { // Scale the children\n\n\t\t// Add margins/font-size\n\t\tvProps = vProps.concat([ \"marginTop\", \"marginBottom\" ]).concat(cProps);\n\t\thProps = hProps.concat([ \"marginLeft\", \"marginRight\" ]);\n\t\tprops2 = props0.concat(vProps).concat(hProps);\n\n\t\tel.find( \"*[width]\" ).each( function(){\n\t\t\tvar child = $( this ),\n\t\t\t\tc_original = {\n\t\t\t\t\theight: child.height(),\n\t\t\t\t\twidth: child.width(),\n\t\t\t\t\touterHeight: child.outerHeight(),\n\t\t\t\t\touterWidth: child.outerWidth()\n\t\t\t\t};\n\t\t\tif (restore) {\n\t\t\t\t$.effects.save(child, props2);\n\t\t\t}\n\n\t\t\tchild.from = {\n\t\t\t\theight: c_original.height * factor.from.y,\n\t\t\t\twidth: c_original.width * factor.from.x,\n\t\t\t\touterHeight: c_original.outerHeight * factor.from.y,\n\t\t\t\touterWidth: c_original.outerWidth * factor.from.x\n\t\t\t};\n\t\t\tchild.to = {\n\t\t\t\theight: c_original.height * factor.to.y,\n\t\t\t\twidth: c_original.width * factor.to.x,\n\t\t\t\touterHeight: c_original.height * factor.to.y,\n\t\t\t\touterWidth: c_original.width * factor.to.x\n\t\t\t};\n\n\t\t\t// Vertical props scaling\n\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\tchild.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );\n\t\t\t\tchild.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );\n\t\t\t}\n\n\t\t\t// Horizontal props scaling\n\t\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\t\tchild.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );\n\t\t\t\tchild.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );\n\t\t\t}\n\n\t\t\t// Animate children\n\t\t\tchild.css( child.from );\n\t\t\tchild.animate( child.to, o.duration, o.easing, function() {\n\n\t\t\t\t// Restore children\n\t\t\t\tif ( restore ) {\n\t\t\t\t\t$.effects.restore( child, props2 );\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t// Animate\n\tel.animate( el.to, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( el.to.opacity === 0 ) {\n\t\t\t\tel.css( \"opacity\", el.from.opacity );\n\t\t\t}\n\t\t\tif( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\tif ( !restore ) {\n\n\t\t\t\t// we need to calculate our new positioning based on the scaling\n\t\t\t\tif ( position === \"static\" ) {\n\t\t\t\t\tel.css({\n\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\ttop: el.to.top,\n\t\t\t\t\t\tleft: el.to.left\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t$.each([ \"top\", \"left\" ], function( idx, pos ) {\n\t\t\t\t\t\tel.css( pos, function( _, str ) {\n\t\t\t\t\t\t\tvar val = parseInt( str, 10 ),\n\t\t\t\t\t\t\t\ttoRef = idx ? el.to.left : el.to.top;\n\n\t\t\t\t\t\t\t// if original was \"auto\", recalculate the new value from wrapper\n\t\t\t\t\t\t\tif ( str === \"auto\" ) {\n\t\t\t\t\t\t\t\treturn toRef + \"px\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn val + toRef + \"px\";\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.shake = function( o, done ) {\n\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\tdirection = o.direction || \"left\",\n\t\tdistance = o.distance || 20,\n\t\ttimes = o.times || 3,\n\t\tanims = times * 2 + 1,\n\t\tspeed = Math.round(o.duration/anims),\n\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\tanimation = {},\n\t\tanimation1 = {},\n\t\tanimation2 = {},\n\t\ti,\n\n\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\tqueue = el.queue(),\n\t\tqueuelen = queue.length;\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\n\t// Animation\n\tanimation[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance;\n\tanimation1[ ref ] = ( positiveMotion ? \"+=\" : \"-=\" ) + distance * 2;\n\tanimation2[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance * 2;\n\n\t// Animate\n\tel.animate( animation, speed, o.easing );\n\n\t// Shakes\n\tfor ( i = 1; i < times; i++ ) {\n\t\tel.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );\n\t}\n\tel\n\t\t.animate( animation1, speed, o.easing )\n\t\t.animate( animation, speed / 2, o.easing )\n\t\t.queue(function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t});\n\n\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\tif ( queuelen > 1) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\tel.dequeue();\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.slide = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"show\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"left\",\n\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\tdistance,\n\t\tanimation = {};\n\n\t// Adjust\n\t$.effects.save( el, props );\n\tel.show();\n\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true );\n\n\t$.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\n\tif ( show ) {\n\t\tel.css( ref, positiveMotion ? (isNaN(distance) ? \"-\" + distance : -distance) : distance );\n\t}\n\n\t// Animation\n\tanimation[ ref ] = ( show ?\n\t\t( positiveMotion ? \"+=\" : \"-=\") :\n\t\t( positiveMotion ? \"-=\" : \"+=\")) +\n\t\tdistance;\n\n\t// Animate\n\tel.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.transfer = function( o, done ) {\n\tvar elem = $( this ),\n\t\ttarget = $( o.to ),\n\t\ttargetFixed = target.css( \"position\" ) === \"fixed\",\n\t\tbody = $(\"body\"),\n\t\tfixTop = targetFixed ? body.scrollTop() : 0,\n\t\tfixLeft = targetFixed ? body.scrollLeft() : 0,\n\t\tendPosition = target.offset(),\n\t\tanimation = {\n\t\t\ttop: endPosition.top - fixTop ,\n\t\t\tleft: endPosition.left - fixLeft ,\n\t\t\theight: target.innerHeight(),\n\t\t\twidth: target.innerWidth()\n\t\t},\n\t\tstartPosition = elem.offset(),\n\t\ttransfer = $( \"<div class='ui-effects-transfer'></div>\" )\n\t\t\t.appendTo( document.body )\n\t\t\t.addClass( o.className )\n\t\t\t.css({\n\t\t\t\ttop: startPosition.top - fixTop ,\n\t\t\t\tleft: startPosition.left - fixLeft ,\n\t\t\t\theight: elem.innerHeight(),\n\t\t\t\twidth: elem.innerWidth(),\n\t\t\t\tposition: targetFixed ? \"fixed\" : \"absolute\"\n\t\t\t})\n\t\t\t.animate( animation, o.duration, o.easing, function() {\n\t\t\t\ttransfer.remove();\n\t\t\t\tdone();\n\t\t\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget( \"ui.menu\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<ul>\",\n\tdelay: 300,\n\toptions: {\n\t\ticons: {\n\t\t\tsubmenu: \"ui-icon-carat-1-e\"\n\t\t},\n\t\tmenus: \"ul\",\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"right top\"\n\t\t},\n\t\trole: \"menu\",\n\n\t\t// callbacks\n\t\tblur: null,\n\t\tfocus: null,\n\t\tselect: null\n\t},\n\n\t_create: function() {\n\t\tthis.activeMenu = this.element;\n\t\t// flag used to prevent firing of the click handler\n\t\t// as the event bubbles up through nested menus\n\t\tthis.mouseHandled = false;\n\t\tthis.element\n\t\t\t.uniqueId()\n\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.toggleClass( \"ui-menu-icons\", !!this.element.find( \".ui-icon\" ).length )\n\t\t\t.attr({\n\t\t\t\trole: this.options.role,\n\t\t\t\ttabIndex: 0\n\t\t\t})\n\t\t\t// need to catch all clicks on disabled menu\n\t\t\t// not possible through _on\n\t\t\t.bind( \"click\" + this.eventNamespace, $.proxy(function( event ) {\n\t\t\t\tif ( this.options.disabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}, this ));\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.element\n\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t}\n\n\t\tthis._on({\n\t\t\t// Prevent focus from sticking to links inside menu after clicking\n\t\t\t// them (focus should always stay on UL during navigation).\n\t\t\t\"mousedown .ui-menu-item > a\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-state-disabled > a\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-menu-item:has(a)\": function( event ) {\n\t\t\t\tvar target = $( event.target ).closest( \".ui-menu-item\" );\n\t\t\t\tif ( !this.mouseHandled && target.not( \".ui-state-disabled\" ).length ) {\n\t\t\t\t\tthis.mouseHandled = true;\n\n\t\t\t\t\tthis.select( event );\n\t\t\t\t\t// Open submenu on click\n\t\t\t\t\tif ( target.has( \".ui-menu\" ).length ) {\n\t\t\t\t\t\tthis.expand( event );\n\t\t\t\t\t} else if ( !this.element.is( \":focus\" ) ) {\n\t\t\t\t\t\t// Redirect focus to the menu\n\t\t\t\t\t\tthis.element.trigger( \"focus\", [ true ] );\n\n\t\t\t\t\t\t// If the active item is on the top level, let it stay active.\n\t\t\t\t\t\t// Otherwise, blur the active item since it is no longer visible.\n\t\t\t\t\t\tif ( this.active && this.active.parents( \".ui-menu\" ).length === 1 ) {\n\t\t\t\t\t\t\tclearTimeout( this.timer );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"mouseenter .ui-menu-item\": function( event ) {\n\t\t\t\tvar target = $( event.currentTarget );\n\t\t\t\t// Remove ui-state-active class from siblings of the newly focused menu item\n\t\t\t\t// to avoid a jump caused by adjacent elements both having a class with a border\n\t\t\t\ttarget.siblings().children( \".ui-state-active\" ).removeClass( \"ui-state-active\" );\n\t\t\t\tthis.focus( event, target );\n\t\t\t},\n\t\t\tmouseleave: \"collapseAll\",\n\t\t\t\"mouseleave .ui-menu\": \"collapseAll\",\n\t\t\tfocus: function( event, keepActiveItem ) {\n\t\t\t\t// If there's already an active item, keep it active\n\t\t\t\t// If not, activate the first item\n\t\t\t\tvar item = this.active || this.element.children( \".ui-menu-item\" ).eq( 0 );\n\n\t\t\t\tif ( !keepActiveItem ) {\n\t\t\t\t\tthis.focus( event, item );\n\t\t\t\t}\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tif ( !$.contains( this.element[0], this.document[0].activeElement ) ) {\n\t\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tkeydown: \"_keydown\"\n\t\t});\n\n\t\tthis.refresh();\n\n\t\t// Clicks outside of a menu collapse any open menus\n\t\tthis._on( this.document, {\n\t\t\tclick: function( event ) {\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu\" ).length ) {\n\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t}\n\n\t\t\t\t// Reset the mouseHandled flag\n\t\t\t\tthis.mouseHandled = false;\n\t\t\t}\n\t\t});\n\t},\n\n\t_destroy: function() {\n\t\t// Destroy (sub)menus\n\t\tthis.element\n\t\t\t.removeAttr( \"aria-activedescendant\" )\n\t\t\t.find( \".ui-menu\" ).addBack()\n\t\t\t\t.removeClass( \"ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.show();\n\n\t\t// Destroy menu items\n\t\tthis.element.find( \".ui-menu-item\" )\n\t\t\t.removeClass( \"ui-menu-item\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t.children( \"a\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.removeClass( \"ui-corner-all ui-state-hover\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-haspopup\" )\n\t\t\t\t.children().each( function() {\n\t\t\t\t\tvar elem = $( this );\n\t\t\t\t\tif ( elem.data( \"ui-menu-submenu-carat\" ) ) {\n\t\t\t\t\t\telem.remove();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// Destroy menu dividers\n\t\tthis.element.find( \".ui-menu-divider\" ).removeClass( \"ui-menu-divider ui-widget-content\" );\n\t},\n\n\t_keydown: function( event ) {\n\t\t/*jshint maxcomplexity:20*/\n\t\tvar match, prev, character, skip, regex,\n\t\t\tpreventDefault = true;\n\n\t\tfunction escape( value ) {\n\t\t\treturn value.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" );\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\tthis.previousPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\tthis.nextPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tthis._move( \"first\", \"first\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tthis._move( \"last\", \"last\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\t\tthis.previous( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tthis.next( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\t\tthis.expand( event );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ENTER:\n\t\tcase $.ui.keyCode.SPACE:\n\t\t\tthis._activate( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpreventDefault = false;\n\t\t\tprev = this.previousFilter || \"\";\n\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\tskip = false;\n\n\t\t\tclearTimeout( this.filterTimer );\n\n\t\t\tif ( character === prev ) {\n\t\t\t\tskip = true;\n\t\t\t} else {\n\t\t\t\tcharacter = prev + character;\n\t\t\t}\n\n\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t});\n\t\t\tmatch = skip && match.index( this.active.next() ) !== -1 ?\n\t\t\t\tthis.active.nextAll( \".ui-menu-item\" ) :\n\t\t\t\tmatch;\n\n\t\t\t// If no matches on the current filter, reset to the last character pressed\n\t\t\t// to move down the menu to the first item that starts with that character\n\t\t\tif ( !match.length ) {\n\t\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( match.length ) {\n\t\t\t\tthis.focus( event, match );\n\t\t\t\tif ( match.length > 1 ) {\n\t\t\t\t\tthis.previousFilter = character;\n\t\t\t\t\tthis.filterTimer = this._delay(function() {\n\t\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t\t}, 1000 );\n\t\t\t\t} else {\n\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete this.previousFilter;\n\t\t\t}\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_activate: function( event ) {\n\t\tif ( !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\tif ( this.active.children( \"a[aria-haspopup='true']\" ).length ) {\n\t\t\t\tthis.expand( event );\n\t\t\t} else {\n\t\t\t\tthis.select( event );\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar menus,\n\t\t\ticon = this.options.icons.submenu,\n\t\t\tsubmenus = this.element.find( this.options.menus );\n\n\t\t// Initialize nested menus\n\t\tsubmenus.filter( \":not(.ui-menu)\" )\n\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\trole: this.options.role,\n\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t})\n\t\t\t.each(function() {\n\t\t\t\tvar menu = $( this ),\n\t\t\t\t\titem = menu.prev( \"a\" ),\n\t\t\t\t\tsubmenuCarat = $( \"<span>\" )\n\t\t\t\t\t\t.addClass( \"ui-menu-icon ui-icon \" + icon )\n\t\t\t\t\t\t.data( \"ui-menu-submenu-carat\", true );\n\n\t\t\t\titem\n\t\t\t\t\t.attr( \"aria-haspopup\", \"true\" )\n\t\t\t\t\t.prepend( submenuCarat );\n\t\t\t\tmenu.attr( \"aria-labelledby\", item.attr( \"id\" ) );\n\t\t\t});\n\n\t\tmenus = submenus.add( this.element );\n\n\t\t// Don't refresh list items that are already adapted\n\t\tmenus.children( \":not(.ui-menu-item):has(a)\" )\n\t\t\t.addClass( \"ui-menu-item\" )\n\t\t\t.attr( \"role\", \"presentation\" )\n\t\t\t.children( \"a\" )\n\t\t\t\t.uniqueId()\n\t\t\t\t.addClass( \"ui-corner-all\" )\n\t\t\t\t.attr({\n\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\trole: this._itemRole()\n\t\t\t\t});\n\n\t\t// Initialize unlinked menu-items containing spaces and/or dashes only as dividers\n\t\tmenus.children( \":not(.ui-menu-item)\" ).each(function() {\n\t\t\tvar item = $( this );\n\t\t\t// hyphen, em dash, en dash\n\t\t\tif ( !/[^\\-\\u2014\\u2013\\s]/.test( item.text() ) ) {\n\t\t\t\titem.addClass( \"ui-widget-content ui-menu-divider\" );\n\t\t\t}\n\t\t});\n\n\t\t// Add aria-disabled attribute to any disabled menu item\n\t\tmenus.children( \".ui-state-disabled\" ).attr( \"aria-disabled\", \"true\" );\n\n\t\t// If the active item has been removed, blur the menu\n\t\tif ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\tthis.blur();\n\t\t}\n\t},\n\n\t_itemRole: function() {\n\t\treturn {\n\t\t\tmenu: \"menuitem\",\n\t\t\tlistbox: \"option\"\n\t\t}[ this.options.role ];\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis.element.find( \".ui-menu-icon\" )\n\t\t\t\t.removeClass( this.options.icons.submenu )\n\t\t\t\t.addClass( value.submenu );\n\t\t}\n\t\tthis._super( key, value );\n\t},\n\n\tfocus: function( event, item ) {\n\t\tvar nested, focused;\n\t\tthis.blur( event, event && event.type === \"focus\" );\n\n\t\tthis._scrollIntoView( item );\n\n\t\tthis.active = item.first();\n\t\tfocused = this.active.children( \"a\" ).addClass( \"ui-state-focus\" );\n\t\t// Only update aria-activedescendant if there's a role\n\t\t// otherwise we assume focus is managed elsewhere\n\t\tif ( this.options.role ) {\n\t\t\tthis.element.attr( \"aria-activedescendant\", focused.attr( \"id\" ) );\n\t\t}\n\n\t\t// Highlight active parent menu item, if any\n\t\tthis.active\n\t\t\t.parent()\n\t\t\t.closest( \".ui-menu-item\" )\n\t\t\t.children( \"a:first\" )\n\t\t\t.addClass( \"ui-state-active\" );\n\n\t\tif ( event && event.type === \"keydown\" ) {\n\t\t\tthis._close();\n\t\t} else {\n\t\t\tthis.timer = this._delay(function() {\n\t\t\t\tthis._close();\n\t\t\t}, this.delay );\n\t\t}\n\n\t\tnested = item.children( \".ui-menu\" );\n\t\tif ( nested.length && ( /^mouse/.test( event.type ) ) ) {\n\t\t\tthis._startOpening(nested);\n\t\t}\n\t\tthis.activeMenu = item.parent();\n\n\t\tthis._trigger( \"focus\", event, { item: item } );\n\t},\n\n\t_scrollIntoView: function( item ) {\n\t\tvar borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;\n\t\tif ( this._hasScroll() ) {\n\t\t\tborderTop = parseFloat( $.css( this.activeMenu[0], \"borderTopWidth\" ) ) || 0;\n\t\t\tpaddingTop = parseFloat( $.css( this.activeMenu[0], \"paddingTop\" ) ) || 0;\n\t\t\toffset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;\n\t\t\tscroll = this.activeMenu.scrollTop();\n\t\t\telementHeight = this.activeMenu.height();\n\t\t\titemHeight = item.height();\n\n\t\t\tif ( offset < 0 ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset );\n\t\t\t} else if ( offset + itemHeight > elementHeight ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );\n\t\t\t}\n\t\t}\n\t},\n\n\tblur: function( event, fromFocus ) {\n\t\tif ( !fromFocus ) {\n\t\t\tclearTimeout( this.timer );\n\t\t}\n\n\t\tif ( !this.active ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active.children( \"a\" ).removeClass( \"ui-state-focus\" );\n\t\tthis.active = null;\n\n\t\tthis._trigger( \"blur\", event, { item: this.active } );\n\t},\n\n\t_startOpening: function( submenu ) {\n\t\tclearTimeout( this.timer );\n\n\t\t// Don't open if already open fixes a Firefox bug that caused a .5 pixel\n\t\t// shift in the submenu position when mousing over the carat icon\n\t\tif ( submenu.attr( \"aria-hidden\" ) !== \"true\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.timer = this._delay(function() {\n\t\t\tthis._close();\n\t\t\tthis._open( submenu );\n\t\t}, this.delay );\n\t},\n\n\t_open: function( submenu ) {\n\t\tvar position = $.extend({\n\t\t\tof: this.active\n\t\t}, this.options.position );\n\n\t\tclearTimeout( this.timer );\n\t\tthis.element.find( \".ui-menu\" ).not( submenu.parents( \".ui-menu\" ) )\n\t\t\t.hide()\n\t\t\t.attr( \"aria-hidden\", \"true\" );\n\n\t\tsubmenu\n\t\t\t.show()\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.attr( \"aria-expanded\", \"true\" )\n\t\t\t.position( position );\n\t},\n\n\tcollapseAll: function( event, all ) {\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay(function() {\n\t\t\t// If we were passed an event, look for the submenu that contains the event\n\t\t\tvar currentMenu = all ? this.element :\n\t\t\t\t$( event && event.target ).closest( this.element.find( \".ui-menu\" ) );\n\n\t\t\t// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway\n\t\t\tif ( !currentMenu.length ) {\n\t\t\t\tcurrentMenu = this.element;\n\t\t\t}\n\n\t\t\tthis._close( currentMenu );\n\n\t\t\tthis.blur( event );\n\t\t\tthis.activeMenu = currentMenu;\n\t\t}, this.delay );\n\t},\n\n\t// With no arguments, closes the currently active menu - if nothing is active\n\t// it closes all menus.  If passed an argument, it will search for menus BELOW\n\t_close: function( startMenu ) {\n\t\tif ( !startMenu ) {\n\t\t\tstartMenu = this.active ? this.active.parent() : this.element;\n\t\t}\n\n\t\tstartMenu\n\t\t\t.find( \".ui-menu\" )\n\t\t\t\t.hide()\n\t\t\t\t.attr( \"aria-hidden\", \"true\" )\n\t\t\t\t.attr( \"aria-expanded\", \"false\" )\n\t\t\t.end()\n\t\t\t.find( \"a.ui-state-active\" )\n\t\t\t\t.removeClass( \"ui-state-active\" );\n\t},\n\n\tcollapse: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active.parent().closest( \".ui-menu-item\", this.element );\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._close();\n\t\t\tthis.focus( event, newItem );\n\t\t}\n\t},\n\n\texpand: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active\n\t\t\t\t.children( \".ui-menu \" )\n\t\t\t\t.children( \".ui-menu-item\" )\n\t\t\t\t.first();\n\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._open( newItem.parent() );\n\n\t\t\t// Delay so Firefox will not hide activedescendant change in expanding submenu from AT\n\t\t\tthis._delay(function() {\n\t\t\t\tthis.focus( event, newItem );\n\t\t\t});\n\t\t}\n\t},\n\n\tnext: function( event ) {\n\t\tthis._move( \"next\", \"first\", event );\n\t},\n\n\tprevious: function( event ) {\n\t\tthis._move( \"prev\", \"last\", event );\n\t},\n\n\tisFirstItem: function() {\n\t\treturn this.active && !this.active.prevAll( \".ui-menu-item\" ).length;\n\t},\n\n\tisLastItem: function() {\n\t\treturn this.active && !this.active.nextAll( \".ui-menu-item\" ).length;\n\t},\n\n\t_move: function( direction, filter, event ) {\n\t\tvar next;\n\t\tif ( this.active ) {\n\t\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( -1 );\n\t\t\t} else {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction + \"All\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( 0 );\n\t\t\t}\n\t\t}\n\t\tif ( !next || !next.length || !this.active ) {\n\t\t\tnext = this.activeMenu.children( \".ui-menu-item\" )[ filter ]();\n\t\t}\n\n\t\tthis.focus( event, next );\n\t},\n\n\tnextPage: function( event ) {\n\t\tvar item, base, height;\n\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isLastItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.nextAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base - height < 0;\n\t\t\t});\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" )\n\t\t\t\t[ !this.active ? \"first\" : \"last\" ]() );\n\t\t}\n\t},\n\n\tpreviousPage: function( event ) {\n\t\tvar item, base, height;\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isFirstItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.prevAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base + height > 0;\n\t\t\t});\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" ).first() );\n\t\t}\n\t},\n\n\t_hasScroll: function() {\n\t\treturn this.element.outerHeight() < this.element.prop( \"scrollHeight\" );\n\t},\n\n\tselect: function( event ) {\n\t\t// TODO: It should never be possible to not have an active item at this\n\t\t// point, but the tests don't trigger mouseenter before click.\n\t\tthis.active = this.active || $( event.target ).closest( \".ui-menu-item\" );\n\t\tvar ui = { item: this.active };\n\t\tif ( !this.active.has( \".ui-menu\" ).length ) {\n\t\t\tthis.collapseAll( event, true );\n\t\t}\n\t\tthis._trigger( \"select\", event, ui );\n\t}\n});\n\n}( jQuery ));\n\n(function( $, undefined ) {\n\n$.ui = $.ui || {};\n\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\tround = Math.round,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[0];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( $.isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[0];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[0].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn (cachedScrollbarWidth = w1 - w2);\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow ? \"\" : within.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow ? \"\" : within.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[0].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[0].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisWindow = $.isWindow( withinElement[0] );\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isWindow,\n\t\t\toffset: withinElement.offset() || { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: isWindow ? withinElement.width() : withinElement.outerWidth(),\n\t\t\theight: isWindow ? withinElement.height() : withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\t\ttarget = $( options.of ),\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[0].preventDefault ) {\n\t\t// force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\t// clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t});\n\n\t// normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each(function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) + scrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) + scrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\t// if the browser doesn't support fractions, then round for consistent results\n\t\tif ( !$.support.offsetFractions ) {\n\t\t\tposition.left = round( position.left );\n\t\t\tposition.top = round( position.top );\n\t\t}\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem : elem\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tif ( options.using ) {\n\t\t\t// adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t});\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\t\t\t\t// element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\t\t\t\t// element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t// element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\t\t\t// too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\t\t\t// adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\t\t\t\t// element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\t\t\t\t// element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t// element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\t\t\t// too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\t\t\t// adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top -  data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;\n\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n// fraction support test\n(function () {\n\tvar testElement, testElementParent, testElementStyle, offsetLeft, i,\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ],\n\t\tdiv = document.createElement( \"div\" );\n\n\t//Create a \"fake body\" for testing based on method used in jQuery.support\n\ttestElement = document.createElement( body ? \"div\" : \"body\" );\n\ttestElementStyle = {\n\t\tvisibility: \"hidden\",\n\t\twidth: 0,\n\t\theight: 0,\n\t\tborder: 0,\n\t\tmargin: 0,\n\t\tbackground: \"none\"\n\t};\n\tif ( body ) {\n\t\t$.extend( testElementStyle, {\n\t\t\tposition: \"absolute\",\n\t\t\tleft: \"-1000px\",\n\t\t\ttop: \"-1000px\"\n\t\t});\n\t}\n\tfor ( i in testElementStyle ) {\n\t\ttestElement.style[ i ] = testElementStyle[ i ];\n\t}\n\ttestElement.appendChild( div );\n\ttestElementParent = body || document.documentElement;\n\ttestElementParent.insertBefore( testElement, testElementParent.firstChild );\n\n\tdiv.style.cssText = \"position: absolute; left: 10.7432222px;\";\n\n\toffsetLeft = $( div ).offset().left;\n\t$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;\n\n\ttestElement.innerHTML = \"\";\n\ttestElementParent.removeChild( testElement );\n})();\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\n$.widget( \"ui.progressbar\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tmax: 100,\n\t\tvalue: 0,\n\n\t\tchange: null,\n\t\tcomplete: null\n\t},\n\n\tmin: 0,\n\n\t_create: function() {\n\t\t// Constrain initial value\n\t\tthis.oldValue = this.options.value = this._constrainedValue();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.attr({\n\t\t\t\t// Only set static values, aria-valuenow and aria-valuemax are\n\t\t\t\t// set inside _refreshValue()\n\t\t\t\trole: \"progressbar\",\n\t\t\t\t\"aria-valuemin\": this.min\n\t\t\t});\n\n\t\tthis.valueDiv = $( \"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>\" )\n\t\t\t.appendTo( this.element );\n\n\t\tthis._refreshValue();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t.removeAttr( \"aria-valuenow\" );\n\n\t\tthis.valueDiv.remove();\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\treturn this.options.value;\n\t\t}\n\n\t\tthis.options.value = this._constrainedValue( newValue );\n\t\tthis._refreshValue();\n\t},\n\n\t_constrainedValue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\tnewValue = this.options.value;\n\t\t}\n\n\t\tthis.indeterminate = newValue === false;\n\n\t\t// sanitize value\n\t\tif ( typeof newValue !== \"number\" ) {\n\t\t\tnewValue = 0;\n\t\t}\n\n\t\treturn this.indeterminate ? false :\n\t\t\tMath.min( this.options.max, Math.max( this.min, newValue ) );\n\t},\n\n\t_setOptions: function( options ) {\n\t\t// Ensure \"value\" option is set after other values (like max)\n\t\tvar value = options.value;\n\t\tdelete options.value;\n\n\t\tthis._super( options );\n\n\t\tthis.options.value = this._constrainedValue( value );\n\t\tthis._refreshValue();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"max\" ) {\n\t\t\t// Don't allow a max less than min\n\t\t\tvalue = Math.max( this.min, value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\t_percentage: function() {\n\t\treturn this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );\n\t},\n\n\t_refreshValue: function() {\n\t\tvar value = this.options.value,\n\t\t\tpercentage = this._percentage();\n\n\t\tthis.valueDiv\n\t\t\t.toggle( this.indeterminate || value > this.min )\n\t\t\t.toggleClass( \"ui-corner-right\", value === this.options.max )\n\t\t\t.width( percentage.toFixed(0) + \"%\" );\n\n\t\tthis.element.toggleClass( \"ui-progressbar-indeterminate\", this.indeterminate );\n\n\t\tif ( this.indeterminate ) {\n\t\t\tthis.element.removeAttr( \"aria-valuenow\" );\n\t\t\tif ( !this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv = $( \"<div class='ui-progressbar-overlay'></div>\" ).appendTo( this.valueDiv );\n\t\t\t}\n\t\t} else {\n\t\t\tthis.element.attr({\n\t\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t\t\"aria-valuenow\": value\n\t\t\t});\n\t\t\tif ( this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv.remove();\n\t\t\t\tthis.overlayDiv = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( this.oldValue !== value ) {\n\t\t\tthis.oldValue = value;\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t\tif ( value === this.options.max ) {\n\t\t\tthis._trigger( \"complete\" );\n\t\t}\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// number of pages in a slider\n// (how many times can you page up/down to go through the whole range)\nvar numPages = 5;\n\n$.widget( \"ui.slider\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"slide\",\n\n\toptions: {\n\t\tanimate: false,\n\t\tdistance: 0,\n\t\tmax: 100,\n\t\tmin: 0,\n\t\torientation: \"horizontal\",\n\t\trange: false,\n\t\tstep: 1,\n\t\tvalue: 0,\n\t\tvalues: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tslide: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_create: function() {\n\t\tthis._keySliding = false;\n\t\tthis._mouseSliding = false;\n\t\tthis._animateOff = true;\n\t\tthis._handleIndex = null;\n\t\tthis._detectOrientation();\n\t\tthis._mouseInit();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-\" + this.orientation +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\");\n\n\t\tthis._refresh();\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\n\t\tthis._animateOff = false;\n\t},\n\n\t_refresh: function() {\n\t\tthis._createRange();\n\t\tthis._createHandles();\n\t\tthis._setupEvents();\n\t\tthis._refreshValue();\n\t},\n\n\t_createHandles: function() {\n\t\tvar i, handleCount,\n\t\t\toptions = this.options,\n\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ).addClass( \"ui-state-default ui-corner-all\" ),\n\t\t\thandle = \"<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>\",\n\t\t\thandles = [];\n\n\t\thandleCount = ( options.values && options.values.length ) || 1;\n\n\t\tif ( existingHandles.length > handleCount ) {\n\t\t\texistingHandles.slice( handleCount ).remove();\n\t\t\texistingHandles = existingHandles.slice( 0, handleCount );\n\t\t}\n\n\t\tfor ( i = existingHandles.length; i < handleCount; i++ ) {\n\t\t\thandles.push( handle );\n\t\t}\n\n\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( this.element ) );\n\n\t\tthis.handle = this.handles.eq( 0 );\n\n\t\tthis.handles.each(function( i ) {\n\t\t\t$( this ).data( \"ui-slider-handle-index\", i );\n\t\t});\n\t},\n\n\t_createRange: function() {\n\t\tvar options = this.options,\n\t\t\tclasses = \"\";\n\n\t\tif ( options.range ) {\n\t\t\tif ( options.range === true ) {\n\t\t\t\tif ( !options.values ) {\n\t\t\t\t\toptions.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t} else if ( options.values.length && options.values.length !== 2 ) {\n\t\t\t\t\toptions.values = [ options.values[0], options.values[0] ];\n\t\t\t\t} else if ( $.isArray( options.values ) ) {\n\t\t\t\t\toptions.values = options.values.slice(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !this.range || !this.range.length ) {\n\t\t\t\tthis.range = $( \"<div></div>\" )\n\t\t\t\t\t.appendTo( this.element );\n\n\t\t\t\tclasses = \"ui-slider-range\" +\n\t\t\t\t// note: this isn't the most fittingly semantic framework class for this element,\n\t\t\t\t// but worked best visually with a variety of themes\n\t\t\t\t\" ui-widget-header ui-corner-all\";\n\t\t\t} else {\n\t\t\t\tthis.range.removeClass( \"ui-slider-range-min ui-slider-range-max\" )\n\t\t\t\t\t// Handle range switching from true to min/max\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"left\": \"\",\n\t\t\t\t\t\t\"bottom\": \"\"\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.range.addClass( classes +\n\t\t\t\t( ( options.range === \"min\" || options.range === \"max\" ) ? \" ui-slider-range-\" + options.range : \"\" ) );\n\t\t} else {\n\t\t\tthis.range = $([]);\n\t\t}\n\t},\n\n\t_setupEvents: function() {\n\t\tvar elements = this.handles.add( this.range ).filter( \"a\" );\n\t\tthis._off( elements );\n\t\tthis._on( elements, this._handleEvents );\n\t\tthis._hoverable( elements );\n\t\tthis._focusable( elements );\n\t},\n\n\t_destroy: function() {\n\t\tthis.handles.remove();\n\t\tthis.range.remove();\n\n\t\tthis.element\n\t\t\t.removeClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-horizontal\" +\n\t\t\t\t\" ui-slider-vertical\" +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\" );\n\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\n\t\tif ( o.disabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.elementSize = {\n\t\t\twidth: this.element.outerWidth(),\n\t\t\theight: this.element.outerHeight()\n\t\t};\n\t\tthis.elementOffset = this.element.offset();\n\n\t\tposition = { x: event.pageX, y: event.pageY };\n\t\tnormValue = this._normValueFromMouse( position );\n\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\tthis.handles.each(function( i ) {\n\t\t\tvar thisDistance = Math.abs( normValue - that.values(i) );\n\t\t\tif (( distance > thisDistance ) ||\n\t\t\t\t( distance === thisDistance &&\n\t\t\t\t\t(i === that._lastChangedValue || that.values(i) === o.min ))) {\n\t\t\t\tdistance = thisDistance;\n\t\t\t\tclosestHandle = $( this );\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t});\n\n\t\tallowed = this._start( event, index );\n\t\tif ( allowed === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tthis._mouseSliding = true;\n\n\t\tthis._handleIndex = index;\n\n\t\tclosestHandle\n\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t.focus();\n\n\t\toffset = closestHandle.offset();\n\t\tmouseOverHandle = !$( event.target ).parents().addBack().is( \".ui-slider-handle\" );\n\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderTopWidth\"), 10 ) || 0 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderBottomWidth\"), 10 ) || 0) +\n\t\t\t\t( parseInt( closestHandle.css(\"marginTop\"), 10 ) || 0)\n\t\t};\n\n\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\tthis._slide( event, index, normValue );\n\t\t}\n\t\tthis._animateOff = true;\n\t\treturn true;\n\t},\n\n\t_mouseStart: function() {\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\tnormValue = this._normValueFromMouse( position );\n\n\t\tthis._slide( event, this._handleIndex, normValue );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tthis.handles.removeClass( \"ui-state-active\" );\n\t\tthis._mouseSliding = false;\n\n\t\tthis._stop( event, this._handleIndex );\n\t\tthis._change( event, this._handleIndex );\n\n\t\tthis._handleIndex = null;\n\t\tthis._clickOffset = null;\n\t\tthis._animateOff = false;\n\n\t\treturn false;\n\t},\n\n\t_detectOrientation: function() {\n\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t},\n\n\t_normValueFromMouse: function( position ) {\n\t\tvar pixelTotal,\n\t\t\tpixelMouse,\n\t\t\tpercentMouse,\n\t\t\tvalueTotal,\n\t\t\tvalueMouse;\n\n\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\tpixelTotal = this.elementSize.width;\n\t\t\tpixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t} else {\n\t\t\tpixelTotal = this.elementSize.height;\n\t\t\tpixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t}\n\n\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\tif ( percentMouse > 1 ) {\n\t\t\tpercentMouse = 1;\n\t\t}\n\t\tif ( percentMouse < 0 ) {\n\t\t\tpercentMouse = 0;\n\t\t}\n\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\tpercentMouse = 1 - percentMouse;\n\t\t}\n\n\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\n\t\treturn this._trimAlignValue( valueMouse );\n\t},\n\n\t_start: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\t\treturn this._trigger( \"start\", event, uiHash );\n\t},\n\n\t_slide: function( event, index, newVal ) {\n\t\tvar otherVal,\n\t\t\tnewValues,\n\t\t\tallowed;\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\totherVal = this.values( index ? 0 : 1 );\n\n\t\t\tif ( ( this.options.values.length === 2 && this.options.range === true ) &&\n\t\t\t\t\t( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )\n\t\t\t\t) {\n\t\t\t\tnewVal = otherVal;\n\t\t\t}\n\n\t\t\tif ( newVal !== this.values( index ) ) {\n\t\t\t\tnewValues = this.values();\n\t\t\t\tnewValues[ index ] = newVal;\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\tvalues: newValues\n\t\t\t\t} );\n\t\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.values( index, newVal, true );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ( newVal !== this.value() ) {\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal\n\t\t\t\t} );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.value( newVal );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_stop: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\n\t\tthis._trigger( \"stop\", event, uiHash );\n\t},\n\n\t_change: function( event, index ) {\n\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\t\t\tvar uiHash = {\n\t\t\t\thandle: this.handles[ index ],\n\t\t\t\tvalue: this.value()\n\t\t\t};\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\tuiHash.values = this.values();\n\t\t\t}\n\n\t\t\t//store the last changed value index for reference when handles overlap\n\t\t\tthis._lastChangedValue = index;\n\n\t\t\tthis._trigger( \"change\", event, uiHash );\n\t\t}\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( arguments.length ) {\n\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, 0 );\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._value();\n\t},\n\n\tvalues: function( index, newValue ) {\n\t\tvar vals,\n\t\t\tnewValues,\n\t\t\ti;\n\n\t\tif ( arguments.length > 1 ) {\n\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, index );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( arguments.length ) {\n\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\tvals = this.options.values;\n\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._refreshValue();\n\t\t\t} else {\n\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\treturn this._values( index );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.value();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._values();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar i,\n\t\t\tvalsLength = 0;\n\n\t\tif ( key === \"range\" && this.options.range === true ) {\n\t\t\tif ( value === \"min\" ) {\n\t\t\t\tthis.options.value = this._values( 0 );\n\t\t\t\tthis.options.values = null;\n\t\t\t} else if ( value === \"max\" ) {\n\t\t\t\tthis.options.value = this._values( this.options.values.length-1 );\n\t\t\t\tthis.options.values = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\tvalsLength = this.options.values.length;\n\t\t}\n\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\n\t\tswitch ( key ) {\n\t\t\tcase \"orientation\":\n\t\t\t\tthis._detectOrientation();\n\t\t\t\tthis.element\n\t\t\t\t\t.removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t.addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"values\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tfor ( i = 0; i < valsLength; i += 1 ) {\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"range\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refresh();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t//internal value getter\n\t// _value() returns value trimmed by min and max, aligned by step\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\tval = this._trimAlignValue( val );\n\n\t\treturn val;\n\t},\n\n\t//internal values getter\n\t// _values() returns array of values trimmed by min and max, aligned by step\n\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t_values: function( index ) {\n\t\tvar val,\n\t\t\tvals,\n\t\t\ti;\n\n\t\tif ( arguments.length ) {\n\t\t\tval = this.options.values[ index ];\n\t\t\tval = this._trimAlignValue( val );\n\n\t\t\treturn val;\n\t\t} else if ( this.options.values && this.options.values.length ) {\n\t\t\t// .slice() creates a copy of the array\n\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\tvals = this.options.values.slice();\n\t\t\tfor ( i = 0; i < vals.length; i+= 1) {\n\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t}\n\n\t\t\treturn vals;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t},\n\n\t// returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t_trimAlignValue: function( val ) {\n\t\tif ( val <= this._valueMin() ) {\n\t\t\treturn this._valueMin();\n\t\t}\n\t\tif ( val >= this._valueMax() ) {\n\t\t\treturn this._valueMax();\n\t\t}\n\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\tvalModStep = (val - this._valueMin()) % step,\n\t\t\talignValue = val - valModStep;\n\n\t\tif ( Math.abs(valModStep) * 2 >= step ) {\n\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t}\n\n\t\t// Since JavaScript has problems with large floats, round\n\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\treturn parseFloat( alignValue.toFixed(5) );\n\t},\n\n\t_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.options.max;\n\t},\n\n\t_refreshValue: function() {\n\t\tvar lastValPercent, valPercent, value, valueMin, valueMax,\n\t\t\toRange = this.options.range,\n\t\t\to = this.options,\n\t\t\tthat = this,\n\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\t_set = {};\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tthis.handles.each(function( i ) {\n\t\t\t\tvalPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;\n\t\t\t\t_set[ that.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\tif ( that.options.range === true ) {\n\t\t\t\t\tif ( that.orientation === \"horizontal\" ) {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { left: valPercent + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { width: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { bottom: ( valPercent ) + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { height: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastValPercent = valPercent;\n\t\t\t});\n\t\t} else {\n\t\t\tvalue = this.value();\n\t\t\tvalueMin = this._valueMin();\n\t\t\tvalueMax = this._valueMax();\n\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t0;\n\t\t\t_set[ this.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\n\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { width: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { width: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { height: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { height: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t}\n\t},\n\n\t_handleEvents: {\n\t\tkeydown: function( event ) {\n\t\t\t/*jshint maxcomplexity:25*/\n\t\t\tvar allowed, curVal, newVal, step,\n\t\t\t\tindex = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( !this._keySliding ) {\n\t\t\t\t\t\tthis._keySliding = true;\n\t\t\t\t\t\t$( event.target ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\tallowed = this._start( event, index );\n\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstep = this.options.step;\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tcurVal = newVal = this.values( index );\n\t\t\t} else {\n\t\t\t\tcurVal = newVal = this.value();\n\t\t\t}\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tnewVal = this._valueMin();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tnewVal = this._valueMax();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tif ( curVal === this._valueMax() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + step );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tif ( curVal === this._valueMin() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - step );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthis._slide( event, index, newVal );\n\t\t},\n\t\tclick: function( event ) {\n\t\t\tevent.preventDefault();\n\t\t},\n\t\tkeyup: function( event ) {\n\t\t\tvar index = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tif ( this._keySliding ) {\n\t\t\t\tthis._keySliding = false;\n\t\t\t\tthis._stop( event, index );\n\t\t\t\tthis._change( event, index );\n\t\t\t\t$( event.target ).removeClass( \"ui-state-active\" );\n\t\t\t}\n\t\t}\n\t}\n\n});\n\n}(jQuery));\n\n(function( $ ) {\n\nfunction modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}\n\n$.widget( \"ui.spinner\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<input>\",\n\twidgetEventPrefix: \"spin\",\n\toptions: {\n\t\tculture: null,\n\t\ticons: {\n\t\t\tdown: \"ui-icon-triangle-1-s\",\n\t\t\tup: \"ui-icon-triangle-1-n\"\n\t\t},\n\t\tincremental: true,\n\t\tmax: null,\n\t\tmin: null,\n\t\tnumberFormat: null,\n\t\tpage: 10,\n\t\tstep: 1,\n\n\t\tchange: null,\n\t\tspin: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_create: function() {\n\t\t// handle string values that need to be parsed\n\t\tthis._setOption( \"max\", this.options.max );\n\t\tthis._setOption( \"min\", this.options.min );\n\t\tthis._setOption( \"step\", this.options.step );\n\n\t\t// format the value, but don't constrain\n\t\tthis._value( this.element.val(), true );\n\n\t\tthis._draw();\n\t\tthis._on( this._events );\n\t\tthis._refresh();\n\n\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar options = {},\n\t\t\telement = this.element;\n\n\t\t$.each( [ \"min\", \"max\", \"step\" ], function( i, option ) {\n\t\t\tvar value = element.attr( option );\n\t\t\tif ( value !== undefined && value.length ) {\n\t\t\t\toptions[ option ] = value;\n\t\t\t}\n\t\t});\n\n\t\treturn options;\n\t},\n\n\t_events: {\n\t\tkeydown: function( event ) {\n\t\t\tif ( this._start( event ) && this._keydown( event ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\tkeyup: \"_stop\",\n\t\tfocus: function() {\n\t\t\tthis.previous = this.element.val();\n\t\t},\n\t\tblur: function( event ) {\n\t\t\tif ( this.cancelBlur ) {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._stop();\n\t\t\tthis._refresh();\n\t\t\tif ( this.previous !== this.element.val() ) {\n\t\t\t\tthis._trigger( \"change\", event );\n\t\t\t}\n\t\t},\n\t\tmousewheel: function( event, delta ) {\n\t\t\tif ( !delta ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !this.spinning && !this._start( event ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis._spin( (delta > 0 ? 1 : -1) * this.options.step, event );\n\t\t\tclearTimeout( this.mousewheelTimer );\n\t\t\tthis.mousewheelTimer = this._delay(function() {\n\t\t\t\tif ( this.spinning ) {\n\t\t\t\t\tthis._stop( event );\n\t\t\t\t}\n\t\t\t}, 100 );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t\"mousedown .ui-spinner-button\": function( event ) {\n\t\t\tvar previous;\n\n\t\t\t// We never want the buttons to have focus; whenever the user is\n\t\t\t// interacting with the spinner, the focus should be on the input.\n\t\t\t// If the input is focused then this.previous is properly set from\n\t\t\t// when the input first received focus. If the input is not focused\n\t\t\t// then we need to set this.previous based on the value before spinning.\n\t\t\tprevious = this.element[0] === this.document[0].activeElement ?\n\t\t\t\tthis.previous : this.element.val();\n\t\t\tfunction checkFocus() {\n\t\t\t\tvar isActive = this.element[0] === this.document[0].activeElement;\n\t\t\t\tif ( !isActive ) {\n\t\t\t\t\tthis.element.focus();\n\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t// support: IE\n\t\t\t\t\t// IE sets focus asynchronously, so we need to check if focus\n\t\t\t\t\t// moved off of the input because the user clicked on the button.\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ensure focus is on (or stays on) the text field\n\t\t\tevent.preventDefault();\n\t\t\tcheckFocus.call( this );\n\n\t\t\t// support: IE\n\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t// and check (again) if focus moved off of the input.\n\t\t\tthis.cancelBlur = true;\n\t\t\tthis._delay(function() {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\tcheckFocus.call( this );\n\t\t\t});\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\t\t\"mouseup .ui-spinner-button\": \"_stop\",\n\t\t\"mouseenter .ui-spinner-button\": function( event ) {\n\t\t\t// button will add ui-state-active if mouse was down while mouseleave and kept down\n\t\t\tif ( !$( event.currentTarget ).hasClass( \"ui-state-active\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\t\t// TODO: do we really want to consider this a stop?\n\t\t// shouldn't we just stop the repeater and wait until mouseup before\n\t\t// we trigger the stop event?\n\t\t\"mouseleave .ui-spinner-button\": \"_stop\"\n\t},\n\n\t_draw: function() {\n\t\tvar uiSpinner = this.uiSpinner = this.element\n\t\t\t.addClass( \"ui-spinner-input\" )\n\t\t\t.attr( \"autocomplete\", \"off\" )\n\t\t\t.wrap( this._uiSpinnerHtml() )\n\t\t\t.parent()\n\t\t\t\t// add buttons\n\t\t\t\t.append( this._buttonHtml() );\n\n\t\tthis.element.attr( \"role\", \"spinbutton\" );\n\n\t\t// button bindings\n\t\tthis.buttons = uiSpinner.find( \".ui-spinner-button\" )\n\t\t\t.attr( \"tabIndex\", -1 )\n\t\t\t.button()\n\t\t\t.removeClass( \"ui-corner-all\" );\n\n\t\t// IE 6 doesn't understand height: 50% for the buttons\n\t\t// unless the wrapper has an explicit height\n\t\tif ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&\n\t\t\t\tuiSpinner.height() > 0 ) {\n\t\t\tuiSpinner.height( uiSpinner.height() );\n\t\t}\n\n\t\t// disable spinner if element was already disabled\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.disable();\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\tvar options = this.options,\n\t\t\tkeyCode = $.ui.keyCode;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase keyCode.UP:\n\t\t\tthis._repeat( null, 1, event );\n\t\t\treturn true;\n\t\tcase keyCode.DOWN:\n\t\t\tthis._repeat( null, -1, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_UP:\n\t\t\tthis._repeat( null, options.page, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_DOWN:\n\t\t\tthis._repeat( null, -options.page, event );\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_uiSpinnerHtml: function() {\n\t\treturn \"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>\";\n\t},\n\n\t_buttonHtml: function() {\n\t\treturn \"\" +\n\t\t\t\"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>\" +\n\t\t\t\t\"<span class='ui-icon \" + this.options.icons.up + \"'>&#9650;</span>\" +\n\t\t\t\"</a>\" +\n\t\t\t\"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>\" +\n\t\t\t\t\"<span class='ui-icon \" + this.options.icons.down + \"'>&#9660;</span>\" +\n\t\t\t\"</a>\";\n\t},\n\n\t_start: function( event ) {\n\t\tif ( !this.spinning && this._trigger( \"start\", event ) === false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\t\tthis.spinning = true;\n\t\treturn true;\n\t},\n\n\t_repeat: function( i, steps, event ) {\n\t\ti = i || 500;\n\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay(function() {\n\t\t\tthis._repeat( 40, steps, event );\n\t\t}, i );\n\n\t\tthis._spin( steps * this.options.step, event );\n\t},\n\n\t_spin: function( step, event ) {\n\t\tvar value = this.value() || 0;\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\n\t\tvalue = this._adjustValue( value + step * this._increment( this.counter ) );\n\n\t\tif ( !this.spinning || this._trigger( \"spin\", event, { value: value } ) !== false) {\n\t\t\tthis._value( value );\n\t\t\tthis.counter++;\n\t\t}\n\t},\n\n\t_increment: function( i ) {\n\t\tvar incremental = this.options.incremental;\n\n\t\tif ( incremental ) {\n\t\t\treturn $.isFunction( incremental ) ?\n\t\t\t\tincremental( i ) :\n\t\t\t\tMath.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );\n\t\t}\n\n\t\treturn 1;\n\t},\n\n\t_precision: function() {\n\t\tvar precision = this._precisionOf( this.options.step );\n\t\tif ( this.options.min !== null ) {\n\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t}\n\t\treturn precision;\n\t},\n\n\t_precisionOf: function( num ) {\n\t\tvar str = num.toString(),\n\t\t\tdecimal = str.indexOf( \".\" );\n\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t},\n\n\t_adjustValue: function( value ) {\n\t\tvar base, aboveMin,\n\t\t\toptions = this.options;\n\n\t\t// make sure we're at a valid step\n\t\t// - find out where we are relative to the base (min or 0)\n\t\tbase = options.min !== null ? options.min : 0;\n\t\taboveMin = value - base;\n\t\t// - round to the nearest step\n\t\taboveMin = Math.round(aboveMin / options.step) * options.step;\n\t\t// - rounding is based on 0, so adjust back to our base\n\t\tvalue = base + aboveMin;\n\n\t\t// fix precision from bad JS floating point math\n\t\tvalue = parseFloat( value.toFixed( this._precision() ) );\n\n\t\t// clamp the value\n\t\tif ( options.max !== null && value > options.max) {\n\t\t\treturn options.max;\n\t\t}\n\t\tif ( options.min !== null && value < options.min ) {\n\t\t\treturn options.min;\n\t\t}\n\n\t\treturn value;\n\t},\n\n\t_stop: function( event ) {\n\t\tif ( !this.spinning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout( this.timer );\n\t\tclearTimeout( this.mousewheelTimer );\n\t\tthis.counter = 0;\n\t\tthis.spinning = false;\n\t\tthis._trigger( \"stop\", event );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"culture\" || key === \"numberFormat\" ) {\n\t\t\tvar prevValue = this._parse( this.element.val() );\n\t\t\tthis.options[ key ] = value;\n\t\t\tthis.element.val( this._format( prevValue ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"max\" || key === \"min\" || key === \"step\" ) {\n\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\tvalue = this._parse( value );\n\t\t\t}\n\t\t}\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis.buttons.first().find( \".ui-icon\" )\n\t\t\t\t.removeClass( this.options.icons.up )\n\t\t\t\t.addClass( value.up );\n\t\t\tthis.buttons.last().find( \".ui-icon\" )\n\t\t\t\t.removeClass( this.options.icons.down )\n\t\t\t\t.addClass( value.down );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.prop( \"disabled\", true );\n\t\t\t\tthis.buttons.button( \"disable\" );\n\t\t\t} else {\n\t\t\t\tthis.element.prop( \"disabled\", false );\n\t\t\t\tthis.buttons.button( \"enable\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t_setOptions: modifier(function( options ) {\n\t\tthis._super( options );\n\t\tthis._value( this.element.val() );\n\t}),\n\n\t_parse: function( val ) {\n\t\tif ( typeof val === \"string\" && val !== \"\" ) {\n\t\t\tval = window.Globalize && this.options.numberFormat ?\n\t\t\t\tGlobalize.parseFloat( val, 10, this.options.culture ) : +val;\n\t\t}\n\t\treturn val === \"\" || isNaN( val ) ? null : val;\n\t},\n\n\t_format: function( value ) {\n\t\tif ( value === \"\" ) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn window.Globalize && this.options.numberFormat ?\n\t\t\tGlobalize.format( value, this.options.numberFormat, this.options.culture ) :\n\t\t\tvalue;\n\t},\n\n\t_refresh: function() {\n\t\tthis.element.attr({\n\t\t\t\"aria-valuemin\": this.options.min,\n\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t// TODO: what should we do with values that can't be parsed?\n\t\t\t\"aria-valuenow\": this._parse( this.element.val() )\n\t\t});\n\t},\n\n\t// update the value without triggering change\n\t_value: function( value, allowAny ) {\n\t\tvar parsed;\n\t\tif ( value !== \"\" ) {\n\t\t\tparsed = this._parse( value );\n\t\t\tif ( parsed !== null ) {\n\t\t\t\tif ( !allowAny ) {\n\t\t\t\t\tparsed = this._adjustValue( parsed );\n\t\t\t\t}\n\t\t\t\tvalue = this._format( parsed );\n\t\t\t}\n\t\t}\n\t\tthis.element.val( value );\n\t\tthis._refresh();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-spinner-input\" )\n\t\t\t.prop( \"disabled\", false )\n\t\t\t.removeAttr( \"autocomplete\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t.removeAttr( \"aria-valuenow\" );\n\t\tthis.uiSpinner.replaceWith( this.element );\n\t},\n\n\tstepUp: modifier(function( steps ) {\n\t\tthis._stepUp( steps );\n\t}),\n\t_stepUp: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( (steps || 1) * this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tstepDown: modifier(function( steps ) {\n\t\tthis._stepDown( steps );\n\t}),\n\t_stepDown: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( (steps || 1) * -this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tpageUp: modifier(function( pages ) {\n\t\tthis._stepUp( (pages || 1) * this.options.page );\n\t}),\n\n\tpageDown: modifier(function( pages ) {\n\t\tthis._stepDown( (pages || 1) * this.options.page );\n\t}),\n\n\tvalue: function( newVal ) {\n\t\tif ( !arguments.length ) {\n\t\t\treturn this._parse( this.element.val() );\n\t\t}\n\t\tmodifier( this._value ).call( this, newVal );\n\t},\n\n\twidget: function() {\n\t\treturn this.uiSpinner;\n\t}\n});\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\nvar tabId = 0,\n\trhash = /#.*$/;\n\nfunction getNextTabId() {\n\treturn ++tabId;\n}\n\nfunction isLocal( anchor ) {\n\treturn anchor.hash.length > 1 &&\n\t\tdecodeURIComponent( anchor.href.replace( rhash, \"\" ) ) ===\n\t\t\tdecodeURIComponent( location.href.replace( rhash, \"\" ) );\n}\n\n$.widget( \"ui.tabs\", {\n\tversion: \"1.10.3\",\n\tdelay: 300,\n\toptions: {\n\t\tactive: null,\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theightStyle: \"content\",\n\t\thide: null,\n\t\tshow: null,\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null,\n\t\tbeforeLoad: null,\n\t\tload: null\n\t},\n\n\t_create: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.running = false;\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.toggleClass( \"ui-tabs-collapsible\", options.collapsible )\n\t\t\t// Prevent users from focusing disabled tabs via click\n\t\t\t.delegate( \".ui-tabs-nav > li\", \"mousedown\" + this.eventNamespace, function( event ) {\n\t\t\t\tif ( $( this ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t})\n\t\t\t// support: IE <9\n\t\t\t// Preventing the default action in mousedown doesn't prevent IE\n\t\t\t// from focusing the element, so if the anchor gets focused, blur.\n\t\t\t// We don't have to worry about focusing the previously focused\n\t\t\t// element since clicking on a non-focusable element should focus\n\t\t\t// the body anyway.\n\t\t\t.delegate( \".ui-tabs-anchor\", \"focus\" + this.eventNamespace, function() {\n\t\t\t\tif ( $( this ).closest( \"li\" ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis._processTabs();\n\t\toptions.active = this._initialActive();\n\n\t\t// Take disabling tabs via class attribute from HTML\n\t\t// into account and update option properly.\n\t\tif ( $.isArray( options.disabled ) ) {\n\t\t\toptions.disabled = $.unique( options.disabled.concat(\n\t\t\t\t$.map( this.tabs.filter( \".ui-state-disabled\" ), function( li ) {\n\t\t\t\t\treturn that.tabs.index( li );\n\t\t\t\t})\n\t\t\t) ).sort();\n\t\t}\n\n\t\t// check for length avoids error when initializing empty list\n\t\tif ( this.options.active !== false && this.anchors.length ) {\n\t\t\tthis.active = this._findActive( options.active );\n\t\t} else {\n\t\t\tthis.active = $();\n\t\t}\n\n\t\tthis._refresh();\n\n\t\tif ( this.active.length ) {\n\t\t\tthis.load( options.active );\n\t\t}\n\t},\n\n\t_initialActive: function() {\n\t\tvar active = this.options.active,\n\t\t\tcollapsible = this.options.collapsible,\n\t\t\tlocationHash = location.hash.substring( 1 );\n\n\t\tif ( active === null ) {\n\t\t\t// check the fragment identifier in the URL\n\t\t\tif ( locationHash ) {\n\t\t\t\tthis.tabs.each(function( i, tab ) {\n\t\t\t\t\tif ( $( tab ).attr( \"aria-controls\" ) === locationHash ) {\n\t\t\t\t\t\tactive = i;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// check for a tab marked active via a class\n\t\t\tif ( active === null ) {\n\t\t\t\tactive = this.tabs.index( this.tabs.filter( \".ui-tabs-active\" ) );\n\t\t\t}\n\n\t\t\t// no active tab, set to false\n\t\t\tif ( active === null || active === -1 ) {\n\t\t\t\tactive = this.tabs.length ? 0 : false;\n\t\t\t}\n\t\t}\n\n\t\t// handle numbers: negative, out of range\n\t\tif ( active !== false ) {\n\t\t\tactive = this.tabs.index( this.tabs.eq( active ) );\n\t\t\tif ( active === -1 ) {\n\t\t\t\tactive = collapsible ? false : 0;\n\t\t\t}\n\t\t}\n\n\t\t// don't allow collapsible: false and active: false\n\t\tif ( !collapsible && active === false && this.anchors.length ) {\n\t\t\tactive = 0;\n\t\t}\n\n\t\treturn active;\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\ttab: this.active,\n\t\t\tpanel: !this.active.length ? $() : this._getPanelForTab( this.active )\n\t\t};\n\t},\n\n\t_tabKeydown: function( event ) {\n\t\t/*jshint maxcomplexity:15*/\n\t\tvar focusedTab = $( this.document[0].activeElement ).closest( \"li\" ),\n\t\t\tselectedIndex = this.tabs.index( focusedTab ),\n\t\t\tgoingForward = true;\n\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tselectedIndex++;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.UP:\n\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\tgoingForward = false;\n\t\t\t\tselectedIndex--;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tselectedIndex = this.anchors.length - 1;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tselectedIndex = 0;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.SPACE:\n\t\t\t\t// Activate only, no collapsing\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearTimeout( this.activating );\n\t\t\t\tthis._activate( selectedIndex );\n\t\t\t\treturn;\n\t\t\tcase $.ui.keyCode.ENTER:\n\t\t\t\t// Toggle (cancel delayed activation, allow collapsing)\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearTimeout( this.activating );\n\t\t\t\t// Determine if we should collapse or activate\n\t\t\t\tthis._activate( selectedIndex === this.options.active ? false : selectedIndex );\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Focus the appropriate tab, based on which key was pressed\n\t\tevent.preventDefault();\n\t\tclearTimeout( this.activating );\n\t\tselectedIndex = this._focusNextTab( selectedIndex, goingForward );\n\n\t\t// Navigating with control key will prevent automatic activation\n\t\tif ( !event.ctrlKey ) {\n\t\t\t// Update aria-selected immediately so that AT think the tab is already selected.\n\t\t\t// Otherwise AT may confuse the user by stating that they need to activate the tab,\n\t\t\t// but the tab will already be activated by the time the announcement finishes.\n\t\t\tfocusedTab.attr( \"aria-selected\", \"false\" );\n\t\t\tthis.tabs.eq( selectedIndex ).attr( \"aria-selected\", \"true\" );\n\n\t\t\tthis.activating = this._delay(function() {\n\t\t\t\tthis.option( \"active\", selectedIndex );\n\t\t\t}, this.delay );\n\t\t}\n\t},\n\n\t_panelKeydown: function( event ) {\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ctrl+up moves focus to the current tab\n\t\tif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.active.focus();\n\t\t}\n\t},\n\n\t// Alt+page up/down moves focus to the previous/next tab (and activates)\n\t_handlePageNav: function( event ) {\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active - 1, false ) );\n\t\t\treturn true;\n\t\t}\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active + 1, true ) );\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t_findNextTab: function( index, goingForward ) {\n\t\tvar lastTabIndex = this.tabs.length - 1;\n\n\t\tfunction constrain() {\n\t\t\tif ( index > lastTabIndex ) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tif ( index < 0 ) {\n\t\t\t\tindex = lastTabIndex;\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\n\t\twhile ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {\n\t\t\tindex = goingForward ? index + 1 : index - 1;\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_focusNextTab: function( index, goingForward ) {\n\t\tindex = this._findNextTab( index, goingForward );\n\t\tthis.tabs.eq( index ).focus();\n\t\treturn index;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\t// don't use the widget factory's disabled handling\n\t\t\tthis._setupDisabled( value );\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value);\n\n\t\tif ( key === \"collapsible\" ) {\n\t\t\tthis.element.toggleClass( \"ui-tabs-collapsible\", value );\n\t\t\t// Setting collapsible: false while collapsed; open first panel\n\t\t\tif ( !value && this.options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tif ( key === \"heightStyle\" ) {\n\t\t\tthis._setupHeightStyle( value );\n\t\t}\n\t},\n\n\t_tabId: function( tab ) {\n\t\treturn tab.attr( \"aria-controls\" ) || \"ui-tabs-\" + getNextTabId();\n\t},\n\n\t_sanitizeSelector: function( hash ) {\n\t\treturn hash ? hash.replace( /[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\" ) : \"\";\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options,\n\t\t\tlis = this.tablist.children( \":has(a[href])\" );\n\n\t\t// get disabled tabs from class attribute from HTML\n\t\t// this will get converted to a boolean if needed in _refresh()\n\t\toptions.disabled = $.map( lis.filter( \".ui-state-disabled\" ), function( tab ) {\n\t\t\treturn lis.index( tab );\n\t\t});\n\n\t\tthis._processTabs();\n\n\t\t// was collapsed or no tabs\n\t\tif ( options.active === false || !this.anchors.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\t\t// was active, but active tab is gone\n\t\t} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t// all remaining tabs are disabled\n\t\t\tif ( this.tabs.length === options.disabled.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// activate previous tab\n\t\t\t} else {\n\t\t\t\tthis._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );\n\t\t\t}\n\t\t// was active, active tab still exists\n\t\t} else {\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.tabs.index( this.active );\n\t\t}\n\n\t\tthis._refresh();\n\t},\n\n\t_refresh: function() {\n\t\tthis._setupDisabled( this.options.disabled );\n\t\tthis._setupEvents( this.options.event );\n\t\tthis._setupHeightStyle( this.options.heightStyle );\n\n\t\tthis.tabs.not( this.active ).attr({\n\t\t\t\"aria-selected\": \"false\",\n\t\t\ttabIndex: -1\n\t\t});\n\t\tthis.panels.not( this._getPanelForTab( this.active ) )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t});\n\n\t\t// Make sure one tab is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.tabs.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active\n\t\t\t\t.addClass( \"ui-tabs-active ui-state-active\" )\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t});\n\t\t\tthis._getPanelForTab( this.active )\n\t\t\t\t.show()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t});\n\t\t}\n\t},\n\n\t_processTabs: function() {\n\t\tvar that = this;\n\n\t\tthis.tablist = this._getList()\n\t\t\t.addClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t.attr( \"role\", \"tablist\" );\n\n\t\tthis.tabs = this.tablist.find( \"> li:has(a[href])\" )\n\t\t\t.addClass( \"ui-state-default ui-corner-top\" )\n\t\t\t.attr({\n\t\t\t\trole: \"tab\",\n\t\t\t\ttabIndex: -1\n\t\t\t});\n\n\t\tthis.anchors = this.tabs.map(function() {\n\t\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t\t})\n\t\t\t.addClass( \"ui-tabs-anchor\" )\n\t\t\t.attr({\n\t\t\t\trole: \"presentation\",\n\t\t\t\ttabIndex: -1\n\t\t\t});\n\n\t\tthis.panels = $();\n\n\t\tthis.anchors.each(function( i, anchor ) {\n\t\t\tvar selector, panel, panelId,\n\t\t\t\tanchorId = $( anchor ).uniqueId().attr( \"id\" ),\n\t\t\t\ttab = $( anchor ).closest( \"li\" ),\n\t\t\t\toriginalAriaControls = tab.attr( \"aria-controls\" );\n\n\t\t\t// inline tab\n\t\t\tif ( isLocal( anchor ) ) {\n\t\t\t\tselector = anchor.hash;\n\t\t\t\tpanel = that.element.find( that._sanitizeSelector( selector ) );\n\t\t\t// remote tab\n\t\t\t} else {\n\t\t\t\tpanelId = that._tabId( tab );\n\t\t\t\tselector = \"#\" + panelId;\n\t\t\t\tpanel = that.element.find( selector );\n\t\t\t\tif ( !panel.length ) {\n\t\t\t\t\tpanel = that._createPanel( panelId );\n\t\t\t\t\tpanel.insertAfter( that.panels[ i - 1 ] || that.tablist );\n\t\t\t\t}\n\t\t\t\tpanel.attr( \"aria-live\", \"polite\" );\n\t\t\t}\n\n\t\t\tif ( panel.length) {\n\t\t\t\tthat.panels = that.panels.add( panel );\n\t\t\t}\n\t\t\tif ( originalAriaControls ) {\n\t\t\t\ttab.data( \"ui-tabs-aria-controls\", originalAriaControls );\n\t\t\t}\n\t\t\ttab.attr({\n\t\t\t\t\"aria-controls\": selector.substring( 1 ),\n\t\t\t\t\"aria-labelledby\": anchorId\n\t\t\t});\n\t\t\tpanel.attr( \"aria-labelledby\", anchorId );\n\t\t});\n\n\t\tthis.panels\n\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t.attr( \"role\", \"tabpanel\" );\n\t},\n\n\t// allow overriding how to find the list for rare usage scenarios (#7715)\n\t_getList: function() {\n\t\treturn this.element.find( \"ol,ul\" ).eq( 0 );\n\t},\n\n\t_createPanel: function( id ) {\n\t\treturn $( \"<div>\" )\n\t\t\t.attr( \"id\", id )\n\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t.data( \"ui-tabs-destroy\", true );\n\t},\n\n\t_setupDisabled: function( disabled ) {\n\t\tif ( $.isArray( disabled ) ) {\n\t\t\tif ( !disabled.length ) {\n\t\t\t\tdisabled = false;\n\t\t\t} else if ( disabled.length === this.anchors.length ) {\n\t\t\t\tdisabled = true;\n\t\t\t}\n\t\t}\n\n\t\t// disable tabs\n\t\tfor ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {\n\t\t\tif ( disabled === true || $.inArray( i, disabled ) !== -1 ) {\n\t\t\t\t$( li )\n\t\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t\t} else {\n\t\t\t\t$( li )\n\t\t\t\t\t.removeClass( \"ui-state-disabled\" )\n\t\t\t\t\t.removeAttr( \"aria-disabled\" );\n\t\t\t}\n\t\t}\n\n\t\tthis.options.disabled = disabled;\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t};\n\t\tif ( event ) {\n\t\t\t$.each( event.split(\" \"), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t});\n\t\t}\n\n\t\tthis._off( this.anchors.add( this.tabs ).add( this.panels ) );\n\t\tthis._on( this.anchors, events );\n\t\tthis._on( this.tabs, { keydown: \"_tabKeydown\" } );\n\t\tthis._on( this.panels, { keydown: \"_panelKeydown\" } );\n\n\t\tthis._focusable( this.tabs );\n\t\tthis._hoverable( this.tabs );\n\t},\n\n\t_setupHeightStyle: function( heightStyle ) {\n\t\tvar maxHeight,\n\t\t\tparent = this.element.parent();\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tmaxHeight -= this.element.outerHeight() - this.element.height();\n\n\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.element.children().not( this.panels ).each(function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.panels.each(function() {\n\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t})\n\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.panels.each(function() {\n\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t}).height( maxHeight );\n\t\t}\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tanchor = $( event.currentTarget ),\n\t\t\ttab = anchor.closest( \"li\" ),\n\t\t\tclickedIsActive = tab[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : this._getPanelForTab( tab ),\n\t\t\ttoHide = !active.length ? $() : this._getPanelForTab( active ),\n\t\t\teventData = {\n\t\t\t\toldTab: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewTab: collapsing ? $() : tab,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif ( tab.hasClass( \"ui-state-disabled\" ) ||\n\t\t\t\t// tab is already loading\n\t\t\t\ttab.hasClass( \"ui-tabs-loading\" ) ||\n\t\t\t\t// can't switch durning an animation\n\t\t\t\tthis.running ||\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.tabs.index( tab );\n\n\t\tthis.active = clickedIsActive ? $() : tab;\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tif ( !toHide.length && !toShow.length ) {\n\t\t\t$.error( \"jQuery UI Tabs: Mismatching fragment identifier.\" );\n\t\t}\n\n\t\tif ( toShow.length ) {\n\t\t\tthis.load( this.tabs.index( tab ), event );\n\t\t}\n\t\tthis._toggle( event, eventData );\n\t},\n\n\t// handles show/hide for selecting tabs\n\t_toggle: function( event, eventData ) {\n\t\tvar that = this,\n\t\t\ttoShow = eventData.newPanel,\n\t\t\ttoHide = eventData.oldPanel;\n\n\t\tthis.running = true;\n\n\t\tfunction complete() {\n\t\t\tthat.running = false;\n\t\t\tthat._trigger( \"activate\", event, eventData );\n\t\t}\n\n\t\tfunction show() {\n\t\t\teventData.newTab.closest( \"li\" ).addClass( \"ui-tabs-active ui-state-active\" );\n\n\t\t\tif ( toShow.length && that.options.show ) {\n\t\t\t\tthat._show( toShow, that.options.show, complete );\n\t\t\t} else {\n\t\t\t\ttoShow.show();\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\n\t\t// start out by hiding, then showing, then completing\n\t\tif ( toHide.length && this.options.hide ) {\n\t\t\tthis._hide( toHide, this.options.hide, function() {\n\t\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\t\tshow();\n\t\t\t});\n\t\t} else {\n\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\ttoHide.hide();\n\t\t\tshow();\n\t\t}\n\n\t\ttoHide.attr({\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\"aria-hidden\": \"true\"\n\t\t});\n\t\teventData.oldTab.attr( \"aria-selected\", \"false\" );\n\t\t// If we're switching tabs, remove the old tab from the tab order.\n\t\t// If we're opening from collapsed state, remove the previous tab from the tab order.\n\t\t// If we're collapsing, then keep the collapsing tab in the tab order.\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\teventData.oldTab.attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.tabs.filter(function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t})\n\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow.attr({\n\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\"aria-hidden\": \"false\"\n\t\t});\n\t\teventData.newTab.attr({\n\t\t\t\"aria-selected\": \"true\",\n\t\t\ttabIndex: 0\n\t\t});\n\t},\n\n\t_activate: function( index ) {\n\t\tvar anchor,\n\t\t\tactive = this._findActive( index );\n\n\t\t// trying to activate the already active panel\n\t\tif ( active[ 0 ] === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// trying to collapse, simulate a click on the current active header\n\t\tif ( !active.length ) {\n\t\t\tactive = this.active;\n\t\t}\n\n\t\tanchor = active.find( \".ui-tabs-anchor\" )[ 0 ];\n\t\tthis._eventHandler({\n\t\t\ttarget: anchor,\n\t\t\tcurrentTarget: anchor,\n\t\t\tpreventDefault: $.noop\n\t\t});\n\t},\n\n\t_findActive: function( index ) {\n\t\treturn index === false ? $() : this.tabs.eq( index );\n\t},\n\n\t_getIndex: function( index ) {\n\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\tif ( typeof index === \"string\" ) {\n\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" + index + \"']\" ) );\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_destroy: function() {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tthis.element.removeClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible\" );\n\n\t\tthis.tablist\n\t\t\t.removeClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t.removeAttr( \"role\" );\n\n\t\tthis.anchors\n\t\t\t.removeClass( \"ui-tabs-anchor\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis.tabs.add( this.panels ).each(function() {\n\t\t\tif ( $.data( this, \"ui-tabs-destroy\" ) ) {\n\t\t\t\t$( this ).remove();\n\t\t\t} else {\n\t\t\t\t$( this )\n\t\t\t\t\t.removeClass( \"ui-state-default ui-state-active ui-state-disabled \" +\n\t\t\t\t\t\t\"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel\" )\n\t\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t\t.removeAttr( \"aria-live\" )\n\t\t\t\t\t.removeAttr( \"aria-busy\" )\n\t\t\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t\t.removeAttr( \"role\" );\n\t\t\t}\n\t\t});\n\n\t\tthis.tabs.each(function() {\n\t\t\tvar li = $( this ),\n\t\t\t\tprev = li.data( \"ui-tabs-aria-controls\" );\n\t\t\tif ( prev ) {\n\t\t\t\tli\n\t\t\t\t\t.attr( \"aria-controls\", prev )\n\t\t\t\t\t.removeData( \"ui-tabs-aria-controls\" );\n\t\t\t} else {\n\t\t\t\tli.removeAttr( \"aria-controls\" );\n\t\t\t}\n\t\t});\n\n\t\tthis.panels.show();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tthis.panels.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\tenable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = false;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.map( disabled, function( num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdisabled = $.map( this.tabs, function( li, num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tthis._setupDisabled( disabled );\n\t},\n\n\tdisable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = true;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.inArray( index, disabled ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.merge( [ index ], disabled ).sort();\n\t\t\t} else {\n\t\t\t\tdisabled = [ index ];\n\t\t\t}\n\t\t}\n\t\tthis._setupDisabled( disabled );\n\t},\n\n\tload: function( index, event ) {\n\t\tindex = this._getIndex( index );\n\t\tvar that = this,\n\t\t\ttab = this.tabs.eq( index ),\n\t\t\tanchor = tab.find( \".ui-tabs-anchor\" ),\n\t\t\tpanel = this._getPanelForTab( tab ),\n\t\t\teventData = {\n\t\t\t\ttab: tab,\n\t\t\t\tpanel: panel\n\t\t\t};\n\n\t\t// not remote\n\t\tif ( isLocal( anchor[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );\n\n\t\t// support: jQuery <1.8\n\t\t// jQuery <1.8 returns false if the request is canceled in beforeSend,\n\t\t// but as of 1.8, $.ajax() always returns a jqXHR object.\n\t\tif ( this.xhr && this.xhr.statusText !== \"canceled\" ) {\n\t\t\ttab.addClass( \"ui-tabs-loading\" );\n\t\t\tpanel.attr( \"aria-busy\", \"true\" );\n\n\t\t\tthis.xhr\n\t\t\t\t.success(function( response ) {\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tpanel.html( response );\n\t\t\t\t\t\tthat._trigger( \"load\", event, eventData );\n\t\t\t\t\t}, 1 );\n\t\t\t\t})\n\t\t\t\t.complete(function( jqXHR, status ) {\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tif ( status === \"abort\" ) {\n\t\t\t\t\t\t\tthat.panels.stop( false, true );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttab.removeClass( \"ui-tabs-loading\" );\n\t\t\t\t\t\tpanel.removeAttr( \"aria-busy\" );\n\n\t\t\t\t\t\tif ( jqXHR === that.xhr ) {\n\t\t\t\t\t\t\tdelete that.xhr;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 1 );\n\t\t\t\t});\n\t\t}\n\t},\n\n\t_ajaxSettings: function( anchor, event, eventData ) {\n\t\tvar that = this;\n\t\treturn {\n\t\t\turl: anchor.attr( \"href\" ),\n\t\t\tbeforeSend: function( jqXHR, settings ) {\n\t\t\t\treturn that._trigger( \"beforeLoad\", event,\n\t\t\t\t\t$.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );\n\t\t\t}\n\t\t};\n\t},\n\n\t_getPanelForTab: function( tab ) {\n\t\tvar id = $( tab ).attr( \"aria-controls\" );\n\t\treturn this.element.find( this._sanitizeSelector( \"#\" + id ) );\n\t}\n});\n\n})( jQuery );\n\n(function( $ ) {\n\nvar increments = 0;\n\nfunction addDescribedBy( elem, id ) {\n\tvar describedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ );\n\tdescribedby.push( id );\n\telem\n\t\t.data( \"ui-tooltip-id\", id )\n\t\t.attr( \"aria-describedby\", $.trim( describedby.join( \" \" ) ) );\n}\n\nfunction removeDescribedBy( elem ) {\n\tvar id = elem.data( \"ui-tooltip-id\" ),\n\t\tdescribedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ ),\n\t\tindex = $.inArray( id, describedby );\n\tif ( index !== -1 ) {\n\t\tdescribedby.splice( index, 1 );\n\t}\n\n\telem.removeData( \"ui-tooltip-id\" );\n\tdescribedby = $.trim( describedby.join( \" \" ) );\n\tif ( describedby ) {\n\t\telem.attr( \"aria-describedby\", describedby );\n\t} else {\n\t\telem.removeAttr( \"aria-describedby\" );\n\t}\n}\n\n$.widget( \"ui.tooltip\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tcontent: function() {\n\t\t\t// support: IE<9, Opera in jQuery <1.7\n\t\t\t// .text() can't accept undefined, so coerce to a string\n\t\t\tvar title = $( this ).attr( \"title\" ) || \"\";\n\t\t\t// Escape title, since we're going from an attribute to raw HTML\n\t\t\treturn $( \"<a>\" ).text( title ).html();\n\t\t},\n\t\thide: true,\n\t\t// Disabled elements have inconsistent behavior across browsers (#8661)\n\t\titems: \"[title]:not([disabled])\",\n\t\tposition: {\n\t\t\tmy: \"left top+15\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"flipfit flip\"\n\t\t},\n\t\tshow: true,\n\t\ttooltipClass: null,\n\t\ttrack: false,\n\n\t\t// callbacks\n\t\tclose: null,\n\t\topen: null\n\t},\n\n\t_create: function() {\n\t\tthis._on({\n\t\t\tmouseover: \"open\",\n\t\t\tfocusin: \"open\"\n\t\t});\n\n\t\t// IDs of generated tooltips, needed for destroy\n\t\tthis.tooltips = {};\n\t\t// IDs of parent tooltips where we removed the title attribute\n\t\tthis.parents = {};\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._disable();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar that = this;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis[ value ? \"_disable\" : \"_enable\" ]();\n\t\t\tthis.options[ key ] = value;\n\t\t\t// disable element style changes\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"content\" ) {\n\t\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\t\tthat._updateContent( element );\n\t\t\t});\n\t\t}\n\t},\n\n\t_disable: function() {\n\t\tvar that = this;\n\n\t\t// close open tooltips\n\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\tvar event = $.Event( \"blur\" );\n\t\t\tevent.target = event.currentTarget = element[0];\n\t\t\tthat.close( event, true );\n\t\t});\n\n\t\t// remove title attributes to prevent native tooltips\n\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.is( \"[title]\" ) ) {\n\t\t\t\telement\n\t\t\t\t\t.data( \"ui-tooltip-title\", element.attr( \"title\" ) )\n\t\t\t\t\t.attr( \"title\", \"\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_enable: function() {\n\t\t// restore title attributes\n\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t}\n\t\t});\n\t},\n\n\topen: function( event ) {\n\t\tvar that = this,\n\t\t\ttarget = $( event ? event.target : this.element )\n\t\t\t\t// we need closest here due to mouseover bubbling,\n\t\t\t\t// but always pointing at the same event target\n\t\t\t\t.closest( this.options.items );\n\n\t\t// No element to show a tooltip for or the tooltip is already open\n\t\tif ( !target.length || target.data( \"ui-tooltip-id\" ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( target.attr( \"title\" ) ) {\n\t\t\ttarget.data( \"ui-tooltip-title\", target.attr( \"title\" ) );\n\t\t}\n\n\t\ttarget.data( \"ui-tooltip-open\", true );\n\n\t\t// kill parent tooltips, custom or native, for hover\n\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\ttarget.parents().each(function() {\n\t\t\t\tvar parent = $( this ),\n\t\t\t\t\tblurEvent;\n\t\t\t\tif ( parent.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\tblurEvent = $.Event( \"blur\" );\n\t\t\t\t\tblurEvent.target = blurEvent.currentTarget = this;\n\t\t\t\t\tthat.close( blurEvent, true );\n\t\t\t\t}\n\t\t\t\tif ( parent.attr( \"title\" ) ) {\n\t\t\t\t\tparent.uniqueId();\n\t\t\t\t\tthat.parents[ this.id ] = {\n\t\t\t\t\t\telement: this,\n\t\t\t\t\t\ttitle: parent.attr( \"title\" )\n\t\t\t\t\t};\n\t\t\t\t\tparent.attr( \"title\", \"\" );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis._updateContent( target, event );\n\t},\n\n\t_updateContent: function( target, event ) {\n\t\tvar content,\n\t\t\tcontentOption = this.options.content,\n\t\t\tthat = this,\n\t\t\teventType = event ? event.type : null;\n\n\t\tif ( typeof contentOption === \"string\" ) {\n\t\t\treturn this._open( event, target, contentOption );\n\t\t}\n\n\t\tcontent = contentOption.call( target[0], function( response ) {\n\t\t\t// ignore async response if tooltip was closed already\n\t\t\tif ( !target.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// IE may instantly serve a cached response for ajax requests\n\t\t\t// delay this call to _open so the other call to _open runs first\n\t\t\tthat._delay(function() {\n\t\t\t\t// jQuery creates a special event for focusin when it doesn't\n\t\t\t\t// exist natively. To improve performance, the native event\n\t\t\t\t// object is reused and the type is changed. Therefore, we can't\n\t\t\t\t// rely on the type being correct after the event finished\n\t\t\t\t// bubbling, so we set it back to the previous value. (#8740)\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.type = eventType;\n\t\t\t\t}\n\t\t\t\tthis._open( event, target, response );\n\t\t\t});\n\t\t});\n\t\tif ( content ) {\n\t\t\tthis._open( event, target, content );\n\t\t}\n\t},\n\n\t_open: function( event, target, content ) {\n\t\tvar tooltip, events, delayedShow,\n\t\t\tpositionOption = $.extend( {}, this.options.position );\n\n\t\tif ( !content ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Content can be updated multiple times. If the tooltip already\n\t\t// exists, then just update the content and bail.\n\t\ttooltip = this._find( target );\n\t\tif ( tooltip.length ) {\n\t\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\t\t\treturn;\n\t\t}\n\n\t\t// if we have a title, clear it to prevent the native tooltip\n\t\t// we have to check first to avoid defining a title if none exists\n\t\t// (we don't want to cause an element to start matching [title])\n\t\t//\n\t\t// We use removeAttr only for key events, to allow IE to export the correct\n\t\t// accessible attributes. For mouse events, set to empty string to avoid\n\t\t// native tooltip showing up (happens only when removing inside mouseover).\n\t\tif ( target.is( \"[title]\" ) ) {\n\t\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\t\ttarget.attr( \"title\", \"\" );\n\t\t\t} else {\n\t\t\t\ttarget.removeAttr( \"title\" );\n\t\t\t}\n\t\t}\n\n\t\ttooltip = this._tooltip( target );\n\t\taddDescribedBy( target, tooltip.attr( \"id\" ) );\n\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\n\t\tfunction position( event ) {\n\t\t\tpositionOption.of = event;\n\t\t\tif ( tooltip.is( \":hidden\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttooltip.position( positionOption );\n\t\t}\n\t\tif ( this.options.track && event && /^mouse/.test( event.type ) ) {\n\t\t\tthis._on( this.document, {\n\t\t\t\tmousemove: position\n\t\t\t});\n\t\t\t// trigger once to override element-relative positioning\n\t\t\tposition( event );\n\t\t} else {\n\t\t\ttooltip.position( $.extend({\n\t\t\t\tof: target\n\t\t\t}, this.options.position ) );\n\t\t}\n\n\t\ttooltip.hide();\n\n\t\tthis._show( tooltip, this.options.show );\n\t\t// Handle tracking tooltips that are shown with a delay (#8644). As soon\n\t\t// as the tooltip is visible, position the tooltip using the most recent\n\t\t// event.\n\t\tif ( this.options.show && this.options.show.delay ) {\n\t\t\tdelayedShow = this.delayedShow = setInterval(function() {\n\t\t\t\tif ( tooltip.is( \":visible\" ) ) {\n\t\t\t\t\tposition( positionOption.of );\n\t\t\t\t\tclearInterval( delayedShow );\n\t\t\t\t}\n\t\t\t}, $.fx.interval );\n\t\t}\n\n\t\tthis._trigger( \"open\", event, { tooltip: tooltip } );\n\n\t\tevents = {\n\t\t\tkeyup: function( event ) {\n\t\t\t\tif ( event.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tvar fakeEvent = $.Event(event);\n\t\t\t\t\tfakeEvent.currentTarget = target[0];\n\t\t\t\t\tthis.close( fakeEvent, true );\n\t\t\t\t}\n\t\t\t},\n\t\t\tremove: function() {\n\t\t\t\tthis._removeTooltip( tooltip );\n\t\t\t}\n\t\t};\n\t\tif ( !event || event.type === \"mouseover\" ) {\n\t\t\tevents.mouseleave = \"close\";\n\t\t}\n\t\tif ( !event || event.type === \"focusin\" ) {\n\t\t\tevents.focusout = \"close\";\n\t\t}\n\t\tthis._on( true, target, events );\n\t},\n\n\tclose: function( event ) {\n\t\tvar that = this,\n\t\t\ttarget = $( event ? event.currentTarget : this.element ),\n\t\t\ttooltip = this._find( target );\n\n\t\t// disabling closes the tooltip, so we need to track when we're closing\n\t\t// to avoid an infinite loop in case the tooltip becomes disabled on close\n\t\tif ( this.closing ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clear the interval for delayed tracking tooltips\n\t\tclearInterval( this.delayedShow );\n\n\t\t// only set title if we had one before (see comment in _open())\n\t\tif ( target.data( \"ui-tooltip-title\" ) ) {\n\t\t\ttarget.attr( \"title\", target.data( \"ui-tooltip-title\" ) );\n\t\t}\n\n\t\tremoveDescribedBy( target );\n\n\t\ttooltip.stop( true );\n\t\tthis._hide( tooltip, this.options.hide, function() {\n\t\t\tthat._removeTooltip( $( this ) );\n\t\t});\n\n\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\tthis._off( target, \"mouseleave focusout keyup\" );\n\t\t// Remove 'remove' binding only on delegated targets\n\t\tif ( target[0] !== this.element[0] ) {\n\t\t\tthis._off( target, \"remove\" );\n\t\t}\n\t\tthis._off( this.document, \"mousemove\" );\n\n\t\tif ( event && event.type === \"mouseleave\" ) {\n\t\t\t$.each( this.parents, function( id, parent ) {\n\t\t\t\t$( parent.element ).attr( \"title\", parent.title );\n\t\t\t\tdelete that.parents[ id ];\n\t\t\t});\n\t\t}\n\n\t\tthis.closing = true;\n\t\tthis._trigger( \"close\", event, { tooltip: tooltip } );\n\t\tthis.closing = false;\n\t},\n\n\t_tooltip: function( element ) {\n\t\tvar id = \"ui-tooltip-\" + increments++,\n\t\t\ttooltip = $( \"<div>\" )\n\t\t\t\t.attr({\n\t\t\t\t\tid: id,\n\t\t\t\t\trole: \"tooltip\"\n\t\t\t\t})\n\t\t\t\t.addClass( \"ui-tooltip ui-widget ui-corner-all ui-widget-content \" +\n\t\t\t\t\t( this.options.tooltipClass || \"\" ) );\n\t\t$( \"<div>\" )\n\t\t\t.addClass( \"ui-tooltip-content\" )\n\t\t\t.appendTo( tooltip );\n\t\ttooltip.appendTo( this.document[0].body );\n\t\tthis.tooltips[ id ] = element;\n\t\treturn tooltip;\n\t},\n\n\t_find: function( target ) {\n\t\tvar id = target.data( \"ui-tooltip-id\" );\n\t\treturn id ? $( \"#\" + id ) : $();\n\t},\n\n\t_removeTooltip: function( tooltip ) {\n\t\ttooltip.remove();\n\t\tdelete this.tooltips[ tooltip.attr( \"id\" ) ];\n\t},\n\n\t_destroy: function() {\n\t\tvar that = this;\n\n\t\t// close open tooltips\n\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\t// Delegate to close method to handle common cleanup\n\t\t\tvar event = $.Event( \"blur\" );\n\t\t\tevent.target = event.currentTarget = element[0];\n\t\t\tthat.close( event, true );\n\n\t\t\t// Remove immediately; destroying an open tooltip doesn't use the\n\t\t\t// hide animation\n\t\t\t$( \"#\" + id ).remove();\n\n\t\t\t// Restore the title\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t\telement.removeData( \"ui-tooltip-title\" );\n\t\t\t}\n\t\t});\n\t}\n});\n\n}( jQuery ) );\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jquery-ui/jquery-ui.js\n// module id = 34\n// module chunks = 4"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap 6e5b1af915babfe1fe92?33e6****","webpack:///./src/_test/range_media.ts","webpack:///./src/util/provide.ts?5c82***","webpack:///external \"$\"?57aa***","webpack:///./src/domUtil/day-range.ts","webpack:///./~/jquery-ui/jquery-ui.js"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;ACtCA;;IAEG;;AAEH,uEAA8C;AAC9C,8CAA6B;AAE7B,KAAI,QAAQ,GAAG,IAAI,oBAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,EAAE,CAAC,CAAC;;;;;;;;;;;ACPjD;;IAEG;;AAGH;;;;IAIG;AACH,kBAAiB,SAAS;KACtB,YAAY,CAAC;KACb,EAAE,CAAC,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,WAAW,CAAC,EAAC;SACpC,MAAM,CAAC,IAAI,CAAC,GAAG,E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;AACJ,IAAG;AACH;AACA;AACA,KAAI;AACJ;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC,yBAAyB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;AACF;;;;;;AAMA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA,gBAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA,wBAAuB,2BAA2B;AAClD;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAuB;AACvB;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ,0BAA0B;AAClC;AACA;AACA;AACA;AACA;AACA;AACA,0BAAyB;AACzB;AACA,0BAAyB;AACzB;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mFAAkF;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA,oCAAmC;AACnC,MAAK;AACL;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,qCAAoC;AACpC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,8BAA6B;AAC7B;;AAEA;AACA,+CAA8C,OAAO,WAAW;AAChE;AACA;AACA;AACA;AACA,qDAAoD;AACpD,iBAAgB,sBAAsB;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,UAAS,kCAAkC;AAC3C;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,uBAAsB,QAAQ;;AAE9B;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA,uCAAsC;AACtC,sCAAqC;AACrC,sCAAqC;AACrC,wCAAuC,aAAa;AACpD,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,mEAAkE;AAClE;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;;AAEA,GAAE;;AAEF;;AAEA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,YAAW;AACX;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA,gCAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA,oBAAmB;AACnB,IAAG;AACH;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,YAAW;AACX;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,0BAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,0BAAyB;AACzB;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF,aAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;AACA;;AAEA;AACA,4BAA2B,OAAO,qBAAqB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,iCAAgC;AAChC;AACA;AACA,IAAG;;AAEH,GAAE;AACF;;AAEA;AACA;AACA,4BAA2B,OAAO,qBAAqB;;AAEvD;AACA;;AAEA;;AAEA,qCAAoC;AACpC,+CAA8C;;AAE9C;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,qCAAoC,4BAA4B;AAChE;;AAEA,KAAI;AACJ,+CAA8C;AAC9C;AACA;;AAEA,IAAG;;AAEH,GAAE;AACF;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,mEAAkE;AAClE,iDAAgD,qBAAqB;;AAErE;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2CAA0C;AAC1C;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,KAAI;;AAEJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,2BAA0B;AAC1B;;AAEA;;AAEA,IAAG;;AAEH;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;;AAEH,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAwC,QAAQ;;AAEhD;AACA;AACA;AACA;;AAEA;AACA;AACA,kHAAiH,sCAAsC;AACvJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA4D,kDAAkD;AAC9G;AACA;AACA,6DAA4D,kBAAkB;AAC9E;AACA;AACA,8DAA6D,iDAAiD;AAC9G;AACA;AACA,8DAA6D,kBAAkB;AAC/E;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA4D,kBAAkB;AAC9E;AACA;AACA,6DAA4D,kDAAkD;AAC9G;AACA;AACA,8DAA6D,kBAAkB;AAC/E;AACA;AACA,8DAA6D,iDAAiD;AAC9G;AACA;;AAEA;AACA,2GAA0G,sCAAsC;AAChJ;AACA;;AAEA;;AAEA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ,uBAAsB,QAAQ;;AAE9B;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,uBAAsB;;AAEtB;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;;AAEA,UAAS,iBAAiB;AAC1B;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA8C,gCAAgC;AAC9E,OAAM,6BAA6B,cAAc;AACjD,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAwD;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,eAAc,gBAAgB;AAC9B;;AAEA;AACA;AACA;AACA;;AAEA,8BAA6B,cAAc;;AAE3C;AACA;AACA;AACA;;AAEA;AACA,aAAY,iBAAiB;AAC7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAuB;;AAEvB;;AAEA,GAAE;AACF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,IAAG;AACH;;AAEA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA,wDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sBAAqB,qNAAqN;AAC1O,8BAA6B,8DAA8D;;AAE3F;AACA;AACA;;AAEA;AACA,sEAAqE,gDAAgD;;AAErH;AACA,8BAA6B,6CAA6C;;AAE1E;AACA;;AAEA;;AAEA,8FAA6F,yLAAyL;AACtR;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,cAAa,cAAc;;AAE3B;AACA;AACA;;AAEA;AACA,eAAc,mBAAmB;;AAEjC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;;AAEA,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,YAAW,iEAAiE;AAC5E,IAAG;AACH,YAAW,2DAA2D;AACtE;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,oBAAmB;AACnB,+BAA8B,mDAAmD,IAAI;AACrF,uCAAsC,mDAAmD,IAAI;AAC7F,4BAA2B;AAC3B,oBAAmB;AACnB,iCAAgC;;AAEhC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA,gCAA+B;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,SAAQ;AACR;AACA;;AAEA;AACA,mCAAkC,uBAAuB;AACzD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,aAAY,+CAA+C;;AAE3D;;AAEA;AACA;AACA;AACA;;AAEA,iBAAgB,oBAAoB;AACpC;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;;AAEJ;;AAEA,GAAE;;AAEF;;AAEA;AACA;;AAEA;;AAEA,gEAA+D;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;;AAEA,IAAG;AACH;AACA;;AAEA,GAAE;;AAEF;AACA;AACA,YAAW;AACX,IAAG;AACH;AACA;AACA,YAAW;AACX,IAAG;AACH;AACA;AACA,YAAW;AACX,IAAG;AACH;AACA,YAAW;AACX,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF,aAAY;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY,6EAA6E;AACzF;AACA;;AAEA;AACA,mCAAkC,uBAAuB,KAAK;AAC9D;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,qBAAoB,yCAAyC;AAC7D;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,4BAA2B;AAC3B,8BAA6B;;AAE7B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,oEAAmE,2CAA2C,EAAE;;AAEhH;AACA;AACA,0BAAyB;;AAEzB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,WAAU,gBAAgB;;AAE1B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,iBAAgB,0DAA0D;AAC1E;;AAEA;AACA,iBAAgB,0DAA0D;AAC1E;;AAEA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,MAAK;AACL;;AAEA;AACA,8BAA6B,gCAAgC,sBAAsB;AACnF,UAAS,sCAAsC,aAAa,EAAE,EAAE;AAChE,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,mFAAkF;AAClF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAM;;AAEN;AACA,MAAK;AACL;;AAEA;AACA,4CAA2C,qBAAqB,EAAE;AAClE,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;AAEA;;AAEA;AACA;AACA,UAAS,wHAAwH;AACjI;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA,oBAAmB,yEAAyE;AAC5F;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,KAAI;AACJ;AACA;;AAEA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,MAAK;AACL;AACA;AACA,OAAM;AACN;AACA;AACA;AACA,IAAG;;AAEH,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iBAAgB,UAAU,SAAS,UAAU;AAC7C,iBAAgB,UAAU,SAAS,UAAU;AAC7C,oBAAmB,+CAA+C;;AAElE;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;AAEF;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA,EAAC;;AAED,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA,uCAAsC,QAAQ;AAC9C;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAW;AACX;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,uBAAsB;;AAEtB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,0CAAyC;AACzC;;AAEA;AACA;AACA;;AAEA,yCAAwC,iCAAiC,EAAE;AAC3E;;AAEA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;;AAEA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;;AAGA;AACA;AACA,yCAAwC,QAAQ;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,0BAAyB;AACzB;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA,KAAI;;AAEJ;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC,QAAQ;;AAEzC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;;AAEA;;AAEA,GAAE;;AAEF;;AAEA;;AAEA,mBAAkB,eAAe;;AAEjC;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA,4CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,sCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;;AAEA;AACA;;AAEA;;AAEA,0BAAyB,6DAA6D,EAAE;AACxF;;AAEA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AAC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;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,sBAAqB;AACrB;AACA;AACA,QAAO;AACP,OAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,uBAAsB,yJAAyJ;AAC/K,sBAAqB,uJAAuJ;AAC5K;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA,uCAAsC,QAAQ;;AAE9C;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC,QAAQ;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kCAAiC;AACjC;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA,GAAE;;AAEF;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAsB;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,UAAS;AACT;;AAEA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,YAAW;AACX;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,8BAA6B;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yCAAwC;AACxC;AACA,IAAG;;AAEH,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA,0CAAyC,iEAAiE,EAAE;AAC5G;AACA;AACA,0CAAyC,gDAAgD,EAAE,EAAE;AAC7F;;AAEA;AACA;AACA;AACA;AACA,2CAA0C,gDAAgD,EAAE;AAC5F,wCAAuC,yBAAyB,kDAAkD,GAAG,GAAG;AACxH,wCAAuC,yBAAyB,iDAAiD,IAAI,EAAE;AACvH;AACA;;;AAGA;AACA,uCAAsC,QAAQ;AAC9C;AACA,wCAAuC,yBAAyB,qDAAqD,GAAG,GAAG;AAC3H;AACA;AACA,wCAAuC,yBAAyB,8CAA8C,GAAG,GAAG;AACpH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa,4BAA4B;AACzC;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,qCAAoC;AACpC;;AAEA;AACA;AACA;AACA;;AAEA;AACA,aAAY,4BAA4B;AACxC;AACA,KAAI;AACJ;AACA;;AAEA;AACA;;AAEA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB,IAAI,YAAY,IAAI,YAAY,IAAI;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,oBAAmB,EAAE,WAAW,EAAE,WAAW,EAAE;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,GAAE;AACF,8BAA6B;;AAE7B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,KAAI;AACJ;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;;AAEA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA;AACA,EAAC;AACD;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,EAAC;;;AAGD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA,eAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA,uBAAsB;AACtB;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,KAAI;;AAEJ;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAM,kBAAkB;AACxB;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,OAAM,qBAAqB;AAC3B;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,iBAAgB,kBAAkB,IAAI,qBAAqB;AAC3D;AACA;AACA,KAAI;AACJ;AACA;AACA,OAAM,qBAAqB;AAC3B;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED,EAAC;;AAED;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAe,gBAAgB;AAC/B;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,YAAW,gBAAgB;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,sBAAqB;AACrB,2BAA0B;AAC1B,yBAAwB;AACxB;AACA;AACA;AACA,uBAAsB;AACtB,2BAA0B;AAC1B,wBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,8BAA6B;;AAE7B;AACA;AACA,iBAAgB,uBAAuB;AACvC,iBAAgB,uBAAuB;AACvC,IAAG;AACH;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;AAGA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,YAAW;;AAEX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,EAAC;;AAED,EAAC;;AAED;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;AACA,GAAE;AACF;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA,gBAAe;AACf;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,cAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,iDAAgD;AAChD;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;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;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA,mCAAkC,2BAA2B;AAC7D;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,MAAK;AACL,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,wCAAuC;AACvC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA,KAAI;AACJ,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP,OAAM;AACN;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAO;;AAEP;AACA;AACA;;AAEA;AACA,oDAAmD,aAAa;AAChE;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;;AAEA,qDAAoD,aAAa;AACjE;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA,iBAAgB,cAAc;AAC9B,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,qCAAoC,mBAAmB;AACvD;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,qCAAoC,0BAA0B;AAC9D;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA,kCAAiC;AACjC,GAAE;AACF;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;;AAGD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA,iBAAgB,cAAc,oBAAoB,EAAE;;AAEpD;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,uBAAsB;AACtB,yBAAwB;AACxB,4BAA2B;AAC3B,kCAAiC;AACjC,yBAAwB;AACxB,wCAAuC;AACvC,6CAA4C;AAC5C,6CAA4C;AAC5C,+CAA8C;AAC9C,6CAA4C;AAC5C,gDAA+C;AAC/C,yDAAwD;AACxD,mDAAkD;AAClD,sDAAqD;AACrD,qBAAoB;AACpB,uBAAsB;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB;AACnB;AACA;AACA;AACA,kBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,8CAA6C;AAC7C;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA6B,gBAAgB;AAC7C;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA,iEAAgE;AAChE,WAAU;AACV;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA,iDAAgD;AAChD;AACA;AACA,kDAAiD;AACjD;AACA;AACA;AACA;AACA,YAAW,uDAAuD;AAClE;AACA;AACA,OAAM,oDAAoD;AAC1D;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAgB,kBAAkB;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B;;AAE3B;AACA;AACA;AACA;AACA,kCAAiC,aAAa,YAAY;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA,6CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAqB,uBAAuB,EAAE;AAC9C,wBAAuB,2BAA2B;AAClD,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB,0CAA0C,EAAE,EAAE;AAClE,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,sBAAqB,sBAAsB,EAAE;AAC7C,wBAAuB,kCAAkC;AACzD,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,qBAAoB,0CAA0C,EAAE,EAAE;AAClE;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,iCAAiC;AAClD;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,6CAA4C;AAC5C,0CAAyC;AACzC;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAO;AACP;AACA;;AAEA,oBAAmB;AACnB;AACA,aAAY;AACZ;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA,IAAG,kDAAkD;AACrD;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,gBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAiD;AACjD;AACA;;AAEA,wFAAuF;AACvF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,gCAA+B;AAC/B;AACA;AACA,4BAA2B;AAC3B;AACA,+CAA8C;AAC9C;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH,aAAY;AACZ;AACA;AACA;AACA;AACA,mBAAkB,uDAAuD;AACzE;AACA;AACA;AACA;AACA,mBAAkB;AAClB;AACA,qDAAoD;;AAEpD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA,oBAAmB;AACnB,qBAAoB;AACpB;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,4BAA2B,iDAAiD;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,yEAAwE;AACxE,IAAG;AACH,iCAAgC;AAChC;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,wBAAuB;AACvB;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA,kBAAiB;AACjB;AACA;AACA;AACA,iCAAgC,sBAAsB,EAAE;AACxD;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,yBAAwB;AACxB;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,gCAA+B,eAAe;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA,OAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA,yBAAwB;AACxB;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA,qBAAoB,yBAAyB;AAC7C;AACA;AACA;AACA,OAAM;AACN;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,oBAAmB,yBAAyB;AAC5C;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,mBAAkB;AAClB;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uCAAsC;AACtC;AACA,2CAA0C;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAe,oBAAoB;AACnC;AACA;AACA,iBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kEAAiE;AACjE;AACA,kEAAiE;AACjE,2DAA0D,kBAAkB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB,SAAS,SAAS;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAsD;AACtD,0FAAyF;AACzF;AACA;AACA,mBAAkB,gBAAgB,UAAU;AAC5C;AACA;AACA;AACA,mBAAkB,SAAS,SAAS;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8GAA6G;AAC7G;AACA,iDAAgD;AAChD;AACA;AACA;AACA;AACA,iEAAgE;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,oBAAmB,YAAY;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,4EAA2E;AAC3E;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAU,iBAAiB;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gEAA+D;AAC/D;AACA,oBAAmB;AACnB;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,WAAU;AACV;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA,iCAAgC;AAChC;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,sBAAqB;AACrB;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK,2BAA2B;AAChC;AACA;AACA,uBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAM;;AAEN;AACA;AACA;AACA;AACA;AACA;;AAEA,4BAA2B;AAC3B,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA,EAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,UAAS,uBAAuB;;AAEhC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,gCAA+B;;AAE/B;AACA;AACA;AACA;;AAEA;AACA,eAAc;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,cAAa,WAAW;AACxB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,aAAY;AACZ;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,aAAY,WAAW,QAAQ;AAC/B;AACA;;AAEA,cAAa,YAAY,QAAQ;AACjC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAiB;AACjB;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,cAAa,WAAW;AACxB;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;;AAEA;AACA;AACA,+BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB;;AAEnB;AACA,kDAAiD;;AAEjD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,QAAO;AACP,OAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB;AAChB,kBAAiB;AACjB,kBAAiB;AACjB;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,cAAa,WAAW;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,KAAI;AACJ;;AAEA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,IAAG;AACH;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,KAAI;AACJ;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA,oCAAmC;AACnC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,MAAK;AACL;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA,mCAAkC,aAAa;AAC/C,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA,kCAAiC,oBAAoB;AACrD,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA,IAAG;AACH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA,aAAY;AACZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAuC,WAAW,YAAY,gBAAgB,2BAA2B,WAAW;AACpH;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA,uCAAsC,kBAAkB;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,wBAAuB;;AAEvB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA4B;;AAE5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA,GAAE;AACF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA0B;AAC1B;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA,qCAAoC,eAAe;AACnD,GAAE;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA,OAAM;AACN;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,0CAAyC,oBAAoB;;AAE7D;AACA;;AAEA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,oCAAmC,iBAAiB;AACpD;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,eAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,0CAAyC,kBAAkB;AAC3D;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA,mBAAkB,iCAAiC;AACnD;;AAEA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,iBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,gBAAgB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA,gBAAe,iBAAiB;AAChC;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAgE,yBAAyB;AACzF;AACA;AACA,oDAAmD,+CAA+C,GAAG,oCAAoC;AACzI;AACA,OAAM;AACN;AACA,iEAAgE,+BAA+B;AAC/F;AACA;AACA,oDAAmD,gDAAgD,GAAG,oCAAoC;AAC1I;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,8DAA6D,0BAA0B;AACvF;AACA;AACA,iDAAgD,oCAAoC,GAAG,oCAAoC;AAC3H;AACA;AACA,8DAA6D,2BAA2B;AACxF;AACA;AACA,iDAAgD,qCAAqC,GAAG,oCAAoC;AAC5H;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA,mBAAkB;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,IAAG;AACH;AACA;;AAEA,+CAA8C;AAC9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;;AAEA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,iEAAgE;AAChE;AACA;AACA,mEAAkE;AAClE;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,yDAAwD,eAAe;AACvE;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,kDAAiD;AACjD;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA,iDAAgD,aAAa,EAAE;AAC/D,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,KAAI;;AAEJ;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA,IAAG;;AAEH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA,uBAAsB,yBAAyB;AAC/C;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA;AACA,yBAAwB,yBAAyB;AACjD,2BAA0B,2BAA2B;;AAErD;AACA;AACA,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;;AAEJ;AACA;AACA,KAAI;;AAEJ;AACA;AACA;AACA,KAAI;AACJ;AACA,IAAG;AACH;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,KAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;;AAEH;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA,MAAK;AACL,KAAI;AACJ;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAM;AACN,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAM;AACN,MAAK;AACL;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,iBAAgB,wCAAwC;AACxD;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,EAAC;;AAED,EAAC;;AAED;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,KAAI;AACJ;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ,IAAG;AACH;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA,iCAAgC;;AAEhC;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA,IAAG;AACH;AACA;AACA,KAAI;AACJ;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA,kCAAiC,mBAAmB;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,KAAI;AACJ;;AAEA;AACA,mCAAkC,mBAAmB;AACrD;AACA,GAAE;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;AACA;AACA,GAAE;;AAEF;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,0BAAyB;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA,EAAC;;AAED,EAAC","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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6e5b1af915babfe1fe92","/**\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/_test/range_media.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 5\n// module chunks = 0 2 3 4 5 7 8","import provide from '../util/provide';\r\nimport $ = require('jquery');\r\nimport 'jquery-ui';\r\n\r\n\r\nlet nm = provide('domUtil');\r\n\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\n\r\nexport default DayRange;\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/domUtil/day-range.ts","var jQuery = require('jquery');\n\n/*! jQuery UI - v1.10.3 - 2013-05-03\n* http://jqueryui.com\n* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.effect.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js, jquery.ui.menu.js, jquery.ui.position.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js\n* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */\n(function( $, undefined ) {\n\nvar uuid = 0,\n\truniqueId = /^ui-id-\\d+$/;\n\n// $.ui might exist from components with no dependencies, e.g., $.ui.position\n$.ui = $.ui || {};\n\n$.extend( $.ui, {\n\tversion: \"1.10.3\",\n\n\tkeyCode: {\n\t\tBACKSPACE: 8,\n\t\tCOMMA: 188,\n\t\tDELETE: 46,\n\t\tDOWN: 40,\n\t\tEND: 35,\n\t\tENTER: 13,\n\t\tESCAPE: 27,\n\t\tHOME: 36,\n\t\tLEFT: 37,\n\t\tNUMPAD_ADD: 107,\n\t\tNUMPAD_DECIMAL: 110,\n\t\tNUMPAD_DIVIDE: 111,\n\t\tNUMPAD_ENTER: 108,\n\t\tNUMPAD_MULTIPLY: 106,\n\t\tNUMPAD_SUBTRACT: 109,\n\t\tPAGE_DOWN: 34,\n\t\tPAGE_UP: 33,\n\t\tPERIOD: 190,\n\t\tRIGHT: 39,\n\t\tSPACE: 32,\n\t\tTAB: 9,\n\t\tUP: 38\n\t}\n});\n\n// plugins\n$.fn.extend({\n\tfocus: (function( orig ) {\n\t\treturn function( delay, fn ) {\n\t\t\treturn typeof delay === \"number\" ?\n\t\t\t\tthis.each(function() {\n\t\t\t\t\tvar elem = this;\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t$( elem ).focus();\n\t\t\t\t\t\tif ( fn ) {\n\t\t\t\t\t\t\tfn.call( elem );\n\t\t\t\t\t\t}\n\t\t\t\t\t}, delay );\n\t\t\t\t}) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.focus ),\n\n\tscrollParent: function() {\n\t\tvar scrollParent;\n\t\tif (($.ui.ie && (/(static|relative)/).test(this.css(\"position\"))) || (/absolute/).test(this.css(\"position\"))) {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(relative|absolute|fixed)/).test($.css(this,\"position\")) && (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t}).eq(0);\n\t\t} else {\n\t\t\tscrollParent = this.parents().filter(function() {\n\t\t\t\treturn (/(auto|scroll)/).test($.css(this,\"overflow\")+$.css(this,\"overflow-y\")+$.css(this,\"overflow-x\"));\n\t\t\t}).eq(0);\n\t\t}\n\n\t\treturn (/fixed/).test(this.css(\"position\")) || !scrollParent.length ? $(document) : scrollParent;\n\t},\n\n\tzIndex: function( zIndex ) {\n\t\tif ( zIndex !== undefined ) {\n\t\t\treturn this.css( \"zIndex\", zIndex );\n\t\t}\n\n\t\tif ( this.length ) {\n\t\t\tvar elem = $( this[ 0 ] ), position, value;\n\t\t\twhile ( elem.length && elem[ 0 ] !== document ) {\n\t\t\t\t// Ignore z-index if position is set to a value where z-index is ignored by the browser\n\t\t\t\t// This makes behavior of this function consistent across browsers\n\t\t\t\t// WebKit always returns auto if the element is positioned\n\t\t\t\tposition = elem.css( \"position\" );\n\t\t\t\tif ( position === \"absolute\" || position === \"relative\" || position === \"fixed\" ) {\n\t\t\t\t\t// IE returns 0 when zIndex is not specified\n\t\t\t\t\t// other browsers return a string\n\t\t\t\t\t// we ignore the case of nested elements with an explicit value of 0\n\t\t\t\t\t// <div style=\"z-index: -10;\"><div style=\"z-index: 0;\"></div></div>\n\t\t\t\t\tvalue = parseInt( elem.css( \"zIndex\" ), 10 );\n\t\t\t\t\tif ( !isNaN( value ) && value !== 0 ) {\n\t\t\t\t\t\treturn value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telem = elem.parent();\n\t\t\t}\n\t\t}\n\n\t\treturn 0;\n\t},\n\n\tuniqueId: function() {\n\t\treturn this.each(function() {\n\t\t\tif ( !this.id ) {\n\t\t\t\tthis.id = \"ui-id-\" + (++uuid);\n\t\t\t}\n\t\t});\n\t},\n\n\tremoveUniqueId: function() {\n\t\treturn this.each(function() {\n\t\t\tif ( runiqueId.test( this.id ) ) {\n\t\t\t\t$( this ).removeAttr( \"id\" );\n\t\t\t}\n\t\t});\n\t}\n});\n\n// selectors\nfunction focusable( element, isTabIndexNotNaN ) {\n\tvar map, mapName, img,\n\t\tnodeName = element.nodeName.toLowerCase();\n\tif ( \"area\" === nodeName ) {\n\t\tmap = element.parentNode;\n\t\tmapName = map.name;\n\t\tif ( !element.href || !mapName || map.nodeName.toLowerCase() !== \"map\" ) {\n\t\t\treturn false;\n\t\t}\n\t\timg = $( \"img[usemap=#\" + mapName + \"]\" )[0];\n\t\treturn !!img && visible( img );\n\t}\n\treturn ( /input|select|textarea|button|object/.test( nodeName ) ?\n\t\t!element.disabled :\n\t\t\"a\" === nodeName ?\n\t\t\telement.href || isTabIndexNotNaN :\n\t\t\tisTabIndexNotNaN) &&\n\t\t// the element and all of its ancestors must be visible\n\t\tvisible( element );\n}\n\nfunction visible( element ) {\n\treturn $.expr.filters.visible( element ) &&\n\t\t!$( element ).parents().addBack().filter(function() {\n\t\t\treturn $.css( this, \"visibility\" ) === \"hidden\";\n\t\t}).length;\n}\n\n$.extend( $.expr[ \":\" ], {\n\tdata: $.expr.createPseudo ?\n\t\t$.expr.createPseudo(function( dataName ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn !!$.data( elem, dataName );\n\t\t\t};\n\t\t}) :\n\t\t// support: jQuery <1.8\n\t\tfunction( elem, i, match ) {\n\t\t\treturn !!$.data( elem, match[ 3 ] );\n\t\t},\n\n\tfocusable: function( element ) {\n\t\treturn focusable( element, !isNaN( $.attr( element, \"tabindex\" ) ) );\n\t},\n\n\ttabbable: function( element ) {\n\t\tvar tabIndex = $.attr( element, \"tabindex\" ),\n\t\t\tisTabIndexNaN = isNaN( tabIndex );\n\t\treturn ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );\n\t}\n});\n\n// support: jQuery <1.8\nif ( !$( \"<a>\" ).outerWidth( 1 ).jquery ) {\n\t$.each( [ \"Width\", \"Height\" ], function( i, name ) {\n\t\tvar side = name === \"Width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ],\n\t\t\ttype = name.toLowerCase(),\n\t\t\torig = {\n\t\t\t\tinnerWidth: $.fn.innerWidth,\n\t\t\t\tinnerHeight: $.fn.innerHeight,\n\t\t\t\touterWidth: $.fn.outerWidth,\n\t\t\t\touterHeight: $.fn.outerHeight\n\t\t\t};\n\n\t\tfunction reduce( elem, size, border, margin ) {\n\t\t\t$.each( side, function() {\n\t\t\t\tsize -= parseFloat( $.css( elem, \"padding\" + this ) ) || 0;\n\t\t\t\tif ( border ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"border\" + this + \"Width\" ) ) || 0;\n\t\t\t\t}\n\t\t\t\tif ( margin ) {\n\t\t\t\t\tsize -= parseFloat( $.css( elem, \"margin\" + this ) ) || 0;\n\t\t\t\t}\n\t\t\t});\n\t\t\treturn size;\n\t\t}\n\n\t\t$.fn[ \"inner\" + name ] = function( size ) {\n\t\t\tif ( size === undefined ) {\n\t\t\t\treturn orig[ \"inner\" + name ].call( this );\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\t$( this ).css( type, reduce( this, size ) + \"px\" );\n\t\t\t});\n\t\t};\n\n\t\t$.fn[ \"outer\" + name] = function( size, margin ) {\n\t\t\tif ( typeof size !== \"number\" ) {\n\t\t\t\treturn orig[ \"outer\" + name ].call( this, size );\n\t\t\t}\n\n\t\t\treturn this.each(function() {\n\t\t\t\t$( this).css( type, reduce( this, size, true, margin ) + \"px\" );\n\t\t\t});\n\t\t};\n\t});\n}\n\n// support: jQuery <1.8\nif ( !$.fn.addBack ) {\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)\nif ( $( \"<a>\" ).data( \"a-b\", \"a\" ).removeData( \"a-b\" ).data( \"a-b\" ) ) {\n\t$.fn.removeData = (function( removeData ) {\n\t\treturn function( key ) {\n\t\t\tif ( arguments.length ) {\n\t\t\t\treturn removeData.call( this, $.camelCase( key ) );\n\t\t\t} else {\n\t\t\t\treturn removeData.call( this );\n\t\t\t}\n\t\t};\n\t})( $.fn.removeData );\n}\n\n\n\n\n\n// deprecated\n$.ui.ie = !!/msie [\\w.]+/.exec( navigator.userAgent.toLowerCase() );\n\n$.support.selectstart = \"onselectstart\" in document.createElement( \"div\" );\n$.fn.extend({\n\tdisableSelection: function() {\n\t\treturn this.bind( ( $.support.selectstart ? \"selectstart\" : \"mousedown\" ) +\n\t\t\t\".ui-disableSelection\", function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t});\n\t},\n\n\tenableSelection: function() {\n\t\treturn this.unbind( \".ui-disableSelection\" );\n\t}\n});\n\n$.extend( $.ui, {\n\t// $.ui.plugin is deprecated. Use $.widget() extensions instead.\n\tplugin: {\n\t\tadd: function( module, option, set ) {\n\t\t\tvar i,\n\t\t\t\tproto = $.ui[ module ].prototype;\n\t\t\tfor ( i in set ) {\n\t\t\t\tproto.plugins[ i ] = proto.plugins[ i ] || [];\n\t\t\t\tproto.plugins[ i ].push( [ option, set[ i ] ] );\n\t\t\t}\n\t\t},\n\t\tcall: function( instance, name, args ) {\n\t\t\tvar i,\n\t\t\t\tset = instance.plugins[ name ];\n\t\t\tif ( !set || !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tfor ( i = 0; i < set.length; i++ ) {\n\t\t\t\tif ( instance.options[ set[ i ][ 0 ] ] ) {\n\t\t\t\t\tset[ i ][ 1 ].apply( instance.element, args );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// only used by resizable\n\thasScroll: function( el, a ) {\n\n\t\t//If overflow is hidden, the element might have extra content, but the user wants to hide it\n\t\tif ( $( el ).css( \"overflow\" ) === \"hidden\") {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar scroll = ( a && a === \"left\" ) ? \"scrollLeft\" : \"scrollTop\",\n\t\t\thas = false;\n\n\t\tif ( el[ scroll ] > 0 ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: determine which cases actually cause this to happen\n\t\t// if the element doesn't have the scroll set, see if it's possible to\n\t\t// set the scroll\n\t\tel[ scroll ] = 1;\n\t\thas = ( el[ scroll ] > 0 );\n\t\tel[ scroll ] = 0;\n\t\treturn has;\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\nvar uuid = 0,\n\tslice = Array.prototype.slice,\n\t_cleanData = $.cleanData;\n$.cleanData = function( elems ) {\n\tfor ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\n\t\ttry {\n\t\t\t$( elem ).triggerHandler( \"remove\" );\n\t\t// http://bugs.jquery.com/ticket/8235\n\t\t} catch( e ) {}\n\t}\n\t_cleanData( elems );\n};\n\n$.widget = function( name, base, prototype ) {\n\tvar fullName, existingConstructor, constructor, basePrototype,\n\t\t// proxiedPrototype allows the provided prototype to remain unmodified\n\t\t// so that it can be used as a mixin for multiple widgets (#8876)\n\t\tproxiedPrototype = {},\n\t\tnamespace = name.split( \".\" )[ 0 ];\n\n\tname = name.split( \".\" )[ 1 ];\n\tfullName = namespace + \"-\" + name;\n\n\tif ( !prototype ) {\n\t\tprototype = base;\n\t\tbase = $.Widget;\n\t}\n\n\t// create selector for plugin\n\t$.expr[ \":\" ][ fullName.toLowerCase() ] = function( elem ) {\n\t\treturn !!$.data( elem, fullName );\n\t};\n\n\t$[ namespace ] = $[ namespace ] || {};\n\texistingConstructor = $[ namespace ][ name ];\n\tconstructor = $[ namespace ][ name ] = function( options, element ) {\n\t\t// allow instantiation without \"new\" keyword\n\t\tif ( !this._createWidget ) {\n\t\t\treturn new constructor( options, element );\n\t\t}\n\n\t\t// allow instantiation without initializing for simple inheritance\n\t\t// must use \"new\" keyword (the code above always passes args)\n\t\tif ( arguments.length ) {\n\t\t\tthis._createWidget( options, element );\n\t\t}\n\t};\n\t// extend with the existing constructor to carry over any static properties\n\t$.extend( constructor, existingConstructor, {\n\t\tversion: prototype.version,\n\t\t// copy the object used to create the prototype in case we need to\n\t\t// redefine the widget later\n\t\t_proto: $.extend( {}, prototype ),\n\t\t// track widgets that inherit from this widget in case this widget is\n\t\t// redefined after a widget inherits from it\n\t\t_childConstructors: []\n\t});\n\n\tbasePrototype = new base();\n\t// we need to make the options hash a property directly on the new instance\n\t// otherwise we'll modify the options hash on the prototype that we're\n\t// inheriting from\n\tbasePrototype.options = $.widget.extend( {}, basePrototype.options );\n\t$.each( prototype, function( prop, value ) {\n\t\tif ( !$.isFunction( value ) ) {\n\t\t\tproxiedPrototype[ prop ] = value;\n\t\t\treturn;\n\t\t}\n\t\tproxiedPrototype[ prop ] = (function() {\n\t\t\tvar _super = function() {\n\t\t\t\t\treturn base.prototype[ prop ].apply( this, arguments );\n\t\t\t\t},\n\t\t\t\t_superApply = function( args ) {\n\t\t\t\t\treturn base.prototype[ prop ].apply( this, args );\n\t\t\t\t};\n\t\t\treturn function() {\n\t\t\t\tvar __super = this._super,\n\t\t\t\t\t__superApply = this._superApply,\n\t\t\t\t\treturnValue;\n\n\t\t\t\tthis._super = _super;\n\t\t\t\tthis._superApply = _superApply;\n\n\t\t\t\treturnValue = value.apply( this, arguments );\n\n\t\t\t\tthis._super = __super;\n\t\t\t\tthis._superApply = __superApply;\n\n\t\t\t\treturn returnValue;\n\t\t\t};\n\t\t})();\n\t});\n\tconstructor.prototype = $.widget.extend( basePrototype, {\n\t\t// TODO: remove support for widgetEventPrefix\n\t\t// always use the name + a colon as the prefix, e.g., draggable:start\n\t\t// don't prefix for widgets that aren't DOM-based\n\t\twidgetEventPrefix: existingConstructor ? basePrototype.widgetEventPrefix : name\n\t}, proxiedPrototype, {\n\t\tconstructor: constructor,\n\t\tnamespace: namespace,\n\t\twidgetName: name,\n\t\twidgetFullName: fullName\n\t});\n\n\t// If this widget is being redefined then we need to find all widgets that\n\t// are inheriting from it and redefine all of them so that they inherit from\n\t// the new version of this widget. We're essentially trying to replace one\n\t// level in the prototype chain.\n\tif ( existingConstructor ) {\n\t\t$.each( existingConstructor._childConstructors, function( i, child ) {\n\t\t\tvar childPrototype = child.prototype;\n\n\t\t\t// redefine the child widget using the same prototype that was\n\t\t\t// originally used, but inherit from the new version of the base\n\t\t\t$.widget( childPrototype.namespace + \".\" + childPrototype.widgetName, constructor, child._proto );\n\t\t});\n\t\t// remove the list of existing child constructors from the old constructor\n\t\t// so the old child constructors can be garbage collected\n\t\tdelete existingConstructor._childConstructors;\n\t} else {\n\t\tbase._childConstructors.push( constructor );\n\t}\n\n\t$.widget.bridge( name, constructor );\n};\n\n$.widget.extend = function( target ) {\n\tvar input = slice.call( arguments, 1 ),\n\t\tinputIndex = 0,\n\t\tinputLength = input.length,\n\t\tkey,\n\t\tvalue;\n\tfor ( ; inputIndex < inputLength; inputIndex++ ) {\n\t\tfor ( key in input[ inputIndex ] ) {\n\t\t\tvalue = input[ inputIndex ][ key ];\n\t\t\tif ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {\n\t\t\t\t// Clone objects\n\t\t\t\tif ( $.isPlainObject( value ) ) {\n\t\t\t\t\ttarget[ key ] = $.isPlainObject( target[ key ] ) ?\n\t\t\t\t\t\t$.widget.extend( {}, target[ key ], value ) :\n\t\t\t\t\t\t// Don't extend strings, arrays, etc. with objects\n\t\t\t\t\t\t$.widget.extend( {}, value );\n\t\t\t\t// Copy everything else by reference\n\t\t\t\t} else {\n\t\t\t\t\ttarget[ key ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn target;\n};\n\n$.widget.bridge = function( name, object ) {\n\tvar fullName = object.prototype.widgetFullName || name;\n\t$.fn[ name ] = function( options ) {\n\t\tvar isMethodCall = typeof options === \"string\",\n\t\t\targs = slice.call( arguments, 1 ),\n\t\t\treturnValue = this;\n\n\t\t// allow multiple hashes to be passed on init\n\t\toptions = !isMethodCall && args.length ?\n\t\t\t$.widget.extend.apply( null, [ options ].concat(args) ) :\n\t\t\toptions;\n\n\t\tif ( isMethodCall ) {\n\t\t\tthis.each(function() {\n\t\t\t\tvar methodValue,\n\t\t\t\t\tinstance = $.data( this, fullName );\n\t\t\t\tif ( !instance ) {\n\t\t\t\t\treturn $.error( \"cannot call methods on \" + name + \" prior to initialization; \" +\n\t\t\t\t\t\t\"attempted to call method '\" + options + \"'\" );\n\t\t\t\t}\n\t\t\t\tif ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === \"_\" ) {\n\t\t\t\t\treturn $.error( \"no such method '\" + options + \"' for \" + name + \" widget instance\" );\n\t\t\t\t}\n\t\t\t\tmethodValue = instance[ options ].apply( instance, args );\n\t\t\t\tif ( methodValue !== instance && methodValue !== undefined ) {\n\t\t\t\t\treturnValue = methodValue && methodValue.jquery ?\n\t\t\t\t\t\treturnValue.pushStack( methodValue.get() ) :\n\t\t\t\t\t\tmethodValue;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.each(function() {\n\t\t\t\tvar instance = $.data( this, fullName );\n\t\t\t\tif ( instance ) {\n\t\t\t\t\tinstance.option( options || {} )._init();\n\t\t\t\t} else {\n\t\t\t\t\t$.data( this, fullName, new object( options, this ) );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\treturn returnValue;\n\t};\n};\n\n$.Widget = function( /* options, element */ ) {};\n$.Widget._childConstructors = [];\n\n$.Widget.prototype = {\n\twidgetName: \"widget\",\n\twidgetEventPrefix: \"\",\n\tdefaultElement: \"<div>\",\n\toptions: {\n\t\tdisabled: false,\n\n\t\t// callbacks\n\t\tcreate: null\n\t},\n\t_createWidget: function( options, element ) {\n\t\telement = $( element || this.defaultElement || this )[ 0 ];\n\t\tthis.element = $( element );\n\t\tthis.uuid = uuid++;\n\t\tthis.eventNamespace = \".\" + this.widgetName + this.uuid;\n\t\tthis.options = $.widget.extend( {},\n\t\t\tthis.options,\n\t\t\tthis._getCreateOptions(),\n\t\t\toptions );\n\n\t\tthis.bindings = $();\n\t\tthis.hoverable = $();\n\t\tthis.focusable = $();\n\n\t\tif ( element !== this ) {\n\t\t\t$.data( element, this.widgetFullName, this );\n\t\t\tthis._on( true, this.element, {\n\t\t\t\tremove: function( event ) {\n\t\t\t\t\tif ( event.target === element ) {\n\t\t\t\t\t\tthis.destroy();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t\tthis.document = $( element.style ?\n\t\t\t\t// element within the document\n\t\t\t\telement.ownerDocument :\n\t\t\t\t// element is window or document\n\t\t\t\telement.document || element );\n\t\t\tthis.window = $( this.document[0].defaultView || this.document[0].parentWindow );\n\t\t}\n\n\t\tthis._create();\n\t\tthis._trigger( \"create\", null, this._getCreateEventData() );\n\t\tthis._init();\n\t},\n\t_getCreateOptions: $.noop,\n\t_getCreateEventData: $.noop,\n\t_create: $.noop,\n\t_init: $.noop,\n\n\tdestroy: function() {\n\t\tthis._destroy();\n\t\t// we can probably remove the unbind calls in 2.0\n\t\t// all event bindings should go through this._on()\n\t\tthis.element\n\t\t\t.unbind( this.eventNamespace )\n\t\t\t// 1.9 BC for #7810\n\t\t\t// TODO remove dual storage\n\t\t\t.removeData( this.widgetName )\n\t\t\t.removeData( this.widgetFullName )\n\t\t\t// support: jquery <1.6.3\n\t\t\t// http://bugs.jquery.com/ticket/9413\n\t\t\t.removeData( $.camelCase( this.widgetFullName ) );\n\t\tthis.widget()\n\t\t\t.unbind( this.eventNamespace )\n\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t.removeClass(\n\t\t\t\tthis.widgetFullName + \"-disabled \" +\n\t\t\t\t\"ui-state-disabled\" );\n\n\t\t// clean up events and states\n\t\tthis.bindings.unbind( this.eventNamespace );\n\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t},\n\t_destroy: $.noop,\n\n\twidget: function() {\n\t\treturn this.element;\n\t},\n\n\toption: function( key, value ) {\n\t\tvar options = key,\n\t\t\tparts,\n\t\t\tcurOption,\n\t\t\ti;\n\n\t\tif ( arguments.length === 0 ) {\n\t\t\t// don't return a reference to the internal hash\n\t\t\treturn $.widget.extend( {}, this.options );\n\t\t}\n\n\t\tif ( typeof key === \"string\" ) {\n\t\t\t// handle nested keys, e.g., \"foo.bar\" => { foo: { bar: ___ } }\n\t\t\toptions = {};\n\t\t\tparts = key.split( \".\" );\n\t\t\tkey = parts.shift();\n\t\t\tif ( parts.length ) {\n\t\t\t\tcurOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );\n\t\t\t\tfor ( i = 0; i < parts.length - 1; i++ ) {\n\t\t\t\t\tcurOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};\n\t\t\t\t\tcurOption = curOption[ parts[ i ] ];\n\t\t\t\t}\n\t\t\t\tkey = parts.pop();\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\treturn curOption[ key ] === undefined ? null : curOption[ key ];\n\t\t\t\t}\n\t\t\t\tcurOption[ key ] = value;\n\t\t\t} else {\n\t\t\t\tif ( value === undefined ) {\n\t\t\t\t\treturn this.options[ key ] === undefined ? null : this.options[ key ];\n\t\t\t\t}\n\t\t\t\toptions[ key ] = value;\n\t\t\t}\n\t\t}\n\n\t\tthis._setOptions( options );\n\n\t\treturn this;\n\t},\n\t_setOptions: function( options ) {\n\t\tvar key;\n\n\t\tfor ( key in options ) {\n\t\t\tthis._setOption( key, options[ key ] );\n\t\t}\n\n\t\treturn this;\n\t},\n\t_setOption: function( key, value ) {\n\t\tthis.options[ key ] = value;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.widget()\n\t\t\t\t.toggleClass( this.widgetFullName + \"-disabled ui-state-disabled\", !!value )\n\t\t\t\t.attr( \"aria-disabled\", value );\n\t\t\tthis.hoverable.removeClass( \"ui-state-hover\" );\n\t\t\tthis.focusable.removeClass( \"ui-state-focus\" );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tenable: function() {\n\t\treturn this._setOption( \"disabled\", false );\n\t},\n\tdisable: function() {\n\t\treturn this._setOption( \"disabled\", true );\n\t},\n\n\t_on: function( suppressDisabledCheck, element, handlers ) {\n\t\tvar delegateElement,\n\t\t\tinstance = this;\n\n\t\t// no suppressDisabledCheck flag, shuffle arguments\n\t\tif ( typeof suppressDisabledCheck !== \"boolean\" ) {\n\t\t\thandlers = element;\n\t\t\telement = suppressDisabledCheck;\n\t\t\tsuppressDisabledCheck = false;\n\t\t}\n\n\t\t// no element argument, shuffle and use this.element\n\t\tif ( !handlers ) {\n\t\t\thandlers = element;\n\t\t\telement = this.element;\n\t\t\tdelegateElement = this.widget();\n\t\t} else {\n\t\t\t// accept selectors, DOM elements\n\t\t\telement = delegateElement = $( element );\n\t\t\tthis.bindings = this.bindings.add( element );\n\t\t}\n\n\t\t$.each( handlers, function( event, handler ) {\n\t\t\tfunction handlerProxy() {\n\t\t\t\t// allow widgets to customize the disabled handling\n\t\t\t\t// - disabled as an array instead of boolean\n\t\t\t\t// - disabled class as method for disabling individual parts\n\t\t\t\tif ( !suppressDisabledCheck &&\n\t\t\t\t\t\t( instance.options.disabled === true ||\n\t\t\t\t\t\t\t$( this ).hasClass( \"ui-state-disabled\" ) ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t\t.apply( instance, arguments );\n\t\t\t}\n\n\t\t\t// copy the guid so direct unbinding works\n\t\t\tif ( typeof handler !== \"string\" ) {\n\t\t\t\thandlerProxy.guid = handler.guid =\n\t\t\t\t\thandler.guid || handlerProxy.guid || $.guid++;\n\t\t\t}\n\n\t\t\tvar match = event.match( /^(\\w+)\\s*(.*)$/ ),\n\t\t\t\teventName = match[1] + instance.eventNamespace,\n\t\t\t\tselector = match[2];\n\t\t\tif ( selector ) {\n\t\t\t\tdelegateElement.delegate( selector, eventName, handlerProxy );\n\t\t\t} else {\n\t\t\t\telement.bind( eventName, handlerProxy );\n\t\t\t}\n\t\t});\n\t},\n\n\t_off: function( element, eventName ) {\n\t\teventName = (eventName || \"\").split( \" \" ).join( this.eventNamespace + \" \" ) + this.eventNamespace;\n\t\telement.unbind( eventName ).undelegate( eventName );\n\t},\n\n\t_delay: function( handler, delay ) {\n\t\tfunction handlerProxy() {\n\t\t\treturn ( typeof handler === \"string\" ? instance[ handler ] : handler )\n\t\t\t\t.apply( instance, arguments );\n\t\t}\n\t\tvar instance = this;\n\t\treturn setTimeout( handlerProxy, delay || 0 );\n\t},\n\n\t_hoverable: function( element ) {\n\t\tthis.hoverable = this.hoverable.add( element );\n\t\tthis._on( element, {\n\t\t\tmouseenter: function( event ) {\n\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-hover\" );\n\t\t\t},\n\t\t\tmouseleave: function( event ) {\n\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-hover\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_focusable: function( element ) {\n\t\tthis.focusable = this.focusable.add( element );\n\t\tthis._on( element, {\n\t\t\tfocusin: function( event ) {\n\t\t\t\t$( event.currentTarget ).addClass( \"ui-state-focus\" );\n\t\t\t},\n\t\t\tfocusout: function( event ) {\n\t\t\t\t$( event.currentTarget ).removeClass( \"ui-state-focus\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_trigger: function( type, event, data ) {\n\t\tvar prop, orig,\n\t\t\tcallback = this.options[ type ];\n\n\t\tdata = data || {};\n\t\tevent = $.Event( event );\n\t\tevent.type = ( type === this.widgetEventPrefix ?\n\t\t\ttype :\n\t\t\tthis.widgetEventPrefix + type ).toLowerCase();\n\t\t// the original event may come from any element\n\t\t// so we need to reset the target on the new event\n\t\tevent.target = this.element[ 0 ];\n\n\t\t// copy original event properties over to the new event\n\t\torig = event.originalEvent;\n\t\tif ( orig ) {\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tif ( !( prop in event ) ) {\n\t\t\t\t\tevent[ prop ] = orig[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.element.trigger( event, data );\n\t\treturn !( $.isFunction( callback ) &&\n\t\t\tcallback.apply( this.element[0], [ event ].concat( data ) ) === false ||\n\t\t\tevent.isDefaultPrevented() );\n\t}\n};\n\n$.each( { show: \"fadeIn\", hide: \"fadeOut\" }, function( method, defaultEffect ) {\n\t$.Widget.prototype[ \"_\" + method ] = function( element, options, callback ) {\n\t\tif ( typeof options === \"string\" ) {\n\t\t\toptions = { effect: options };\n\t\t}\n\t\tvar hasOptions,\n\t\t\teffectName = !options ?\n\t\t\t\tmethod :\n\t\t\t\toptions === true || typeof options === \"number\" ?\n\t\t\t\t\tdefaultEffect :\n\t\t\t\t\toptions.effect || defaultEffect;\n\t\toptions = options || {};\n\t\tif ( typeof options === \"number\" ) {\n\t\t\toptions = { duration: options };\n\t\t}\n\t\thasOptions = !$.isEmptyObject( options );\n\t\toptions.complete = callback;\n\t\tif ( options.delay ) {\n\t\t\telement.delay( options.delay );\n\t\t}\n\t\tif ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {\n\t\t\telement[ method ]( options );\n\t\t} else if ( effectName !== method && element[ effectName ] ) {\n\t\t\telement[ effectName ]( options.duration, options.easing, callback );\n\t\t} else {\n\t\t\telement.queue(function( next ) {\n\t\t\t\t$( this )[ method ]();\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback.call( element[ 0 ] );\n\t\t\t\t}\n\t\t\t\tnext();\n\t\t\t});\n\t\t}\n\t};\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\nvar mouseHandled = false;\n$( document ).mouseup( function() {\n\tmouseHandled = false;\n});\n\n$.widget(\"ui.mouse\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tcancel: \"input,textarea,button,select,option\",\n\t\tdistance: 1,\n\t\tdelay: 0\n\t},\n\t_mouseInit: function() {\n\t\tvar that = this;\n\n\t\tthis.element\n\t\t\t.bind(\"mousedown.\"+this.widgetName, function(event) {\n\t\t\t\treturn that._mouseDown(event);\n\t\t\t})\n\t\t\t.bind(\"click.\"+this.widgetName, function(event) {\n\t\t\t\tif (true === $.data(event.target, that.widgetName + \".preventClickEvent\")) {\n\t\t\t\t\t$.removeData(event.target, that.widgetName + \".preventClickEvent\");\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.started = false;\n\t},\n\n\t// TODO: make sure destroying one instance of mouse doesn't mess with\n\t// other instances of mouse\n\t_mouseDestroy: function() {\n\t\tthis.element.unbind(\".\"+this.widgetName);\n\t\tif ( this._mouseMoveDelegate ) {\n\t\t\t$(document)\n\t\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\t\t}\n\t},\n\n\t_mouseDown: function(event) {\n\t\t// don't let more than one widget handle mouseStart\n\t\tif( mouseHandled ) { return; }\n\n\t\t// we may have missed mouseup (out of window)\n\t\t(this._mouseStarted && this._mouseUp(event));\n\n\t\tthis._mouseDownEvent = event;\n\n\t\tvar that = this,\n\t\t\tbtnIsLeft = (event.which === 1),\n\t\t\t// event.target.nodeName works around a bug in IE 8 with\n\t\t\t// disabled inputs (#7620)\n\t\t\telIsCancel = (typeof this.options.cancel === \"string\" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);\n\t\tif (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.mouseDelayMet = !this.options.delay;\n\t\tif (!this.mouseDelayMet) {\n\t\t\tthis._mouseDelayTimer = setTimeout(function() {\n\t\t\t\tthat.mouseDelayMet = true;\n\t\t\t}, this.options.delay);\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted = (this._mouseStart(event) !== false);\n\t\t\tif (!this._mouseStarted) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Click event may never have fired (Gecko & Opera)\n\t\tif (true === $.data(event.target, this.widgetName + \".preventClickEvent\")) {\n\t\t\t$.removeData(event.target, this.widgetName + \".preventClickEvent\");\n\t\t}\n\n\t\t// these delegates are required to keep context\n\t\tthis._mouseMoveDelegate = function(event) {\n\t\t\treturn that._mouseMove(event);\n\t\t};\n\t\tthis._mouseUpDelegate = function(event) {\n\t\t\treturn that._mouseUp(event);\n\t\t};\n\t\t$(document)\n\t\t\t.bind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.bind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\n\t\tevent.preventDefault();\n\n\t\tmouseHandled = true;\n\t\treturn true;\n\t},\n\n\t_mouseMove: function(event) {\n\t\t// IE mouseup check - mouseup happened when mouse was out of window\n\t\tif ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {\n\t\t\treturn this._mouseUp(event);\n\t\t}\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseDrag(event);\n\t\t\treturn event.preventDefault();\n\t\t}\n\n\t\tif (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {\n\t\t\tthis._mouseStarted =\n\t\t\t\t(this._mouseStart(this._mouseDownEvent, event) !== false);\n\t\t\t(this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));\n\t\t}\n\n\t\treturn !this._mouseStarted;\n\t},\n\n\t_mouseUp: function(event) {\n\t\t$(document)\n\t\t\t.unbind(\"mousemove.\"+this.widgetName, this._mouseMoveDelegate)\n\t\t\t.unbind(\"mouseup.\"+this.widgetName, this._mouseUpDelegate);\n\n\t\tif (this._mouseStarted) {\n\t\t\tthis._mouseStarted = false;\n\n\t\t\tif (event.target === this._mouseDownEvent.target) {\n\t\t\t\t$.data(event.target, this.widgetName + \".preventClickEvent\", true);\n\t\t\t}\n\n\t\t\tthis._mouseStop(event);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseDistanceMet: function(event) {\n\t\treturn (Math.max(\n\t\t\t\tMath.abs(this._mouseDownEvent.pageX - event.pageX),\n\t\t\t\tMath.abs(this._mouseDownEvent.pageY - event.pageY)\n\t\t\t) >= this.options.distance\n\t\t);\n\t},\n\n\t_mouseDelayMet: function(/* event */) {\n\t\treturn this.mouseDelayMet;\n\t},\n\n\t// These are placeholder methods, to be overriden by extending plugin\n\t_mouseStart: function(/* event */) {},\n\t_mouseDrag: function(/* event */) {},\n\t_mouseStop: function(/* event */) {},\n\t_mouseCapture: function(/* event */) { return true; }\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.draggable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"drag\",\n\toptions: {\n\t\taddClasses: true,\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectToSortable: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\tiframeFix: false,\n\t\topacity: false,\n\t\trefreshPositions: false,\n\t\trevert: false,\n\t\trevertDuration: 500,\n\t\tscope: \"default\",\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tsnap: false,\n\t\tsnapMode: \"both\",\n\t\tsnapTolerance: 20,\n\t\tstack: false,\n\t\tzIndex: false,\n\n\t\t// callbacks\n\t\tdrag: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tif (this.options.helper === \"original\" && !(/^(?:r|a|f)/).test(this.element.css(\"position\"))) {\n\t\t\tthis.element[0].style.position = \"relative\";\n\t\t}\n\t\tif (this.options.addClasses){\n\t\t\tthis.element.addClass(\"ui-draggable\");\n\t\t}\n\t\tif (this.options.disabled){\n\t\t\tthis.element.addClass(\"ui-draggable-disabled\");\n\t\t}\n\n\t\tthis._mouseInit();\n\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeClass( \"ui-draggable ui-draggable-dragging ui-draggable-disabled\" );\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function(event) {\n\n\t\tvar o = this.options;\n\n\t\t// among others, prevent a drag on a resizable-handle\n\t\tif (this.helper || o.disabled || $(event.target).closest(\".ui-resizable-handle\").length > 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//Quit if we're not on a valid handle\n\t\tthis.handle = this._getHandle(event);\n\t\tif (!this.handle) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$(o.iframeFix === true ? \"iframe\" : o.iframeFix).each(function() {\n\t\t\t$(\"<div class='ui-draggable-iframeFix' style='background: #fff;'></div>\")\n\t\t\t.css({\n\t\t\t\twidth: this.offsetWidth+\"px\", height: this.offsetHeight+\"px\",\n\t\t\t\tposition: \"absolute\", opacity: \"0.001\", zIndex: 1000\n\t\t\t})\n\t\t\t.css($(this).offset())\n\t\t\t.appendTo(\"body\");\n\t\t});\n\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar o = this.options;\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\tthis.helper.addClass(\"ui-draggable-dragging\");\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//If ddmanager is used for droppables, set the global draggable\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Store the helper's css position\n\t\tthis.cssPosition = this.helper.css( \"position\" );\n\t\tthis.scrollParent = this.helper.scrollParent();\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tthis.offsetParentCssPosition = this.offsetParent.css( \"position\" );\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.positionAbs = this.element.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t//Reset scroll cache\n\t\tthis.offset.scroll = false;\n\n\t\t$.extend(this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t});\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this.position = this._generatePosition(event);\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\n\t\t//Set a containment if given in the options\n\t\tthis._setContainment();\n\n\t\t//Trigger event + callbacks\n\t\tif(this._trigger(\"start\", event) === false) {\n\t\t\tthis._clear();\n\t\t\treturn false;\n\t\t}\n\n\t\t//Recache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t//Prepare the droppable offsets\n\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t}\n\n\n\t\tthis._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003)\n\t\tif ( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStart(this, event);\n\t\t}\n\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function(event, noPropagation) {\n\t\t// reset any necessary cached properties (see #5009)\n\t\tif ( this.offsetParentCssPosition === \"fixed\" ) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition(event);\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Call plugins and callbacks and use the resulting position if something is returned\n\t\tif (!noPropagation) {\n\t\t\tvar ui = this._uiHash();\n\t\t\tif(this._trigger(\"drag\", event, ui) === false) {\n\t\t\t\tthis._mouseUp({});\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.position = ui.position;\n\t\t}\n\n\t\tif(!this.options.axis || this.options.axis !== \"y\") {\n\t\t\tthis.helper[0].style.left = this.position.left+\"px\";\n\t\t}\n\t\tif(!this.options.axis || this.options.axis !== \"x\") {\n\t\t\tthis.helper[0].style.top = this.position.top+\"px\";\n\t\t}\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tvar that = this,\n\t\t\tdropped = false;\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\tdropped = $.ui.ddmanager.drop(this, event);\n\t\t}\n\n\t\t//if a drop comes from outside (a sortable)\n\t\tif(this.dropped) {\n\t\t\tdropped = this.dropped;\n\t\t\tthis.dropped = false;\n\t\t}\n\n\t\t//if the original element is no longer in the DOM don't bother to continue (see #8269)\n\t\tif ( this.options.helper === \"original\" && !$.contains( this.element[ 0 ].ownerDocument, this.element[ 0 ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif((this.options.revert === \"invalid\" && !dropped) || (this.options.revert === \"valid\" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) {\n\t\t\t$(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() {\n\t\t\t\tif(that._trigger(\"stop\", event) !== false) {\n\t\t\t\t\tthat._clear();\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tif(this._trigger(\"stop\", event) !== false) {\n\t\t\t\tthis._clear();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseUp: function(event) {\n\t\t//Remove frame helpers\n\t\t$(\"div.ui-draggable-iframeFix\").each(function() {\n\t\t\tthis.parentNode.removeChild(this);\n\t\t});\n\n\t\t//If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003)\n\t\tif( $.ui.ddmanager ) {\n\t\t\t$.ui.ddmanager.dragStop(this, event);\n\t\t}\n\n\t\treturn $.ui.mouse.prototype._mouseUp.call(this, event);\n\t},\n\n\tcancel: function() {\n\n\t\tif(this.helper.is(\".ui-draggable-dragging\")) {\n\t\t\tthis._mouseUp({});\n\t\t} else {\n\t\t\tthis._clear();\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\t_getHandle: function(event) {\n\t\treturn this.options.handle ?\n\t\t\t!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :\n\t\t\ttrue;\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options,\n\t\t\thelper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event])) : (o.helper === \"clone\" ? this.element.clone().removeAttr(\"id\") : this.element);\n\n\t\tif(!helper.parents(\"body\").length) {\n\t\t\thelper.appendTo((o.appendTo === \"parent\" ? this.element[0].parentNode : o.appendTo));\n\t\t}\n\n\t\tif(helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css(\"position\"))) {\n\t\t\thelper.css(\"position\", \"absolute\");\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function(obj) {\n\t\tif (typeof obj === \"string\") {\n\t\t\tobj = obj.split(\" \");\n\t\t}\n\t\tif ($.isArray(obj)) {\n\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t}\n\t\tif (\"left\" in obj) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif (\"right\" in obj) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif (\"top\" in obj) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif (\"bottom\" in obj) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\t\t//Get the offsetParent and cache its position\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\tif(this.cssPosition === \"absolute\" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t//This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t//Ugly IE fix\n\t\tif((this.offsetParent[0] === document.body) ||\n\t\t\t(this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie)) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif(this.cssPosition === \"relative\") {\n\t\t\tvar p = this.element.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.element.css(\"marginLeft\"),10) || 0),\n\t\t\ttop: (parseInt(this.element.css(\"marginTop\"),10) || 0),\n\t\t\tright: (parseInt(this.element.css(\"marginRight\"),10) || 0),\n\t\t\tbottom: (parseInt(this.element.css(\"marginBottom\"),10) || 0)\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar over, c, ce,\n\t\t\to = this.options;\n\n\t\tif ( !o.containment ) {\n\t\t\tthis.containment = null;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"window\" ) {\n\t\t\tthis.containment = [\n\t\t\t\t$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t$( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"document\") {\n\t\t\tthis.containment = [\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t\t$( document ).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment.constructor === Array ) {\n\t\t\tthis.containment = o.containment;\n\t\t\treturn;\n\t\t}\n\n\t\tif ( o.containment === \"parent\" ) {\n\t\t\to.containment = this.helper[ 0 ].parentNode;\n\t\t}\n\n\t\tc = $( o.containment );\n\t\tce = c[ 0 ];\n\n\t\tif( !ce ) {\n\t\t\treturn;\n\t\t}\n\n\t\tover = c.css( \"overflow\" ) !== \"hidden\";\n\n\t\tthis.containment = [\n\t\t\t( parseInt( c.css( \"borderLeftWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingLeft\" ), 10 ) || 0 ),\n\t\t\t( parseInt( c.css( \"borderTopWidth\" ), 10 ) || 0 ) + ( parseInt( c.css( \"paddingTop\" ), 10 ) || 0 ) ,\n\t\t\t( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - ( parseInt( c.css( \"borderRightWidth\" ), 10 ) || 0 ) - ( parseInt( c.css( \"paddingRight\" ), 10 ) || 0 ) - this.helperProportions.width - this.margins.left - this.margins.right,\n\t\t\t( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - ( parseInt( c.css( \"borderBottomWidth\" ), 10 ) || 0 ) - ( parseInt( c.css( \"paddingBottom\" ), 10 ) || 0 ) - this.helperProportions.height - this.margins.top  - this.margins.bottom\n\t\t];\n\t\tthis.relative_container = c;\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif(!pos) {\n\t\t\tpos = this.position;\n\t\t}\n\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent;\n\n\t\t//Cache the scroll\n\t\tif (!this.offset.scroll) {\n\t\t\tthis.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpos.top\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.top * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top * mod -\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : this.offset.scroll.top ) * mod )\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpos.left +\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.left * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left * mod\t-\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left ) * mod )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function(event) {\n\n\t\tvar containment, co, top, left,\n\t\t\to = this.options,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !( this.scrollParent[ 0 ] !== document && $.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ? this.offsetParent : this.scrollParent,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY;\n\n\t\t//Cache the scroll\n\t\tif (!this.offset.scroll) {\n\t\t\tthis.offset.scroll = {top : scroll.scrollTop(), left : scroll.scrollLeft()};\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\t// If we are not dragging yet, we won't check for options\n\t\tif ( this.originalPosition ) {\n\t\t\tif ( this.containment ) {\n\t\t\t\tif ( this.relative_container ){\n\t\t\t\t\tco = this.relative_container.offset();\n\t\t\t\t\tcontainment = [\n\t\t\t\t\t\tthis.containment[ 0 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 1 ] + co.top,\n\t\t\t\t\t\tthis.containment[ 2 ] + co.left,\n\t\t\t\t\t\tthis.containment[ 3 ] + co.top\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tcontainment = this.containment;\n\t\t\t\t}\n\n\t\t\t\tif(event.pageX - this.offset.click.left < containment[0]) {\n\t\t\t\t\tpageX = containment[0] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top < containment[1]) {\n\t\t\t\t\tpageY = containment[1] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif(event.pageX - this.offset.click.left > containment[2]) {\n\t\t\t\t\tpageX = containment[2] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top > containment[3]) {\n\t\t\t\t\tpageY = containment[3] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(o.grid) {\n\t\t\t\t//Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950)\n\t\t\t\ttop = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY;\n\t\t\t\tpageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tleft = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX;\n\t\t\t\tpageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpageY -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.top\t-\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.top -\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : this.offset.scroll.top )\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpageX -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.left -\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.left -\t\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : this.offset.scroll.left )\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_clear: function() {\n\t\tthis.helper.removeClass(\"ui-draggable-dragging\");\n\t\tif(this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\t\tthis.cancelHelperRemoval = false;\n\t},\n\n\t// From now on bulk stuff - mainly helpers\n\n\t_trigger: function(type, event, ui) {\n\t\tui = ui || this._uiHash();\n\t\t$.ui.plugin.call(this, type, [event, ui]);\n\t\t//The absolute position has to be recalculated after plugins\n\t\tif(type === \"drag\") {\n\t\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\t\t}\n\t\treturn $.Widget.prototype._trigger.call(this, type, event, ui);\n\t},\n\n\tplugins: {},\n\n\t_uiHash: function() {\n\t\treturn {\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\toriginalPosition: this.originalPosition,\n\t\t\toffset: this.positionAbs\n\t\t};\n\t}\n\n});\n\n$.ui.plugin.add(\"draggable\", \"connectToSortable\", {\n\tstart: function(event, ui) {\n\n\t\tvar inst = $(this).data(\"ui-draggable\"), o = inst.options,\n\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\t\tinst.sortables = [];\n\t\t$(o.connectToSortable).each(function() {\n\t\t\tvar sortable = $.data(this, \"ui-sortable\");\n\t\t\tif (sortable && !sortable.options.disabled) {\n\t\t\t\tinst.sortables.push({\n\t\t\t\t\tinstance: sortable,\n\t\t\t\t\tshouldRevert: sortable.options.revert\n\t\t\t\t});\n\t\t\t\tsortable.refreshPositions();\t// Call the sortable's refreshPositions at drag start to refresh the containerCache since the sortable container cache is used in drag and needs to be up to date (this will ensure it's initialised as well as being kept in step with any changes that might have happened on the page).\n\t\t\t\tsortable._trigger(\"activate\", event, uiSortable);\n\t\t\t}\n\t\t});\n\n\t},\n\tstop: function(event, ui) {\n\n\t\t//If we are still over the sortable, we fake the stop event of the sortable, but also remove helper\n\t\tvar inst = $(this).data(\"ui-draggable\"),\n\t\t\tuiSortable = $.extend({}, ui, { item: inst.element });\n\n\t\t$.each(inst.sortables, function() {\n\t\t\tif(this.instance.isOver) {\n\n\t\t\t\tthis.instance.isOver = 0;\n\n\t\t\t\tinst.cancelHelperRemoval = true; //Don't remove the helper in the draggable instance\n\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove it in the sortable instance (so sortable plugins like revert still work)\n\n\t\t\t\t//The sortable revert is supported, and we have to set a temporary dropped variable on the draggable to support revert: \"valid/invalid\"\n\t\t\t\tif(this.shouldRevert) {\n\t\t\t\t\tthis.instance.options.revert = this.shouldRevert;\n\t\t\t\t}\n\n\t\t\t\t//Trigger the stop of the sortable\n\t\t\t\tthis.instance._mouseStop(event);\n\n\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\n\t\t\t\t//If the helper has been the original item, restore properties in the sortable\n\t\t\t\tif(inst.options.helper === \"original\") {\n\t\t\t\t\tthis.instance.currentItem.css({ top: \"auto\", left: \"auto\" });\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tthis.instance.cancelHelperRemoval = false; //Remove the helper in the sortable instance\n\t\t\t\tthis.instance._trigger(\"deactivate\", event, uiSortable);\n\t\t\t}\n\n\t\t});\n\n\t},\n\tdrag: function(event, ui) {\n\n\t\tvar inst = $(this).data(\"ui-draggable\"), that = this;\n\n\t\t$.each(inst.sortables, function() {\n\n\t\t\tvar innermostIntersecting = false,\n\t\t\t\tthisSortable = this;\n\n\t\t\t//Copy over some variables to allow calling the sortable's native _intersectsWith\n\t\t\tthis.instance.positionAbs = inst.positionAbs;\n\t\t\tthis.instance.helperProportions = inst.helperProportions;\n\t\t\tthis.instance.offset.click = inst.offset.click;\n\n\t\t\tif(this.instance._intersectsWith(this.instance.containerCache)) {\n\t\t\t\tinnermostIntersecting = true;\n\t\t\t\t$.each(inst.sortables, function () {\n\t\t\t\t\tthis.instance.positionAbs = inst.positionAbs;\n\t\t\t\t\tthis.instance.helperProportions = inst.helperProportions;\n\t\t\t\t\tthis.instance.offset.click = inst.offset.click;\n\t\t\t\t\tif (this !== thisSortable &&\n\t\t\t\t\t\tthis.instance._intersectsWith(this.instance.containerCache) &&\n\t\t\t\t\t\t$.contains(thisSortable.instance.element[0], this.instance.element[0])\n\t\t\t\t\t) {\n\t\t\t\t\t\tinnermostIntersecting = false;\n\t\t\t\t\t}\n\t\t\t\t\treturn innermostIntersecting;\n\t\t\t\t});\n\t\t\t}\n\n\n\t\t\tif(innermostIntersecting) {\n\t\t\t\t//If it intersects, we use a little isOver variable and set it once, so our move-in stuff gets fired only once\n\t\t\t\tif(!this.instance.isOver) {\n\n\t\t\t\t\tthis.instance.isOver = 1;\n\t\t\t\t\t//Now we fake the start of dragging for the sortable instance,\n\t\t\t\t\t//by cloning the list group item, appending it to the sortable and using it as inst.currentItem\n\t\t\t\t\t//We can then fire the start event of the sortable with our passed browser event, and our own helper (so it doesn't create a new one)\n\t\t\t\t\tthis.instance.currentItem = $(that).clone().removeAttr(\"id\").appendTo(this.instance.element).data(\"ui-sortable-item\", true);\n\t\t\t\t\tthis.instance.options._helper = this.instance.options.helper; //Store helper option to later restore it\n\t\t\t\t\tthis.instance.options.helper = function() { return ui.helper[0]; };\n\n\t\t\t\t\tevent.target = this.instance.currentItem[0];\n\t\t\t\t\tthis.instance._mouseCapture(event, true);\n\t\t\t\t\tthis.instance._mouseStart(event, true, true);\n\n\t\t\t\t\t//Because the browser event is way off the new appended portlet, we modify a couple of variables to reflect the changes\n\t\t\t\t\tthis.instance.offset.click.top = inst.offset.click.top;\n\t\t\t\t\tthis.instance.offset.click.left = inst.offset.click.left;\n\t\t\t\t\tthis.instance.offset.parent.left -= inst.offset.parent.left - this.instance.offset.parent.left;\n\t\t\t\t\tthis.instance.offset.parent.top -= inst.offset.parent.top - this.instance.offset.parent.top;\n\n\t\t\t\t\tinst._trigger(\"toSortable\", event);\n\t\t\t\t\tinst.dropped = this.instance.element; //draggable revert needs that\n\t\t\t\t\t//hack so receive/update callbacks work (mostly)\n\t\t\t\t\tinst.currentItem = inst.element;\n\t\t\t\t\tthis.instance.fromOutside = inst;\n\n\t\t\t\t}\n\n\t\t\t\t//Provided we did all the previous steps, we can fire the drag event of the sortable on every draggable drag, when it intersects with the sortable\n\t\t\t\tif(this.instance.currentItem) {\n\t\t\t\t\tthis.instance._mouseDrag(event);\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t//If it doesn't intersect with the sortable, and it intersected before,\n\t\t\t\t//we fake the drag stop of the sortable, but make sure it doesn't remove the helper by using cancelHelperRemoval\n\t\t\t\tif(this.instance.isOver) {\n\n\t\t\t\t\tthis.instance.isOver = 0;\n\t\t\t\t\tthis.instance.cancelHelperRemoval = true;\n\n\t\t\t\t\t//Prevent reverting on this forced stop\n\t\t\t\t\tthis.instance.options.revert = false;\n\n\t\t\t\t\t// The out event needs to be triggered independently\n\t\t\t\t\tthis.instance._trigger(\"out\", event, this.instance._uiHash(this.instance));\n\n\t\t\t\t\tthis.instance._mouseStop(event, true);\n\t\t\t\t\tthis.instance.options.helper = this.instance.options._helper;\n\n\t\t\t\t\t//Now we remove our currentItem, the list group clone again, and the placeholder, and animate the helper back to it's original size\n\t\t\t\t\tthis.instance.currentItem.remove();\n\t\t\t\t\tif(this.instance.placeholder) {\n\t\t\t\t\t\tthis.instance.placeholder.remove();\n\t\t\t\t\t}\n\n\t\t\t\t\tinst._trigger(\"fromSortable\", event);\n\t\t\t\t\tinst.dropped = false; //draggable revert needs that\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t});\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"cursor\", {\n\tstart: function() {\n\t\tvar t = $(\"body\"), o = $(this).data(\"ui-draggable\").options;\n\t\tif (t.css(\"cursor\")) {\n\t\t\to._cursor = t.css(\"cursor\");\n\t\t}\n\t\tt.css(\"cursor\", o.cursor);\n\t},\n\tstop: function() {\n\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\tif (o._cursor) {\n\t\t\t$(\"body\").css(\"cursor\", o._cursor);\n\t\t}\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"opacity\", {\n\tstart: function(event, ui) {\n\t\tvar t = $(ui.helper), o = $(this).data(\"ui-draggable\").options;\n\t\tif(t.css(\"opacity\")) {\n\t\t\to._opacity = t.css(\"opacity\");\n\t\t}\n\t\tt.css(\"opacity\", o.opacity);\n\t},\n\tstop: function(event, ui) {\n\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\tif(o._opacity) {\n\t\t\t$(ui.helper).css(\"opacity\", o._opacity);\n\t\t}\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"scroll\", {\n\tstart: function() {\n\t\tvar i = $(this).data(\"ui-draggable\");\n\t\tif(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== \"HTML\") {\n\t\t\ti.overflowOffset = i.scrollParent.offset();\n\t\t}\n\t},\n\tdrag: function( event ) {\n\n\t\tvar i = $(this).data(\"ui-draggable\"), o = i.options, scrolled = false;\n\n\t\tif(i.scrollParent[0] !== document && i.scrollParent[0].tagName !== \"HTML\") {\n\n\t\t\tif(!o.axis || o.axis !== \"x\") {\n\t\t\t\tif((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\t} else if(event.pageY - i.overflowOffset.top < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!o.axis || o.axis !== \"y\") {\n\t\t\t\tif((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if(event.pageX - i.overflowOffset.left < o.scrollSensitivity) {\n\t\t\t\t\ti.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tif(!o.axis || o.axis !== \"x\") {\n\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\t} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!o.axis || o.axis !== \"y\") {\n\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\t} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(i, event);\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"snap\", {\n\tstart: function() {\n\n\t\tvar i = $(this).data(\"ui-draggable\"),\n\t\t\to = i.options;\n\n\t\ti.snapElements = [];\n\n\t\t$(o.snap.constructor !== String ? ( o.snap.items || \":data(ui-draggable)\" ) : o.snap).each(function() {\n\t\t\tvar $t = $(this),\n\t\t\t\t$o = $t.offset();\n\t\t\tif(this !== i.element[0]) {\n\t\t\t\ti.snapElements.push({\n\t\t\t\t\titem: this,\n\t\t\t\t\twidth: $t.outerWidth(), height: $t.outerHeight(),\n\t\t\t\t\ttop: $o.top, left: $o.left\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t},\n\tdrag: function(event, ui) {\n\n\t\tvar ts, bs, ls, rs, l, r, t, b, i, first,\n\t\t\tinst = $(this).data(\"ui-draggable\"),\n\t\t\to = inst.options,\n\t\t\td = o.snapTolerance,\n\t\t\tx1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,\n\t\t\ty1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;\n\n\t\tfor (i = inst.snapElements.length - 1; i >= 0; i--){\n\n\t\t\tl = inst.snapElements[i].left;\n\t\t\tr = l + inst.snapElements[i].width;\n\t\t\tt = inst.snapElements[i].top;\n\t\t\tb = t + inst.snapElements[i].height;\n\n\t\t\tif ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) {\n\t\t\t\tif(inst.snapElements[i].snapping) {\n\t\t\t\t\t(inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t\t}\n\t\t\t\tinst.snapElements[i].snapping = false;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(o.snapMode !== \"inner\") {\n\t\t\t\tts = Math.abs(t - y2) <= d;\n\t\t\t\tbs = Math.abs(b - y1) <= d;\n\t\t\t\tls = Math.abs(l - x2) <= d;\n\t\t\t\trs = Math.abs(r - x1) <= d;\n\t\t\t\tif(ts) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(bs) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(ls) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t\tif(rs) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfirst = (ts || bs || ls || rs);\n\n\t\t\tif(o.snapMode !== \"outer\") {\n\t\t\t\tts = Math.abs(t - y1) <= d;\n\t\t\t\tbs = Math.abs(b - y2) <= d;\n\t\t\t\tls = Math.abs(l - x1) <= d;\n\t\t\t\trs = Math.abs(r - x2) <= d;\n\t\t\t\tif(ts) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: t, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(bs) {\n\t\t\t\t\tui.position.top = inst._convertPositionTo(\"relative\", { top: b - inst.helperProportions.height, left: 0 }).top - inst.margins.top;\n\t\t\t\t}\n\t\t\t\tif(ls) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: l }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t\tif(rs) {\n\t\t\t\t\tui.position.left = inst._convertPositionTo(\"relative\", { top: 0, left: r - inst.helperProportions.width }).left - inst.margins.left;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) {\n\t\t\t\t(inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item })));\n\t\t\t}\n\t\t\tinst.snapElements[i].snapping = (ts || bs || ls || rs || first);\n\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"stack\", {\n\tstart: function() {\n\t\tvar min,\n\t\t\to = this.data(\"ui-draggable\").options,\n\t\t\tgroup = $.makeArray($(o.stack)).sort(function(a,b) {\n\t\t\t\treturn (parseInt($(a).css(\"zIndex\"),10) || 0) - (parseInt($(b).css(\"zIndex\"),10) || 0);\n\t\t\t});\n\n\t\tif (!group.length) { return; }\n\n\t\tmin = parseInt($(group[0]).css(\"zIndex\"), 10) || 0;\n\t\t$(group).each(function(i) {\n\t\t\t$(this).css(\"zIndex\", min + i);\n\t\t});\n\t\tthis.css(\"zIndex\", (min + group.length));\n\t}\n});\n\n$.ui.plugin.add(\"draggable\", \"zIndex\", {\n\tstart: function(event, ui) {\n\t\tvar t = $(ui.helper), o = $(this).data(\"ui-draggable\").options;\n\t\tif(t.css(\"zIndex\")) {\n\t\t\to._zIndex = t.css(\"zIndex\");\n\t\t}\n\t\tt.css(\"zIndex\", o.zIndex);\n\t},\n\tstop: function(event, ui) {\n\t\tvar o = $(this).data(\"ui-draggable\").options;\n\t\tif(o._zIndex) {\n\t\t\t$(ui.helper).css(\"zIndex\", o._zIndex);\n\t\t}\n\t}\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nfunction isOverAxis( x, reference, size ) {\n\treturn ( x > reference ) && ( x < ( reference + size ) );\n}\n\n$.widget(\"ui.droppable\", {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"drop\",\n\toptions: {\n\t\taccept: \"*\",\n\t\tactiveClass: false,\n\t\taddClasses: true,\n\t\tgreedy: false,\n\t\thoverClass: false,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tdeactivate: null,\n\t\tdrop: null,\n\t\tout: null,\n\t\tover: null\n\t},\n\t_create: function() {\n\n\t\tvar o = this.options,\n\t\t\taccept = o.accept;\n\n\t\tthis.isover = false;\n\t\tthis.isout = true;\n\n\t\tthis.accept = $.isFunction(accept) ? accept : function(d) {\n\t\t\treturn d.is(accept);\n\t\t};\n\n\t\t//Store the droppable's proportions\n\t\tthis.proportions = { width: this.element[0].offsetWidth, height: this.element[0].offsetHeight };\n\n\t\t// Add the reference and positions to the manager\n\t\t$.ui.ddmanager.droppables[o.scope] = $.ui.ddmanager.droppables[o.scope] || [];\n\t\t$.ui.ddmanager.droppables[o.scope].push(this);\n\n\t\t(o.addClasses && this.element.addClass(\"ui-droppable\"));\n\n\t},\n\n\t_destroy: function() {\n\t\tvar i = 0,\n\t\t\tdrop = $.ui.ddmanager.droppables[this.options.scope];\n\n\t\tfor ( ; i < drop.length; i++ ) {\n\t\t\tif ( drop[i] === this ) {\n\t\t\t\tdrop.splice(i, 1);\n\t\t\t}\n\t\t}\n\n\t\tthis.element.removeClass(\"ui-droppable ui-droppable-disabled\");\n\t},\n\n\t_setOption: function(key, value) {\n\n\t\tif(key === \"accept\") {\n\t\t\tthis.accept = $.isFunction(value) ? value : function(d) {\n\t\t\t\treturn d.is(value);\n\t\t\t};\n\t\t}\n\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t},\n\n\t_activate: function(event) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif(this.options.activeClass) {\n\t\t\tthis.element.addClass(this.options.activeClass);\n\t\t}\n\t\tif(draggable){\n\t\t\tthis._trigger(\"activate\", event, this.ui(draggable));\n\t\t}\n\t},\n\n\t_deactivate: function(event) {\n\t\tvar draggable = $.ui.ddmanager.current;\n\t\tif(this.options.activeClass) {\n\t\t\tthis.element.removeClass(this.options.activeClass);\n\t\t}\n\t\tif(draggable){\n\t\t\tthis._trigger(\"deactivate\", event, this.ui(draggable));\n\t\t}\n\t},\n\n\t_over: function(event) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.hoverClass) {\n\t\t\t\tthis.element.addClass(this.options.hoverClass);\n\t\t\t}\n\t\t\tthis._trigger(\"over\", event, this.ui(draggable));\n\t\t}\n\n\t},\n\n\t_out: function(event) {\n\n\t\tvar draggable = $.ui.ddmanager.current;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.hoverClass) {\n\t\t\t\tthis.element.removeClass(this.options.hoverClass);\n\t\t\t}\n\t\t\tthis._trigger(\"out\", event, this.ui(draggable));\n\t\t}\n\n\t},\n\n\t_drop: function(event,custom) {\n\n\t\tvar draggable = custom || $.ui.ddmanager.current,\n\t\t\tchildrenIntersection = false;\n\n\t\t// Bail if draggable and droppable are same element\n\t\tif (!draggable || (draggable.currentItem || draggable.element)[0] === this.element[0]) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.element.find(\":data(ui-droppable)\").not(\".ui-draggable-dragging\").each(function() {\n\t\t\tvar inst = $.data(this, \"ui-droppable\");\n\t\t\tif(\n\t\t\t\tinst.options.greedy &&\n\t\t\t\t!inst.options.disabled &&\n\t\t\t\tinst.options.scope === draggable.options.scope &&\n\t\t\t\tinst.accept.call(inst.element[0], (draggable.currentItem || draggable.element)) &&\n\t\t\t\t$.ui.intersect(draggable, $.extend(inst, { offset: inst.element.offset() }), inst.options.tolerance)\n\t\t\t) { childrenIntersection = true; return false; }\n\t\t});\n\t\tif(childrenIntersection) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\tif(this.options.activeClass) {\n\t\t\t\tthis.element.removeClass(this.options.activeClass);\n\t\t\t}\n\t\t\tif(this.options.hoverClass) {\n\t\t\t\tthis.element.removeClass(this.options.hoverClass);\n\t\t\t}\n\t\t\tthis._trigger(\"drop\", event, this.ui(draggable));\n\t\t\treturn this.element;\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tui: function(c) {\n\t\treturn {\n\t\t\tdraggable: (c.currentItem || c.element),\n\t\t\thelper: c.helper,\n\t\t\tposition: c.position,\n\t\t\toffset: c.positionAbs\n\t\t};\n\t}\n\n});\n\n$.ui.intersect = function(draggable, droppable, toleranceMode) {\n\n\tif (!droppable.offset) {\n\t\treturn false;\n\t}\n\n\tvar draggableLeft, draggableTop,\n\t\tx1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,\n\t\ty1 = (draggable.positionAbs || draggable.position.absolute).top, y2 = y1 + draggable.helperProportions.height,\n\t\tl = droppable.offset.left, r = l + droppable.proportions.width,\n\t\tt = droppable.offset.top, b = t + droppable.proportions.height;\n\n\tswitch (toleranceMode) {\n\t\tcase \"fit\":\n\t\t\treturn (l <= x1 && x2 <= r && t <= y1 && y2 <= b);\n\t\tcase \"intersect\":\n\t\t\treturn (l < x1 + (draggable.helperProportions.width / 2) && // Right Half\n\t\t\t\tx2 - (draggable.helperProportions.width / 2) < r && // Left Half\n\t\t\t\tt < y1 + (draggable.helperProportions.height / 2) && // Bottom Half\n\t\t\t\ty2 - (draggable.helperProportions.height / 2) < b ); // Top Half\n\t\tcase \"pointer\":\n\t\t\tdraggableLeft = ((draggable.positionAbs || draggable.position.absolute).left + (draggable.clickOffset || draggable.offset.click).left);\n\t\t\tdraggableTop = ((draggable.positionAbs || draggable.position.absolute).top + (draggable.clickOffset || draggable.offset.click).top);\n\t\t\treturn isOverAxis( draggableTop, t, droppable.proportions.height ) && isOverAxis( draggableLeft, l, droppable.proportions.width );\n\t\tcase \"touch\":\n\t\t\treturn (\n\t\t\t\t(y1 >= t && y1 <= b) ||\t// Top edge touching\n\t\t\t\t(y2 >= t && y2 <= b) ||\t// Bottom edge touching\n\t\t\t\t(y1 < t && y2 > b)\t\t// Surrounded vertically\n\t\t\t) && (\n\t\t\t\t(x1 >= l && x1 <= r) ||\t// Left edge touching\n\t\t\t\t(x2 >= l && x2 <= r) ||\t// Right edge touching\n\t\t\t\t(x1 < l && x2 > r)\t\t// Surrounded horizontally\n\t\t\t);\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\n};\n\n/*\n\tThis manager tracks offsets of draggables and droppables\n*/\n$.ui.ddmanager = {\n\tcurrent: null,\n\tdroppables: { \"default\": [] },\n\tprepareOffsets: function(t, event) {\n\n\t\tvar i, j,\n\t\t\tm = $.ui.ddmanager.droppables[t.options.scope] || [],\n\t\t\ttype = event ? event.type : null, // workaround for #2317\n\t\t\tlist = (t.currentItem || t.element).find(\":data(ui-droppable)\").addBack();\n\n\t\tdroppablesLoop: for (i = 0; i < m.length; i++) {\n\n\t\t\t//No disabled and non-accepted\n\t\t\tif(m[i].options.disabled || (t && !m[i].accept.call(m[i].element[0],(t.currentItem || t.element)))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Filter out elements in the current dragged item\n\t\t\tfor (j=0; j < list.length; j++) {\n\t\t\t\tif(list[j] === m[i].element[0]) {\n\t\t\t\t\tm[i].proportions.height = 0;\n\t\t\t\t\tcontinue droppablesLoop;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tm[i].visible = m[i].element.css(\"display\") !== \"none\";\n\t\t\tif(!m[i].visible) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t//Activate the droppable if used directly from draggables\n\t\t\tif(type === \"mousedown\") {\n\t\t\t\tm[i]._activate.call(m[i], event);\n\t\t\t}\n\n\t\t\tm[i].offset = m[i].element.offset();\n\t\t\tm[i].proportions = { width: m[i].element[0].offsetWidth, height: m[i].element[0].offsetHeight };\n\n\t\t}\n\n\t},\n\tdrop: function(draggable, event) {\n\n\t\tvar dropped = false;\n\t\t// Create a copy of the droppables in case the list changes during the drop (#9116)\n\t\t$.each(($.ui.ddmanager.droppables[draggable.options.scope] || []).slice(), function() {\n\n\t\t\tif(!this.options) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (!this.options.disabled && this.visible && $.ui.intersect(draggable, this, this.options.tolerance)) {\n\t\t\t\tdropped = this._drop.call(this, event) || dropped;\n\t\t\t}\n\n\t\t\tif (!this.options.disabled && this.visible && this.accept.call(this.element[0],(draggable.currentItem || draggable.element))) {\n\t\t\t\tthis.isout = true;\n\t\t\t\tthis.isover = false;\n\t\t\t\tthis._deactivate.call(this, event);\n\t\t\t}\n\n\t\t});\n\t\treturn dropped;\n\n\t},\n\tdragStart: function( draggable, event ) {\n\t\t//Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003)\n\t\tdraggable.element.parentsUntil( \"body\" ).bind( \"scroll.droppable\", function() {\n\t\t\tif( !draggable.options.refreshPositions ) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t\t}\n\t\t});\n\t},\n\tdrag: function(draggable, event) {\n\n\t\t//If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse.\n\t\tif(draggable.options.refreshPositions) {\n\t\t\t$.ui.ddmanager.prepareOffsets(draggable, event);\n\t\t}\n\n\t\t//Run through all droppables and check their positions based on specific tolerance options\n\t\t$.each($.ui.ddmanager.droppables[draggable.options.scope] || [], function() {\n\n\t\t\tif(this.options.disabled || this.greedyChild || !this.visible) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar parentInstance, scope, parent,\n\t\t\t\tintersects = $.ui.intersect(draggable, this, this.options.tolerance),\n\t\t\t\tc = !intersects && this.isover ? \"isout\" : (intersects && !this.isover ? \"isover\" : null);\n\t\t\tif(!c) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (this.options.greedy) {\n\t\t\t\t// find droppable parents with same scope\n\t\t\t\tscope = this.options.scope;\n\t\t\t\tparent = this.element.parents(\":data(ui-droppable)\").filter(function () {\n\t\t\t\t\treturn $.data(this, \"ui-droppable\").options.scope === scope;\n\t\t\t\t});\n\n\t\t\t\tif (parent.length) {\n\t\t\t\t\tparentInstance = $.data(parent[0], \"ui-droppable\");\n\t\t\t\t\tparentInstance.greedyChild = (c === \"isover\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// we just moved into a greedy child\n\t\t\tif (parentInstance && c === \"isover\") {\n\t\t\t\tparentInstance.isover = false;\n\t\t\t\tparentInstance.isout = true;\n\t\t\t\tparentInstance._out.call(parentInstance, event);\n\t\t\t}\n\n\t\t\tthis[c] = true;\n\t\t\tthis[c === \"isout\" ? \"isover\" : \"isout\"] = false;\n\t\t\tthis[c === \"isover\" ? \"_over\" : \"_out\"].call(this, event);\n\n\t\t\t// we just moved out of a greedy child\n\t\t\tif (parentInstance && c === \"isout\") {\n\t\t\t\tparentInstance.isout = false;\n\t\t\t\tparentInstance.isover = true;\n\t\t\t\tparentInstance._over.call(parentInstance, event);\n\t\t\t}\n\t\t});\n\n\t},\n\tdragStop: function( draggable, event ) {\n\t\tdraggable.element.parentsUntil( \"body\" ).unbind( \"scroll.droppable\" );\n\t\t//Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003)\n\t\tif( !draggable.options.refreshPositions ) {\n\t\t\t$.ui.ddmanager.prepareOffsets( draggable, event );\n\t\t}\n\t}\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nfunction num(v) {\n\treturn parseInt(v, 10) || 0;\n}\n\nfunction isNumber(value) {\n\treturn !isNaN(parseInt(value, 10));\n}\n\n$.widget(\"ui.resizable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"resize\",\n\toptions: {\n\t\talsoResize: false,\n\t\tanimate: false,\n\t\tanimateDuration: \"slow\",\n\t\tanimateEasing: \"swing\",\n\t\taspectRatio: false,\n\t\tautoHide: false,\n\t\tcontainment: false,\n\t\tghost: false,\n\t\tgrid: false,\n\t\thandles: \"e,s,se\",\n\t\thelper: false,\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 10,\n\t\tminWidth: 10,\n\t\t// See #7960\n\t\tzIndex: 90,\n\n\t\t// callbacks\n\t\tresize: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\t_create: function() {\n\n\t\tvar n, i, handle, axis, hname,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\t\tthis.element.addClass(\"ui-resizable\");\n\n\t\t$.extend(this, {\n\t\t\t_aspectRatio: !!(o.aspectRatio),\n\t\t\taspectRatio: o.aspectRatio,\n\t\t\toriginalElement: this.element,\n\t\t\t_proportionallyResizeElements: [],\n\t\t\t_helper: o.helper || o.ghost || o.animate ? o.helper || \"ui-resizable-helper\" : null\n\t\t});\n\n\t\t//Wrap the element if it cannot hold child nodes\n\t\tif(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {\n\n\t\t\t//Create a wrapper element and set the wrapper to the new current internal element\n\t\t\tthis.element.wrap(\n\t\t\t\t$(\"<div class='ui-wrapper' style='overflow: hidden;'></div>\").css({\n\t\t\t\t\tposition: this.element.css(\"position\"),\n\t\t\t\t\twidth: this.element.outerWidth(),\n\t\t\t\t\theight: this.element.outerHeight(),\n\t\t\t\t\ttop: this.element.css(\"top\"),\n\t\t\t\t\tleft: this.element.css(\"left\")\n\t\t\t\t})\n\t\t\t);\n\n\t\t\t//Overwrite the original this.element\n\t\t\tthis.element = this.element.parent().data(\n\t\t\t\t\"ui-resizable\", this.element.data(\"ui-resizable\")\n\t\t\t);\n\n\t\t\tthis.elementIsWrapper = true;\n\n\t\t\t//Move margins to the wrapper\n\t\t\tthis.element.css({ marginLeft: this.originalElement.css(\"marginLeft\"), marginTop: this.originalElement.css(\"marginTop\"), marginRight: this.originalElement.css(\"marginRight\"), marginBottom: this.originalElement.css(\"marginBottom\") });\n\t\t\tthis.originalElement.css({ marginLeft: 0, marginTop: 0, marginRight: 0, marginBottom: 0});\n\n\t\t\t//Prevent Safari textarea resize\n\t\t\tthis.originalResizeStyle = this.originalElement.css(\"resize\");\n\t\t\tthis.originalElement.css(\"resize\", \"none\");\n\n\t\t\t//Push the actual element to our proportionallyResize internal array\n\t\t\tthis._proportionallyResizeElements.push(this.originalElement.css({ position: \"static\", zoom: 1, display: \"block\" }));\n\n\t\t\t// avoid IE jump (hard set the margin)\n\t\t\tthis.originalElement.css({ margin: this.originalElement.css(\"margin\") });\n\n\t\t\t// fix handlers offset\n\t\t\tthis._proportionallyResize();\n\n\t\t}\n\n\t\tthis.handles = o.handles || (!$(\".ui-resizable-handle\", this.element).length ? \"e,s,se\" : { n: \".ui-resizable-n\", e: \".ui-resizable-e\", s: \".ui-resizable-s\", w: \".ui-resizable-w\", se: \".ui-resizable-se\", sw: \".ui-resizable-sw\", ne: \".ui-resizable-ne\", nw: \".ui-resizable-nw\" });\n\t\tif(this.handles.constructor === String) {\n\n\t\t\tif ( this.handles === \"all\") {\n\t\t\t\tthis.handles = \"n,e,s,w,se,sw,ne,nw\";\n\t\t\t}\n\n\t\t\tn = this.handles.split(\",\");\n\t\t\tthis.handles = {};\n\n\t\t\tfor(i = 0; i < n.length; i++) {\n\n\t\t\t\thandle = $.trim(n[i]);\n\t\t\t\thname = \"ui-resizable-\"+handle;\n\t\t\t\taxis = $(\"<div class='ui-resizable-handle \" + hname + \"'></div>\");\n\n\t\t\t\t// Apply zIndex to all handles - see #7960\n\t\t\t\taxis.css({ zIndex: o.zIndex });\n\n\t\t\t\t//TODO : What's going on here?\n\t\t\t\tif (\"se\" === handle) {\n\t\t\t\t\taxis.addClass(\"ui-icon ui-icon-gripsmall-diagonal-se\");\n\t\t\t\t}\n\n\t\t\t\t//Insert into internal handles object and append to element\n\t\t\t\tthis.handles[handle] = \".ui-resizable-\"+handle;\n\t\t\t\tthis.element.append(axis);\n\t\t\t}\n\n\t\t}\n\n\t\tthis._renderAxis = function(target) {\n\n\t\t\tvar i, axis, padPos, padWrapper;\n\n\t\t\ttarget = target || this.element;\n\n\t\t\tfor(i in this.handles) {\n\n\t\t\t\tif(this.handles[i].constructor === String) {\n\t\t\t\t\tthis.handles[i] = $(this.handles[i], this.element).show();\n\t\t\t\t}\n\n\t\t\t\t//Apply pad to wrapper element, needed to fix axis position (textarea, inputs, scrolls)\n\t\t\t\tif (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {\n\n\t\t\t\t\taxis = $(this.handles[i], this.element);\n\n\t\t\t\t\t//Checking the correct pad and border\n\t\t\t\t\tpadWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();\n\n\t\t\t\t\t//The padding type i have to apply...\n\t\t\t\t\tpadPos = [ \"padding\",\n\t\t\t\t\t\t/ne|nw|n/.test(i) ? \"Top\" :\n\t\t\t\t\t\t/se|sw|s/.test(i) ? \"Bottom\" :\n\t\t\t\t\t\t/^e$/.test(i) ? \"Right\" : \"Left\" ].join(\"\");\n\n\t\t\t\t\ttarget.css(padPos, padWrapper);\n\n\t\t\t\t\tthis._proportionallyResize();\n\n\t\t\t\t}\n\n\t\t\t\t//TODO: What's that good for? There's not anything to be executed left\n\t\t\t\tif(!$(this.handles[i]).length) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t//TODO: make renderAxis a prototype function\n\t\tthis._renderAxis(this.element);\n\n\t\tthis._handles = $(\".ui-resizable-handle\", this.element)\n\t\t\t.disableSelection();\n\n\t\t//Matching axis name\n\t\tthis._handles.mouseover(function() {\n\t\t\tif (!that.resizing) {\n\t\t\t\tif (this.className) {\n\t\t\t\t\taxis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);\n\t\t\t\t}\n\t\t\t\t//Axis, default = se\n\t\t\t\tthat.axis = axis && axis[1] ? axis[1] : \"se\";\n\t\t\t}\n\t\t});\n\n\t\t//If we want to auto hide the elements\n\t\tif (o.autoHide) {\n\t\t\tthis._handles.hide();\n\t\t\t$(this.element)\n\t\t\t\t.addClass(\"ui-resizable-autohide\")\n\t\t\t\t.mouseenter(function() {\n\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$(this).removeClass(\"ui-resizable-autohide\");\n\t\t\t\t\tthat._handles.show();\n\t\t\t\t})\n\t\t\t\t.mouseleave(function(){\n\t\t\t\t\tif (o.disabled) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif (!that.resizing) {\n\t\t\t\t\t\t$(this).addClass(\"ui-resizable-autohide\");\n\t\t\t\t\t\tthat._handles.hide();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}\n\n\t\t//Initialize the mouse interaction\n\t\tthis._mouseInit();\n\n\t},\n\n\t_destroy: function() {\n\n\t\tthis._mouseDestroy();\n\n\t\tvar wrapper,\n\t\t\t_destroy = function(exp) {\n\t\t\t\t$(exp).removeClass(\"ui-resizable ui-resizable-disabled ui-resizable-resizing\")\n\t\t\t\t\t.removeData(\"resizable\").removeData(\"ui-resizable\").unbind(\".resizable\").find(\".ui-resizable-handle\").remove();\n\t\t\t};\n\n\t\t//TODO: Unwrap at same DOM position\n\t\tif (this.elementIsWrapper) {\n\t\t\t_destroy(this.element);\n\t\t\twrapper = this.element;\n\t\t\tthis.originalElement.css({\n\t\t\t\tposition: wrapper.css(\"position\"),\n\t\t\t\twidth: wrapper.outerWidth(),\n\t\t\t\theight: wrapper.outerHeight(),\n\t\t\t\ttop: wrapper.css(\"top\"),\n\t\t\t\tleft: wrapper.css(\"left\")\n\t\t\t}).insertAfter( wrapper );\n\t\t\twrapper.remove();\n\t\t}\n\n\t\tthis.originalElement.css(\"resize\", this.originalResizeStyle);\n\t\t_destroy(this.originalElement);\n\n\t\treturn this;\n\t},\n\n\t_mouseCapture: function(event) {\n\t\tvar i, handle,\n\t\t\tcapture = false;\n\n\t\tfor (i in this.handles) {\n\t\t\thandle = $(this.handles[i])[0];\n\t\t\tif (handle === event.target || $.contains(handle, event.target)) {\n\t\t\t\tcapture = true;\n\t\t\t}\n\t\t}\n\n\t\treturn !this.options.disabled && capture;\n\t},\n\n\t_mouseStart: function(event) {\n\n\t\tvar curleft, curtop, cursor,\n\t\t\to = this.options,\n\t\t\tiniPos = this.element.position(),\n\t\t\tel = this.element;\n\n\t\tthis.resizing = true;\n\n\t\t// bugfix for http://dev.jquery.com/ticket/1749\n\t\tif ( (/absolute/).test( el.css(\"position\") ) ) {\n\t\t\tel.css({ position: \"absolute\", top: el.css(\"top\"), left: el.css(\"left\") });\n\t\t} else if (el.is(\".ui-draggable\")) {\n\t\t\tel.css({ position: \"absolute\", top: iniPos.top, left: iniPos.left });\n\t\t}\n\n\t\tthis._renderProxy();\n\n\t\tcurleft = num(this.helper.css(\"left\"));\n\t\tcurtop = num(this.helper.css(\"top\"));\n\n\t\tif (o.containment) {\n\t\t\tcurleft += $(o.containment).scrollLeft() || 0;\n\t\t\tcurtop += $(o.containment).scrollTop() || 0;\n\t\t}\n\n\t\t//Store needed variables\n\t\tthis.offset = this.helper.offset();\n\t\tthis.position = { left: curleft, top: curtop };\n\t\tthis.size = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\tthis.originalSize = this._helper ? { width: el.outerWidth(), height: el.outerHeight() } : { width: el.width(), height: el.height() };\n\t\tthis.originalPosition = { left: curleft, top: curtop };\n\t\tthis.sizeDiff = { width: el.outerWidth() - el.width(), height: el.outerHeight() - el.height() };\n\t\tthis.originalMousePosition = { left: event.pageX, top: event.pageY };\n\n\t\t//Aspect Ratio\n\t\tthis.aspectRatio = (typeof o.aspectRatio === \"number\") ? o.aspectRatio : ((this.originalSize.width / this.originalSize.height) || 1);\n\n\t\tcursor = $(\".ui-resizable-\" + this.axis).css(\"cursor\");\n\t\t$(\"body\").css(\"cursor\", cursor === \"auto\" ? this.axis + \"-resize\" : cursor);\n\n\t\tel.addClass(\"ui-resizable-resizing\");\n\t\tthis._propagate(\"start\", event);\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\t//Increase performance, avoid regex\n\t\tvar data,\n\t\t\tel = this.helper, props = {},\n\t\t\tsmp = this.originalMousePosition,\n\t\t\ta = this.axis,\n\t\t\tprevTop = this.position.top,\n\t\t\tprevLeft = this.position.left,\n\t\t\tprevWidth = this.size.width,\n\t\t\tprevHeight = this.size.height,\n\t\t\tdx = (event.pageX-smp.left)||0,\n\t\t\tdy = (event.pageY-smp.top)||0,\n\t\t\ttrigger = this._change[a];\n\n\t\tif (!trigger) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Calculate the attrs that will be change\n\t\tdata = trigger.apply(this, [event, dx, dy]);\n\n\t\t// Put this in the mouseDrag handler since the user can start pressing shift while resizing\n\t\tthis._updateVirtualBoundaries(event.shiftKey);\n\t\tif (this._aspectRatio || event.shiftKey) {\n\t\t\tdata = this._updateRatio(data, event);\n\t\t}\n\n\t\tdata = this._respectSize(data, event);\n\n\t\tthis._updateCache(data);\n\n\t\t// plugins callbacks need to be called first\n\t\tthis._propagate(\"resize\", event);\n\n\t\tif (this.position.top !== prevTop) {\n\t\t\tprops.top = this.position.top + \"px\";\n\t\t}\n\t\tif (this.position.left !== prevLeft) {\n\t\t\tprops.left = this.position.left + \"px\";\n\t\t}\n\t\tif (this.size.width !== prevWidth) {\n\t\t\tprops.width = this.size.width + \"px\";\n\t\t}\n\t\tif (this.size.height !== prevHeight) {\n\t\t\tprops.height = this.size.height + \"px\";\n\t\t}\n\t\tel.css(props);\n\n\t\tif (!this._helper && this._proportionallyResizeElements.length) {\n\t\t\tthis._proportionallyResize();\n\t\t}\n\n\t\t// Call the user callback if the element was resized\n\t\tif ( ! $.isEmptyObject(props) ) {\n\t\t\tthis._trigger(\"resize\", event, this.ui());\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\n\t\tthis.resizing = false;\n\t\tvar pr, ista, soffseth, soffsetw, s, left, top,\n\t\t\to = this.options, that = this;\n\n\t\tif(this._helper) {\n\n\t\t\tpr = this._proportionallyResizeElements;\n\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName);\n\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], \"left\") /* TODO - jump height */ ? 0 : that.sizeDiff.height;\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width;\n\n\t\t\ts = { width: (that.helper.width()  - soffsetw), height: (that.helper.height() - soffseth) };\n\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) + (that.position.left - that.originalPosition.left)) || null;\n\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) + (that.position.top - that.originalPosition.top)) || null;\n\n\t\t\tif (!o.animate) {\n\t\t\t\tthis.element.css($.extend(s, { top: top, left: left }));\n\t\t\t}\n\n\t\t\tthat.helper.height(that.size.height);\n\t\t\tthat.helper.width(that.size.width);\n\n\t\t\tif (this._helper && !o.animate) {\n\t\t\t\tthis._proportionallyResize();\n\t\t\t}\n\t\t}\n\n\t\t$(\"body\").css(\"cursor\", \"auto\");\n\n\t\tthis.element.removeClass(\"ui-resizable-resizing\");\n\n\t\tthis._propagate(\"stop\", event);\n\n\t\tif (this._helper) {\n\t\t\tthis.helper.remove();\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\t_updateVirtualBoundaries: function(forceAspectRatio) {\n\t\tvar pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,\n\t\t\to = this.options;\n\n\t\tb = {\n\t\t\tminWidth: isNumber(o.minWidth) ? o.minWidth : 0,\n\t\t\tmaxWidth: isNumber(o.maxWidth) ? o.maxWidth : Infinity,\n\t\t\tminHeight: isNumber(o.minHeight) ? o.minHeight : 0,\n\t\t\tmaxHeight: isNumber(o.maxHeight) ? o.maxHeight : Infinity\n\t\t};\n\n\t\tif(this._aspectRatio || forceAspectRatio) {\n\t\t\t// We want to create an enclosing box whose aspect ration is the requested one\n\t\t\t// First, compute the \"projected\" size for each dimension based on the aspect ratio and other dimension\n\t\t\tpMinWidth = b.minHeight * this.aspectRatio;\n\t\t\tpMinHeight = b.minWidth / this.aspectRatio;\n\t\t\tpMaxWidth = b.maxHeight * this.aspectRatio;\n\t\t\tpMaxHeight = b.maxWidth / this.aspectRatio;\n\n\t\t\tif(pMinWidth > b.minWidth) {\n\t\t\t\tb.minWidth = pMinWidth;\n\t\t\t}\n\t\t\tif(pMinHeight > b.minHeight) {\n\t\t\t\tb.minHeight = pMinHeight;\n\t\t\t}\n\t\t\tif(pMaxWidth < b.maxWidth) {\n\t\t\t\tb.maxWidth = pMaxWidth;\n\t\t\t}\n\t\t\tif(pMaxHeight < b.maxHeight) {\n\t\t\t\tb.maxHeight = pMaxHeight;\n\t\t\t}\n\t\t}\n\t\tthis._vBoundaries = b;\n\t},\n\n\t_updateCache: function(data) {\n\t\tthis.offset = this.helper.offset();\n\t\tif (isNumber(data.left)) {\n\t\t\tthis.position.left = data.left;\n\t\t}\n\t\tif (isNumber(data.top)) {\n\t\t\tthis.position.top = data.top;\n\t\t}\n\t\tif (isNumber(data.height)) {\n\t\t\tthis.size.height = data.height;\n\t\t}\n\t\tif (isNumber(data.width)) {\n\t\t\tthis.size.width = data.width;\n\t\t}\n\t},\n\n\t_updateRatio: function( data ) {\n\n\t\tvar cpos = this.position,\n\t\t\tcsize = this.size,\n\t\t\ta = this.axis;\n\n\t\tif (isNumber(data.height)) {\n\t\t\tdata.width = (data.height * this.aspectRatio);\n\t\t} else if (isNumber(data.width)) {\n\t\t\tdata.height = (data.width / this.aspectRatio);\n\t\t}\n\n\t\tif (a === \"sw\") {\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t\tdata.top = null;\n\t\t}\n\t\tif (a === \"nw\") {\n\t\t\tdata.top = cpos.top + (csize.height - data.height);\n\t\t\tdata.left = cpos.left + (csize.width - data.width);\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_respectSize: function( data ) {\n\n\t\tvar o = this._vBoundaries,\n\t\t\ta = this.axis,\n\t\t\tismaxw = isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), ismaxh = isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),\n\t\t\tisminw = isNumber(data.width) && o.minWidth && (o.minWidth > data.width), isminh = isNumber(data.height) && o.minHeight && (o.minHeight > data.height),\n\t\t\tdw = this.originalPosition.left + this.originalSize.width,\n\t\t\tdh = this.position.top + this.size.height,\n\t\t\tcw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);\n\t\tif (isminw) {\n\t\t\tdata.width = o.minWidth;\n\t\t}\n\t\tif (isminh) {\n\t\t\tdata.height = o.minHeight;\n\t\t}\n\t\tif (ismaxw) {\n\t\t\tdata.width = o.maxWidth;\n\t\t}\n\t\tif (ismaxh) {\n\t\t\tdata.height = o.maxHeight;\n\t\t}\n\n\t\tif (isminw && cw) {\n\t\t\tdata.left = dw - o.minWidth;\n\t\t}\n\t\tif (ismaxw && cw) {\n\t\t\tdata.left = dw - o.maxWidth;\n\t\t}\n\t\tif (isminh && ch) {\n\t\t\tdata.top = dh - o.minHeight;\n\t\t}\n\t\tif (ismaxh && ch) {\n\t\t\tdata.top = dh - o.maxHeight;\n\t\t}\n\n\t\t// fixing jump error on top/left - bug #2330\n\t\tif (!data.width && !data.height && !data.left && data.top) {\n\t\t\tdata.top = null;\n\t\t} else if (!data.width && !data.height && !data.top && data.left) {\n\t\t\tdata.left = null;\n\t\t}\n\n\t\treturn data;\n\t},\n\n\t_proportionallyResize: function() {\n\n\t\tif (!this._proportionallyResizeElements.length) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar i, j, borders, paddings, prel,\n\t\t\telement = this.helper || this.element;\n\n\t\tfor ( i=0; i < this._proportionallyResizeElements.length; i++) {\n\n\t\t\tprel = this._proportionallyResizeElements[i];\n\n\t\t\tif (!this.borderDif) {\n\t\t\t\tthis.borderDif = [];\n\t\t\t\tborders = [prel.css(\"borderTopWidth\"), prel.css(\"borderRightWidth\"), prel.css(\"borderBottomWidth\"), prel.css(\"borderLeftWidth\")];\n\t\t\t\tpaddings = [prel.css(\"paddingTop\"), prel.css(\"paddingRight\"), prel.css(\"paddingBottom\"), prel.css(\"paddingLeft\")];\n\n\t\t\t\tfor ( j = 0; j < borders.length; j++ ) {\n\t\t\t\t\tthis.borderDif[ j ] = ( parseInt( borders[ j ], 10 ) || 0 ) + ( parseInt( paddings[ j ], 10 ) || 0 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tprel.css({\n\t\t\t\theight: (element.height() - this.borderDif[0] - this.borderDif[2]) || 0,\n\t\t\t\twidth: (element.width() - this.borderDif[1] - this.borderDif[3]) || 0\n\t\t\t});\n\n\t\t}\n\n\t},\n\n\t_renderProxy: function() {\n\n\t\tvar el = this.element, o = this.options;\n\t\tthis.elementOffset = el.offset();\n\n\t\tif(this._helper) {\n\n\t\t\tthis.helper = this.helper || $(\"<div style='overflow:hidden;'></div>\");\n\n\t\t\tthis.helper.addClass(this._helper).css({\n\t\t\t\twidth: this.element.outerWidth() - 1,\n\t\t\t\theight: this.element.outerHeight() - 1,\n\t\t\t\tposition: \"absolute\",\n\t\t\t\tleft: this.elementOffset.left +\"px\",\n\t\t\t\ttop: this.elementOffset.top +\"px\",\n\t\t\t\tzIndex: ++o.zIndex //TODO: Don't modify option\n\t\t\t});\n\n\t\t\tthis.helper\n\t\t\t\t.appendTo(\"body\")\n\t\t\t\t.disableSelection();\n\n\t\t} else {\n\t\t\tthis.helper = this.element;\n\t\t}\n\n\t},\n\n\t_change: {\n\t\te: function(event, dx) {\n\t\t\treturn { width: this.originalSize.width + dx };\n\t\t},\n\t\tw: function(event, dx) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { left: sp.left + dx, width: cs.width - dx };\n\t\t},\n\t\tn: function(event, dx, dy) {\n\t\t\tvar cs = this.originalSize, sp = this.originalPosition;\n\t\t\treturn { top: sp.top + dy, height: cs.height - dy };\n\t\t},\n\t\ts: function(event, dx, dy) {\n\t\t\treturn { height: this.originalSize.height + dy };\n\t\t},\n\t\tse: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t},\n\t\tsw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.s.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t},\n\t\tne: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.e.apply(this, [event, dx, dy]));\n\t\t},\n\t\tnw: function(event, dx, dy) {\n\t\t\treturn $.extend(this._change.n.apply(this, arguments), this._change.w.apply(this, [event, dx, dy]));\n\t\t}\n\t},\n\n\t_propagate: function(n, event) {\n\t\t$.ui.plugin.call(this, n, [event, this.ui()]);\n\t\t(n !== \"resize\" && this._trigger(n, event, this.ui()));\n\t},\n\n\tplugins: {},\n\n\tui: function() {\n\t\treturn {\n\t\t\toriginalElement: this.originalElement,\n\t\t\telement: this.element,\n\t\t\thelper: this.helper,\n\t\t\tposition: this.position,\n\t\t\tsize: this.size,\n\t\t\toriginalSize: this.originalSize,\n\t\t\toriginalPosition: this.originalPosition\n\t\t};\n\t}\n\n});\n\n/*\n * Resizable Extensions\n */\n\n$.ui.plugin.add(\"resizable\", \"animate\", {\n\n\tstop: function( event ) {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tpr = that._proportionallyResizeElements,\n\t\t\tista = pr.length && (/textarea/i).test(pr[0].nodeName),\n\t\t\tsoffseth = ista && $.ui.hasScroll(pr[0], \"left\") /* TODO - jump height */ ? 0 : that.sizeDiff.height,\n\t\t\tsoffsetw = ista ? 0 : that.sizeDiff.width,\n\t\t\tstyle = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },\n\t\t\tleft = (parseInt(that.element.css(\"left\"), 10) + (that.position.left - that.originalPosition.left)) || null,\n\t\t\ttop = (parseInt(that.element.css(\"top\"), 10) + (that.position.top - that.originalPosition.top)) || null;\n\n\t\tthat.element.animate(\n\t\t\t$.extend(style, top && left ? { top: top, left: left } : {}), {\n\t\t\t\tduration: o.animateDuration,\n\t\t\t\teasing: o.animateEasing,\n\t\t\t\tstep: function() {\n\n\t\t\t\t\tvar data = {\n\t\t\t\t\t\twidth: parseInt(that.element.css(\"width\"), 10),\n\t\t\t\t\t\theight: parseInt(that.element.css(\"height\"), 10),\n\t\t\t\t\t\ttop: parseInt(that.element.css(\"top\"), 10),\n\t\t\t\t\t\tleft: parseInt(that.element.css(\"left\"), 10)\n\t\t\t\t\t};\n\n\t\t\t\t\tif (pr && pr.length) {\n\t\t\t\t\t\t$(pr[0]).css({ width: data.width, height: data.height });\n\t\t\t\t\t}\n\n\t\t\t\t\t// propagating resize, and updating values for each animation step\n\t\t\t\t\tthat._updateCache(data);\n\t\t\t\t\tthat._propagate(\"resize\", event);\n\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t}\n\n});\n\n$.ui.plugin.add(\"resizable\", \"containment\", {\n\n\tstart: function() {\n\t\tvar element, p, co, ch, cw, width, height,\n\t\t\tthat = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tel = that.element,\n\t\t\toc = o.containment,\n\t\t\tce = (oc instanceof $) ? oc.get(0) : (/parent/.test(oc)) ? el.parent().get(0) : oc;\n\n\t\tif (!ce) {\n\t\t\treturn;\n\t\t}\n\n\t\tthat.containerElement = $(ce);\n\n\t\tif (/document/.test(oc) || oc === document) {\n\t\t\tthat.containerOffset = { left: 0, top: 0 };\n\t\t\tthat.containerPosition = { left: 0, top: 0 };\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: $(document), left: 0, top: 0,\n\t\t\t\twidth: $(document).width(), height: $(document).height() || document.body.parentNode.scrollHeight\n\t\t\t};\n\t\t}\n\n\t\t// i'm a node, so compute top, left, right, bottom\n\t\telse {\n\t\t\telement = $(ce);\n\t\t\tp = [];\n\t\t\t$([ \"Top\", \"Right\", \"Left\", \"Bottom\" ]).each(function(i, name) { p[i] = num(element.css(\"padding\" + name)); });\n\n\t\t\tthat.containerOffset = element.offset();\n\t\t\tthat.containerPosition = element.position();\n\t\t\tthat.containerSize = { height: (element.innerHeight() - p[3]), width: (element.innerWidth() - p[1]) };\n\n\t\t\tco = that.containerOffset;\n\t\t\tch = that.containerSize.height;\n\t\t\tcw = that.containerSize.width;\n\t\t\twidth = ($.ui.hasScroll(ce, \"left\") ? ce.scrollWidth : cw );\n\t\t\theight = ($.ui.hasScroll(ce) ? ce.scrollHeight : ch);\n\n\t\t\tthat.parentData = {\n\t\t\t\telement: ce, left: co.left, top: co.top, width: width, height: height\n\t\t\t};\n\t\t}\n\t},\n\n\tresize: function( event ) {\n\t\tvar woset, hoset, isParent, isOffsetRelative,\n\t\t\tthat = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset, cp = that.position,\n\t\t\tpRatio = that._aspectRatio || event.shiftKey,\n\t\t\tcop = { top:0, left:0 }, ce = that.containerElement;\n\n\t\tif (ce[0] !== document && (/static/).test(ce.css(\"position\"))) {\n\t\t\tcop = co;\n\t\t}\n\n\t\tif (cp.left < (that._helper ? co.left : 0)) {\n\t\t\tthat.size.width = that.size.width + (that._helper ? (that.position.left - co.left) : (that.position.left - cop.left));\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t}\n\t\t\tthat.position.left = o.helper ? co.left : 0;\n\t\t}\n\n\t\tif (cp.top < (that._helper ? co.top : 0)) {\n\t\t\tthat.size.height = that.size.height + (that._helper ? (that.position.top - co.top) : that.position.top);\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t}\n\t\t\tthat.position.top = that._helper ? co.top : 0;\n\t\t}\n\n\t\tthat.offset.left = that.parentData.left+that.position.left;\n\t\tthat.offset.top = that.parentData.top+that.position.top;\n\n\t\twoset = Math.abs( (that._helper ? that.offset.left - cop.left : (that.offset.left - cop.left)) + that.sizeDiff.width );\n\t\thoset = Math.abs( (that._helper ? that.offset.top - cop.top : (that.offset.top - co.top)) + that.sizeDiff.height );\n\n\t\tisParent = that.containerElement.get(0) === that.element.parent().get(0);\n\t\tisOffsetRelative = /relative|absolute/.test(that.containerElement.css(\"position\"));\n\n\t\tif(isParent && isOffsetRelative) {\n\t\t\twoset -= that.parentData.left;\n\t\t}\n\n\t\tif (woset + that.size.width >= that.parentData.width) {\n\t\t\tthat.size.width = that.parentData.width - woset;\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.height = that.size.width / that.aspectRatio;\n\t\t\t}\n\t\t}\n\n\t\tif (hoset + that.size.height >= that.parentData.height) {\n\t\t\tthat.size.height = that.parentData.height - hoset;\n\t\t\tif (pRatio) {\n\t\t\t\tthat.size.width = that.size.height * that.aspectRatio;\n\t\t\t}\n\t\t}\n\t},\n\n\tstop: function(){\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tco = that.containerOffset,\n\t\t\tcop = that.containerPosition,\n\t\t\tce = that.containerElement,\n\t\t\thelper = $(that.helper),\n\t\t\tho = helper.offset(),\n\t\t\tw = helper.outerWidth() - that.sizeDiff.width,\n\t\t\th = helper.outerHeight() - that.sizeDiff.height;\n\n\t\tif (that._helper && !o.animate && (/relative/).test(ce.css(\"position\"))) {\n\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\t\t}\n\n\t\tif (that._helper && !o.animate && (/static/).test(ce.css(\"position\"))) {\n\t\t\t$(this).css({ left: ho.left - cop.left - co.left, width: w, height: h });\n\t\t}\n\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"alsoResize\", {\n\n\tstart: function () {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\t_store = function (exp) {\n\t\t\t\t$(exp).each(function() {\n\t\t\t\t\tvar el = $(this);\n\t\t\t\t\tel.data(\"ui-resizable-alsoresize\", {\n\t\t\t\t\t\twidth: parseInt(el.width(), 10), height: parseInt(el.height(), 10),\n\t\t\t\t\t\tleft: parseInt(el.css(\"left\"), 10), top: parseInt(el.css(\"top\"), 10)\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t};\n\n\t\tif (typeof(o.alsoResize) === \"object\" && !o.alsoResize.parentNode) {\n\t\t\tif (o.alsoResize.length) { o.alsoResize = o.alsoResize[0]; _store(o.alsoResize); }\n\t\t\telse { $.each(o.alsoResize, function (exp) { _store(exp); }); }\n\t\t}else{\n\t\t\t_store(o.alsoResize);\n\t\t}\n\t},\n\n\tresize: function (event, ui) {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\tdelta = {\n\t\t\t\theight: (that.size.height - os.height) || 0, width: (that.size.width - os.width) || 0,\n\t\t\t\ttop: (that.position.top - op.top) || 0, left: (that.position.left - op.left) || 0\n\t\t\t},\n\n\t\t\t_alsoResize = function (exp, c) {\n\t\t\t\t$(exp).each(function() {\n\t\t\t\t\tvar el = $(this), start = $(this).data(\"ui-resizable-alsoresize\"), style = {},\n\t\t\t\t\t\tcss = c && c.length ? c : el.parents(ui.originalElement[0]).length ? [\"width\", \"height\"] : [\"width\", \"height\", \"top\", \"left\"];\n\n\t\t\t\t\t$.each(css, function (i, prop) {\n\t\t\t\t\t\tvar sum = (start[prop]||0) + (delta[prop]||0);\n\t\t\t\t\t\tif (sum && sum >= 0) {\n\t\t\t\t\t\t\tstyle[prop] = sum || null;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tel.css(style);\n\t\t\t\t});\n\t\t\t};\n\n\t\tif (typeof(o.alsoResize) === \"object\" && !o.alsoResize.nodeType) {\n\t\t\t$.each(o.alsoResize, function (exp, c) { _alsoResize(exp, c); });\n\t\t}else{\n\t\t\t_alsoResize(o.alsoResize);\n\t\t}\n\t},\n\n\tstop: function () {\n\t\t$(this).removeData(\"resizable-alsoresize\");\n\t}\n});\n\n$.ui.plugin.add(\"resizable\", \"ghost\", {\n\n\tstart: function() {\n\n\t\tvar that = $(this).data(\"ui-resizable\"), o = that.options, cs = that.size;\n\n\t\tthat.ghost = that.originalElement.clone();\n\t\tthat.ghost\n\t\t\t.css({ opacity: 0.25, display: \"block\", position: \"relative\", height: cs.height, width: cs.width, margin: 0, left: 0, top: 0 })\n\t\t\t.addClass(\"ui-resizable-ghost\")\n\t\t\t.addClass(typeof o.ghost === \"string\" ? o.ghost : \"\");\n\n\t\tthat.ghost.appendTo(that.helper);\n\n\t},\n\n\tresize: function(){\n\t\tvar that = $(this).data(\"ui-resizable\");\n\t\tif (that.ghost) {\n\t\t\tthat.ghost.css({ position: \"relative\", height: that.size.height, width: that.size.width });\n\t\t}\n\t},\n\n\tstop: function() {\n\t\tvar that = $(this).data(\"ui-resizable\");\n\t\tif (that.ghost && that.helper) {\n\t\t\tthat.helper.get(0).removeChild(that.ghost.get(0));\n\t\t}\n\t}\n\n});\n\n$.ui.plugin.add(\"resizable\", \"grid\", {\n\n\tresize: function() {\n\t\tvar that = $(this).data(\"ui-resizable\"),\n\t\t\to = that.options,\n\t\t\tcs = that.size,\n\t\t\tos = that.originalSize,\n\t\t\top = that.originalPosition,\n\t\t\ta = that.axis,\n\t\t\tgrid = typeof o.grid === \"number\" ? [o.grid, o.grid] : o.grid,\n\t\t\tgridX = (grid[0]||1),\n\t\t\tgridY = (grid[1]||1),\n\t\t\tox = Math.round((cs.width - os.width) / gridX) * gridX,\n\t\t\toy = Math.round((cs.height - os.height) / gridY) * gridY,\n\t\t\tnewWidth = os.width + ox,\n\t\t\tnewHeight = os.height + oy,\n\t\t\tisMaxWidth = o.maxWidth && (o.maxWidth < newWidth),\n\t\t\tisMaxHeight = o.maxHeight && (o.maxHeight < newHeight),\n\t\t\tisMinWidth = o.minWidth && (o.minWidth > newWidth),\n\t\t\tisMinHeight = o.minHeight && (o.minHeight > newHeight);\n\n\t\to.grid = grid;\n\n\t\tif (isMinWidth) {\n\t\t\tnewWidth = newWidth + gridX;\n\t\t}\n\t\tif (isMinHeight) {\n\t\t\tnewHeight = newHeight + gridY;\n\t\t}\n\t\tif (isMaxWidth) {\n\t\t\tnewWidth = newWidth - gridX;\n\t\t}\n\t\tif (isMaxHeight) {\n\t\t\tnewHeight = newHeight - gridY;\n\t\t}\n\n\t\tif (/^(se|s|e)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t} else if (/^(ne)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t} else if (/^(sw)$/.test(a)) {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.left = op.left - ox;\n\t\t} else {\n\t\t\tthat.size.width = newWidth;\n\t\t\tthat.size.height = newHeight;\n\t\t\tthat.position.top = op.top - oy;\n\t\t\tthat.position.left = op.left - ox;\n\t\t}\n\t}\n\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget(\"ui.selectable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoRefresh: true,\n\t\tdistance: 0,\n\t\tfilter: \"*\",\n\t\ttolerance: \"touch\",\n\n\t\t// callbacks\n\t\tselected: null,\n\t\tselecting: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tunselected: null,\n\t\tunselecting: null\n\t},\n\t_create: function() {\n\t\tvar selectees,\n\t\t\tthat = this;\n\n\t\tthis.element.addClass(\"ui-selectable\");\n\n\t\tthis.dragged = false;\n\n\t\t// cache selectee children based on filter\n\t\tthis.refresh = function() {\n\t\t\tselectees = $(that.options.filter, that.element[0]);\n\t\t\tselectees.addClass(\"ui-selectee\");\n\t\t\tselectees.each(function() {\n\t\t\t\tvar $this = $(this),\n\t\t\t\t\tpos = $this.offset();\n\t\t\t\t$.data(this, \"selectable-item\", {\n\t\t\t\t\telement: this,\n\t\t\t\t\t$element: $this,\n\t\t\t\t\tleft: pos.left,\n\t\t\t\t\ttop: pos.top,\n\t\t\t\t\tright: pos.left + $this.outerWidth(),\n\t\t\t\t\tbottom: pos.top + $this.outerHeight(),\n\t\t\t\t\tstartselected: false,\n\t\t\t\t\tselected: $this.hasClass(\"ui-selected\"),\n\t\t\t\t\tselecting: $this.hasClass(\"ui-selecting\"),\n\t\t\t\t\tunselecting: $this.hasClass(\"ui-unselecting\")\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\t\tthis.refresh();\n\n\t\tthis.selectees = selectees.addClass(\"ui-selectee\");\n\n\t\tthis._mouseInit();\n\n\t\tthis.helper = $(\"<div class='ui-selectable-helper'></div>\");\n\t},\n\n\t_destroy: function() {\n\t\tthis.selectees\n\t\t\t.removeClass(\"ui-selectee\")\n\t\t\t.removeData(\"selectable-item\");\n\t\tthis.element\n\t\t\t.removeClass(\"ui-selectable ui-selectable-disabled\");\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseStart: function(event) {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.opos = [event.pageX, event.pageY];\n\n\t\tif (this.options.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.selectees = $(options.filter, this.element[0]);\n\n\t\tthis._trigger(\"start\", event);\n\n\t\t$(options.appendTo).append(this.helper);\n\t\t// position helper (lasso)\n\t\tthis.helper.css({\n\t\t\t\"left\": event.pageX,\n\t\t\t\"top\": event.pageY,\n\t\t\t\"width\": 0,\n\t\t\t\"height\": 0\n\t\t});\n\n\t\tif (options.autoRefresh) {\n\t\t\tthis.refresh();\n\t\t}\n\n\t\tthis.selectees.filter(\".ui-selected\").each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.startselected = true;\n\t\t\tif (!event.metaKey && !event.ctrlKey) {\n\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\tselectee.selected = false;\n\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\tselectee.unselecting = true;\n\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\t$(event.target).parents().addBack().each(function() {\n\t\t\tvar doSelect,\n\t\t\t\tselectee = $.data(this, \"selectable-item\");\n\t\t\tif (selectee) {\n\t\t\t\tdoSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass(\"ui-selected\");\n\t\t\t\tselectee.$element\n\t\t\t\t\t.removeClass(doSelect ? \"ui-unselecting\" : \"ui-selected\")\n\t\t\t\t\t.addClass(doSelect ? \"ui-selecting\" : \"ui-unselecting\");\n\t\t\t\tselectee.unselecting = !doSelect;\n\t\t\t\tselectee.selecting = doSelect;\n\t\t\t\tselectee.selected = doSelect;\n\t\t\t\t// selectable (UN)SELECTING callback\n\t\t\t\tif (doSelect) {\n\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\n\t},\n\n\t_mouseDrag: function(event) {\n\n\t\tthis.dragged = true;\n\n\t\tif (this.options.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar tmp,\n\t\t\tthat = this,\n\t\t\toptions = this.options,\n\t\t\tx1 = this.opos[0],\n\t\t\ty1 = this.opos[1],\n\t\t\tx2 = event.pageX,\n\t\t\ty2 = event.pageY;\n\n\t\tif (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; }\n\t\tif (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; }\n\t\tthis.helper.css({left: x1, top: y1, width: x2-x1, height: y2-y1});\n\n\t\tthis.selectees.each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\"),\n\t\t\t\thit = false;\n\n\t\t\t//prevent helper from being selected if appendTo: selectable\n\t\t\tif (!selectee || selectee.element === that.element[0]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (options.tolerance === \"touch\") {\n\t\t\t\thit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) );\n\t\t\t} else if (options.tolerance === \"fit\") {\n\t\t\t\thit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2);\n\t\t\t}\n\n\t\t\tif (hit) {\n\t\t\t\t// SELECT\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\tselectee.selected = false;\n\t\t\t\t}\n\t\t\t\tif (selectee.unselecting) {\n\t\t\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\t\t\tselectee.unselecting = false;\n\t\t\t\t}\n\t\t\t\tif (!selectee.selecting) {\n\t\t\t\t\tselectee.$element.addClass(\"ui-selecting\");\n\t\t\t\t\tselectee.selecting = true;\n\t\t\t\t\t// selectable SELECTING callback\n\t\t\t\t\tthat._trigger(\"selecting\", event, {\n\t\t\t\t\t\tselecting: selectee.element\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// UNSELECT\n\t\t\t\tif (selectee.selecting) {\n\t\t\t\t\tif ((event.metaKey || event.ctrlKey) && selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tselectee.$element.addClass(\"ui-selected\");\n\t\t\t\t\t\tselectee.selected = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selecting\");\n\t\t\t\t\t\tselectee.selecting = false;\n\t\t\t\t\t\tif (selectee.startselected) {\n\t\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (selectee.selected) {\n\t\t\t\t\tif (!event.metaKey && !event.ctrlKey && !selectee.startselected) {\n\t\t\t\t\t\tselectee.$element.removeClass(\"ui-selected\");\n\t\t\t\t\t\tselectee.selected = false;\n\n\t\t\t\t\t\tselectee.$element.addClass(\"ui-unselecting\");\n\t\t\t\t\t\tselectee.unselecting = true;\n\t\t\t\t\t\t// selectable UNSELECTING callback\n\t\t\t\t\t\tthat._trigger(\"unselecting\", event, {\n\t\t\t\t\t\t\tunselecting: selectee.element\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function(event) {\n\t\tvar that = this;\n\n\t\tthis.dragged = false;\n\n\t\t$(\".ui-unselecting\", this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass(\"ui-unselecting\");\n\t\t\tselectee.unselecting = false;\n\t\t\tselectee.startselected = false;\n\t\t\tthat._trigger(\"unselected\", event, {\n\t\t\t\tunselected: selectee.element\n\t\t\t});\n\t\t});\n\t\t$(\".ui-selecting\", this.element[0]).each(function() {\n\t\t\tvar selectee = $.data(this, \"selectable-item\");\n\t\t\tselectee.$element.removeClass(\"ui-selecting\").addClass(\"ui-selected\");\n\t\t\tselectee.selecting = false;\n\t\t\tselectee.selected = true;\n\t\t\tselectee.startselected = true;\n\t\t\tthat._trigger(\"selected\", event, {\n\t\t\t\tselected: selectee.element\n\t\t\t});\n\t\t});\n\t\tthis._trigger(\"stop\", event);\n\n\t\tthis.helper.remove();\n\n\t\treturn false;\n\t}\n\n});\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n/*jshint loopfunc: true */\n\nfunction isOverAxis( x, reference, size ) {\n\treturn ( x > reference ) && ( x < ( reference + size ) );\n}\n\nfunction isFloating(item) {\n\treturn (/left|right/).test(item.css(\"float\")) || (/inline|table-cell/).test(item.css(\"display\"));\n}\n\n$.widget(\"ui.sortable\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"sort\",\n\tready: false,\n\toptions: {\n\t\tappendTo: \"parent\",\n\t\taxis: false,\n\t\tconnectWith: false,\n\t\tcontainment: false,\n\t\tcursor: \"auto\",\n\t\tcursorAt: false,\n\t\tdropOnEmpty: true,\n\t\tforcePlaceholderSize: false,\n\t\tforceHelperSize: false,\n\t\tgrid: false,\n\t\thandle: false,\n\t\thelper: \"original\",\n\t\titems: \"> *\",\n\t\topacity: false,\n\t\tplaceholder: false,\n\t\trevert: false,\n\t\tscroll: true,\n\t\tscrollSensitivity: 20,\n\t\tscrollSpeed: 20,\n\t\tscope: \"default\",\n\t\ttolerance: \"intersect\",\n\t\tzIndex: 1000,\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeStop: null,\n\t\tchange: null,\n\t\tdeactivate: null,\n\t\tout: null,\n\t\tover: null,\n\t\treceive: null,\n\t\tremove: null,\n\t\tsort: null,\n\t\tstart: null,\n\t\tstop: null,\n\t\tupdate: null\n\t},\n\t_create: function() {\n\n\t\tvar o = this.options;\n\t\tthis.containerCache = {};\n\t\tthis.element.addClass(\"ui-sortable\");\n\n\t\t//Get the items\n\t\tthis.refresh();\n\n\t\t//Let's determine if the items are being displayed horizontally\n\t\tthis.floating = this.items.length ? o.axis === \"x\" || isFloating(this.items[0].item) : false;\n\n\t\t//Let's determine the parent's offset\n\t\tthis.offset = this.element.offset();\n\n\t\t//Initialize mouse events for interaction\n\t\tthis._mouseInit();\n\n\t\t//We're ready to go\n\t\tthis.ready = true;\n\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass(\"ui-sortable ui-sortable-disabled\");\n\t\tthis._mouseDestroy();\n\n\t\tfor ( var i = this.items.length - 1; i >= 0; i-- ) {\n\t\t\tthis.items[i].item.removeData(this.widgetName + \"-item\");\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_setOption: function(key, value){\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.options[ key ] = value;\n\n\t\t\tthis.widget().toggleClass( \"ui-sortable-disabled\", !!value );\n\t\t} else {\n\t\t\t// Don't call widget base _setOption for disable as it adds ui-state-disabled class\n\t\t\t$.Widget.prototype._setOption.apply(this, arguments);\n\t\t}\n\t},\n\n\t_mouseCapture: function(event, overrideHandle) {\n\t\tvar currentItem = null,\n\t\t\tvalidHandle = false,\n\t\t\tthat = this;\n\n\t\tif (this.reverting) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif(this.options.disabled || this.options.type === \"static\") {\n\t\t\treturn false;\n\t\t}\n\n\t\t//We have to refresh the items data once first\n\t\tthis._refreshItems(event);\n\n\t\t//Find out if the clicked node (or one of its parents) is a actual item in this.items\n\t\t$(event.target).parents().each(function() {\n\t\t\tif($.data(this, that.widgetName + \"-item\") === that) {\n\t\t\t\tcurrentItem = $(this);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tif($.data(event.target, that.widgetName + \"-item\") === that) {\n\t\t\tcurrentItem = $(event.target);\n\t\t}\n\n\t\tif(!currentItem) {\n\t\t\treturn false;\n\t\t}\n\t\tif(this.options.handle && !overrideHandle) {\n\t\t\t$(this.options.handle, currentItem).find(\"*\").addBack().each(function() {\n\t\t\t\tif(this === event.target) {\n\t\t\t\t\tvalidHandle = true;\n\t\t\t\t}\n\t\t\t});\n\t\t\tif(!validHandle) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tthis.currentItem = currentItem;\n\t\tthis._removeCurrentsFromItems();\n\t\treturn true;\n\n\t},\n\n\t_mouseStart: function(event, overrideHandle, noActivation) {\n\n\t\tvar i, body,\n\t\t\to = this.options;\n\n\t\tthis.currentContainer = this;\n\n\t\t//We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture\n\t\tthis.refreshPositions();\n\n\t\t//Create and append the visible helper\n\t\tthis.helper = this._createHelper(event);\n\n\t\t//Cache the helper size\n\t\tthis._cacheHelperProportions();\n\n\t\t/*\n\t\t * - Position generation -\n\t\t * This block generates everything position related - it's the core of draggables.\n\t\t */\n\n\t\t//Cache the margins of the original element\n\t\tthis._cacheMargins();\n\n\t\t//Get the next scrolling parent\n\t\tthis.scrollParent = this.helper.scrollParent();\n\n\t\t//The element's absolute position on the page minus margins\n\t\tthis.offset = this.currentItem.offset();\n\t\tthis.offset = {\n\t\t\ttop: this.offset.top - this.margins.top,\n\t\t\tleft: this.offset.left - this.margins.left\n\t\t};\n\n\t\t$.extend(this.offset, {\n\t\t\tclick: { //Where the click happened, relative to the element\n\t\t\t\tleft: event.pageX - this.offset.left,\n\t\t\t\ttop: event.pageY - this.offset.top\n\t\t\t},\n\t\t\tparent: this._getParentOffset(),\n\t\t\trelative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper\n\t\t});\n\n\t\t// Only after we got the offset, we can change the helper's position to absolute\n\t\t// TODO: Still need to figure out a way to make relative sorting possible\n\t\tthis.helper.css(\"position\", \"absolute\");\n\t\tthis.cssPosition = this.helper.css(\"position\");\n\n\t\t//Generate the original position\n\t\tthis.originalPosition = this._generatePosition(event);\n\t\tthis.originalPageX = event.pageX;\n\t\tthis.originalPageY = event.pageY;\n\n\t\t//Adjust the mouse offset relative to the helper if \"cursorAt\" is supplied\n\t\t(o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt));\n\n\t\t//Cache the former DOM position\n\t\tthis.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] };\n\n\t\t//If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way\n\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\tthis.currentItem.hide();\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthis._createPlaceholder();\n\n\t\t//Set a containment if given in the options\n\t\tif(o.containment) {\n\t\t\tthis._setContainment();\n\t\t}\n\n\t\tif( o.cursor && o.cursor !== \"auto\" ) { // cursor option\n\t\t\tbody = this.document.find( \"body\" );\n\n\t\t\t// support: IE\n\t\t\tthis.storedCursor = body.css( \"cursor\" );\n\t\t\tbody.css( \"cursor\", o.cursor );\n\n\t\t\tthis.storedStylesheet = $( \"<style>*{ cursor: \"+o.cursor+\" !important; }</style>\" ).appendTo( body );\n\t\t}\n\n\t\tif(o.opacity) { // opacity option\n\t\t\tif (this.helper.css(\"opacity\")) {\n\t\t\t\tthis._storedOpacity = this.helper.css(\"opacity\");\n\t\t\t}\n\t\t\tthis.helper.css(\"opacity\", o.opacity);\n\t\t}\n\n\t\tif(o.zIndex) { // zIndex option\n\t\t\tif (this.helper.css(\"zIndex\")) {\n\t\t\t\tthis._storedZIndex = this.helper.css(\"zIndex\");\n\t\t\t}\n\t\t\tthis.helper.css(\"zIndex\", o.zIndex);\n\t\t}\n\n\t\t//Prepare scrolling\n\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\t\t\tthis.overflowOffset = this.scrollParent.offset();\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger(\"start\", event, this._uiHash());\n\n\t\t//Recache the helper size\n\t\tif(!this._preserveHelperProportions) {\n\t\t\tthis._cacheHelperProportions();\n\t\t}\n\n\n\t\t//Post \"activate\" events to possible containers\n\t\tif( !noActivation ) {\n\t\t\tfor ( i = this.containers.length - 1; i >= 0; i-- ) {\n\t\t\t\tthis.containers[ i ]._trigger( \"activate\", event, this._uiHash( this ) );\n\t\t\t}\n\t\t}\n\n\t\t//Prepare possible droppables\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.current = this;\n\t\t}\n\n\t\tif ($.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t}\n\n\t\tthis.dragging = true;\n\n\t\tthis.helper.addClass(\"ui-sortable-helper\");\n\t\tthis._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position\n\t\treturn true;\n\n\t},\n\n\t_mouseDrag: function(event) {\n\t\tvar i, item, itemElement, intersection,\n\t\t\to = this.options,\n\t\t\tscrolled = false;\n\n\t\t//Compute the helpers position\n\t\tthis.position = this._generatePosition(event);\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\tif (!this.lastPositionAbs) {\n\t\t\tthis.lastPositionAbs = this.positionAbs;\n\t\t}\n\n\t\t//Do scrolling\n\t\tif(this.options.scroll) {\n\t\t\tif(this.scrollParent[0] !== document && this.scrollParent[0].tagName !== \"HTML\") {\n\n\t\t\t\tif((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed;\n\t\t\t\t} else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t\tif((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed;\n\t\t\t\t} else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) {\n\t\t\t\t\tthis.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed;\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\tif(event.pageY - $(document).scrollTop() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed);\n\t\t\t\t} else if($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed);\n\t\t\t\t}\n\n\t\t\t\tif(event.pageX - $(document).scrollLeft() < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed);\n\t\t\t\t} else if($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) {\n\t\t\t\t\tscrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tif(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) {\n\t\t\t\t$.ui.ddmanager.prepareOffsets(this, event);\n\t\t\t}\n\t\t}\n\n\t\t//Regenerate the absolute position used for position checks\n\t\tthis.positionAbs = this._convertPositionTo(\"absolute\");\n\n\t\t//Set the helper position\n\t\tif(!this.options.axis || this.options.axis !== \"y\") {\n\t\t\tthis.helper[0].style.left = this.position.left+\"px\";\n\t\t}\n\t\tif(!this.options.axis || this.options.axis !== \"x\") {\n\t\t\tthis.helper[0].style.top = this.position.top+\"px\";\n\t\t}\n\n\t\t//Rearrange\n\t\tfor (i = this.items.length - 1; i >= 0; i--) {\n\n\t\t\t//Cache variables and intersection, continue if no intersection\n\t\t\titem = this.items[i];\n\t\t\titemElement = item.item[0];\n\t\t\tintersection = this._intersectsWithPointer(item);\n\t\t\tif (!intersection) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Only put the placeholder inside the current Container, skip all\n\t\t\t// items form other containers. This works because when moving\n\t\t\t// an item from one container to another the\n\t\t\t// currentContainer is switched before the placeholder is moved.\n\t\t\t//\n\t\t\t// Without this moving items in \"sub-sortables\" can cause the placeholder to jitter\n\t\t\t// beetween the outer and inner container.\n\t\t\tif (item.instance !== this.currentContainer) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// cannot intersect with itself\n\t\t\t// no useless actions that have been done before\n\t\t\t// no action if the item moved is the parent of the item checked\n\t\t\tif (itemElement !== this.currentItem[0] &&\n\t\t\t\tthis.placeholder[intersection === 1 ? \"next\" : \"prev\"]()[0] !== itemElement &&\n\t\t\t\t!$.contains(this.placeholder[0], itemElement) &&\n\t\t\t\t(this.options.type === \"semi-dynamic\" ? !$.contains(this.element[0], itemElement) : true)\n\t\t\t) {\n\n\t\t\t\tthis.direction = intersection === 1 ? \"down\" : \"up\";\n\n\t\t\t\tif (this.options.tolerance === \"pointer\" || this._intersectsWithSides(item)) {\n\t\t\t\t\tthis._rearrange(event, item);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t//Post events to containers\n\t\tthis._contactContainers(event);\n\n\t\t//Interconnect with droppables\n\t\tif($.ui.ddmanager) {\n\t\t\t$.ui.ddmanager.drag(this, event);\n\t\t}\n\n\t\t//Call callbacks\n\t\tthis._trigger(\"sort\", event, this._uiHash());\n\n\t\tthis.lastPositionAbs = this.positionAbs;\n\t\treturn false;\n\n\t},\n\n\t_mouseStop: function(event, noPropagation) {\n\n\t\tif(!event) {\n\t\t\treturn;\n\t\t}\n\n\t\t//If we are using droppables, inform the manager about the drop\n\t\tif ($.ui.ddmanager && !this.options.dropBehaviour) {\n\t\t\t$.ui.ddmanager.drop(this, event);\n\t\t}\n\n\t\tif(this.options.revert) {\n\t\t\tvar that = this,\n\t\t\t\tcur = this.placeholder.offset(),\n\t\t\t\taxis = this.options.axis,\n\t\t\t\tanimation = {};\n\n\t\t\tif ( !axis || axis === \"x\" ) {\n\t\t\t\tanimation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollLeft);\n\t\t\t}\n\t\t\tif ( !axis || axis === \"y\" ) {\n\t\t\t\tanimation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === document.body ? 0 : this.offsetParent[0].scrollTop);\n\t\t\t}\n\t\t\tthis.reverting = true;\n\t\t\t$(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() {\n\t\t\t\tthat._clear(event);\n\t\t\t});\n\t\t} else {\n\t\t\tthis._clear(event, noPropagation);\n\t\t}\n\n\t\treturn false;\n\n\t},\n\n\tcancel: function() {\n\n\t\tif(this.dragging) {\n\n\t\t\tthis._mouseUp({ target: null });\n\n\t\t\tif(this.options.helper === \"original\") {\n\t\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t\t} else {\n\t\t\t\tthis.currentItem.show();\n\t\t\t}\n\n\t\t\t//Post deactivating events to containers\n\t\t\tfor (var i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tthis.containers[i]._trigger(\"deactivate\", null, this._uiHash(this));\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", null, this._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.placeholder) {\n\t\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\t\tif(this.placeholder[0].parentNode) {\n\t\t\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\t\t\t}\n\t\t\tif(this.options.helper !== \"original\" && this.helper && this.helper[0].parentNode) {\n\t\t\t\tthis.helper.remove();\n\t\t\t}\n\n\t\t\t$.extend(this, {\n\t\t\t\thelper: null,\n\t\t\t\tdragging: false,\n\t\t\t\treverting: false,\n\t\t\t\t_noFinalSort: null\n\t\t\t});\n\n\t\t\tif(this.domPosition.prev) {\n\t\t\t\t$(this.domPosition.prev).after(this.currentItem);\n\t\t\t} else {\n\t\t\t\t$(this.domPosition.parent).prepend(this.currentItem);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\n\t},\n\n\tserialize: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\tstr = [];\n\t\to = o || {};\n\n\t\t$(items).each(function() {\n\t\t\tvar res = ($(o.item || this).attr(o.attribute || \"id\") || \"\").match(o.expression || (/(.+)[\\-=_](.+)/));\n\t\t\tif (res) {\n\t\t\t\tstr.push((o.key || res[1]+\"[]\")+\"=\"+(o.key && o.expression ? res[1] : res[2]));\n\t\t\t}\n\t\t});\n\n\t\tif(!str.length && o.key) {\n\t\t\tstr.push(o.key + \"=\");\n\t\t}\n\n\t\treturn str.join(\"&\");\n\n\t},\n\n\ttoArray: function(o) {\n\n\t\tvar items = this._getItemsAsjQuery(o && o.connected),\n\t\t\tret = [];\n\n\t\to = o || {};\n\n\t\titems.each(function() { ret.push($(o.item || this).attr(o.attribute || \"id\") || \"\"); });\n\t\treturn ret;\n\n\t},\n\n\t/* Be careful with the following core functions */\n\t_intersectsWith: function(item) {\n\n\t\tvar x1 = this.positionAbs.left,\n\t\t\tx2 = x1 + this.helperProportions.width,\n\t\t\ty1 = this.positionAbs.top,\n\t\t\ty2 = y1 + this.helperProportions.height,\n\t\t\tl = item.left,\n\t\t\tr = l + item.width,\n\t\t\tt = item.top,\n\t\t\tb = t + item.height,\n\t\t\tdyClick = this.offset.click.top,\n\t\t\tdxClick = this.offset.click.left,\n\t\t\tisOverElementHeight = ( this.options.axis === \"x\" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ),\n\t\t\tisOverElementWidth = ( this.options.axis === \"y\" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth;\n\n\t\tif ( this.options.tolerance === \"pointer\" ||\n\t\t\tthis.options.forcePointerForContainers ||\n\t\t\t(this.options.tolerance !== \"pointer\" && this.helperProportions[this.floating ? \"width\" : \"height\"] > item[this.floating ? \"width\" : \"height\"])\n\t\t) {\n\t\t\treturn isOverElement;\n\t\t} else {\n\n\t\t\treturn (l < x1 + (this.helperProportions.width / 2) && // Right Half\n\t\t\t\tx2 - (this.helperProportions.width / 2) < r && // Left Half\n\t\t\t\tt < y1 + (this.helperProportions.height / 2) && // Bottom Half\n\t\t\t\ty2 - (this.helperProportions.height / 2) < b ); // Top Half\n\n\t\t}\n\t},\n\n\t_intersectsWithPointer: function(item) {\n\n\t\tvar isOverElementHeight = (this.options.axis === \"x\") || isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height),\n\t\t\tisOverElementWidth = (this.options.axis === \"y\") || isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width),\n\t\t\tisOverElement = isOverElementHeight && isOverElementWidth,\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (!isOverElement) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn this.floating ?\n\t\t\t( ((horizontalDirection && horizontalDirection === \"right\") || verticalDirection === \"down\") ? 2 : 1 )\n\t\t\t: ( verticalDirection && (verticalDirection === \"down\" ? 2 : 1) );\n\n\t},\n\n\t_intersectsWithSides: function(item) {\n\n\t\tvar isOverBottomHalf = isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height),\n\t\t\tisOverRightHalf = isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width),\n\t\t\tverticalDirection = this._getDragVerticalDirection(),\n\t\t\thorizontalDirection = this._getDragHorizontalDirection();\n\n\t\tif (this.floating && horizontalDirection) {\n\t\t\treturn ((horizontalDirection === \"right\" && isOverRightHalf) || (horizontalDirection === \"left\" && !isOverRightHalf));\n\t\t} else {\n\t\t\treturn verticalDirection && ((verticalDirection === \"down\" && isOverBottomHalf) || (verticalDirection === \"up\" && !isOverBottomHalf));\n\t\t}\n\n\t},\n\n\t_getDragVerticalDirection: function() {\n\t\tvar delta = this.positionAbs.top - this.lastPositionAbs.top;\n\t\treturn delta !== 0 && (delta > 0 ? \"down\" : \"up\");\n\t},\n\n\t_getDragHorizontalDirection: function() {\n\t\tvar delta = this.positionAbs.left - this.lastPositionAbs.left;\n\t\treturn delta !== 0 && (delta > 0 ? \"right\" : \"left\");\n\t},\n\n\trefresh: function(event) {\n\t\tthis._refreshItems(event);\n\t\tthis.refreshPositions();\n\t\treturn this;\n\t},\n\n\t_connectWith: function() {\n\t\tvar options = this.options;\n\t\treturn options.connectWith.constructor === String ? [options.connectWith] : options.connectWith;\n\t},\n\n\t_getItemsAsjQuery: function(connected) {\n\n\t\tvar i, j, cur, inst,\n\t\t\titems = [],\n\t\t\tqueries = [],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif(connectWith && connected) {\n\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\tfor ( j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), inst]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tqueries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(\".ui-sortable-helper\").not(\".ui-sortable-placeholder\"), this]);\n\n\t\tfor (i = queries.length - 1; i >= 0; i--){\n\t\t\tqueries[i][0].each(function() {\n\t\t\t\titems.push(this);\n\t\t\t});\n\t\t}\n\n\t\treturn $(items);\n\n\t},\n\n\t_removeCurrentsFromItems: function() {\n\n\t\tvar list = this.currentItem.find(\":data(\" + this.widgetName + \"-item)\");\n\n\t\tthis.items = $.grep(this.items, function (item) {\n\t\t\tfor (var j=0; j < list.length; j++) {\n\t\t\t\tif(list[j] === item.item[0]) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t});\n\n\t},\n\n\t_refreshItems: function(event) {\n\n\t\tthis.items = [];\n\t\tthis.containers = [this];\n\n\t\tvar i, j, cur, inst, targetData, _queries, item, queriesLength,\n\t\t\titems = this.items,\n\t\t\tqueries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]],\n\t\t\tconnectWith = this._connectWith();\n\n\t\tif(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down\n\t\t\tfor (i = connectWith.length - 1; i >= 0; i--){\n\t\t\t\tcur = $(connectWith[i]);\n\t\t\t\tfor (j = cur.length - 1; j >= 0; j--){\n\t\t\t\t\tinst = $.data(cur[j], this.widgetFullName);\n\t\t\t\t\tif(inst && inst !== this && !inst.options.disabled) {\n\t\t\t\t\t\tqueries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]);\n\t\t\t\t\t\tthis.containers.push(inst);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (i = queries.length - 1; i >= 0; i--) {\n\t\t\ttargetData = queries[i][1];\n\t\t\t_queries = queries[i][0];\n\n\t\t\tfor (j=0, queriesLength = _queries.length; j < queriesLength; j++) {\n\t\t\t\titem = $(_queries[j]);\n\n\t\t\t\titem.data(this.widgetName + \"-item\", targetData); // Data for target checking (mouse manager)\n\n\t\t\t\titems.push({\n\t\t\t\t\titem: item,\n\t\t\t\t\tinstance: targetData,\n\t\t\t\t\twidth: 0, height: 0,\n\t\t\t\t\tleft: 0, top: 0\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t},\n\n\trefreshPositions: function(fast) {\n\n\t\t//This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change\n\t\tif(this.offsetParent && this.helper) {\n\t\t\tthis.offset.parent = this._getParentOffset();\n\t\t}\n\n\t\tvar i, item, t, p;\n\n\t\tfor (i = this.items.length - 1; i >= 0; i--){\n\t\t\titem = this.items[i];\n\n\t\t\t//We ignore calculating positions of all connected containers when we're not over them\n\t\t\tif(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tt = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item;\n\n\t\t\tif (!fast) {\n\t\t\t\titem.width = t.outerWidth();\n\t\t\t\titem.height = t.outerHeight();\n\t\t\t}\n\n\t\t\tp = t.offset();\n\t\t\titem.left = p.left;\n\t\t\titem.top = p.top;\n\t\t}\n\n\t\tif(this.options.custom && this.options.custom.refreshContainers) {\n\t\t\tthis.options.custom.refreshContainers.call(this);\n\t\t} else {\n\t\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\t\tp = this.containers[i].element.offset();\n\t\t\t\tthis.containers[i].containerCache.left = p.left;\n\t\t\t\tthis.containers[i].containerCache.top = p.top;\n\t\t\t\tthis.containers[i].containerCache.width\t= this.containers[i].element.outerWidth();\n\t\t\t\tthis.containers[i].containerCache.height = this.containers[i].element.outerHeight();\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_createPlaceholder: function(that) {\n\t\tthat = that || this;\n\t\tvar className,\n\t\t\to = that.options;\n\n\t\tif(!o.placeholder || o.placeholder.constructor === String) {\n\t\t\tclassName = o.placeholder;\n\t\t\to.placeholder = {\n\t\t\t\telement: function() {\n\n\t\t\t\t\tvar nodeName = that.currentItem[0].nodeName.toLowerCase(),\n\t\t\t\t\t\telement = $( \"<\" + nodeName + \">\", that.document[0] )\n\t\t\t\t\t\t\t.addClass(className || that.currentItem[0].className+\" ui-sortable-placeholder\")\n\t\t\t\t\t\t\t.removeClass(\"ui-sortable-helper\");\n\n\t\t\t\t\tif ( nodeName === \"tr\" ) {\n\t\t\t\t\t\tthat.currentItem.children().each(function() {\n\t\t\t\t\t\t\t$( \"<td>&#160;</td>\", that.document[0] )\n\t\t\t\t\t\t\t\t.attr( \"colspan\", $( this ).attr( \"colspan\" ) || 1 )\n\t\t\t\t\t\t\t\t.appendTo( element );\n\t\t\t\t\t\t});\n\t\t\t\t\t} else if ( nodeName === \"img\" ) {\n\t\t\t\t\t\telement.attr( \"src\", that.currentItem.attr( \"src\" ) );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !className ) {\n\t\t\t\t\t\telement.css( \"visibility\", \"hidden\" );\n\t\t\t\t\t}\n\n\t\t\t\t\treturn element;\n\t\t\t\t},\n\t\t\t\tupdate: function(container, p) {\n\n\t\t\t\t\t// 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that\n\t\t\t\t\t// 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified\n\t\t\t\t\tif(className && !o.forcePlaceholderSize) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t//If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item\n\t\t\t\t\tif(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css(\"paddingTop\")||0, 10) - parseInt(that.currentItem.css(\"paddingBottom\")||0, 10)); }\n\t\t\t\t\tif(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css(\"paddingLeft\")||0, 10) - parseInt(that.currentItem.css(\"paddingRight\")||0, 10)); }\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t//Create the placeholder\n\t\tthat.placeholder = $(o.placeholder.element.call(that.element, that.currentItem));\n\n\t\t//Append it after the actual current item\n\t\tthat.currentItem.after(that.placeholder);\n\n\t\t//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)\n\t\to.placeholder.update(that, that.placeholder);\n\n\t},\n\n\t_contactContainers: function(event) {\n\t\tvar i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, base, cur, nearBottom, floating,\n\t\t\tinnermostContainer = null,\n\t\t\tinnermostIndex = null;\n\n\t\t// get innermost container that intersects with item\n\t\tfor (i = this.containers.length - 1; i >= 0; i--) {\n\n\t\t\t// never consider a container that's located within the item itself\n\t\t\tif($.contains(this.currentItem[0], this.containers[i].element[0])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif(this._intersectsWith(this.containers[i].containerCache)) {\n\n\t\t\t\t// if we've already found a container and it's more \"inner\" than this, then continue\n\t\t\t\tif(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tinnermostContainer = this.containers[i];\n\t\t\t\tinnermostIndex = i;\n\n\t\t\t} else {\n\t\t\t\t// container doesn't intersect. trigger \"out\" event if necessary\n\t\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\t\tthis.containers[i]._trigger(\"out\", event, this._uiHash(this));\n\t\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// if no intersecting containers found, return\n\t\tif(!innermostContainer) {\n\t\t\treturn;\n\t\t}\n\n\t\t// move the item into the container if it's not there already\n\t\tif(this.containers.length === 1) {\n\t\t\tif (!this.containers[innermostIndex].containerCache.over) {\n\t\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t\t}\n\t\t} else {\n\n\t\t\t//When entering a new container, we will find the item with the least distance and append our item near it\n\t\t\tdist = 10000;\n\t\t\titemWithLeastDistance = null;\n\t\t\tfloating = innermostContainer.floating || isFloating(this.currentItem);\n\t\t\tposProperty = floating ? \"left\" : \"top\";\n\t\t\tsizeProperty = floating ? \"width\" : \"height\";\n\t\t\tbase = this.positionAbs[posProperty] + this.offset.click[posProperty];\n\t\t\tfor (j = this.items.length - 1; j >= 0; j--) {\n\t\t\t\tif(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif(this.items[j].item[0] === this.currentItem[0]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (floating && !isOverAxis(this.positionAbs.top + this.offset.click.top, this.items[j].top, this.items[j].height)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcur = this.items[j].item.offset()[posProperty];\n\t\t\t\tnearBottom = false;\n\t\t\t\tif(Math.abs(cur - base) > Math.abs(cur + this.items[j][sizeProperty] - base)){\n\t\t\t\t\tnearBottom = true;\n\t\t\t\t\tcur += this.items[j][sizeProperty];\n\t\t\t\t}\n\n\t\t\t\tif(Math.abs(cur - base) < dist) {\n\t\t\t\t\tdist = Math.abs(cur - base); itemWithLeastDistance = this.items[j];\n\t\t\t\t\tthis.direction = nearBottom ? \"up\": \"down\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Check if dropOnEmpty is enabled\n\t\t\tif(!itemWithLeastDistance && !this.options.dropOnEmpty) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(this.currentContainer === this.containers[innermostIndex]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\titemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true);\n\t\t\tthis._trigger(\"change\", event, this._uiHash());\n\t\t\tthis.containers[innermostIndex]._trigger(\"change\", event, this._uiHash(this));\n\t\t\tthis.currentContainer = this.containers[innermostIndex];\n\n\t\t\t//Update the placeholder\n\t\t\tthis.options.placeholder.update(this.currentContainer, this.placeholder);\n\n\t\t\tthis.containers[innermostIndex]._trigger(\"over\", event, this._uiHash(this));\n\t\t\tthis.containers[innermostIndex].containerCache.over = 1;\n\t\t}\n\n\n\t},\n\n\t_createHelper: function(event) {\n\n\t\tvar o = this.options,\n\t\t\thelper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === \"clone\" ? this.currentItem.clone() : this.currentItem);\n\n\t\t//Add the helper to the DOM if that didn't happen already\n\t\tif(!helper.parents(\"body\").length) {\n\t\t\t$(o.appendTo !== \"parent\" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]);\n\t\t}\n\n\t\tif(helper[0] === this.currentItem[0]) {\n\t\t\tthis._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css(\"position\"), top: this.currentItem.css(\"top\"), left: this.currentItem.css(\"left\") };\n\t\t}\n\n\t\tif(!helper[0].style.width || o.forceHelperSize) {\n\t\t\thelper.width(this.currentItem.width());\n\t\t}\n\t\tif(!helper[0].style.height || o.forceHelperSize) {\n\t\t\thelper.height(this.currentItem.height());\n\t\t}\n\n\t\treturn helper;\n\n\t},\n\n\t_adjustOffsetFromHelper: function(obj) {\n\t\tif (typeof obj === \"string\") {\n\t\t\tobj = obj.split(\" \");\n\t\t}\n\t\tif ($.isArray(obj)) {\n\t\t\tobj = {left: +obj[0], top: +obj[1] || 0};\n\t\t}\n\t\tif (\"left\" in obj) {\n\t\t\tthis.offset.click.left = obj.left + this.margins.left;\n\t\t}\n\t\tif (\"right\" in obj) {\n\t\t\tthis.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;\n\t\t}\n\t\tif (\"top\" in obj) {\n\t\t\tthis.offset.click.top = obj.top + this.margins.top;\n\t\t}\n\t\tif (\"bottom\" in obj) {\n\t\t\tthis.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;\n\t\t}\n\t},\n\n\t_getParentOffset: function() {\n\n\n\t\t//Get the offsetParent and cache its position\n\t\tthis.offsetParent = this.helper.offsetParent();\n\t\tvar po = this.offsetParent.offset();\n\n\t\t// This is a special case where we need to modify a offset calculated on start, since the following happened:\n\t\t// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent\n\t\t// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that\n\t\t//    the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag\n\t\tif(this.cssPosition === \"absolute\" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) {\n\t\t\tpo.left += this.scrollParent.scrollLeft();\n\t\t\tpo.top += this.scrollParent.scrollTop();\n\t\t}\n\n\t\t// This needs to be actually done for all browsers, since pageX/pageY includes this information\n\t\t// with an ugly IE fix\n\t\tif( this.offsetParent[0] === document.body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === \"html\" && $.ui.ie)) {\n\t\t\tpo = { top: 0, left: 0 };\n\t\t}\n\n\t\treturn {\n\t\t\ttop: po.top + (parseInt(this.offsetParent.css(\"borderTopWidth\"),10) || 0),\n\t\t\tleft: po.left + (parseInt(this.offsetParent.css(\"borderLeftWidth\"),10) || 0)\n\t\t};\n\n\t},\n\n\t_getRelativeOffset: function() {\n\n\t\tif(this.cssPosition === \"relative\") {\n\t\t\tvar p = this.currentItem.position();\n\t\t\treturn {\n\t\t\t\ttop: p.top - (parseInt(this.helper.css(\"top\"),10) || 0) + this.scrollParent.scrollTop(),\n\t\t\t\tleft: p.left - (parseInt(this.helper.css(\"left\"),10) || 0) + this.scrollParent.scrollLeft()\n\t\t\t};\n\t\t} else {\n\t\t\treturn { top: 0, left: 0 };\n\t\t}\n\n\t},\n\n\t_cacheMargins: function() {\n\t\tthis.margins = {\n\t\t\tleft: (parseInt(this.currentItem.css(\"marginLeft\"),10) || 0),\n\t\t\ttop: (parseInt(this.currentItem.css(\"marginTop\"),10) || 0)\n\t\t};\n\t},\n\n\t_cacheHelperProportions: function() {\n\t\tthis.helperProportions = {\n\t\t\twidth: this.helper.outerWidth(),\n\t\t\theight: this.helper.outerHeight()\n\t\t};\n\t},\n\n\t_setContainment: function() {\n\n\t\tvar ce, co, over,\n\t\t\to = this.options;\n\t\tif(o.containment === \"parent\") {\n\t\t\to.containment = this.helper[0].parentNode;\n\t\t}\n\t\tif(o.containment === \"document\" || o.containment === \"window\") {\n\t\t\tthis.containment = [\n\t\t\t\t0 - this.offset.relative.left - this.offset.parent.left,\n\t\t\t\t0 - this.offset.relative.top - this.offset.parent.top,\n\t\t\t\t$(o.containment === \"document\" ? document : window).width() - this.helperProportions.width - this.margins.left,\n\t\t\t\t($(o.containment === \"document\" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t\tif(!(/^(document|window|parent)$/).test(o.containment)) {\n\t\t\tce = $(o.containment)[0];\n\t\t\tco = $(o.containment).offset();\n\t\t\tover = ($(ce).css(\"overflow\") !== \"hidden\");\n\n\t\t\tthis.containment = [\n\t\t\t\tco.left + (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingLeft\"),10) || 0) - this.margins.left,\n\t\t\t\tco.top + (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) + (parseInt($(ce).css(\"paddingTop\"),10) || 0) - this.margins.top,\n\t\t\t\tco.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css(\"borderLeftWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingRight\"),10) || 0) - this.helperProportions.width - this.margins.left,\n\t\t\t\tco.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css(\"borderTopWidth\"),10) || 0) - (parseInt($(ce).css(\"paddingBottom\"),10) || 0) - this.helperProportions.height - this.margins.top\n\t\t\t];\n\t\t}\n\n\t},\n\n\t_convertPositionTo: function(d, pos) {\n\n\t\tif(!pos) {\n\t\t\tpos = this.position;\n\t\t}\n\t\tvar mod = d === \"absolute\" ? 1 : -1,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,\n\t\t\tscrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpos.top\t+\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.top * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top * mod -\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod)\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpos.left +\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.relative.left * mod +\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left * mod\t-\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod)\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_generatePosition: function(event) {\n\n\t\tvar top, left,\n\t\t\to = this.options,\n\t\t\tpageX = event.pageX,\n\t\t\tpageY = event.pageY,\n\t\t\tscroll = this.cssPosition === \"absolute\" && !(this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);\n\n\t\t// This is another very weird special case that only happens for relative elements:\n\t\t// 1. If the css position is relative\n\t\t// 2. and the scroll parent is the document or similar to the offset parent\n\t\t// we have to refresh the relative offset during the scroll so there are no jumps\n\t\tif(this.cssPosition === \"relative\" && !(this.scrollParent[0] !== document && this.scrollParent[0] !== this.offsetParent[0])) {\n\t\t\tthis.offset.relative = this._getRelativeOffset();\n\t\t}\n\n\t\t/*\n\t\t * - Position constraining -\n\t\t * Constrain the position to a mix of grid, containment.\n\t\t */\n\n\t\tif(this.originalPosition) { //If we are not dragging yet, we won't check for options\n\n\t\t\tif(this.containment) {\n\t\t\t\tif(event.pageX - this.offset.click.left < this.containment[0]) {\n\t\t\t\t\tpageX = this.containment[0] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top < this.containment[1]) {\n\t\t\t\t\tpageY = this.containment[1] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t\tif(event.pageX - this.offset.click.left > this.containment[2]) {\n\t\t\t\t\tpageX = this.containment[2] + this.offset.click.left;\n\t\t\t\t}\n\t\t\t\tif(event.pageY - this.offset.click.top > this.containment[3]) {\n\t\t\t\t\tpageY = this.containment[3] + this.offset.click.top;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(o.grid) {\n\t\t\t\ttop = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1];\n\t\t\t\tpageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top;\n\n\t\t\t\tleft = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0];\n\t\t\t\tpageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left;\n\t\t\t}\n\n\t\t}\n\n\t\treturn {\n\t\t\ttop: (\n\t\t\t\tpageY -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.top -\t\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.top\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.top +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ))\n\t\t\t),\n\t\t\tleft: (\n\t\t\t\tpageX -\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The absolute mouse position\n\t\t\t\tthis.offset.click.left -\t\t\t\t\t\t\t\t\t\t\t\t// Click offset (relative to the element)\n\t\t\t\tthis.offset.relative.left\t-\t\t\t\t\t\t\t\t\t\t\t// Only for relative positioned nodes: Relative offset from element to offset parent\n\t\t\t\tthis.offset.parent.left +\t\t\t\t\t\t\t\t\t\t\t\t// The offsetParent's offset without borders (offset + border)\n\t\t\t\t( ( this.cssPosition === \"fixed\" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ))\n\t\t\t)\n\t\t};\n\n\t},\n\n\t_rearrange: function(event, i, a, hardRefresh) {\n\n\t\ta ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === \"down\" ? i.item[0] : i.item[0].nextSibling));\n\n\t\t//Various things done here to improve the performance:\n\t\t// 1. we create a setTimeout, that calls refreshPositions\n\t\t// 2. on the instance, we have a counter variable, that get's higher after every append\n\t\t// 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same\n\t\t// 4. this lets only the last addition to the timeout stack through\n\t\tthis.counter = this.counter ? ++this.counter : 1;\n\t\tvar counter = this.counter;\n\n\t\tthis._delay(function() {\n\t\t\tif(counter === this.counter) {\n\t\t\t\tthis.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove\n\t\t\t}\n\t\t});\n\n\t},\n\n\t_clear: function(event, noPropagation) {\n\n\t\tthis.reverting = false;\n\t\t// We delay all events that have to be triggered to after the point where the placeholder has been removed and\n\t\t// everything else normalized again\n\t\tvar i,\n\t\t\tdelayedTriggers = [];\n\n\t\t// We first have to update the dom position of the actual currentItem\n\t\t// Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088)\n\t\tif(!this._noFinalSort && this.currentItem.parent().length) {\n\t\t\tthis.placeholder.before(this.currentItem);\n\t\t}\n\t\tthis._noFinalSort = null;\n\n\t\tif(this.helper[0] === this.currentItem[0]) {\n\t\t\tfor(i in this._storedCSS) {\n\t\t\t\tif(this._storedCSS[i] === \"auto\" || this._storedCSS[i] === \"static\") {\n\t\t\t\t\tthis._storedCSS[i] = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.currentItem.css(this._storedCSS).removeClass(\"ui-sortable-helper\");\n\t\t} else {\n\t\t\tthis.currentItem.show();\n\t\t}\n\n\t\tif(this.fromOutside && !noPropagation) {\n\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"receive\", event, this._uiHash(this.fromOutside)); });\n\t\t}\n\t\tif((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(\".ui-sortable-helper\")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) {\n\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"update\", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed\n\t\t}\n\n\t\t// Check if the items Container has Changed and trigger appropriate\n\t\t// events.\n\t\tif (this !== this.currentContainer) {\n\t\t\tif(!noPropagation) {\n\t\t\t\tdelayedTriggers.push(function(event) { this._trigger(\"remove\", event, this._uiHash()); });\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"receive\", event, this._uiHash(this)); };  }).call(this, this.currentContainer));\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"update\", event, this._uiHash(this));  }; }).call(this, this.currentContainer));\n\t\t\t}\n\t\t}\n\n\n\t\t//Post events to containers\n\t\tfor (i = this.containers.length - 1; i >= 0; i--){\n\t\t\tif(!noPropagation) {\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"deactivate\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t}\n\t\t\tif(this.containers[i].containerCache.over) {\n\t\t\t\tdelayedTriggers.push((function(c) { return function(event) { c._trigger(\"out\", event, this._uiHash(this)); };  }).call(this, this.containers[i]));\n\t\t\t\tthis.containers[i].containerCache.over = 0;\n\t\t\t}\n\t\t}\n\n\t\t//Do what was originally in plugins\n\t\tif ( this.storedCursor ) {\n\t\t\tthis.document.find( \"body\" ).css( \"cursor\", this.storedCursor );\n\t\t\tthis.storedStylesheet.remove();\n\t\t}\n\t\tif(this._storedOpacity) {\n\t\t\tthis.helper.css(\"opacity\", this._storedOpacity);\n\t\t}\n\t\tif(this._storedZIndex) {\n\t\t\tthis.helper.css(\"zIndex\", this._storedZIndex === \"auto\" ? \"\" : this._storedZIndex);\n\t\t}\n\n\t\tthis.dragging = false;\n\t\tif(this.cancelHelperRemoval) {\n\t\t\tif(!noPropagation) {\n\t\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t\t} //Trigger all delayed events\n\t\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t\t}\n\n\t\t\tthis.fromOutside = false;\n\t\t\treturn false;\n\t\t}\n\n\t\tif(!noPropagation) {\n\t\t\tthis._trigger(\"beforeStop\", event, this._uiHash());\n\t\t}\n\n\t\t//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node!\n\t\tthis.placeholder[0].parentNode.removeChild(this.placeholder[0]);\n\n\t\tif(this.helper[0] !== this.currentItem[0]) {\n\t\t\tthis.helper.remove();\n\t\t}\n\t\tthis.helper = null;\n\n\t\tif(!noPropagation) {\n\t\t\tfor (i=0; i < delayedTriggers.length; i++) {\n\t\t\t\tdelayedTriggers[i].call(this, event);\n\t\t\t} //Trigger all delayed events\n\t\t\tthis._trigger(\"stop\", event, this._uiHash());\n\t\t}\n\n\t\tthis.fromOutside = false;\n\t\treturn true;\n\n\t},\n\n\t_trigger: function() {\n\t\tif ($.Widget.prototype._trigger.apply(this, arguments) === false) {\n\t\t\tthis.cancel();\n\t\t}\n\t},\n\n\t_uiHash: function(_inst) {\n\t\tvar inst = _inst || this;\n\t\treturn {\n\t\t\thelper: inst.helper,\n\t\t\tplaceholder: inst.placeholder || $([]),\n\t\t\tposition: inst.position,\n\t\t\toriginalPosition: inst.originalPosition,\n\t\t\toffset: inst.positionAbs,\n\t\t\titem: inst.currentItem,\n\t\t\tsender: _inst ? _inst.element : null\n\t\t};\n\t}\n\n});\n\n})(jQuery);\n\n(function($, undefined) {\n\nvar dataSpace = \"ui-effects-\";\n\n$.effects = {\n\teffect: {}\n};\n\n/*!\n * jQuery Color Animations v2.1.2\n * https://github.com/jquery/jquery-color\n *\n * Copyright 2013 jQuery Foundation and other contributors\n * Released under the MIT license.\n * http://jquery.org/license\n *\n * Date: Wed Jan 16 08:47:09 2013 -0600\n */\n(function( jQuery, undefined ) {\n\n\tvar stepHooks = \"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",\n\n\t// plusequals test for += 100 -= 100\n\trplusequals = /^([\\-+])=\\s*(\\d+\\.?\\d*)/,\n\t// a set of RE's that can match strings and generate color tuples.\n\tstringParsers = [{\n\t\t\tre: /rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ],\n\t\t\t\t\texecResult[ 3 ],\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ] * 2.55,\n\t\t\t\t\texecResult[ 2 ] * 2.55,\n\t\t\t\t\texecResult[ 3 ] * 2.55,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\t// this regex ignores A-F because it's compared against an already lowercased string\n\t\t\tre: /#([a-f0-9])([a-f0-9])([a-f0-9])/,\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\tparseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),\n\t\t\t\t\tparseInt( execResult[ 3 ] + execResult[ 3 ], 16 )\n\t\t\t\t];\n\t\t\t}\n\t\t}, {\n\t\t\tre: /hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,\n\t\t\tspace: \"hsla\",\n\t\t\tparse: function( execResult ) {\n\t\t\t\treturn [\n\t\t\t\t\texecResult[ 1 ],\n\t\t\t\t\texecResult[ 2 ] / 100,\n\t\t\t\t\texecResult[ 3 ] / 100,\n\t\t\t\t\texecResult[ 4 ]\n\t\t\t\t];\n\t\t\t}\n\t\t}],\n\n\t// jQuery.Color( )\n\tcolor = jQuery.Color = function( color, green, blue, alpha ) {\n\t\treturn new jQuery.Color.fn.parse( color, green, blue, alpha );\n\t},\n\tspaces = {\n\t\trgba: {\n\t\t\tprops: {\n\t\t\t\tred: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tgreen: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t},\n\t\t\t\tblue: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"byte\"\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\thsla: {\n\t\t\tprops: {\n\t\t\t\thue: {\n\t\t\t\t\tidx: 0,\n\t\t\t\t\ttype: \"degrees\"\n\t\t\t\t},\n\t\t\t\tsaturation: {\n\t\t\t\t\tidx: 1,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t},\n\t\t\t\tlightness: {\n\t\t\t\t\tidx: 2,\n\t\t\t\t\ttype: \"percent\"\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tpropTypes = {\n\t\t\"byte\": {\n\t\t\tfloor: true,\n\t\t\tmax: 255\n\t\t},\n\t\t\"percent\": {\n\t\t\tmax: 1\n\t\t},\n\t\t\"degrees\": {\n\t\t\tmod: 360,\n\t\t\tfloor: true\n\t\t}\n\t},\n\tsupport = color.support = {},\n\n\t// element for support tests\n\tsupportElem = jQuery( \"<p>\" )[ 0 ],\n\n\t// colors = jQuery.Color.names\n\tcolors,\n\n\t// local aliases of functions called often\n\teach = jQuery.each;\n\n// determine rgba support immediately\nsupportElem.style.cssText = \"background-color:rgba(1,1,1,.5)\";\nsupport.rgba = supportElem.style.backgroundColor.indexOf( \"rgba\" ) > -1;\n\n// define cache name and alpha properties\n// for rgba and hsla spaces\neach( spaces, function( spaceName, space ) {\n\tspace.cache = \"_\" + spaceName;\n\tspace.props.alpha = {\n\t\tidx: 3,\n\t\ttype: \"percent\",\n\t\tdef: 1\n\t};\n});\n\nfunction clamp( value, prop, allowEmpty ) {\n\tvar type = propTypes[ prop.type ] || {};\n\n\tif ( value == null ) {\n\t\treturn (allowEmpty || !prop.def) ? null : prop.def;\n\t}\n\n\t// ~~ is an short way of doing floor for positive numbers\n\tvalue = type.floor ? ~~value : parseFloat( value );\n\n\t// IE will pass in empty strings as value for alpha,\n\t// which will hit this case\n\tif ( isNaN( value ) ) {\n\t\treturn prop.def;\n\t}\n\n\tif ( type.mod ) {\n\t\t// we add mod before modding to make sure that negatives values\n\t\t// get converted properly: -10 -> 350\n\t\treturn (value + type.mod) % type.mod;\n\t}\n\n\t// for now all property types without mod have min and max\n\treturn 0 > value ? 0 : type.max < value ? type.max : value;\n}\n\nfunction stringParse( string ) {\n\tvar inst = color(),\n\t\trgba = inst._rgba = [];\n\n\tstring = string.toLowerCase();\n\n\teach( stringParsers, function( i, parser ) {\n\t\tvar parsed,\n\t\t\tmatch = parser.re.exec( string ),\n\t\t\tvalues = match && parser.parse( match ),\n\t\t\tspaceName = parser.space || \"rgba\";\n\n\t\tif ( values ) {\n\t\t\tparsed = inst[ spaceName ]( values );\n\n\t\t\t// if this was an rgba parse the assignment might happen twice\n\t\t\t// oh well....\n\t\t\tinst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];\n\t\t\trgba = inst._rgba = parsed._rgba;\n\n\t\t\t// exit each( stringParsers ) here because we matched\n\t\t\treturn false;\n\t\t}\n\t});\n\n\t// Found a stringParser that handled it\n\tif ( rgba.length ) {\n\n\t\t// if this came from a parsed string, force \"transparent\" when alpha is 0\n\t\t// chrome, (and maybe others) return \"transparent\" as rgba(0,0,0,0)\n\t\tif ( rgba.join() === \"0,0,0,0\" ) {\n\t\t\tjQuery.extend( rgba, colors.transparent );\n\t\t}\n\t\treturn inst;\n\t}\n\n\t// named colors\n\treturn colors[ string ];\n}\n\ncolor.fn = jQuery.extend( color.prototype, {\n\tparse: function( red, green, blue, alpha ) {\n\t\tif ( red === undefined ) {\n\t\t\tthis._rgba = [ null, null, null, null ];\n\t\t\treturn this;\n\t\t}\n\t\tif ( red.jquery || red.nodeType ) {\n\t\t\tred = jQuery( red ).css( green );\n\t\t\tgreen = undefined;\n\t\t}\n\n\t\tvar inst = this,\n\t\t\ttype = jQuery.type( red ),\n\t\t\trgba = this._rgba = [];\n\n\t\t// more than 1 argument specified - assume ( red, green, blue, alpha )\n\t\tif ( green !== undefined ) {\n\t\t\tred = [ red, green, blue, alpha ];\n\t\t\ttype = \"array\";\n\t\t}\n\n\t\tif ( type === \"string\" ) {\n\t\t\treturn this.parse( stringParse( red ) || colors._default );\n\t\t}\n\n\t\tif ( type === \"array\" ) {\n\t\t\teach( spaces.rgba.props, function( key, prop ) {\n\t\t\t\trgba[ prop.idx ] = clamp( red[ prop.idx ], prop );\n\t\t\t});\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( type === \"object\" ) {\n\t\t\tif ( red instanceof color ) {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tif ( red[ space.cache ] ) {\n\t\t\t\t\t\tinst[ space.cache ] = red[ space.cache ].slice();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\teach( spaces, function( spaceName, space ) {\n\t\t\t\t\tvar cache = space.cache;\n\t\t\t\t\teach( space.props, function( key, prop ) {\n\n\t\t\t\t\t\t// if the cache doesn't exist, and we know how to convert\n\t\t\t\t\t\tif ( !inst[ cache ] && space.to ) {\n\n\t\t\t\t\t\t\t// if the value was null, we don't need to copy it\n\t\t\t\t\t\t\t// if the key was alpha, we don't need to copy it either\n\t\t\t\t\t\t\tif ( key === \"alpha\" || red[ key ] == null ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tinst[ cache ] = space.to( inst._rgba );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// this is the only case where we allow nulls for ALL properties.\n\t\t\t\t\t\t// call clamp with alwaysAllowEmpty\n\t\t\t\t\t\tinst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );\n\t\t\t\t\t});\n\n\t\t\t\t\t// everything defined but alpha?\n\t\t\t\t\tif ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {\n\t\t\t\t\t\t// use the default of 1\n\t\t\t\t\t\tinst[ cache ][ 3 ] = 1;\n\t\t\t\t\t\tif ( space.from ) {\n\t\t\t\t\t\t\tinst._rgba = space.from( inst[ cache ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t},\n\tis: function( compare ) {\n\t\tvar is = color( compare ),\n\t\t\tsame = true,\n\t\t\tinst = this;\n\n\t\teach( spaces, function( _, space ) {\n\t\t\tvar localCache,\n\t\t\t\tisCache = is[ space.cache ];\n\t\t\tif (isCache) {\n\t\t\t\tlocalCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];\n\t\t\t\teach( space.props, function( _, prop ) {\n\t\t\t\t\tif ( isCache[ prop.idx ] != null ) {\n\t\t\t\t\t\tsame = ( isCache[ prop.idx ] === localCache[ prop.idx ] );\n\t\t\t\t\t\treturn same;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn same;\n\t\t});\n\t\treturn same;\n\t},\n\t_space: function() {\n\t\tvar used = [],\n\t\t\tinst = this;\n\t\teach( spaces, function( spaceName, space ) {\n\t\t\tif ( inst[ space.cache ] ) {\n\t\t\t\tused.push( spaceName );\n\t\t\t}\n\t\t});\n\t\treturn used.pop();\n\t},\n\ttransition: function( other, distance ) {\n\t\tvar end = color( other ),\n\t\t\tspaceName = end._space(),\n\t\t\tspace = spaces[ spaceName ],\n\t\t\tstartColor = this.alpha() === 0 ? color( \"transparent\" ) : this,\n\t\t\tstart = startColor[ space.cache ] || space.to( startColor._rgba ),\n\t\t\tresult = start.slice();\n\n\t\tend = end[ space.cache ];\n\t\teach( space.props, function( key, prop ) {\n\t\t\tvar index = prop.idx,\n\t\t\t\tstartValue = start[ index ],\n\t\t\t\tendValue = end[ index ],\n\t\t\t\ttype = propTypes[ prop.type ] || {};\n\n\t\t\t// if null, don't override start value\n\t\t\tif ( endValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// if null - use end\n\t\t\tif ( startValue === null ) {\n\t\t\t\tresult[ index ] = endValue;\n\t\t\t} else {\n\t\t\t\tif ( type.mod ) {\n\t\t\t\t\tif ( endValue - startValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue += type.mod;\n\t\t\t\t\t} else if ( startValue - endValue > type.mod / 2 ) {\n\t\t\t\t\t\tstartValue -= type.mod;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tresult[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );\n\t\t\t}\n\t\t});\n\t\treturn this[ spaceName ]( result );\n\t},\n\tblend: function( opaque ) {\n\t\t// if we are already opaque - return ourself\n\t\tif ( this._rgba[ 3 ] === 1 ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tvar rgb = this._rgba.slice(),\n\t\t\ta = rgb.pop(),\n\t\t\tblend = color( opaque )._rgba;\n\n\t\treturn color( jQuery.map( rgb, function( v, i ) {\n\t\t\treturn ( 1 - a ) * blend[ i ] + a * v;\n\t\t}));\n\t},\n\ttoRgbaString: function() {\n\t\tvar prefix = \"rgba(\",\n\t\t\trgba = jQuery.map( this._rgba, function( v, i ) {\n\t\t\t\treturn v == null ? ( i > 2 ? 1 : 0 ) : v;\n\t\t\t});\n\n\t\tif ( rgba[ 3 ] === 1 ) {\n\t\t\trgba.pop();\n\t\t\tprefix = \"rgb(\";\n\t\t}\n\n\t\treturn prefix + rgba.join() + \")\";\n\t},\n\ttoHslaString: function() {\n\t\tvar prefix = \"hsla(\",\n\t\t\thsla = jQuery.map( this.hsla(), function( v, i ) {\n\t\t\t\tif ( v == null ) {\n\t\t\t\t\tv = i > 2 ? 1 : 0;\n\t\t\t\t}\n\n\t\t\t\t// catch 1 and 2\n\t\t\t\tif ( i && i < 3 ) {\n\t\t\t\t\tv = Math.round( v * 100 ) + \"%\";\n\t\t\t\t}\n\t\t\t\treturn v;\n\t\t\t});\n\n\t\tif ( hsla[ 3 ] === 1 ) {\n\t\t\thsla.pop();\n\t\t\tprefix = \"hsl(\";\n\t\t}\n\t\treturn prefix + hsla.join() + \")\";\n\t},\n\ttoHexString: function( includeAlpha ) {\n\t\tvar rgba = this._rgba.slice(),\n\t\t\talpha = rgba.pop();\n\n\t\tif ( includeAlpha ) {\n\t\t\trgba.push( ~~( alpha * 255 ) );\n\t\t}\n\n\t\treturn \"#\" + jQuery.map( rgba, function( v ) {\n\n\t\t\t// default to 0 when nulls exist\n\t\t\tv = ( v || 0 ).toString( 16 );\n\t\t\treturn v.length === 1 ? \"0\" + v : v;\n\t\t}).join(\"\");\n\t},\n\ttoString: function() {\n\t\treturn this._rgba[ 3 ] === 0 ? \"transparent\" : this.toRgbaString();\n\t}\n});\ncolor.fn.parse.prototype = color.fn;\n\n// hsla conversions adapted from:\n// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021\n\nfunction hue2rgb( p, q, h ) {\n\th = ( h + 1 ) % 1;\n\tif ( h * 6 < 1 ) {\n\t\treturn p + (q - p) * h * 6;\n\t}\n\tif ( h * 2 < 1) {\n\t\treturn q;\n\t}\n\tif ( h * 3 < 2 ) {\n\t\treturn p + (q - p) * ((2/3) - h) * 6;\n\t}\n\treturn p;\n}\n\nspaces.hsla.to = function ( rgba ) {\n\tif ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {\n\t\treturn [ null, null, null, rgba[ 3 ] ];\n\t}\n\tvar r = rgba[ 0 ] / 255,\n\t\tg = rgba[ 1 ] / 255,\n\t\tb = rgba[ 2 ] / 255,\n\t\ta = rgba[ 3 ],\n\t\tmax = Math.max( r, g, b ),\n\t\tmin = Math.min( r, g, b ),\n\t\tdiff = max - min,\n\t\tadd = max + min,\n\t\tl = add * 0.5,\n\t\th, s;\n\n\tif ( min === max ) {\n\t\th = 0;\n\t} else if ( r === max ) {\n\t\th = ( 60 * ( g - b ) / diff ) + 360;\n\t} else if ( g === max ) {\n\t\th = ( 60 * ( b - r ) / diff ) + 120;\n\t} else {\n\t\th = ( 60 * ( r - g ) / diff ) + 240;\n\t}\n\n\t// chroma (diff) == 0 means greyscale which, by definition, saturation = 0%\n\t// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)\n\tif ( diff === 0 ) {\n\t\ts = 0;\n\t} else if ( l <= 0.5 ) {\n\t\ts = diff / add;\n\t} else {\n\t\ts = diff / ( 2 - add );\n\t}\n\treturn [ Math.round(h) % 360, s, l, a == null ? 1 : a ];\n};\n\nspaces.hsla.from = function ( hsla ) {\n\tif ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {\n\t\treturn [ null, null, null, hsla[ 3 ] ];\n\t}\n\tvar h = hsla[ 0 ] / 360,\n\t\ts = hsla[ 1 ],\n\t\tl = hsla[ 2 ],\n\t\ta = hsla[ 3 ],\n\t\tq = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,\n\t\tp = 2 * l - q;\n\n\treturn [\n\t\tMath.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h ) * 255 ),\n\t\tMath.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),\n\t\ta\n\t];\n};\n\n\neach( spaces, function( spaceName, space ) {\n\tvar props = space.props,\n\t\tcache = space.cache,\n\t\tto = space.to,\n\t\tfrom = space.from;\n\n\t// makes rgba() and hsla()\n\tcolor.fn[ spaceName ] = function( value ) {\n\n\t\t// generate a cache for this space if it doesn't exist\n\t\tif ( to && !this[ cache ] ) {\n\t\t\tthis[ cache ] = to( this._rgba );\n\t\t}\n\t\tif ( value === undefined ) {\n\t\t\treturn this[ cache ].slice();\n\t\t}\n\n\t\tvar ret,\n\t\t\ttype = jQuery.type( value ),\n\t\t\tarr = ( type === \"array\" || type === \"object\" ) ? value : arguments,\n\t\t\tlocal = this[ cache ].slice();\n\n\t\teach( props, function( key, prop ) {\n\t\t\tvar val = arr[ type === \"object\" ? key : prop.idx ];\n\t\t\tif ( val == null ) {\n\t\t\t\tval = local[ prop.idx ];\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = clamp( val, prop );\n\t\t});\n\n\t\tif ( from ) {\n\t\t\tret = color( from( local ) );\n\t\t\tret[ cache ] = local;\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn color( local );\n\t\t}\n\t};\n\n\t// makes red() green() blue() alpha() hue() saturation() lightness()\n\teach( props, function( key, prop ) {\n\t\t// alpha is included in more than one space\n\t\tif ( color.fn[ key ] ) {\n\t\t\treturn;\n\t\t}\n\t\tcolor.fn[ key ] = function( value ) {\n\t\t\tvar vtype = jQuery.type( value ),\n\t\t\t\tfn = ( key === \"alpha\" ? ( this._hsla ? \"hsla\" : \"rgba\" ) : spaceName ),\n\t\t\t\tlocal = this[ fn ](),\n\t\t\t\tcur = local[ prop.idx ],\n\t\t\t\tmatch;\n\n\t\t\tif ( vtype === \"undefined\" ) {\n\t\t\t\treturn cur;\n\t\t\t}\n\n\t\t\tif ( vtype === \"function\" ) {\n\t\t\t\tvalue = value.call( this, cur );\n\t\t\t\tvtype = jQuery.type( value );\n\t\t\t}\n\t\t\tif ( value == null && prop.empty ) {\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tif ( vtype === \"string\" ) {\n\t\t\t\tmatch = rplusequals.exec( value );\n\t\t\t\tif ( match ) {\n\t\t\t\t\tvalue = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === \"+\" ? 1 : -1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\tlocal[ prop.idx ] = value;\n\t\t\treturn this[ fn ]( local );\n\t\t};\n\t});\n});\n\n// add cssHook and .fx.step function for each named hook.\n// accept a space separated string of properties\ncolor.hook = function( hook ) {\n\tvar hooks = hook.split( \" \" );\n\teach( hooks, function( i, hook ) {\n\t\tjQuery.cssHooks[ hook ] = {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar parsed, curElem,\n\t\t\t\t\tbackgroundColor = \"\";\n\n\t\t\t\tif ( value !== \"transparent\" && ( jQuery.type( value ) !== \"string\" || ( parsed = stringParse( value ) ) ) ) {\n\t\t\t\t\tvalue = color( parsed || value );\n\t\t\t\t\tif ( !support.rgba && value._rgba[ 3 ] !== 1 ) {\n\t\t\t\t\t\tcurElem = hook === \"backgroundColor\" ? elem.parentNode : elem;\n\t\t\t\t\t\twhile (\n\t\t\t\t\t\t\t(backgroundColor === \"\" || backgroundColor === \"transparent\") &&\n\t\t\t\t\t\t\tcurElem && curElem.style\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tbackgroundColor = jQuery.css( curElem, \"backgroundColor\" );\n\t\t\t\t\t\t\t\tcurElem = curElem.parentNode;\n\t\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tvalue = value.blend( backgroundColor && backgroundColor !== \"transparent\" ?\n\t\t\t\t\t\t\tbackgroundColor :\n\t\t\t\t\t\t\t\"_default\" );\n\t\t\t\t\t}\n\n\t\t\t\t\tvalue = value.toRgbaString();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\telem.style[ hook ] = value;\n\t\t\t\t} catch( e ) {\n\t\t\t\t\t// wrapped to prevent IE from throwing errors on \"invalid\" values like 'auto' or 'inherit'\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tjQuery.fx.step[ hook ] = function( fx ) {\n\t\t\tif ( !fx.colorInit ) {\n\t\t\t\tfx.start = color( fx.elem, hook );\n\t\t\t\tfx.end = color( fx.end );\n\t\t\t\tfx.colorInit = true;\n\t\t\t}\n\t\t\tjQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );\n\t\t};\n\t});\n\n};\n\ncolor.hook( stepHooks );\n\njQuery.cssHooks.borderColor = {\n\texpand: function( value ) {\n\t\tvar expanded = {};\n\n\t\teach( [ \"Top\", \"Right\", \"Bottom\", \"Left\" ], function( i, part ) {\n\t\t\texpanded[ \"border\" + part + \"Color\" ] = value;\n\t\t});\n\t\treturn expanded;\n\t}\n};\n\n// Basic color names only.\n// Usage of any of the other color names requires adding yourself or including\n// jquery.color.svg-names.js.\ncolors = jQuery.Color.names = {\n\t// 4.1. Basic color keywords\n\taqua: \"#00ffff\",\n\tblack: \"#000000\",\n\tblue: \"#0000ff\",\n\tfuchsia: \"#ff00ff\",\n\tgray: \"#808080\",\n\tgreen: \"#008000\",\n\tlime: \"#00ff00\",\n\tmaroon: \"#800000\",\n\tnavy: \"#000080\",\n\tolive: \"#808000\",\n\tpurple: \"#800080\",\n\tred: \"#ff0000\",\n\tsilver: \"#c0c0c0\",\n\tteal: \"#008080\",\n\twhite: \"#ffffff\",\n\tyellow: \"#ffff00\",\n\n\t// 4.2.3. \"transparent\" color keyword\n\ttransparent: [ null, null, null, 0 ],\n\n\t_default: \"#ffffff\"\n};\n\n})( jQuery );\n\n\n/******************************************************************************/\n/****************************** CLASS ANIMATIONS ******************************/\n/******************************************************************************/\n(function() {\n\nvar classAnimationActions = [ \"add\", \"remove\", \"toggle\" ],\n\tshorthandStyles = {\n\t\tborder: 1,\n\t\tborderBottom: 1,\n\t\tborderColor: 1,\n\t\tborderLeft: 1,\n\t\tborderRight: 1,\n\t\tborderTop: 1,\n\t\tborderWidth: 1,\n\t\tmargin: 1,\n\t\tpadding: 1\n\t};\n\n$.each([ \"borderLeftStyle\", \"borderRightStyle\", \"borderBottomStyle\", \"borderTopStyle\" ], function( _, prop ) {\n\t$.fx.step[ prop ] = function( fx ) {\n\t\tif ( fx.end !== \"none\" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {\n\t\t\tjQuery.style( fx.elem, prop, fx.end );\n\t\t\tfx.setAttr = true;\n\t\t}\n\t};\n});\n\nfunction getElementStyles( elem ) {\n\tvar key, len,\n\t\tstyle = elem.ownerDocument.defaultView ?\n\t\t\telem.ownerDocument.defaultView.getComputedStyle( elem, null ) :\n\t\t\telem.currentStyle,\n\t\tstyles = {};\n\n\tif ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {\n\t\tlen = style.length;\n\t\twhile ( len-- ) {\n\t\t\tkey = style[ len ];\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ $.camelCase( key ) ] = style[ key ];\n\t\t\t}\n\t\t}\n\t// support: Opera, IE <9\n\t} else {\n\t\tfor ( key in style ) {\n\t\t\tif ( typeof style[ key ] === \"string\" ) {\n\t\t\t\tstyles[ key ] = style[ key ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn styles;\n}\n\n\nfunction styleDifference( oldStyle, newStyle ) {\n\tvar diff = {},\n\t\tname, value;\n\n\tfor ( name in newStyle ) {\n\t\tvalue = newStyle[ name ];\n\t\tif ( oldStyle[ name ] !== value ) {\n\t\t\tif ( !shorthandStyles[ name ] ) {\n\t\t\t\tif ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {\n\t\t\t\t\tdiff[ name ] = value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn diff;\n}\n\n// support: jQuery <1.8\nif ( !$.fn.addBack ) {\n\t$.fn.addBack = function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter( selector )\n\t\t);\n\t};\n}\n\n$.effects.animateClass = function( value, duration, easing, callback ) {\n\tvar o = $.speed( duration, easing, callback );\n\n\treturn this.queue( function() {\n\t\tvar animated = $( this ),\n\t\t\tbaseClass = animated.attr( \"class\" ) || \"\",\n\t\t\tapplyClassChange,\n\t\t\tallAnimations = o.children ? animated.find( \"*\" ).addBack() : animated;\n\n\t\t// map the animated objects to store the original styles.\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tvar el = $( this );\n\t\t\treturn {\n\t\t\t\tel: el,\n\t\t\t\tstart: getElementStyles( this )\n\t\t\t};\n\t\t});\n\n\t\t// apply class change\n\t\tapplyClassChange = function() {\n\t\t\t$.each( classAnimationActions, function(i, action) {\n\t\t\t\tif ( value[ action ] ) {\n\t\t\t\t\tanimated[ action + \"Class\" ]( value[ action ] );\n\t\t\t\t}\n\t\t\t});\n\t\t};\n\t\tapplyClassChange();\n\n\t\t// map all animated objects again - calculate new styles and diff\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tthis.end = getElementStyles( this.el[ 0 ] );\n\t\t\tthis.diff = styleDifference( this.start, this.end );\n\t\t\treturn this;\n\t\t});\n\n\t\t// apply original class\n\t\tanimated.attr( \"class\", baseClass );\n\n\t\t// map all animated objects again - this time collecting a promise\n\t\tallAnimations = allAnimations.map(function() {\n\t\t\tvar styleInfo = this,\n\t\t\t\tdfd = $.Deferred(),\n\t\t\t\topts = $.extend({}, o, {\n\t\t\t\t\tqueue: false,\n\t\t\t\t\tcomplete: function() {\n\t\t\t\t\t\tdfd.resolve( styleInfo );\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\tthis.el.animate( this.diff, opts );\n\t\t\treturn dfd.promise();\n\t\t});\n\n\t\t// once all animations have completed:\n\t\t$.when.apply( $, allAnimations.get() ).done(function() {\n\n\t\t\t// set the final class\n\t\t\tapplyClassChange();\n\n\t\t\t// for each animated element,\n\t\t\t// clear all css properties that were animated\n\t\t\t$.each( arguments, function() {\n\t\t\t\tvar el = this.el;\n\t\t\t\t$.each( this.diff, function(key) {\n\t\t\t\t\tel.css( key, \"\" );\n\t\t\t\t});\n\t\t\t});\n\n\t\t\t// this is guarnteed to be there if you use jQuery.speed()\n\t\t\t// it also handles dequeuing the next anim...\n\t\t\to.complete.call( animated[ 0 ] );\n\t\t});\n\t});\n};\n\n$.fn.extend({\n\taddClass: (function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn speed ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ add: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.addClass ),\n\n\tremoveClass: (function( orig ) {\n\t\treturn function( classNames, speed, easing, callback ) {\n\t\t\treturn arguments.length > 1 ?\n\t\t\t\t$.effects.animateClass.call( this,\n\t\t\t\t\t{ remove: classNames }, speed, easing, callback ) :\n\t\t\t\torig.apply( this, arguments );\n\t\t};\n\t})( $.fn.removeClass ),\n\n\ttoggleClass: (function( orig ) {\n\t\treturn function( classNames, force, speed, easing, callback ) {\n\t\t\tif ( typeof force === \"boolean\" || force === undefined ) {\n\t\t\t\tif ( !speed ) {\n\t\t\t\t\t// without speed parameter\n\t\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t\t} else {\n\t\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t\t(force ? { add: classNames } : { remove: classNames }),\n\t\t\t\t\t\tspeed, easing, callback );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// without force parameter\n\t\t\t\treturn $.effects.animateClass.call( this,\n\t\t\t\t\t{ toggle: classNames }, force, speed, easing );\n\t\t\t}\n\t\t};\n\t})( $.fn.toggleClass ),\n\n\tswitchClass: function( remove, add, speed, easing, callback) {\n\t\treturn $.effects.animateClass.call( this, {\n\t\t\tadd: add,\n\t\t\tremove: remove\n\t\t}, speed, easing, callback );\n\t}\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EFFECTS **********************************/\n/******************************************************************************/\n\n(function() {\n\n$.extend( $.effects, {\n\tversion: \"1.10.3\",\n\n\t// Saves a set of properties in a data storage\n\tsave: function( element, set ) {\n\t\tfor( var i=0; i < set.length; i++ ) {\n\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\telement.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Restores a set of previously saved properties from a data storage\n\trestore: function( element, set ) {\n\t\tvar val, i;\n\t\tfor( i=0; i < set.length; i++ ) {\n\t\t\tif ( set[ i ] !== null ) {\n\t\t\t\tval = element.data( dataSpace + set[ i ] );\n\t\t\t\t// support: jQuery 1.6.2\n\t\t\t\t// http://bugs.jquery.com/ticket/9917\n\t\t\t\t// jQuery 1.6.2 incorrectly returns undefined for any falsy value.\n\t\t\t\t// We can't differentiate between \"\" and 0 here, so we just assume\n\t\t\t\t// empty string since it's likely to be a more common value...\n\t\t\t\tif ( val === undefined ) {\n\t\t\t\t\tval = \"\";\n\t\t\t\t}\n\t\t\t\telement.css( set[ i ], val );\n\t\t\t}\n\t\t}\n\t},\n\n\tsetMode: function( el, mode ) {\n\t\tif (mode === \"toggle\") {\n\t\t\tmode = el.is( \":hidden\" ) ? \"show\" : \"hide\";\n\t\t}\n\t\treturn mode;\n\t},\n\n\t// Translates a [top,left] array into a baseline value\n\t// this should be a little more flexible in the future to handle a string & hash\n\tgetBaseline: function( origin, original ) {\n\t\tvar y, x;\n\t\tswitch ( origin[ 0 ] ) {\n\t\t\tcase \"top\": y = 0; break;\n\t\t\tcase \"middle\": y = 0.5; break;\n\t\t\tcase \"bottom\": y = 1; break;\n\t\t\tdefault: y = origin[ 0 ] / original.height;\n\t\t}\n\t\tswitch ( origin[ 1 ] ) {\n\t\t\tcase \"left\": x = 0; break;\n\t\t\tcase \"center\": x = 0.5; break;\n\t\t\tcase \"right\": x = 1; break;\n\t\t\tdefault: x = origin[ 1 ] / original.width;\n\t\t}\n\t\treturn {\n\t\t\tx: x,\n\t\t\ty: y\n\t\t};\n\t},\n\n\t// Wraps the element around a wrapper that copies position properties\n\tcreateWrapper: function( element ) {\n\n\t\t// if the element is already wrapped, return it\n\t\tif ( element.parent().is( \".ui-effects-wrapper\" )) {\n\t\t\treturn element.parent();\n\t\t}\n\n\t\t// wrap the element\n\t\tvar props = {\n\t\t\t\twidth: element.outerWidth(true),\n\t\t\t\theight: element.outerHeight(true),\n\t\t\t\t\"float\": element.css( \"float\" )\n\t\t\t},\n\t\t\twrapper = $( \"<div></div>\" )\n\t\t\t\t.addClass( \"ui-effects-wrapper\" )\n\t\t\t\t.css({\n\t\t\t\t\tfontSize: \"100%\",\n\t\t\t\t\tbackground: \"transparent\",\n\t\t\t\t\tborder: \"none\",\n\t\t\t\t\tmargin: 0,\n\t\t\t\t\tpadding: 0\n\t\t\t\t}),\n\t\t\t// Store the size in case width/height are defined in % - Fixes #5245\n\t\t\tsize = {\n\t\t\t\twidth: element.width(),\n\t\t\t\theight: element.height()\n\t\t\t},\n\t\t\tactive = document.activeElement;\n\n\t\t// support: Firefox\n\t\t// Firefox incorrectly exposes anonymous content\n\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=561664\n\t\ttry {\n\t\t\tactive.id;\n\t\t} catch( e ) {\n\t\t\tactive = document.body;\n\t\t}\n\n\t\telement.wrap( wrapper );\n\n\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t$( active ).focus();\n\t\t}\n\n\t\twrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element\n\n\t\t// transfer positioning properties to the wrapper\n\t\tif ( element.css( \"position\" ) === \"static\" ) {\n\t\t\twrapper.css({ position: \"relative\" });\n\t\t\telement.css({ position: \"relative\" });\n\t\t} else {\n\t\t\t$.extend( props, {\n\t\t\t\tposition: element.css( \"position\" ),\n\t\t\t\tzIndex: element.css( \"z-index\" )\n\t\t\t});\n\t\t\t$.each([ \"top\", \"left\", \"bottom\", \"right\" ], function(i, pos) {\n\t\t\t\tprops[ pos ] = element.css( pos );\n\t\t\t\tif ( isNaN( parseInt( props[ pos ], 10 ) ) ) {\n\t\t\t\t\tprops[ pos ] = \"auto\";\n\t\t\t\t}\n\t\t\t});\n\t\t\telement.css({\n\t\t\t\tposition: \"relative\",\n\t\t\t\ttop: 0,\n\t\t\t\tleft: 0,\n\t\t\t\tright: \"auto\",\n\t\t\t\tbottom: \"auto\"\n\t\t\t});\n\t\t}\n\t\telement.css(size);\n\n\t\treturn wrapper.css( props ).show();\n\t},\n\n\tremoveWrapper: function( element ) {\n\t\tvar active = document.activeElement;\n\n\t\tif ( element.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t\telement.parent().replaceWith( element );\n\n\t\t\t// Fixes #7595 - Elements lose focus when wrapped.\n\t\t\tif ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {\n\t\t\t\t$( active ).focus();\n\t\t\t}\n\t\t}\n\n\n\t\treturn element;\n\t},\n\n\tsetTransition: function( element, list, factor, value ) {\n\t\tvalue = value || {};\n\t\t$.each( list, function( i, x ) {\n\t\t\tvar unit = element.cssUnit( x );\n\t\t\tif ( unit[ 0 ] > 0 ) {\n\t\t\t\tvalue[ x ] = unit[ 0 ] * factor + unit[ 1 ];\n\t\t\t}\n\t\t});\n\t\treturn value;\n\t}\n});\n\n// return an effect options object for the given parameters:\nfunction _normalizeArguments( effect, options, speed, callback ) {\n\n\t// allow passing all options as the first parameter\n\tif ( $.isPlainObject( effect ) ) {\n\t\toptions = effect;\n\t\teffect = effect.effect;\n\t}\n\n\t// convert to an object\n\teffect = { effect: effect };\n\n\t// catch (effect, null, ...)\n\tif ( options == null ) {\n\t\toptions = {};\n\t}\n\n\t// catch (effect, callback)\n\tif ( $.isFunction( options ) ) {\n\t\tcallback = options;\n\t\tspeed = null;\n\t\toptions = {};\n\t}\n\n\t// catch (effect, speed, ?)\n\tif ( typeof options === \"number\" || $.fx.speeds[ options ] ) {\n\t\tcallback = speed;\n\t\tspeed = options;\n\t\toptions = {};\n\t}\n\n\t// catch (effect, options, callback)\n\tif ( $.isFunction( speed ) ) {\n\t\tcallback = speed;\n\t\tspeed = null;\n\t}\n\n\t// add options to effect\n\tif ( options ) {\n\t\t$.extend( effect, options );\n\t}\n\n\tspeed = speed || options.duration;\n\teffect.duration = $.fx.off ? 0 :\n\t\ttypeof speed === \"number\" ? speed :\n\t\tspeed in $.fx.speeds ? $.fx.speeds[ speed ] :\n\t\t$.fx.speeds._default;\n\n\teffect.complete = callback || options.complete;\n\n\treturn effect;\n}\n\nfunction standardAnimationOption( option ) {\n\t// Valid standard speeds (nothing, number, named speed)\n\tif ( !option || typeof option === \"number\" || $.fx.speeds[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Invalid strings - treat as \"normal\" speed\n\tif ( typeof option === \"string\" && !$.effects.effect[ option ] ) {\n\t\treturn true;\n\t}\n\n\t// Complete callback\n\tif ( $.isFunction( option ) ) {\n\t\treturn true;\n\t}\n\n\t// Options hash (but not naming an effect)\n\tif ( typeof option === \"object\" && !option.effect ) {\n\t\treturn true;\n\t}\n\n\t// Didn't match any standard API\n\treturn false;\n}\n\n$.fn.extend({\n\teffect: function( /* effect, options, speed, callback */ ) {\n\t\tvar args = _normalizeArguments.apply( this, arguments ),\n\t\t\tmode = args.mode,\n\t\t\tqueue = args.queue,\n\t\t\teffectMethod = $.effects.effect[ args.effect ];\n\n\t\tif ( $.fx.off || !effectMethod ) {\n\t\t\t// delegate to the original method (e.g., .show()) if possible\n\t\t\tif ( mode ) {\n\t\t\t\treturn this[ mode ]( args.duration, args.complete );\n\t\t\t} else {\n\t\t\t\treturn this.each( function() {\n\t\t\t\t\tif ( args.complete ) {\n\t\t\t\t\t\targs.complete.call( this );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tfunction run( next ) {\n\t\t\tvar elem = $( this ),\n\t\t\t\tcomplete = args.complete,\n\t\t\t\tmode = args.mode;\n\n\t\t\tfunction done() {\n\t\t\t\tif ( $.isFunction( complete ) ) {\n\t\t\t\t\tcomplete.call( elem[0] );\n\t\t\t\t}\n\t\t\t\tif ( $.isFunction( next ) ) {\n\t\t\t\t\tnext();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If the element already has the correct final state, delegate to\n\t\t\t// the core methods so the internal tracking of \"olddisplay\" works.\n\t\t\tif ( elem.is( \":hidden\" ) ? mode === \"hide\" : mode === \"show\" ) {\n\t\t\t\telem[ mode ]();\n\t\t\t\tdone();\n\t\t\t} else {\n\t\t\t\teffectMethod.call( elem[0], args, done );\n\t\t\t}\n\t\t}\n\n\t\treturn queue === false ? this.each( run ) : this.queue( queue || \"fx\", run );\n\t},\n\n\tshow: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"show\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.show ),\n\n\thide: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"hide\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.hide ),\n\n\ttoggle: (function( orig ) {\n\t\treturn function( option ) {\n\t\t\tif ( standardAnimationOption( option ) || typeof option === \"boolean\" ) {\n\t\t\t\treturn orig.apply( this, arguments );\n\t\t\t} else {\n\t\t\t\tvar args = _normalizeArguments.apply( this, arguments );\n\t\t\t\targs.mode = \"toggle\";\n\t\t\t\treturn this.effect.call( this, args );\n\t\t\t}\n\t\t};\n\t})( $.fn.toggle ),\n\n\t// helper functions\n\tcssUnit: function(key) {\n\t\tvar style = this.css( key ),\n\t\t\tval = [];\n\n\t\t$.each( [ \"em\", \"px\", \"%\", \"pt\" ], function( i, unit ) {\n\t\t\tif ( style.indexOf( unit ) > 0 ) {\n\t\t\t\tval = [ parseFloat( style ), unit ];\n\t\t\t}\n\t\t});\n\t\treturn val;\n\t}\n});\n\n})();\n\n/******************************************************************************/\n/*********************************** EASING ***********************************/\n/******************************************************************************/\n\n(function() {\n\n// based on easing equations from Robert Penner (http://www.robertpenner.com/easing)\n\nvar baseEasings = {};\n\n$.each( [ \"Quad\", \"Cubic\", \"Quart\", \"Quint\", \"Expo\" ], function( i, name ) {\n\tbaseEasings[ name ] = function( p ) {\n\t\treturn Math.pow( p, i + 2 );\n\t};\n});\n\n$.extend( baseEasings, {\n\tSine: function ( p ) {\n\t\treturn 1 - Math.cos( p * Math.PI / 2 );\n\t},\n\tCirc: function ( p ) {\n\t\treturn 1 - Math.sqrt( 1 - p * p );\n\t},\n\tElastic: function( p ) {\n\t\treturn p === 0 || p === 1 ? p :\n\t\t\t-Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 );\n\t},\n\tBack: function( p ) {\n\t\treturn p * p * ( 3 * p - 2 );\n\t},\n\tBounce: function ( p ) {\n\t\tvar pow2,\n\t\t\tbounce = 4;\n\n\t\twhile ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}\n\t\treturn 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );\n\t}\n});\n\n$.each( baseEasings, function( name, easeIn ) {\n\t$.easing[ \"easeIn\" + name ] = easeIn;\n\t$.easing[ \"easeOut\" + name ] = function( p ) {\n\t\treturn 1 - easeIn( 1 - p );\n\t};\n\t$.easing[ \"easeInOut\" + name ] = function( p ) {\n\t\treturn p < 0.5 ?\n\t\t\teaseIn( p * 2 ) / 2 :\n\t\t\t1 - easeIn( p * -2 + 2 ) / 2;\n\t};\n});\n\n})();\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nvar uid = 0,\n\thideProps = {},\n\tshowProps = {};\n\nhideProps.height = hideProps.paddingTop = hideProps.paddingBottom =\n\thideProps.borderTopWidth = hideProps.borderBottomWidth = \"hide\";\nshowProps.height = showProps.paddingTop = showProps.paddingBottom =\n\tshowProps.borderTopWidth = showProps.borderBottomWidth = \"show\";\n\n$.widget( \"ui.accordion\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tactive: 0,\n\t\tanimate: {},\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theader: \"> li > :first-child,> :not(li):even\",\n\t\theightStyle: \"auto\",\n\t\ticons: {\n\t\t\tactiveHeader: \"ui-icon-triangle-1-s\",\n\t\t\theader: \"ui-icon-triangle-1-e\"\n\t\t},\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null\n\t},\n\n\t_create: function() {\n\t\tvar options = this.options;\n\t\tthis.prevShow = this.prevHide = $();\n\t\tthis.element.addClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t// ARIA\n\t\t\t.attr( \"role\", \"tablist\" );\n\n\t\t// don't allow collapsible: false and active: false / null\n\t\tif ( !options.collapsible && (options.active === false || options.active == null) ) {\n\t\t\toptions.active = 0;\n\t\t}\n\n\t\tthis._processPanels();\n\t\t// handle negative values\n\t\tif ( options.active < 0 ) {\n\t\t\toptions.active += this.headers.length;\n\t\t}\n\t\tthis._refresh();\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\theader: this.active,\n\t\t\tpanel: !this.active.length ? $() : this.active.next(),\n\t\t\tcontent: !this.active.length ? $() : this.active.next()\n\t\t};\n\t},\n\n\t_createIcons: function() {\n\t\tvar icons = this.options.icons;\n\t\tif ( icons ) {\n\t\t\t$( \"<span>\" )\n\t\t\t\t.addClass( \"ui-accordion-header-icon ui-icon \" + icons.header )\n\t\t\t\t.prependTo( this.headers );\n\t\t\tthis.active.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.removeClass( icons.header )\n\t\t\t\t.addClass( icons.activeHeader );\n\t\t\tthis.headers.addClass( \"ui-accordion-icons\" );\n\t\t}\n\t},\n\n\t_destroyIcons: function() {\n\t\tthis.headers\n\t\t\t.removeClass( \"ui-accordion-icons\" )\n\t\t\t.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.remove();\n\t},\n\n\t_destroy: function() {\n\t\tvar contents;\n\n\t\t// clean up main element\n\t\tthis.element\n\t\t\t.removeClass( \"ui-accordion ui-widget ui-helper-reset\" )\n\t\t\t.removeAttr( \"role\" );\n\n\t\t// clean up headers\n\t\tthis.headers\n\t\t\t.removeClass( \"ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t.removeAttr( \"aria-controls\" )\n\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t.each(function() {\n\t\t\t\tif ( /^ui-accordion/.test( this.id ) ) {\n\t\t\t\t\tthis.removeAttribute( \"id\" );\n\t\t\t\t}\n\t\t\t});\n\t\tthis._destroyIcons();\n\n\t\t// clean up content panels\n\t\tcontents = this.headers.next()\n\t\t\t.css( \"display\", \"\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t.removeClass( \"ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled\" )\n\t\t\t.each(function() {\n\t\t\t\tif ( /^ui-accordion/.test( this.id ) ) {\n\t\t\t\t\tthis.removeAttribute( \"id\" );\n\t\t\t\t}\n\t\t\t});\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tcontents.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tif ( this.options.event ) {\n\t\t\t\tthis._off( this.headers, this.options.event );\n\t\t\t}\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\t// setting collapsible: false while collapsed; open first panel\n\t\tif ( key === \"collapsible\" && !value && this.options.active === false ) {\n\t\t\tthis._activate( 0 );\n\t\t}\n\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis._destroyIcons();\n\t\t\tif ( value ) {\n\t\t\t\tthis._createIcons();\n\t\t\t}\n\t\t}\n\n\t\t// #5332 - opacity doesn't cascade to positioned elements in IE\n\t\t// so we need to add the disabled class to the headers and panels\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.headers.add( this.headers.next() )\n\t\t\t\t.toggleClass( \"ui-state-disabled\", !!value );\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\t/*jshint maxcomplexity:15*/\n\t\tif ( event.altKey || event.ctrlKey ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar keyCode = $.ui.keyCode,\n\t\t\tlength = this.headers.length,\n\t\t\tcurrentIndex = this.headers.index( event.target ),\n\t\t\ttoFocus = false;\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase keyCode.RIGHT:\n\t\t\tcase keyCode.DOWN:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex + 1 ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.LEFT:\n\t\t\tcase keyCode.UP:\n\t\t\t\ttoFocus = this.headers[ ( currentIndex - 1 + length ) % length ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.SPACE:\n\t\t\tcase keyCode.ENTER:\n\t\t\t\tthis._eventHandler( event );\n\t\t\t\tbreak;\n\t\t\tcase keyCode.HOME:\n\t\t\t\ttoFocus = this.headers[ 0 ];\n\t\t\t\tbreak;\n\t\t\tcase keyCode.END:\n\t\t\t\ttoFocus = this.headers[ length - 1 ];\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif ( toFocus ) {\n\t\t\t$( event.target ).attr( \"tabIndex\", -1 );\n\t\t\t$( toFocus ).attr( \"tabIndex\", 0 );\n\t\t\ttoFocus.focus();\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_panelKeyDown : function( event ) {\n\t\tif ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {\n\t\t\t$( event.currentTarget ).prev().focus();\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options;\n\t\tthis._processPanels();\n\n\t\t// was collapsed or no panel\n\t\tif ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\t\t// active false only when collapsible is true\n\t\t} else if ( options.active === false ) {\n\t\t\tthis._activate( 0 );\n\t\t// was active, but active panel is gone\n\t\t} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t// all remaining panel are disabled\n\t\t\tif ( this.headers.length === this.headers.find(\".ui-state-disabled\").length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// activate previous panel\n\t\t\t} else {\n\t\t\t\tthis._activate( Math.max( 0, options.active - 1 ) );\n\t\t\t}\n\t\t// was active, active panel still exists\n\t\t} else {\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.headers.index( this.active );\n\t\t}\n\n\t\tthis._destroyIcons();\n\n\t\tthis._refresh();\n\t},\n\n\t_processPanels: function() {\n\t\tthis.headers = this.element.find( this.options.header )\n\t\t\t.addClass( \"ui-accordion-header ui-helper-reset ui-state-default ui-corner-all\" );\n\n\t\tthis.headers.next()\n\t\t\t.addClass( \"ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom\" )\n\t\t\t.filter(\":not(.ui-accordion-content-active)\")\n\t\t\t.hide();\n\t},\n\n\t_refresh: function() {\n\t\tvar maxHeight,\n\t\t\toptions = this.options,\n\t\t\theightStyle = options.heightStyle,\n\t\t\tparent = this.element.parent(),\n\t\t\taccordionId = this.accordionId = \"ui-accordion-\" +\n\t\t\t\t(this.element.attr( \"id\" ) || ++uid);\n\n\t\tthis.active = this._findActive( options.active )\n\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" )\n\t\t\t.removeClass( \"ui-corner-all\" );\n\t\tthis.active.next()\n\t\t\t.addClass( \"ui-accordion-content-active\" )\n\t\t\t.show();\n\n\t\tthis.headers\n\t\t\t.attr( \"role\", \"tab\" )\n\t\t\t.each(function( i ) {\n\t\t\t\tvar header = $( this ),\n\t\t\t\t\theaderId = header.attr( \"id\" ),\n\t\t\t\t\tpanel = header.next(),\n\t\t\t\t\tpanelId = panel.attr( \"id\" );\n\t\t\t\tif ( !headerId ) {\n\t\t\t\t\theaderId = accordionId + \"-header-\" + i;\n\t\t\t\t\theader.attr( \"id\", headerId );\n\t\t\t\t}\n\t\t\t\tif ( !panelId ) {\n\t\t\t\t\tpanelId = accordionId + \"-panel-\" + i;\n\t\t\t\t\tpanel.attr( \"id\", panelId );\n\t\t\t\t}\n\t\t\t\theader.attr( \"aria-controls\", panelId );\n\t\t\t\tpanel.attr( \"aria-labelledby\", headerId );\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr( \"role\", \"tabpanel\" );\n\n\t\tthis.headers\n\t\t\t.not( this.active )\n\t\t\t.attr({\n\t\t\t\t\"aria-selected\": \"false\",\n\t\t\t\ttabIndex: -1\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t\t})\n\t\t\t\t.hide();\n\n\t\t// make sure at least one header is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.headers.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active.attr({\n\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\ttabIndex: 0\n\t\t\t})\n\t\t\t.next()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t});\n\t\t}\n\n\t\tthis._createIcons();\n\n\t\tthis._setupEvents( options.event );\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.headers.each(function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t\t})\n\t\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.headers.next()\n\t\t\t\t.each(function() {\n\t\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).css( \"height\", \"\" ).height() );\n\t\t\t\t})\n\t\t\t\t.height( maxHeight );\n\t\t}\n\t},\n\n\t_activate: function( index ) {\n\t\tvar active = this._findActive( index )[ 0 ];\n\n\t\t// trying to activate the already active panel\n\t\tif ( active === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// trying to collapse, simulate a click on the currently active header\n\t\tactive = active || this.active[ 0 ];\n\n\t\tthis._eventHandler({\n\t\t\ttarget: active,\n\t\t\tcurrentTarget: active,\n\t\t\tpreventDefault: $.noop\n\t\t});\n\t},\n\n\t_findActive: function( selector ) {\n\t\treturn typeof selector === \"number\" ? this.headers.eq( selector ) : $();\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {\n\t\t\tkeydown: \"_keydown\"\n\t\t};\n\t\tif ( event ) {\n\t\t\t$.each( event.split(\" \"), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t});\n\t\t}\n\n\t\tthis._off( this.headers.add( this.headers.next() ) );\n\t\tthis._on( this.headers, events );\n\t\tthis._on( this.headers.next(), { keydown: \"_panelKeyDown\" });\n\t\tthis._hoverable( this.headers );\n\t\tthis._focusable( this.headers );\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tclicked = $( event.currentTarget ),\n\t\t\tclickedIsActive = clicked[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : clicked.next(),\n\t\t\ttoHide = active.next(),\n\t\t\teventData = {\n\t\t\t\toldHeader: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewHeader: collapsing ? $() : clicked,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif (\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.headers.index( clicked );\n\n\t\t// when the call to ._toggle() comes after the class changes\n\t\t// it causes a very odd bug in IE 8 (see #6720)\n\t\tthis.active = clickedIsActive ? $() : clicked;\n\t\tthis._toggle( eventData );\n\n\t\t// switch classes\n\t\t// corner classes on the previously active header stay after the animation\n\t\tactive.removeClass( \"ui-accordion-header-active ui-state-active\" );\n\t\tif ( options.icons ) {\n\t\t\tactive.children( \".ui-accordion-header-icon\" )\n\t\t\t\t.removeClass( options.icons.activeHeader )\n\t\t\t\t.addClass( options.icons.header );\n\t\t}\n\n\t\tif ( !clickedIsActive ) {\n\t\t\tclicked\n\t\t\t\t.removeClass( \"ui-corner-all\" )\n\t\t\t\t.addClass( \"ui-accordion-header-active ui-state-active ui-corner-top\" );\n\t\t\tif ( options.icons ) {\n\t\t\t\tclicked.children( \".ui-accordion-header-icon\" )\n\t\t\t\t\t.removeClass( options.icons.header )\n\t\t\t\t\t.addClass( options.icons.activeHeader );\n\t\t\t}\n\n\t\t\tclicked\n\t\t\t\t.next()\n\t\t\t\t.addClass( \"ui-accordion-content-active\" );\n\t\t}\n\t},\n\n\t_toggle: function( data ) {\n\t\tvar toShow = data.newPanel,\n\t\t\ttoHide = this.prevShow.length ? this.prevShow : data.oldPanel;\n\n\t\t// handle activating a panel during the animation for another activation\n\t\tthis.prevShow.add( this.prevHide ).stop( true, true );\n\t\tthis.prevShow = toShow;\n\t\tthis.prevHide = toHide;\n\n\t\tif ( this.options.animate ) {\n\t\t\tthis._animate( toShow, toHide, data );\n\t\t} else {\n\t\t\ttoHide.hide();\n\t\t\ttoShow.show();\n\t\t\tthis._toggleComplete( data );\n\t\t}\n\n\t\ttoHide.attr({\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\"aria-hidden\": \"true\"\n\t\t});\n\t\ttoHide.prev().attr( \"aria-selected\", \"false\" );\n\t\t// if we're switching panels, remove the old header from the tab order\n\t\t// if we're opening from collapsed state, remove the previous header from the tab order\n\t\t// if we're collapsing, then keep the collapsing header in the tab order\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\ttoHide.prev().attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.headers.filter(function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t})\n\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow\n\t\t\t.attr({\n\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t})\n\t\t\t.prev()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t});\n\t},\n\n\t_animate: function( toShow, toHide, data ) {\n\t\tvar total, easing, duration,\n\t\t\tthat = this,\n\t\t\tadjust = 0,\n\t\t\tdown = toShow.length &&\n\t\t\t\t( !toHide.length || ( toShow.index() < toHide.index() ) ),\n\t\t\tanimate = this.options.animate || {},\n\t\t\toptions = down && animate.down || animate,\n\t\t\tcomplete = function() {\n\t\t\t\tthat._toggleComplete( data );\n\t\t\t};\n\n\t\tif ( typeof options === \"number\" ) {\n\t\t\tduration = options;\n\t\t}\n\t\tif ( typeof options === \"string\" ) {\n\t\t\teasing = options;\n\t\t}\n\t\t// fall back from options to animation in case of partial down settings\n\t\teasing = easing || options.easing || animate.easing;\n\t\tduration = duration || options.duration || animate.duration;\n\n\t\tif ( !toHide.length ) {\n\t\t\treturn toShow.animate( showProps, duration, easing, complete );\n\t\t}\n\t\tif ( !toShow.length ) {\n\t\t\treturn toHide.animate( hideProps, duration, easing, complete );\n\t\t}\n\n\t\ttotal = toShow.show().outerHeight();\n\t\ttoHide.animate( hideProps, {\n\t\t\tduration: duration,\n\t\t\teasing: easing,\n\t\t\tstep: function( now, fx ) {\n\t\t\t\tfx.now = Math.round( now );\n\t\t\t}\n\t\t});\n\t\ttoShow\n\t\t\t.hide()\n\t\t\t.animate( showProps, {\n\t\t\t\tduration: duration,\n\t\t\t\teasing: easing,\n\t\t\t\tcomplete: complete,\n\t\t\t\tstep: function( now, fx ) {\n\t\t\t\t\tfx.now = Math.round( now );\n\t\t\t\t\tif ( fx.prop !== \"height\" ) {\n\t\t\t\t\t\tadjust += fx.now;\n\t\t\t\t\t} else if ( that.options.heightStyle !== \"content\" ) {\n\t\t\t\t\t\tfx.now = Math.round( total - toHide.outerHeight() - adjust );\n\t\t\t\t\t\tadjust = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t},\n\n\t_toggleComplete: function( data ) {\n\t\tvar toHide = data.oldPanel;\n\n\t\ttoHide\n\t\t\t.removeClass( \"ui-accordion-content-active\" )\n\t\t\t.prev()\n\t\t\t\t.removeClass( \"ui-corner-top\" )\n\t\t\t\t.addClass( \"ui-corner-all\" );\n\n\t\t// Work around for rendering bug in IE (#5421)\n\t\tif ( toHide.length ) {\n\t\t\ttoHide.parent()[0].className = toHide.parent()[0].className;\n\t\t}\n\n\t\tthis._trigger( \"activate\", null, data );\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// used to prevent race conditions with remote data sources\nvar requestIndex = 0;\n\n$.widget( \"ui.autocomplete\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<input>\",\n\toptions: {\n\t\tappendTo: null,\n\t\tautoFocus: false,\n\t\tdelay: 300,\n\t\tminLength: 1,\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"none\"\n\t\t},\n\t\tsource: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tclose: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresponse: null,\n\t\tsearch: null,\n\t\tselect: null\n\t},\n\n\tpending: 0,\n\n\t_create: function() {\n\t\t// Some browsers only repeat keydown events, not keypress events,\n\t\t// so we use the suppressKeyPress flag to determine if we've already\n\t\t// handled the keydown event. #7269\n\t\t// Unfortunately the code for & in keypress is the same as the up arrow,\n\t\t// so we use the suppressKeyPressRepeat flag to avoid handling keypress\n\t\t// events when we know the keydown event was used to modify the\n\t\t// search term. #7799\n\t\tvar suppressKeyPress, suppressKeyPressRepeat, suppressInput,\n\t\t\tnodeName = this.element[0].nodeName.toLowerCase(),\n\t\t\tisTextarea = nodeName === \"textarea\",\n\t\t\tisInput = nodeName === \"input\";\n\n\t\tthis.isMultiLine =\n\t\t\t// Textareas are always multi-line\n\t\t\tisTextarea ? true :\n\t\t\t// Inputs are always single-line, even if inside a contentEditable element\n\t\t\t// IE also treats inputs as contentEditable\n\t\t\tisInput ? false :\n\t\t\t// All other element types are determined by whether or not they're contentEditable\n\t\t\tthis.element.prop( \"isContentEditable\" );\n\n\t\tthis.valueMethod = this.element[ isTextarea || isInput ? \"val\" : \"text\" ];\n\t\tthis.isNewMenu = true;\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-autocomplete-input\" )\n\t\t\t.attr( \"autocomplete\", \"off\" );\n\n\t\tthis._on( this.element, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\t/*jshint maxcomplexity:15*/\n\t\t\t\tif ( this.element.prop( \"readOnly\" ) ) {\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tsuppressInput = true;\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tsuppressKeyPress = false;\n\t\t\t\tsuppressInput = false;\n\t\t\t\tsuppressKeyPressRepeat = false;\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ENTER:\n\t\t\t\tcase keyCode.NUMPAD_ENTER:\n\t\t\t\t\t// when menu is open and has focus\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\t// #6055 - Opera still allows the keypress to occur\n\t\t\t\t\t\t// which causes forms to submit\n\t\t\t\t\t\tsuppressKeyPress = true;\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.TAB:\n\t\t\t\t\tif ( this.menu.active ) {\n\t\t\t\t\t\tthis.menu.select( event );\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.ESCAPE:\n\t\t\t\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tthis._value( this.term );\n\t\t\t\t\t\tthis.close( event );\n\t\t\t\t\t\t// Different browsers have different default behavior for escape\n\t\t\t\t\t\t// Single press can mean undo or clear\n\t\t\t\t\t\t// Double press in IE means clear the whole form\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsuppressKeyPressRepeat = true;\n\t\t\t\t\t// search timeout should be triggered before the input value is changed\n\t\t\t\t\tthis._searchTimeout( event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tkeypress: function( event ) {\n\t\t\t\tif ( suppressKeyPress ) {\n\t\t\t\t\tsuppressKeyPress = false;\n\t\t\t\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( suppressKeyPressRepeat ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// replicate some key handlers to allow them to repeat in Firefox and Opera\n\t\t\t\tvar keyCode = $.ui.keyCode;\n\t\t\t\tswitch( event.keyCode ) {\n\t\t\t\tcase keyCode.PAGE_UP:\n\t\t\t\t\tthis._move( \"previousPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.PAGE_DOWN:\n\t\t\t\t\tthis._move( \"nextPage\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.UP:\n\t\t\t\t\tthis._keyEvent( \"previous\", event );\n\t\t\t\t\tbreak;\n\t\t\t\tcase keyCode.DOWN:\n\t\t\t\t\tthis._keyEvent( \"next\", event );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t},\n\t\t\tinput: function( event ) {\n\t\t\t\tif ( suppressInput ) {\n\t\t\t\t\tsuppressInput = false;\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis._searchTimeout( event );\n\t\t\t},\n\t\t\tfocus: function() {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.previous = this._value();\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tif ( this.cancelBlur ) {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tclearTimeout( this.searching );\n\t\t\t\tthis.close( event );\n\t\t\t\tthis._change( event );\n\t\t\t}\n\t\t});\n\n\t\tthis._initSource();\n\t\tthis.menu = $( \"<ul>\" )\n\t\t\t.addClass( \"ui-autocomplete ui-front\" )\n\t\t\t.appendTo( this._appendTo() )\n\t\t\t.menu({\n\t\t\t\t// disable ARIA support, the live region takes care of that\n\t\t\t\trole: null\n\t\t\t})\n\t\t\t.hide()\n\t\t\t.data( \"ui-menu\" );\n\n\t\tthis._on( this.menu.element, {\n\t\t\tmousedown: function( event ) {\n\t\t\t\t// prevent moving focus out of the text field\n\t\t\t\tevent.preventDefault();\n\n\t\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t\tthis.cancelBlur = true;\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tdelete this.cancelBlur;\n\t\t\t\t});\n\n\t\t\t\t// clicking on the scrollbar causes focus to shift to the body\n\t\t\t\t// but we can't detect a mouseup or a click immediately afterward\n\t\t\t\t// so we have to track the next mousedown and close the menu if\n\t\t\t\t// the user clicks somewhere outside of the autocomplete\n\t\t\t\tvar menuElement = this.menu.element[ 0 ];\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu-item\" ).length ) {\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tvar that = this;\n\t\t\t\t\t\tthis.document.one( \"mousedown\", function( event ) {\n\t\t\t\t\t\t\tif ( event.target !== that.element[ 0 ] &&\n\t\t\t\t\t\t\t\t\tevent.target !== menuElement &&\n\t\t\t\t\t\t\t\t\t!$.contains( menuElement, event.target ) ) {\n\t\t\t\t\t\t\t\tthat.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenufocus: function( event, ui ) {\n\t\t\t\t// support: Firefox\n\t\t\t\t// Prevent accidental activation of menu items in Firefox (#7024 #9118)\n\t\t\t\tif ( this.isNewMenu ) {\n\t\t\t\t\tthis.isNewMenu = false;\n\t\t\t\t\tif ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis.menu.blur();\n\n\t\t\t\t\t\tthis.document.one( \"mousemove\", function() {\n\t\t\t\t\t\t\t$( event.target ).trigger( event.originalEvent );\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" );\n\t\t\t\tif ( false !== this._trigger( \"focus\", event, { item: item } ) ) {\n\t\t\t\t\t// use value to match what will end up in the input, if it was a key event\n\t\t\t\t\tif ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {\n\t\t\t\t\t\tthis._value( item.value );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Normally the input is populated with the item's value as the\n\t\t\t\t\t// menu is navigated, causing screen readers to notice a change and\n\t\t\t\t\t// announce the item. Since the focus event was canceled, this doesn't\n\t\t\t\t\t// happen, so we update the live region so that screen readers can\n\t\t\t\t\t// still notice the change and announce it.\n\t\t\t\t\tthis.liveRegion.text( item.value );\n\t\t\t\t}\n\t\t\t},\n\t\t\tmenuselect: function( event, ui ) {\n\t\t\t\tvar item = ui.item.data( \"ui-autocomplete-item\" ),\n\t\t\t\t\tprevious = this.previous;\n\n\t\t\t\t// only trigger when focus was lost (click on menu)\n\t\t\t\tif ( this.element[0] !== this.document[0].activeElement ) {\n\t\t\t\t\tthis.element.focus();\n\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t// #6109 - IE triggers two focus events and the second\n\t\t\t\t\t// is asynchronous, so we need to reset the previous\n\t\t\t\t\t// term synchronously and asynchronously :-(\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t\tthis.selectedItem = item;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tif ( false !== this._trigger( \"select\", event, { item: item } ) ) {\n\t\t\t\t\tthis._value( item.value );\n\t\t\t\t}\n\t\t\t\t// reset the term after the select event\n\t\t\t\t// this allows custom select handling to work properly\n\t\t\t\tthis.term = this._value();\n\n\t\t\t\tthis.close( event );\n\t\t\t\tthis.selectedItem = item;\n\t\t\t}\n\t\t});\n\n\t\tthis.liveRegion = $( \"<span>\", {\n\t\t\t\trole: \"status\",\n\t\t\t\t\"aria-live\": \"polite\"\n\t\t\t})\n\t\t\t.addClass( \"ui-helper-hidden-accessible\" )\n\t\t\t.insertBefore( this.element );\n\n\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_destroy: function() {\n\t\tclearTimeout( this.searching );\n\t\tthis.element\n\t\t\t.removeClass( \"ui-autocomplete-input\" )\n\t\t\t.removeAttr( \"autocomplete\" );\n\t\tthis.menu.element.remove();\n\t\tthis.liveRegion.remove();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"source\" ) {\n\t\t\tthis._initSource();\n\t\t}\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.menu.element.appendTo( this._appendTo() );\n\t\t}\n\t\tif ( key === \"disabled\" && value && this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\n\t\tif ( element ) {\n\t\t\telement = element.jquery || element.nodeType ?\n\t\t\t\t$( element ) :\n\t\t\t\tthis.document.find( element ).eq( 0 );\n\t\t}\n\n\t\tif ( !element ) {\n\t\t\telement = this.element.closest( \".ui-front\" );\n\t\t}\n\n\t\tif ( !element.length ) {\n\t\t\telement = this.document[0].body;\n\t\t}\n\n\t\treturn element;\n\t},\n\n\t_initSource: function() {\n\t\tvar array, url,\n\t\t\tthat = this;\n\t\tif ( $.isArray(this.options.source) ) {\n\t\t\tarray = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tresponse( $.ui.autocomplete.filter( array, request.term ) );\n\t\t\t};\n\t\t} else if ( typeof this.options.source === \"string\" ) {\n\t\t\turl = this.options.source;\n\t\t\tthis.source = function( request, response ) {\n\t\t\t\tif ( that.xhr ) {\n\t\t\t\t\tthat.xhr.abort();\n\t\t\t\t}\n\t\t\t\tthat.xhr = $.ajax({\n\t\t\t\t\turl: url,\n\t\t\t\t\tdata: request,\n\t\t\t\t\tdataType: \"json\",\n\t\t\t\t\tsuccess: function( data ) {\n\t\t\t\t\t\tresponse( data );\n\t\t\t\t\t},\n\t\t\t\t\terror: function() {\n\t\t\t\t\t\tresponse( [] );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t};\n\t\t} else {\n\t\t\tthis.source = this.options.source;\n\t\t}\n\t},\n\n\t_searchTimeout: function( event ) {\n\t\tclearTimeout( this.searching );\n\t\tthis.searching = this._delay(function() {\n\t\t\t// only search if the value has changed\n\t\t\tif ( this.term !== this._value() ) {\n\t\t\t\tthis.selectedItem = null;\n\t\t\t\tthis.search( null, event );\n\t\t\t}\n\t\t}, this.options.delay );\n\t},\n\n\tsearch: function( value, event ) {\n\t\tvalue = value != null ? value : this._value();\n\n\t\t// always save the actual value, not the one passed as an argument\n\t\tthis.term = this._value();\n\n\t\tif ( value.length < this.options.minLength ) {\n\t\t\treturn this.close( event );\n\t\t}\n\n\t\tif ( this._trigger( \"search\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._search( value );\n\t},\n\n\t_search: function( value ) {\n\t\tthis.pending++;\n\t\tthis.element.addClass( \"ui-autocomplete-loading\" );\n\t\tthis.cancelSearch = false;\n\n\t\tthis.source( { term: value }, this._response() );\n\t},\n\n\t_response: function() {\n\t\tvar that = this,\n\t\t\tindex = ++requestIndex;\n\n\t\treturn function( content ) {\n\t\t\tif ( index === requestIndex ) {\n\t\t\t\tthat.__response( content );\n\t\t\t}\n\n\t\t\tthat.pending--;\n\t\t\tif ( !that.pending ) {\n\t\t\t\tthat.element.removeClass( \"ui-autocomplete-loading\" );\n\t\t\t}\n\t\t};\n\t},\n\n\t__response: function( content ) {\n\t\tif ( content ) {\n\t\t\tcontent = this._normalize( content );\n\t\t}\n\t\tthis._trigger( \"response\", null, { content: content } );\n\t\tif ( !this.options.disabled && content && content.length && !this.cancelSearch ) {\n\t\t\tthis._suggest( content );\n\t\t\tthis._trigger( \"open\" );\n\t\t} else {\n\t\t\t// use ._close() instead of .close() so we don't cancel future searches\n\t\t\tthis._close();\n\t\t}\n\t},\n\n\tclose: function( event ) {\n\t\tthis.cancelSearch = true;\n\t\tthis._close( event );\n\t},\n\n\t_close: function( event ) {\n\t\tif ( this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.menu.element.hide();\n\t\t\tthis.menu.blur();\n\t\t\tthis.isNewMenu = true;\n\t\t\tthis._trigger( \"close\", event );\n\t\t}\n\t},\n\n\t_change: function( event ) {\n\t\tif ( this.previous !== this._value() ) {\n\t\t\tthis._trigger( \"change\", event, { item: this.selectedItem } );\n\t\t}\n\t},\n\n\t_normalize: function( items ) {\n\t\t// assume all items have the right format when the first item is complete\n\t\tif ( items.length && items[0].label && items[0].value ) {\n\t\t\treturn items;\n\t\t}\n\t\treturn $.map( items, function( item ) {\n\t\t\tif ( typeof item === \"string\" ) {\n\t\t\t\treturn {\n\t\t\t\t\tlabel: item,\n\t\t\t\t\tvalue: item\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn $.extend({\n\t\t\t\tlabel: item.label || item.value,\n\t\t\t\tvalue: item.value || item.label\n\t\t\t}, item );\n\t\t});\n\t},\n\n\t_suggest: function( items ) {\n\t\tvar ul = this.menu.element.empty();\n\t\tthis._renderMenu( ul, items );\n\t\tthis.isNewMenu = true;\n\t\tthis.menu.refresh();\n\n\t\t// size and position menu\n\t\tul.show();\n\t\tthis._resizeMenu();\n\t\tul.position( $.extend({\n\t\t\tof: this.element\n\t\t}, this.options.position ));\n\n\t\tif ( this.options.autoFocus ) {\n\t\t\tthis.menu.next();\n\t\t}\n\t},\n\n\t_resizeMenu: function() {\n\t\tvar ul = this.menu.element;\n\t\tul.outerWidth( Math.max(\n\t\t\t// Firefox wraps long text (possibly a rounding bug)\n\t\t\t// so we add 1px to avoid the wrapping (#7513)\n\t\t\tul.width( \"\" ).outerWidth() + 1,\n\t\t\tthis.element.outerWidth()\n\t\t) );\n\t},\n\n\t_renderMenu: function( ul, items ) {\n\t\tvar that = this;\n\t\t$.each( items, function( index, item ) {\n\t\t\tthat._renderItemData( ul, item );\n\t\t});\n\t},\n\n\t_renderItemData: function( ul, item ) {\n\t\treturn this._renderItem( ul, item ).data( \"ui-autocomplete-item\", item );\n\t},\n\n\t_renderItem: function( ul, item ) {\n\t\treturn $( \"<li>\" )\n\t\t\t.append( $( \"<a>\" ).text( item.label ) )\n\t\t\t.appendTo( ul );\n\t},\n\n\t_move: function( direction, event ) {\n\t\tif ( !this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis.search( null, event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.menu.isFirstItem() && /^previous/.test( direction ) ||\n\t\t\t\tthis.menu.isLastItem() && /^next/.test( direction ) ) {\n\t\t\tthis._value( this.term );\n\t\t\tthis.menu.blur();\n\t\t\treturn;\n\t\t}\n\t\tthis.menu[ direction ]( event );\n\t},\n\n\twidget: function() {\n\t\treturn this.menu.element;\n\t},\n\n\t_value: function() {\n\t\treturn this.valueMethod.apply( this.element, arguments );\n\t},\n\n\t_keyEvent: function( keyEvent, event ) {\n\t\tif ( !this.isMultiLine || this.menu.element.is( \":visible\" ) ) {\n\t\t\tthis._move( keyEvent, event );\n\n\t\t\t// prevents moving cursor to beginning/end of the text field in some browsers\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n});\n\n$.extend( $.ui.autocomplete, {\n\tescapeRegex: function( value ) {\n\t\treturn value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n\t},\n\tfilter: function(array, term) {\n\t\tvar matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), \"i\" );\n\t\treturn $.grep( array, function(value) {\n\t\t\treturn matcher.test( value.label || value.value || value );\n\t\t});\n\t}\n});\n\n\n// live region extension, adding a `messages` option\n// NOTE: This is an experimental API. We are still investigating\n// a full solution for string manipulation and internationalization.\n$.widget( \"ui.autocomplete\", $.ui.autocomplete, {\n\toptions: {\n\t\tmessages: {\n\t\t\tnoResults: \"No search results.\",\n\t\t\tresults: function( amount ) {\n\t\t\t\treturn amount + ( amount > 1 ? \" results are\" : \" result is\" ) +\n\t\t\t\t\t\" available, use up and down arrow keys to navigate.\";\n\t\t\t}\n\t\t}\n\t},\n\n\t__response: function( content ) {\n\t\tvar message;\n\t\tthis._superApply( arguments );\n\t\tif ( this.options.disabled || this.cancelSearch ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( content && content.length ) {\n\t\t\tmessage = this.options.messages.results( content.length );\n\t\t} else {\n\t\t\tmessage = this.options.messages.noResults;\n\t\t}\n\t\tthis.liveRegion.text( message );\n\t}\n});\n\n}( jQuery ));\n\n(function( $, undefined ) {\n\nvar lastActive, startXPos, startYPos, clickDragged,\n\tbaseClasses = \"ui-button ui-widget ui-state-default ui-corner-all\",\n\tstateClasses = \"ui-state-hover ui-state-active \",\n\ttypeClasses = \"ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only\",\n\tformResetHandler = function() {\n\t\tvar form = $( this );\n\t\tsetTimeout(function() {\n\t\t\tform.find( \":ui-button\" ).button( \"refresh\" );\n\t\t}, 1 );\n\t},\n\tradioGroup = function( radio ) {\n\t\tvar name = radio.name,\n\t\t\tform = radio.form,\n\t\t\tradios = $( [] );\n\t\tif ( name ) {\n\t\t\tname = name.replace( /'/g, \"\\\\'\" );\n\t\t\tif ( form ) {\n\t\t\t\tradios = $( form ).find( \"[name='\" + name + \"']\" );\n\t\t\t} else {\n\t\t\t\tradios = $( \"[name='\" + name + \"']\", radio.ownerDocument )\n\t\t\t\t\t.filter(function() {\n\t\t\t\t\t\treturn !this.form;\n\t\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn radios;\n\t};\n\n$.widget( \"ui.button\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<button>\",\n\toptions: {\n\t\tdisabled: null,\n\t\ttext: true,\n\t\tlabel: null,\n\t\ticons: {\n\t\t\tprimary: null,\n\t\t\tsecondary: null\n\t\t}\n\t},\n\t_create: function() {\n\t\tthis.element.closest( \"form\" )\n\t\t\t.unbind( \"reset\" + this.eventNamespace )\n\t\t\t.bind( \"reset\" + this.eventNamespace, formResetHandler );\n\n\t\tif ( typeof this.options.disabled !== \"boolean\" ) {\n\t\t\tthis.options.disabled = !!this.element.prop( \"disabled\" );\n\t\t} else {\n\t\t\tthis.element.prop( \"disabled\", this.options.disabled );\n\t\t}\n\n\t\tthis._determineButtonType();\n\t\tthis.hasTitle = !!this.buttonElement.attr( \"title\" );\n\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\ttoggleButton = this.type === \"checkbox\" || this.type === \"radio\",\n\t\t\tactiveClass = !toggleButton ? \"ui-state-active\" : \"\",\n\t\t\tfocusClass = \"ui-state-focus\";\n\n\t\tif ( options.label === null ) {\n\t\t\toptions.label = (this.type === \"input\" ? this.buttonElement.val() : this.buttonElement.html());\n\t\t}\n\n\t\tthis._hoverable( this.buttonElement );\n\n\t\tthis.buttonElement\n\t\t\t.addClass( baseClasses )\n\t\t\t.attr( \"role\", \"button\" )\n\t\t\t.bind( \"mouseenter\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif ( this === lastActive ) {\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t}\n\t\t\t})\n\t\t\t.bind( \"mouseleave\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t$( this ).removeClass( activeClass );\n\t\t\t})\n\t\t\t.bind( \"click\" + this.eventNamespace, function( event ) {\n\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopImmediatePropagation();\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.element\n\t\t\t.bind( \"focus\" + this.eventNamespace, function() {\n\t\t\t\t// no need to check disabled, focus won't be triggered anyway\n\t\t\t\tthat.buttonElement.addClass( focusClass );\n\t\t\t})\n\t\t\t.bind( \"blur\" + this.eventNamespace, function() {\n\t\t\t\tthat.buttonElement.removeClass( focusClass );\n\t\t\t});\n\n\t\tif ( toggleButton ) {\n\t\t\tthis.element.bind( \"change\" + this.eventNamespace, function() {\n\t\t\t\tif ( clickDragged ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthat.refresh();\n\t\t\t});\n\t\t\t// if mouse moves between mousedown and mouseup (drag) set clickDragged flag\n\t\t\t// prevents issue where button state changes but checkbox/radio checked state\n\t\t\t// does not in Firefox (see ticket #6970)\n\t\t\tthis.buttonElement\n\t\t\t\t.bind( \"mousedown\" + this.eventNamespace, function( event ) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tclickDragged = false;\n\t\t\t\t\tstartXPos = event.pageX;\n\t\t\t\t\tstartYPos = event.pageY;\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseup\" + this.eventNamespace, function( event ) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tif ( startXPos !== event.pageX || startYPos !== event.pageY ) {\n\t\t\t\t\t\tclickDragged = true;\n\t\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" ) {\n\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t} else if ( this.type === \"radio\" ) {\n\t\t\tthis.buttonElement.bind( \"click\" + this.eventNamespace, function() {\n\t\t\t\tif ( options.disabled || clickDragged ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\tthat.buttonElement.attr( \"aria-pressed\", \"true\" );\n\n\t\t\t\tvar radio = that.element[ 0 ];\n\t\t\t\tradioGroup( radio )\n\t\t\t\t\t.not( radio )\n\t\t\t\t\t.map(function() {\n\t\t\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t\t\t})\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t});\n\t\t} else {\n\t\t\tthis.buttonElement\n\t\t\t\t.bind( \"mousedown\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\tlastActive = this;\n\t\t\t\t\tthat.document.one( \"mouseup\", function() {\n\t\t\t\t\t\tlastActive = null;\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.bind( \"mouseup\" + this.eventNamespace, function() {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t})\n\t\t\t\t.bind( \"keydown\" + this.eventNamespace, function(event) {\n\t\t\t\t\tif ( options.disabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) {\n\t\t\t\t\t\t$( this ).addClass( \"ui-state-active\" );\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t// see #8559, we bind to blur here in case the button element loses\n\t\t\t\t// focus between keydown and keyup, it would be left in an \"active\" state\n\t\t\t\t.bind( \"keyup\" + this.eventNamespace + \" blur\" + this.eventNamespace, function() {\n\t\t\t\t\t$( this ).removeClass( \"ui-state-active\" );\n\t\t\t\t});\n\n\t\t\tif ( this.buttonElement.is(\"a\") ) {\n\t\t\t\tthis.buttonElement.keyup(function(event) {\n\t\t\t\t\tif ( event.keyCode === $.ui.keyCode.SPACE ) {\n\t\t\t\t\t\t// TODO pass through original event correctly (just as 2nd argument doesn't work)\n\t\t\t\t\t\t$( this ).click();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\t// TODO: pull out $.Widget's handling for the disabled option into\n\t\t// $.Widget.prototype._setOptionDisabled so it's easy to proxy and can\n\t\t// be overridden by individual plugins\n\t\tthis._setOption( \"disabled\", options.disabled );\n\t\tthis._resetButton();\n\t},\n\n\t_determineButtonType: function() {\n\t\tvar ancestor, labelSelector, checked;\n\n\t\tif ( this.element.is(\"[type=checkbox]\") ) {\n\t\t\tthis.type = \"checkbox\";\n\t\t} else if ( this.element.is(\"[type=radio]\") ) {\n\t\t\tthis.type = \"radio\";\n\t\t} else if ( this.element.is(\"input\") ) {\n\t\t\tthis.type = \"input\";\n\t\t} else {\n\t\t\tthis.type = \"button\";\n\t\t}\n\n\t\tif ( this.type === \"checkbox\" || this.type === \"radio\" ) {\n\t\t\t// we don't search against the document in case the element\n\t\t\t// is disconnected from the DOM\n\t\t\tancestor = this.element.parents().last();\n\t\t\tlabelSelector = \"label[for='\" + this.element.attr(\"id\") + \"']\";\n\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\tancestor = ancestor.length ? ancestor.siblings() : this.element.siblings();\n\t\t\t\tthis.buttonElement = ancestor.filter( labelSelector );\n\t\t\t\tif ( !this.buttonElement.length ) {\n\t\t\t\t\tthis.buttonElement = ancestor.find( labelSelector );\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.element.addClass( \"ui-helper-hidden-accessible\" );\n\n\t\t\tchecked = this.element.is( \":checked\" );\n\t\t\tif ( checked ) {\n\t\t\t\tthis.buttonElement.addClass( \"ui-state-active\" );\n\t\t\t}\n\t\t\tthis.buttonElement.prop( \"aria-pressed\", checked );\n\t\t} else {\n\t\t\tthis.buttonElement = this.element;\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.buttonElement;\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-helper-hidden-accessible\" );\n\t\tthis.buttonElement\n\t\t\t.removeClass( baseClasses + \" \" + stateClasses + \" \" + typeClasses )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-pressed\" )\n\t\t\t.html( this.buttonElement.find(\".ui-button-text\").html() );\n\n\t\tif ( !this.hasTitle ) {\n\t\t\tthis.buttonElement.removeAttr( \"title\" );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tthis._super( key, value );\n\t\tif ( key === \"disabled\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.prop( \"disabled\", true );\n\t\t\t} else {\n\t\t\t\tthis.element.prop( \"disabled\", false );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tthis._resetButton();\n\t},\n\n\trefresh: function() {\n\t\t//See #8237 & #8828\n\t\tvar isDisabled = this.element.is( \"input, button\" ) ? this.element.is( \":disabled\" ) : this.element.hasClass( \"ui-button-disabled\" );\n\n\t\tif ( isDisabled !== this.options.disabled ) {\n\t\t\tthis._setOption( \"disabled\", isDisabled );\n\t\t}\n\t\tif ( this.type === \"radio\" ) {\n\t\t\tradioGroup( this.element[0] ).each(function() {\n\t\t\t\tif ( $( this ).is( \":checked\" ) ) {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t\t} else {\n\t\t\t\t\t$( this ).button( \"widget\" )\n\t\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t\t}\n\t\t\t});\n\t\t} else if ( this.type === \"checkbox\" ) {\n\t\t\tif ( this.element.is( \":checked\" ) ) {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"true\" );\n\t\t\t} else {\n\t\t\t\tthis.buttonElement\n\t\t\t\t\t.removeClass( \"ui-state-active\" )\n\t\t\t\t\t.attr( \"aria-pressed\", \"false\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t_resetButton: function() {\n\t\tif ( this.type === \"input\" ) {\n\t\t\tif ( this.options.label ) {\n\t\t\t\tthis.element.val( this.options.label );\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tvar buttonElement = this.buttonElement.removeClass( typeClasses ),\n\t\t\tbuttonText = $( \"<span></span>\", this.document[0] )\n\t\t\t\t.addClass( \"ui-button-text\" )\n\t\t\t\t.html( this.options.label )\n\t\t\t\t.appendTo( buttonElement.empty() )\n\t\t\t\t.text(),\n\t\t\ticons = this.options.icons,\n\t\t\tmultipleIcons = icons.primary && icons.secondary,\n\t\t\tbuttonClasses = [];\n\n\t\tif ( icons.primary || icons.secondary ) {\n\t\t\tif ( this.options.text ) {\n\t\t\t\tbuttonClasses.push( \"ui-button-text-icon\" + ( multipleIcons ? \"s\" : ( icons.primary ? \"-primary\" : \"-secondary\" ) ) );\n\t\t\t}\n\n\t\t\tif ( icons.primary ) {\n\t\t\t\tbuttonElement.prepend( \"<span class='ui-button-icon-primary ui-icon \" + icons.primary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( icons.secondary ) {\n\t\t\t\tbuttonElement.append( \"<span class='ui-button-icon-secondary ui-icon \" + icons.secondary + \"'></span>\" );\n\t\t\t}\n\n\t\t\tif ( !this.options.text ) {\n\t\t\t\tbuttonClasses.push( multipleIcons ? \"ui-button-icons-only\" : \"ui-button-icon-only\" );\n\n\t\t\t\tif ( !this.hasTitle ) {\n\t\t\t\t\tbuttonElement.attr( \"title\", $.trim( buttonText ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tbuttonClasses.push( \"ui-button-text-only\" );\n\t\t}\n\t\tbuttonElement.addClass( buttonClasses.join( \" \" ) );\n\t}\n});\n\n$.widget( \"ui.buttonset\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\titems: \"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)\"\n\t},\n\n\t_create: function() {\n\t\tthis.element.addClass( \"ui-buttonset\" );\n\t},\n\n\t_init: function() {\n\t\tthis.refresh();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis.buttons.button( \"option\", key, value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\trefresh: function() {\n\t\tvar rtl = this.element.css( \"direction\" ) === \"rtl\";\n\n\t\tthis.buttons = this.element.find( this.options.items )\n\t\t\t.filter( \":ui-button\" )\n\t\t\t\t.button( \"refresh\" )\n\t\t\t.end()\n\t\t\t.not( \":ui-button\" )\n\t\t\t\t.button()\n\t\t\t.end()\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-all ui-corner-left ui-corner-right\" )\n\t\t\t\t.filter( \":first\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-right\" : \"ui-corner-left\" )\n\t\t\t\t.end()\n\t\t\t\t.filter( \":last\" )\n\t\t\t\t\t.addClass( rtl ? \"ui-corner-left\" : \"ui-corner-right\" )\n\t\t\t\t.end()\n\t\t\t.end();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element.removeClass( \"ui-buttonset\" );\n\t\tthis.buttons\n\t\t\t.map(function() {\n\t\t\t\treturn $( this ).button( \"widget\" )[ 0 ];\n\t\t\t})\n\t\t\t\t.removeClass( \"ui-corner-left ui-corner-right\" )\n\t\t\t.end()\n\t\t\t.button( \"destroy\" );\n\t}\n});\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\n$.extend($.ui, { datepicker: { version: \"1.10.3\" } });\n\nvar PROP_NAME = \"datepicker\",\n\tinstActive;\n\n/* Date picker manager.\n   Use the singleton instance of this class, $.datepicker, to interact with the date picker.\n   Settings for (groups of) date pickers are maintained in an instance object,\n   allowing multiple different settings on the same page. */\n\nfunction Datepicker() {\n\tthis._curInst = null; // The current instance in use\n\tthis._keyEvent = false; // If the last event was a key event\n\tthis._disabledInputs = []; // List of date picker inputs that have been disabled\n\tthis._datepickerShowing = false; // True if the popup picker is showing , false if not\n\tthis._inDialog = false; // True if showing within a \"dialog\", false if not\n\tthis._mainDivId = \"ui-datepicker-div\"; // The ID of the main datepicker division\n\tthis._inlineClass = \"ui-datepicker-inline\"; // The name of the inline marker class\n\tthis._appendClass = \"ui-datepicker-append\"; // The name of the append marker class\n\tthis._triggerClass = \"ui-datepicker-trigger\"; // The name of the trigger marker class\n\tthis._dialogClass = \"ui-datepicker-dialog\"; // The name of the dialog marker class\n\tthis._disableClass = \"ui-datepicker-disabled\"; // The name of the disabled covering marker class\n\tthis._unselectableClass = \"ui-datepicker-unselectable\"; // The name of the unselectable cell marker class\n\tthis._currentClass = \"ui-datepicker-current-day\"; // The name of the current day marker class\n\tthis._dayOverClass = \"ui-datepicker-days-cell-over\"; // The name of the day hover marker class\n\tthis.regional = []; // Available regional settings, indexed by language code\n\tthis.regional[\"\"] = { // Default regional settings\n\t\tcloseText: \"Done\", // Display text for close link\n\t\tprevText: \"Prev\", // Display text for previous month link\n\t\tnextText: \"Next\", // Display text for next month link\n\t\tcurrentText: \"Today\", // Display text for current month link\n\t\tmonthNames: [\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\n\t\t\t\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"], // Names of months for drop-down and formatting\n\t\tmonthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"], // For formatting\n\t\tdayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"], // For formatting\n\t\tdayNamesShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"], // For formatting\n\t\tdayNamesMin: [\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"], // Column headings for days starting at Sunday\n\t\tweekHeader: \"Wk\", // Column header for week of the year\n\t\tdateFormat: \"mm/dd/yy\", // See format options on parseDate\n\t\tfirstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...\n\t\tisRTL: false, // True if right-to-left language, false if left-to-right\n\t\tshowMonthAfterYear: false, // True if the year select precedes month, false for month then year\n\t\tyearSuffix: \"\" // Additional text to append to the year in the month headers\n\t};\n\tthis._defaults = { // Global defaults for all the date picker instances\n\t\tshowOn: \"focus\", // \"focus\" for popup on focus,\n\t\t\t// \"button\" for trigger button, or \"both\" for either\n\t\tshowAnim: \"fadeIn\", // Name of jQuery animation for popup\n\t\tshowOptions: {}, // Options for enhanced animations\n\t\tdefaultDate: null, // Used when field is blank: actual date,\n\t\t\t// +/-number for offset from today, null for today\n\t\tappendText: \"\", // Display text following the input box, e.g. showing the format\n\t\tbuttonText: \"...\", // Text for trigger button\n\t\tbuttonImage: \"\", // URL for trigger button image\n\t\tbuttonImageOnly: false, // True if the image appears alone, false if it appears on a button\n\t\thideIfNoPrevNext: false, // True to hide next/previous month links\n\t\t\t// if not applicable, false to just disable them\n\t\tnavigationAsDateFormat: false, // True if date formatting applied to prev/today/next links\n\t\tgotoCurrent: false, // True if today link goes back to current selection instead\n\t\tchangeMonth: false, // True if month can be selected directly, false if only prev/next\n\t\tchangeYear: false, // True if year can be selected directly, false if only prev/next\n\t\tyearRange: \"c-10:c+10\", // Range of years to display in drop-down,\n\t\t\t// either relative to today's year (-nn:+nn), relative to currently displayed year\n\t\t\t// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)\n\t\tshowOtherMonths: false, // True to show dates in other months, false to leave blank\n\t\tselectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable\n\t\tshowWeek: false, // True to show week of the year, false to not show it\n\t\tcalculateWeek: this.iso8601Week, // How to calculate the week of the year,\n\t\t\t// takes a Date and returns the number of the week for it\n\t\tshortYearCutoff: \"+10\", // Short year values < this are in the current century,\n\t\t\t// > this are in the previous century,\n\t\t\t// string value starting with \"+\" for current year + value\n\t\tminDate: null, // The earliest selectable date, or null for no limit\n\t\tmaxDate: null, // The latest selectable date, or null for no limit\n\t\tduration: \"fast\", // Duration of display/closure\n\t\tbeforeShowDay: null, // Function that takes a date and returns an array with\n\t\t\t// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or \"\",\n\t\t\t// [2] = cell title (optional), e.g. $.datepicker.noWeekends\n\t\tbeforeShow: null, // Function that takes an input field and\n\t\t\t// returns a set of custom settings for the date picker\n\t\tonSelect: null, // Define a callback function when a date is selected\n\t\tonChangeMonthYear: null, // Define a callback function when the month or year is changed\n\t\tonClose: null, // Define a callback function when the datepicker is closed\n\t\tnumberOfMonths: 1, // Number of months to show at a time\n\t\tshowCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)\n\t\tstepMonths: 1, // Number of months to step back/forward\n\t\tstepBigMonths: 12, // Number of months to step back/forward for the big links\n\t\taltField: \"\", // Selector for an alternate field to store selected dates into\n\t\taltFormat: \"\", // The date format to use for the alternate field\n\t\tconstrainInput: true, // The input is constrained by the current date format\n\t\tshowButtonPanel: false, // True to show button panel, false to not show it\n\t\tautoSize: false, // True to size the input for the date format, false to leave as is\n\t\tdisabled: false // The initial disabled state\n\t};\n\t$.extend(this._defaults, this.regional[\"\"]);\n\tthis.dpDiv = bindHover($(\"<div id='\" + this._mainDivId + \"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\"));\n}\n\n$.extend(Datepicker.prototype, {\n\t/* Class name added to elements to indicate already configured with a date picker. */\n\tmarkerClassName: \"hasDatepicker\",\n\n\t//Keep track of the maximum number of rows displayed (see #7043)\n\tmaxRows: 4,\n\n\t// TODO rename to \"widget\" when switching to widget factory\n\t_widgetDatepicker: function() {\n\t\treturn this.dpDiv;\n\t},\n\n\t/* Override the default settings for all instances of the date picker.\n\t * @param  settings  object - the new settings to use as defaults (anonymous object)\n\t * @return the manager object\n\t */\n\tsetDefaults: function(settings) {\n\t\textendRemove(this._defaults, settings || {});\n\t\treturn this;\n\t},\n\n\t/* Attach the date picker to a jQuery selection.\n\t * @param  target\telement - the target input field or division or span\n\t * @param  settings  object - the new settings to use for this date picker instance (anonymous)\n\t */\n\t_attachDatepicker: function(target, settings) {\n\t\tvar nodeName, inline, inst;\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tinline = (nodeName === \"div\" || nodeName === \"span\");\n\t\tif (!target.id) {\n\t\t\tthis.uuid += 1;\n\t\t\ttarget.id = \"dp\" + this.uuid;\n\t\t}\n\t\tinst = this._newInst($(target), inline);\n\t\tinst.settings = $.extend({}, settings || {});\n\t\tif (nodeName === \"input\") {\n\t\t\tthis._connectDatepicker(target, inst);\n\t\t} else if (inline) {\n\t\t\tthis._inlineDatepicker(target, inst);\n\t\t}\n\t},\n\n\t/* Create a new instance object. */\n\t_newInst: function(target, inline) {\n\t\tvar id = target[0].id.replace(/([^A-Za-z0-9_\\-])/g, \"\\\\\\\\$1\"); // escape jQuery meta chars\n\t\treturn {id: id, input: target, // associated target\n\t\t\tselectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection\n\t\t\tdrawMonth: 0, drawYear: 0, // month being drawn\n\t\t\tinline: inline, // is datepicker inline or not\n\t\t\tdpDiv: (!inline ? this.dpDiv : // presentation div\n\t\t\tbindHover($(\"<div class='\" + this._inlineClass + \" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>\")))};\n\t},\n\n\t/* Attach the date picker to an input field. */\n\t_connectDatepicker: function(target, inst) {\n\t\tvar input = $(target);\n\t\tinst.append = $([]);\n\t\tinst.trigger = $([]);\n\t\tif (input.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tthis._attachments(input, inst);\n\t\tinput.addClass(this.markerClassName).keydown(this._doKeyDown).\n\t\t\tkeypress(this._doKeyPress).keyup(this._doKeyUp);\n\t\tthis._autoSize(inst);\n\t\t$.data(target, PROP_NAME, inst);\n\t\t//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t},\n\n\t/* Make attachments based on settings. */\n\t_attachments: function(input, inst) {\n\t\tvar showOn, buttonText, buttonImage,\n\t\t\tappendText = this._get(inst, \"appendText\"),\n\t\t\tisRTL = this._get(inst, \"isRTL\");\n\n\t\tif (inst.append) {\n\t\t\tinst.append.remove();\n\t\t}\n\t\tif (appendText) {\n\t\t\tinst.append = $(\"<span class='\" + this._appendClass + \"'>\" + appendText + \"</span>\");\n\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.append);\n\t\t}\n\n\t\tinput.unbind(\"focus\", this._showDatepicker);\n\n\t\tif (inst.trigger) {\n\t\t\tinst.trigger.remove();\n\t\t}\n\n\t\tshowOn = this._get(inst, \"showOn\");\n\t\tif (showOn === \"focus\" || showOn === \"both\") { // pop-up date picker when in the marked field\n\t\t\tinput.focus(this._showDatepicker);\n\t\t}\n\t\tif (showOn === \"button\" || showOn === \"both\") { // pop-up date picker when button clicked\n\t\t\tbuttonText = this._get(inst, \"buttonText\");\n\t\t\tbuttonImage = this._get(inst, \"buttonImage\");\n\t\t\tinst.trigger = $(this._get(inst, \"buttonImageOnly\") ?\n\t\t\t\t$(\"<img/>\").addClass(this._triggerClass).\n\t\t\t\t\tattr({ src: buttonImage, alt: buttonText, title: buttonText }) :\n\t\t\t\t$(\"<button type='button'></button>\").addClass(this._triggerClass).\n\t\t\t\t\thtml(!buttonImage ? buttonText : $(\"<img/>\").attr(\n\t\t\t\t\t{ src:buttonImage, alt:buttonText, title:buttonText })));\n\t\t\tinput[isRTL ? \"before\" : \"after\"](inst.trigger);\n\t\t\tinst.trigger.click(function() {\n\t\t\t\tif ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t} else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t} else {\n\t\t\t\t\t$.datepicker._showDatepicker(input[0]);\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t});\n\t\t}\n\t},\n\n\t/* Apply the maximum length for the date format. */\n\t_autoSize: function(inst) {\n\t\tif (this._get(inst, \"autoSize\") && !inst.inline) {\n\t\t\tvar findMax, max, maxI, i,\n\t\t\t\tdate = new Date(2009, 12 - 1, 20), // Ensure double digits\n\t\t\t\tdateFormat = this._get(inst, \"dateFormat\");\n\n\t\t\tif (dateFormat.match(/[DM]/)) {\n\t\t\t\tfindMax = function(names) {\n\t\t\t\t\tmax = 0;\n\t\t\t\t\tmaxI = 0;\n\t\t\t\t\tfor (i = 0; i < names.length; i++) {\n\t\t\t\t\t\tif (names[i].length > max) {\n\t\t\t\t\t\t\tmax = names[i].length;\n\t\t\t\t\t\t\tmaxI = i;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn maxI;\n\t\t\t\t};\n\t\t\t\tdate.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ?\n\t\t\t\t\t\"monthNames\" : \"monthNamesShort\"))));\n\t\t\t\tdate.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ?\n\t\t\t\t\t\"dayNames\" : \"dayNamesShort\"))) + 20 - date.getDay());\n\t\t\t}\n\t\t\tinst.input.attr(\"size\", this._formatDate(inst, date).length);\n\t\t}\n\t},\n\n\t/* Attach an inline date picker to a div. */\n\t_inlineDatepicker: function(target, inst) {\n\t\tvar divSpan = $(target);\n\t\tif (divSpan.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\t\tdivSpan.addClass(this.markerClassName).append(inst.dpDiv);\n\t\t$.data(target, PROP_NAME, inst);\n\t\tthis._setDate(inst, this._getDefaultDate(inst), true);\n\t\tthis._updateDatepicker(inst);\n\t\tthis._updateAlternate(inst);\n\t\t//If disabled option is true, disable the datepicker before showing it (see ticket #5665)\n\t\tif( inst.settings.disabled ) {\n\t\t\tthis._disableDatepicker( target );\n\t\t}\n\t\t// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements\n\t\t// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height\n\t\tinst.dpDiv.css( \"display\", \"block\" );\n\t},\n\n\t/* Pop-up the date picker in a \"dialog\" box.\n\t * @param  input element - ignored\n\t * @param  date\tstring or Date - the initial date to display\n\t * @param  onSelect  function - the function to call when a date is selected\n\t * @param  settings  object - update the dialog date picker instance's settings (anonymous object)\n\t * @param  pos int[2] - coordinates for the dialog's position within the screen or\n\t *\t\t\t\t\tevent - with x/y coordinates or\n\t *\t\t\t\t\tleave empty for default (screen centre)\n\t * @return the manager object\n\t */\n\t_dialogDatepicker: function(input, date, onSelect, settings, pos) {\n\t\tvar id, browserWidth, browserHeight, scrollX, scrollY,\n\t\t\tinst = this._dialogInst; // internal instance\n\n\t\tif (!inst) {\n\t\t\tthis.uuid += 1;\n\t\t\tid = \"dp\" + this.uuid;\n\t\t\tthis._dialogInput = $(\"<input type='text' id='\" + id +\n\t\t\t\t\"' style='position: absolute; top: -100px; width: 0px;'/>\");\n\t\t\tthis._dialogInput.keydown(this._doKeyDown);\n\t\t\t$(\"body\").append(this._dialogInput);\n\t\t\tinst = this._dialogInst = this._newInst(this._dialogInput, false);\n\t\t\tinst.settings = {};\n\t\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\t}\n\t\textendRemove(inst.settings, settings || {});\n\t\tdate = (date && date.constructor === Date ? this._formatDate(inst, date) : date);\n\t\tthis._dialogInput.val(date);\n\n\t\tthis._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null);\n\t\tif (!this._pos) {\n\t\t\tbrowserWidth = document.documentElement.clientWidth;\n\t\t\tbrowserHeight = document.documentElement.clientHeight;\n\t\t\tscrollX = document.documentElement.scrollLeft || document.body.scrollLeft;\n\t\t\tscrollY = document.documentElement.scrollTop || document.body.scrollTop;\n\t\t\tthis._pos = // should use actual width/height below\n\t\t\t\t[(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY];\n\t\t}\n\n\t\t// move input on screen for focus, but hidden behind dialog\n\t\tthis._dialogInput.css(\"left\", (this._pos[0] + 20) + \"px\").css(\"top\", this._pos[1] + \"px\");\n\t\tinst.settings.onSelect = onSelect;\n\t\tthis._inDialog = true;\n\t\tthis.dpDiv.addClass(this._dialogClass);\n\t\tthis._showDatepicker(this._dialogInput[0]);\n\t\tif ($.blockUI) {\n\t\t\t$.blockUI(this.dpDiv);\n\t\t}\n\t\t$.data(this._dialogInput[0], PROP_NAME, inst);\n\t\treturn this;\n\t},\n\n\t/* Detach a datepicker from its control.\n\t * @param  target\telement - the target input field or division or span\n\t */\n\t_destroyDatepicker: function(target) {\n\t\tvar nodeName,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\t$.removeData(target, PROP_NAME);\n\t\tif (nodeName === \"input\") {\n\t\t\tinst.append.remove();\n\t\t\tinst.trigger.remove();\n\t\t\t$target.removeClass(this.markerClassName).\n\t\t\t\tunbind(\"focus\", this._showDatepicker).\n\t\t\t\tunbind(\"keydown\", this._doKeyDown).\n\t\t\t\tunbind(\"keypress\", this._doKeyPress).\n\t\t\t\tunbind(\"keyup\", this._doKeyUp);\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\t$target.removeClass(this.markerClassName).empty();\n\t\t}\n\t},\n\n\t/* Enable the date picker to a jQuery selection.\n\t * @param  target\telement - the target input field or division or span\n\t */\n\t_enableDatepicker: function(target) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName === \"input\") {\n\t\t\ttarget.disabled = false;\n\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\teach(function() { this.disabled = false; }).end().\n\t\t\t\tfilter(\"img\").css({opacity: \"1.0\", cursor: \"\"});\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\tinline.children().removeClass(\"ui-state-disabled\");\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tprop(\"disabled\", false);\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t},\n\n\t/* Disable the date picker to a jQuery selection.\n\t * @param  target\telement - the target input field or division or span\n\t */\n\t_disableDatepicker: function(target) {\n\t\tvar nodeName, inline,\n\t\t\t$target = $(target),\n\t\t\tinst = $.data(target, PROP_NAME);\n\n\t\tif (!$target.hasClass(this.markerClassName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tnodeName = target.nodeName.toLowerCase();\n\t\tif (nodeName === \"input\") {\n\t\t\ttarget.disabled = true;\n\t\t\tinst.trigger.filter(\"button\").\n\t\t\t\teach(function() { this.disabled = true; }).end().\n\t\t\t\tfilter(\"img\").css({opacity: \"0.5\", cursor: \"default\"});\n\t\t} else if (nodeName === \"div\" || nodeName === \"span\") {\n\t\t\tinline = $target.children(\".\" + this._inlineClass);\n\t\t\tinline.children().addClass(\"ui-state-disabled\");\n\t\t\tinline.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").\n\t\t\t\tprop(\"disabled\", true);\n\t\t}\n\t\tthis._disabledInputs = $.map(this._disabledInputs,\n\t\t\tfunction(value) { return (value === target ? null : value); }); // delete entry\n\t\tthis._disabledInputs[this._disabledInputs.length] = target;\n\t},\n\n\t/* Is the first field in a jQuery collection disabled as a datepicker?\n\t * @param  target\telement - the target input field or division or span\n\t * @return boolean - true if disabled, false if enabled\n\t */\n\t_isDisabledDatepicker: function(target) {\n\t\tif (!target) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (var i = 0; i < this._disabledInputs.length; i++) {\n\t\t\tif (this._disabledInputs[i] === target) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t},\n\n\t/* Retrieve the instance data for the target control.\n\t * @param  target  element - the target input field or division or span\n\t * @return  object - the associated instance data\n\t * @throws  error if a jQuery problem getting data\n\t */\n\t_getInst: function(target) {\n\t\ttry {\n\t\t\treturn $.data(target, PROP_NAME);\n\t\t}\n\t\tcatch (err) {\n\t\t\tthrow \"Missing instance data for this datepicker\";\n\t\t}\n\t},\n\n\t/* Update or retrieve the settings for a date picker attached to an input field or division.\n\t * @param  target  element - the target input field or division or span\n\t * @param  name\tobject - the new settings to update or\n\t *\t\t\t\tstring - the name of the setting to change or retrieve,\n\t *\t\t\t\twhen retrieving also \"all\" for all instance settings or\n\t *\t\t\t\t\"defaults\" for all global defaults\n\t * @param  value   any - the new value for the setting\n\t *\t\t\t\t(omit if above is an object or to retrieve a value)\n\t */\n\t_optionDatepicker: function(target, name, value) {\n\t\tvar settings, date, minDate, maxDate,\n\t\t\tinst = this._getInst(target);\n\n\t\tif (arguments.length === 2 && typeof name === \"string\") {\n\t\t\treturn (name === \"defaults\" ? $.extend({}, $.datepicker._defaults) :\n\t\t\t\t(inst ? (name === \"all\" ? $.extend({}, inst.settings) :\n\t\t\t\tthis._get(inst, name)) : null));\n\t\t}\n\n\t\tsettings = name || {};\n\t\tif (typeof name === \"string\") {\n\t\t\tsettings = {};\n\t\t\tsettings[name] = value;\n\t\t}\n\n\t\tif (inst) {\n\t\t\tif (this._curInst === inst) {\n\t\t\t\tthis._hideDatepicker();\n\t\t\t}\n\n\t\t\tdate = this._getDateDatepicker(target, true);\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\");\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\");\n\t\t\textendRemove(inst.settings, settings);\n\t\t\t// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided\n\t\t\tif (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) {\n\t\t\t\tinst.settings.minDate = this._formatDate(inst, minDate);\n\t\t\t}\n\t\t\tif (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) {\n\t\t\t\tinst.settings.maxDate = this._formatDate(inst, maxDate);\n\t\t\t}\n\t\t\tif ( \"disabled\" in settings ) {\n\t\t\t\tif ( settings.disabled ) {\n\t\t\t\t\tthis._disableDatepicker(target);\n\t\t\t\t} else {\n\t\t\t\t\tthis._enableDatepicker(target);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._attachments($(target), inst);\n\t\t\tthis._autoSize(inst);\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateAlternate(inst);\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t// change method deprecated\n\t_changeDatepicker: function(target, name, value) {\n\t\tthis._optionDatepicker(target, name, value);\n\t},\n\n\t/* Redraw the date picker attached to an input field or division.\n\t * @param  target  element - the target input field or division or span\n\t */\n\t_refreshDatepicker: function(target) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._updateDatepicker(inst);\n\t\t}\n\t},\n\n\t/* Set the dates for a jQuery selection.\n\t * @param  target element - the target input field or division or span\n\t * @param  date\tDate - the new date\n\t */\n\t_setDateDatepicker: function(target, date) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst) {\n\t\t\tthis._setDate(inst, date);\n\t\t\tthis._updateDatepicker(inst);\n\t\t\tthis._updateAlternate(inst);\n\t\t}\n\t},\n\n\t/* Get the date(s) for the first entry in a jQuery selection.\n\t * @param  target element - the target input field or division or span\n\t * @param  noDefault boolean - true if no default date is to be used\n\t * @return Date - the current date\n\t */\n\t_getDateDatepicker: function(target, noDefault) {\n\t\tvar inst = this._getInst(target);\n\t\tif (inst && !inst.inline) {\n\t\t\tthis._setDateFromField(inst, noDefault);\n\t\t}\n\t\treturn (inst ? this._getDate(inst) : null);\n\t},\n\n\t/* Handle keystrokes. */\n\t_doKeyDown: function(event) {\n\t\tvar onSelect, dateStr, sel,\n\t\t\tinst = $.datepicker._getInst(event.target),\n\t\t\thandled = true,\n\t\t\tisRTL = inst.dpDiv.is(\".ui-datepicker-rtl\");\n\n\t\tinst._keyEvent = true;\n\t\tif ($.datepicker._datepickerShowing) {\n\t\t\tswitch (event.keyCode) {\n\t\t\t\tcase 9: $.datepicker._hideDatepicker();\n\t\t\t\t\t\thandled = false;\n\t\t\t\t\t\tbreak; // hide on tab out\n\t\t\t\tcase 13: sel = $(\"td.\" + $.datepicker._dayOverClass + \":not(.\" +\n\t\t\t\t\t\t\t\t\t$.datepicker._currentClass + \")\", inst.dpDiv);\n\t\t\t\t\t\tif (sel[0]) {\n\t\t\t\t\t\t\t$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tonSelect = $.datepicker._get(inst, \"onSelect\");\n\t\t\t\t\t\tif (onSelect) {\n\t\t\t\t\t\t\tdateStr = $.datepicker._formatDate(inst);\n\n\t\t\t\t\t\t\t// trigger custom callback\n\t\t\t\t\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn false; // don't submit the form\n\t\t\t\tcase 27: $.datepicker._hideDatepicker();\n\t\t\t\t\t\tbreak; // hide on escape\n\t\t\t\tcase 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\tbreak; // previous month/year on page up/+ ctrl\n\t\t\t\tcase 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\tbreak; // next month/year on page down/+ ctrl\n\t\t\t\tcase 35: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._clearDate(event.target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // clear on ctrl or command +end\n\t\t\t\tcase 36: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._gotoToday(event.target);\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // current on ctrl or command +home\n\t\t\t\tcase 37: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// -1 day on ctrl or command +left\n\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t-$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// next month/year on alt +left on Mac\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 38: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, -7, \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // -1 week on ctrl or command +up\n\t\t\t\tcase 39: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\t// +1 day on ctrl or command +right\n\t\t\t\t\t\tif (event.originalEvent.altKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, (event.ctrlKey ?\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepBigMonths\") :\n\t\t\t\t\t\t\t\t+$.datepicker._get(inst, \"stepMonths\")), \"M\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// next month/year on alt +right\n\t\t\t\t\t\tbreak;\n\t\t\t\tcase 40: if (event.ctrlKey || event.metaKey) {\n\t\t\t\t\t\t\t$.datepicker._adjustDate(event.target, +7, \"D\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandled = event.ctrlKey || event.metaKey;\n\t\t\t\t\t\tbreak; // +1 week on ctrl or command +down\n\t\t\t\tdefault: handled = false;\n\t\t\t}\n\t\t} else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home\n\t\t\t$.datepicker._showDatepicker(this);\n\t\t} else {\n\t\t\thandled = false;\n\t\t}\n\n\t\tif (handled) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t}\n\t},\n\n\t/* Filter entered characters - based on date format. */\n\t_doKeyPress: function(event) {\n\t\tvar chars, chr,\n\t\t\tinst = $.datepicker._getInst(event.target);\n\n\t\tif ($.datepicker._get(inst, \"constrainInput\")) {\n\t\t\tchars = $.datepicker._possibleChars($.datepicker._get(inst, \"dateFormat\"));\n\t\t\tchr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode);\n\t\t\treturn event.ctrlKey || event.metaKey || (chr < \" \" || !chars || chars.indexOf(chr) > -1);\n\t\t}\n\t},\n\n\t/* Synchronise manual entry and field/alternate field. */\n\t_doKeyUp: function(event) {\n\t\tvar date,\n\t\t\tinst = $.datepicker._getInst(event.target);\n\n\t\tif (inst.input.val() !== inst.lastVal) {\n\t\t\ttry {\n\t\t\t\tdate = $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t(inst.input ? inst.input.val() : null),\n\t\t\t\t\t$.datepicker._getFormatConfig(inst));\n\n\t\t\t\tif (date) { // only if valid\n\t\t\t\t\t$.datepicker._setDateFromField(inst);\n\t\t\t\t\t$.datepicker._updateAlternate(inst);\n\t\t\t\t\t$.datepicker._updateDatepicker(inst);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (err) {\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t},\n\n\t/* Pop-up the date picker for a given input field.\n\t * If false returned from beforeShow event handler do not show.\n\t * @param  input  element - the input field attached to the date picker or\n\t *\t\t\t\t\tevent - if triggered by focus\n\t */\n\t_showDatepicker: function(input) {\n\t\tinput = input.target || input;\n\t\tif (input.nodeName.toLowerCase() !== \"input\") { // find from button/image trigger\n\t\t\tinput = $(\"input\", input.parentNode)[0];\n\t\t}\n\n\t\tif ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here\n\t\t\treturn;\n\t\t}\n\n\t\tvar inst, beforeShow, beforeShowSettings, isFixed,\n\t\t\toffset, showAnim, duration;\n\n\t\tinst = $.datepicker._getInst(input);\n\t\tif ($.datepicker._curInst && $.datepicker._curInst !== inst) {\n\t\t\t$.datepicker._curInst.dpDiv.stop(true, true);\n\t\t\tif ( inst && $.datepicker._datepickerShowing ) {\n\t\t\t\t$.datepicker._hideDatepicker( $.datepicker._curInst.input[0] );\n\t\t\t}\n\t\t}\n\n\t\tbeforeShow = $.datepicker._get(inst, \"beforeShow\");\n\t\tbeforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {};\n\t\tif(beforeShowSettings === false){\n\t\t\treturn;\n\t\t}\n\t\textendRemove(inst.settings, beforeShowSettings);\n\n\t\tinst.lastVal = null;\n\t\t$.datepicker._lastInput = input;\n\t\t$.datepicker._setDateFromField(inst);\n\n\t\tif ($.datepicker._inDialog) { // hide cursor\n\t\t\tinput.value = \"\";\n\t\t}\n\t\tif (!$.datepicker._pos) { // position below input\n\t\t\t$.datepicker._pos = $.datepicker._findPos(input);\n\t\t\t$.datepicker._pos[1] += input.offsetHeight; // add the height\n\t\t}\n\n\t\tisFixed = false;\n\t\t$(input).parents().each(function() {\n\t\t\tisFixed |= $(this).css(\"position\") === \"fixed\";\n\t\t\treturn !isFixed;\n\t\t});\n\n\t\toffset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]};\n\t\t$.datepicker._pos = null;\n\t\t//to avoid flashes on Firefox\n\t\tinst.dpDiv.empty();\n\t\t// determine sizing offscreen\n\t\tinst.dpDiv.css({position: \"absolute\", display: \"block\", top: \"-1000px\"});\n\t\t$.datepicker._updateDatepicker(inst);\n\t\t// fix width for dynamic number of date pickers\n\t\t// and adjust position before showing\n\t\toffset = $.datepicker._checkOffset(inst, offset, isFixed);\n\t\tinst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ?\n\t\t\t\"static\" : (isFixed ? \"fixed\" : \"absolute\")), display: \"none\",\n\t\t\tleft: offset.left + \"px\", top: offset.top + \"px\"});\n\n\t\tif (!inst.inline) {\n\t\t\tshowAnim = $.datepicker._get(inst, \"showAnim\");\n\t\t\tduration = $.datepicker._get(inst, \"duration\");\n\t\t\tinst.dpDiv.zIndex($(input).zIndex()+1);\n\t\t\t$.datepicker._datepickerShowing = true;\n\n\t\t\tif ( $.effects && $.effects.effect[ showAnim ] ) {\n\t\t\t\tinst.dpDiv.show(showAnim, $.datepicker._get(inst, \"showOptions\"), duration);\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[showAnim || \"show\"](showAnim ? duration : null);\n\t\t\t}\n\n\t\t\tif ( $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\t\tinst.input.focus();\n\t\t\t}\n\n\t\t\t$.datepicker._curInst = inst;\n\t\t}\n\t},\n\n\t/* Generate the date picker content. */\n\t_updateDatepicker: function(inst) {\n\t\tthis.maxRows = 4; //Reset the max number of rows being displayed (see #7043)\n\t\tinstActive = inst; // for delegate hover events\n\t\tinst.dpDiv.empty().append(this._generateHTML(inst));\n\t\tthis._attachHandlers(inst);\n\t\tinst.dpDiv.find(\".\" + this._dayOverClass + \" a\").mouseover();\n\n\t\tvar origyearshtml,\n\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\tcols = numMonths[1],\n\t\t\twidth = 17;\n\n\t\tinst.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\");\n\t\tif (cols > 1) {\n\t\t\tinst.dpDiv.addClass(\"ui-datepicker-multi-\" + cols).css(\"width\", (width * cols) + \"em\");\n\t\t}\n\t\tinst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? \"add\" : \"remove\") +\n\t\t\t\"Class\"](\"ui-datepicker-multi\");\n\t\tinst.dpDiv[(this._get(inst, \"isRTL\") ? \"add\" : \"remove\") +\n\t\t\t\"Class\"](\"ui-datepicker-rtl\");\n\n\t\tif (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {\n\t\t\tinst.input.focus();\n\t\t}\n\n\t\t// deffered render of the years select (to avoid flashes on Firefox)\n\t\tif( inst.yearshtml ){\n\t\t\torigyearshtml = inst.yearshtml;\n\t\t\tsetTimeout(function(){\n\t\t\t\t//assure that inst.yearshtml didn't change.\n\t\t\t\tif( origyearshtml === inst.yearshtml && inst.yearshtml ){\n\t\t\t\t\tinst.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(inst.yearshtml);\n\t\t\t\t}\n\t\t\t\torigyearshtml = inst.yearshtml = null;\n\t\t\t}, 0);\n\t\t}\n\t},\n\n\t// #6694 - don't focus the input if it's already focused\n\t// this breaks the change event in IE\n\t// Support: IE and jQuery <1.9\n\t_shouldFocusInput: function( inst ) {\n\t\treturn inst.input && inst.input.is( \":visible\" ) && !inst.input.is( \":disabled\" ) && !inst.input.is( \":focus\" );\n\t},\n\n\t/* Check positioning to remain on screen. */\n\t_checkOffset: function(inst, offset, isFixed) {\n\t\tvar dpWidth = inst.dpDiv.outerWidth(),\n\t\t\tdpHeight = inst.dpDiv.outerHeight(),\n\t\t\tinputWidth = inst.input ? inst.input.outerWidth() : 0,\n\t\t\tinputHeight = inst.input ? inst.input.outerHeight() : 0,\n\t\t\tviewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()),\n\t\t\tviewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop());\n\n\t\toffset.left -= (this._get(inst, \"isRTL\") ? (dpWidth - inputWidth) : 0);\n\t\toffset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0;\n\t\toffset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;\n\n\t\t// now check if datepicker is showing outside window viewport - move to a better place if so.\n\t\toffset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ?\n\t\t\tMath.abs(offset.left + dpWidth - viewWidth) : 0);\n\t\toffset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ?\n\t\t\tMath.abs(dpHeight + inputHeight) : 0);\n\n\t\treturn offset;\n\t},\n\n\t/* Find an object's position on the screen. */\n\t_findPos: function(obj) {\n\t\tvar position,\n\t\t\tinst = this._getInst(obj),\n\t\t\tisRTL = this._get(inst, \"isRTL\");\n\n\t\twhile (obj && (obj.type === \"hidden\" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) {\n\t\t\tobj = obj[isRTL ? \"previousSibling\" : \"nextSibling\"];\n\t\t}\n\n\t\tposition = $(obj).offset();\n\t\treturn [position.left, position.top];\n\t},\n\n\t/* Hide the date picker from view.\n\t * @param  input  element - the input field attached to the date picker\n\t */\n\t_hideDatepicker: function(input) {\n\t\tvar showAnim, duration, postProcess, onClose,\n\t\t\tinst = this._curInst;\n\n\t\tif (!inst || (input && inst !== $.data(input, PROP_NAME))) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this._datepickerShowing) {\n\t\t\tshowAnim = this._get(inst, \"showAnim\");\n\t\t\tduration = this._get(inst, \"duration\");\n\t\t\tpostProcess = function() {\n\t\t\t\t$.datepicker._tidyDialog(inst);\n\t\t\t};\n\n\t\t\t// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed\n\t\t\tif ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {\n\t\t\t\tinst.dpDiv.hide(showAnim, $.datepicker._get(inst, \"showOptions\"), duration, postProcess);\n\t\t\t} else {\n\t\t\t\tinst.dpDiv[(showAnim === \"slideDown\" ? \"slideUp\" :\n\t\t\t\t\t(showAnim === \"fadeIn\" ? \"fadeOut\" : \"hide\"))]((showAnim ? duration : null), postProcess);\n\t\t\t}\n\n\t\t\tif (!showAnim) {\n\t\t\t\tpostProcess();\n\t\t\t}\n\t\t\tthis._datepickerShowing = false;\n\n\t\t\tonClose = this._get(inst, \"onClose\");\n\t\t\tif (onClose) {\n\t\t\t\tonClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : \"\"), inst]);\n\t\t\t}\n\n\t\t\tthis._lastInput = null;\n\t\t\tif (this._inDialog) {\n\t\t\t\tthis._dialogInput.css({ position: \"absolute\", left: \"0\", top: \"-100px\" });\n\t\t\t\tif ($.blockUI) {\n\t\t\t\t\t$.unblockUI();\n\t\t\t\t\t$(\"body\").append(this.dpDiv);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._inDialog = false;\n\t\t}\n\t},\n\n\t/* Tidy up after a dialog display. */\n\t_tidyDialog: function(inst) {\n\t\tinst.dpDiv.removeClass(this._dialogClass).unbind(\".ui-datepicker-calendar\");\n\t},\n\n\t/* Close date picker if clicked elsewhere. */\n\t_checkExternalClick: function(event) {\n\t\tif (!$.datepicker._curInst) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar $target = $(event.target),\n\t\t\tinst = $.datepicker._getInst($target[0]);\n\n\t\tif ( ( ( $target[0].id !== $.datepicker._mainDivId &&\n\t\t\t\t$target.parents(\"#\" + $.datepicker._mainDivId).length === 0 &&\n\t\t\t\t!$target.hasClass($.datepicker.markerClassName) &&\n\t\t\t\t!$target.closest(\".\" + $.datepicker._triggerClass).length &&\n\t\t\t\t$.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||\n\t\t\t( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) {\n\t\t\t\t$.datepicker._hideDatepicker();\n\t\t}\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustDate: function(id, offset, period) {\n\t\tvar target = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tif (this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\t\tthis._adjustInstDate(inst, offset +\n\t\t\t(period === \"M\" ? this._get(inst, \"showCurrentAtPos\") : 0), // undo positioning\n\t\t\tperiod);\n\t\tthis._updateDatepicker(inst);\n\t},\n\n\t/* Action for current link. */\n\t_gotoToday: function(id) {\n\t\tvar date,\n\t\t\ttarget = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tif (this._get(inst, \"gotoCurrent\") && inst.currentDay) {\n\t\t\tinst.selectedDay = inst.currentDay;\n\t\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth;\n\t\t\tinst.drawYear = inst.selectedYear = inst.currentYear;\n\t\t} else {\n\t\t\tdate = new Date();\n\t\t\tinst.selectedDay = date.getDate();\n\t\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\t}\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a new month/year. */\n\t_selectMonthYear: function(id, select, period) {\n\t\tvar target = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tinst[\"selected\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\tinst[\"draw\" + (period === \"M\" ? \"Month\" : \"Year\")] =\n\t\t\tparseInt(select.options[select.selectedIndex].value,10);\n\n\t\tthis._notifyChange(inst);\n\t\tthis._adjustDate(target);\n\t},\n\n\t/* Action for selecting a day. */\n\t_selectDay: function(id, month, year, td) {\n\t\tvar inst,\n\t\t\ttarget = $(id);\n\n\t\tif ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) {\n\t\t\treturn;\n\t\t}\n\n\t\tinst = this._getInst(target[0]);\n\t\tinst.selectedDay = inst.currentDay = $(\"a\", td).html();\n\t\tinst.selectedMonth = inst.currentMonth = month;\n\t\tinst.selectedYear = inst.currentYear = year;\n\t\tthis._selectDate(id, this._formatDate(inst,\n\t\t\tinst.currentDay, inst.currentMonth, inst.currentYear));\n\t},\n\n\t/* Erase the input field and hide the date picker. */\n\t_clearDate: function(id) {\n\t\tvar target = $(id);\n\t\tthis._selectDate(target, \"\");\n\t},\n\n\t/* Update the input field with the selected date. */\n\t_selectDate: function(id, dateStr) {\n\t\tvar onSelect,\n\t\t\ttarget = $(id),\n\t\t\tinst = this._getInst(target[0]);\n\n\t\tdateStr = (dateStr != null ? dateStr : this._formatDate(inst));\n\t\tif (inst.input) {\n\t\t\tinst.input.val(dateStr);\n\t\t}\n\t\tthis._updateAlternate(inst);\n\n\t\tonSelect = this._get(inst, \"onSelect\");\n\t\tif (onSelect) {\n\t\t\tonSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]);  // trigger custom callback\n\t\t} else if (inst.input) {\n\t\t\tinst.input.trigger(\"change\"); // fire the change event\n\t\t}\n\n\t\tif (inst.inline){\n\t\t\tthis._updateDatepicker(inst);\n\t\t} else {\n\t\t\tthis._hideDatepicker();\n\t\t\tthis._lastInput = inst.input[0];\n\t\t\tif (typeof(inst.input[0]) !== \"object\") {\n\t\t\t\tinst.input.focus(); // restore focus\n\t\t\t}\n\t\t\tthis._lastInput = null;\n\t\t}\n\t},\n\n\t/* Update any alternate field to synchronise with the main field. */\n\t_updateAlternate: function(inst) {\n\t\tvar altFormat, date, dateStr,\n\t\t\taltField = this._get(inst, \"altField\");\n\n\t\tif (altField) { // update alternate field too\n\t\t\taltFormat = this._get(inst, \"altFormat\") || this._get(inst, \"dateFormat\");\n\t\t\tdate = this._getDate(inst);\n\t\t\tdateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));\n\t\t\t$(altField).each(function() { $(this).val(dateStr); });\n\t\t}\n\t},\n\n\t/* Set as beforeShowDay function to prevent selection of weekends.\n\t * @param  date  Date - the date to customise\n\t * @return [boolean, string] - is this date selectable?, what is its CSS class?\n\t */\n\tnoWeekends: function(date) {\n\t\tvar day = date.getDay();\n\t\treturn [(day > 0 && day < 6), \"\"];\n\t},\n\n\t/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.\n\t * @param  date  Date - the date to get the week for\n\t * @return  number - the number of the week within the year that contains this date\n\t */\n\tiso8601Week: function(date) {\n\t\tvar time,\n\t\t\tcheckDate = new Date(date.getTime());\n\n\t\t// Find Thursday of this week starting on Monday\n\t\tcheckDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7));\n\n\t\ttime = checkDate.getTime();\n\t\tcheckDate.setMonth(0); // Compare with Jan 1\n\t\tcheckDate.setDate(1);\n\t\treturn Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1;\n\t},\n\n\t/* Parse a string value into a date object.\n\t * See formatDate below for the possible formats.\n\t *\n\t * @param  format string - the expected format of the date\n\t * @param  value string - the date in the above format\n\t * @param  settings Object - attributes include:\n\t *\t\t\t\t\tshortYearCutoff  number - the cutoff year for determining the century (optional)\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return  Date - the extracted date value or null if value is blank\n\t */\n\tparseDate: function (format, value, settings) {\n\t\tif (format == null || value == null) {\n\t\t\tthrow \"Invalid arguments\";\n\t\t}\n\n\t\tvalue = (typeof value === \"object\" ? value.toString() : value + \"\");\n\t\tif (value === \"\") {\n\t\t\treturn null;\n\t\t}\n\n\t\tvar iFormat, dim, extra,\n\t\t\tiValue = 0,\n\t\t\tshortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff,\n\t\t\tshortYearCutoff = (typeof shortYearCutoffTemp !== \"string\" ? shortYearCutoffTemp :\n\t\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)),\n\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\tyear = -1,\n\t\t\tmonth = -1,\n\t\t\tday = -1,\n\t\t\tdoy = -1,\n\t\t\tliteral = false,\n\t\t\tdate,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\t\t\t// Extract a number from the string value\n\t\t\tgetNumber = function(match) {\n\t\t\t\tvar isDoubled = lookAhead(match),\n\t\t\t\t\tsize = (match === \"@\" ? 14 : (match === \"!\" ? 20 :\n\t\t\t\t\t(match === \"y\" && isDoubled ? 4 : (match === \"o\" ? 3 : 2)))),\n\t\t\t\t\tdigits = new RegExp(\"^\\\\d{1,\" + size + \"}\"),\n\t\t\t\t\tnum = value.substring(iValue).match(digits);\n\t\t\t\tif (!num) {\n\t\t\t\t\tthrow \"Missing number at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue += num[0].length;\n\t\t\t\treturn parseInt(num[0], 10);\n\t\t\t},\n\t\t\t// Extract a name from the string value and convert to an index\n\t\t\tgetName = function(match, shortNames, longNames) {\n\t\t\t\tvar index = -1,\n\t\t\t\t\tnames = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) {\n\t\t\t\t\t\treturn [ [k, v] ];\n\t\t\t\t\t}).sort(function (a, b) {\n\t\t\t\t\t\treturn -(a[1].length - b[1].length);\n\t\t\t\t\t});\n\n\t\t\t\t$.each(names, function (i, pair) {\n\t\t\t\t\tvar name = pair[1];\n\t\t\t\t\tif (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) {\n\t\t\t\t\t\tindex = pair[0];\n\t\t\t\t\t\tiValue += name.length;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif (index !== -1) {\n\t\t\t\t\treturn index + 1;\n\t\t\t\t} else {\n\t\t\t\t\tthrow \"Unknown name at position \" + iValue;\n\t\t\t\t}\n\t\t\t},\n\t\t\t// Confirm that a literal character matches the string value\n\t\t\tcheckLiteral = function() {\n\t\t\t\tif (value.charAt(iValue) !== format.charAt(iFormat)) {\n\t\t\t\t\tthrow \"Unexpected literal at position \" + iValue;\n\t\t\t\t}\n\t\t\t\tiValue++;\n\t\t\t};\n\n\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\tif (literal) {\n\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\tday = getNumber(\"d\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\tgetName(\"D\", dayNamesShort, dayNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\tdoy = getNumber(\"o\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\tmonth = getNumber(\"m\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\tmonth = getName(\"M\", monthNamesShort, monthNames);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\tyear = getNumber(\"y\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\tdate = new Date(getNumber(\"@\"));\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\tdate = new Date((getNumber(\"!\") - this._ticksTo1970) / 10000);\n\t\t\t\t\t\tyear = date.getFullYear();\n\t\t\t\t\t\tmonth = date.getMonth() + 1;\n\t\t\t\t\t\tday = date.getDate();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\")){\n\t\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcheckLiteral();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (iValue < value.length){\n\t\t\textra = value.substr(iValue);\n\t\t\tif (!/^\\s+/.test(extra)) {\n\t\t\t\tthrow \"Extra/unparsed characters found in date: \" + extra;\n\t\t\t}\n\t\t}\n\n\t\tif (year === -1) {\n\t\t\tyear = new Date().getFullYear();\n\t\t} else if (year < 100) {\n\t\t\tyear += new Date().getFullYear() - new Date().getFullYear() % 100 +\n\t\t\t\t(year <= shortYearCutoff ? 0 : -100);\n\t\t}\n\n\t\tif (doy > -1) {\n\t\t\tmonth = 1;\n\t\t\tday = doy;\n\t\t\tdo {\n\t\t\t\tdim = this._getDaysInMonth(year, month - 1);\n\t\t\t\tif (day <= dim) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmonth++;\n\t\t\t\tday -= dim;\n\t\t\t} while (true);\n\t\t}\n\n\t\tdate = this._daylightSavingAdjust(new Date(year, month - 1, day));\n\t\tif (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) {\n\t\t\tthrow \"Invalid date\"; // E.g. 31/02/00\n\t\t}\n\t\treturn date;\n\t},\n\n\t/* Standard date formats. */\n\tATOM: \"yy-mm-dd\", // RFC 3339 (ISO 8601)\n\tCOOKIE: \"D, dd M yy\",\n\tISO_8601: \"yy-mm-dd\",\n\tRFC_822: \"D, d M y\",\n\tRFC_850: \"DD, dd-M-y\",\n\tRFC_1036: \"D, d M y\",\n\tRFC_1123: \"D, d M yy\",\n\tRFC_2822: \"D, d M yy\",\n\tRSS: \"D, d M y\", // RFC 822\n\tTICKS: \"!\",\n\tTIMESTAMP: \"@\",\n\tW3C: \"yy-mm-dd\", // ISO 8601\n\n\t_ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) +\n\t\tMath.floor(1970 / 400)) * 24 * 60 * 60 * 10000000),\n\n\t/* Format a date object into a string value.\n\t * The format can be combinations of the following:\n\t * d  - day of month (no leading zero)\n\t * dd - day of month (two digit)\n\t * o  - day of year (no leading zeros)\n\t * oo - day of year (three digit)\n\t * D  - day name short\n\t * DD - day name long\n\t * m  - month of year (no leading zero)\n\t * mm - month of year (two digit)\n\t * M  - month name short\n\t * MM - month name long\n\t * y  - year (two digit)\n\t * yy - year (four digit)\n\t * @ - Unix timestamp (ms since 01/01/1970)\n\t * ! - Windows ticks (100ns since 01/01/0001)\n\t * \"...\" - literal text\n\t * '' - single quote\n\t *\n\t * @param  format string - the desired format of the date\n\t * @param  date Date - the date value to format\n\t * @param  settings Object - attributes include:\n\t *\t\t\t\t\tdayNamesShort\tstring[7] - abbreviated names of the days from Sunday (optional)\n\t *\t\t\t\t\tdayNames\t\tstring[7] - names of the days from Sunday (optional)\n\t *\t\t\t\t\tmonthNamesShort string[12] - abbreviated names of the months (optional)\n\t *\t\t\t\t\tmonthNames\t\tstring[12] - names of the months (optional)\n\t * @return  string - the date in the above format\n\t */\n\tformatDate: function (format, date, settings) {\n\t\tif (!date) {\n\t\t\treturn \"\";\n\t\t}\n\n\t\tvar iFormat,\n\t\t\tdayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort,\n\t\t\tdayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames,\n\t\t\tmonthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort,\n\t\t\tmonthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t},\n\t\t\t// Format a number, with leading zero if necessary\n\t\t\tformatNumber = function(match, value, len) {\n\t\t\t\tvar num = \"\" + value;\n\t\t\t\tif (lookAhead(match)) {\n\t\t\t\t\twhile (num.length < len) {\n\t\t\t\t\t\tnum = \"0\" + num;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn num;\n\t\t\t},\n\t\t\t// Format a name, short or long as requested\n\t\t\tformatName = function(match, value, shortNames, longNames) {\n\t\t\t\treturn (lookAhead(match) ? longNames[value] : shortNames[value]);\n\t\t\t},\n\t\t\toutput = \"\",\n\t\t\tliteral = false;\n\n\t\tif (date) {\n\t\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\t\tif (literal) {\n\t\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\t\tliteral = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\t\tcase \"d\":\n\t\t\t\t\t\t\toutput += formatNumber(\"d\", date.getDate(), 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"D\":\n\t\t\t\t\t\t\toutput += formatName(\"D\", date.getDay(), dayNamesShort, dayNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"o\":\n\t\t\t\t\t\t\toutput += formatNumber(\"o\",\n\t\t\t\t\t\t\t\tMath.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"m\":\n\t\t\t\t\t\t\toutput += formatNumber(\"m\", date.getMonth() + 1, 2);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"M\":\n\t\t\t\t\t\t\toutput += formatName(\"M\", date.getMonth(), monthNamesShort, monthNames);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\":\n\t\t\t\t\t\t\toutput += (lookAhead(\"y\") ? date.getFullYear() :\n\t\t\t\t\t\t\t\t(date.getYear() % 100 < 10 ? \"0\" : \"\") + date.getYear() % 100);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"@\":\n\t\t\t\t\t\t\toutput += date.getTime();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"!\":\n\t\t\t\t\t\t\toutput += date.getTime() * 10000 + this._ticksTo1970;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\t\toutput += \"'\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\toutput += format.charAt(iFormat);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t},\n\n\t/* Extract all possible characters from the date format. */\n\t_possibleChars: function (format) {\n\t\tvar iFormat,\n\t\t\tchars = \"\",\n\t\t\tliteral = false,\n\t\t\t// Check whether a format character is doubled\n\t\t\tlookAhead = function(match) {\n\t\t\t\tvar matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match);\n\t\t\t\tif (matches) {\n\t\t\t\t\tiFormat++;\n\t\t\t\t}\n\t\t\t\treturn matches;\n\t\t\t};\n\n\t\tfor (iFormat = 0; iFormat < format.length; iFormat++) {\n\t\t\tif (literal) {\n\t\t\t\tif (format.charAt(iFormat) === \"'\" && !lookAhead(\"'\")) {\n\t\t\t\t\tliteral = false;\n\t\t\t\t} else {\n\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (format.charAt(iFormat)) {\n\t\t\t\t\tcase \"d\": case \"m\": case \"y\": case \"@\":\n\t\t\t\t\t\tchars += \"0123456789\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"D\": case \"M\":\n\t\t\t\t\t\treturn null; // Accept anything\n\t\t\t\t\tcase \"'\":\n\t\t\t\t\t\tif (lookAhead(\"'\")) {\n\t\t\t\t\t\t\tchars += \"'\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tliteral = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tchars += format.charAt(iFormat);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn chars;\n\t},\n\n\t/* Get a setting value, defaulting if necessary. */\n\t_get: function(inst, name) {\n\t\treturn inst.settings[name] !== undefined ?\n\t\t\tinst.settings[name] : this._defaults[name];\n\t},\n\n\t/* Parse existing date and initialise date picker. */\n\t_setDateFromField: function(inst, noDefault) {\n\t\tif (inst.input.val() === inst.lastVal) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar dateFormat = this._get(inst, \"dateFormat\"),\n\t\t\tdates = inst.lastVal = inst.input ? inst.input.val() : null,\n\t\t\tdefaultDate = this._getDefaultDate(inst),\n\t\t\tdate = defaultDate,\n\t\t\tsettings = this._getFormatConfig(inst);\n\n\t\ttry {\n\t\t\tdate = this.parseDate(dateFormat, dates, settings) || defaultDate;\n\t\t} catch (event) {\n\t\t\tdates = (noDefault ? \"\" : dates);\n\t\t}\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tinst.currentDay = (dates ? date.getDate() : 0);\n\t\tinst.currentMonth = (dates ? date.getMonth() : 0);\n\t\tinst.currentYear = (dates ? date.getFullYear() : 0);\n\t\tthis._adjustInstDate(inst);\n\t},\n\n\t/* Retrieve the default date shown on opening. */\n\t_getDefaultDate: function(inst) {\n\t\treturn this._restrictMinMax(inst,\n\t\t\tthis._determineDate(inst, this._get(inst, \"defaultDate\"), new Date()));\n\t},\n\n\t/* A date may be specified as an exact value or a relative one. */\n\t_determineDate: function(inst, date, defaultDate) {\n\t\tvar offsetNumeric = function(offset) {\n\t\t\t\tvar date = new Date();\n\t\t\t\tdate.setDate(date.getDate() + offset);\n\t\t\t\treturn date;\n\t\t\t},\n\t\t\toffsetString = function(offset) {\n\t\t\t\ttry {\n\t\t\t\t\treturn $.datepicker.parseDate($.datepicker._get(inst, \"dateFormat\"),\n\t\t\t\t\t\toffset, $.datepicker._getFormatConfig(inst));\n\t\t\t\t}\n\t\t\t\tcatch (e) {\n\t\t\t\t\t// Ignore\n\t\t\t\t}\n\n\t\t\t\tvar date = (offset.toLowerCase().match(/^c/) ?\n\t\t\t\t\t$.datepicker._getDate(inst) : null) || new Date(),\n\t\t\t\t\tyear = date.getFullYear(),\n\t\t\t\t\tmonth = date.getMonth(),\n\t\t\t\t\tday = date.getDate(),\n\t\t\t\t\tpattern = /([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g,\n\t\t\t\t\tmatches = pattern.exec(offset);\n\n\t\t\t\twhile (matches) {\n\t\t\t\t\tswitch (matches[2] || \"d\") {\n\t\t\t\t\t\tcase \"d\" : case \"D\" :\n\t\t\t\t\t\t\tday += parseInt(matches[1],10); break;\n\t\t\t\t\t\tcase \"w\" : case \"W\" :\n\t\t\t\t\t\t\tday += parseInt(matches[1],10) * 7; break;\n\t\t\t\t\t\tcase \"m\" : case \"M\" :\n\t\t\t\t\t\t\tmonth += parseInt(matches[1],10);\n\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"y\": case \"Y\" :\n\t\t\t\t\t\t\tyear += parseInt(matches[1],10);\n\t\t\t\t\t\t\tday = Math.min(day, $.datepicker._getDaysInMonth(year, month));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tmatches = pattern.exec(offset);\n\t\t\t\t}\n\t\t\t\treturn new Date(year, month, day);\n\t\t\t},\n\t\t\tnewDate = (date == null || date === \"\" ? defaultDate : (typeof date === \"string\" ? offsetString(date) :\n\t\t\t\t(typeof date === \"number\" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime()))));\n\n\t\tnewDate = (newDate && newDate.toString() === \"Invalid Date\" ? defaultDate : newDate);\n\t\tif (newDate) {\n\t\t\tnewDate.setHours(0);\n\t\t\tnewDate.setMinutes(0);\n\t\t\tnewDate.setSeconds(0);\n\t\t\tnewDate.setMilliseconds(0);\n\t\t}\n\t\treturn this._daylightSavingAdjust(newDate);\n\t},\n\n\t/* Handle switch to/from daylight saving.\n\t * Hours may be non-zero on daylight saving cut-over:\n\t * > 12 when midnight changeover, but then cannot generate\n\t * midnight datetime, so jump to 1AM, otherwise reset.\n\t * @param  date  (Date) the date to check\n\t * @return  (Date) the corrected date\n\t */\n\t_daylightSavingAdjust: function(date) {\n\t\tif (!date) {\n\t\t\treturn null;\n\t\t}\n\t\tdate.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0);\n\t\treturn date;\n\t},\n\n\t/* Set the date(s) directly. */\n\t_setDate: function(inst, date, noChange) {\n\t\tvar clear = !date,\n\t\t\torigMonth = inst.selectedMonth,\n\t\t\torigYear = inst.selectedYear,\n\t\t\tnewDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));\n\n\t\tinst.selectedDay = inst.currentDay = newDate.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();\n\t\tinst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();\n\t\tif ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) {\n\t\t\tthis._notifyChange(inst);\n\t\t}\n\t\tthis._adjustInstDate(inst);\n\t\tif (inst.input) {\n\t\t\tinst.input.val(clear ? \"\" : this._formatDate(inst));\n\t\t}\n\t},\n\n\t/* Retrieve the date(s) directly. */\n\t_getDate: function(inst) {\n\t\tvar startDate = (!inst.currentYear || (inst.input && inst.input.val() === \"\") ? null :\n\t\t\tthis._daylightSavingAdjust(new Date(\n\t\t\tinst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\t\treturn startDate;\n\t},\n\n\t/* Attach the onxxx handlers.  These are declared statically so\n\t * they work with static code transformers like Caja.\n\t */\n\t_attachHandlers: function(inst) {\n\t\tvar stepMonths = this._get(inst, \"stepMonths\"),\n\t\t\tid = \"#\" + inst.id.replace( /\\\\\\\\/g, \"\\\\\" );\n\t\tinst.dpDiv.find(\"[data-handler]\").map(function () {\n\t\t\tvar handler = {\n\t\t\t\tprev: function () {\n\t\t\t\t\t$.datepicker._adjustDate(id, -stepMonths, \"M\");\n\t\t\t\t},\n\t\t\t\tnext: function () {\n\t\t\t\t\t$.datepicker._adjustDate(id, +stepMonths, \"M\");\n\t\t\t\t},\n\t\t\t\thide: function () {\n\t\t\t\t\t$.datepicker._hideDatepicker();\n\t\t\t\t},\n\t\t\t\ttoday: function () {\n\t\t\t\t\t$.datepicker._gotoToday(id);\n\t\t\t\t},\n\t\t\t\tselectDay: function () {\n\t\t\t\t\t$.datepicker._selectDay(id, +this.getAttribute(\"data-month\"), +this.getAttribute(\"data-year\"), this);\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectMonth: function () {\n\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"M\");\n\t\t\t\t\treturn false;\n\t\t\t\t},\n\t\t\t\tselectYear: function () {\n\t\t\t\t\t$.datepicker._selectMonthYear(id, this, \"Y\");\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t};\n\t\t\t$(this).bind(this.getAttribute(\"data-event\"), handler[this.getAttribute(\"data-handler\")]);\n\t\t});\n\t},\n\n\t/* Generate the HTML for the current state of the date picker. */\n\t_generateHTML: function(inst) {\n\t\tvar maxDraw, prevText, prev, nextText, next, currentText, gotoDate,\n\t\t\tcontrols, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,\n\t\t\tmonthNames, monthNamesShort, beforeShowDay, showOtherMonths,\n\t\t\tselectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,\n\t\t\tcornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,\n\t\t\tprintDate, dRow, tbody, daySettings, otherMonth, unselectable,\n\t\t\ttempDate = new Date(),\n\t\t\ttoday = this._daylightSavingAdjust(\n\t\t\t\tnew Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time\n\t\t\tisRTL = this._get(inst, \"isRTL\"),\n\t\t\tshowButtonPanel = this._get(inst, \"showButtonPanel\"),\n\t\t\thideIfNoPrevNext = this._get(inst, \"hideIfNoPrevNext\"),\n\t\t\tnavigationAsDateFormat = this._get(inst, \"navigationAsDateFormat\"),\n\t\t\tnumMonths = this._getNumberOfMonths(inst),\n\t\t\tshowCurrentAtPos = this._get(inst, \"showCurrentAtPos\"),\n\t\t\tstepMonths = this._get(inst, \"stepMonths\"),\n\t\t\tisMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1),\n\t\t\tcurrentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) :\n\t\t\t\tnew Date(inst.currentYear, inst.currentMonth, inst.currentDay))),\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tdrawMonth = inst.drawMonth - showCurrentAtPos,\n\t\t\tdrawYear = inst.drawYear;\n\n\t\tif (drawMonth < 0) {\n\t\t\tdrawMonth += 12;\n\t\t\tdrawYear--;\n\t\t}\n\t\tif (maxDate) {\n\t\t\tmaxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(),\n\t\t\t\tmaxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate()));\n\t\t\tmaxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw);\n\t\t\twhile (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) {\n\t\t\t\tdrawMonth--;\n\t\t\t\tif (drawMonth < 0) {\n\t\t\t\t\tdrawMonth = 11;\n\t\t\t\t\tdrawYear--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tinst.drawMonth = drawMonth;\n\t\tinst.drawYear = drawYear;\n\n\t\tprevText = this._get(inst, \"prevText\");\n\t\tprevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\n\t\tprev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ?\n\t\t\t\"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'\" +\n\t\t\t\" title='\" + prevText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\" :\n\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='\"+ prevText +\"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"e\" : \"w\") + \"'>\" + prevText + \"</span></a>\"));\n\n\t\tnextText = this._get(inst, \"nextText\");\n\t\tnextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText,\n\t\t\tthis._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)),\n\t\t\tthis._getFormatConfig(inst)));\n\n\t\tnext = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ?\n\t\t\t\"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'\" +\n\t\t\t\" title='\" + nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\" :\n\t\t\t(hideIfNoPrevNext ? \"\" : \"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='\"+ nextText + \"'><span class='ui-icon ui-icon-circle-triangle-\" + ( isRTL ? \"w\" : \"e\") + \"'>\" + nextText + \"</span></a>\"));\n\n\t\tcurrentText = this._get(inst, \"currentText\");\n\t\tgotoDate = (this._get(inst, \"gotoCurrent\") && inst.currentDay ? currentDate : today);\n\t\tcurrentText = (!navigationAsDateFormat ? currentText :\n\t\t\tthis.formatDate(currentText, gotoDate, this._getFormatConfig(inst)));\n\n\t\tcontrols = (!inst.inline ? \"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>\" +\n\t\t\tthis._get(inst, \"closeText\") + \"</button>\" : \"\");\n\n\t\tbuttonPanel = (showButtonPanel) ? \"<div class='ui-datepicker-buttonpane ui-widget-content'>\" + (isRTL ? controls : \"\") +\n\t\t\t(this._isInRange(inst, gotoDate) ? \"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'\" +\n\t\t\t\">\" + currentText + \"</button>\" : \"\") + (isRTL ? \"\" : controls) + \"</div>\" : \"\";\n\n\t\tfirstDay = parseInt(this._get(inst, \"firstDay\"),10);\n\t\tfirstDay = (isNaN(firstDay) ? 0 : firstDay);\n\n\t\tshowWeek = this._get(inst, \"showWeek\");\n\t\tdayNames = this._get(inst, \"dayNames\");\n\t\tdayNamesMin = this._get(inst, \"dayNamesMin\");\n\t\tmonthNames = this._get(inst, \"monthNames\");\n\t\tmonthNamesShort = this._get(inst, \"monthNamesShort\");\n\t\tbeforeShowDay = this._get(inst, \"beforeShowDay\");\n\t\tshowOtherMonths = this._get(inst, \"showOtherMonths\");\n\t\tselectOtherMonths = this._get(inst, \"selectOtherMonths\");\n\t\tdefaultDate = this._getDefaultDate(inst);\n\t\thtml = \"\";\n\t\tdow;\n\t\tfor (row = 0; row < numMonths[0]; row++) {\n\t\t\tgroup = \"\";\n\t\t\tthis.maxRows = 4;\n\t\t\tfor (col = 0; col < numMonths[1]; col++) {\n\t\t\t\tselectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay));\n\t\t\t\tcornerClass = \" ui-corner-all\";\n\t\t\t\tcalender = \"\";\n\t\t\t\tif (isMultiMonth) {\n\t\t\t\t\tcalender += \"<div class='ui-datepicker-group\";\n\t\t\t\t\tif (numMonths[1] > 1) {\n\t\t\t\t\t\tswitch (col) {\n\t\t\t\t\t\t\tcase 0: calender += \" ui-datepicker-group-first\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"right\" : \"left\"); break;\n\t\t\t\t\t\t\tcase numMonths[1]-1: calender += \" ui-datepicker-group-last\";\n\t\t\t\t\t\t\t\tcornerClass = \" ui-corner-\" + (isRTL ? \"left\" : \"right\"); break;\n\t\t\t\t\t\t\tdefault: calender += \" ui-datepicker-group-middle\"; cornerClass = \"\"; break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcalender += \"'>\";\n\t\t\t\t}\n\t\t\t\tcalender += \"<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix\" + cornerClass + \"'>\" +\n\t\t\t\t\t(/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : \"\") +\n\t\t\t\t\t(/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : \"\") +\n\t\t\t\t\tthis._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\t\t\trow > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers\n\t\t\t\t\t\"</div><table class='ui-datepicker-calendar'><thead>\" +\n\t\t\t\t\t\"<tr>\";\n\t\t\t\tthead = (showWeek ? \"<th class='ui-datepicker-week-col'>\" + this._get(inst, \"weekHeader\") + \"</th>\" : \"\");\n\t\t\t\tfor (dow = 0; dow < 7; dow++) { // days of the week\n\t\t\t\t\tday = (dow + firstDay) % 7;\n\t\t\t\t\tthead += \"<th\" + ((dow + firstDay + 6) % 7 >= 5 ? \" class='ui-datepicker-week-end'\" : \"\") + \">\" +\n\t\t\t\t\t\t\"<span title='\" + dayNames[day] + \"'>\" + dayNamesMin[day] + \"</span></th>\";\n\t\t\t\t}\n\t\t\t\tcalender += thead + \"</tr></thead><tbody>\";\n\t\t\t\tdaysInMonth = this._getDaysInMonth(drawYear, drawMonth);\n\t\t\t\tif (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) {\n\t\t\t\t\tinst.selectedDay = Math.min(inst.selectedDay, daysInMonth);\n\t\t\t\t}\n\t\t\t\tleadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7;\n\t\t\t\tcurRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate\n\t\t\t\tnumRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043)\n\t\t\t\tthis.maxRows = numRows;\n\t\t\t\tprintDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays));\n\t\t\t\tfor (dRow = 0; dRow < numRows; dRow++) { // create date picker rows\n\t\t\t\t\tcalender += \"<tr>\";\n\t\t\t\t\ttbody = (!showWeek ? \"\" : \"<td class='ui-datepicker-week-col'>\" +\n\t\t\t\t\t\tthis._get(inst, \"calculateWeek\")(printDate) + \"</td>\");\n\t\t\t\t\tfor (dow = 0; dow < 7; dow++) { // create date picker days\n\t\t\t\t\t\tdaySettings = (beforeShowDay ?\n\t\t\t\t\t\t\tbeforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, \"\"]);\n\t\t\t\t\t\totherMonth = (printDate.getMonth() !== drawMonth);\n\t\t\t\t\t\tunselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] ||\n\t\t\t\t\t\t\t(minDate && printDate < minDate) || (maxDate && printDate > maxDate);\n\t\t\t\t\t\ttbody += \"<td class='\" +\n\t\t\t\t\t\t\t((dow + firstDay + 6) % 7 >= 5 ? \" ui-datepicker-week-end\" : \"\") + // highlight weekends\n\t\t\t\t\t\t\t(otherMonth ? \" ui-datepicker-other-month\" : \"\") + // highlight days from other months\n\t\t\t\t\t\t\t((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key\n\t\t\t\t\t\t\t(defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ?\n\t\t\t\t\t\t\t// or defaultDate is current printedDate and defaultDate is selectedDate\n\t\t\t\t\t\t\t\" \" + this._dayOverClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(unselectable ? \" \" + this._unselectableClass + \" ui-state-disabled\": \"\") +  // highlight unselectable days\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \"\" : \" \" + daySettings[1] + // highlight custom dates\n\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" \" + this._currentClass : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-datepicker-today\" : \"\")) + \"'\" + // highlight today (if different)\n\t\t\t\t\t\t\t((!otherMonth || showOtherMonths) && daySettings[2] ? \" title='\" + daySettings[2].replace(/'/g, \"&#39;\") + \"'\" : \"\") + // cell title\n\t\t\t\t\t\t\t(unselectable ? \"\" : \" data-handler='selectDay' data-event='click' data-month='\" + printDate.getMonth() + \"' data-year='\" + printDate.getFullYear() + \"'\") + \">\" + // actions\n\t\t\t\t\t\t\t(otherMonth && !showOtherMonths ? \"&#xa0;\" : // display for other months\n\t\t\t\t\t\t\t(unselectable ? \"<span class='ui-state-default'>\" + printDate.getDate() + \"</span>\" : \"<a class='ui-state-default\" +\n\t\t\t\t\t\t\t(printDate.getTime() === today.getTime() ? \" ui-state-highlight\" : \"\") +\n\t\t\t\t\t\t\t(printDate.getTime() === currentDate.getTime() ? \" ui-state-active\" : \"\") + // highlight selected day\n\t\t\t\t\t\t\t(otherMonth ? \" ui-priority-secondary\" : \"\") + // distinguish dates from other months\n\t\t\t\t\t\t\t\"' href='#'>\" + printDate.getDate() + \"</a>\")) + \"</td>\"; // display selectable date\n\t\t\t\t\t\tprintDate.setDate(printDate.getDate() + 1);\n\t\t\t\t\t\tprintDate = this._daylightSavingAdjust(printDate);\n\t\t\t\t\t}\n\t\t\t\t\tcalender += tbody + \"</tr>\";\n\t\t\t\t}\n\t\t\t\tdrawMonth++;\n\t\t\t\tif (drawMonth > 11) {\n\t\t\t\t\tdrawMonth = 0;\n\t\t\t\t\tdrawYear++;\n\t\t\t\t}\n\t\t\t\tcalender += \"</tbody></table>\" + (isMultiMonth ? \"</div>\" +\n\t\t\t\t\t\t\t((numMonths[0] > 0 && col === numMonths[1]-1) ? \"<div class='ui-datepicker-row-break'></div>\" : \"\") : \"\");\n\t\t\t\tgroup += calender;\n\t\t\t}\n\t\t\thtml += group;\n\t\t}\n\t\thtml += buttonPanel;\n\t\tinst._keyEvent = false;\n\t\treturn html;\n\t},\n\n\t/* Generate the month and year header. */\n\t_generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate,\n\t\t\tsecondary, monthNames, monthNamesShort) {\n\n\t\tvar inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,\n\t\t\tchangeMonth = this._get(inst, \"changeMonth\"),\n\t\t\tchangeYear = this._get(inst, \"changeYear\"),\n\t\t\tshowMonthAfterYear = this._get(inst, \"showMonthAfterYear\"),\n\t\t\thtml = \"<div class='ui-datepicker-title'>\",\n\t\t\tmonthHtml = \"\";\n\n\t\t// month selection\n\t\tif (secondary || !changeMonth) {\n\t\t\tmonthHtml += \"<span class='ui-datepicker-month'>\" + monthNames[drawMonth] + \"</span>\";\n\t\t} else {\n\t\t\tinMinYear = (minDate && minDate.getFullYear() === drawYear);\n\t\t\tinMaxYear = (maxDate && maxDate.getFullYear() === drawYear);\n\t\t\tmonthHtml += \"<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>\";\n\t\t\tfor ( month = 0; month < 12; month++) {\n\t\t\t\tif ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) {\n\t\t\t\t\tmonthHtml += \"<option value='\" + month + \"'\" +\n\t\t\t\t\t\t(month === drawMonth ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\">\" + monthNamesShort[month] + \"</option>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tmonthHtml += \"</select>\";\n\t\t}\n\n\t\tif (!showMonthAfterYear) {\n\t\t\thtml += monthHtml + (secondary || !(changeMonth && changeYear) ? \"&#xa0;\" : \"\");\n\t\t}\n\n\t\t// year selection\n\t\tif ( !inst.yearshtml ) {\n\t\t\tinst.yearshtml = \"\";\n\t\t\tif (secondary || !changeYear) {\n\t\t\t\thtml += \"<span class='ui-datepicker-year'>\" + drawYear + \"</span>\";\n\t\t\t} else {\n\t\t\t\t// determine range of years to display\n\t\t\t\tyears = this._get(inst, \"yearRange\").split(\":\");\n\t\t\t\tthisYear = new Date().getFullYear();\n\t\t\t\tdetermineYear = function(value) {\n\t\t\t\t\tvar year = (value.match(/c[+\\-].*/) ? drawYear + parseInt(value.substring(1), 10) :\n\t\t\t\t\t\t(value.match(/[+\\-].*/) ? thisYear + parseInt(value, 10) :\n\t\t\t\t\t\tparseInt(value, 10)));\n\t\t\t\t\treturn (isNaN(year) ? thisYear : year);\n\t\t\t\t};\n\t\t\t\tyear = determineYear(years[0]);\n\t\t\t\tendYear = Math.max(year, determineYear(years[1] || \"\"));\n\t\t\t\tyear = (minDate ? Math.max(year, minDate.getFullYear()) : year);\n\t\t\t\tendYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear);\n\t\t\t\tinst.yearshtml += \"<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>\";\n\t\t\t\tfor (; year <= endYear; year++) {\n\t\t\t\t\tinst.yearshtml += \"<option value='\" + year + \"'\" +\n\t\t\t\t\t\t(year === drawYear ? \" selected='selected'\" : \"\") +\n\t\t\t\t\t\t\">\" + year + \"</option>\";\n\t\t\t\t}\n\t\t\t\tinst.yearshtml += \"</select>\";\n\n\t\t\t\thtml += inst.yearshtml;\n\t\t\t\tinst.yearshtml = null;\n\t\t\t}\n\t\t}\n\n\t\thtml += this._get(inst, \"yearSuffix\");\n\t\tif (showMonthAfterYear) {\n\t\t\thtml += (secondary || !(changeMonth && changeYear) ? \"&#xa0;\" : \"\") + monthHtml;\n\t\t}\n\t\thtml += \"</div>\"; // Close datepicker_header\n\t\treturn html;\n\t},\n\n\t/* Adjust one of the date sub-fields. */\n\t_adjustInstDate: function(inst, offset, period) {\n\t\tvar year = inst.drawYear + (period === \"Y\" ? offset : 0),\n\t\t\tmonth = inst.drawMonth + (period === \"M\" ? offset : 0),\n\t\t\tday = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === \"D\" ? offset : 0),\n\t\t\tdate = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day)));\n\n\t\tinst.selectedDay = date.getDate();\n\t\tinst.drawMonth = inst.selectedMonth = date.getMonth();\n\t\tinst.drawYear = inst.selectedYear = date.getFullYear();\n\t\tif (period === \"M\" || period === \"Y\") {\n\t\t\tthis._notifyChange(inst);\n\t\t}\n\t},\n\n\t/* Ensure a date is within any min/max bounds. */\n\t_restrictMinMax: function(inst, date) {\n\t\tvar minDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tnewDate = (minDate && date < minDate ? minDate : date);\n\t\treturn (maxDate && newDate > maxDate ? maxDate : newDate);\n\t},\n\n\t/* Notify change of month/year. */\n\t_notifyChange: function(inst) {\n\t\tvar onChange = this._get(inst, \"onChangeMonthYear\");\n\t\tif (onChange) {\n\t\t\tonChange.apply((inst.input ? inst.input[0] : null),\n\t\t\t\t[inst.selectedYear, inst.selectedMonth + 1, inst]);\n\t\t}\n\t},\n\n\t/* Determine the number of months to show. */\n\t_getNumberOfMonths: function(inst) {\n\t\tvar numMonths = this._get(inst, \"numberOfMonths\");\n\t\treturn (numMonths == null ? [1, 1] : (typeof numMonths === \"number\" ? [1, numMonths] : numMonths));\n\t},\n\n\t/* Determine the current maximum date - ensure no time components are set. */\n\t_getMinMaxDate: function(inst, minMax) {\n\t\treturn this._determineDate(inst, this._get(inst, minMax + \"Date\"), null);\n\t},\n\n\t/* Find the number of days in a given month. */\n\t_getDaysInMonth: function(year, month) {\n\t\treturn 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate();\n\t},\n\n\t/* Find the day of the week of the first of a month. */\n\t_getFirstDayOfMonth: function(year, month) {\n\t\treturn new Date(year, month, 1).getDay();\n\t},\n\n\t/* Determines if we should allow a \"next/prev\" month display change. */\n\t_canAdjustMonth: function(inst, offset, curYear, curMonth) {\n\t\tvar numMonths = this._getNumberOfMonths(inst),\n\t\t\tdate = this._daylightSavingAdjust(new Date(curYear,\n\t\t\tcurMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1));\n\n\t\tif (offset < 0) {\n\t\t\tdate.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth()));\n\t\t}\n\t\treturn this._isInRange(inst, date);\n\t},\n\n\t/* Is the given date in the accepted range? */\n\t_isInRange: function(inst, date) {\n\t\tvar yearSplit, currentYear,\n\t\t\tminDate = this._getMinMaxDate(inst, \"min\"),\n\t\t\tmaxDate = this._getMinMaxDate(inst, \"max\"),\n\t\t\tminYear = null,\n\t\t\tmaxYear = null,\n\t\t\tyears = this._get(inst, \"yearRange\");\n\t\t\tif (years){\n\t\t\t\tyearSplit = years.split(\":\");\n\t\t\t\tcurrentYear = new Date().getFullYear();\n\t\t\t\tminYear = parseInt(yearSplit[0], 10);\n\t\t\t\tmaxYear = parseInt(yearSplit[1], 10);\n\t\t\t\tif ( yearSplit[0].match(/[+\\-].*/) ) {\n\t\t\t\t\tminYear += currentYear;\n\t\t\t\t}\n\t\t\t\tif ( yearSplit[1].match(/[+\\-].*/) ) {\n\t\t\t\t\tmaxYear += currentYear;\n\t\t\t\t}\n\t\t\t}\n\n\t\treturn ((!minDate || date.getTime() >= minDate.getTime()) &&\n\t\t\t(!maxDate || date.getTime() <= maxDate.getTime()) &&\n\t\t\t(!minYear || date.getFullYear() >= minYear) &&\n\t\t\t(!maxYear || date.getFullYear() <= maxYear));\n\t},\n\n\t/* Provide the configuration settings for formatting/parsing. */\n\t_getFormatConfig: function(inst) {\n\t\tvar shortYearCutoff = this._get(inst, \"shortYearCutoff\");\n\t\tshortYearCutoff = (typeof shortYearCutoff !== \"string\" ? shortYearCutoff :\n\t\t\tnew Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));\n\t\treturn {shortYearCutoff: shortYearCutoff,\n\t\t\tdayNamesShort: this._get(inst, \"dayNamesShort\"), dayNames: this._get(inst, \"dayNames\"),\n\t\t\tmonthNamesShort: this._get(inst, \"monthNamesShort\"), monthNames: this._get(inst, \"monthNames\")};\n\t},\n\n\t/* Format the given date for display. */\n\t_formatDate: function(inst, day, month, year) {\n\t\tif (!day) {\n\t\t\tinst.currentDay = inst.selectedDay;\n\t\t\tinst.currentMonth = inst.selectedMonth;\n\t\t\tinst.currentYear = inst.selectedYear;\n\t\t}\n\t\tvar date = (day ? (typeof day === \"object\" ? day :\n\t\t\tthis._daylightSavingAdjust(new Date(year, month, day))) :\n\t\t\tthis._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay)));\n\t\treturn this.formatDate(this._get(inst, \"dateFormat\"), date, this._getFormatConfig(inst));\n\t}\n});\n\n/*\n * Bind hover events for datepicker elements.\n * Done via delegate so the binding only occurs once in the lifetime of the parent div.\n * Global instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.\n */\nfunction bindHover(dpDiv) {\n\tvar selector = \"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";\n\treturn dpDiv.delegate(selector, \"mouseout\", function() {\n\t\t\t$(this).removeClass(\"ui-state-hover\");\n\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t$(this).removeClass(\"ui-datepicker-prev-hover\");\n\t\t\t}\n\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t$(this).removeClass(\"ui-datepicker-next-hover\");\n\t\t\t}\n\t\t})\n\t\t.delegate(selector, \"mouseover\", function(){\n\t\t\tif (!$.datepicker._isDisabledDatepicker( instActive.inline ? dpDiv.parent()[0] : instActive.input[0])) {\n\t\t\t\t$(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\");\n\t\t\t\t$(this).addClass(\"ui-state-hover\");\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-prev\") !== -1) {\n\t\t\t\t\t$(this).addClass(\"ui-datepicker-prev-hover\");\n\t\t\t\t}\n\t\t\t\tif (this.className.indexOf(\"ui-datepicker-next\") !== -1) {\n\t\t\t\t\t$(this).addClass(\"ui-datepicker-next-hover\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n}\n\n/* jQuery extend now ignores nulls! */\nfunction extendRemove(target, props) {\n\t$.extend(target, props);\n\tfor (var name in props) {\n\t\tif (props[name] == null) {\n\t\t\ttarget[name] = props[name];\n\t\t}\n\t}\n\treturn target;\n}\n\n/* Invoke the datepicker functionality.\n   @param  options  string - a command, optionally followed by additional parameters or\n\t\t\t\t\tObject - settings for attaching new datepicker functionality\n   @return  jQuery object */\n$.fn.datepicker = function(options){\n\n\t/* Verify an empty collection wasn't passed - Fixes #6976 */\n\tif ( !this.length ) {\n\t\treturn this;\n\t}\n\n\t/* Initialise the date picker. */\n\tif (!$.datepicker.initialized) {\n\t\t$(document).mousedown($.datepicker._checkExternalClick);\n\t\t$.datepicker.initialized = true;\n\t}\n\n\t/* Append datepicker main container to body if not exist. */\n\tif ($(\"#\"+$.datepicker._mainDivId).length === 0) {\n\t\t$(\"body\").append($.datepicker.dpDiv);\n\t}\n\n\tvar otherArgs = Array.prototype.slice.call(arguments, 1);\n\tif (typeof options === \"string\" && (options === \"isDisabled\" || options === \"getDate\" || options === \"widget\")) {\n\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t}\n\tif (options === \"option\" && arguments.length === 2 && typeof arguments[1] === \"string\") {\n\t\treturn $.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\tapply($.datepicker, [this[0]].concat(otherArgs));\n\t}\n\treturn this.each(function() {\n\t\ttypeof options === \"string\" ?\n\t\t\t$.datepicker[\"_\" + options + \"Datepicker\"].\n\t\t\t\tapply($.datepicker, [this].concat(otherArgs)) :\n\t\t\t$.datepicker._attachDatepicker(this, options);\n\t});\n};\n\n$.datepicker = new Datepicker(); // singleton instance\n$.datepicker.initialized = false;\n$.datepicker.uuid = new Date().getTime();\n$.datepicker.version = \"1.10.3\";\n\n})(jQuery);\n\n(function( $, undefined ) {\n\nvar sizeRelatedOptions = {\n\t\tbuttons: true,\n\t\theight: true,\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true,\n\t\twidth: true\n\t},\n\tresizableRelatedOptions = {\n\t\tmaxHeight: true,\n\t\tmaxWidth: true,\n\t\tminHeight: true,\n\t\tminWidth: true\n\t};\n\n$.widget( \"ui.dialog\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tappendTo: \"body\",\n\t\tautoOpen: true,\n\t\tbuttons: [],\n\t\tcloseOnEscape: true,\n\t\tcloseText: \"close\",\n\t\tdialogClass: \"\",\n\t\tdraggable: true,\n\t\thide: null,\n\t\theight: \"auto\",\n\t\tmaxHeight: null,\n\t\tmaxWidth: null,\n\t\tminHeight: 150,\n\t\tminWidth: 150,\n\t\tmodal: false,\n\t\tposition: {\n\t\t\tmy: \"center\",\n\t\t\tat: \"center\",\n\t\t\tof: window,\n\t\t\tcollision: \"fit\",\n\t\t\t// Ensure the titlebar is always visible\n\t\t\tusing: function( pos ) {\n\t\t\t\tvar topOffset = $( this ).css( pos ).offset().top;\n\t\t\t\tif ( topOffset < 0 ) {\n\t\t\t\t\t$( this ).css( \"top\", pos.top - topOffset );\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tresizable: true,\n\t\tshow: null,\n\t\ttitle: null,\n\t\twidth: 300,\n\n\t\t// callbacks\n\t\tbeforeClose: null,\n\t\tclose: null,\n\t\tdrag: null,\n\t\tdragStart: null,\n\t\tdragStop: null,\n\t\tfocus: null,\n\t\topen: null,\n\t\tresize: null,\n\t\tresizeStart: null,\n\t\tresizeStop: null\n\t},\n\n\t_create: function() {\n\t\tthis.originalCss = {\n\t\t\tdisplay: this.element[0].style.display,\n\t\t\twidth: this.element[0].style.width,\n\t\t\tminHeight: this.element[0].style.minHeight,\n\t\t\tmaxHeight: this.element[0].style.maxHeight,\n\t\t\theight: this.element[0].style.height\n\t\t};\n\t\tthis.originalPosition = {\n\t\t\tparent: this.element.parent(),\n\t\t\tindex: this.element.parent().children().index( this.element )\n\t\t};\n\t\tthis.originalTitle = this.element.attr(\"title\");\n\t\tthis.options.title = this.options.title || this.originalTitle;\n\n\t\tthis._createWrapper();\n\n\t\tthis.element\n\t\t\t.show()\n\t\t\t.removeAttr(\"title\")\n\t\t\t.addClass(\"ui-dialog-content ui-widget-content\")\n\t\t\t.appendTo( this.uiDialog );\n\n\t\tthis._createTitlebar();\n\t\tthis._createButtonPane();\n\n\t\tif ( this.options.draggable && $.fn.draggable ) {\n\t\t\tthis._makeDraggable();\n\t\t}\n\t\tif ( this.options.resizable && $.fn.resizable ) {\n\t\t\tthis._makeResizable();\n\t\t}\n\n\t\tthis._isOpen = false;\n\t},\n\n\t_init: function() {\n\t\tif ( this.options.autoOpen ) {\n\t\t\tthis.open();\n\t\t}\n\t},\n\n\t_appendTo: function() {\n\t\tvar element = this.options.appendTo;\n\t\tif ( element && (element.jquery || element.nodeType) ) {\n\t\t\treturn $( element );\n\t\t}\n\t\treturn this.document.find( element || \"body\" ).eq( 0 );\n\t},\n\n\t_destroy: function() {\n\t\tvar next,\n\t\t\toriginalPosition = this.originalPosition;\n\n\t\tthis._destroyOverlay();\n\n\t\tthis.element\n\t\t\t.removeUniqueId()\n\t\t\t.removeClass(\"ui-dialog-content ui-widget-content\")\n\t\t\t.css( this.originalCss )\n\t\t\t// Without detaching first, the following becomes really slow\n\t\t\t.detach();\n\n\t\tthis.uiDialog.stop( true, true ).remove();\n\n\t\tif ( this.originalTitle ) {\n\t\t\tthis.element.attr( \"title\", this.originalTitle );\n\t\t}\n\n\t\tnext = originalPosition.parent.children().eq( originalPosition.index );\n\t\t// Don't try to place the dialog next to itself (#8613)\n\t\tif ( next.length && next[0] !== this.element[0] ) {\n\t\t\tnext.before( this.element );\n\t\t} else {\n\t\t\toriginalPosition.parent.append( this.element );\n\t\t}\n\t},\n\n\twidget: function() {\n\t\treturn this.uiDialog;\n\t},\n\n\tdisable: $.noop,\n\tenable: $.noop,\n\n\tclose: function( event ) {\n\t\tvar that = this;\n\n\t\tif ( !this._isOpen || this._trigger( \"beforeClose\", event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = false;\n\t\tthis._destroyOverlay();\n\n\t\tif ( !this.opener.filter(\":focusable\").focus().length ) {\n\t\t\t// Hiding a focused element doesn't trigger blur in WebKit\n\t\t\t// so in case we have nothing to focus on, explicitly blur the active element\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=47182\n\t\t\t$( this.document[0].activeElement ).blur();\n\t\t}\n\n\t\tthis._hide( this.uiDialog, this.options.hide, function() {\n\t\t\tthat._trigger( \"close\", event );\n\t\t});\n\t},\n\n\tisOpen: function() {\n\t\treturn this._isOpen;\n\t},\n\n\tmoveToTop: function() {\n\t\tthis._moveToTop();\n\t},\n\n\t_moveToTop: function( event, silent ) {\n\t\tvar moved = !!this.uiDialog.nextAll(\":visible\").insertBefore( this.uiDialog ).length;\n\t\tif ( moved && !silent ) {\n\t\t\tthis._trigger( \"focus\", event );\n\t\t}\n\t\treturn moved;\n\t},\n\n\topen: function() {\n\t\tvar that = this;\n\t\tif ( this._isOpen ) {\n\t\t\tif ( this._moveToTop() ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis._isOpen = true;\n\t\tthis.opener = $( this.document[0].activeElement );\n\n\t\tthis._size();\n\t\tthis._position();\n\t\tthis._createOverlay();\n\t\tthis._moveToTop( null, true );\n\t\tthis._show( this.uiDialog, this.options.show, function() {\n\t\t\tthat._focusTabbable();\n\t\t\tthat._trigger(\"focus\");\n\t\t});\n\n\t\tthis._trigger(\"open\");\n\t},\n\n\t_focusTabbable: function() {\n\t\t// Set focus to the first match:\n\t\t// 1. First element inside the dialog matching [autofocus]\n\t\t// 2. Tabbable element inside the content element\n\t\t// 3. Tabbable element inside the buttonpane\n\t\t// 4. The close button\n\t\t// 5. The dialog itself\n\t\tvar hasFocus = this.element.find(\"[autofocus]\");\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.element.find(\":tabbable\");\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogButtonPane.find(\":tabbable\");\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialogTitlebarClose.filter(\":tabbable\");\n\t\t}\n\t\tif ( !hasFocus.length ) {\n\t\t\thasFocus = this.uiDialog;\n\t\t}\n\t\thasFocus.eq( 0 ).focus();\n\t},\n\n\t_keepFocus: function( event ) {\n\t\tfunction checkFocus() {\n\t\t\tvar activeElement = this.document[0].activeElement,\n\t\t\t\tisActive = this.uiDialog[0] === activeElement ||\n\t\t\t\t\t$.contains( this.uiDialog[0], activeElement );\n\t\t\tif ( !isActive ) {\n\t\t\t\tthis._focusTabbable();\n\t\t\t}\n\t\t}\n\t\tevent.preventDefault();\n\t\tcheckFocus.call( this );\n\t\t// support: IE\n\t\t// IE <= 8 doesn't prevent moving focus even with event.preventDefault()\n\t\t// so we check again later\n\t\tthis._delay( checkFocus );\n\t},\n\n\t_createWrapper: function() {\n\t\tthis.uiDialog = $(\"<div>\")\n\t\t\t.addClass( \"ui-dialog ui-widget ui-widget-content ui-corner-all ui-front \" +\n\t\t\t\tthis.options.dialogClass )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\t// Setting tabIndex makes the div focusable\n\t\t\t\ttabIndex: -1,\n\t\t\t\trole: \"dialog\"\n\t\t\t})\n\t\t\t.appendTo( this._appendTo() );\n\n\t\tthis._on( this.uiDialog, {\n\t\t\tkeydown: function( event ) {\n\t\t\t\tif ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&\n\t\t\t\t\t\tevent.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tthis.close( event );\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// prevent tabbing out of dialogs\n\t\t\t\tif ( event.keyCode !== $.ui.keyCode.TAB ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tvar tabbables = this.uiDialog.find(\":tabbable\"),\n\t\t\t\t\tfirst = tabbables.filter(\":first\"),\n\t\t\t\t\tlast  = tabbables.filter(\":last\");\n\n\t\t\t\tif ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) {\n\t\t\t\t\tfirst.focus( 1 );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t} else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) {\n\t\t\t\t\tlast.focus( 1 );\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t},\n\t\t\tmousedown: function( event ) {\n\t\t\t\tif ( this._moveToTop( event ) ) {\n\t\t\t\t\tthis._focusTabbable();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// We assume that any existing aria-describedby attribute means\n\t\t// that the dialog content is marked up properly\n\t\t// otherwise we brute force the content as the description\n\t\tif ( !this.element.find(\"[aria-describedby]\").length ) {\n\t\t\tthis.uiDialog.attr({\n\t\t\t\t\"aria-describedby\": this.element.uniqueId().attr(\"id\")\n\t\t\t});\n\t\t}\n\t},\n\n\t_createTitlebar: function() {\n\t\tvar uiDialogTitle;\n\n\t\tthis.uiDialogTitlebar = $(\"<div>\")\n\t\t\t.addClass(\"ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix\")\n\t\t\t.prependTo( this.uiDialog );\n\t\tthis._on( this.uiDialogTitlebar, {\n\t\t\tmousedown: function( event ) {\n\t\t\t\t// Don't prevent click on close button (#8838)\n\t\t\t\t// Focusing a dialog that is partially scrolled out of view\n\t\t\t\t// causes the browser to scroll it into view, preventing the click event\n\t\t\t\tif ( !$( event.target ).closest(\".ui-dialog-titlebar-close\") ) {\n\t\t\t\t\t// Dialog isn't getting focus when dragging (#8063)\n\t\t\t\t\tthis.uiDialog.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.uiDialogTitlebarClose = $(\"<button></button>\")\n\t\t\t.button({\n\t\t\t\tlabel: this.options.closeText,\n\t\t\t\ticons: {\n\t\t\t\t\tprimary: \"ui-icon-closethick\"\n\t\t\t\t},\n\t\t\t\ttext: false\n\t\t\t})\n\t\t\t.addClass(\"ui-dialog-titlebar-close\")\n\t\t\t.appendTo( this.uiDialogTitlebar );\n\t\tthis._on( this.uiDialogTitlebarClose, {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tthis.close( event );\n\t\t\t}\n\t\t});\n\n\t\tuiDialogTitle = $(\"<span>\")\n\t\t\t.uniqueId()\n\t\t\t.addClass(\"ui-dialog-title\")\n\t\t\t.prependTo( this.uiDialogTitlebar );\n\t\tthis._title( uiDialogTitle );\n\n\t\tthis.uiDialog.attr({\n\t\t\t\"aria-labelledby\": uiDialogTitle.attr(\"id\")\n\t\t});\n\t},\n\n\t_title: function( title ) {\n\t\tif ( !this.options.title ) {\n\t\t\ttitle.html(\"&#160;\");\n\t\t}\n\t\ttitle.text( this.options.title );\n\t},\n\n\t_createButtonPane: function() {\n\t\tthis.uiDialogButtonPane = $(\"<div>\")\n\t\t\t.addClass(\"ui-dialog-buttonpane ui-widget-content ui-helper-clearfix\");\n\n\t\tthis.uiButtonSet = $(\"<div>\")\n\t\t\t.addClass(\"ui-dialog-buttonset\")\n\t\t\t.appendTo( this.uiDialogButtonPane );\n\n\t\tthis._createButtons();\n\t},\n\n\t_createButtons: function() {\n\t\tvar that = this,\n\t\t\tbuttons = this.options.buttons;\n\n\t\t// if we already have a button pane, remove it\n\t\tthis.uiDialogButtonPane.remove();\n\t\tthis.uiButtonSet.empty();\n\n\t\tif ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) {\n\t\t\tthis.uiDialog.removeClass(\"ui-dialog-buttons\");\n\t\t\treturn;\n\t\t}\n\n\t\t$.each( buttons, function( name, props ) {\n\t\t\tvar click, buttonOptions;\n\t\t\tprops = $.isFunction( props ) ?\n\t\t\t\t{ click: props, text: name } :\n\t\t\t\tprops;\n\t\t\t// Default to a non-submitting button\n\t\t\tprops = $.extend( { type: \"button\" }, props );\n\t\t\t// Change the context for the click callback to be the main element\n\t\t\tclick = props.click;\n\t\t\tprops.click = function() {\n\t\t\t\tclick.apply( that.element[0], arguments );\n\t\t\t};\n\t\t\tbuttonOptions = {\n\t\t\t\ticons: props.icons,\n\t\t\t\ttext: props.showText\n\t\t\t};\n\t\t\tdelete props.icons;\n\t\t\tdelete props.showText;\n\t\t\t$( \"<button></button>\", props )\n\t\t\t\t.button( buttonOptions )\n\t\t\t\t.appendTo( that.uiButtonSet );\n\t\t});\n\t\tthis.uiDialog.addClass(\"ui-dialog-buttons\");\n\t\tthis.uiDialogButtonPane.appendTo( this.uiDialog );\n\t},\n\n\t_makeDraggable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\tposition: ui.position,\n\t\t\t\toffset: ui.offset\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.draggable({\n\t\t\tcancel: \".ui-dialog-content, .ui-dialog-titlebar-close\",\n\t\t\thandle: \".ui-dialog-titlebar\",\n\t\t\tcontainment: \"document\",\n\t\t\tstart: function( event, ui ) {\n\t\t\t\t$( this ).addClass(\"ui-dialog-dragging\");\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"dragStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tdrag: function( event, ui ) {\n\t\t\t\tthat._trigger( \"drag\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\toptions.position = [\n\t\t\t\t\tui.position.left - that.document.scrollLeft(),\n\t\t\t\t\tui.position.top - that.document.scrollTop()\n\t\t\t\t];\n\t\t\t\t$( this ).removeClass(\"ui-dialog-dragging\");\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"dragStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t});\n\t},\n\n\t_makeResizable: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options,\n\t\t\thandles = options.resizable,\n\t\t\t// .ui-resizable has position: relative defined in the stylesheet\n\t\t\t// but dialogs have to use absolute or fixed positioning\n\t\t\tposition = this.uiDialog.css(\"position\"),\n\t\t\tresizeHandles = typeof handles === \"string\" ?\n\t\t\t\thandles\t:\n\t\t\t\t\"n,e,s,w,se,sw,ne,nw\";\n\n\t\tfunction filteredUi( ui ) {\n\t\t\treturn {\n\t\t\t\toriginalPosition: ui.originalPosition,\n\t\t\t\toriginalSize: ui.originalSize,\n\t\t\t\tposition: ui.position,\n\t\t\t\tsize: ui.size\n\t\t\t};\n\t\t}\n\n\t\tthis.uiDialog.resizable({\n\t\t\tcancel: \".ui-dialog-content\",\n\t\t\tcontainment: \"document\",\n\t\t\talsoResize: this.element,\n\t\t\tmaxWidth: options.maxWidth,\n\t\t\tmaxHeight: options.maxHeight,\n\t\t\tminWidth: options.minWidth,\n\t\t\tminHeight: this._minHeight(),\n\t\t\thandles: resizeHandles,\n\t\t\tstart: function( event, ui ) {\n\t\t\t\t$( this ).addClass(\"ui-dialog-resizing\");\n\t\t\t\tthat._blockFrames();\n\t\t\t\tthat._trigger( \"resizeStart\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tresize: function( event, ui ) {\n\t\t\t\tthat._trigger( \"resize\", event, filteredUi( ui ) );\n\t\t\t},\n\t\t\tstop: function( event, ui ) {\n\t\t\t\toptions.height = $( this ).height();\n\t\t\t\toptions.width = $( this ).width();\n\t\t\t\t$( this ).removeClass(\"ui-dialog-resizing\");\n\t\t\t\tthat._unblockFrames();\n\t\t\t\tthat._trigger( \"resizeStop\", event, filteredUi( ui ) );\n\t\t\t}\n\t\t})\n\t\t.css( \"position\", position );\n\t},\n\n\t_minHeight: function() {\n\t\tvar options = this.options;\n\n\t\treturn options.height === \"auto\" ?\n\t\t\toptions.minHeight :\n\t\t\tMath.min( options.minHeight, options.height );\n\t},\n\n\t_position: function() {\n\t\t// Need to show the dialog to get the actual offset in the position plugin\n\t\tvar isVisible = this.uiDialog.is(\":visible\");\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.show();\n\t\t}\n\t\tthis.uiDialog.position( this.options.position );\n\t\tif ( !isVisible ) {\n\t\t\tthis.uiDialog.hide();\n\t\t}\n\t},\n\n\t_setOptions: function( options ) {\n\t\tvar that = this,\n\t\t\tresize = false,\n\t\t\tresizableOptions = {};\n\n\t\t$.each( options, function( key, value ) {\n\t\t\tthat._setOption( key, value );\n\n\t\t\tif ( key in sizeRelatedOptions ) {\n\t\t\t\tresize = true;\n\t\t\t}\n\t\t\tif ( key in resizableRelatedOptions ) {\n\t\t\t\tresizableOptions[ key ] = value;\n\t\t\t}\n\t\t});\n\n\t\tif ( resize ) {\n\t\t\tthis._size();\n\t\t\tthis._position();\n\t\t}\n\t\tif ( this.uiDialog.is(\":data(ui-resizable)\") ) {\n\t\t\tthis.uiDialog.resizable( \"option\", resizableOptions );\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\t/*jshint maxcomplexity:15*/\n\t\tvar isDraggable, isResizable,\n\t\t\tuiDialog = this.uiDialog;\n\n\t\tif ( key === \"dialogClass\" ) {\n\t\t\tuiDialog\n\t\t\t\t.removeClass( this.options.dialogClass )\n\t\t\t\t.addClass( value );\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"appendTo\" ) {\n\t\t\tthis.uiDialog.appendTo( this._appendTo() );\n\t\t}\n\n\t\tif ( key === \"buttons\" ) {\n\t\t\tthis._createButtons();\n\t\t}\n\n\t\tif ( key === \"closeText\" ) {\n\t\t\tthis.uiDialogTitlebarClose.button({\n\t\t\t\t// Ensure that we always pass a string\n\t\t\t\tlabel: \"\" + value\n\t\t\t});\n\t\t}\n\n\t\tif ( key === \"draggable\" ) {\n\t\t\tisDraggable = uiDialog.is(\":data(ui-draggable)\");\n\t\t\tif ( isDraggable && !value ) {\n\t\t\t\tuiDialog.draggable(\"destroy\");\n\t\t\t}\n\n\t\t\tif ( !isDraggable && value ) {\n\t\t\t\tthis._makeDraggable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"position\" ) {\n\t\t\tthis._position();\n\t\t}\n\n\t\tif ( key === \"resizable\" ) {\n\t\t\t// currently resizable, becoming non-resizable\n\t\t\tisResizable = uiDialog.is(\":data(ui-resizable)\");\n\t\t\tif ( isResizable && !value ) {\n\t\t\t\tuiDialog.resizable(\"destroy\");\n\t\t\t}\n\n\t\t\t// currently resizable, changing handles\n\t\t\tif ( isResizable && typeof value === \"string\" ) {\n\t\t\t\tuiDialog.resizable( \"option\", \"handles\", value );\n\t\t\t}\n\n\t\t\t// currently non-resizable, becoming resizable\n\t\t\tif ( !isResizable && value !== false ) {\n\t\t\t\tthis._makeResizable();\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"title\" ) {\n\t\t\tthis._title( this.uiDialogTitlebar.find(\".ui-dialog-title\") );\n\t\t}\n\t},\n\n\t_size: function() {\n\t\t// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content\n\t\t// divs will both have width and height set, so we need to reset them\n\t\tvar nonContentHeight, minContentHeight, maxContentHeight,\n\t\t\toptions = this.options;\n\n\t\t// Reset content sizing\n\t\tthis.element.show().css({\n\t\t\twidth: \"auto\",\n\t\t\tminHeight: 0,\n\t\t\tmaxHeight: \"none\",\n\t\t\theight: 0\n\t\t});\n\n\t\tif ( options.minWidth > options.width ) {\n\t\t\toptions.width = options.minWidth;\n\t\t}\n\n\t\t// reset wrapper sizing\n\t\t// determine the height of all the non-content elements\n\t\tnonContentHeight = this.uiDialog.css({\n\t\t\t\theight: \"auto\",\n\t\t\t\twidth: options.width\n\t\t\t})\n\t\t\t.outerHeight();\n\t\tminContentHeight = Math.max( 0, options.minHeight - nonContentHeight );\n\t\tmaxContentHeight = typeof options.maxHeight === \"number\" ?\n\t\t\tMath.max( 0, options.maxHeight - nonContentHeight ) :\n\t\t\t\"none\";\n\n\t\tif ( options.height === \"auto\" ) {\n\t\t\tthis.element.css({\n\t\t\t\tminHeight: minContentHeight,\n\t\t\t\tmaxHeight: maxContentHeight,\n\t\t\t\theight: \"auto\"\n\t\t\t});\n\t\t} else {\n\t\t\tthis.element.height( Math.max( 0, options.height - nonContentHeight ) );\n\t\t}\n\n\t\tif (this.uiDialog.is(\":data(ui-resizable)\") ) {\n\t\t\tthis.uiDialog.resizable( \"option\", \"minHeight\", this._minHeight() );\n\t\t}\n\t},\n\n\t_blockFrames: function() {\n\t\tthis.iframeBlocks = this.document.find( \"iframe\" ).map(function() {\n\t\t\tvar iframe = $( this );\n\n\t\t\treturn $( \"<div>\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\twidth: iframe.outerWidth(),\n\t\t\t\t\theight: iframe.outerHeight()\n\t\t\t\t})\n\t\t\t\t.appendTo( iframe.parent() )\n\t\t\t\t.offset( iframe.offset() )[0];\n\t\t});\n\t},\n\n\t_unblockFrames: function() {\n\t\tif ( this.iframeBlocks ) {\n\t\t\tthis.iframeBlocks.remove();\n\t\t\tdelete this.iframeBlocks;\n\t\t}\n\t},\n\n\t_allowInteraction: function( event ) {\n\t\tif ( $( event.target ).closest(\".ui-dialog\").length ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// TODO: Remove hack when datepicker implements\n\t\t// the .ui-front logic (#8989)\n\t\treturn !!$( event.target ).closest(\".ui-datepicker\").length;\n\t},\n\n\t_createOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar that = this,\n\t\t\twidgetFullName = this.widgetFullName;\n\t\tif ( !$.ui.dialog.overlayInstances ) {\n\t\t\t// Prevent use of anchors and inputs.\n\t\t\t// We use a delay in case the overlay is created from an\n\t\t\t// event that we're going to be cancelling. (#2804)\n\t\t\tthis._delay(function() {\n\t\t\t\t// Handle .dialog().dialog(\"close\") (#4065)\n\t\t\t\tif ( $.ui.dialog.overlayInstances ) {\n\t\t\t\t\tthis.document.bind( \"focusin.dialog\", function( event ) {\n\t\t\t\t\t\tif ( !that._allowInteraction( event ) ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\t$(\".ui-dialog:visible:last .ui-dialog-content\")\n\t\t\t\t\t\t\t\t.data( widgetFullName )._focusTabbable();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis.overlay = $(\"<div>\")\n\t\t\t.addClass(\"ui-widget-overlay ui-front\")\n\t\t\t.appendTo( this._appendTo() );\n\t\tthis._on( this.overlay, {\n\t\t\tmousedown: \"_keepFocus\"\n\t\t});\n\t\t$.ui.dialog.overlayInstances++;\n\t},\n\n\t_destroyOverlay: function() {\n\t\tif ( !this.options.modal ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( this.overlay ) {\n\t\t\t$.ui.dialog.overlayInstances--;\n\n\t\t\tif ( !$.ui.dialog.overlayInstances ) {\n\t\t\t\tthis.document.unbind( \"focusin.dialog\" );\n\t\t\t}\n\t\t\tthis.overlay.remove();\n\t\t\tthis.overlay = null;\n\t\t}\n\t}\n});\n\n$.ui.dialog.overlayInstances = 0;\n\n// DEPRECATED\nif ( $.uiBackCompat !== false ) {\n\t// position option with array notation\n\t// just override with old implementation\n\t$.widget( \"ui.dialog\", $.ui.dialog, {\n\t\t_position: function() {\n\t\t\tvar position = this.options.position,\n\t\t\t\tmyAt = [],\n\t\t\t\toffset = [ 0, 0 ],\n\t\t\t\tisVisible;\n\n\t\t\tif ( position ) {\n\t\t\t\tif ( typeof position === \"string\" || (typeof position === \"object\" && \"0\" in position ) ) {\n\t\t\t\t\tmyAt = position.split ? position.split(\" \") : [ position[0], position[1] ];\n\t\t\t\t\tif ( myAt.length === 1 ) {\n\t\t\t\t\t\tmyAt[1] = myAt[0];\n\t\t\t\t\t}\n\n\t\t\t\t\t$.each( [ \"left\", \"top\" ], function( i, offsetPosition ) {\n\t\t\t\t\t\tif ( +myAt[ i ] === myAt[ i ] ) {\n\t\t\t\t\t\t\toffset[ i ] = myAt[ i ];\n\t\t\t\t\t\t\tmyAt[ i ] = offsetPosition;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tposition = {\n\t\t\t\t\t\tmy: myAt[0] + (offset[0] < 0 ? offset[0] : \"+\" + offset[0]) + \" \" +\n\t\t\t\t\t\t\tmyAt[1] + (offset[1] < 0 ? offset[1] : \"+\" + offset[1]),\n\t\t\t\t\t\tat: myAt.join(\" \")\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tposition = $.extend( {}, $.ui.dialog.prototype.options.position, position );\n\t\t\t} else {\n\t\t\t\tposition = $.ui.dialog.prototype.options.position;\n\t\t\t}\n\n\t\t\t// need to show the dialog to get the actual offset in the position plugin\n\t\t\tisVisible = this.uiDialog.is(\":visible\");\n\t\t\tif ( !isVisible ) {\n\t\t\t\tthis.uiDialog.show();\n\t\t\t}\n\t\t\tthis.uiDialog.position( position );\n\t\t\tif ( !isVisible ) {\n\t\t\t\tthis.uiDialog.hide();\n\t\t\t}\n\t\t}\n\t});\n}\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\nvar rvertical = /up|down|vertical/,\n\trpositivemotion = /up|left|vertical|horizontal/;\n\n$.effects.effect.blind = function( o, done ) {\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tdirection = o.direction || \"up\",\n\t\tvertical = rvertical.test( direction ),\n\t\tref = vertical ? \"height\" : \"width\",\n\t\tref2 = vertical ? \"top\" : \"left\",\n\t\tmotion = rpositivemotion.test( direction ),\n\t\tanimation = {},\n\t\tshow = mode === \"show\",\n\t\twrapper, distance, margin;\n\n\t// if already wrapped, the wrapper's properties are my property. #6245\n\tif ( el.parent().is( \".ui-effects-wrapper\" ) ) {\n\t\t$.effects.save( el.parent(), props );\n\t} else {\n\t\t$.effects.save( el, props );\n\t}\n\tel.show();\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\n\tdistance = wrapper[ ref ]();\n\tmargin = parseFloat( wrapper.css( ref2 ) ) || 0;\n\n\tanimation[ ref ] = show ? distance : 0;\n\tif ( !motion ) {\n\t\tel\n\t\t\t.css( vertical ? \"bottom\" : \"right\", 0 )\n\t\t\t.css( vertical ? \"top\" : \"left\", \"auto\" )\n\t\t\t.css({ position: \"absolute\" });\n\n\t\tanimation[ ref2 ] = show ? margin : distance + margin;\n\t}\n\n\t// start at 0 if we are showing\n\tif ( show ) {\n\t\twrapper.css( ref, 0 );\n\t\tif ( ! motion ) {\n\t\t\twrapper.css( ref2, margin + distance );\n\t\t}\n\t}\n\n\t// Animate\n\twrapper.animate( animation, {\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tqueue: false,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.bounce = function( o, done ) {\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\n\t\t// defaults:\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\thide = mode === \"hide\",\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"up\",\n\t\tdistance = o.distance,\n\t\ttimes = o.times || 5,\n\n\t\t// number of internal animations\n\t\tanims = times * 2 + ( show || hide ? 1 : 0 ),\n\t\tspeed = o.duration / anims,\n\t\teasing = o.easing,\n\n\t\t// utility:\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ),\n\t\ti,\n\t\tupAnim,\n\t\tdownAnim,\n\n\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\tqueue = el.queue(),\n\t\tqueuelen = queue.length;\n\n\t// Avoid touching opacity to prevent clearType and PNG issues in IE\n\tif ( show || hide ) {\n\t\tprops.push( \"opacity\" );\n\t}\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el ); // Create Wrapper\n\n\t// default distance for the BIGGEST bounce is the outer Distance / 3\n\tif ( !distance ) {\n\t\tdistance = el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]() / 3;\n\t}\n\n\tif ( show ) {\n\t\tdownAnim = { opacity: 1 };\n\t\tdownAnim[ ref ] = 0;\n\n\t\t// if we are showing, force opacity 0 and set the initial position\n\t\t// then do the \"first\" animation\n\t\tel.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion ? -distance * 2 : distance * 2 )\n\t\t\t.animate( downAnim, speed, easing );\n\t}\n\n\t// start at the smallest distance if we are hiding\n\tif ( hide ) {\n\t\tdistance = distance / Math.pow( 2, times - 1 );\n\t}\n\n\tdownAnim = {};\n\tdownAnim[ ref ] = 0;\n\t// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here\n\tfor ( i = 0; i < times; i++ ) {\n\t\tupAnim = {};\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\tel.animate( upAnim, speed, easing )\n\t\t\t.animate( downAnim, speed, easing );\n\n\t\tdistance = hide ? distance * 2 : distance / 2;\n\t}\n\n\t// Last Bounce when Hiding\n\tif ( hide ) {\n\t\tupAnim = { opacity: 0 };\n\t\tupAnim[ ref ] = ( motion ? \"-=\" : \"+=\" ) + distance;\n\n\t\tel.animate( upAnim, speed, easing );\n\t}\n\n\tel.queue(function() {\n\t\tif ( hide ) {\n\t\t\tel.hide();\n\t\t}\n\t\t$.effects.restore( el, props );\n\t\t$.effects.removeWrapper( el );\n\t\tdone();\n\t});\n\n\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\tif ( queuelen > 1) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\tel.dequeue();\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.clip = function( o, done ) {\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"vertical\",\n\t\tvert = direction === \"vertical\",\n\t\tsize = vert ? \"height\" : \"width\",\n\t\tposition = vert ? \"top\" : \"left\",\n\t\tanimation = {},\n\t\twrapper, animate, distance;\n\n\t// Save & Show\n\t$.effects.save( el, props );\n\tel.show();\n\n\t// Create Wrapper\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\tanimate = ( el[0].tagName === \"IMG\" ) ? wrapper : el;\n\tdistance = animate[ size ]();\n\n\t// Shift\n\tif ( show ) {\n\t\tanimate.css( size, 0 );\n\t\tanimate.css( position, distance / 2 );\n\t}\n\n\t// Create Animation Object:\n\tanimation[ size ] = show ? distance : 0;\n\tanimation[ position ] = show ? 0 : distance / 2;\n\n\t// Animate\n\tanimate.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( !show ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.drop = function( o, done ) {\n\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"opacity\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"left\",\n\t\tref = ( direction === \"up\" || direction === \"down\" ) ? \"top\" : \"left\",\n\t\tmotion = ( direction === \"up\" || direction === \"left\" ) ? \"pos\" : \"neg\",\n\t\tanimation = {\n\t\t\topacity: show ? 1 : 0\n\t\t},\n\t\tdistance;\n\n\t// Adjust\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\n\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\": \"outerWidth\" ]( true ) / 2;\n\n\tif ( show ) {\n\t\tel\n\t\t\t.css( \"opacity\", 0 )\n\t\t\t.css( ref, motion === \"pos\" ? -distance : distance );\n\t}\n\n\t// Animation\n\tanimation[ ref ] = ( show ?\n\t\t( motion === \"pos\" ? \"+=\" : \"-=\" ) :\n\t\t( motion === \"pos\" ? \"-=\" : \"+=\" ) ) +\n\t\tdistance;\n\n\t// Animate\n\tel.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.explode = function( o, done ) {\n\n\tvar rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3,\n\t\tcells = rows,\n\t\tel = $( this ),\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\n\t\t// show and then visibility:hidden the element before calculating offset\n\t\toffset = el.show().css( \"visibility\", \"hidden\" ).offset(),\n\n\t\t// width and height of a piece\n\t\twidth = Math.ceil( el.outerWidth() / cells ),\n\t\theight = Math.ceil( el.outerHeight() / rows ),\n\t\tpieces = [],\n\n\t\t// loop\n\t\ti, j, left, top, mx, my;\n\n\t// children animate complete:\n\tfunction childComplete() {\n\t\tpieces.push( this );\n\t\tif ( pieces.length === rows * cells ) {\n\t\t\tanimComplete();\n\t\t}\n\t}\n\n\t// clone the element for each row and cell.\n\tfor( i = 0; i < rows ; i++ ) { // ===>\n\t\ttop = offset.top + i * height;\n\t\tmy = i - ( rows - 1 ) / 2 ;\n\n\t\tfor( j = 0; j < cells ; j++ ) { // |||\n\t\t\tleft = offset.left + j * width;\n\t\t\tmx = j - ( cells - 1 ) / 2 ;\n\n\t\t\t// Create a clone of the now hidden main element that will be absolute positioned\n\t\t\t// within a wrapper div off the -left and -top equal to size of our pieces\n\t\t\tel\n\t\t\t\t.clone()\n\t\t\t\t.appendTo( \"body\" )\n\t\t\t\t.wrap( \"<div></div>\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\tvisibility: \"visible\",\n\t\t\t\t\tleft: -j * width,\n\t\t\t\t\ttop: -i * height\n\t\t\t\t})\n\n\t\t\t// select the wrapper - make it overflow: hidden and absolute positioned based on\n\t\t\t// where the original was located +left and +top equal to the size of pieces\n\t\t\t\t.parent()\n\t\t\t\t.addClass( \"ui-effects-explode\" )\n\t\t\t\t.css({\n\t\t\t\t\tposition: \"absolute\",\n\t\t\t\t\toverflow: \"hidden\",\n\t\t\t\t\twidth: width,\n\t\t\t\t\theight: height,\n\t\t\t\t\tleft: left + ( show ? mx * width : 0 ),\n\t\t\t\t\ttop: top + ( show ? my * height : 0 ),\n\t\t\t\t\topacity: show ? 0 : 1\n\t\t\t\t}).animate({\n\t\t\t\t\tleft: left + ( show ? 0 : mx * width ),\n\t\t\t\t\ttop: top + ( show ? 0 : my * height ),\n\t\t\t\t\topacity: show ? 1 : 0\n\t\t\t\t}, o.duration || 500, o.easing, childComplete );\n\t\t}\n\t}\n\n\tfunction animComplete() {\n\t\tel.css({\n\t\t\tvisibility: \"visible\"\n\t\t});\n\t\t$( pieces ).remove();\n\t\tif ( !show ) {\n\t\t\tel.hide();\n\t\t}\n\t\tdone();\n\t}\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.fade = function( o, done ) {\n\tvar el = $( this ),\n\t\tmode = $.effects.setMode( el, o.mode || \"toggle\" );\n\n\tel.animate({\n\t\topacity: mode\n\t}, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: done\n\t});\n};\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n$.effects.effect.fold = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"hide\" ),\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tsize = o.size || 15,\n\t\tpercent = /([0-9]+)%/.exec( size ),\n\t\thorizFirst = !!o.horizFirst,\n\t\twidthFirst = show !== horizFirst,\n\t\tref = widthFirst ? [ \"width\", \"height\" ] : [ \"height\", \"width\" ],\n\t\tduration = o.duration / 2,\n\t\twrapper, distance,\n\t\tanimation1 = {},\n\t\tanimation2 = {};\n\n\t$.effects.save( el, props );\n\tel.show();\n\n\t// Create Wrapper\n\twrapper = $.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\tdistance = widthFirst ?\n\t\t[ wrapper.width(), wrapper.height() ] :\n\t\t[ wrapper.height(), wrapper.width() ];\n\n\tif ( percent ) {\n\t\tsize = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];\n\t}\n\tif ( show ) {\n\t\twrapper.css( horizFirst ? {\n\t\t\theight: 0,\n\t\t\twidth: size\n\t\t} : {\n\t\t\theight: size,\n\t\t\twidth: 0\n\t\t});\n\t}\n\n\t// Animation\n\tanimation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size;\n\tanimation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0;\n\n\t// Animate\n\twrapper\n\t\t.animate( animation1, duration, o.easing )\n\t\t.animate( animation2, duration, o.easing, function() {\n\t\t\tif ( hide ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.highlight = function( o, done ) {\n\tvar elem = $( this ),\n\t\tprops = [ \"backgroundImage\", \"backgroundColor\", \"opacity\" ],\n\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\tanimation = {\n\t\t\tbackgroundColor: elem.css( \"backgroundColor\" )\n\t\t};\n\n\tif (mode === \"hide\") {\n\t\tanimation.opacity = 0;\n\t}\n\n\t$.effects.save( elem, props );\n\n\telem\n\t\t.show()\n\t\t.css({\n\t\t\tbackgroundImage: \"none\",\n\t\t\tbackgroundColor: o.color || \"#ffff99\"\n\t\t})\n\t\t.animate( animation, {\n\t\t\tqueue: false,\n\t\t\tduration: o.duration,\n\t\t\teasing: o.easing,\n\t\t\tcomplete: function() {\n\t\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\t\telem.hide();\n\t\t\t\t}\n\t\t\t\t$.effects.restore( elem, props );\n\t\t\t\tdone();\n\t\t\t}\n\t\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.pulsate = function( o, done ) {\n\tvar elem = $( this ),\n\t\tmode = $.effects.setMode( elem, o.mode || \"show\" ),\n\t\tshow = mode === \"show\",\n\t\thide = mode === \"hide\",\n\t\tshowhide = ( show || mode === \"hide\" ),\n\n\t\t// showing or hiding leaves of the \"last\" animation\n\t\tanims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),\n\t\tduration = o.duration / anims,\n\t\tanimateTo = 0,\n\t\tqueue = elem.queue(),\n\t\tqueuelen = queue.length,\n\t\ti;\n\n\tif ( show || !elem.is(\":visible\")) {\n\t\telem.css( \"opacity\", 0 ).show();\n\t\tanimateTo = 1;\n\t}\n\n\t// anims - 1 opacity \"toggles\"\n\tfor ( i = 1; i < anims; i++ ) {\n\t\telem.animate({\n\t\t\topacity: animateTo\n\t\t}, duration, o.easing );\n\t\tanimateTo = 1 - animateTo;\n\t}\n\n\telem.animate({\n\t\topacity: animateTo\n\t}, duration, o.easing);\n\n\telem.queue(function() {\n\t\tif ( hide ) {\n\t\t\telem.hide();\n\t\t}\n\t\tdone();\n\t});\n\n\t// We just queued up \"anims\" animations, we need to put them next in the queue\n\tif ( queuelen > 1 ) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\telem.dequeue();\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.puff = function( o, done ) {\n\tvar elem = $( this ),\n\t\tmode = $.effects.setMode( elem, o.mode || \"hide\" ),\n\t\thide = mode === \"hide\",\n\t\tpercent = parseInt( o.percent, 10 ) || 150,\n\t\tfactor = percent / 100,\n\t\toriginal = {\n\t\t\theight: elem.height(),\n\t\t\twidth: elem.width(),\n\t\t\touterHeight: elem.outerHeight(),\n\t\t\touterWidth: elem.outerWidth()\n\t\t};\n\n\t$.extend( o, {\n\t\teffect: \"scale\",\n\t\tqueue: false,\n\t\tfade: true,\n\t\tmode: mode,\n\t\tcomplete: done,\n\t\tpercent: hide ? percent : 100,\n\t\tfrom: hide ?\n\t\t\toriginal :\n\t\t\t{\n\t\t\t\theight: original.height * factor,\n\t\t\t\twidth: original.width * factor,\n\t\t\t\touterHeight: original.outerHeight * factor,\n\t\t\t\touterWidth: original.outerWidth * factor\n\t\t\t}\n\t});\n\n\telem.effect( o );\n};\n\n$.effects.effect.scale = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\toptions = $.extend( true, {}, o ),\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\tpercent = parseInt( o.percent, 10 ) ||\n\t\t\t( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === \"hide\" ? 0 : 100 ) ),\n\t\tdirection = o.direction || \"both\",\n\t\torigin = o.origin,\n\t\toriginal = {\n\t\t\theight: el.height(),\n\t\t\twidth: el.width(),\n\t\t\touterHeight: el.outerHeight(),\n\t\t\touterWidth: el.outerWidth()\n\t\t},\n\t\tfactor = {\n\t\t\ty: direction !== \"horizontal\" ? (percent / 100) : 1,\n\t\t\tx: direction !== \"vertical\" ? (percent / 100) : 1\n\t\t};\n\n\t// We are going to pass this effect to the size effect:\n\toptions.effect = \"size\";\n\toptions.queue = false;\n\toptions.complete = done;\n\n\t// Set default origin and restore for show/hide\n\tif ( mode !== \"effect\" ) {\n\t\toptions.origin = origin || [\"middle\",\"center\"];\n\t\toptions.restore = true;\n\t}\n\n\toptions.from = o.from || ( mode === \"show\" ? {\n\t\theight: 0,\n\t\twidth: 0,\n\t\touterHeight: 0,\n\t\touterWidth: 0\n\t} : original );\n\toptions.to = {\n\t\theight: original.height * factor.y,\n\t\twidth: original.width * factor.x,\n\t\touterHeight: original.outerHeight * factor.y,\n\t\touterWidth: original.outerWidth * factor.x\n\t};\n\n\t// Fade option to support puff\n\tif ( options.fade ) {\n\t\tif ( mode === \"show\" ) {\n\t\t\toptions.from.opacity = 0;\n\t\t\toptions.to.opacity = 1;\n\t\t}\n\t\tif ( mode === \"hide\" ) {\n\t\t\toptions.from.opacity = 1;\n\t\t\toptions.to.opacity = 0;\n\t\t}\n\t}\n\n\t// Animate\n\tel.effect( options );\n\n};\n\n$.effects.effect.size = function( o, done ) {\n\n\t// Create element\n\tvar original, baseline, factor,\n\t\tel = $( this ),\n\t\tprops0 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\", \"overflow\", \"opacity\" ],\n\n\t\t// Always restore\n\t\tprops1 = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"overflow\", \"opacity\" ],\n\n\t\t// Copy for children\n\t\tprops2 = [ \"width\", \"height\", \"overflow\" ],\n\t\tcProps = [ \"fontSize\" ],\n\t\tvProps = [ \"borderTopWidth\", \"borderBottomWidth\", \"paddingTop\", \"paddingBottom\" ],\n\t\thProps = [ \"borderLeftWidth\", \"borderRightWidth\", \"paddingLeft\", \"paddingRight\" ],\n\n\t\t// Set options\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\trestore = o.restore || mode !== \"effect\",\n\t\tscale = o.scale || \"both\",\n\t\torigin = o.origin || [ \"middle\", \"center\" ],\n\t\tposition = el.css( \"position\" ),\n\t\tprops = restore ? props0 : props1,\n\t\tzero = {\n\t\t\theight: 0,\n\t\t\twidth: 0,\n\t\t\touterHeight: 0,\n\t\t\touterWidth: 0\n\t\t};\n\n\tif ( mode === \"show\" ) {\n\t\tel.show();\n\t}\n\toriginal = {\n\t\theight: el.height(),\n\t\twidth: el.width(),\n\t\touterHeight: el.outerHeight(),\n\t\touterWidth: el.outerWidth()\n\t};\n\n\tif ( o.mode === \"toggle\" && mode === \"show\" ) {\n\t\tel.from = o.to || zero;\n\t\tel.to = o.from || original;\n\t} else {\n\t\tel.from = o.from || ( mode === \"show\" ? zero : original );\n\t\tel.to = o.to || ( mode === \"hide\" ? zero : original );\n\t}\n\n\t// Set scaling factor\n\tfactor = {\n\t\tfrom: {\n\t\t\ty: el.from.height / original.height,\n\t\t\tx: el.from.width / original.width\n\t\t},\n\t\tto: {\n\t\t\ty: el.to.height / original.height,\n\t\t\tx: el.to.width / original.width\n\t\t}\n\t};\n\n\t// Scale the css box\n\tif ( scale === \"box\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tprops = props.concat( vProps );\n\t\t\tel.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );\n\t\t\tel.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );\n\t\t}\n\n\t\t// Horizontal props scaling\n\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\tprops = props.concat( hProps );\n\t\t\tel.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );\n\t\t\tel.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );\n\t\t}\n\t}\n\n\t// Scale the content\n\tif ( scale === \"content\" || scale === \"both\" ) {\n\n\t\t// Vertical props scaling\n\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\tprops = props.concat( cProps ).concat( props2 );\n\t\t\tel.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );\n\t\t\tel.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );\n\t\t}\n\t}\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\tel.css( \"overflow\", \"hidden\" ).css( el.from );\n\n\t// Adjust\n\tif (origin) { // Calculate baseline shifts\n\t\tbaseline = $.effects.getBaseline( origin, original );\n\t\tel.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y;\n\t\tel.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x;\n\t\tel.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y;\n\t\tel.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x;\n\t}\n\tel.css( el.from ); // set top & left\n\n\t// Animate\n\tif ( scale === \"content\" || scale === \"both\" ) { // Scale the children\n\n\t\t// Add margins/font-size\n\t\tvProps = vProps.concat([ \"marginTop\", \"marginBottom\" ]).concat(cProps);\n\t\thProps = hProps.concat([ \"marginLeft\", \"marginRight\" ]);\n\t\tprops2 = props0.concat(vProps).concat(hProps);\n\n\t\tel.find( \"*[width]\" ).each( function(){\n\t\t\tvar child = $( this ),\n\t\t\t\tc_original = {\n\t\t\t\t\theight: child.height(),\n\t\t\t\t\twidth: child.width(),\n\t\t\t\t\touterHeight: child.outerHeight(),\n\t\t\t\t\touterWidth: child.outerWidth()\n\t\t\t\t};\n\t\t\tif (restore) {\n\t\t\t\t$.effects.save(child, props2);\n\t\t\t}\n\n\t\t\tchild.from = {\n\t\t\t\theight: c_original.height * factor.from.y,\n\t\t\t\twidth: c_original.width * factor.from.x,\n\t\t\t\touterHeight: c_original.outerHeight * factor.from.y,\n\t\t\t\touterWidth: c_original.outerWidth * factor.from.x\n\t\t\t};\n\t\t\tchild.to = {\n\t\t\t\theight: c_original.height * factor.to.y,\n\t\t\t\twidth: c_original.width * factor.to.x,\n\t\t\t\touterHeight: c_original.height * factor.to.y,\n\t\t\t\touterWidth: c_original.width * factor.to.x\n\t\t\t};\n\n\t\t\t// Vertical props scaling\n\t\t\tif ( factor.from.y !== factor.to.y ) {\n\t\t\t\tchild.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );\n\t\t\t\tchild.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );\n\t\t\t}\n\n\t\t\t// Horizontal props scaling\n\t\t\tif ( factor.from.x !== factor.to.x ) {\n\t\t\t\tchild.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );\n\t\t\t\tchild.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );\n\t\t\t}\n\n\t\t\t// Animate children\n\t\t\tchild.css( child.from );\n\t\t\tchild.animate( child.to, o.duration, o.easing, function() {\n\n\t\t\t\t// Restore children\n\t\t\t\tif ( restore ) {\n\t\t\t\t\t$.effects.restore( child, props2 );\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t// Animate\n\tel.animate( el.to, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( el.to.opacity === 0 ) {\n\t\t\t\tel.css( \"opacity\", el.from.opacity );\n\t\t\t}\n\t\t\tif( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\tif ( !restore ) {\n\n\t\t\t\t// we need to calculate our new positioning based on the scaling\n\t\t\t\tif ( position === \"static\" ) {\n\t\t\t\t\tel.css({\n\t\t\t\t\t\tposition: \"relative\",\n\t\t\t\t\t\ttop: el.to.top,\n\t\t\t\t\t\tleft: el.to.left\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\t$.each([ \"top\", \"left\" ], function( idx, pos ) {\n\t\t\t\t\t\tel.css( pos, function( _, str ) {\n\t\t\t\t\t\t\tvar val = parseInt( str, 10 ),\n\t\t\t\t\t\t\t\ttoRef = idx ? el.to.left : el.to.top;\n\n\t\t\t\t\t\t\t// if original was \"auto\", recalculate the new value from wrapper\n\t\t\t\t\t\t\tif ( str === \"auto\" ) {\n\t\t\t\t\t\t\t\treturn toRef + \"px\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn val + toRef + \"px\";\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.shake = function( o, done ) {\n\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"height\", \"width\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"effect\" ),\n\t\tdirection = o.direction || \"left\",\n\t\tdistance = o.distance || 20,\n\t\ttimes = o.times || 3,\n\t\tanims = times * 2 + 1,\n\t\tspeed = Math.round(o.duration/anims),\n\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\tanimation = {},\n\t\tanimation1 = {},\n\t\tanimation2 = {},\n\t\ti,\n\n\t\t// we will need to re-assemble the queue to stack our animations in place\n\t\tqueue = el.queue(),\n\t\tqueuelen = queue.length;\n\n\t$.effects.save( el, props );\n\tel.show();\n\t$.effects.createWrapper( el );\n\n\t// Animation\n\tanimation[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance;\n\tanimation1[ ref ] = ( positiveMotion ? \"+=\" : \"-=\" ) + distance * 2;\n\tanimation2[ ref ] = ( positiveMotion ? \"-=\" : \"+=\" ) + distance * 2;\n\n\t// Animate\n\tel.animate( animation, speed, o.easing );\n\n\t// Shakes\n\tfor ( i = 1; i < times; i++ ) {\n\t\tel.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );\n\t}\n\tel\n\t\t.animate( animation1, speed, o.easing )\n\t\t.animate( animation, speed / 2, o.easing )\n\t\t.queue(function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t});\n\n\t// inject all the animations we just queued to be first in line (after \"inprogress\")\n\tif ( queuelen > 1) {\n\t\tqueue.splice.apply( queue,\n\t\t\t[ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) );\n\t}\n\tel.dequeue();\n\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.slide = function( o, done ) {\n\n\t// Create element\n\tvar el = $( this ),\n\t\tprops = [ \"position\", \"top\", \"bottom\", \"left\", \"right\", \"width\", \"height\" ],\n\t\tmode = $.effects.setMode( el, o.mode || \"show\" ),\n\t\tshow = mode === \"show\",\n\t\tdirection = o.direction || \"left\",\n\t\tref = (direction === \"up\" || direction === \"down\") ? \"top\" : \"left\",\n\t\tpositiveMotion = (direction === \"up\" || direction === \"left\"),\n\t\tdistance,\n\t\tanimation = {};\n\n\t// Adjust\n\t$.effects.save( el, props );\n\tel.show();\n\tdistance = o.distance || el[ ref === \"top\" ? \"outerHeight\" : \"outerWidth\" ]( true );\n\n\t$.effects.createWrapper( el ).css({\n\t\toverflow: \"hidden\"\n\t});\n\n\tif ( show ) {\n\t\tel.css( ref, positiveMotion ? (isNaN(distance) ? \"-\" + distance : -distance) : distance );\n\t}\n\n\t// Animation\n\tanimation[ ref ] = ( show ?\n\t\t( positiveMotion ? \"+=\" : \"-=\") :\n\t\t( positiveMotion ? \"-=\" : \"+=\")) +\n\t\tdistance;\n\n\t// Animate\n\tel.animate( animation, {\n\t\tqueue: false,\n\t\tduration: o.duration,\n\t\teasing: o.easing,\n\t\tcomplete: function() {\n\t\t\tif ( mode === \"hide\" ) {\n\t\t\t\tel.hide();\n\t\t\t}\n\t\t\t$.effects.restore( el, props );\n\t\t\t$.effects.removeWrapper( el );\n\t\t\tdone();\n\t\t}\n\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.effects.effect.transfer = function( o, done ) {\n\tvar elem = $( this ),\n\t\ttarget = $( o.to ),\n\t\ttargetFixed = target.css( \"position\" ) === \"fixed\",\n\t\tbody = $(\"body\"),\n\t\tfixTop = targetFixed ? body.scrollTop() : 0,\n\t\tfixLeft = targetFixed ? body.scrollLeft() : 0,\n\t\tendPosition = target.offset(),\n\t\tanimation = {\n\t\t\ttop: endPosition.top - fixTop ,\n\t\t\tleft: endPosition.left - fixLeft ,\n\t\t\theight: target.innerHeight(),\n\t\t\twidth: target.innerWidth()\n\t\t},\n\t\tstartPosition = elem.offset(),\n\t\ttransfer = $( \"<div class='ui-effects-transfer'></div>\" )\n\t\t\t.appendTo( document.body )\n\t\t\t.addClass( o.className )\n\t\t\t.css({\n\t\t\t\ttop: startPosition.top - fixTop ,\n\t\t\t\tleft: startPosition.left - fixLeft ,\n\t\t\t\theight: elem.innerHeight(),\n\t\t\t\twidth: elem.innerWidth(),\n\t\t\t\tposition: targetFixed ? \"fixed\" : \"absolute\"\n\t\t\t})\n\t\t\t.animate( animation, o.duration, o.easing, function() {\n\t\t\t\ttransfer.remove();\n\t\t\t\tdone();\n\t\t\t});\n};\n\n})(jQuery);\n\n(function( $, undefined ) {\n\n$.widget( \"ui.menu\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<ul>\",\n\tdelay: 300,\n\toptions: {\n\t\ticons: {\n\t\t\tsubmenu: \"ui-icon-carat-1-e\"\n\t\t},\n\t\tmenus: \"ul\",\n\t\tposition: {\n\t\t\tmy: \"left top\",\n\t\t\tat: \"right top\"\n\t\t},\n\t\trole: \"menu\",\n\n\t\t// callbacks\n\t\tblur: null,\n\t\tfocus: null,\n\t\tselect: null\n\t},\n\n\t_create: function() {\n\t\tthis.activeMenu = this.element;\n\t\t// flag used to prevent firing of the click handler\n\t\t// as the event bubbles up through nested menus\n\t\tthis.mouseHandled = false;\n\t\tthis.element\n\t\t\t.uniqueId()\n\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.toggleClass( \"ui-menu-icons\", !!this.element.find( \".ui-icon\" ).length )\n\t\t\t.attr({\n\t\t\t\trole: this.options.role,\n\t\t\t\ttabIndex: 0\n\t\t\t})\n\t\t\t// need to catch all clicks on disabled menu\n\t\t\t// not possible through _on\n\t\t\t.bind( \"click\" + this.eventNamespace, $.proxy(function( event ) {\n\t\t\t\tif ( this.options.disabled ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}, this ));\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.element\n\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t}\n\n\t\tthis._on({\n\t\t\t// Prevent focus from sticking to links inside menu after clicking\n\t\t\t// them (focus should always stay on UL during navigation).\n\t\t\t\"mousedown .ui-menu-item > a\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-state-disabled > a\": function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t},\n\t\t\t\"click .ui-menu-item:has(a)\": function( event ) {\n\t\t\t\tvar target = $( event.target ).closest( \".ui-menu-item\" );\n\t\t\t\tif ( !this.mouseHandled && target.not( \".ui-state-disabled\" ).length ) {\n\t\t\t\t\tthis.mouseHandled = true;\n\n\t\t\t\t\tthis.select( event );\n\t\t\t\t\t// Open submenu on click\n\t\t\t\t\tif ( target.has( \".ui-menu\" ).length ) {\n\t\t\t\t\t\tthis.expand( event );\n\t\t\t\t\t} else if ( !this.element.is( \":focus\" ) ) {\n\t\t\t\t\t\t// Redirect focus to the menu\n\t\t\t\t\t\tthis.element.trigger( \"focus\", [ true ] );\n\n\t\t\t\t\t\t// If the active item is on the top level, let it stay active.\n\t\t\t\t\t\t// Otherwise, blur the active item since it is no longer visible.\n\t\t\t\t\t\tif ( this.active && this.active.parents( \".ui-menu\" ).length === 1 ) {\n\t\t\t\t\t\t\tclearTimeout( this.timer );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"mouseenter .ui-menu-item\": function( event ) {\n\t\t\t\tvar target = $( event.currentTarget );\n\t\t\t\t// Remove ui-state-active class from siblings of the newly focused menu item\n\t\t\t\t// to avoid a jump caused by adjacent elements both having a class with a border\n\t\t\t\ttarget.siblings().children( \".ui-state-active\" ).removeClass( \"ui-state-active\" );\n\t\t\t\tthis.focus( event, target );\n\t\t\t},\n\t\t\tmouseleave: \"collapseAll\",\n\t\t\t\"mouseleave .ui-menu\": \"collapseAll\",\n\t\t\tfocus: function( event, keepActiveItem ) {\n\t\t\t\t// If there's already an active item, keep it active\n\t\t\t\t// If not, activate the first item\n\t\t\t\tvar item = this.active || this.element.children( \".ui-menu-item\" ).eq( 0 );\n\n\t\t\t\tif ( !keepActiveItem ) {\n\t\t\t\t\tthis.focus( event, item );\n\t\t\t\t}\n\t\t\t},\n\t\t\tblur: function( event ) {\n\t\t\t\tthis._delay(function() {\n\t\t\t\t\tif ( !$.contains( this.element[0], this.document[0].activeElement ) ) {\n\t\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t},\n\t\t\tkeydown: \"_keydown\"\n\t\t});\n\n\t\tthis.refresh();\n\n\t\t// Clicks outside of a menu collapse any open menus\n\t\tthis._on( this.document, {\n\t\t\tclick: function( event ) {\n\t\t\t\tif ( !$( event.target ).closest( \".ui-menu\" ).length ) {\n\t\t\t\t\tthis.collapseAll( event );\n\t\t\t\t}\n\n\t\t\t\t// Reset the mouseHandled flag\n\t\t\t\tthis.mouseHandled = false;\n\t\t\t}\n\t\t});\n\t},\n\n\t_destroy: function() {\n\t\t// Destroy (sub)menus\n\t\tthis.element\n\t\t\t.removeAttr( \"aria-activedescendant\" )\n\t\t\t.find( \".ui-menu\" ).addBack()\n\t\t\t\t.removeClass( \"ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.show();\n\n\t\t// Destroy menu items\n\t\tthis.element.find( \".ui-menu-item\" )\n\t\t\t.removeClass( \"ui-menu-item\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-disabled\" )\n\t\t\t.children( \"a\" )\n\t\t\t\t.removeUniqueId()\n\t\t\t\t.removeClass( \"ui-corner-all ui-state-hover\" )\n\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t.removeAttr( \"role\" )\n\t\t\t\t.removeAttr( \"aria-haspopup\" )\n\t\t\t\t.children().each( function() {\n\t\t\t\t\tvar elem = $( this );\n\t\t\t\t\tif ( elem.data( \"ui-menu-submenu-carat\" ) ) {\n\t\t\t\t\t\telem.remove();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t// Destroy menu dividers\n\t\tthis.element.find( \".ui-menu-divider\" ).removeClass( \"ui-menu-divider ui-widget-content\" );\n\t},\n\n\t_keydown: function( event ) {\n\t\t/*jshint maxcomplexity:20*/\n\t\tvar match, prev, character, skip, regex,\n\t\t\tpreventDefault = true;\n\n\t\tfunction escape( value ) {\n\t\t\treturn value.replace( /[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\" );\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\tthis.previousPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\tthis.nextPage( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.HOME:\n\t\t\tthis._move( \"first\", \"first\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.END:\n\t\t\tthis._move( \"last\", \"last\", event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.UP:\n\t\t\tthis.previous( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.DOWN:\n\t\t\tthis.next( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.LEFT:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tif ( this.active && !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\t\tthis.expand( event );\n\t\t\t}\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ENTER:\n\t\tcase $.ui.keyCode.SPACE:\n\t\t\tthis._activate( event );\n\t\t\tbreak;\n\t\tcase $.ui.keyCode.ESCAPE:\n\t\t\tthis.collapse( event );\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tpreventDefault = false;\n\t\t\tprev = this.previousFilter || \"\";\n\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\tskip = false;\n\n\t\t\tclearTimeout( this.filterTimer );\n\n\t\t\tif ( character === prev ) {\n\t\t\t\tskip = true;\n\t\t\t} else {\n\t\t\t\tcharacter = prev + character;\n\t\t\t}\n\n\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t});\n\t\t\tmatch = skip && match.index( this.active.next() ) !== -1 ?\n\t\t\t\tthis.active.nextAll( \".ui-menu-item\" ) :\n\t\t\t\tmatch;\n\n\t\t\t// If no matches on the current filter, reset to the last character pressed\n\t\t\t// to move down the menu to the first item that starts with that character\n\t\t\tif ( !match.length ) {\n\t\t\t\tcharacter = String.fromCharCode( event.keyCode );\n\t\t\t\tregex = new RegExp( \"^\" + escape( character ), \"i\" );\n\t\t\t\tmatch = this.activeMenu.children( \".ui-menu-item\" ).filter(function() {\n\t\t\t\t\treturn regex.test( $( this ).children( \"a\" ).text() );\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( match.length ) {\n\t\t\t\tthis.focus( event, match );\n\t\t\t\tif ( match.length > 1 ) {\n\t\t\t\t\tthis.previousFilter = character;\n\t\t\t\t\tthis.filterTimer = this._delay(function() {\n\t\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t\t}, 1000 );\n\t\t\t\t} else {\n\t\t\t\t\tdelete this.previousFilter;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete this.previousFilter;\n\t\t\t}\n\t\t}\n\n\t\tif ( preventDefault ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t},\n\n\t_activate: function( event ) {\n\t\tif ( !this.active.is( \".ui-state-disabled\" ) ) {\n\t\t\tif ( this.active.children( \"a[aria-haspopup='true']\" ).length ) {\n\t\t\t\tthis.expand( event );\n\t\t\t} else {\n\t\t\t\tthis.select( event );\n\t\t\t}\n\t\t}\n\t},\n\n\trefresh: function() {\n\t\tvar menus,\n\t\t\ticon = this.options.icons.submenu,\n\t\t\tsubmenus = this.element.find( this.options.menus );\n\n\t\t// Initialize nested menus\n\t\tsubmenus.filter( \":not(.ui-menu)\" )\n\t\t\t.addClass( \"ui-menu ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\trole: this.options.role,\n\t\t\t\t\"aria-hidden\": \"true\",\n\t\t\t\t\"aria-expanded\": \"false\"\n\t\t\t})\n\t\t\t.each(function() {\n\t\t\t\tvar menu = $( this ),\n\t\t\t\t\titem = menu.prev( \"a\" ),\n\t\t\t\t\tsubmenuCarat = $( \"<span>\" )\n\t\t\t\t\t\t.addClass( \"ui-menu-icon ui-icon \" + icon )\n\t\t\t\t\t\t.data( \"ui-menu-submenu-carat\", true );\n\n\t\t\t\titem\n\t\t\t\t\t.attr( \"aria-haspopup\", \"true\" )\n\t\t\t\t\t.prepend( submenuCarat );\n\t\t\t\tmenu.attr( \"aria-labelledby\", item.attr( \"id\" ) );\n\t\t\t});\n\n\t\tmenus = submenus.add( this.element );\n\n\t\t// Don't refresh list items that are already adapted\n\t\tmenus.children( \":not(.ui-menu-item):has(a)\" )\n\t\t\t.addClass( \"ui-menu-item\" )\n\t\t\t.attr( \"role\", \"presentation\" )\n\t\t\t.children( \"a\" )\n\t\t\t\t.uniqueId()\n\t\t\t\t.addClass( \"ui-corner-all\" )\n\t\t\t\t.attr({\n\t\t\t\t\ttabIndex: -1,\n\t\t\t\t\trole: this._itemRole()\n\t\t\t\t});\n\n\t\t// Initialize unlinked menu-items containing spaces and/or dashes only as dividers\n\t\tmenus.children( \":not(.ui-menu-item)\" ).each(function() {\n\t\t\tvar item = $( this );\n\t\t\t// hyphen, em dash, en dash\n\t\t\tif ( !/[^\\-\\u2014\\u2013\\s]/.test( item.text() ) ) {\n\t\t\t\titem.addClass( \"ui-widget-content ui-menu-divider\" );\n\t\t\t}\n\t\t});\n\n\t\t// Add aria-disabled attribute to any disabled menu item\n\t\tmenus.children( \".ui-state-disabled\" ).attr( \"aria-disabled\", \"true\" );\n\n\t\t// If the active item has been removed, blur the menu\n\t\tif ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {\n\t\t\tthis.blur();\n\t\t}\n\t},\n\n\t_itemRole: function() {\n\t\treturn {\n\t\t\tmenu: \"menuitem\",\n\t\t\tlistbox: \"option\"\n\t\t}[ this.options.role ];\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis.element.find( \".ui-menu-icon\" )\n\t\t\t\t.removeClass( this.options.icons.submenu )\n\t\t\t\t.addClass( value.submenu );\n\t\t}\n\t\tthis._super( key, value );\n\t},\n\n\tfocus: function( event, item ) {\n\t\tvar nested, focused;\n\t\tthis.blur( event, event && event.type === \"focus\" );\n\n\t\tthis._scrollIntoView( item );\n\n\t\tthis.active = item.first();\n\t\tfocused = this.active.children( \"a\" ).addClass( \"ui-state-focus\" );\n\t\t// Only update aria-activedescendant if there's a role\n\t\t// otherwise we assume focus is managed elsewhere\n\t\tif ( this.options.role ) {\n\t\t\tthis.element.attr( \"aria-activedescendant\", focused.attr( \"id\" ) );\n\t\t}\n\n\t\t// Highlight active parent menu item, if any\n\t\tthis.active\n\t\t\t.parent()\n\t\t\t.closest( \".ui-menu-item\" )\n\t\t\t.children( \"a:first\" )\n\t\t\t.addClass( \"ui-state-active\" );\n\n\t\tif ( event && event.type === \"keydown\" ) {\n\t\t\tthis._close();\n\t\t} else {\n\t\t\tthis.timer = this._delay(function() {\n\t\t\t\tthis._close();\n\t\t\t}, this.delay );\n\t\t}\n\n\t\tnested = item.children( \".ui-menu\" );\n\t\tif ( nested.length && ( /^mouse/.test( event.type ) ) ) {\n\t\t\tthis._startOpening(nested);\n\t\t}\n\t\tthis.activeMenu = item.parent();\n\n\t\tthis._trigger( \"focus\", event, { item: item } );\n\t},\n\n\t_scrollIntoView: function( item ) {\n\t\tvar borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;\n\t\tif ( this._hasScroll() ) {\n\t\t\tborderTop = parseFloat( $.css( this.activeMenu[0], \"borderTopWidth\" ) ) || 0;\n\t\t\tpaddingTop = parseFloat( $.css( this.activeMenu[0], \"paddingTop\" ) ) || 0;\n\t\t\toffset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;\n\t\t\tscroll = this.activeMenu.scrollTop();\n\t\t\telementHeight = this.activeMenu.height();\n\t\t\titemHeight = item.height();\n\n\t\t\tif ( offset < 0 ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset );\n\t\t\t} else if ( offset + itemHeight > elementHeight ) {\n\t\t\t\tthis.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );\n\t\t\t}\n\t\t}\n\t},\n\n\tblur: function( event, fromFocus ) {\n\t\tif ( !fromFocus ) {\n\t\t\tclearTimeout( this.timer );\n\t\t}\n\n\t\tif ( !this.active ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.active.children( \"a\" ).removeClass( \"ui-state-focus\" );\n\t\tthis.active = null;\n\n\t\tthis._trigger( \"blur\", event, { item: this.active } );\n\t},\n\n\t_startOpening: function( submenu ) {\n\t\tclearTimeout( this.timer );\n\n\t\t// Don't open if already open fixes a Firefox bug that caused a .5 pixel\n\t\t// shift in the submenu position when mousing over the carat icon\n\t\tif ( submenu.attr( \"aria-hidden\" ) !== \"true\" ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.timer = this._delay(function() {\n\t\t\tthis._close();\n\t\t\tthis._open( submenu );\n\t\t}, this.delay );\n\t},\n\n\t_open: function( submenu ) {\n\t\tvar position = $.extend({\n\t\t\tof: this.active\n\t\t}, this.options.position );\n\n\t\tclearTimeout( this.timer );\n\t\tthis.element.find( \".ui-menu\" ).not( submenu.parents( \".ui-menu\" ) )\n\t\t\t.hide()\n\t\t\t.attr( \"aria-hidden\", \"true\" );\n\n\t\tsubmenu\n\t\t\t.show()\n\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t.attr( \"aria-expanded\", \"true\" )\n\t\t\t.position( position );\n\t},\n\n\tcollapseAll: function( event, all ) {\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay(function() {\n\t\t\t// If we were passed an event, look for the submenu that contains the event\n\t\t\tvar currentMenu = all ? this.element :\n\t\t\t\t$( event && event.target ).closest( this.element.find( \".ui-menu\" ) );\n\n\t\t\t// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway\n\t\t\tif ( !currentMenu.length ) {\n\t\t\t\tcurrentMenu = this.element;\n\t\t\t}\n\n\t\t\tthis._close( currentMenu );\n\n\t\t\tthis.blur( event );\n\t\t\tthis.activeMenu = currentMenu;\n\t\t}, this.delay );\n\t},\n\n\t// With no arguments, closes the currently active menu - if nothing is active\n\t// it closes all menus.  If passed an argument, it will search for menus BELOW\n\t_close: function( startMenu ) {\n\t\tif ( !startMenu ) {\n\t\t\tstartMenu = this.active ? this.active.parent() : this.element;\n\t\t}\n\n\t\tstartMenu\n\t\t\t.find( \".ui-menu\" )\n\t\t\t\t.hide()\n\t\t\t\t.attr( \"aria-hidden\", \"true\" )\n\t\t\t\t.attr( \"aria-expanded\", \"false\" )\n\t\t\t.end()\n\t\t\t.find( \"a.ui-state-active\" )\n\t\t\t\t.removeClass( \"ui-state-active\" );\n\t},\n\n\tcollapse: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active.parent().closest( \".ui-menu-item\", this.element );\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._close();\n\t\t\tthis.focus( event, newItem );\n\t\t}\n\t},\n\n\texpand: function( event ) {\n\t\tvar newItem = this.active &&\n\t\t\tthis.active\n\t\t\t\t.children( \".ui-menu \" )\n\t\t\t\t.children( \".ui-menu-item\" )\n\t\t\t\t.first();\n\n\t\tif ( newItem && newItem.length ) {\n\t\t\tthis._open( newItem.parent() );\n\n\t\t\t// Delay so Firefox will not hide activedescendant change in expanding submenu from AT\n\t\t\tthis._delay(function() {\n\t\t\t\tthis.focus( event, newItem );\n\t\t\t});\n\t\t}\n\t},\n\n\tnext: function( event ) {\n\t\tthis._move( \"next\", \"first\", event );\n\t},\n\n\tprevious: function( event ) {\n\t\tthis._move( \"prev\", \"last\", event );\n\t},\n\n\tisFirstItem: function() {\n\t\treturn this.active && !this.active.prevAll( \".ui-menu-item\" ).length;\n\t},\n\n\tisLastItem: function() {\n\t\treturn this.active && !this.active.nextAll( \".ui-menu-item\" ).length;\n\t},\n\n\t_move: function( direction, filter, event ) {\n\t\tvar next;\n\t\tif ( this.active ) {\n\t\t\tif ( direction === \"first\" || direction === \"last\" ) {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction === \"first\" ? \"prevAll\" : \"nextAll\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( -1 );\n\t\t\t} else {\n\t\t\t\tnext = this.active\n\t\t\t\t\t[ direction + \"All\" ]( \".ui-menu-item\" )\n\t\t\t\t\t.eq( 0 );\n\t\t\t}\n\t\t}\n\t\tif ( !next || !next.length || !this.active ) {\n\t\t\tnext = this.activeMenu.children( \".ui-menu-item\" )[ filter ]();\n\t\t}\n\n\t\tthis.focus( event, next );\n\t},\n\n\tnextPage: function( event ) {\n\t\tvar item, base, height;\n\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isLastItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.nextAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base - height < 0;\n\t\t\t});\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" )\n\t\t\t\t[ !this.active ? \"first\" : \"last\" ]() );\n\t\t}\n\t},\n\n\tpreviousPage: function( event ) {\n\t\tvar item, base, height;\n\t\tif ( !this.active ) {\n\t\t\tthis.next( event );\n\t\t\treturn;\n\t\t}\n\t\tif ( this.isFirstItem() ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( this._hasScroll() ) {\n\t\t\tbase = this.active.offset().top;\n\t\t\theight = this.element.height();\n\t\t\tthis.active.prevAll( \".ui-menu-item\" ).each(function() {\n\t\t\t\titem = $( this );\n\t\t\t\treturn item.offset().top - base + height > 0;\n\t\t\t});\n\n\t\t\tthis.focus( event, item );\n\t\t} else {\n\t\t\tthis.focus( event, this.activeMenu.children( \".ui-menu-item\" ).first() );\n\t\t}\n\t},\n\n\t_hasScroll: function() {\n\t\treturn this.element.outerHeight() < this.element.prop( \"scrollHeight\" );\n\t},\n\n\tselect: function( event ) {\n\t\t// TODO: It should never be possible to not have an active item at this\n\t\t// point, but the tests don't trigger mouseenter before click.\n\t\tthis.active = this.active || $( event.target ).closest( \".ui-menu-item\" );\n\t\tvar ui = { item: this.active };\n\t\tif ( !this.active.has( \".ui-menu\" ).length ) {\n\t\t\tthis.collapseAll( event, true );\n\t\t}\n\t\tthis._trigger( \"select\", event, ui );\n\t}\n});\n\n}( jQuery ));\n\n(function( $, undefined ) {\n\n$.ui = $.ui || {};\n\nvar cachedScrollbarWidth,\n\tmax = Math.max,\n\tabs = Math.abs,\n\tround = Math.round,\n\trhorizontal = /left|center|right/,\n\trvertical = /top|center|bottom/,\n\troffset = /[\\+\\-]\\d+(\\.[\\d]+)?%?/,\n\trposition = /^\\w+/,\n\trpercent = /%$/,\n\t_position = $.fn.position;\n\nfunction getOffsets( offsets, width, height ) {\n\treturn [\n\t\tparseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),\n\t\tparseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )\n\t];\n}\n\nfunction parseCss( element, property ) {\n\treturn parseInt( $.css( element, property ), 10 ) || 0;\n}\n\nfunction getDimensions( elem ) {\n\tvar raw = elem[0];\n\tif ( raw.nodeType === 9 ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: 0, left: 0 }\n\t\t};\n\t}\n\tif ( $.isWindow( raw ) ) {\n\t\treturn {\n\t\t\twidth: elem.width(),\n\t\t\theight: elem.height(),\n\t\t\toffset: { top: elem.scrollTop(), left: elem.scrollLeft() }\n\t\t};\n\t}\n\tif ( raw.preventDefault ) {\n\t\treturn {\n\t\t\twidth: 0,\n\t\t\theight: 0,\n\t\t\toffset: { top: raw.pageY, left: raw.pageX }\n\t\t};\n\t}\n\treturn {\n\t\twidth: elem.outerWidth(),\n\t\theight: elem.outerHeight(),\n\t\toffset: elem.offset()\n\t};\n}\n\n$.position = {\n\tscrollbarWidth: function() {\n\t\tif ( cachedScrollbarWidth !== undefined ) {\n\t\t\treturn cachedScrollbarWidth;\n\t\t}\n\t\tvar w1, w2,\n\t\t\tdiv = $( \"<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>\" ),\n\t\t\tinnerDiv = div.children()[0];\n\n\t\t$( \"body\" ).append( div );\n\t\tw1 = innerDiv.offsetWidth;\n\t\tdiv.css( \"overflow\", \"scroll\" );\n\n\t\tw2 = innerDiv.offsetWidth;\n\n\t\tif ( w1 === w2 ) {\n\t\t\tw2 = div[0].clientWidth;\n\t\t}\n\n\t\tdiv.remove();\n\n\t\treturn (cachedScrollbarWidth = w1 - w2);\n\t},\n\tgetScrollInfo: function( within ) {\n\t\tvar overflowX = within.isWindow ? \"\" : within.element.css( \"overflow-x\" ),\n\t\t\toverflowY = within.isWindow ? \"\" : within.element.css( \"overflow-y\" ),\n\t\t\thasOverflowX = overflowX === \"scroll\" ||\n\t\t\t\t( overflowX === \"auto\" && within.width < within.element[0].scrollWidth ),\n\t\t\thasOverflowY = overflowY === \"scroll\" ||\n\t\t\t\t( overflowY === \"auto\" && within.height < within.element[0].scrollHeight );\n\t\treturn {\n\t\t\twidth: hasOverflowY ? $.position.scrollbarWidth() : 0,\n\t\t\theight: hasOverflowX ? $.position.scrollbarWidth() : 0\n\t\t};\n\t},\n\tgetWithinInfo: function( element ) {\n\t\tvar withinElement = $( element || window ),\n\t\t\tisWindow = $.isWindow( withinElement[0] );\n\t\treturn {\n\t\t\telement: withinElement,\n\t\t\tisWindow: isWindow,\n\t\t\toffset: withinElement.offset() || { left: 0, top: 0 },\n\t\t\tscrollLeft: withinElement.scrollLeft(),\n\t\t\tscrollTop: withinElement.scrollTop(),\n\t\t\twidth: isWindow ? withinElement.width() : withinElement.outerWidth(),\n\t\t\theight: isWindow ? withinElement.height() : withinElement.outerHeight()\n\t\t};\n\t}\n};\n\n$.fn.position = function( options ) {\n\tif ( !options || !options.of ) {\n\t\treturn _position.apply( this, arguments );\n\t}\n\n\t// make a copy, we don't want to modify arguments\n\toptions = $.extend( {}, options );\n\n\tvar atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,\n\t\ttarget = $( options.of ),\n\t\twithin = $.position.getWithinInfo( options.within ),\n\t\tscrollInfo = $.position.getScrollInfo( within ),\n\t\tcollision = ( options.collision || \"flip\" ).split( \" \" ),\n\t\toffsets = {};\n\n\tdimensions = getDimensions( target );\n\tif ( target[0].preventDefault ) {\n\t\t// force left top to allow flipping\n\t\toptions.at = \"left top\";\n\t}\n\ttargetWidth = dimensions.width;\n\ttargetHeight = dimensions.height;\n\ttargetOffset = dimensions.offset;\n\t// clone to reuse original targetOffset later\n\tbasePosition = $.extend( {}, targetOffset );\n\n\t// force my and at to have valid horizontal and vertical positions\n\t// if a value is missing or invalid, it will be converted to center\n\t$.each( [ \"my\", \"at\" ], function() {\n\t\tvar pos = ( options[ this ] || \"\" ).split( \" \" ),\n\t\t\thorizontalOffset,\n\t\t\tverticalOffset;\n\n\t\tif ( pos.length === 1) {\n\t\t\tpos = rhorizontal.test( pos[ 0 ] ) ?\n\t\t\t\tpos.concat( [ \"center\" ] ) :\n\t\t\t\trvertical.test( pos[ 0 ] ) ?\n\t\t\t\t\t[ \"center\" ].concat( pos ) :\n\t\t\t\t\t[ \"center\", \"center\" ];\n\t\t}\n\t\tpos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : \"center\";\n\t\tpos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : \"center\";\n\n\t\t// calculate offsets\n\t\thorizontalOffset = roffset.exec( pos[ 0 ] );\n\t\tverticalOffset = roffset.exec( pos[ 1 ] );\n\t\toffsets[ this ] = [\n\t\t\thorizontalOffset ? horizontalOffset[ 0 ] : 0,\n\t\t\tverticalOffset ? verticalOffset[ 0 ] : 0\n\t\t];\n\n\t\t// reduce to just the positions without the offsets\n\t\toptions[ this ] = [\n\t\t\trposition.exec( pos[ 0 ] )[ 0 ],\n\t\t\trposition.exec( pos[ 1 ] )[ 0 ]\n\t\t];\n\t});\n\n\t// normalize collision option\n\tif ( collision.length === 1 ) {\n\t\tcollision[ 1 ] = collision[ 0 ];\n\t}\n\n\tif ( options.at[ 0 ] === \"right\" ) {\n\t\tbasePosition.left += targetWidth;\n\t} else if ( options.at[ 0 ] === \"center\" ) {\n\t\tbasePosition.left += targetWidth / 2;\n\t}\n\n\tif ( options.at[ 1 ] === \"bottom\" ) {\n\t\tbasePosition.top += targetHeight;\n\t} else if ( options.at[ 1 ] === \"center\" ) {\n\t\tbasePosition.top += targetHeight / 2;\n\t}\n\n\tatOffset = getOffsets( offsets.at, targetWidth, targetHeight );\n\tbasePosition.left += atOffset[ 0 ];\n\tbasePosition.top += atOffset[ 1 ];\n\n\treturn this.each(function() {\n\t\tvar collisionPosition, using,\n\t\t\telem = $( this ),\n\t\t\telemWidth = elem.outerWidth(),\n\t\t\telemHeight = elem.outerHeight(),\n\t\t\tmarginLeft = parseCss( this, \"marginLeft\" ),\n\t\t\tmarginTop = parseCss( this, \"marginTop\" ),\n\t\t\tcollisionWidth = elemWidth + marginLeft + parseCss( this, \"marginRight\" ) + scrollInfo.width,\n\t\t\tcollisionHeight = elemHeight + marginTop + parseCss( this, \"marginBottom\" ) + scrollInfo.height,\n\t\t\tposition = $.extend( {}, basePosition ),\n\t\t\tmyOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );\n\n\t\tif ( options.my[ 0 ] === \"right\" ) {\n\t\t\tposition.left -= elemWidth;\n\t\t} else if ( options.my[ 0 ] === \"center\" ) {\n\t\t\tposition.left -= elemWidth / 2;\n\t\t}\n\n\t\tif ( options.my[ 1 ] === \"bottom\" ) {\n\t\t\tposition.top -= elemHeight;\n\t\t} else if ( options.my[ 1 ] === \"center\" ) {\n\t\t\tposition.top -= elemHeight / 2;\n\t\t}\n\n\t\tposition.left += myOffset[ 0 ];\n\t\tposition.top += myOffset[ 1 ];\n\n\t\t// if the browser doesn't support fractions, then round for consistent results\n\t\tif ( !$.support.offsetFractions ) {\n\t\t\tposition.left = round( position.left );\n\t\t\tposition.top = round( position.top );\n\t\t}\n\n\t\tcollisionPosition = {\n\t\t\tmarginLeft: marginLeft,\n\t\t\tmarginTop: marginTop\n\t\t};\n\n\t\t$.each( [ \"left\", \"top\" ], function( i, dir ) {\n\t\t\tif ( $.ui.position[ collision[ i ] ] ) {\n\t\t\t\t$.ui.position[ collision[ i ] ][ dir ]( position, {\n\t\t\t\t\ttargetWidth: targetWidth,\n\t\t\t\t\ttargetHeight: targetHeight,\n\t\t\t\t\telemWidth: elemWidth,\n\t\t\t\t\telemHeight: elemHeight,\n\t\t\t\t\tcollisionPosition: collisionPosition,\n\t\t\t\t\tcollisionWidth: collisionWidth,\n\t\t\t\t\tcollisionHeight: collisionHeight,\n\t\t\t\t\toffset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],\n\t\t\t\t\tmy: options.my,\n\t\t\t\t\tat: options.at,\n\t\t\t\t\twithin: within,\n\t\t\t\t\telem : elem\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tif ( options.using ) {\n\t\t\t// adds feedback as second argument to using callback, if present\n\t\t\tusing = function( props ) {\n\t\t\t\tvar left = targetOffset.left - position.left,\n\t\t\t\t\tright = left + targetWidth - elemWidth,\n\t\t\t\t\ttop = targetOffset.top - position.top,\n\t\t\t\t\tbottom = top + targetHeight - elemHeight,\n\t\t\t\t\tfeedback = {\n\t\t\t\t\t\ttarget: {\n\t\t\t\t\t\t\telement: target,\n\t\t\t\t\t\t\tleft: targetOffset.left,\n\t\t\t\t\t\t\ttop: targetOffset.top,\n\t\t\t\t\t\t\twidth: targetWidth,\n\t\t\t\t\t\t\theight: targetHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\telement: {\n\t\t\t\t\t\t\telement: elem,\n\t\t\t\t\t\t\tleft: position.left,\n\t\t\t\t\t\t\ttop: position.top,\n\t\t\t\t\t\t\twidth: elemWidth,\n\t\t\t\t\t\t\theight: elemHeight\n\t\t\t\t\t\t},\n\t\t\t\t\t\thorizontal: right < 0 ? \"left\" : left > 0 ? \"right\" : \"center\",\n\t\t\t\t\t\tvertical: bottom < 0 ? \"top\" : top > 0 ? \"bottom\" : \"middle\"\n\t\t\t\t\t};\n\t\t\t\tif ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {\n\t\t\t\t\tfeedback.horizontal = \"center\";\n\t\t\t\t}\n\t\t\t\tif ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {\n\t\t\t\t\tfeedback.vertical = \"middle\";\n\t\t\t\t}\n\t\t\t\tif ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {\n\t\t\t\t\tfeedback.important = \"horizontal\";\n\t\t\t\t} else {\n\t\t\t\t\tfeedback.important = \"vertical\";\n\t\t\t\t}\n\t\t\t\toptions.using.call( this, props, feedback );\n\t\t\t};\n\t\t}\n\n\t\telem.offset( $.extend( position, { using: using } ) );\n\t});\n};\n\n$.ui.position = {\n\tfit: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\touterWidth = within.width,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = withinOffset - collisionPosLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,\n\t\t\t\tnewOverRight;\n\n\t\t\t// element is wider than within\n\t\t\tif ( data.collisionWidth > outerWidth ) {\n\t\t\t\t// element is initially over the left side of within\n\t\t\t\tif ( overLeft > 0 && overRight <= 0 ) {\n\t\t\t\t\tnewOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\t\tposition.left += overLeft - newOverRight;\n\t\t\t\t// element is initially over right side of within\n\t\t\t\t} else if ( overRight > 0 && overLeft <= 0 ) {\n\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t// element is initially over both left and right sides of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overLeft > overRight ) {\n\t\t\t\t\t\tposition.left = withinOffset + outerWidth - data.collisionWidth;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.left = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// too far left -> align with left edge\n\t\t\t} else if ( overLeft > 0 ) {\n\t\t\t\tposition.left += overLeft;\n\t\t\t// too far right -> align with right edge\n\t\t\t} else if ( overRight > 0 ) {\n\t\t\t\tposition.left -= overRight;\n\t\t\t// adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.left = max( position.left - collisionPosLeft, position.left );\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\touterHeight = data.within.height,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = withinOffset - collisionPosTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,\n\t\t\t\tnewOverBottom;\n\n\t\t\t// element is taller than within\n\t\t\tif ( data.collisionHeight > outerHeight ) {\n\t\t\t\t// element is initially over the top of within\n\t\t\t\tif ( overTop > 0 && overBottom <= 0 ) {\n\t\t\t\t\tnewOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\t\tposition.top += overTop - newOverBottom;\n\t\t\t\t// element is initially over bottom of within\n\t\t\t\t} else if ( overBottom > 0 && overTop <= 0 ) {\n\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t// element is initially over both top and bottom of within\n\t\t\t\t} else {\n\t\t\t\t\tif ( overTop > overBottom ) {\n\t\t\t\t\t\tposition.top = withinOffset + outerHeight - data.collisionHeight;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tposition.top = withinOffset;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// too far up -> align with top\n\t\t\t} else if ( overTop > 0 ) {\n\t\t\t\tposition.top += overTop;\n\t\t\t// too far down -> align with bottom edge\n\t\t\t} else if ( overBottom > 0 ) {\n\t\t\t\tposition.top -= overBottom;\n\t\t\t// adjust based on position and margin\n\t\t\t} else {\n\t\t\t\tposition.top = max( position.top - collisionPosTop, position.top );\n\t\t\t}\n\t\t}\n\t},\n\tflip: {\n\t\tleft: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.left + within.scrollLeft,\n\t\t\t\touterWidth = within.width,\n\t\t\t\toffsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,\n\t\t\t\tcollisionPosLeft = position.left - data.collisionPosition.marginLeft,\n\t\t\t\toverLeft = collisionPosLeft - offsetLeft,\n\t\t\t\toverRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,\n\t\t\t\tmyOffset = data.my[ 0 ] === \"left\" ?\n\t\t\t\t\t-data.elemWidth :\n\t\t\t\t\tdata.my[ 0 ] === \"right\" ?\n\t\t\t\t\t\tdata.elemWidth :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 0 ] === \"left\" ?\n\t\t\t\t\tdata.targetWidth :\n\t\t\t\t\tdata.at[ 0 ] === \"right\" ?\n\t\t\t\t\t\t-data.targetWidth :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 0 ],\n\t\t\t\tnewOverRight,\n\t\t\t\tnewOverLeft;\n\n\t\t\tif ( overLeft < 0 ) {\n\t\t\t\tnewOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;\n\t\t\t\tif ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( overRight > 0 ) {\n\t\t\t\tnewOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;\n\t\t\t\tif ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {\n\t\t\t\t\tposition.left += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\ttop: function( position, data ) {\n\t\t\tvar within = data.within,\n\t\t\t\twithinOffset = within.offset.top + within.scrollTop,\n\t\t\t\touterHeight = within.height,\n\t\t\t\toffsetTop = within.isWindow ? within.scrollTop : within.offset.top,\n\t\t\t\tcollisionPosTop = position.top - data.collisionPosition.marginTop,\n\t\t\t\toverTop = collisionPosTop - offsetTop,\n\t\t\t\toverBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,\n\t\t\t\ttop = data.my[ 1 ] === \"top\",\n\t\t\t\tmyOffset = top ?\n\t\t\t\t\t-data.elemHeight :\n\t\t\t\t\tdata.my[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\tdata.elemHeight :\n\t\t\t\t\t\t0,\n\t\t\t\tatOffset = data.at[ 1 ] === \"top\" ?\n\t\t\t\t\tdata.targetHeight :\n\t\t\t\t\tdata.at[ 1 ] === \"bottom\" ?\n\t\t\t\t\t\t-data.targetHeight :\n\t\t\t\t\t\t0,\n\t\t\t\toffset = -2 * data.offset[ 1 ],\n\t\t\t\tnewOverTop,\n\t\t\t\tnewOverBottom;\n\t\t\tif ( overTop < 0 ) {\n\t\t\t\tnewOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;\n\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overTop && ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( overBottom > 0 ) {\n\t\t\t\tnewOverTop = position.top -  data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;\n\t\t\t\tif ( ( position.top + myOffset + atOffset + offset) > overBottom && ( newOverTop > 0 || abs( newOverTop ) < overBottom ) ) {\n\t\t\t\t\tposition.top += myOffset + atOffset + offset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\tflipfit: {\n\t\tleft: function() {\n\t\t\t$.ui.position.flip.left.apply( this, arguments );\n\t\t\t$.ui.position.fit.left.apply( this, arguments );\n\t\t},\n\t\ttop: function() {\n\t\t\t$.ui.position.flip.top.apply( this, arguments );\n\t\t\t$.ui.position.fit.top.apply( this, arguments );\n\t\t}\n\t}\n};\n\n// fraction support test\n(function () {\n\tvar testElement, testElementParent, testElementStyle, offsetLeft, i,\n\t\tbody = document.getElementsByTagName( \"body\" )[ 0 ],\n\t\tdiv = document.createElement( \"div\" );\n\n\t//Create a \"fake body\" for testing based on method used in jQuery.support\n\ttestElement = document.createElement( body ? \"div\" : \"body\" );\n\ttestElementStyle = {\n\t\tvisibility: \"hidden\",\n\t\twidth: 0,\n\t\theight: 0,\n\t\tborder: 0,\n\t\tmargin: 0,\n\t\tbackground: \"none\"\n\t};\n\tif ( body ) {\n\t\t$.extend( testElementStyle, {\n\t\t\tposition: \"absolute\",\n\t\t\tleft: \"-1000px\",\n\t\t\ttop: \"-1000px\"\n\t\t});\n\t}\n\tfor ( i in testElementStyle ) {\n\t\ttestElement.style[ i ] = testElementStyle[ i ];\n\t}\n\ttestElement.appendChild( div );\n\ttestElementParent = body || document.documentElement;\n\ttestElementParent.insertBefore( testElement, testElementParent.firstChild );\n\n\tdiv.style.cssText = \"position: absolute; left: 10.7432222px;\";\n\n\toffsetLeft = $( div ).offset().left;\n\t$.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;\n\n\ttestElement.innerHTML = \"\";\n\ttestElementParent.removeChild( testElement );\n})();\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\n$.widget( \"ui.progressbar\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tmax: 100,\n\t\tvalue: 0,\n\n\t\tchange: null,\n\t\tcomplete: null\n\t},\n\n\tmin: 0,\n\n\t_create: function() {\n\t\t// Constrain initial value\n\t\tthis.oldValue = this.options.value = this._constrainedValue();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.attr({\n\t\t\t\t// Only set static values, aria-valuenow and aria-valuemax are\n\t\t\t\t// set inside _refreshValue()\n\t\t\t\trole: \"progressbar\",\n\t\t\t\t\"aria-valuemin\": this.min\n\t\t\t});\n\n\t\tthis.valueDiv = $( \"<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>\" )\n\t\t\t.appendTo( this.element );\n\n\t\tthis._refreshValue();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-progressbar ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t.removeAttr( \"aria-valuenow\" );\n\n\t\tthis.valueDiv.remove();\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\treturn this.options.value;\n\t\t}\n\n\t\tthis.options.value = this._constrainedValue( newValue );\n\t\tthis._refreshValue();\n\t},\n\n\t_constrainedValue: function( newValue ) {\n\t\tif ( newValue === undefined ) {\n\t\t\tnewValue = this.options.value;\n\t\t}\n\n\t\tthis.indeterminate = newValue === false;\n\n\t\t// sanitize value\n\t\tif ( typeof newValue !== \"number\" ) {\n\t\t\tnewValue = 0;\n\t\t}\n\n\t\treturn this.indeterminate ? false :\n\t\t\tMath.min( this.options.max, Math.max( this.min, newValue ) );\n\t},\n\n\t_setOptions: function( options ) {\n\t\t// Ensure \"value\" option is set after other values (like max)\n\t\tvar value = options.value;\n\t\tdelete options.value;\n\n\t\tthis._super( options );\n\n\t\tthis.options.value = this._constrainedValue( value );\n\t\tthis._refreshValue();\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"max\" ) {\n\t\t\t// Don't allow a max less than min\n\t\t\tvalue = Math.max( this.min, value );\n\t\t}\n\n\t\tthis._super( key, value );\n\t},\n\n\t_percentage: function() {\n\t\treturn this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min );\n\t},\n\n\t_refreshValue: function() {\n\t\tvar value = this.options.value,\n\t\t\tpercentage = this._percentage();\n\n\t\tthis.valueDiv\n\t\t\t.toggle( this.indeterminate || value > this.min )\n\t\t\t.toggleClass( \"ui-corner-right\", value === this.options.max )\n\t\t\t.width( percentage.toFixed(0) + \"%\" );\n\n\t\tthis.element.toggleClass( \"ui-progressbar-indeterminate\", this.indeterminate );\n\n\t\tif ( this.indeterminate ) {\n\t\t\tthis.element.removeAttr( \"aria-valuenow\" );\n\t\t\tif ( !this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv = $( \"<div class='ui-progressbar-overlay'></div>\" ).appendTo( this.valueDiv );\n\t\t\t}\n\t\t} else {\n\t\t\tthis.element.attr({\n\t\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t\t\"aria-valuenow\": value\n\t\t\t});\n\t\t\tif ( this.overlayDiv ) {\n\t\t\t\tthis.overlayDiv.remove();\n\t\t\t\tthis.overlayDiv = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( this.oldValue !== value ) {\n\t\t\tthis.oldValue = value;\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t\tif ( value === this.options.max ) {\n\t\t\tthis._trigger( \"complete\" );\n\t\t}\n\t}\n});\n\n})( jQuery );\n\n(function( $, undefined ) {\n\n// number of pages in a slider\n// (how many times can you page up/down to go through the whole range)\nvar numPages = 5;\n\n$.widget( \"ui.slider\", $.ui.mouse, {\n\tversion: \"1.10.3\",\n\twidgetEventPrefix: \"slide\",\n\n\toptions: {\n\t\tanimate: false,\n\t\tdistance: 0,\n\t\tmax: 100,\n\t\tmin: 0,\n\t\torientation: \"horizontal\",\n\t\trange: false,\n\t\tstep: 1,\n\t\tvalue: 0,\n\t\tvalues: null,\n\n\t\t// callbacks\n\t\tchange: null,\n\t\tslide: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_create: function() {\n\t\tthis._keySliding = false;\n\t\tthis._mouseSliding = false;\n\t\tthis._animateOff = true;\n\t\tthis._handleIndex = null;\n\t\tthis._detectOrientation();\n\t\tthis._mouseInit();\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-\" + this.orientation +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\");\n\n\t\tthis._refresh();\n\t\tthis._setOption( \"disabled\", this.options.disabled );\n\n\t\tthis._animateOff = false;\n\t},\n\n\t_refresh: function() {\n\t\tthis._createRange();\n\t\tthis._createHandles();\n\t\tthis._setupEvents();\n\t\tthis._refreshValue();\n\t},\n\n\t_createHandles: function() {\n\t\tvar i, handleCount,\n\t\t\toptions = this.options,\n\t\t\texistingHandles = this.element.find( \".ui-slider-handle\" ).addClass( \"ui-state-default ui-corner-all\" ),\n\t\t\thandle = \"<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>\",\n\t\t\thandles = [];\n\n\t\thandleCount = ( options.values && options.values.length ) || 1;\n\n\t\tif ( existingHandles.length > handleCount ) {\n\t\t\texistingHandles.slice( handleCount ).remove();\n\t\t\texistingHandles = existingHandles.slice( 0, handleCount );\n\t\t}\n\n\t\tfor ( i = existingHandles.length; i < handleCount; i++ ) {\n\t\t\thandles.push( handle );\n\t\t}\n\n\t\tthis.handles = existingHandles.add( $( handles.join( \"\" ) ).appendTo( this.element ) );\n\n\t\tthis.handle = this.handles.eq( 0 );\n\n\t\tthis.handles.each(function( i ) {\n\t\t\t$( this ).data( \"ui-slider-handle-index\", i );\n\t\t});\n\t},\n\n\t_createRange: function() {\n\t\tvar options = this.options,\n\t\t\tclasses = \"\";\n\n\t\tif ( options.range ) {\n\t\t\tif ( options.range === true ) {\n\t\t\t\tif ( !options.values ) {\n\t\t\t\t\toptions.values = [ this._valueMin(), this._valueMin() ];\n\t\t\t\t} else if ( options.values.length && options.values.length !== 2 ) {\n\t\t\t\t\toptions.values = [ options.values[0], options.values[0] ];\n\t\t\t\t} else if ( $.isArray( options.values ) ) {\n\t\t\t\t\toptions.values = options.values.slice(0);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( !this.range || !this.range.length ) {\n\t\t\t\tthis.range = $( \"<div></div>\" )\n\t\t\t\t\t.appendTo( this.element );\n\n\t\t\t\tclasses = \"ui-slider-range\" +\n\t\t\t\t// note: this isn't the most fittingly semantic framework class for this element,\n\t\t\t\t// but worked best visually with a variety of themes\n\t\t\t\t\" ui-widget-header ui-corner-all\";\n\t\t\t} else {\n\t\t\t\tthis.range.removeClass( \"ui-slider-range-min ui-slider-range-max\" )\n\t\t\t\t\t// Handle range switching from true to min/max\n\t\t\t\t\t.css({\n\t\t\t\t\t\t\"left\": \"\",\n\t\t\t\t\t\t\"bottom\": \"\"\n\t\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.range.addClass( classes +\n\t\t\t\t( ( options.range === \"min\" || options.range === \"max\" ) ? \" ui-slider-range-\" + options.range : \"\" ) );\n\t\t} else {\n\t\t\tthis.range = $([]);\n\t\t}\n\t},\n\n\t_setupEvents: function() {\n\t\tvar elements = this.handles.add( this.range ).filter( \"a\" );\n\t\tthis._off( elements );\n\t\tthis._on( elements, this._handleEvents );\n\t\tthis._hoverable( elements );\n\t\tthis._focusable( elements );\n\t},\n\n\t_destroy: function() {\n\t\tthis.handles.remove();\n\t\tthis.range.remove();\n\n\t\tthis.element\n\t\t\t.removeClass( \"ui-slider\" +\n\t\t\t\t\" ui-slider-horizontal\" +\n\t\t\t\t\" ui-slider-vertical\" +\n\t\t\t\t\" ui-widget\" +\n\t\t\t\t\" ui-widget-content\" +\n\t\t\t\t\" ui-corner-all\" );\n\n\t\tthis._mouseDestroy();\n\t},\n\n\t_mouseCapture: function( event ) {\n\t\tvar position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,\n\t\t\tthat = this,\n\t\t\to = this.options;\n\n\t\tif ( o.disabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tthis.elementSize = {\n\t\t\twidth: this.element.outerWidth(),\n\t\t\theight: this.element.outerHeight()\n\t\t};\n\t\tthis.elementOffset = this.element.offset();\n\n\t\tposition = { x: event.pageX, y: event.pageY };\n\t\tnormValue = this._normValueFromMouse( position );\n\t\tdistance = this._valueMax() - this._valueMin() + 1;\n\t\tthis.handles.each(function( i ) {\n\t\t\tvar thisDistance = Math.abs( normValue - that.values(i) );\n\t\t\tif (( distance > thisDistance ) ||\n\t\t\t\t( distance === thisDistance &&\n\t\t\t\t\t(i === that._lastChangedValue || that.values(i) === o.min ))) {\n\t\t\t\tdistance = thisDistance;\n\t\t\t\tclosestHandle = $( this );\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t});\n\n\t\tallowed = this._start( event, index );\n\t\tif ( allowed === false ) {\n\t\t\treturn false;\n\t\t}\n\t\tthis._mouseSliding = true;\n\n\t\tthis._handleIndex = index;\n\n\t\tclosestHandle\n\t\t\t.addClass( \"ui-state-active\" )\n\t\t\t.focus();\n\n\t\toffset = closestHandle.offset();\n\t\tmouseOverHandle = !$( event.target ).parents().addBack().is( \".ui-slider-handle\" );\n\t\tthis._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {\n\t\t\tleft: event.pageX - offset.left - ( closestHandle.width() / 2 ),\n\t\t\ttop: event.pageY - offset.top -\n\t\t\t\t( closestHandle.height() / 2 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderTopWidth\"), 10 ) || 0 ) -\n\t\t\t\t( parseInt( closestHandle.css(\"borderBottomWidth\"), 10 ) || 0) +\n\t\t\t\t( parseInt( closestHandle.css(\"marginTop\"), 10 ) || 0)\n\t\t};\n\n\t\tif ( !this.handles.hasClass( \"ui-state-hover\" ) ) {\n\t\t\tthis._slide( event, index, normValue );\n\t\t}\n\t\tthis._animateOff = true;\n\t\treturn true;\n\t},\n\n\t_mouseStart: function() {\n\t\treturn true;\n\t},\n\n\t_mouseDrag: function( event ) {\n\t\tvar position = { x: event.pageX, y: event.pageY },\n\t\t\tnormValue = this._normValueFromMouse( position );\n\n\t\tthis._slide( event, this._handleIndex, normValue );\n\n\t\treturn false;\n\t},\n\n\t_mouseStop: function( event ) {\n\t\tthis.handles.removeClass( \"ui-state-active\" );\n\t\tthis._mouseSliding = false;\n\n\t\tthis._stop( event, this._handleIndex );\n\t\tthis._change( event, this._handleIndex );\n\n\t\tthis._handleIndex = null;\n\t\tthis._clickOffset = null;\n\t\tthis._animateOff = false;\n\n\t\treturn false;\n\t},\n\n\t_detectOrientation: function() {\n\t\tthis.orientation = ( this.options.orientation === \"vertical\" ) ? \"vertical\" : \"horizontal\";\n\t},\n\n\t_normValueFromMouse: function( position ) {\n\t\tvar pixelTotal,\n\t\t\tpixelMouse,\n\t\t\tpercentMouse,\n\t\t\tvalueTotal,\n\t\t\tvalueMouse;\n\n\t\tif ( this.orientation === \"horizontal\" ) {\n\t\t\tpixelTotal = this.elementSize.width;\n\t\t\tpixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 );\n\t\t} else {\n\t\t\tpixelTotal = this.elementSize.height;\n\t\t\tpixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 );\n\t\t}\n\n\t\tpercentMouse = ( pixelMouse / pixelTotal );\n\t\tif ( percentMouse > 1 ) {\n\t\t\tpercentMouse = 1;\n\t\t}\n\t\tif ( percentMouse < 0 ) {\n\t\t\tpercentMouse = 0;\n\t\t}\n\t\tif ( this.orientation === \"vertical\" ) {\n\t\t\tpercentMouse = 1 - percentMouse;\n\t\t}\n\n\t\tvalueTotal = this._valueMax() - this._valueMin();\n\t\tvalueMouse = this._valueMin() + percentMouse * valueTotal;\n\n\t\treturn this._trimAlignValue( valueMouse );\n\t},\n\n\t_start: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\t\treturn this._trigger( \"start\", event, uiHash );\n\t},\n\n\t_slide: function( event, index, newVal ) {\n\t\tvar otherVal,\n\t\t\tnewValues,\n\t\t\tallowed;\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\totherVal = this.values( index ? 0 : 1 );\n\n\t\t\tif ( ( this.options.values.length === 2 && this.options.range === true ) &&\n\t\t\t\t\t( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) )\n\t\t\t\t) {\n\t\t\t\tnewVal = otherVal;\n\t\t\t}\n\n\t\t\tif ( newVal !== this.values( index ) ) {\n\t\t\t\tnewValues = this.values();\n\t\t\t\tnewValues[ index ] = newVal;\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal,\n\t\t\t\t\tvalues: newValues\n\t\t\t\t} );\n\t\t\t\totherVal = this.values( index ? 0 : 1 );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.values( index, newVal, true );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif ( newVal !== this.value() ) {\n\t\t\t\t// A slide can be canceled by returning false from the slide callback\n\t\t\t\tallowed = this._trigger( \"slide\", event, {\n\t\t\t\t\thandle: this.handles[ index ],\n\t\t\t\t\tvalue: newVal\n\t\t\t\t} );\n\t\t\t\tif ( allowed !== false ) {\n\t\t\t\t\tthis.value( newVal );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_stop: function( event, index ) {\n\t\tvar uiHash = {\n\t\t\thandle: this.handles[ index ],\n\t\t\tvalue: this.value()\n\t\t};\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tuiHash.value = this.values( index );\n\t\t\tuiHash.values = this.values();\n\t\t}\n\n\t\tthis._trigger( \"stop\", event, uiHash );\n\t},\n\n\t_change: function( event, index ) {\n\t\tif ( !this._keySliding && !this._mouseSliding ) {\n\t\t\tvar uiHash = {\n\t\t\t\thandle: this.handles[ index ],\n\t\t\t\tvalue: this.value()\n\t\t\t};\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tuiHash.value = this.values( index );\n\t\t\t\tuiHash.values = this.values();\n\t\t\t}\n\n\t\t\t//store the last changed value index for reference when handles overlap\n\t\t\tthis._lastChangedValue = index;\n\n\t\t\tthis._trigger( \"change\", event, uiHash );\n\t\t}\n\t},\n\n\tvalue: function( newValue ) {\n\t\tif ( arguments.length ) {\n\t\t\tthis.options.value = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, 0 );\n\t\t\treturn;\n\t\t}\n\n\t\treturn this._value();\n\t},\n\n\tvalues: function( index, newValue ) {\n\t\tvar vals,\n\t\t\tnewValues,\n\t\t\ti;\n\n\t\tif ( arguments.length > 1 ) {\n\t\t\tthis.options.values[ index ] = this._trimAlignValue( newValue );\n\t\t\tthis._refreshValue();\n\t\t\tthis._change( null, index );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( arguments.length ) {\n\t\t\tif ( $.isArray( arguments[ 0 ] ) ) {\n\t\t\t\tvals = this.options.values;\n\t\t\t\tnewValues = arguments[ 0 ];\n\t\t\t\tfor ( i = 0; i < vals.length; i += 1 ) {\n\t\t\t\t\tvals[ i ] = this._trimAlignValue( newValues[ i ] );\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._refreshValue();\n\t\t\t} else {\n\t\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\t\treturn this._values( index );\n\t\t\t\t} else {\n\t\t\t\t\treturn this.value();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\treturn this._values();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar i,\n\t\t\tvalsLength = 0;\n\n\t\tif ( key === \"range\" && this.options.range === true ) {\n\t\t\tif ( value === \"min\" ) {\n\t\t\t\tthis.options.value = this._values( 0 );\n\t\t\t\tthis.options.values = null;\n\t\t\t} else if ( value === \"max\" ) {\n\t\t\t\tthis.options.value = this._values( this.options.values.length-1 );\n\t\t\t\tthis.options.values = null;\n\t\t\t}\n\t\t}\n\n\t\tif ( $.isArray( this.options.values ) ) {\n\t\t\tvalsLength = this.options.values.length;\n\t\t}\n\n\t\t$.Widget.prototype._setOption.apply( this, arguments );\n\n\t\tswitch ( key ) {\n\t\t\tcase \"orientation\":\n\t\t\t\tthis._detectOrientation();\n\t\t\t\tthis.element\n\t\t\t\t\t.removeClass( \"ui-slider-horizontal ui-slider-vertical\" )\n\t\t\t\t\t.addClass( \"ui-slider-\" + this.orientation );\n\t\t\t\tthis._refreshValue();\n\t\t\t\tbreak;\n\t\t\tcase \"value\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._change( null, 0 );\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"values\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tfor ( i = 0; i < valsLength; i += 1 ) {\n\t\t\t\t\tthis._change( null, i );\n\t\t\t\t}\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refreshValue();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t\tcase \"range\":\n\t\t\t\tthis._animateOff = true;\n\t\t\t\tthis._refresh();\n\t\t\t\tthis._animateOff = false;\n\t\t\t\tbreak;\n\t\t}\n\t},\n\n\t//internal value getter\n\t// _value() returns value trimmed by min and max, aligned by step\n\t_value: function() {\n\t\tvar val = this.options.value;\n\t\tval = this._trimAlignValue( val );\n\n\t\treturn val;\n\t},\n\n\t//internal values getter\n\t// _values() returns array of values trimmed by min and max, aligned by step\n\t// _values( index ) returns single value trimmed by min and max, aligned by step\n\t_values: function( index ) {\n\t\tvar val,\n\t\t\tvals,\n\t\t\ti;\n\n\t\tif ( arguments.length ) {\n\t\t\tval = this.options.values[ index ];\n\t\t\tval = this._trimAlignValue( val );\n\n\t\t\treturn val;\n\t\t} else if ( this.options.values && this.options.values.length ) {\n\t\t\t// .slice() creates a copy of the array\n\t\t\t// this copy gets trimmed by min and max and then returned\n\t\t\tvals = this.options.values.slice();\n\t\t\tfor ( i = 0; i < vals.length; i+= 1) {\n\t\t\t\tvals[ i ] = this._trimAlignValue( vals[ i ] );\n\t\t\t}\n\n\t\t\treturn vals;\n\t\t} else {\n\t\t\treturn [];\n\t\t}\n\t},\n\n\t// returns the step-aligned value that val is closest to, between (inclusive) min and max\n\t_trimAlignValue: function( val ) {\n\t\tif ( val <= this._valueMin() ) {\n\t\t\treturn this._valueMin();\n\t\t}\n\t\tif ( val >= this._valueMax() ) {\n\t\t\treturn this._valueMax();\n\t\t}\n\t\tvar step = ( this.options.step > 0 ) ? this.options.step : 1,\n\t\t\tvalModStep = (val - this._valueMin()) % step,\n\t\t\talignValue = val - valModStep;\n\n\t\tif ( Math.abs(valModStep) * 2 >= step ) {\n\t\t\talignValue += ( valModStep > 0 ) ? step : ( -step );\n\t\t}\n\n\t\t// Since JavaScript has problems with large floats, round\n\t\t// the final value to 5 digits after the decimal point (see #4124)\n\t\treturn parseFloat( alignValue.toFixed(5) );\n\t},\n\n\t_valueMin: function() {\n\t\treturn this.options.min;\n\t},\n\n\t_valueMax: function() {\n\t\treturn this.options.max;\n\t},\n\n\t_refreshValue: function() {\n\t\tvar lastValPercent, valPercent, value, valueMin, valueMax,\n\t\t\toRange = this.options.range,\n\t\t\to = this.options,\n\t\t\tthat = this,\n\t\t\tanimate = ( !this._animateOff ) ? o.animate : false,\n\t\t\t_set = {};\n\n\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\tthis.handles.each(function( i ) {\n\t\t\t\tvalPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100;\n\t\t\t\t_set[ that.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\t\t$( this ).stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\t\t\t\tif ( that.options.range === true ) {\n\t\t\t\t\tif ( that.orientation === \"horizontal\" ) {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { left: valPercent + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { width: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ( i === 0 ) {\n\t\t\t\t\t\t\tthat.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { bottom: ( valPercent ) + \"%\" }, o.animate );\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( i === 1 ) {\n\t\t\t\t\t\t\tthat.range[ animate ? \"animate\" : \"css\" ]( { height: ( valPercent - lastValPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlastValPercent = valPercent;\n\t\t\t});\n\t\t} else {\n\t\t\tvalue = this.value();\n\t\t\tvalueMin = this._valueMin();\n\t\t\tvalueMax = this._valueMax();\n\t\t\tvalPercent = ( valueMax !== valueMin ) ?\n\t\t\t\t\t( value - valueMin ) / ( valueMax - valueMin ) * 100 :\n\t\t\t\t\t0;\n\t\t\t_set[ this.orientation === \"horizontal\" ? \"left\" : \"bottom\" ] = valPercent + \"%\";\n\t\t\tthis.handle.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( _set, o.animate );\n\n\t\t\tif ( oRange === \"min\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { width: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"horizontal\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { width: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t\tif ( oRange === \"min\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range.stop( 1, 1 )[ animate ? \"animate\" : \"css\" ]( { height: valPercent + \"%\" }, o.animate );\n\t\t\t}\n\t\t\tif ( oRange === \"max\" && this.orientation === \"vertical\" ) {\n\t\t\t\tthis.range[ animate ? \"animate\" : \"css\" ]( { height: ( 100 - valPercent ) + \"%\" }, { queue: false, duration: o.animate } );\n\t\t\t}\n\t\t}\n\t},\n\n\t_handleEvents: {\n\t\tkeydown: function( event ) {\n\t\t\t/*jshint maxcomplexity:25*/\n\t\t\tvar allowed, curVal, newVal, step,\n\t\t\t\tindex = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif ( !this._keySliding ) {\n\t\t\t\t\t\tthis._keySliding = true;\n\t\t\t\t\t\t$( event.target ).addClass( \"ui-state-active\" );\n\t\t\t\t\t\tallowed = this._start( event, index );\n\t\t\t\t\t\tif ( allowed === false ) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tstep = this.options.step;\n\t\t\tif ( this.options.values && this.options.values.length ) {\n\t\t\t\tcurVal = newVal = this.values( index );\n\t\t\t} else {\n\t\t\t\tcurVal = newVal = this.value();\n\t\t\t}\n\n\t\t\tswitch ( event.keyCode ) {\n\t\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\t\tnewVal = this._valueMin();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.END:\n\t\t\t\t\tnewVal = this._valueMax();\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_UP:\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.PAGE_DOWN:\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - ( (this._valueMax() - this._valueMin()) / numPages ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.UP:\n\t\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\t\t\tif ( curVal === this._valueMax() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal + step );\n\t\t\t\t\tbreak;\n\t\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\t\tif ( curVal === this._valueMin() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tnewVal = this._trimAlignValue( curVal - step );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tthis._slide( event, index, newVal );\n\t\t},\n\t\tclick: function( event ) {\n\t\t\tevent.preventDefault();\n\t\t},\n\t\tkeyup: function( event ) {\n\t\t\tvar index = $( event.target ).data( \"ui-slider-handle-index\" );\n\n\t\t\tif ( this._keySliding ) {\n\t\t\t\tthis._keySliding = false;\n\t\t\t\tthis._stop( event, index );\n\t\t\t\tthis._change( event, index );\n\t\t\t\t$( event.target ).removeClass( \"ui-state-active\" );\n\t\t\t}\n\t\t}\n\t}\n\n});\n\n}(jQuery));\n\n(function( $ ) {\n\nfunction modifier( fn ) {\n\treturn function() {\n\t\tvar previous = this.element.val();\n\t\tfn.apply( this, arguments );\n\t\tthis._refresh();\n\t\tif ( previous !== this.element.val() ) {\n\t\t\tthis._trigger( \"change\" );\n\t\t}\n\t};\n}\n\n$.widget( \"ui.spinner\", {\n\tversion: \"1.10.3\",\n\tdefaultElement: \"<input>\",\n\twidgetEventPrefix: \"spin\",\n\toptions: {\n\t\tculture: null,\n\t\ticons: {\n\t\t\tdown: \"ui-icon-triangle-1-s\",\n\t\t\tup: \"ui-icon-triangle-1-n\"\n\t\t},\n\t\tincremental: true,\n\t\tmax: null,\n\t\tmin: null,\n\t\tnumberFormat: null,\n\t\tpage: 10,\n\t\tstep: 1,\n\n\t\tchange: null,\n\t\tspin: null,\n\t\tstart: null,\n\t\tstop: null\n\t},\n\n\t_create: function() {\n\t\t// handle string values that need to be parsed\n\t\tthis._setOption( \"max\", this.options.max );\n\t\tthis._setOption( \"min\", this.options.min );\n\t\tthis._setOption( \"step\", this.options.step );\n\n\t\t// format the value, but don't constrain\n\t\tthis._value( this.element.val(), true );\n\n\t\tthis._draw();\n\t\tthis._on( this._events );\n\t\tthis._refresh();\n\n\t\t// turning off autocomplete prevents the browser from remembering the\n\t\t// value when navigating through history, so we re-enable autocomplete\n\t\t// if the page is unloaded before the widget is destroyed. #7790\n\t\tthis._on( this.window, {\n\t\t\tbeforeunload: function() {\n\t\t\t\tthis.element.removeAttr( \"autocomplete\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_getCreateOptions: function() {\n\t\tvar options = {},\n\t\t\telement = this.element;\n\n\t\t$.each( [ \"min\", \"max\", \"step\" ], function( i, option ) {\n\t\t\tvar value = element.attr( option );\n\t\t\tif ( value !== undefined && value.length ) {\n\t\t\t\toptions[ option ] = value;\n\t\t\t}\n\t\t});\n\n\t\treturn options;\n\t},\n\n\t_events: {\n\t\tkeydown: function( event ) {\n\t\t\tif ( this._start( event ) && this._keydown( event ) ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t},\n\t\tkeyup: \"_stop\",\n\t\tfocus: function() {\n\t\t\tthis.previous = this.element.val();\n\t\t},\n\t\tblur: function( event ) {\n\t\t\tif ( this.cancelBlur ) {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._stop();\n\t\t\tthis._refresh();\n\t\t\tif ( this.previous !== this.element.val() ) {\n\t\t\t\tthis._trigger( \"change\", event );\n\t\t\t}\n\t\t},\n\t\tmousewheel: function( event, delta ) {\n\t\t\tif ( !delta ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !this.spinning && !this._start( event ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tthis._spin( (delta > 0 ? 1 : -1) * this.options.step, event );\n\t\t\tclearTimeout( this.mousewheelTimer );\n\t\t\tthis.mousewheelTimer = this._delay(function() {\n\t\t\t\tif ( this.spinning ) {\n\t\t\t\t\tthis._stop( event );\n\t\t\t\t}\n\t\t\t}, 100 );\n\t\t\tevent.preventDefault();\n\t\t},\n\t\t\"mousedown .ui-spinner-button\": function( event ) {\n\t\t\tvar previous;\n\n\t\t\t// We never want the buttons to have focus; whenever the user is\n\t\t\t// interacting with the spinner, the focus should be on the input.\n\t\t\t// If the input is focused then this.previous is properly set from\n\t\t\t// when the input first received focus. If the input is not focused\n\t\t\t// then we need to set this.previous based on the value before spinning.\n\t\t\tprevious = this.element[0] === this.document[0].activeElement ?\n\t\t\t\tthis.previous : this.element.val();\n\t\t\tfunction checkFocus() {\n\t\t\t\tvar isActive = this.element[0] === this.document[0].activeElement;\n\t\t\t\tif ( !isActive ) {\n\t\t\t\t\tthis.element.focus();\n\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t// support: IE\n\t\t\t\t\t// IE sets focus asynchronously, so we need to check if focus\n\t\t\t\t\t// moved off of the input because the user clicked on the button.\n\t\t\t\t\tthis._delay(function() {\n\t\t\t\t\t\tthis.previous = previous;\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// ensure focus is on (or stays on) the text field\n\t\t\tevent.preventDefault();\n\t\t\tcheckFocus.call( this );\n\n\t\t\t// support: IE\n\t\t\t// IE doesn't prevent moving focus even with event.preventDefault()\n\t\t\t// so we set a flag to know when we should ignore the blur event\n\t\t\t// and check (again) if focus moved off of the input.\n\t\t\tthis.cancelBlur = true;\n\t\t\tthis._delay(function() {\n\t\t\t\tdelete this.cancelBlur;\n\t\t\t\tcheckFocus.call( this );\n\t\t\t});\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\t\t\"mouseup .ui-spinner-button\": \"_stop\",\n\t\t\"mouseenter .ui-spinner-button\": function( event ) {\n\t\t\t// button will add ui-state-active if mouse was down while mouseleave and kept down\n\t\t\tif ( !$( event.currentTarget ).hasClass( \"ui-state-active\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( this._start( event ) === false ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis._repeat( null, $( event.currentTarget ).hasClass( \"ui-spinner-up\" ) ? 1 : -1, event );\n\t\t},\n\t\t// TODO: do we really want to consider this a stop?\n\t\t// shouldn't we just stop the repeater and wait until mouseup before\n\t\t// we trigger the stop event?\n\t\t\"mouseleave .ui-spinner-button\": \"_stop\"\n\t},\n\n\t_draw: function() {\n\t\tvar uiSpinner = this.uiSpinner = this.element\n\t\t\t.addClass( \"ui-spinner-input\" )\n\t\t\t.attr( \"autocomplete\", \"off\" )\n\t\t\t.wrap( this._uiSpinnerHtml() )\n\t\t\t.parent()\n\t\t\t\t// add buttons\n\t\t\t\t.append( this._buttonHtml() );\n\n\t\tthis.element.attr( \"role\", \"spinbutton\" );\n\n\t\t// button bindings\n\t\tthis.buttons = uiSpinner.find( \".ui-spinner-button\" )\n\t\t\t.attr( \"tabIndex\", -1 )\n\t\t\t.button()\n\t\t\t.removeClass( \"ui-corner-all\" );\n\n\t\t// IE 6 doesn't understand height: 50% for the buttons\n\t\t// unless the wrapper has an explicit height\n\t\tif ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) &&\n\t\t\t\tuiSpinner.height() > 0 ) {\n\t\t\tuiSpinner.height( uiSpinner.height() );\n\t\t}\n\n\t\t// disable spinner if element was already disabled\n\t\tif ( this.options.disabled ) {\n\t\t\tthis.disable();\n\t\t}\n\t},\n\n\t_keydown: function( event ) {\n\t\tvar options = this.options,\n\t\t\tkeyCode = $.ui.keyCode;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase keyCode.UP:\n\t\t\tthis._repeat( null, 1, event );\n\t\t\treturn true;\n\t\tcase keyCode.DOWN:\n\t\t\tthis._repeat( null, -1, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_UP:\n\t\t\tthis._repeat( null, options.page, event );\n\t\t\treturn true;\n\t\tcase keyCode.PAGE_DOWN:\n\t\t\tthis._repeat( null, -options.page, event );\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_uiSpinnerHtml: function() {\n\t\treturn \"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>\";\n\t},\n\n\t_buttonHtml: function() {\n\t\treturn \"\" +\n\t\t\t\"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>\" +\n\t\t\t\t\"<span class='ui-icon \" + this.options.icons.up + \"'>&#9650;</span>\" +\n\t\t\t\"</a>\" +\n\t\t\t\"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>\" +\n\t\t\t\t\"<span class='ui-icon \" + this.options.icons.down + \"'>&#9660;</span>\" +\n\t\t\t\"</a>\";\n\t},\n\n\t_start: function( event ) {\n\t\tif ( !this.spinning && this._trigger( \"start\", event ) === false ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\t\tthis.spinning = true;\n\t\treturn true;\n\t},\n\n\t_repeat: function( i, steps, event ) {\n\t\ti = i || 500;\n\n\t\tclearTimeout( this.timer );\n\t\tthis.timer = this._delay(function() {\n\t\t\tthis._repeat( 40, steps, event );\n\t\t}, i );\n\n\t\tthis._spin( steps * this.options.step, event );\n\t},\n\n\t_spin: function( step, event ) {\n\t\tvar value = this.value() || 0;\n\n\t\tif ( !this.counter ) {\n\t\t\tthis.counter = 1;\n\t\t}\n\n\t\tvalue = this._adjustValue( value + step * this._increment( this.counter ) );\n\n\t\tif ( !this.spinning || this._trigger( \"spin\", event, { value: value } ) !== false) {\n\t\t\tthis._value( value );\n\t\t\tthis.counter++;\n\t\t}\n\t},\n\n\t_increment: function( i ) {\n\t\tvar incremental = this.options.incremental;\n\n\t\tif ( incremental ) {\n\t\t\treturn $.isFunction( incremental ) ?\n\t\t\t\tincremental( i ) :\n\t\t\t\tMath.floor( i*i*i/50000 - i*i/500 + 17*i/200 + 1 );\n\t\t}\n\n\t\treturn 1;\n\t},\n\n\t_precision: function() {\n\t\tvar precision = this._precisionOf( this.options.step );\n\t\tif ( this.options.min !== null ) {\n\t\t\tprecision = Math.max( precision, this._precisionOf( this.options.min ) );\n\t\t}\n\t\treturn precision;\n\t},\n\n\t_precisionOf: function( num ) {\n\t\tvar str = num.toString(),\n\t\t\tdecimal = str.indexOf( \".\" );\n\t\treturn decimal === -1 ? 0 : str.length - decimal - 1;\n\t},\n\n\t_adjustValue: function( value ) {\n\t\tvar base, aboveMin,\n\t\t\toptions = this.options;\n\n\t\t// make sure we're at a valid step\n\t\t// - find out where we are relative to the base (min or 0)\n\t\tbase = options.min !== null ? options.min : 0;\n\t\taboveMin = value - base;\n\t\t// - round to the nearest step\n\t\taboveMin = Math.round(aboveMin / options.step) * options.step;\n\t\t// - rounding is based on 0, so adjust back to our base\n\t\tvalue = base + aboveMin;\n\n\t\t// fix precision from bad JS floating point math\n\t\tvalue = parseFloat( value.toFixed( this._precision() ) );\n\n\t\t// clamp the value\n\t\tif ( options.max !== null && value > options.max) {\n\t\t\treturn options.max;\n\t\t}\n\t\tif ( options.min !== null && value < options.min ) {\n\t\t\treturn options.min;\n\t\t}\n\n\t\treturn value;\n\t},\n\n\t_stop: function( event ) {\n\t\tif ( !this.spinning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tclearTimeout( this.timer );\n\t\tclearTimeout( this.mousewheelTimer );\n\t\tthis.counter = 0;\n\t\tthis.spinning = false;\n\t\tthis._trigger( \"stop\", event );\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"culture\" || key === \"numberFormat\" ) {\n\t\t\tvar prevValue = this._parse( this.element.val() );\n\t\t\tthis.options[ key ] = value;\n\t\t\tthis.element.val( this._format( prevValue ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"max\" || key === \"min\" || key === \"step\" ) {\n\t\t\tif ( typeof value === \"string\" ) {\n\t\t\t\tvalue = this._parse( value );\n\t\t\t}\n\t\t}\n\t\tif ( key === \"icons\" ) {\n\t\t\tthis.buttons.first().find( \".ui-icon\" )\n\t\t\t\t.removeClass( this.options.icons.up )\n\t\t\t\t.addClass( value.up );\n\t\t\tthis.buttons.last().find( \".ui-icon\" )\n\t\t\t\t.removeClass( this.options.icons.down )\n\t\t\t\t.addClass( value.down );\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tif ( value ) {\n\t\t\t\tthis.element.prop( \"disabled\", true );\n\t\t\t\tthis.buttons.button( \"disable\" );\n\t\t\t} else {\n\t\t\t\tthis.element.prop( \"disabled\", false );\n\t\t\t\tthis.buttons.button( \"enable\" );\n\t\t\t}\n\t\t}\n\t},\n\n\t_setOptions: modifier(function( options ) {\n\t\tthis._super( options );\n\t\tthis._value( this.element.val() );\n\t}),\n\n\t_parse: function( val ) {\n\t\tif ( typeof val === \"string\" && val !== \"\" ) {\n\t\t\tval = window.Globalize && this.options.numberFormat ?\n\t\t\t\tGlobalize.parseFloat( val, 10, this.options.culture ) : +val;\n\t\t}\n\t\treturn val === \"\" || isNaN( val ) ? null : val;\n\t},\n\n\t_format: function( value ) {\n\t\tif ( value === \"\" ) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn window.Globalize && this.options.numberFormat ?\n\t\t\tGlobalize.format( value, this.options.numberFormat, this.options.culture ) :\n\t\t\tvalue;\n\t},\n\n\t_refresh: function() {\n\t\tthis.element.attr({\n\t\t\t\"aria-valuemin\": this.options.min,\n\t\t\t\"aria-valuemax\": this.options.max,\n\t\t\t// TODO: what should we do with values that can't be parsed?\n\t\t\t\"aria-valuenow\": this._parse( this.element.val() )\n\t\t});\n\t},\n\n\t// update the value without triggering change\n\t_value: function( value, allowAny ) {\n\t\tvar parsed;\n\t\tif ( value !== \"\" ) {\n\t\t\tparsed = this._parse( value );\n\t\t\tif ( parsed !== null ) {\n\t\t\t\tif ( !allowAny ) {\n\t\t\t\t\tparsed = this._adjustValue( parsed );\n\t\t\t\t}\n\t\t\t\tvalue = this._format( parsed );\n\t\t\t}\n\t\t}\n\t\tthis.element.val( value );\n\t\tthis._refresh();\n\t},\n\n\t_destroy: function() {\n\t\tthis.element\n\t\t\t.removeClass( \"ui-spinner-input\" )\n\t\t\t.prop( \"disabled\", false )\n\t\t\t.removeAttr( \"autocomplete\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"aria-valuemin\" )\n\t\t\t.removeAttr( \"aria-valuemax\" )\n\t\t\t.removeAttr( \"aria-valuenow\" );\n\t\tthis.uiSpinner.replaceWith( this.element );\n\t},\n\n\tstepUp: modifier(function( steps ) {\n\t\tthis._stepUp( steps );\n\t}),\n\t_stepUp: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( (steps || 1) * this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tstepDown: modifier(function( steps ) {\n\t\tthis._stepDown( steps );\n\t}),\n\t_stepDown: function( steps ) {\n\t\tif ( this._start() ) {\n\t\t\tthis._spin( (steps || 1) * -this.options.step );\n\t\t\tthis._stop();\n\t\t}\n\t},\n\n\tpageUp: modifier(function( pages ) {\n\t\tthis._stepUp( (pages || 1) * this.options.page );\n\t}),\n\n\tpageDown: modifier(function( pages ) {\n\t\tthis._stepDown( (pages || 1) * this.options.page );\n\t}),\n\n\tvalue: function( newVal ) {\n\t\tif ( !arguments.length ) {\n\t\t\treturn this._parse( this.element.val() );\n\t\t}\n\t\tmodifier( this._value ).call( this, newVal );\n\t},\n\n\twidget: function() {\n\t\treturn this.uiSpinner;\n\t}\n});\n\n}( jQuery ) );\n\n(function( $, undefined ) {\n\nvar tabId = 0,\n\trhash = /#.*$/;\n\nfunction getNextTabId() {\n\treturn ++tabId;\n}\n\nfunction isLocal( anchor ) {\n\treturn anchor.hash.length > 1 &&\n\t\tdecodeURIComponent( anchor.href.replace( rhash, \"\" ) ) ===\n\t\t\tdecodeURIComponent( location.href.replace( rhash, \"\" ) );\n}\n\n$.widget( \"ui.tabs\", {\n\tversion: \"1.10.3\",\n\tdelay: 300,\n\toptions: {\n\t\tactive: null,\n\t\tcollapsible: false,\n\t\tevent: \"click\",\n\t\theightStyle: \"content\",\n\t\thide: null,\n\t\tshow: null,\n\n\t\t// callbacks\n\t\tactivate: null,\n\t\tbeforeActivate: null,\n\t\tbeforeLoad: null,\n\t\tload: null\n\t},\n\n\t_create: function() {\n\t\tvar that = this,\n\t\t\toptions = this.options;\n\n\t\tthis.running = false;\n\n\t\tthis.element\n\t\t\t.addClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all\" )\n\t\t\t.toggleClass( \"ui-tabs-collapsible\", options.collapsible )\n\t\t\t// Prevent users from focusing disabled tabs via click\n\t\t\t.delegate( \".ui-tabs-nav > li\", \"mousedown\" + this.eventNamespace, function( event ) {\n\t\t\t\tif ( $( this ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t})\n\t\t\t// support: IE <9\n\t\t\t// Preventing the default action in mousedown doesn't prevent IE\n\t\t\t// from focusing the element, so if the anchor gets focused, blur.\n\t\t\t// We don't have to worry about focusing the previously focused\n\t\t\t// element since clicking on a non-focusable element should focus\n\t\t\t// the body anyway.\n\t\t\t.delegate( \".ui-tabs-anchor\", \"focus\" + this.eventNamespace, function() {\n\t\t\t\tif ( $( this ).closest( \"li\" ).is( \".ui-state-disabled\" ) ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis._processTabs();\n\t\toptions.active = this._initialActive();\n\n\t\t// Take disabling tabs via class attribute from HTML\n\t\t// into account and update option properly.\n\t\tif ( $.isArray( options.disabled ) ) {\n\t\t\toptions.disabled = $.unique( options.disabled.concat(\n\t\t\t\t$.map( this.tabs.filter( \".ui-state-disabled\" ), function( li ) {\n\t\t\t\t\treturn that.tabs.index( li );\n\t\t\t\t})\n\t\t\t) ).sort();\n\t\t}\n\n\t\t// check for length avoids error when initializing empty list\n\t\tif ( this.options.active !== false && this.anchors.length ) {\n\t\t\tthis.active = this._findActive( options.active );\n\t\t} else {\n\t\t\tthis.active = $();\n\t\t}\n\n\t\tthis._refresh();\n\n\t\tif ( this.active.length ) {\n\t\t\tthis.load( options.active );\n\t\t}\n\t},\n\n\t_initialActive: function() {\n\t\tvar active = this.options.active,\n\t\t\tcollapsible = this.options.collapsible,\n\t\t\tlocationHash = location.hash.substring( 1 );\n\n\t\tif ( active === null ) {\n\t\t\t// check the fragment identifier in the URL\n\t\t\tif ( locationHash ) {\n\t\t\t\tthis.tabs.each(function( i, tab ) {\n\t\t\t\t\tif ( $( tab ).attr( \"aria-controls\" ) === locationHash ) {\n\t\t\t\t\t\tactive = i;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t// check for a tab marked active via a class\n\t\t\tif ( active === null ) {\n\t\t\t\tactive = this.tabs.index( this.tabs.filter( \".ui-tabs-active\" ) );\n\t\t\t}\n\n\t\t\t// no active tab, set to false\n\t\t\tif ( active === null || active === -1 ) {\n\t\t\t\tactive = this.tabs.length ? 0 : false;\n\t\t\t}\n\t\t}\n\n\t\t// handle numbers: negative, out of range\n\t\tif ( active !== false ) {\n\t\t\tactive = this.tabs.index( this.tabs.eq( active ) );\n\t\t\tif ( active === -1 ) {\n\t\t\t\tactive = collapsible ? false : 0;\n\t\t\t}\n\t\t}\n\n\t\t// don't allow collapsible: false and active: false\n\t\tif ( !collapsible && active === false && this.anchors.length ) {\n\t\t\tactive = 0;\n\t\t}\n\n\t\treturn active;\n\t},\n\n\t_getCreateEventData: function() {\n\t\treturn {\n\t\t\ttab: this.active,\n\t\t\tpanel: !this.active.length ? $() : this._getPanelForTab( this.active )\n\t\t};\n\t},\n\n\t_tabKeydown: function( event ) {\n\t\t/*jshint maxcomplexity:15*/\n\t\tvar focusedTab = $( this.document[0].activeElement ).closest( \"li\" ),\n\t\t\tselectedIndex = this.tabs.index( focusedTab ),\n\t\t\tgoingForward = true;\n\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch ( event.keyCode ) {\n\t\t\tcase $.ui.keyCode.RIGHT:\n\t\t\tcase $.ui.keyCode.DOWN:\n\t\t\t\tselectedIndex++;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.UP:\n\t\t\tcase $.ui.keyCode.LEFT:\n\t\t\t\tgoingForward = false;\n\t\t\t\tselectedIndex--;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.END:\n\t\t\t\tselectedIndex = this.anchors.length - 1;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.HOME:\n\t\t\t\tselectedIndex = 0;\n\t\t\t\tbreak;\n\t\t\tcase $.ui.keyCode.SPACE:\n\t\t\t\t// Activate only, no collapsing\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearTimeout( this.activating );\n\t\t\t\tthis._activate( selectedIndex );\n\t\t\t\treturn;\n\t\t\tcase $.ui.keyCode.ENTER:\n\t\t\t\t// Toggle (cancel delayed activation, allow collapsing)\n\t\t\t\tevent.preventDefault();\n\t\t\t\tclearTimeout( this.activating );\n\t\t\t\t// Determine if we should collapse or activate\n\t\t\t\tthis._activate( selectedIndex === this.options.active ? false : selectedIndex );\n\t\t\t\treturn;\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\n\t\t// Focus the appropriate tab, based on which key was pressed\n\t\tevent.preventDefault();\n\t\tclearTimeout( this.activating );\n\t\tselectedIndex = this._focusNextTab( selectedIndex, goingForward );\n\n\t\t// Navigating with control key will prevent automatic activation\n\t\tif ( !event.ctrlKey ) {\n\t\t\t// Update aria-selected immediately so that AT think the tab is already selected.\n\t\t\t// Otherwise AT may confuse the user by stating that they need to activate the tab,\n\t\t\t// but the tab will already be activated by the time the announcement finishes.\n\t\t\tfocusedTab.attr( \"aria-selected\", \"false\" );\n\t\t\tthis.tabs.eq( selectedIndex ).attr( \"aria-selected\", \"true\" );\n\n\t\t\tthis.activating = this._delay(function() {\n\t\t\t\tthis.option( \"active\", selectedIndex );\n\t\t\t}, this.delay );\n\t\t}\n\t},\n\n\t_panelKeydown: function( event ) {\n\t\tif ( this._handlePageNav( event ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Ctrl+up moves focus to the current tab\n\t\tif ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {\n\t\t\tevent.preventDefault();\n\t\t\tthis.active.focus();\n\t\t}\n\t},\n\n\t// Alt+page up/down moves focus to the previous/next tab (and activates)\n\t_handlePageNav: function( event ) {\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active - 1, false ) );\n\t\t\treturn true;\n\t\t}\n\t\tif ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {\n\t\t\tthis._activate( this._focusNextTab( this.options.active + 1, true ) );\n\t\t\treturn true;\n\t\t}\n\t},\n\n\t_findNextTab: function( index, goingForward ) {\n\t\tvar lastTabIndex = this.tabs.length - 1;\n\n\t\tfunction constrain() {\n\t\t\tif ( index > lastTabIndex ) {\n\t\t\t\tindex = 0;\n\t\t\t}\n\t\t\tif ( index < 0 ) {\n\t\t\t\tindex = lastTabIndex;\n\t\t\t}\n\t\t\treturn index;\n\t\t}\n\n\t\twhile ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {\n\t\t\tindex = goingForward ? index + 1 : index - 1;\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_focusNextTab: function( index, goingForward ) {\n\t\tindex = this._findNextTab( index, goingForward );\n\t\tthis.tabs.eq( index ).focus();\n\t\treturn index;\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tif ( key === \"active\" ) {\n\t\t\t// _activate() will handle invalid values and update this.options\n\t\t\tthis._activate( value );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\t// don't use the widget factory's disabled handling\n\t\t\tthis._setupDisabled( value );\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value);\n\n\t\tif ( key === \"collapsible\" ) {\n\t\t\tthis.element.toggleClass( \"ui-tabs-collapsible\", value );\n\t\t\t// Setting collapsible: false while collapsed; open first panel\n\t\t\tif ( !value && this.options.active === false ) {\n\t\t\t\tthis._activate( 0 );\n\t\t\t}\n\t\t}\n\n\t\tif ( key === \"event\" ) {\n\t\t\tthis._setupEvents( value );\n\t\t}\n\n\t\tif ( key === \"heightStyle\" ) {\n\t\t\tthis._setupHeightStyle( value );\n\t\t}\n\t},\n\n\t_tabId: function( tab ) {\n\t\treturn tab.attr( \"aria-controls\" ) || \"ui-tabs-\" + getNextTabId();\n\t},\n\n\t_sanitizeSelector: function( hash ) {\n\t\treturn hash ? hash.replace( /[!\"$%&'()*+,.\\/:;<=>?@\\[\\]\\^`{|}~]/g, \"\\\\$&\" ) : \"\";\n\t},\n\n\trefresh: function() {\n\t\tvar options = this.options,\n\t\t\tlis = this.tablist.children( \":has(a[href])\" );\n\n\t\t// get disabled tabs from class attribute from HTML\n\t\t// this will get converted to a boolean if needed in _refresh()\n\t\toptions.disabled = $.map( lis.filter( \".ui-state-disabled\" ), function( tab ) {\n\t\t\treturn lis.index( tab );\n\t\t});\n\n\t\tthis._processTabs();\n\n\t\t// was collapsed or no tabs\n\t\tif ( options.active === false || !this.anchors.length ) {\n\t\t\toptions.active = false;\n\t\t\tthis.active = $();\n\t\t// was active, but active tab is gone\n\t\t} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {\n\t\t\t// all remaining tabs are disabled\n\t\t\tif ( this.tabs.length === options.disabled.length ) {\n\t\t\t\toptions.active = false;\n\t\t\t\tthis.active = $();\n\t\t\t// activate previous tab\n\t\t\t} else {\n\t\t\t\tthis._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );\n\t\t\t}\n\t\t// was active, active tab still exists\n\t\t} else {\n\t\t\t// make sure active index is correct\n\t\t\toptions.active = this.tabs.index( this.active );\n\t\t}\n\n\t\tthis._refresh();\n\t},\n\n\t_refresh: function() {\n\t\tthis._setupDisabled( this.options.disabled );\n\t\tthis._setupEvents( this.options.event );\n\t\tthis._setupHeightStyle( this.options.heightStyle );\n\n\t\tthis.tabs.not( this.active ).attr({\n\t\t\t\"aria-selected\": \"false\",\n\t\t\ttabIndex: -1\n\t\t});\n\t\tthis.panels.not( this._getPanelForTab( this.active ) )\n\t\t\t.hide()\n\t\t\t.attr({\n\t\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\t\"aria-hidden\": \"true\"\n\t\t\t});\n\n\t\t// Make sure one tab is in the tab order\n\t\tif ( !this.active.length ) {\n\t\t\tthis.tabs.eq( 0 ).attr( \"tabIndex\", 0 );\n\t\t} else {\n\t\t\tthis.active\n\t\t\t\t.addClass( \"ui-tabs-active ui-state-active\" )\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-selected\": \"true\",\n\t\t\t\t\ttabIndex: 0\n\t\t\t\t});\n\t\t\tthis._getPanelForTab( this.active )\n\t\t\t\t.show()\n\t\t\t\t.attr({\n\t\t\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\t\t\"aria-hidden\": \"false\"\n\t\t\t\t});\n\t\t}\n\t},\n\n\t_processTabs: function() {\n\t\tvar that = this;\n\n\t\tthis.tablist = this._getList()\n\t\t\t.addClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t.attr( \"role\", \"tablist\" );\n\n\t\tthis.tabs = this.tablist.find( \"> li:has(a[href])\" )\n\t\t\t.addClass( \"ui-state-default ui-corner-top\" )\n\t\t\t.attr({\n\t\t\t\trole: \"tab\",\n\t\t\t\ttabIndex: -1\n\t\t\t});\n\n\t\tthis.anchors = this.tabs.map(function() {\n\t\t\t\treturn $( \"a\", this )[ 0 ];\n\t\t\t})\n\t\t\t.addClass( \"ui-tabs-anchor\" )\n\t\t\t.attr({\n\t\t\t\trole: \"presentation\",\n\t\t\t\ttabIndex: -1\n\t\t\t});\n\n\t\tthis.panels = $();\n\n\t\tthis.anchors.each(function( i, anchor ) {\n\t\t\tvar selector, panel, panelId,\n\t\t\t\tanchorId = $( anchor ).uniqueId().attr( \"id\" ),\n\t\t\t\ttab = $( anchor ).closest( \"li\" ),\n\t\t\t\toriginalAriaControls = tab.attr( \"aria-controls\" );\n\n\t\t\t// inline tab\n\t\t\tif ( isLocal( anchor ) ) {\n\t\t\t\tselector = anchor.hash;\n\t\t\t\tpanel = that.element.find( that._sanitizeSelector( selector ) );\n\t\t\t// remote tab\n\t\t\t} else {\n\t\t\t\tpanelId = that._tabId( tab );\n\t\t\t\tselector = \"#\" + panelId;\n\t\t\t\tpanel = that.element.find( selector );\n\t\t\t\tif ( !panel.length ) {\n\t\t\t\t\tpanel = that._createPanel( panelId );\n\t\t\t\t\tpanel.insertAfter( that.panels[ i - 1 ] || that.tablist );\n\t\t\t\t}\n\t\t\t\tpanel.attr( \"aria-live\", \"polite\" );\n\t\t\t}\n\n\t\t\tif ( panel.length) {\n\t\t\t\tthat.panels = that.panels.add( panel );\n\t\t\t}\n\t\t\tif ( originalAriaControls ) {\n\t\t\t\ttab.data( \"ui-tabs-aria-controls\", originalAriaControls );\n\t\t\t}\n\t\t\ttab.attr({\n\t\t\t\t\"aria-controls\": selector.substring( 1 ),\n\t\t\t\t\"aria-labelledby\": anchorId\n\t\t\t});\n\t\t\tpanel.attr( \"aria-labelledby\", anchorId );\n\t\t});\n\n\t\tthis.panels\n\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t.attr( \"role\", \"tabpanel\" );\n\t},\n\n\t// allow overriding how to find the list for rare usage scenarios (#7715)\n\t_getList: function() {\n\t\treturn this.element.find( \"ol,ul\" ).eq( 0 );\n\t},\n\n\t_createPanel: function( id ) {\n\t\treturn $( \"<div>\" )\n\t\t\t.attr( \"id\", id )\n\t\t\t.addClass( \"ui-tabs-panel ui-widget-content ui-corner-bottom\" )\n\t\t\t.data( \"ui-tabs-destroy\", true );\n\t},\n\n\t_setupDisabled: function( disabled ) {\n\t\tif ( $.isArray( disabled ) ) {\n\t\t\tif ( !disabled.length ) {\n\t\t\t\tdisabled = false;\n\t\t\t} else if ( disabled.length === this.anchors.length ) {\n\t\t\t\tdisabled = true;\n\t\t\t}\n\t\t}\n\n\t\t// disable tabs\n\t\tfor ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) {\n\t\t\tif ( disabled === true || $.inArray( i, disabled ) !== -1 ) {\n\t\t\t\t$( li )\n\t\t\t\t\t.addClass( \"ui-state-disabled\" )\n\t\t\t\t\t.attr( \"aria-disabled\", \"true\" );\n\t\t\t} else {\n\t\t\t\t$( li )\n\t\t\t\t\t.removeClass( \"ui-state-disabled\" )\n\t\t\t\t\t.removeAttr( \"aria-disabled\" );\n\t\t\t}\n\t\t}\n\n\t\tthis.options.disabled = disabled;\n\t},\n\n\t_setupEvents: function( event ) {\n\t\tvar events = {\n\t\t\tclick: function( event ) {\n\t\t\t\tevent.preventDefault();\n\t\t\t}\n\t\t};\n\t\tif ( event ) {\n\t\t\t$.each( event.split(\" \"), function( index, eventName ) {\n\t\t\t\tevents[ eventName ] = \"_eventHandler\";\n\t\t\t});\n\t\t}\n\n\t\tthis._off( this.anchors.add( this.tabs ).add( this.panels ) );\n\t\tthis._on( this.anchors, events );\n\t\tthis._on( this.tabs, { keydown: \"_tabKeydown\" } );\n\t\tthis._on( this.panels, { keydown: \"_panelKeydown\" } );\n\n\t\tthis._focusable( this.tabs );\n\t\tthis._hoverable( this.tabs );\n\t},\n\n\t_setupHeightStyle: function( heightStyle ) {\n\t\tvar maxHeight,\n\t\t\tparent = this.element.parent();\n\n\t\tif ( heightStyle === \"fill\" ) {\n\t\t\tmaxHeight = parent.height();\n\t\t\tmaxHeight -= this.element.outerHeight() - this.element.height();\n\n\t\t\tthis.element.siblings( \":visible\" ).each(function() {\n\t\t\t\tvar elem = $( this ),\n\t\t\t\t\tposition = elem.css( \"position\" );\n\n\t\t\t\tif ( position === \"absolute\" || position === \"fixed\" ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tmaxHeight -= elem.outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.element.children().not( this.panels ).each(function() {\n\t\t\t\tmaxHeight -= $( this ).outerHeight( true );\n\t\t\t});\n\n\t\t\tthis.panels.each(function() {\n\t\t\t\t$( this ).height( Math.max( 0, maxHeight -\n\t\t\t\t\t$( this ).innerHeight() + $( this ).height() ) );\n\t\t\t})\n\t\t\t.css( \"overflow\", \"auto\" );\n\t\t} else if ( heightStyle === \"auto\" ) {\n\t\t\tmaxHeight = 0;\n\t\t\tthis.panels.each(function() {\n\t\t\t\tmaxHeight = Math.max( maxHeight, $( this ).height( \"\" ).height() );\n\t\t\t}).height( maxHeight );\n\t\t}\n\t},\n\n\t_eventHandler: function( event ) {\n\t\tvar options = this.options,\n\t\t\tactive = this.active,\n\t\t\tanchor = $( event.currentTarget ),\n\t\t\ttab = anchor.closest( \"li\" ),\n\t\t\tclickedIsActive = tab[ 0 ] === active[ 0 ],\n\t\t\tcollapsing = clickedIsActive && options.collapsible,\n\t\t\ttoShow = collapsing ? $() : this._getPanelForTab( tab ),\n\t\t\ttoHide = !active.length ? $() : this._getPanelForTab( active ),\n\t\t\teventData = {\n\t\t\t\toldTab: active,\n\t\t\t\toldPanel: toHide,\n\t\t\t\tnewTab: collapsing ? $() : tab,\n\t\t\t\tnewPanel: toShow\n\t\t\t};\n\n\t\tevent.preventDefault();\n\n\t\tif ( tab.hasClass( \"ui-state-disabled\" ) ||\n\t\t\t\t// tab is already loading\n\t\t\t\ttab.hasClass( \"ui-tabs-loading\" ) ||\n\t\t\t\t// can't switch durning an animation\n\t\t\t\tthis.running ||\n\t\t\t\t// click on active header, but not collapsible\n\t\t\t\t( clickedIsActive && !options.collapsible ) ||\n\t\t\t\t// allow canceling activation\n\t\t\t\t( this._trigger( \"beforeActivate\", event, eventData ) === false ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\toptions.active = collapsing ? false : this.tabs.index( tab );\n\n\t\tthis.active = clickedIsActive ? $() : tab;\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tif ( !toHide.length && !toShow.length ) {\n\t\t\t$.error( \"jQuery UI Tabs: Mismatching fragment identifier.\" );\n\t\t}\n\n\t\tif ( toShow.length ) {\n\t\t\tthis.load( this.tabs.index( tab ), event );\n\t\t}\n\t\tthis._toggle( event, eventData );\n\t},\n\n\t// handles show/hide for selecting tabs\n\t_toggle: function( event, eventData ) {\n\t\tvar that = this,\n\t\t\ttoShow = eventData.newPanel,\n\t\t\ttoHide = eventData.oldPanel;\n\n\t\tthis.running = true;\n\n\t\tfunction complete() {\n\t\t\tthat.running = false;\n\t\t\tthat._trigger( \"activate\", event, eventData );\n\t\t}\n\n\t\tfunction show() {\n\t\t\teventData.newTab.closest( \"li\" ).addClass( \"ui-tabs-active ui-state-active\" );\n\n\t\t\tif ( toShow.length && that.options.show ) {\n\t\t\t\tthat._show( toShow, that.options.show, complete );\n\t\t\t} else {\n\t\t\t\ttoShow.show();\n\t\t\t\tcomplete();\n\t\t\t}\n\t\t}\n\n\t\t// start out by hiding, then showing, then completing\n\t\tif ( toHide.length && this.options.hide ) {\n\t\t\tthis._hide( toHide, this.options.hide, function() {\n\t\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\t\tshow();\n\t\t\t});\n\t\t} else {\n\t\t\teventData.oldTab.closest( \"li\" ).removeClass( \"ui-tabs-active ui-state-active\" );\n\t\t\ttoHide.hide();\n\t\t\tshow();\n\t\t}\n\n\t\ttoHide.attr({\n\t\t\t\"aria-expanded\": \"false\",\n\t\t\t\"aria-hidden\": \"true\"\n\t\t});\n\t\teventData.oldTab.attr( \"aria-selected\", \"false\" );\n\t\t// If we're switching tabs, remove the old tab from the tab order.\n\t\t// If we're opening from collapsed state, remove the previous tab from the tab order.\n\t\t// If we're collapsing, then keep the collapsing tab in the tab order.\n\t\tif ( toShow.length && toHide.length ) {\n\t\t\teventData.oldTab.attr( \"tabIndex\", -1 );\n\t\t} else if ( toShow.length ) {\n\t\t\tthis.tabs.filter(function() {\n\t\t\t\treturn $( this ).attr( \"tabIndex\" ) === 0;\n\t\t\t})\n\t\t\t.attr( \"tabIndex\", -1 );\n\t\t}\n\n\t\ttoShow.attr({\n\t\t\t\"aria-expanded\": \"true\",\n\t\t\t\"aria-hidden\": \"false\"\n\t\t});\n\t\teventData.newTab.attr({\n\t\t\t\"aria-selected\": \"true\",\n\t\t\ttabIndex: 0\n\t\t});\n\t},\n\n\t_activate: function( index ) {\n\t\tvar anchor,\n\t\t\tactive = this._findActive( index );\n\n\t\t// trying to activate the already active panel\n\t\tif ( active[ 0 ] === this.active[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// trying to collapse, simulate a click on the current active header\n\t\tif ( !active.length ) {\n\t\t\tactive = this.active;\n\t\t}\n\n\t\tanchor = active.find( \".ui-tabs-anchor\" )[ 0 ];\n\t\tthis._eventHandler({\n\t\t\ttarget: anchor,\n\t\t\tcurrentTarget: anchor,\n\t\t\tpreventDefault: $.noop\n\t\t});\n\t},\n\n\t_findActive: function( index ) {\n\t\treturn index === false ? $() : this.tabs.eq( index );\n\t},\n\n\t_getIndex: function( index ) {\n\t\t// meta-function to give users option to provide a href string instead of a numerical index.\n\t\tif ( typeof index === \"string\" ) {\n\t\t\tindex = this.anchors.index( this.anchors.filter( \"[href$='\" + index + \"']\" ) );\n\t\t}\n\n\t\treturn index;\n\t},\n\n\t_destroy: function() {\n\t\tif ( this.xhr ) {\n\t\t\tthis.xhr.abort();\n\t\t}\n\n\t\tthis.element.removeClass( \"ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible\" );\n\n\t\tthis.tablist\n\t\t\t.removeClass( \"ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all\" )\n\t\t\t.removeAttr( \"role\" );\n\n\t\tthis.anchors\n\t\t\t.removeClass( \"ui-tabs-anchor\" )\n\t\t\t.removeAttr( \"role\" )\n\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t.removeUniqueId();\n\n\t\tthis.tabs.add( this.panels ).each(function() {\n\t\t\tif ( $.data( this, \"ui-tabs-destroy\" ) ) {\n\t\t\t\t$( this ).remove();\n\t\t\t} else {\n\t\t\t\t$( this )\n\t\t\t\t\t.removeClass( \"ui-state-default ui-state-active ui-state-disabled \" +\n\t\t\t\t\t\t\"ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel\" )\n\t\t\t\t\t.removeAttr( \"tabIndex\" )\n\t\t\t\t\t.removeAttr( \"aria-live\" )\n\t\t\t\t\t.removeAttr( \"aria-busy\" )\n\t\t\t\t\t.removeAttr( \"aria-selected\" )\n\t\t\t\t\t.removeAttr( \"aria-labelledby\" )\n\t\t\t\t\t.removeAttr( \"aria-hidden\" )\n\t\t\t\t\t.removeAttr( \"aria-expanded\" )\n\t\t\t\t\t.removeAttr( \"role\" );\n\t\t\t}\n\t\t});\n\n\t\tthis.tabs.each(function() {\n\t\t\tvar li = $( this ),\n\t\t\t\tprev = li.data( \"ui-tabs-aria-controls\" );\n\t\t\tif ( prev ) {\n\t\t\t\tli\n\t\t\t\t\t.attr( \"aria-controls\", prev )\n\t\t\t\t\t.removeData( \"ui-tabs-aria-controls\" );\n\t\t\t} else {\n\t\t\t\tli.removeAttr( \"aria-controls\" );\n\t\t\t}\n\t\t});\n\n\t\tthis.panels.show();\n\n\t\tif ( this.options.heightStyle !== \"content\" ) {\n\t\t\tthis.panels.css( \"height\", \"\" );\n\t\t}\n\t},\n\n\tenable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = false;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.map( disabled, function( num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tdisabled = $.map( this.tabs, function( li, num ) {\n\t\t\t\t\treturn num !== index ? num : null;\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\tthis._setupDisabled( disabled );\n\t},\n\n\tdisable: function( index ) {\n\t\tvar disabled = this.options.disabled;\n\t\tif ( disabled === true ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( index === undefined ) {\n\t\t\tdisabled = true;\n\t\t} else {\n\t\t\tindex = this._getIndex( index );\n\t\t\tif ( $.inArray( index, disabled ) !== -1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $.isArray( disabled ) ) {\n\t\t\t\tdisabled = $.merge( [ index ], disabled ).sort();\n\t\t\t} else {\n\t\t\t\tdisabled = [ index ];\n\t\t\t}\n\t\t}\n\t\tthis._setupDisabled( disabled );\n\t},\n\n\tload: function( index, event ) {\n\t\tindex = this._getIndex( index );\n\t\tvar that = this,\n\t\t\ttab = this.tabs.eq( index ),\n\t\t\tanchor = tab.find( \".ui-tabs-anchor\" ),\n\t\t\tpanel = this._getPanelForTab( tab ),\n\t\t\teventData = {\n\t\t\t\ttab: tab,\n\t\t\t\tpanel: panel\n\t\t\t};\n\n\t\t// not remote\n\t\tif ( isLocal( anchor[ 0 ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );\n\n\t\t// support: jQuery <1.8\n\t\t// jQuery <1.8 returns false if the request is canceled in beforeSend,\n\t\t// but as of 1.8, $.ajax() always returns a jqXHR object.\n\t\tif ( this.xhr && this.xhr.statusText !== \"canceled\" ) {\n\t\t\ttab.addClass( \"ui-tabs-loading\" );\n\t\t\tpanel.attr( \"aria-busy\", \"true\" );\n\n\t\t\tthis.xhr\n\t\t\t\t.success(function( response ) {\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tpanel.html( response );\n\t\t\t\t\t\tthat._trigger( \"load\", event, eventData );\n\t\t\t\t\t}, 1 );\n\t\t\t\t})\n\t\t\t\t.complete(function( jqXHR, status ) {\n\t\t\t\t\t// support: jQuery <1.8\n\t\t\t\t\t// http://bugs.jquery.com/ticket/11778\n\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\tif ( status === \"abort\" ) {\n\t\t\t\t\t\t\tthat.panels.stop( false, true );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\ttab.removeClass( \"ui-tabs-loading\" );\n\t\t\t\t\t\tpanel.removeAttr( \"aria-busy\" );\n\n\t\t\t\t\t\tif ( jqXHR === that.xhr ) {\n\t\t\t\t\t\t\tdelete that.xhr;\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 1 );\n\t\t\t\t});\n\t\t}\n\t},\n\n\t_ajaxSettings: function( anchor, event, eventData ) {\n\t\tvar that = this;\n\t\treturn {\n\t\t\turl: anchor.attr( \"href\" ),\n\t\t\tbeforeSend: function( jqXHR, settings ) {\n\t\t\t\treturn that._trigger( \"beforeLoad\", event,\n\t\t\t\t\t$.extend( { jqXHR : jqXHR, ajaxSettings: settings }, eventData ) );\n\t\t\t}\n\t\t};\n\t},\n\n\t_getPanelForTab: function( tab ) {\n\t\tvar id = $( tab ).attr( \"aria-controls\" );\n\t\treturn this.element.find( this._sanitizeSelector( \"#\" + id ) );\n\t}\n});\n\n})( jQuery );\n\n(function( $ ) {\n\nvar increments = 0;\n\nfunction addDescribedBy( elem, id ) {\n\tvar describedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ );\n\tdescribedby.push( id );\n\telem\n\t\t.data( \"ui-tooltip-id\", id )\n\t\t.attr( \"aria-describedby\", $.trim( describedby.join( \" \" ) ) );\n}\n\nfunction removeDescribedBy( elem ) {\n\tvar id = elem.data( \"ui-tooltip-id\" ),\n\t\tdescribedby = (elem.attr( \"aria-describedby\" ) || \"\").split( /\\s+/ ),\n\t\tindex = $.inArray( id, describedby );\n\tif ( index !== -1 ) {\n\t\tdescribedby.splice( index, 1 );\n\t}\n\n\telem.removeData( \"ui-tooltip-id\" );\n\tdescribedby = $.trim( describedby.join( \" \" ) );\n\tif ( describedby ) {\n\t\telem.attr( \"aria-describedby\", describedby );\n\t} else {\n\t\telem.removeAttr( \"aria-describedby\" );\n\t}\n}\n\n$.widget( \"ui.tooltip\", {\n\tversion: \"1.10.3\",\n\toptions: {\n\t\tcontent: function() {\n\t\t\t// support: IE<9, Opera in jQuery <1.7\n\t\t\t// .text() can't accept undefined, so coerce to a string\n\t\t\tvar title = $( this ).attr( \"title\" ) || \"\";\n\t\t\t// Escape title, since we're going from an attribute to raw HTML\n\t\t\treturn $( \"<a>\" ).text( title ).html();\n\t\t},\n\t\thide: true,\n\t\t// Disabled elements have inconsistent behavior across browsers (#8661)\n\t\titems: \"[title]:not([disabled])\",\n\t\tposition: {\n\t\t\tmy: \"left top+15\",\n\t\t\tat: \"left bottom\",\n\t\t\tcollision: \"flipfit flip\"\n\t\t},\n\t\tshow: true,\n\t\ttooltipClass: null,\n\t\ttrack: false,\n\n\t\t// callbacks\n\t\tclose: null,\n\t\topen: null\n\t},\n\n\t_create: function() {\n\t\tthis._on({\n\t\t\tmouseover: \"open\",\n\t\t\tfocusin: \"open\"\n\t\t});\n\n\t\t// IDs of generated tooltips, needed for destroy\n\t\tthis.tooltips = {};\n\t\t// IDs of parent tooltips where we removed the title attribute\n\t\tthis.parents = {};\n\n\t\tif ( this.options.disabled ) {\n\t\t\tthis._disable();\n\t\t}\n\t},\n\n\t_setOption: function( key, value ) {\n\t\tvar that = this;\n\n\t\tif ( key === \"disabled\" ) {\n\t\t\tthis[ value ? \"_disable\" : \"_enable\" ]();\n\t\t\tthis.options[ key ] = value;\n\t\t\t// disable element style changes\n\t\t\treturn;\n\t\t}\n\n\t\tthis._super( key, value );\n\n\t\tif ( key === \"content\" ) {\n\t\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\t\tthat._updateContent( element );\n\t\t\t});\n\t\t}\n\t},\n\n\t_disable: function() {\n\t\tvar that = this;\n\n\t\t// close open tooltips\n\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\tvar event = $.Event( \"blur\" );\n\t\t\tevent.target = event.currentTarget = element[0];\n\t\t\tthat.close( event, true );\n\t\t});\n\n\t\t// remove title attributes to prevent native tooltips\n\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.is( \"[title]\" ) ) {\n\t\t\t\telement\n\t\t\t\t\t.data( \"ui-tooltip-title\", element.attr( \"title\" ) )\n\t\t\t\t\t.attr( \"title\", \"\" );\n\t\t\t}\n\t\t});\n\t},\n\n\t_enable: function() {\n\t\t// restore title attributes\n\t\tthis.element.find( this.options.items ).addBack().each(function() {\n\t\t\tvar element = $( this );\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t}\n\t\t});\n\t},\n\n\topen: function( event ) {\n\t\tvar that = this,\n\t\t\ttarget = $( event ? event.target : this.element )\n\t\t\t\t// we need closest here due to mouseover bubbling,\n\t\t\t\t// but always pointing at the same event target\n\t\t\t\t.closest( this.options.items );\n\n\t\t// No element to show a tooltip for or the tooltip is already open\n\t\tif ( !target.length || target.data( \"ui-tooltip-id\" ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( target.attr( \"title\" ) ) {\n\t\t\ttarget.data( \"ui-tooltip-title\", target.attr( \"title\" ) );\n\t\t}\n\n\t\ttarget.data( \"ui-tooltip-open\", true );\n\n\t\t// kill parent tooltips, custom or native, for hover\n\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\ttarget.parents().each(function() {\n\t\t\t\tvar parent = $( this ),\n\t\t\t\t\tblurEvent;\n\t\t\t\tif ( parent.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\t\tblurEvent = $.Event( \"blur\" );\n\t\t\t\t\tblurEvent.target = blurEvent.currentTarget = this;\n\t\t\t\t\tthat.close( blurEvent, true );\n\t\t\t\t}\n\t\t\t\tif ( parent.attr( \"title\" ) ) {\n\t\t\t\t\tparent.uniqueId();\n\t\t\t\t\tthat.parents[ this.id ] = {\n\t\t\t\t\t\telement: this,\n\t\t\t\t\t\ttitle: parent.attr( \"title\" )\n\t\t\t\t\t};\n\t\t\t\t\tparent.attr( \"title\", \"\" );\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tthis._updateContent( target, event );\n\t},\n\n\t_updateContent: function( target, event ) {\n\t\tvar content,\n\t\t\tcontentOption = this.options.content,\n\t\t\tthat = this,\n\t\t\teventType = event ? event.type : null;\n\n\t\tif ( typeof contentOption === \"string\" ) {\n\t\t\treturn this._open( event, target, contentOption );\n\t\t}\n\n\t\tcontent = contentOption.call( target[0], function( response ) {\n\t\t\t// ignore async response if tooltip was closed already\n\t\t\tif ( !target.data( \"ui-tooltip-open\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// IE may instantly serve a cached response for ajax requests\n\t\t\t// delay this call to _open so the other call to _open runs first\n\t\t\tthat._delay(function() {\n\t\t\t\t// jQuery creates a special event for focusin when it doesn't\n\t\t\t\t// exist natively. To improve performance, the native event\n\t\t\t\t// object is reused and the type is changed. Therefore, we can't\n\t\t\t\t// rely on the type being correct after the event finished\n\t\t\t\t// bubbling, so we set it back to the previous value. (#8740)\n\t\t\t\tif ( event ) {\n\t\t\t\t\tevent.type = eventType;\n\t\t\t\t}\n\t\t\t\tthis._open( event, target, response );\n\t\t\t});\n\t\t});\n\t\tif ( content ) {\n\t\t\tthis._open( event, target, content );\n\t\t}\n\t},\n\n\t_open: function( event, target, content ) {\n\t\tvar tooltip, events, delayedShow,\n\t\t\tpositionOption = $.extend( {}, this.options.position );\n\n\t\tif ( !content ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Content can be updated multiple times. If the tooltip already\n\t\t// exists, then just update the content and bail.\n\t\ttooltip = this._find( target );\n\t\tif ( tooltip.length ) {\n\t\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\t\t\treturn;\n\t\t}\n\n\t\t// if we have a title, clear it to prevent the native tooltip\n\t\t// we have to check first to avoid defining a title if none exists\n\t\t// (we don't want to cause an element to start matching [title])\n\t\t//\n\t\t// We use removeAttr only for key events, to allow IE to export the correct\n\t\t// accessible attributes. For mouse events, set to empty string to avoid\n\t\t// native tooltip showing up (happens only when removing inside mouseover).\n\t\tif ( target.is( \"[title]\" ) ) {\n\t\t\tif ( event && event.type === \"mouseover\" ) {\n\t\t\t\ttarget.attr( \"title\", \"\" );\n\t\t\t} else {\n\t\t\t\ttarget.removeAttr( \"title\" );\n\t\t\t}\n\t\t}\n\n\t\ttooltip = this._tooltip( target );\n\t\taddDescribedBy( target, tooltip.attr( \"id\" ) );\n\t\ttooltip.find( \".ui-tooltip-content\" ).html( content );\n\n\t\tfunction position( event ) {\n\t\t\tpositionOption.of = event;\n\t\t\tif ( tooltip.is( \":hidden\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttooltip.position( positionOption );\n\t\t}\n\t\tif ( this.options.track && event && /^mouse/.test( event.type ) ) {\n\t\t\tthis._on( this.document, {\n\t\t\t\tmousemove: position\n\t\t\t});\n\t\t\t// trigger once to override element-relative positioning\n\t\t\tposition( event );\n\t\t} else {\n\t\t\ttooltip.position( $.extend({\n\t\t\t\tof: target\n\t\t\t}, this.options.position ) );\n\t\t}\n\n\t\ttooltip.hide();\n\n\t\tthis._show( tooltip, this.options.show );\n\t\t// Handle tracking tooltips that are shown with a delay (#8644). As soon\n\t\t// as the tooltip is visible, position the tooltip using the most recent\n\t\t// event.\n\t\tif ( this.options.show && this.options.show.delay ) {\n\t\t\tdelayedShow = this.delayedShow = setInterval(function() {\n\t\t\t\tif ( tooltip.is( \":visible\" ) ) {\n\t\t\t\t\tposition( positionOption.of );\n\t\t\t\t\tclearInterval( delayedShow );\n\t\t\t\t}\n\t\t\t}, $.fx.interval );\n\t\t}\n\n\t\tthis._trigger( \"open\", event, { tooltip: tooltip } );\n\n\t\tevents = {\n\t\t\tkeyup: function( event ) {\n\t\t\t\tif ( event.keyCode === $.ui.keyCode.ESCAPE ) {\n\t\t\t\t\tvar fakeEvent = $.Event(event);\n\t\t\t\t\tfakeEvent.currentTarget = target[0];\n\t\t\t\t\tthis.close( fakeEvent, true );\n\t\t\t\t}\n\t\t\t},\n\t\t\tremove: function() {\n\t\t\t\tthis._removeTooltip( tooltip );\n\t\t\t}\n\t\t};\n\t\tif ( !event || event.type === \"mouseover\" ) {\n\t\t\tevents.mouseleave = \"close\";\n\t\t}\n\t\tif ( !event || event.type === \"focusin\" ) {\n\t\t\tevents.focusout = \"close\";\n\t\t}\n\t\tthis._on( true, target, events );\n\t},\n\n\tclose: function( event ) {\n\t\tvar that = this,\n\t\t\ttarget = $( event ? event.currentTarget : this.element ),\n\t\t\ttooltip = this._find( target );\n\n\t\t// disabling closes the tooltip, so we need to track when we're closing\n\t\t// to avoid an infinite loop in case the tooltip becomes disabled on close\n\t\tif ( this.closing ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Clear the interval for delayed tracking tooltips\n\t\tclearInterval( this.delayedShow );\n\n\t\t// only set title if we had one before (see comment in _open())\n\t\tif ( target.data( \"ui-tooltip-title\" ) ) {\n\t\t\ttarget.attr( \"title\", target.data( \"ui-tooltip-title\" ) );\n\t\t}\n\n\t\tremoveDescribedBy( target );\n\n\t\ttooltip.stop( true );\n\t\tthis._hide( tooltip, this.options.hide, function() {\n\t\t\tthat._removeTooltip( $( this ) );\n\t\t});\n\n\t\ttarget.removeData( \"ui-tooltip-open\" );\n\t\tthis._off( target, \"mouseleave focusout keyup\" );\n\t\t// Remove 'remove' binding only on delegated targets\n\t\tif ( target[0] !== this.element[0] ) {\n\t\t\tthis._off( target, \"remove\" );\n\t\t}\n\t\tthis._off( this.document, \"mousemove\" );\n\n\t\tif ( event && event.type === \"mouseleave\" ) {\n\t\t\t$.each( this.parents, function( id, parent ) {\n\t\t\t\t$( parent.element ).attr( \"title\", parent.title );\n\t\t\t\tdelete that.parents[ id ];\n\t\t\t});\n\t\t}\n\n\t\tthis.closing = true;\n\t\tthis._trigger( \"close\", event, { tooltip: tooltip } );\n\t\tthis.closing = false;\n\t},\n\n\t_tooltip: function( element ) {\n\t\tvar id = \"ui-tooltip-\" + increments++,\n\t\t\ttooltip = $( \"<div>\" )\n\t\t\t\t.attr({\n\t\t\t\t\tid: id,\n\t\t\t\t\trole: \"tooltip\"\n\t\t\t\t})\n\t\t\t\t.addClass( \"ui-tooltip ui-widget ui-corner-all ui-widget-content \" +\n\t\t\t\t\t( this.options.tooltipClass || \"\" ) );\n\t\t$( \"<div>\" )\n\t\t\t.addClass( \"ui-tooltip-content\" )\n\t\t\t.appendTo( tooltip );\n\t\ttooltip.appendTo( this.document[0].body );\n\t\tthis.tooltips[ id ] = element;\n\t\treturn tooltip;\n\t},\n\n\t_find: function( target ) {\n\t\tvar id = target.data( \"ui-tooltip-id\" );\n\t\treturn id ? $( \"#\" + id ) : $();\n\t},\n\n\t_removeTooltip: function( tooltip ) {\n\t\ttooltip.remove();\n\t\tdelete this.tooltips[ tooltip.attr( \"id\" ) ];\n\t},\n\n\t_destroy: function() {\n\t\tvar that = this;\n\n\t\t// close open tooltips\n\t\t$.each( this.tooltips, function( id, element ) {\n\t\t\t// Delegate to close method to handle common cleanup\n\t\t\tvar event = $.Event( \"blur\" );\n\t\t\tevent.target = event.currentTarget = element[0];\n\t\t\tthat.close( event, true );\n\n\t\t\t// Remove immediately; destroying an open tooltip doesn't use the\n\t\t\t// hide animation\n\t\t\t$( \"#\" + id ).remove();\n\n\t\t\t// Restore the title\n\t\t\tif ( element.data( \"ui-tooltip-title\" ) ) {\n\t\t\t\telement.attr( \"title\", element.data( \"ui-tooltip-title\" ) );\n\t\t\t\telement.removeData( \"ui-tooltip-title\" );\n\t\t\t}\n\t\t});\n\t}\n});\n\n}( jQuery ) );\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/jquery-ui/jquery-ui.js\n// module id = 33\n// module chunks = 5"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/reacttst.js b/test-html/js/reacttst.js
index f1c168ec12dcc376f865a396562ee155b81d69c8..24b125d22b153aa0c0da13d1fc40c20322ae51dc 100644
--- a/test-html/js/reacttst.js
+++ b/test-html/js/reacttst.js
@@ -1,2 +1,69 @@
-!function(r){function t(o){if(e[o])return e[o].exports;var n=e[o]={exports:{},id:o,loaded:!1};return r[o].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var e={};return t.m=r,t.c=e,t.p="",t(0)}([function(r,t){}]);
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!********************************!*\
+  !*** ./dist/_test/reacttst.js ***!
+  \********************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 9/22/2016.
+	 */
+	// import * as React from "react";
+	// import * as ReactDOM from "react/lib/";
+	//
+	// import { Hello } from "../_scratch/Hello";
+	//
+	// console.log('I am in a tsx file for some reason');
+	//
+	// ReactDOM.render(
+	//     <Hello compiler="TypeScript" framework="React" />,
+	//     document.getElementById("example")
+	// );
+	//
+
+
+/***/ }
+/******/ ]);
 //# sourceMappingURL=reacttst.js.map
\ No newline at end of file
diff --git a/test-html/js/reacttst.js.map b/test-html/js/reacttst.js.map
index 1137103334e5ade9a341bac38dc11f872289bfe3..16b0cf31b60290791d7668a1ed03e3d2eb7b8614 100644
--- a/test-html/js/reacttst.js.map
+++ b/test-html/js/reacttst.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///reacttst.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457******"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAQ,EAAAT,EAGAC,EAAAS,EAAAP,EAGAF,EAAAU,EAAA,GAGAV,EAAA,KDMM,SAASI,EAAQD","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 9/22/2016.\r\n\t */\r\n\t// import * as React from \"react\";\r\n\t// import * as ReactDOM from \"react/lib/\";\r\n\t//\r\n\t// import { Hello } from \"../_scratch/Hello\";\r\n\t//\r\n\t// console.log('I am in a tsx file for some reason');\r\n\t//\r\n\t// ReactDOM.render(\r\n\t//     <Hello compiler=\"TypeScript\" framework=\"React\" />,\r\n\t//     document.getElementById(\"example\")\r\n\t// );\r\n\t//\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap 6e5b1af915babfe1fe92?33e6*****","webpack:///./src/_test/reacttst.tsx"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;ACtCA;;IAEG;AAEH,mCAAkC;AAClC,2CAA0C;AAC1C,GAAE;AACF,8CAA6C;AAC7C,GAAE;AACF,sDAAqD;AACrD,GAAE;AACF,oBAAmB;AACnB,0DAAyD;AACzD,0CAAyC;AACzC,MAAK;AACL,GAAE","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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6e5b1af915babfe1fe92","/**\r\n * Created by gavorhes on 9/22/2016.\r\n */\r\n\r\n// import * as React from \"react\";\r\n// import * as ReactDOM from \"react/lib/\";\r\n//\r\n// import { Hello } from \"../_scratch/Hello\";\r\n//\r\n// console.log('I am in a tsx file for some reason');\r\n//\r\n// ReactDOM.render(\r\n//     <Hello compiler=\"TypeScript\" framework=\"React\" />,\r\n//     document.getElementById(\"example\")\r\n// );\r\n//\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/_test/reacttst.tsx"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/simple_map.js b/test-html/js/simple_map.js
index 425d9b99e81cdd956b00e15f66a6b34472bb4c74..3941777902cbea464d37c6c6a72361a1dc217684 100644
--- a/test-html/js/simple_map.js
+++ b/test-html/js/simple_map.js
@@ -1,3 +1,2451 @@
-!function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){"use strict";var n=o(12),r=o(16),i=o(17),l=n.quickMap(),a=new r.LayerEsriMapServer("http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer"),p=new r.LayerEsriMapServer("http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer",{name:"Six Year Plan",legendCollapse:!0});l.addLayer(a.olLayer),l.addLayer(p.olLayer);var s=[a,p];new i.default(s,"legend-container",{})},function(e,t){"use strict";function o(e){"undefined"==typeof window.gv&&(window.gv={});for(var t=e.split("."),o=window.gv,n=0;n<t.length;n++){var r=o[t[n]];"undefined"==typeof r&&(o[t[n]]={}),o=o[t[n]]}return o}o("util"),window.gv.util.provide=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o},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,o="x"==e?t:3&t|8;return o.toString(16)})}var r=o(1),i=r.default("util");i.makeGuid=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";var n=o(11);t.mapPopup=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapPopup},function(e,t,o){"use strict";var n=o(1),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,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,o){"use strict";var n=o(10);t.mapMove=new n.default,Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.mapMove},function(e,t,o){"use strict";var n=o(14),r=o(1),i=o(4),l=o(2),a=r.default("layers"),p=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),"undefined"!=typeof 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="");var t=e.indexOf("<ul>")>-1;t&&(e='<span class="legend-items-expander" title="Expand/Collapse">&#9660;</span>'+e),this._legendContent+=e,this._$legendDiv=l("#"+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=l("#"+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=l(this);e.siblings("ul").slideToggle(),e.hasClass("legend-layer-group-collapsed")?(e.removeClass("legend-layer-group-collapsed"),e.html("&#9660;")):(e.addClass("legend-layer-group-collapsed"),e.html("&#9654;"))}),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=p,a.LayerBase=p,Object.defineProperty(t,"__esModule",{value:!0}),t.default=p},function(e,t,o){"use strict";function n(e){return"undefined"==typeof e||null===e}function r(e){return!n(e)}var i=o(1),l=i.default("util.checkDefined");t.undefinedOrNull=n,l.undefinedOrNull=n,t.definedAndNotNull=r,l.definedAndNotNull=r},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),i=o(9),l=o(1),a=o(4),p=o(2),s=l.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]=p.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("undefined"==typeof e&&"undefined"==typeof 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,l=function(){null!==n?r.call(n,i._mapExtent,i._zoomLevel,t):r(i._mapExtent,i._zoomLevel,t)};this._mapMoveCallbackTimeout[e]=setTimeout(l,this._mapMoveCallbackDelays[e])},t.prototype.addVectorLayer=function(e,t){return void 0===t&&(t=!0),this._arrLayer.indexOf(e)>-1?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(t&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerLyrLoad(e,this._arrLayer.length-1))))},t.prototype.addCallback=function(e,t,o,n,r){return this._mapMoveCallbacks.indexOf(e)>-1?void console.log("this function already added to map move"):(this._checkInit(),r||(r=a.default()),this._mapMoveCallbacks.push(e),this._mapMoveCallbacksLookup[r]=r,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(n&&(void 0===this._mapExtent&&this._updateMapExtent(),this.triggerMoveCallback(this._mapMoveCallbacks.length-1))))},t}(r.default);t.MapMoveCls=u,s.MapMoveCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(6),i=o(1),l=o(3),a=o(2),p=i.default("olHelpers"),s=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=s;var u=function(e){function t(){var t=e.call(this,"map popup")||this;return t._arrPopupLayerIds=[],t._arrPopupLayerNames=[],t._arrPopupLayers=[],t._arrPopupOlLayers=[],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=a("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 l.easing.inAndOut(e)};return this._popupOverlay=new l.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 l=o._featuresAtPixel(e.pixel);o._passThroughLayerFeatureArray=[],o._currentPopupIndex=-1;for(var a=0;a<l.length;a++){var p=l[a],s=p.feature.getProperties(),u=o._arrPopupContentFunction[p.layerIndex](s,o._$popupContent);u===!1||("string"==typeof u?(p.popupContent=u,o._passThroughLayerFeatureArray.push(p)):p.selectionLayer.getSource().addFeature(p.feature))}o._popupContentLength=o._passThroughLayerFeatureArray.length,o._currentPopupIndex=-1;var d='<div class="ol-popup-nav">';d+='<span class="previous-popup ol-popup-nav-arrow">&#9664;</span>',d+='<span class="next-popup ol-popup-nav-arrow">&#9654;</span>',d+='<span class="current-popup-item-number" style="font-weight: bold;"></span>',d+="<span>&nbsp;of&nbsp;</span>",d+='<span class="popup-content-length" style="font-weight: bold;">'+o._popupContentLength+"</span>",d+="<span>&nbsp;&nbsp;-&nbsp;&nbsp;</span>",d+='<span class="current-popup-layer-name"></span>',d+="</div>",d+='<div class="ol-popup-inner">',d+="</div>",o._$popupContent.html(d),o._$popupContent.find(".previous-popup").click(function(){1!=o._popupContentLength&&(0==o._currentPopupIndex?o._currentPopupIndex=o._popupContentLength-1:o._currentPopupIndex--,o._triggerFeatSelect())});var c=o._$popupContent.find(".next-popup");c.click(function(){1==o._popupContentLength&&o._currentPopupIndex>-1||(o._currentPopupIndex==o._popupContentLength-1?o._currentPopupIndex=0:o._currentPopupIndex++,o._triggerFeatSelect())}),o._popupContentLength>0&&(c.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=o.map.hasFeatureAtPixel(t,function(e){for(var t=0,n=o._arrPopupOlLayers;t<n.length;t++){var r=n[t];if(e==r)return!0}return!1}),r=o.map.getTargetElement();r.style.cursor=n?"pointer":""}}),!0},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++){var l=i[r];l(this._$popupContent)}},t.prototype.addMapServicePopupContent=function(e,t,o,n){var r=new s(e,t,this._popupContentLength,this._selectionLayerLookup[t.id],n);r.popupContent=o,this._passThroughLayerFeatureArray.push(r),this._popupContentLength++,a(".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=t._arrPopupOlLayers.indexOf(n);r>-1&&o.push(new s(e,t._arrPopupLayers[r],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 l.style.Style({stroke:new l.style.Stroke({color:t.color,width:t.width}),image:new l.style.Circle({radius:7,fill:new l.style.Fill({color:t.color}),stroke:new l.style.Stroke({color:t.color,width:1})}),fill:new l.style.Fill({color:t.color})});var n=new l.layer.Vector({source:new l.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._arrPopupLayerNames.push(e.name),this._arrPopupLayers.push(e),this._arrPopupOlLayers.push(e.olLayer),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._arrPopupLayerNames.splice(t,1),this._arrPopupLayers.splice(t,1),this._arrPopupOlLayers.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++){var n=o[t];n()}},t.prototype.addMapClickFunction=function(e){this._mapClickFunctions.push(e)},t}(r.default);t.MapPopupCls=u,p.MapPopupCls=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},function(e,t,o){"use strict";function n(e){var t=r.quickMapBase(e);return l.default.init(t),a.default.init(t),t}var r=o(13),i=o(1),l=o(7),a=o(5),p=i.default("olHelpers");t.quickMap=n,p.quickMap=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";function n(e){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;var t=l("#"+e.divId);t.css("position","relative");var o=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 n=new i.geom.Point([e.center.x,e.center.y]);new i.proj.Projection({code:"EPSG:4326"}),n.transform(new i.proj.Projection({code:"EPSG:4326"}),new i.proj.Projection({code:"EPSG:3857"}));var r=n.getCoordinates();e.center.x=r[0],e.center.y=r[1]}var a=i.control.defaults({attributionOptions:{collapsible:!1}}),p=new i.View({center:[e.center.x,e.center.y],zoom:e.zoom,minZoom:e.minZoom,maxZoom:e.maxZoom}),s=new i.Map({layers:[o],target:e.divId,controls:a,view:p});return e.fullScreen&&s.addControl(new i.control.FullScreen({})),s}var r=o(1),i=o(3),l=o(2),a=r.default("olHelpers");t.quickMapBase=n,a.quickMapBase=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n},function(e,t,o){"use strict";function n(e){return"number"==typeof e?e%1===0&&e>=0&&e<=28?a[e]:void console.log("invalid zoom level provided: "+e):void 0}function r(e){for(var t=0;t<a.length;t++)if(e>=a[t])return t;return 0}var i=o(1),l=i.default("olHelpers.zoomResolutionConvert"),a=[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,l.zoomToResolution=n,t.resolutionToZoom=r,l.resolutionToZoom=r},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,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}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 l(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">&#9660;</span>'),i+="<ul>";for(var l=0;l<n.length;l++)i+="<li>",i+='<span class="legend-layer-subitem">'+r(n[l].label)+"</span>",i+='<img class="legend-layer-icon" height="17" src="data:image/png;base64,'+n[l].imageData+'">',i+="</li>";i+="</ul>"}return t||(i='<span class="legend-layer-subitem">'+o+"</span>"+i),i}function a(e){var t="",o=e.layers;if(1==o.length)t+=l(o[0],!0);else{t+="<ul>";for(var n=0;n<o.length;n++)t+="<li>"+l(o[n])+"</li>";t+="</ul>"}return t}var p=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},s=o(1),u=o(3),d=s.default("olHelpers.esriToOlStyle");d.htmlEscape=r;var c=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),l=n(r.symbolObj.outline.color,r.opacity),a=r.symbolObj.outline.width,p=r.symbolObj.size;r.olStyle=new u.style.Style({image:new u.style.Circle({radius:p,fill:new u.style.Fill({color:i}),stroke:new u.style.Stroke({color:l,width:a})})}),r.legendHtml='<span class="legend-layer-icon" style="color: '+i+'">&#9679;</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 p(t,e),t}(c),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),l=r.symbolObj.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:i,width:l})}),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 p(t,e),t}(c),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),l=n(r.symbolObj.outline.color,r.opacity),a=r.symbolObj.outline.width;r.olStyle=new u.style.Style({stroke:new u.style.Stroke({color:l,width:a}),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 "+l+" 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 p(t,e),t}(c),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 p(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 l=0,a=n.uniqueValueInfos;l<a.length;l++){var p=a[l];n.labelArray.push(p.label),n.valueArray.push(p.value);var s=new o(p.symbol,n.opacity);n.legendArray.push('<span class="legend-layer-subitem">'+r(p.label)+"</span>"+s.legendHtml),n.propertyStyleLookup[p.value]=s.olStyle}n.olStyle=function(e){var t,o=e.getProperties(),r=o[n.propertyName];return t=void 0!==n.propertyStyleLookup[r]?[n.propertyStyleLookup[r]]:[n.defaultStyle]},null!==n.defaultLabelHtml&&n.legendArray.push(n.defaultLabelHtml),n.legendHtml="<ul>";for(var u=0,d=n.legendArray;u<d.length;u++){var c=d[u];n.legendHtml+="<li>"+c+"</li>"}return n.legendHtml+="</ul>",n}return p(t,e),t}(g);t.makeFeatureServiceLegendAndSymbol=i,d.makeFeatureServiceLegendAndSymbol=i,t.makeMapServiceLegend=a,d.makeMapServiceLegend=a},function(e,t,o){"use strict";var n=this&&this.__extends||function(e,t){function o(){this.constructor=e}for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},r=o(8),i=o(15),l=o(5),a=o(1),p=o(3),s=o(2),u=a.default("layers"),d=function(e){function t(t,o){void 0===o&&(o={});var n=e.call(this,t,o)||this;return n._source=new p.source.TileArcGISRest({url:""==n.url?void 0:n.url,params:"undefined"==typeof o.showLayers?void 0:{layers:"show:"+o.showLayers.join(",")}}),n._olLayer=new p.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 p.format.EsriJSON,n._popupRequest=null,n.addLegendContent(),o.addPopup&&l.default.addMapServicePopup(n),n}return n(t,e),t.prototype.addLegendContent=function(t){var o=this,n=this.url;"/"!==n[n.length-1]&&(n+="/"),n+="legend?f=pjson&callback=?",s.get(n,{},function(t){var n=i.makeMapServiceLegend(t);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=s.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 p=r.attributes[a];if(null==p||"null"==p.toString().toLowerCase())continue;var s=a;s.length>14&&(s=s.slice(0,11)+"..."),i+="<tr><td>"+s+"</td><td>"+p+"</td></tr>"}i+="</table>",l.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}(r.LayerBase);t.LayerEsriMapServer=d,u.LayerEsriMapServer=d,Object.defineProperty(t,"__esModule",{value:!0}),t.default=d},function(e,t,o){"use strict";var n=o(1),r=o(4),i=o(7),l=n.default("collections"),a=o(2),p=function(){function e(e,t){this.groupLayers=[],this.groupLayersLookup={},this.groupGroups=[],this.groupGroupsLookup={},this.itemIdArray=[],"undefined"==typeof 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 l=t.groupGroupsLookup[r];n+="<li>",n+='<div id="'+l.groupId+'-legend-layer-div" '+('class="legend-layer-group  '+o.join(" ")+'">'),n+=l.addCheck?'<input type="checkbox" checked id="'+l.groupId+'-group-chck">'+('<label for="'+l.groupId+'-group-chck" title="Click arrow to expand or collapse">'+l.groupName+"</label>"):'<label title="Click arrow to expand or collapse">'+l.groupName+"</label>",n+='<span title="Expand/Collapse" class="layer-group-expander',n+=(l.collapse?" legend-layer-group-initial-collapse":"")+'">',n+=l.collapse?"&#9654;":"&#9660;",n+="</span>",n+="<ul>"+this._buildLegend(l.itemIdArray,l,o)+"</ul>",n+="</div>",n+="</li>"}return n+this._buildLegend(e.slice(1),t,o)},e}(),s=function(){function e(e,t,o){for(var n=0,l=e;n<l.length;n++){var s=l[n];if("undefined"==typeof s)throw"undefined item passed in array to legend constructor"}o=o||{},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=a("#"+t),this._legendItems=e,this.layerGroup=new p,this._buildTree(e),this.legendId=r.default(),this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId,o));for(var u=0,d=this.layerGroup.allLayerArray;u<d.length;u++){var c=d[u];c.applyCollapse()}var y=this;o.scaleDependent&&(i.default.checkInit(),i.default.addCallback(function(e,t,o){if("undefined"==typeof o||"change:resolution"==o)for(var n=0,r=this.layerGroup.allLayerArray;n<r.length;n++){var i=r[n],l=a("#"+i.id+"-layer-li");t>i.maxZoom||t<i.minZoom?l.addClass("layer-not-visible"):l.removeClass("layer-not-visible")}},this,100,!0,"legend1")),this.$divElement.find(".suppress-by-extent").change(function(){var e=a(".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","");y.layerGroup.allLayerLookup[e].visible=this.checked}),this.$divElement.find(".legend-layer-group > input[type=checkbox]").change(function(){a(this).siblings("ul").find("input[type=checkbox]").prop("checked",this.checked).trigger("change")}),this.$divElement.find(".layer-group-expander").click(function(){var e=a(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("&#9660;")):(e.addClass("legend-layer-group-collapsed"),e.html("&#9654;"))}),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||"undefined"==typeof t)&&(t=[]),"undefined"!=typeof o.groupName){var n=e[0],r=this.layerGroup.addGroup(n,t);t.push(r.groupId),this._buildTree(n.items,t)}else{var i=e[0];this.layerGroup.addLegendLayer(i,t)}this._buildTree(e.slice(1),t)}},e}();l.LayerLegend=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s}]);
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/*!**********************************!*\
+  !*** ./dist/_test/simple_map.js ***!
+  \**********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 9/23/2016.
+	 */
+	var quickMap_1 = __webpack_require__(/*! ../olHelpers/quickMap */ 1);
+	var LayerEsriMapServer_1 = __webpack_require__(/*! ../layers/LayerEsriMapServer */ 24);
+	var LayerLegend_1 = __webpack_require__(/*! ../collections/LayerLegend */ 31);
+	var map = quickMap_1.quickMap();
+	var wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');
+	var sixYearPlan = new LayerEsriMapServer_1.LayerEsriMapServer('http://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
+	];
+	var legend = new LayerLegend_1.default(layerArray, 'legend-container', {});
+
+
+/***/ },
+/* 1 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/quickMap.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var quickMapBase_1 = __webpack_require__(/*! ./quickMapBase */ 2);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var mapMove_1 = __webpack_require__(/*! ./mapMove */ 6);
+	var mapPopup_1 = __webpack_require__(/*! ./mapPopup */ 11);
+	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) {
+	    var m = quickMapBase_1.quickMapBase(options);
+	    mapMove_1.default.init(m);
+	    mapPopup_1.default.init(m);
+	    return m;
+	}
+	exports.quickMap = quickMap;
+	nm.quickMap = quickMap;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMap;
+
+
+/***/ },
+/* 2 */
+/*!****************************************!*\
+  !*** ./dist/olHelpers/quickMapBase.js ***!
+  \****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/15/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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) {
+	    options = 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;
+	    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+3hmdd2jWUw4scxNys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yCY3iEaHyIYn+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/L6xL7lUZEXBEHkuZqlS6gEAU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XnbRNC7yqueNsJCCIiXzdQhnaGN+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) {
+	    }
+	    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({}));
+	    }
+	    return map;
+	}
+	exports.quickMapBase = quickMapBase;
+	nm.quickMapBase = quickMapBase;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = quickMapBase;
+
+
+/***/ },
+/* 3 */
+/*!******************************!*\
+  !*** ./dist/util/provide.js ***!
+  \******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = provide;
+
+
+/***/ },
+/* 4 */
+/*!*********************!*\
+  !*** external "ol" ***!
+  \*********************/
+/***/ function(module, exports) {
+
+	module.exports = ol;
+
+/***/ },
+/* 5 */
+/*!********************!*\
+  !*** external "$" ***!
+  \********************/
+/***/ function(module, exports) {
+
+	module.exports = $;
+
+/***/ },
+/* 6 */
+/*!***********************************!*\
+  !*** ./dist/olHelpers/mapMove.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapMoveCls_1 = __webpack_require__(/*! ./mapMoveCls */ 7);
+	/**
+	 * The single map move object catch is that it is common to multimap pages
+	 * @type {MapMoveCls}
+	 */
+	exports.mapMove = new mapMoveCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapMove;
+
+
+/***/ },
+/* 7 */
+/*!**************************************!*\
+  !*** ./dist/olHelpers/mapMoveCls.js ***!
+  \**************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var checkDefined = __webpack_require__(/*! ../util/checkDefined */ 9);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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] = functionId;
+	        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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapMoveCls;
+
+
+/***/ },
+/* 8 */
+/*!**********************************************!*\
+  !*** ./dist/olHelpers/mapInteractionBase.js ***!
+  \**********************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 12/8/2015.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapInteractionBase;
+
+
+/***/ },
+/* 9 */
+/*!***********************************!*\
+  !*** ./dist/util/checkDefined.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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 */
+/*!*******************************!*\
+  !*** ./dist/util/makeGuid.js ***!
+  \*******************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ./provide */ 3);
+	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);
+	    });
+	}
+	nm.makeGuid = makeGuid;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = makeGuid;
+
+
+/***/ },
+/* 11 */
+/*!************************************!*\
+  !*** ./dist/olHelpers/mapPopup.js ***!
+  \************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var mapPopupCls_1 = __webpack_require__(/*! ./mapPopupCls */ 12);
+	/**
+	 * The single popup object catch is that it is common to multimap pages
+	 * @type {MapPopupCls}
+	 */
+	exports.mapPopup = new mapPopupCls_1.default();
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = exports.mapPopup;
+
+
+/***/ },
+/* 12 */
+/*!***************************************!*\
+  !*** ./dist/olHelpers/mapPopupCls.js ***!
+  \***************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 11/3/2015.
+	 */
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	var mapInteractionBase_1 = __webpack_require__(/*! ./mapInteractionBase */ 8);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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
+	     * &param feature the openlayers vector feature
+	     * $param
+	     */
+	    /**
+	     * map popup constructor
+	     */
+	    function MapPopupCls() {
+	        var _this = _super.call(this, 'map popup') || this;
+	        _this._arrPopupLayerIds = [];
+	        _this._arrPopupLayerNames = [];
+	        _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) {
+	                }
+	                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">&#9664;</span>';
+	            popupHtml += '<span class="next-popup ol-popup-nav-arrow">&#9654;</span>';
+	            popupHtml += "<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>";
+	            popupHtml += "<span>&nbsp;of&nbsp;</span>";
+	            popupHtml += "<span class=\"popup-content-length\" style=\"font-weight: bold;\">" + _this._popupContentLength + "</span>";
+	            popupHtml += "<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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 = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {
+	                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {
+	                    var olLayer = _a[_i];
+	                    if (lyrCandidate == olLayer) {
+	                        return true;
+	                    }
+	                }
+	                return false;
+	            });
+	            var mapElement = _this.map.getTargetElement();
+	            mapElement.style.cursor = hit ? 'pointer' : '';
+	        });
+	        return true;
+	    };
+	    /**
+	     * 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 lyrIndex = _this._arrPopupOlLayers.indexOf(layer);
+	            if (lyrIndex > -1) {
+	                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));
+	            }
+	        });
+	        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._arrPopupLayerNames.push(lyr.name);
+	        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._arrPopupLayerNames.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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = MapPopupCls;
+
+
+/***/ },
+/* 13 */,
+/* 14 */,
+/* 15 */
+/*!**********************************!*\
+  !*** ./dist/layers/LayerBase.js ***!
+  \**********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var zoomResolutionConvert = __webpack_require__(/*! ../olHelpers/zoomResolutionConvert */ 16);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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">&#9660;</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('&#9660;');
+	                    }
+	                    else {
+	                        $this.addClass('legend-layer-group-collapsed');
+	                        $this.html('&#9654;');
+	                    }
+	                });
+	                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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerBase;
+
+
+/***/ },
+/* 16 */
+/*!*************************************************!*\
+  !*** ./dist/olHelpers/zoomResolutionConvert.js ***!
+  \*************************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/14/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	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;
+
+
+/***/ },
+/* 17 */,
+/* 18 */,
+/* 19 */,
+/* 20 */,
+/* 21 */,
+/* 22 */,
+/* 23 */
+/*!*****************************************!*\
+  !*** ./dist/olHelpers/esriToOlStyle.js ***!
+  \*****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 1/4/2016.
+	 */
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var nm = provide_1.default('olHelpers.esriToOlStyle');
+	/**
+	 * This callback is displayed as part of the Requester class.
+	 * @callback styleFunc
+	 * @param {ol.Feature} feat - openlayers feature
+	 * @param {number} resolution - map resolution
+	 */
+	/**
+	 *
+	 * @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, '&amp;')
+	        .replace(/"/g, '&quot;')
+	        .replace(/'/g, '&#39;')
+	        .replace(/</g, '&lt;')
+	        .replace(/>/g, '&gt;');
+	}
+	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 + "\">&#9679;</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];
+	            var returnValue;
+	            if (_this.propertyStyleLookup[checkProperty] !== undefined) {
+	                returnValue = [_this.propertyStyleLookup[checkProperty]];
+	            }
+	            else {
+	                returnValue = [_this.defaultStyle];
+	            }
+	            return returnValue;
+	        };
+	        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));
+	/**
+	 * style and legend object
+	 * @typedef {object} styleAndLegend
+	 * @property {styleFunc} style - style function
+	 * @property {string} legend - legend content
+	 */
+	/**
+	 *
+	 * @param {object} esriResponse - layer info
+	 * @returns {styleAndLegend} style and legend object
+	 */
+	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">&#9660;</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
+	 * @returns {string} legend content
+	 */
+	function makeMapServiceLegend(esriResponse) {
+	    "use strict";
+	    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++) {
+	            newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';
+	        }
+	        newLegendHtml += '</ul>';
+	    }
+	    return newLegendHtml;
+	}
+	exports.makeMapServiceLegend = makeMapServiceLegend;
+	nm.makeMapServiceLegend = makeMapServiceLegend;
+
+
+/***/ },
+/* 24 */
+/*!*******************************************!*\
+  !*** ./dist/layers/LayerEsriMapServer.js ***!
+  \*******************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	var __extends = (this && this.__extends) || function (d, b) {
+	    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
+	    function __() { this.constructor = d; }
+	    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
+	};
+	/**
+	 * Created by gavorhes on 12/7/2015.
+	 */
+	var LayerBase_1 = __webpack_require__(/*! ./LayerBase */ 15);
+	var esriToOl = __webpack_require__(/*! ../olHelpers/esriToOlStyle */ 23);
+	var mapPopup_1 = __webpack_require__(/*! ../olHelpers/mapPopup */ 11);
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var ol = __webpack_require__(/*! custom-ol */ 4);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	var nm = provide_1.default('layers');
+	/**
+	 * 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._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;
+	        _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);
+	            _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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerEsriMapServer;
+
+
+/***/ },
+/* 25 */,
+/* 26 */,
+/* 27 */,
+/* 28 */,
+/* 29 */,
+/* 30 */,
+/* 31 */
+/*!*****************************************!*\
+  !*** ./dist/collections/LayerLegend.js ***!
+  \*****************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/16/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var makeGuid_1 = __webpack_require__(/*! ../util/makeGuid */ 10);
+	var mapMove_1 = __webpack_require__(/*! ../olHelpers/mapMove */ 6);
+	var nm = provide_1.default('collections');
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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 ? '&#9654;' : '&#9660;';
+	            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) {
+	        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 = options || {};
+	        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('&#9660;');
+	            }
+	            else {
+	                $this.addClass('legend-layer-group-collapsed');
+	                $this.html('&#9654;');
+	            }
+	        });
+	        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(groupItem.items, parents);
+	        }
+	        else {
+	            /**
+	             * @type {LayerBase}
+	             */
+	            var layerItem = legendItems[0];
+	            this.layerGroup.addLegendLayer(layerItem, parents);
+	        }
+	        this._buildTree(legendItems.slice(1), parents);
+	    };
+	    return LayerLegend;
+	}());
+	nm.LayerLegend = LayerLegend;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = LayerLegend;
+
+
+/***/ }
+/******/ ]);
 //# sourceMappingURL=simple_map.js.map
\ No newline at end of file
diff --git a/test-html/js/simple_map.js.map b/test-html/js/simple_map.js.map
index 4fb4cbbffea5b74a8b7bf7d8cca2634f996a0af5..44ac34917a4a12a495c02cad4d285be203b72860 100644
--- a/test-html/js/simple_map.js.map
+++ b/test-html/js/simple_map.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///simple_map.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457*","webpack:///./src/_test/simple_map.ts","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/mapMove.ts?6a2b*","webpack:///./src/layers/LayerBase.ts?bf94*","webpack:///./src/util/checkDefined.ts?bcd7*","webpack:///./src/olHelpers/mapMoveCls.ts?cd45*","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7*","webpack:///./src/olHelpers/quickMap.ts?1069*","webpack:///./src/olHelpers/quickMapBase.ts?fb65*","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b*","webpack:///./src/olHelpers/esriToOlStyle.ts?9363","webpack:///./src/layers/LayerEsriMapServer.ts?9c85","webpack:///./src/collections/LayerLegend.ts?9de6"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","quickMap_1","LayerEsriMapServer_1","LayerLegend_1","map","quickMap","wisDotRegions","LayerEsriMapServer","sixYearPlan","name","legendCollapse","addLayer","olLayer","layerArray","default","provide","namespace","window","parts","split","nameSpace","i","length","newObject","util","Object","defineProperty","value","$","ol","makeGuid","replace","r","Math","random","v","toString","provide_1","nm","mapPopupCls_1","mapPopup","MapInteractionBase","subtype","this","_map","_initialized","_subtype","prototype","init","theMap","get","enumerable","configurable","_checkInit","initialized","msg","alert","console","log","checkInit","mapMoveCls_1","mapMove","zoomResolutionConvert","makeGuid_1","LayerBase","url","options","_url","_params","params","_legendCollapse","_legendCheckbox","legendCheckbox","_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","getLegendDiv","additionalContent","addCollapse","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","setOpacity","newName","getSource","newZ","setZIndex","getOlLayer","undefinedOrNull","input","definedAndNotNull","__extends","d","b","__","constructor","hasOwnProperty","create","mapInteractionBase_1","checkDefined","MapMoveCls","_super","_this","_arrLyrRequest","_arrLyrTimeout","_arrLayer","_lookupLayer","_mapMoveCallbacks","_mapMoveCallbacksLookup","_mapMoveCallbackDelays","_mapMoveCallbackContext","_mapMoveCallbackTimeout","_mapExtent","_zoomLevel","getView","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","clear","setTimeout","onDemandDelay","ind","functionId","ctx","theFunc","__this","f","addVectorLayer","triggerOnAdd","push","addCallback","func","context","delay","FeatureLayerProperties","feature","layer","layerIndex","selectionLayer","esriLayerName","popupContent","MapPopupCls","_arrPopupLayerIds","_arrPopupLayerNames","_arrPopupLayers","_arrPopupOlLayers","_arrPopupContentFunction","_$popupContainer","_$popupContent","_$popupCloser","_popupOverlay","_selectionLayers","_selectionLayerLookup","_mapClickFunctions","_popupChangedFunctions","_esriMapServiceLayers","_popupOpen","_popupCoordinate","_passThroughLayerFeatureArray","_currentPopupIndex","_popupContentLength","$map","target","getTarget","_ease","n","easing","inAndOut","Overlay","element","autoPan","autoPanAnimation","duration","getCenter","addOverlay","evt","closePopup","queryParams","geometry","join","geometryType","layers","sr","getProjection","getCode","mapExtent","imageDisplay","returnGeometry","tolerance","_i","_a","l","getPopupInfo","layerFeatureObjectArray","_featuresAtPixel","featObj","props","getProperties","popupContentResponse","addFeature","popupHtml","_triggerFeatSelect","nextPopup","setPosition","scrollTop","pixel","getEventPixel","hit","hasFeatureAtPixel","lyrCandidate","mapElement","getTargetElement","style","cursor","$currentPopupItemNumber","$innerPopup","$layerNameSpan","clearSelection","lyrFeatObj","toFixed","layerName","addMapServicePopupContent","esriName","featLayerObject","forEachFeatureAtPixel","lyrIndex","blur","addPopupChangedFunction","chgFunction","_addPopupLayer","selectionStyle","color","width","theStyle","olStyle","Style","stroke","Stroke","image","Circle","radius","fill","Fill","Vector","addVectorPopup","popupContentFunction","removeVectorPopup","idx","splice","addMapServicePopup","addMapClickFunction","quickMapBase_1","quickMapBase","mapMove_1","mapPopup_1","divId","center","x","y","zoom","baseSwitcher","fullScreen","$mapDiv","css","osmLayer","Tile","OSM","geom","Point","proj","Projection","code","transform","coordinates","getCoordinates","controls","control","defaults","attributionOptions","collapsible","view","View","Map","addControl","FullScreen","zoomLevel","_zoomResLookup","resolutionToZoom","resolution","_colorArrayToRgba","colorArray","htmlEscape","str","String","makeFeatureServiceLegendAndSymbol","esriResponse","renderer","drawingInfo","symbolLegendOut","SingleSymbol","PointSymbol","LineSymbol","PolygonSymbol","UniqueValueSymbol","legend","legendHtml","mapServiceLegendItem","lyrObject","skipLayerNameAndExpander","legendItems","makeMapServiceLegend","newLegendHtml","CommonSymbol","symbolObj","innerColor","outerColor","outline","outlineWidth","size","Icon","src","lineWidth","SymbolGenerator","SymbolClass","symbol","uniqueValueInfos","propertyName","defaultSymbol","defaultStyle","defaultLabelHtml","valueArray","labelArray","legendArray","propertyStyleLookup","uniqueVal","uniqueSym","returnValue","checkProperties","checkProperty","_b","_c","h","LayerBase_1","esriToOl","TileArcGISRest","showLayers","minResolution","maxResolution","addPopup","_esriFormat","format","EsriJSON","_popupRequest","urlCopy","newHtml","a","attrVal","toLowerCase","attr","slice","readFeature","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","$divElement","_legendItems","layerGroup","_buildTree","ext","$lyrLi","change","legendLayerLis","checked","lyrId","prop","oneItem","groupItem","items","layerItem"],"mappings":"CAAS,SAAUA,GCInB,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAP,GAAAE,GAAAM,KAAAH,EAAAD,QAAAC,IAAAD,QAAAH,GAGAI,EA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C7C,GAAIC,GAAYrG,EAAY,GACxByE,EAAW/Z,KAAKib,WAAWrB,SAAS+B,EAAW9B,EACnDA,GAAQ3P,KAAK6P,EAASb,SACtBlZ,KAAKkb,WAAWS,EAAUC,MAAO/B,OAC9B,CAIH,GAAIgC,GAAYvG,EAAY,EAE5BtV,MAAKib,WAAWjB,eAAe6B,EAAWhC,GAG9C7Z,KAAKkb,WAAW5F,EAAYkD,MAAM,GAAIqB,KAG9Ce,IAEAjb,GAAGib,YAAcA,EnBk+DhB9b,OAAOC,eAAejC,EAAS,cAAgBkC,OAAO,ImBj+DvDlC,EAAAqB,QAAeyc","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 9/23/2016.\r\n\t */\r\n\tvar quickMap_1 = __webpack_require__(12);\r\n\tvar LayerEsriMapServer_1 = __webpack_require__(16);\r\n\tvar LayerLegend_1 = __webpack_require__(17);\r\n\tvar map = quickMap_1.quickMap();\r\n\tvar wisDotRegions = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\n\tvar sixYearPlan = new LayerEsriMapServer_1.LayerEsriMapServer('http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/SixYearPlan/MapServer', { name: 'Six Year Plan', legendCollapse: true });\r\n\tmap.addLayer(wisDotRegions.olLayer);\r\n\tmap.addLayer(sixYearPlan.olLayer);\r\n\tvar layerArray = [\r\n\t    wisDotRegions,\r\n\t    sixYearPlan\r\n\t];\r\n\tvar legend = new LayerLegend_1.default(layerArray, 'legend-container', {});\r\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\t/**\r\n\t * create a namespace on the gv object\r\n\t * @param {string} namespace to create\r\n\t * @returns {object} object representing the namespace\r\n\t */\r\n\tfunction provide(namespace) {\r\n\t    \"use strict\";\r\n\t    if (typeof window['gv'] == 'undefined') {\r\n\t        window['gv'] = {};\r\n\t    }\r\n\t    var parts = namespace.split('.');\r\n\t    var nameSpace = window['gv'];\r\n\t    for (var i = 0; i < parts.length; i++) {\r\n\t        var newObject = nameSpace[parts[i]];\r\n\t        if (typeof newObject == 'undefined') {\r\n\t            nameSpace[parts[i]] = {};\r\n\t        }\r\n\t        nameSpace = nameSpace[parts[i]];\r\n\t    }\r\n\t    return nameSpace;\r\n\t}\r\n\tprovide('util');\r\n\twindow['gv'].util.provide = provide;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = provide;\r\n\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\tmodule.exports = $;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\tmodule.exports = ol;\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util');\r\n\t/**\r\n\t * guids are used to uniquely identify groups and features\r\n\t * @returns {string} a new guid\r\n\t */\r\n\tfunction makeGuid() {\r\n\t    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\r\n\t        .replace(/[xy]/g, function (c) {\r\n\t        var r = Math.random() * 16 | 0, v = c == 'x' ? r : r & 0x3 | 0x8;\r\n\t        return v.toString(16);\r\n\t    });\r\n\t}\r\n\tnm.makeGuid = makeGuid;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = makeGuid;\r\n\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapPopupCls_1 = __webpack_require__(11);\r\n\t/**\r\n\t * The single popup object catch is that it is common to multimap pages\r\n\t * @type {MapPopupCls}\r\n\t */\r\n\texports.mapPopup = new mapPopupCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapPopup;\r\n\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 12/8/2015.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * base interaction\r\n\t */\r\n\tvar MapInteractionBase = (function () {\r\n\t    /**\r\n\t     * map interaction base\r\n\t     * @param subtype - the interaction subtype\r\n\t     */\r\n\t    function MapInteractionBase(subtype) {\r\n\t        this._map = null;\r\n\t        this._initialized = false;\r\n\t        this._subtype = subtype;\r\n\t    }\r\n\t    /**\r\n\t     * base initializer, returns true for already initialized\r\n\t     * @param theMap - the ol Map\r\n\t     * @returns true for already initialized\r\n\t     */\r\n\t    MapInteractionBase.prototype.init = function (theMap) {\r\n\t        if (!this._initialized) {\r\n\t            this._map = theMap;\r\n\t            this._initialized = true;\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"map\", {\r\n\t        /**\r\n\t         * get reference to the ol map object\r\n\t         * @returns {ol.Map} the map object\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._map;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(MapInteractionBase.prototype, \"initialized\", {\r\n\t        /**\r\n\t         * get if is initialized\r\n\t         * @returns {boolean} is initialized\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._initialized;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     * @protected\r\n\t     */\r\n\t    MapInteractionBase.prototype._checkInit = function () {\r\n\t        if (!this.initialized) {\r\n\t            var msg = this._subtype + \" object not initialized\";\r\n\t            alert(msg);\r\n\t            console.log(msg);\r\n\t            throw msg;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Check the initialization status and throw exception if not valid yet\r\n\t     */\r\n\t    MapInteractionBase.prototype.checkInit = function () {\r\n\t        this._checkInit();\r\n\t    };\r\n\t    return MapInteractionBase;\r\n\t}());\r\n\texports.MapInteractionBase = MapInteractionBase;\r\n\tnm.MapInteractionBase = MapInteractionBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapInteractionBase;\r\n\n\n/***/ },\n/* 7 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar mapMoveCls_1 = __webpack_require__(10);\r\n\t/**\r\n\t * The single map move object catch is that it is common to multimap pages\r\n\t * @type {MapMoveCls}\r\n\t */\r\n\texports.mapMove = new mapMoveCls_1.default();\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = exports.mapMove;\r\n\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar zoomResolutionConvert = __webpack_require__(14);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * The base layer class\r\n\t * @abstract\r\n\t */\r\n\tvar LayerBase = (function () {\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {string} url - url for source\r\n\t     * @param {object} options - config\r\n\t     * @param {string} [options.id=makeGuid()] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] - the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] - the z index for the layer\r\n\t     * @param {function} [options.loadCallback] - function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] - if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] - if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent=undefined] - additional content to add to the legend\r\n\t     */\r\n\t    function LayerBase(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        options = options || {};\r\n\t        if (typeof url !== 'string') {\r\n\t            throw 'Invalid URL';\r\n\t        }\r\n\t        this._url = url;\r\n\t        this._params = typeof options.params == 'object' ? options.params : {};\r\n\t        this._legendCollapse = typeof options.legendCollapse == 'boolean' ? options.legendCollapse : false;\r\n\t        this._legendCheckbox = typeof options.legendCheckbox == 'boolean' ? options.legendCheckbox : true;\r\n\t        this.id = options.id || makeGuid_1.default();\r\n\t        this._name = options.name || 'Unnamed Layer';\r\n\t        this.animate = false;\r\n\t        this._opacity = typeof options.opacity == 'number' ? options.opacity : 1;\r\n\t        if (this._opacity > 1) {\r\n\t            this._opacity = 1;\r\n\t        }\r\n\t        else if (this._opacity < 0) {\r\n\t            this._opacity = 0;\r\n\t        }\r\n\t        this._visible = typeof options.visible === 'boolean' ? options.visible : true;\r\n\t        this._source = undefined;\r\n\t        /**\r\n\t         *\r\n\t         * @protected\r\n\t         */\r\n\t        this._olLayer = undefined;\r\n\t        this._loaded = false;\r\n\t        this._maxResolution = zoomResolutionConvert.zoomToResolution(options.minZoom);\r\n\t        if (typeof this._maxResolution !== 'undefined') {\r\n\t            this._maxResolution += 0.00001;\r\n\t        }\r\n\t        this._minResolution = zoomResolutionConvert.zoomToResolution(options.maxZoom);\r\n\t        this._minZoom = typeof options.minZoom == 'number' ? options.minZoom : undefined;\r\n\t        this._maxZoom = typeof options.maxZoom == 'number' ? options.maxZoom : undefined;\r\n\t        this._zIndex = typeof options.zIndex == 'number' ? options.zIndex : 0;\r\n\t        this.loadCallback = typeof options.loadCallback == 'function' ? options.loadCallback : function () {\r\n\t        };\r\n\t        this._legendContent = '';\r\n\t        if (this._legendCheckbox) {\r\n\t            this._legendContent += \"<input type=\\\"checkbox\\\" \" + (this.visible ? 'checked' : '') + \" \" +\r\n\t                (\"class=\\\"legend-check\\\" id=\\\"\" + this.id + \"-legend-layer-check\\\"><span></span>\");\r\n\t            this._legendContent += \"<label for=\\\"\" + this.id + \"-legend-layer-check\\\" class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        else {\r\n\t            this._legendContent += \"<label class=\\\"legend-layer-name\\\">\" + this.name + \"</label>\";\r\n\t        }\r\n\t        this._$legendDiv = null;\r\n\t        this._applyCollapseCalled = false;\r\n\t        this._addLegendContent(typeof options.legendContent === 'string' ? options.legendContent : undefined);\r\n\t    }\r\n\t    /**\r\n\t     * base load function, sets _loaded = true if it is not already\r\n\t     * @protected\r\n\t     * @returns {boolean} if already loaded\r\n\t     */\r\n\t    LayerBase.prototype._load = function () {\r\n\t        if (this.loaded == true) {\r\n\t            return true;\r\n\t        }\r\n\t        else {\r\n\t            this._loaded = true;\r\n\t            return false;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * Get the legend html, be sure to only add to the DOM once\r\n\t     * @returns {string} html for layer wrapped in a div\r\n\t     */\r\n\t    LayerBase.prototype.getLegendDiv = function () {\r\n\t        return \"<div class=\\\"legend-layer-div\\\" id=\\\"\" + this.id + \"-legend-layer-div\\\">\" + this._legendContent + \"</div>\";\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param additionalContent - additional content to add to legend\r\n\t     * @private\r\n\t     */\r\n\t    LayerBase.prototype._addLegendContent = function (additionalContent) {\r\n\t        if (additionalContent === void 0) { additionalContent = ''; }\r\n\t        var addCollapse = additionalContent.indexOf('<ul>') > -1;\r\n\t        if (addCollapse) {\r\n\t            additionalContent = '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">&#9660;</span>' + additionalContent;\r\n\t        }\r\n\t        this._legendContent += additionalContent;\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            this._$legendDiv.append(additionalContent);\r\n\t            this.applyCollapse();\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=] - additonal content to add\r\n\t     */\r\n\t    LayerBase.prototype.addLegendContent = function (additionalContent) {\r\n\t        this._addLegendContent(additionalContent);\r\n\t    };\r\n\t    LayerBase.prototype.applyCollapse = function () {\r\n\t        if (this._applyCollapseCalled) {\r\n\t            console.log('collapse already applied');\r\n\t            return undefined;\r\n\t        }\r\n\t        this._$legendDiv = $(\"#\" + this.id + \"-legend-layer-div\");\r\n\t        if (this._$legendDiv.length > 0) {\r\n\t            var $expander = this._$legendDiv.find('.legend-items-expander');\r\n\t            if ($expander.length > 0) {\r\n\t                this._applyCollapseCalled = true;\r\n\t                $expander.click(function () {\r\n\t                    var $this = $(this);\r\n\t                    $this.siblings('ul').slideToggle();\r\n\t                    if ($this.hasClass('legend-layer-group-collapsed')) {\r\n\t                        $this.removeClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9660;');\r\n\t                    }\r\n\t                    else {\r\n\t                        $this.addClass('legend-layer-group-collapsed');\r\n\t                        $this.html('&#9654;');\r\n\t                    }\r\n\t                });\r\n\t                if (this._legendCollapse) {\r\n\t                    $expander.trigger('click');\r\n\t                }\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * trick to refresh the layer\r\n\t     */\r\n\t    LayerBase.prototype.refresh = function () {\r\n\t        if (this.source) {\r\n\t            this.source.refresh();\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"id\", {\r\n\t        get: function () {\r\n\t            return this._id;\r\n\t        },\r\n\t        set: function (newId) {\r\n\t            this._id = newId;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"animate\", {\r\n\t        get: function () {\r\n\t            return this._animate;\r\n\t        },\r\n\t        set: function (animate) {\r\n\t            this._animate = animate;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"legendContent\", {\r\n\t        /**\r\n\t         * get the legend content\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._legendContent;\r\n\t        },\r\n\t        /**\r\n\t         * set the legend content directly\r\n\t         * @param {string} newVal - new content\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newVal) {\r\n\t            this._legendContent = newVal;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"params\", {\r\n\t        /**\r\n\t         * get the map get params\r\n\t         * @type {object}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._params;\r\n\t        },\r\n\t        /**\r\n\t         * set the map get params\r\n\t         * @param {object} newParams - new get params\r\n\t         * @protected\r\n\t         */\r\n\t        set: function (newParams) {\r\n\t            this._params = newParams;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minResolution\", {\r\n\t        /**\r\n\t         * get the minimum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxResolution\", {\r\n\t        /**\r\n\t         * get the maximum resolution\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxResolution;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"minZoom\", {\r\n\t        /**\r\n\t         * get min zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._minZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"maxZoom\", {\r\n\t        /**\r\n\t         * get max zoom\r\n\t         * @type {number|*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._maxZoom;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"url\", {\r\n\t        /**\r\n\t         * get the url\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._url;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"visible\", {\r\n\t        /**\r\n\t         * Get the layer visibility\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._visible;\r\n\t        },\r\n\t        /**\r\n\t         * set the visibility\r\n\t         * @param visibility\r\n\t         */\r\n\t        set: function (visibility) {\r\n\t            this.setVisible(visibility);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setVisible = function (visibility) {\r\n\t        this._visible = visibility;\r\n\t        if (this.olLayer) {\r\n\t            this.olLayer.setVisible(this._visible);\r\n\t            if (visibility && !this._loaded) {\r\n\t                this._load();\r\n\t            }\r\n\t        }\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"opacity\", {\r\n\t        /**\r\n\t         * Get the layer opacity\r\n\t         * @type {number}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._opacity;\r\n\t        },\r\n\t        /**\r\n\t         * Set the layer opacity\r\n\t         * @param {number} opacity - layer opacity\r\n\t         */\r\n\t        set: function (opacity) {\r\n\t            this._opacity = opacity;\r\n\t            if (this.olLayer) {\r\n\t                this.olLayer.setOpacity(this._opacity);\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"name\", {\r\n\t        /**\r\n\t         * Get the layer name\r\n\t         * @type {string}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._name;\r\n\t        },\r\n\t        /**\r\n\t         * set the layer name\r\n\t         * @param {string} newName - the new name\r\n\t         */\r\n\t        set: function (newName) {\r\n\t            this._name = newName;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"loaded\", {\r\n\t        /**\r\n\t         * Check if the layer is loaded\r\n\t         * @type {boolean}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._loaded;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerBase.prototype, \"source\", {\r\n\t        /**\r\n\t         * get the layer source\r\n\t         * @type {*}\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getSource();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getSource = function () {\r\n\t        return this._source;\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"zIndex\", {\r\n\t        /**\r\n\t         * get the z index\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._zIndex;\r\n\t        },\r\n\t        /**\r\n\t         * set the z index\r\n\t         */\r\n\t        set: function (newZ) {\r\n\t            this._zIndex = newZ;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.setZIndex = function (newZ) {\r\n\t    };\r\n\t    Object.defineProperty(LayerBase.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         * the the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return this.getOlLayer();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    LayerBase.prototype.getOlLayer = function () {\r\n\t        return this._olLayer;\r\n\t    };\r\n\t    return LayerBase;\r\n\t}());\r\n\texports.LayerBase = LayerBase;\r\n\tnm.LayerBase = LayerBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerBase;\r\n\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('util.checkDefined');\r\n\t/**\r\n\t * check if the input is undefined or null\r\n\t * @param input - input pointer\r\n\t * @returns true undefined or null\r\n\t */\r\n\tfunction undefinedOrNull(input) {\r\n\t    \"use strict\";\r\n\t    return (typeof input === 'undefined' || input === null);\r\n\t}\r\n\texports.undefinedOrNull = undefinedOrNull;\r\n\tnm.undefinedOrNull = undefinedOrNull;\r\n\t/**\r\n\t * check if the input is defined and not null\r\n\t * @param input - input pointer\r\n\t * @returns true defined and not null\r\n\t */\r\n\tfunction definedAndNotNull(input) {\r\n\t    \"use strict\";\r\n\t    return !(undefinedOrNull(input));\r\n\t}\r\n\texports.definedAndNotNull = definedAndNotNull;\r\n\tnm.definedAndNotNull = definedAndNotNull;\r\n\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar checkDefined = __webpack_require__(9);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * assists with map move interactions, trigger callback functions\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapMoveCls = (function (_super) {\r\n\t    __extends(MapMoveCls, _super);\r\n\t    /**\r\n\t     * constructor called implicitly\r\n\t     */\r\n\t    function MapMoveCls() {\r\n\t        var _this = _super.call(this, 'map move') || this;\r\n\t        _this._arrLyrRequest = [];\r\n\t        _this._arrLyrTimeout = [];\r\n\t        _this._arrLayer = [];\r\n\t        _this._lookupLayer = {};\r\n\t        _this._mapMoveCallbacks = [];\r\n\t        _this._mapMoveCallbacksLookup = {};\r\n\t        _this._mapMoveCallbackDelays = [];\r\n\t        _this._mapMoveCallbackContext = [];\r\n\t        _this._mapMoveCallbackTimeout = [];\r\n\t        _this._mapExtent = undefined;\r\n\t        _this._zoomLevel = undefined;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * initialize the map move object\r\n\t     * @param theMap - the ol map\r\n\t     */\r\n\t    MapMoveCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        this.map.getView().on(['change:center', 'change:resolution'], function (e) {\r\n\t            _this._updateMapExtent();\r\n\t            // trigger the layer updates\r\n\t            for (var i = 0; i < _this._arrLayer.length; i++) {\r\n\t                _this.triggerLyrLoad(_this._arrLayer[i], i, e.type);\r\n\t            }\r\n\t            // trigger the map callbacks\r\n\t            for (var i = 0; i < _this._mapMoveCallbacks.length; i++) {\r\n\t                _this.triggerMoveCallback(i, e.type);\r\n\t            }\r\n\t        });\r\n\t    };\r\n\t    MapMoveCls.prototype._updateMapExtent = function () {\r\n\t        var theView = this.map.getView();\r\n\t        this._zoomLevel = theView.getZoom();\r\n\t        var extentArray = theView.calculateExtent(this.map.getSize());\r\n\t        this._mapExtent = {\r\n\t            minX: extentArray[0],\r\n\t            minY: extentArray[1],\r\n\t            maxX: extentArray[2],\r\n\t            maxY: extentArray[3]\r\n\t        };\r\n\t    };\r\n\t    Object.defineProperty(MapMoveCls.prototype, \"mapExtent\", {\r\n\t        /**\r\n\t         * return the map extent\r\n\t         */\r\n\t        get: function () {\r\n\t            if (!this._mapExtent) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            return this._mapExtent;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    /**\r\n\t     * Trigger the layer load\r\n\t     * @param lyr the layer being acted on\r\n\t     * @param index index of the layer\r\n\t     * @param eventType the event triggering the load, as 'change:center' or 'change:resolution'\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerLyrLoad = function (lyr, index, eventType) {\r\n\t        if (checkDefined.undefinedOrNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            throw 'need to define lyr or index';\r\n\t        }\r\n\t        else if (checkDefined.definedAndNotNull(lyr) && checkDefined.undefinedOrNull(index)) {\r\n\t            index = this._arrLayer.indexOf(lyr);\r\n\t        }\r\n\t        else if (checkDefined.undefinedOrNull(lyr) && checkDefined.definedAndNotNull(index)) {\r\n\t            lyr = this._arrLayer[index];\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._arrLyrTimeout[index] != null) {\r\n\t            clearTimeout(this._arrLyrTimeout[index]);\r\n\t            this._arrLyrTimeout[index] = null;\r\n\t        }\r\n\t        // abort if necessary and clear the request\r\n\t        if (this._arrLyrRequest[index] != null && this._arrLyrRequest[index] != 4) {\r\n\t            this._arrLyrRequest[index].abort();\r\n\t            this._arrLyrRequest[index] = null;\r\n\t        }\r\n\t        // dummy callback used if before load returns false\r\n\t        var callbackFunc = function () { };\r\n\t        if (lyr.mapMoveBefore(this._zoomLevel, eventType)) {\r\n\t            lyr.mapMoveMakeGetParams(this._mapExtent, this._zoomLevel);\r\n\t            var __this_1 = this;\r\n\t            callbackFunc = function () {\r\n\t                function innerFunction(theLayer, theIndex) {\r\n\t                    var _innerThis = this;\r\n\t                    this._arrLyrRequest[theIndex] = $.get(theLayer.url, theLayer.mapMoveParams, function (d) {\r\n\t                        /**\r\n\t                         * @type {LayerBaseVector}\r\n\t                         */\r\n\t                        theLayer.mapMoveCallback(d);\r\n\t                        theLayer.loadCallback();\r\n\t                    }, 'json').fail(function (jqXHR) {\r\n\t                        if (jqXHR.statusText != 'abort') {\r\n\t                            console.log('failed');\r\n\t                            console.log(theLayer.url);\r\n\t                            console.log(theLayer.mapMoveParams);\r\n\t                        }\r\n\t                    }).always(function () {\r\n\t                        _innerThis._arrLyrTimeout[theIndex] = null;\r\n\t                        _innerThis._arrLyrRequest[theIndex] = null;\r\n\t                    });\r\n\t                }\r\n\t                innerFunction.call(__this_1, lyr, index);\r\n\t            };\r\n\t        }\r\n\t        else {\r\n\t            lyr.clear();\r\n\t        }\r\n\t        this._arrLyrTimeout[index] = setTimeout(callbackFunc, lyr.onDemandDelay);\r\n\t    };\r\n\t    /**\r\n\t     * trigger the map move call back at the given index\r\n\t     * @param ind - the index of the layer\r\n\t     * @param eventType=undefined the event triggering the load as 'change:center' or 'change:resolution'\r\n\t     * @param functionId=undefined the function id used to reference the added callback function\r\n\t     */\r\n\t    MapMoveCls.prototype.triggerMoveCallback = function (ind, eventType, functionId) {\r\n\t        if (typeof ind == 'undefined' && typeof functionId == 'undefined') {\r\n\t            throw 'either the function index or the id must be defined';\r\n\t        }\r\n\t        if (typeof ind !== 'number') {\r\n\t            ind = this._mapMoveCallbacks.indexOf(this._mapMoveCallbacksLookup[functionId]);\r\n\t        }\r\n\t        if (ind < 0) {\r\n\t            console.log('function not found');\r\n\t            return;\r\n\t        }\r\n\t        // clear the timeout\r\n\t        if (this._mapMoveCallbackTimeout[ind] != null) {\r\n\t            clearTimeout(this._mapMoveCallbackTimeout[ind]);\r\n\t            this._mapMoveCallbackTimeout[ind] = null;\r\n\t        }\r\n\t        var ctx = this._mapMoveCallbackContext[ind];\r\n\t        var theFunc = this._mapMoveCallbacks[ind];\r\n\t        var __this = this;\r\n\t        var f = function () {\r\n\t            if (ctx !== null) {\r\n\t                theFunc.call(ctx, __this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t            else {\r\n\t                theFunc(__this._mapExtent, __this._zoomLevel, eventType);\r\n\t            }\r\n\t        };\r\n\t        this._mapMoveCallbackTimeout[ind] = setTimeout(f, this._mapMoveCallbackDelays[ind]);\r\n\t    };\r\n\t    /**\r\n\t     * Add a layer to the interaction\r\n\t     * @param  lyr - layer to add\r\n\t     * @param triggerOnAdd - if the layer should be loaded on add\r\n\t     */\r\n\t    MapMoveCls.prototype.addVectorLayer = function (lyr, triggerOnAdd) {\r\n\t        if (triggerOnAdd === void 0) { triggerOnAdd = true; }\r\n\t        if (this._arrLayer.indexOf(lyr) > -1) {\r\n\t            console.log('already added ' + lyr.name + ' to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        this._arrLyrRequest.push(null);\r\n\t        this._arrLyrTimeout.push(null);\r\n\t        this._arrLayer.push(lyr);\r\n\t        this._lookupLayer[lyr.id] = lyr;\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerLyrLoad(lyr, this._arrLayer.length - 1);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * add a callback to the map move event\r\n\t     * @param func - callback function\r\n\t     * @param context - the context to use for this function\r\n\t     * @param delay=50 the delay before call load\r\n\t     * @param triggerOnAdd if the layer should be loaded on add to mapMove\r\n\t     * @param functionId optional id to reference the function later for outside triggering\r\n\t     */\r\n\t    MapMoveCls.prototype.addCallback = function (func, context, delay, triggerOnAdd, functionId) {\r\n\t        if (this._mapMoveCallbacks.indexOf(func) > -1) {\r\n\t            console.log('this function already added to map move');\r\n\t            return;\r\n\t        }\r\n\t        this._checkInit();\r\n\t        if (!functionId) {\r\n\t            functionId = makeGuid_1.default();\r\n\t        }\r\n\t        this._mapMoveCallbacks.push(func);\r\n\t        this._mapMoveCallbacksLookup[functionId] = functionId;\r\n\t        this._mapMoveCallbackDelays.push(typeof delay == 'number' ? delay : 50);\r\n\t        this._mapMoveCallbackContext.push(checkDefined.definedAndNotNull(context) ? context : null);\r\n\t        this._mapMoveCallbackTimeout.push(null);\r\n\t        triggerOnAdd = typeof triggerOnAdd == 'boolean' ? triggerOnAdd : true;\r\n\t        if (triggerOnAdd) {\r\n\t            if (this._mapExtent === undefined) {\r\n\t                this._updateMapExtent();\r\n\t            }\r\n\t            this.triggerMoveCallback(this._mapMoveCallbacks.length - 1);\r\n\t        }\r\n\t    };\r\n\t    return MapMoveCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapMoveCls = MapMoveCls;\r\n\tnm.MapMoveCls = MapMoveCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapMoveCls;\r\n\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 11/3/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\tvar mapInteractionBase_1 = __webpack_require__(6);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\tvar FeatureLayerProperties = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param feature the feature\r\n\t     * @param layer - the layer in the popup\r\n\t     * @param layerIndex - index of the layer\r\n\t     * @param selectionLayer - the ol selection layer\r\n\t     * @param [esriLayerName=undefined] - esri layer name\r\n\t     */\r\n\t    function FeatureLayerProperties(feature, layer, layerIndex, selectionLayer, esriLayerName) {\r\n\t        this.feature = feature;\r\n\t        this.layer = layer;\r\n\t        this.layerIndex = layerIndex;\r\n\t        this.selectionLayer = selectionLayer;\r\n\t        this.popupContent = '';\r\n\t        this.esriLayerName = typeof esriLayerName == 'string' ? esriLayerName : undefined;\r\n\t    }\r\n\t    Object.defineProperty(FeatureLayerProperties.prototype, \"layerName\", {\r\n\t        get: function () {\r\n\t            if (typeof this.esriLayerName == 'string') {\r\n\t                return this.esriLayerName;\r\n\t            }\r\n\t            else {\r\n\t                return this.layer.name;\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return FeatureLayerProperties;\r\n\t}());\r\n\texports.FeatureLayerProperties = FeatureLayerProperties;\r\n\t/**\r\n\t * map popup class\r\n\t * @augments MapInteractionBase\r\n\t */\r\n\tvar MapPopupCls = (function (_super) {\r\n\t    __extends(MapPopupCls, _super);\r\n\t    /**\r\n\t     * Definition for openlayers style function\r\n\t     * @callback olStyleFunction\r\n\t     * &param feature the openlayers vector feature\r\n\t     * $param\r\n\t     */\r\n\t    /**\r\n\t     * map popup constructor\r\n\t     */\r\n\t    function MapPopupCls() {\r\n\t        var _this = _super.call(this, 'map popup') || this;\r\n\t        _this._arrPopupLayerIds = [];\r\n\t        _this._arrPopupLayerNames = [];\r\n\t        _this._arrPopupLayers = [];\r\n\t        _this._arrPopupOlLayers = [];\r\n\t        _this._arrPopupContentFunction = [];\r\n\t        _this._$popupContainer = undefined;\r\n\t        _this._$popupContent = undefined;\r\n\t        _this._$popupCloser = undefined;\r\n\t        _this._popupOverlay = undefined;\r\n\t        _this._selectionLayers = [];\r\n\t        _this._selectionLayerLookup = {};\r\n\t        _this._mapClickFunctions = [];\r\n\t        //let a = function($jqueryContent){console.log($jqueryContent)};\r\n\t        //this._popupChangedLookup = {'a': a};\r\n\t        _this._popupChangedFunctions = [];\r\n\t        _this._esriMapServiceLayers = [];\r\n\t        _this._popupOpen = false;\r\n\t        _this._popupCoordinate = null;\r\n\t        _this._passThroughLayerFeatureArray = [];\r\n\t        _this._currentPopupIndex = -1;\r\n\t        _this._popupContentLength = 0;\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * map popup initialization\r\n\t     * @param {ol.Map} theMap - the ol map\r\n\t     */\r\n\t    MapPopupCls.prototype.init = function (theMap) {\r\n\t        var _this = this;\r\n\t        _super.prototype.init.call(this, theMap);\r\n\t        var $map;\r\n\t        var target = this.map.getTarget();\r\n\t        if (typeof target == 'string') {\r\n\t            $map = $('#' + target);\r\n\t        }\r\n\t        else {\r\n\t            $map = $(target);\r\n\t        }\r\n\t        $map.append('<div class=\"ol-popup\">' +\r\n\t            '<span class=\"ol-popup-closer\">X</span>' +\r\n\t            '<div class=\"popup-content\"></div>' +\r\n\t            '</div>');\r\n\t        this._$popupContainer = $map.find('.ol-popup');\r\n\t        this._$popupContent = $map.find('.popup-content');\r\n\t        this._$popupCloser = $map.find('.ol-popup-closer');\r\n\t        var _ease = function (n) {\r\n\t            return ol.easing.inAndOut(n);\r\n\t        };\r\n\t        this._popupOverlay = new ol.Overlay({\r\n\t            element: this._$popupContainer[0],\r\n\t            autoPan: true,\r\n\t            autoPanAnimation: {\r\n\t                duration: 250,\r\n\t                source: theMap.getView().getCenter(),\r\n\t                easing: _ease\r\n\t            }\r\n\t        });\r\n\t        this._map.addOverlay(this._popupOverlay);\r\n\t        this._$popupCloser.click(function (evt) {\r\n\t            _this.closePopup();\r\n\t        });\r\n\t        // display popup on click\r\n\t        this._map.on('singleclick', function (evt) {\r\n\t            _this.closePopup();\r\n\t            _this._popupCoordinate = evt['coordinate'];\r\n\t            // esri map service layers\r\n\t            if (_this._esriMapServiceLayers.length > 0) {\r\n\t                var queryParams = {\r\n\t                    geometry: evt['coordinate'].join(','),\r\n\t                    geometryType: 'esriGeometryPoint',\r\n\t                    layers: 'all',\r\n\t                    sr: _this._map.getView().getProjection().getCode().split(':')[1],\r\n\t                    mapExtent: _this._map.getView().calculateExtent(_this._map.getSize()).join(','),\r\n\t                    imageDisplay: _this._map.getSize().join(',') + ',96',\r\n\t                    returnGeometry: true,\r\n\t                    tolerance: 15,\r\n\t                    f: 'pjson'\r\n\t                };\r\n\t                for (var _i = 0, _a = _this._esriMapServiceLayers; _i < _a.length; _i++) {\r\n\t                    var l = _a[_i];\r\n\t                    l.getPopupInfo(queryParams);\r\n\t                }\r\n\t            }\r\n\t            var layerFeatureObjectArray = _this._featuresAtPixel(evt['pixel']);\r\n\t            _this._passThroughLayerFeatureArray = [];\r\n\t            _this._currentPopupIndex = -1;\r\n\t            for (var i = 0; i < layerFeatureObjectArray.length; i++) {\r\n\t                var featObj = layerFeatureObjectArray[i];\r\n\t                var props = featObj.feature.getProperties();\r\n\t                var popupContentResponse = _this._arrPopupContentFunction[featObj.layerIndex](props, _this._$popupContent);\r\n\t                //skip if return was false\r\n\t                if (popupContentResponse === false) {\r\n\t                }\r\n\t                else if (typeof popupContentResponse == 'string') {\r\n\t                    featObj.popupContent = popupContentResponse;\r\n\t                    _this._passThroughLayerFeatureArray.push(featObj);\r\n\t                }\r\n\t                else {\r\n\t                    featObj.selectionLayer.getSource().addFeature(featObj.feature);\r\n\t                }\r\n\t            }\r\n\t            _this._popupContentLength = _this._passThroughLayerFeatureArray.length;\r\n\t            _this._currentPopupIndex = -1;\r\n\t            var popupHtml = '<div class=\"ol-popup-nav\">';\r\n\t            popupHtml += '<span class=\"previous-popup ol-popup-nav-arrow\">&#9664;</span>';\r\n\t            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n\t            popupHtml += \"<span class=\\\"current-popup-item-number\\\" style=\\\"font-weight: bold;\\\"></span>\";\r\n\t            popupHtml += \"<span>&nbsp;of&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"popup-content-length\\\" style=\\\"font-weight: bold;\\\">\" + _this._popupContentLength + \"</span>\";\r\n\t            popupHtml += \"<span>&nbsp;&nbsp;-&nbsp;&nbsp;</span>\";\r\n\t            popupHtml += \"<span class=\\\"current-popup-layer-name\\\"></span>\";\r\n\t            popupHtml += '</div>';\r\n\t            popupHtml += '<div class=\"ol-popup-inner\">';\r\n\t            popupHtml += '</div>';\r\n\t            _this._$popupContent.html(popupHtml);\r\n\t            _this._$popupContent.find('.previous-popup').click(function () {\r\n\t                if (_this._popupContentLength == 1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == 0) {\r\n\t                    _this._currentPopupIndex = _this._popupContentLength - 1;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex--;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            var nextPopup = _this._$popupContent.find('.next-popup');\r\n\t            nextPopup.click(function () {\r\n\t                if (_this._popupContentLength == 1 && _this._currentPopupIndex > -1) {\r\n\t                    return;\r\n\t                }\r\n\t                if (_this._currentPopupIndex == _this._popupContentLength - 1) {\r\n\t                    _this._currentPopupIndex = 0;\r\n\t                }\r\n\t                else {\r\n\t                    _this._currentPopupIndex++;\r\n\t                }\r\n\t                _this._triggerFeatSelect();\r\n\t            });\r\n\t            if (_this._popupContentLength > 0) {\r\n\t                nextPopup.trigger('click');\r\n\t                _this._popupOverlay.setPosition(_this._popupCoordinate);\r\n\t                _this._$popupContent.scrollTop(0);\r\n\t                _this._popupOpen = true;\r\n\t            }\r\n\t        });\r\n\t        //change mouse cursor when over marker\r\n\t        this._map.on('pointermove', function (evt) {\r\n\t            if (evt['dragging']) {\r\n\t                return;\r\n\t            }\r\n\t            var pixel = _this.map.getEventPixel(evt['originalEvent']);\r\n\t            var hit = _this.map.hasFeatureAtPixel(pixel, function (lyrCandidate) {\r\n\t                for (var _i = 0, _a = _this._arrPopupOlLayers; _i < _a.length; _i++) {\r\n\t                    var olLayer = _a[_i];\r\n\t                    if (lyrCandidate == olLayer) {\r\n\t                        return true;\r\n\t                    }\r\n\t                }\r\n\t                return false;\r\n\t            });\r\n\t            var mapElement = _this.map.getTargetElement();\r\n\t            mapElement.style.cursor = hit ? 'pointer' : '';\r\n\t        });\r\n\t        return true;\r\n\t    };\r\n\t    /**\r\n\t     * helper to select features\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._triggerFeatSelect = function () {\r\n\t        var $currentPopupItemNumber = this._$popupContent.find('.current-popup-item-number');\r\n\t        var $innerPopup = this._$popupContent.find('.ol-popup-inner');\r\n\t        var $layerNameSpan = this._$popupContent.find('.current-popup-layer-name');\r\n\t        this.clearSelection();\r\n\t        var lyrFeatObj = this._passThroughLayerFeatureArray[this._currentPopupIndex];\r\n\t        $currentPopupItemNumber.html((this._currentPopupIndex + 1).toFixed());\r\n\t        $layerNameSpan.html(lyrFeatObj.layerName);\r\n\t        $innerPopup.html(lyrFeatObj.popupContent);\r\n\t        lyrFeatObj.selectionLayer.getSource().addFeature(lyrFeatObj.feature);\r\n\t        for (var _i = 0, _a = this._popupChangedFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f(this._$popupContent);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param feature - the ol feature\r\n\t     * @param {LayerEsriMapServer} lyr - the map server layer\r\n\t     * @param {string} popupContent - popup content\r\n\t     * @param {string} esriName - esri layer name\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopupContent = function (feature, lyr, popupContent, esriName) {\r\n\t        var featLayerObject = new FeatureLayerProperties(feature, lyr, this._popupContentLength, this._selectionLayerLookup[lyr.id], esriName);\r\n\t        featLayerObject.popupContent = popupContent;\r\n\t        this._passThroughLayerFeatureArray.push(featLayerObject);\r\n\t        this._popupContentLength++;\r\n\t        $('.popup-content-length').html(this._popupContentLength.toFixed());\r\n\t        if (!this._popupOpen) {\r\n\t            this._$popupContent.find('.next-popup').trigger('click');\r\n\t            this._popupOverlay.setPosition(this._popupCoordinate);\r\n\t            this._$popupContent.scrollTop(0);\r\n\t            this._popupOpen = true;\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param  pixel - the ol pixel\r\n\t     * @returns  feature layer properties\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._featuresAtPixel = function (pixel) {\r\n\t        var _this = this;\r\n\t        var layerFeatureObjectArray = [];\r\n\t        this.map.forEachFeatureAtPixel(pixel, function (feature, layer) {\r\n\t            var lyrIndex = _this._arrPopupOlLayers.indexOf(layer);\r\n\t            if (lyrIndex > -1) {\r\n\t                layerFeatureObjectArray.push(new FeatureLayerProperties(feature, _this._arrPopupLayers[lyrIndex], lyrIndex, _this._selectionLayers[lyrIndex]));\r\n\t            }\r\n\t        });\r\n\t        return layerFeatureObjectArray;\r\n\t    };\r\n\t    MapPopupCls.prototype.closePopup = function () {\r\n\t        this._checkInit();\r\n\t        this._popupOpen = false;\r\n\t        this._popupOverlay.setPosition(undefined);\r\n\t        this._$popupCloser[0].blur();\r\n\t        this.clearSelection();\r\n\t        this._$popupContent.html('');\r\n\t        return false;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param chgFunction - popup change function\r\n\t     */\r\n\t    MapPopupCls.prototype.addPopupChangedFunction = function (chgFunction) {\r\n\t        this._popupChangedFunctions.push(chgFunction);\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase|*} lyr - the layer being acted on\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns  the new selection layer\r\n\t     * @private\r\n\t     */\r\n\t    MapPopupCls.prototype._addPopupLayer = function (lyr, selectionStyle) {\r\n\t        this._checkInit();\r\n\t        selectionStyle = selectionStyle || {};\r\n\t        selectionStyle.color = selectionStyle.color || 'rgba(255,170,0,0.5)';\r\n\t        selectionStyle.width = selectionStyle.width || 10;\r\n\t        var theStyle;\r\n\t        if (selectionStyle.olStyle) {\r\n\t            theStyle = selectionStyle.olStyle;\r\n\t        }\r\n\t        else {\r\n\t            theStyle = new ol.style.Style({\r\n\t                stroke: new ol.style.Stroke({\r\n\t                    color: selectionStyle.color,\r\n\t                    width: selectionStyle.width\r\n\t                }),\r\n\t                image: new ol.style.Circle({\r\n\t                    radius: 7,\r\n\t                    fill: new ol.style.Fill({ color: selectionStyle.color }),\r\n\t                    stroke: new ol.style.Stroke({ color: selectionStyle.color, width: 1 })\r\n\t                }),\r\n\t                fill: new ol.style.Fill({\r\n\t                    color: selectionStyle.color\r\n\t                })\r\n\t            });\r\n\t        }\r\n\t        var selectionLayer = new ol.layer.Vector({\r\n\t            source: new ol.source.Vector(),\r\n\t            style: theStyle\r\n\t        });\r\n\t        selectionLayer.setZIndex(100);\r\n\t        this._selectionLayers.push(selectionLayer);\r\n\t        this._selectionLayerLookup[lyr.id] = selectionLayer;\r\n\t        this.map.addLayer(selectionLayer);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    /**\r\n\t     * Add popup to the map\r\n\t     * @param {LayerBase|*} lyr The layer that the popup with act on\r\n\t     * @param {popupCallback} popupContentFunction - popup content function that makes popup info\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addVectorPopup = function (lyr, popupContentFunction, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._arrPopupLayerIds.push(lyr.id);\r\n\t        this._arrPopupLayerNames.push(lyr.name);\r\n\t        this._arrPopupLayers.push(lyr);\r\n\t        this._arrPopupOlLayers.push(lyr.olLayer);\r\n\t        this._arrPopupContentFunction.push(popupContentFunction);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase} lyr - layer\r\n\t     */\r\n\t    MapPopupCls.prototype.removeVectorPopup = function (lyr) {\r\n\t        var idx = this._arrPopupLayerIds.indexOf(lyr.id);\r\n\t        if (idx > -1) {\r\n\t            this._arrPopupLayerIds.splice(idx, 1);\r\n\t            this._arrPopupLayerNames.splice(idx, 1);\r\n\t            this._arrPopupLayers.splice(idx, 1);\r\n\t            this._arrPopupOlLayers.splice(idx, 1);\r\n\t            this._arrPopupContentFunction.splice(idx, 1);\r\n\t            this._selectionLayers.splice(idx, 1);\r\n\t            delete this._selectionLayerLookup[lyr.id];\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerEsriMapServer} lyr - map server layer\r\n\t     * @param {object} [selectionStyle={}] the selection style configuration\r\n\t     * @param {string} [selectionStyle.color=rgba(255,170,0,0.5)] the selection color\r\n\t     * @param {number} [selectionStyle.width=10] the selection width for linear features\r\n\t     * @param {object|function} [selectionStyle.olStyle=undefined] an openlayers style object or function\r\n\t     * @returns {object} a reference to the ol selection layer\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapServicePopup = function (lyr, selectionStyle) {\r\n\t        var selectionLayer = this._addPopupLayer(lyr, selectionStyle);\r\n\t        this._esriMapServiceLayers.push(lyr);\r\n\t        return selectionLayer;\r\n\t    };\r\n\t    MapPopupCls.prototype.clearSelection = function () {\r\n\t        this._checkInit();\r\n\t        for (var i = 0; i < this._selectionLayers.length; i++) {\r\n\t            this._selectionLayers[i].getSource().clear();\r\n\t        }\r\n\t        for (var _i = 0, _a = this._mapClickFunctions; _i < _a.length; _i++) {\r\n\t            var f = _a[_i];\r\n\t            f();\r\n\t        }\r\n\t    };\r\n\t    ;\r\n\t    /**\r\n\t     * Add a function to be called when the map is clicked but before any popups are implemented\r\n\t     * @param {function} func - the map click function\r\n\t     */\r\n\t    MapPopupCls.prototype.addMapClickFunction = function (func) {\r\n\t        this._mapClickFunctions.push(func);\r\n\t    };\r\n\t    return MapPopupCls;\r\n\t}(mapInteractionBase_1.default));\r\n\texports.MapPopupCls = MapPopupCls;\r\n\tnm.MapPopupCls = MapPopupCls;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = MapPopupCls;\r\n\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar quickMapBase_1 = __webpack_require__(13);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param {object} [options={}] config options\r\n\t * @param {string} [options.divId=map] map div id\r\n\t * @param {object} [options.center={}] center config object\r\n\t * @param {number} [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param {number} [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param {number} [options.zoom=7] zoom level\r\n\t * @param {number} [options.minZoom=undefined] min zoom\r\n\t * @param {number} [options.maxZoom=undefined] max zoom\r\n\t * @param {boolean} [options.baseSwitcher=true] if add base map switcher\r\n\t * @param {boolean} [options.fullScreen=false] if add base map switcher\r\n\t * @returns {ol.Map} the ol map\r\n\t */\r\n\tfunction quickMap(options) {\r\n\t    var m = quickMapBase_1.quickMapBase(options);\r\n\t    mapMove_1.default.init(m);\r\n\t    mapPopup_1.default.init(m);\r\n\t    return m;\r\n\t}\r\n\texports.quickMap = quickMap;\r\n\tnm.quickMap = quickMap;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMap;\r\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/15/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('olHelpers');\r\n\t/**\r\n\t * Sets up a map with some default parameters and initializes\r\n\t * mapMove and mapPopup\r\n\t *\r\n\t * @param [options={}] config options\r\n\t * @param [options.divId=map] map div id\r\n\t * @param [options.center={}] center config object\r\n\t * @param [options.center.x=-10018378] center x, web mercator x or lon\r\n\t * @param [options.center.y=5574910] center y, web mercator y or lat\r\n\t * @param [options.zoom=7] zoom level\r\n\t * @param [options.minZoom=undefined] min zoom\r\n\t * @param [options.maxZoom=undefined] max zoom\r\n\t * @param [options.baseSwitcher=true] if add base map switcher\r\n\t * @param [options.fullScreen=false] if add base map switcher\r\n\t * @returns the ol map\r\n\t */\r\n\tfunction quickMapBase(options) {\r\n\t    options = options || {};\r\n\t    options.divId = options.divId || 'map';\r\n\t    options.center = options.center || { x: -10018378, y: 5574910 };\r\n\t    options.zoom = typeof options.zoom == 'number' ? options.zoom : 7;\r\n\t    options.baseSwitcher = typeof options.baseSwitcher == 'boolean' ? options.baseSwitcher : true;\r\n\t    options.fullScreen = typeof options.fullScreen == 'boolean' ? options.fullScreen : false;\r\n\t    var $mapDiv = $('#' + options.divId);\r\n\t    $mapDiv.css('position', 'relative');\r\n\t    var osmLayer = new ol.layer.Tile({ source: new ol.source.OSM() });\r\n\t    // let satLayer = new ol.layer.Tile({visible: false, source: new ol.source.MapQuest({layer: 'sat'})});\r\n\t    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+rauhF1awFpzCsmwUbjI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UmFrW2ptUmZyR2RxTGpxTWVyU2RyW2d5V2tzUmt0WW15VG15WXFuTHNtVnFxTXF4T3h0TnJzUnJ1XHJ4VXN6Wnp0VHx1W315VXp8XGR0YGx0YHVzZXJ0aHR9ZXV+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+iuT4GGhvV5K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.zoom < 0 || options.zoom > 28) {\r\n\t        throw 'zoom out of range';\r\n\t    }\r\n\t    if (options.center.x >= -180 && options.center.x <= 180 && options.center.y >= -90 && options.center.y <= 90) {\r\n\t        var p = new ol.geom.Point([options.center.x, options.center.y]);\r\n\t        new ol.proj.Projection({ code: \"EPSG:4326\" });\r\n\t        p.transform(new ol.proj.Projection({ code: \"EPSG:4326\" }), new ol.proj.Projection({ code: \"EPSG:3857\" }));\r\n\t        var coordinates = p.getCoordinates();\r\n\t        options.center.x = coordinates[0];\r\n\t        options.center.y = coordinates[1];\r\n\t    }\r\n\t    var controls = ol.control.defaults({\r\n\t        attributionOptions: { collapsible: false }\r\n\t    });\r\n\t    var view = new ol.View({\r\n\t        center: [options.center.x, options.center.y],\r\n\t        zoom: options.zoom,\r\n\t        minZoom: options.minZoom,\r\n\t        maxZoom: options.maxZoom\r\n\t    });\r\n\t    var map = new ol.Map({\r\n\t        layers: [osmLayer],\r\n\t        target: options.divId,\r\n\t        controls: controls,\r\n\t        view: view\r\n\t    });\r\n\t    if (options.fullScreen) {\r\n\t        map.addControl(new ol.control.FullScreen({}));\r\n\t    }\r\n\t    return map;\r\n\t}\r\n\texports.quickMapBase = quickMapBase;\r\n\tnm.quickMapBase = quickMapBase;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = quickMapBase;\r\n\n\n/***/ },\n/* 14 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/14/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar nm = provide_1.default('olHelpers.zoomResolutionConvert');\r\n\tvar _zoomResLookup = [\r\n\t    156543.03392804097,\r\n\t    78271.51696402048,\r\n\t    39135.75848201024,\r\n\t    19567.87924100512,\r\n\t    9783.93962050256,\r\n\t    4891.96981025128,\r\n\t    2445.98490512564,\r\n\t    1222.99245256282,\r\n\t    611.49622628141,\r\n\t    305.748113140705,\r\n\t    152.8740565703525,\r\n\t    76.43702828517625,\r\n\t    38.21851414258813,\r\n\t    19.109257071294063,\r\n\t    9.554628535647032,\r\n\t    4.777314267823516,\r\n\t    2.388657133911758,\r\n\t    1.194328566955879,\r\n\t    0.5971642834779395,\r\n\t    0.29858214173896974,\r\n\t    0.14929107086948487,\r\n\t    0.07464553543474244,\r\n\t    0.03732276771737122,\r\n\t    0.01866138385868561,\r\n\t    0.009330691929342804,\r\n\t    0.004665345964671402,\r\n\t    0.002332672982335701,\r\n\t    0.0011663364911678506,\r\n\t    0.0005831682455839253 //28\r\n\t];\r\n\t/**\r\n\t * Get the resolution given the zoom level\r\n\t * @param {number} zoomLevel - the zoom level\r\n\t * @returns {number|*} the map resolution\r\n\t */\r\n\tfunction zoomToResolution(zoomLevel) {\r\n\t    \"use strict\";\r\n\t    if (typeof zoomLevel == 'number') {\r\n\t        if (zoomLevel % 1 === 0 && zoomLevel >= 0 && zoomLevel <= 28) {\r\n\t            return _zoomResLookup[zoomLevel];\r\n\t        }\r\n\t        else {\r\n\t            console.log(\"invalid zoom level provided: \" + zoomLevel);\r\n\t            return undefined;\r\n\t        }\r\n\t    }\r\n\t    else {\r\n\t        return undefined;\r\n\t    }\r\n\t}\r\n\texports.zoomToResolution = zoomToResolution;\r\n\tnm.zoomToResolution = zoomToResolution;\r\n\t/**\r\n\t * Get resolution from the zoom level\r\n\t * @param {number} resolution - the resolution\r\n\t * @returns {number|*} the zoom level\r\n\t */\r\n\tfunction resolutionToZoom(resolution) {\r\n\t    for (var i = 0; i < _zoomResLookup.length; i++) {\r\n\t        if (resolution >= _zoomResLookup[i]) {\r\n\t            return i;\r\n\t        }\r\n\t    }\r\n\t    return 0;\r\n\t}\r\n\texports.resolutionToZoom = resolutionToZoom;\r\n\tnm.resolutionToZoom = resolutionToZoom;\r\n\n\n/***/ },\n/* 15 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 1/4/2016.\r\n\t */\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar nm = provide_1.default('olHelpers.esriToOlStyle');\r\n\t/**\r\n\t * This callback is displayed as part of the Requester class.\r\n\t * @callback styleFunc\r\n\t * @param {ol.Feature} feat - openlayers feature\r\n\t * @param {number} resolution - map resolution\r\n\t */\r\n\t/**\r\n\t *\r\n\t * @param {Array<number>} colorArray - input color array\r\n\t * @param {number} opacity - the opacity 0 to 1\r\n\t * @returns {string} rgba string\r\n\t * @private\r\n\t */\r\n\tfunction _colorArrayToRgba(colorArray, opacity) {\r\n\t    \"use strict\";\r\n\t    return \"rgba(\" + colorArray[0] + \",\" + colorArray[1] + \",\" + colorArray[2] + \",\" + opacity + \")\";\r\n\t}\r\n\t/**\r\n\t * escape html charcters\r\n\t * @param {string} str - input string\r\n\t * @returns {string} escaped string\r\n\t */\r\n\tfunction htmlEscape(str) {\r\n\t    return String(str)\r\n\t        .replace(/&/g, '&amp;')\r\n\t        .replace(/\"/g, '&quot;')\r\n\t        .replace(/'/g, '&#39;')\r\n\t        .replace(/</g, '&lt;')\r\n\t        .replace(/>/g, '&gt;');\r\n\t}\r\n\tnm.htmlEscape = htmlEscape;\r\n\tvar CommonSymbol = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param symbolObj\r\n\t     * @param {number} opacity\r\n\t     */\r\n\t    function CommonSymbol(symbolObj, opacity) {\r\n\t        this.symbolObj = symbolObj;\r\n\t        this.opacity = opacity;\r\n\t        this.olStyle = undefined;\r\n\t        this.legendHtml = '';\r\n\t    }\r\n\t    return CommonSymbol;\r\n\t}());\r\n\tvar PointSymbol = (function (_super) {\r\n\t    __extends(PointSymbol, _super);\r\n\t    function PointSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj.type) {\r\n\t            case 'esriSMS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n\t                var outlineWidth = _this.symbolObj.outline.width;\r\n\t                var radius = _this.symbolObj.size;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    image: new ol.style.Circle({\r\n\t                        radius: radius,\r\n\t                        fill: new ol.style.Fill({\r\n\t                            color: innerColor\r\n\t                        }),\r\n\t                        stroke: new ol.style.Stroke({ color: outerColor, width: outlineWidth })\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" style=\\\"color: \" + innerColor + \"\\\">&#9679;</span>\";\r\n\t                break;\r\n\t            case 'esriPMS':\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    image: new ol.style.Icon({ src: \"data:image/png;base64,\" + _this.symbolObj['imageData'] })\r\n\t                });\r\n\t                _this.legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + _this.symbolObj['imageData'] + \"\\\">\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Point symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return PointSymbol;\r\n\t}(CommonSymbol));\r\n\tvar LineSymbol = (function (_super) {\r\n\t    __extends(LineSymbol, _super);\r\n\t    function LineSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj.type) {\r\n\t            case 'esriSLS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var lineWidth = _this.symbolObj.width;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    stroke: new ol.style.Stroke({\r\n\t                        color: innerColor,\r\n\t                        //lineDash: [4],\r\n\t                        width: lineWidth\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n\t                _this.legendHtml += \"style=\\\"\";\r\n\t                _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n\t                _this.legendHtml += \"width: 40px;\";\r\n\t                _this.legendHtml += \"height: 4px;\";\r\n\t                _this.legendHtml += \"position: relative;\";\r\n\t                _this.legendHtml += \"display: inline-block;\";\r\n\t                _this.legendHtml += \"top: -1px;\";\r\n\t                _this.legendHtml += \"\\\"></span>\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Line symbol does not handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return LineSymbol;\r\n\t}(CommonSymbol));\r\n\tvar PolygonSymbol = (function (_super) {\r\n\t    __extends(PolygonSymbol, _super);\r\n\t    function PolygonSymbol(symbolObj, opacity) {\r\n\t        var _this = _super.call(this, symbolObj, opacity) || this;\r\n\t        switch (_this.symbolObj['type']) {\r\n\t            case 'esriSFS':\r\n\t                var innerColor = _colorArrayToRgba(_this.symbolObj.color, _this.opacity);\r\n\t                var outerColor = _colorArrayToRgba(_this.symbolObj.outline.color, _this.opacity);\r\n\t                var outlineWidth = _this.symbolObj.outline.width;\r\n\t                _this.olStyle = new ol.style.Style({\r\n\t                    stroke: new ol.style.Stroke({\r\n\t                        color: outerColor,\r\n\t                        //lineDash: [4],\r\n\t                        width: outlineWidth\r\n\t                    }),\r\n\t                    fill: new ol.style.Fill({\r\n\t                        color: innerColor\r\n\t                    })\r\n\t                });\r\n\t                _this.legendHtml = \"<span class=\\\"legend-layer-icon\\\" \";\r\n\t                _this.legendHtml += \"style=\\\"\";\r\n\t                _this.legendHtml += \"background-color: \" + innerColor + \";\";\r\n\t                _this.legendHtml += \"border: solid \" + outerColor + \" 1px;\";\r\n\t                _this.legendHtml += \"width: 40px;\";\r\n\t                _this.legendHtml += \"height: 9px;\";\r\n\t                _this.legendHtml += \"position: relative;\";\r\n\t                _this.legendHtml += \"display: inline-block;\";\r\n\t                _this.legendHtml += \"top: 2px;\";\r\n\t                _this.legendHtml += \"\\\"></span>\";\r\n\t                break;\r\n\t            default:\r\n\t                console.log(_this.symbolObj);\r\n\t                alert('Polygon symbol does handle symbol type: ' + _this.symbolObj['type']);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    return PolygonSymbol;\r\n\t}(CommonSymbol));\r\n\tvar SymbolGenerator = (function () {\r\n\t    function SymbolGenerator(esriResponse) {\r\n\t        this.opacity = (100 - (esriResponse['drawingInfo']['transparency'] || 0)) / 100;\r\n\t        this.renderer = esriResponse.drawingInfo.renderer;\r\n\t        this.olStyle = undefined;\r\n\t        this.legendHtml = '';\r\n\t    }\r\n\t    return SymbolGenerator;\r\n\t}());\r\n\tvar SingleSymbol = (function (_super) {\r\n\t    __extends(SingleSymbol, _super);\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} esriResponse - layer info\r\n\t     * @param SymbolClass - the symbol class to use\r\n\t     */\r\n\t    function SingleSymbol(esriResponse, SymbolClass) {\r\n\t        var _this = _super.call(this, esriResponse) || this;\r\n\t        _this.symbol = _this.renderer.symbol;\r\n\t        var symbolObj = new SymbolClass(_this.symbol, _this.opacity);\r\n\t        _this.olStyle = symbolObj.olStyle;\r\n\t        _this.legendHtml = symbolObj.legendHtml;\r\n\t        return _this;\r\n\t    }\r\n\t    return SingleSymbol;\r\n\t}(SymbolGenerator));\r\n\tvar UniqueValueSymbol = (function (_super) {\r\n\t    __extends(UniqueValueSymbol, _super);\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} esriResponse - layer info\r\n\t     * @param SymbolClass - the Symbol class definition\r\n\t     */\r\n\t    function UniqueValueSymbol(esriResponse, SymbolClass) {\r\n\t        var _this = _super.call(this, esriResponse) || this;\r\n\t        _this.uniqueValueInfos = _this.renderer['uniqueValueInfos'];\r\n\t        _this.propertyName = _this.renderer['field1'];\r\n\t        _this.defaultSymbol = _this.renderer['defaultSymbol'];\r\n\t        if (_this.defaultSymbol) {\r\n\t            var symbolObj = new SymbolClass(_this.defaultSymbol, _this.opacity);\r\n\t            _this.defaultStyle = symbolObj.olStyle;\r\n\t            _this.defaultLabelHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(_this.renderer['defaultLabel']) + \"</span>\" + symbolObj.legendHtml;\r\n\t        }\r\n\t        else {\r\n\t            _this.defaultStyle = undefined;\r\n\t            _this.defaultLabelHtml = 'other';\r\n\t        }\r\n\t        _this.valueArray = [];\r\n\t        _this.labelArray = [];\r\n\t        _this.legendArray = [];\r\n\t        _this.propertyStyleLookup = {};\r\n\t        for (var _i = 0, _a = _this.uniqueValueInfos; _i < _a.length; _i++) {\r\n\t            var uniqueVal = _a[_i];\r\n\t            _this.labelArray.push(uniqueVal['label']);\r\n\t            _this.valueArray.push(uniqueVal['value']);\r\n\t            var uniqueSym = new SymbolClass(uniqueVal.symbol, _this.opacity);\r\n\t            _this.legendArray.push(\"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(uniqueVal['label']) + \"</span>\" + uniqueSym.legendHtml);\r\n\t            _this.propertyStyleLookup[uniqueVal['value']] = uniqueSym.olStyle;\r\n\t        }\r\n\t        _this.olStyle = function (feature) {\r\n\t            var checkProperties = feature.getProperties();\r\n\t            var checkProperty = checkProperties[_this.propertyName];\r\n\t            var returnValue;\r\n\t            if (_this.propertyStyleLookup[checkProperty] !== undefined) {\r\n\t                returnValue = [_this.propertyStyleLookup[checkProperty]];\r\n\t            }\r\n\t            else {\r\n\t                returnValue = [_this.defaultStyle];\r\n\t            }\r\n\t            return returnValue;\r\n\t        };\r\n\t        if (_this.defaultLabelHtml !== null) {\r\n\t            _this.legendArray.push(_this.defaultLabelHtml);\r\n\t        }\r\n\t        _this.legendHtml = '<ul>';\r\n\t        for (var _b = 0, _c = _this.legendArray; _b < _c.length; _b++) {\r\n\t            var h = _c[_b];\r\n\t            _this.legendHtml += \"<li>\" + h + \"</li>\";\r\n\t        }\r\n\t        _this.legendHtml += '</ul>';\r\n\t        return _this;\r\n\t    }\r\n\t    return UniqueValueSymbol;\r\n\t}(SymbolGenerator));\r\n\t/**\r\n\t * style and legend object\r\n\t * @typedef {object} styleAndLegend\r\n\t * @property {styleFunc} style - style function\r\n\t * @property {string} legend - legend content\r\n\t */\r\n\t/**\r\n\t *\r\n\t * @param {object} esriResponse - layer info\r\n\t * @returns {styleAndLegend} style and legend object\r\n\t */\r\n\tfunction makeFeatureServiceLegendAndSymbol(esriResponse) {\r\n\t    \"use strict\";\r\n\t    var renderer = esriResponse.drawingInfo.renderer;\r\n\t    var symbolLegendOut = null;\r\n\t    switch (renderer.type) {\r\n\t        case 'simple':\r\n\t            switch (esriResponse.geometryType) {\r\n\t                case 'esriGeometryPoint':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, PointSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolyline':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, LineSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolygon':\r\n\t                    symbolLegendOut = new SingleSymbol(esriResponse, PolygonSymbol);\r\n\t                    break;\r\n\t                default:\r\n\t                    console.log(esriResponse);\r\n\t                    alert(esriResponse.geometryType + ' not handled');\r\n\t            }\r\n\t            break;\r\n\t        case 'uniqueValue':\r\n\t            switch (esriResponse.geometryType) {\r\n\t                case 'esriGeometryPoint':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, PointSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolyline':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, LineSymbol);\r\n\t                    break;\r\n\t                case 'esriGeometryPolygon':\r\n\t                    symbolLegendOut = new UniqueValueSymbol(esriResponse, PolygonSymbol);\r\n\t                    break;\r\n\t                default:\r\n\t                    console.log(esriResponse);\r\n\t                    alert(esriResponse['geometryType'] + ' not handled');\r\n\t            }\r\n\t            break;\r\n\t        default:\r\n\t            alert('not handled renderer type: ' + renderer['type']);\r\n\t    }\r\n\t    if (symbolLegendOut == null) {\r\n\t        return { style: undefined, legend: '' };\r\n\t    }\r\n\t    else {\r\n\t        return { style: symbolLegendOut.olStyle, legend: symbolLegendOut.legendHtml };\r\n\t    }\r\n\t}\r\n\texports.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\tnm.makeFeatureServiceLegendAndSymbol = makeFeatureServiceLegendAndSymbol;\r\n\t/**\r\n\t *\r\n\t * @param {object} lyrObject - the layer as defined in the response\r\n\t * @param {boolean} [skipLayerNameAndExpander=false] use only icons\r\n\t * @returns {string} legend html\r\n\t */\r\n\tfunction mapServiceLegendItem(lyrObject, skipLayerNameAndExpander) {\r\n\t    if (skipLayerNameAndExpander === void 0) { skipLayerNameAndExpander = false; }\r\n\t    skipLayerNameAndExpander = typeof skipLayerNameAndExpander == 'boolean' ? skipLayerNameAndExpander : false;\r\n\t    var layerName = lyrObject['layerName'];\r\n\t    var legendItems = lyrObject['legend'];\r\n\t    var legendHtml = '';\r\n\t    if (!skipLayerNameAndExpander) {\r\n\t        legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\";\r\n\t    }\r\n\t    if (legendItems.length == 1) {\r\n\t        legendHtml = \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[0]['imageData'] + \"\\\">\";\r\n\t    }\r\n\t    else {\r\n\t        if (!skipLayerNameAndExpander) {\r\n\t            legendHtml += '<span class=\"legend-items-expander\" title=\"Expand/Collapse\">&#9660;</span>';\r\n\t        }\r\n\t        legendHtml += '<ul>';\r\n\t        for (var i = 0; i < legendItems.length; i++) {\r\n\t            legendHtml += \"<li>\";\r\n\t            legendHtml += \"<span class=\\\"legend-layer-subitem\\\">\" + htmlEscape(legendItems[i]['label']) + \"</span>\";\r\n\t            legendHtml += \"<img class=\\\"legend-layer-icon\\\" height=\\\"17\\\" src=\\\"data:image/png;base64,\" + legendItems[i]['imageData'] + \"\\\">\";\r\n\t            legendHtml += \"</li>\";\r\n\t        }\r\n\t        legendHtml += '</ul>';\r\n\t    }\r\n\t    if (!skipLayerNameAndExpander) {\r\n\t        legendHtml = \"<span class=\\\"legend-layer-subitem\\\">\" + layerName + \"</span>\" + legendHtml;\r\n\t    }\r\n\t    return legendHtml;\r\n\t}\r\n\t/**\r\n\t * make map service legent\r\n\t * @param {object} esriResponse - layer info\r\n\t * @returns {string} legend content\r\n\t */\r\n\tfunction makeMapServiceLegend(esriResponse) {\r\n\t    \"use strict\";\r\n\t    var newLegendHtml = '';\r\n\t    var layers = esriResponse['layers'];\r\n\t    if (layers.length == 1) {\r\n\t        newLegendHtml += mapServiceLegendItem(layers[0], true);\r\n\t    }\r\n\t    else {\r\n\t        newLegendHtml += '<ul>';\r\n\t        for (var i = 0; i < layers.length; i++) {\r\n\t            newLegendHtml += '<li>' + mapServiceLegendItem(layers[i]) + '</li>';\r\n\t        }\r\n\t        newLegendHtml += '</ul>';\r\n\t    }\r\n\t    return newLegendHtml;\r\n\t}\r\n\texports.makeMapServiceLegend = makeMapServiceLegend;\r\n\tnm.makeMapServiceLegend = makeMapServiceLegend;\r\n\n\n/***/ },\n/* 16 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\tvar __extends = (this && this.__extends) || function (d, b) {\r\n\t    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\r\n\t    function __() { this.constructor = d; }\r\n\t    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n\t};\r\n\t/**\r\n\t * Created by gavorhes on 12/7/2015.\r\n\t */\r\n\tvar LayerBase_1 = __webpack_require__(8);\r\n\tvar esriToOl = __webpack_require__(15);\r\n\tvar mapPopup_1 = __webpack_require__(5);\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar ol = __webpack_require__(3);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('layers');\r\n\t/**\r\n\t * esri mapserver layer\r\n\t * @augments LayerBase\r\n\t */\r\n\tvar LayerEsriMapServer = (function (_super) {\r\n\t    __extends(LayerEsriMapServer, _super);\r\n\t    /**\r\n\t     * The base layer for all others\r\n\t     * @param {string} url - resource url\r\n\t     * @param {object} [options] - config\r\n\t     * @param {string} [options.id] - layer id\r\n\t     * @param {string} [options.name=Unnamed Layer] - layer name\r\n\t     * @param {number} [options.opacity=1] - opacity\r\n\t     * @param {boolean} [options.visible=true] - default visible\r\n\t     * @param {number} [options.minZoom=undefined] - min zoom level, 0 - 28\r\n\t     * @param {number} [options.maxZoom=undefined] - max zoom level, 0 - 28\r\n\t     * @param {object} [options.params={}] the get parameters to include to retrieve the layer\r\n\t     * @param {number} [options.zIndex=0] the z index for the layer\r\n\t     * @param {function} [options.loadCallback] function to call on load, context this is the layer object\r\n\t     * @param {boolean} [options.legendCollapse=false] if the legend item should be initially collapsed\r\n\t     * @param {boolean} [options.legendCheckbox=true] if the legend item should have a checkbox for visibility\r\n\t     * @param {boolean} [options.legendContent] additional content to add to the legend\r\n\t     * @param {boolean} [options.addPopup=false] if a popup should be added\r\n\t     * @param {undefined|Array<number>} [options.showLayers=undefined] if a popup should be added\r\n\t     */\r\n\t    function LayerEsriMapServer(url, options) {\r\n\t        if (options === void 0) { options = {}; }\r\n\t        var _this = _super.call(this, url, options) || this;\r\n\t        _this._source = new ol.source.TileArcGISRest({\r\n\t            url: _this.url == '' ? undefined : _this.url,\r\n\t            params: typeof options.showLayers == 'undefined' ? undefined : { layers: 'show:' + options.showLayers.join(',') }\r\n\t        });\r\n\t        _this._olLayer = new ol.layer.Tile({\r\n\t            source: _this._source,\r\n\t            visible: _this.visible,\r\n\t            opacity: _this.opacity,\r\n\t            minResolution: _this._minResolution,\r\n\t            maxResolution: _this._maxResolution\r\n\t        });\r\n\t        _this._olLayer.setZIndex(_this._zIndex);\r\n\t        options.addPopup = typeof options.addPopup == 'boolean' ? options.addPopup : false;\r\n\t        _this._esriFormat = new ol.format.EsriJSON();\r\n\t        _this._popupRequest = null;\r\n\t        _this.addLegendContent();\r\n\t        if (options.addPopup) {\r\n\t            mapPopup_1.default.addMapServicePopup(_this);\r\n\t        }\r\n\t        return _this;\r\n\t    }\r\n\t    /**\r\n\t     * add additional content to the legend\r\n\t     * @param {string} [additionalContent=''] additional content for legend\r\n\t     */\r\n\t    LayerEsriMapServer.prototype.addLegendContent = function (additionalContent) {\r\n\t        var _this = this;\r\n\t        var urlCopy = this.url;\r\n\t        if (urlCopy[urlCopy.length - 1] !== '/') {\r\n\t            urlCopy += '/';\r\n\t        }\r\n\t        urlCopy += 'legend?f=pjson&callback=?';\r\n\t        $.get(urlCopy, {}, function (d) {\r\n\t            var newHtml = esriToOl.makeMapServiceLegend(d);\r\n\t            _super.prototype.addLegendContent.call(_this, newHtml);\r\n\t        }, 'json');\r\n\t    };\r\n\t    LayerEsriMapServer.prototype.getPopupInfo = function (queryParams) {\r\n\t        if (!this.visible) {\r\n\t            return;\r\n\t        }\r\n\t        var urlCopy = this.url;\r\n\t        if (urlCopy[urlCopy.length - 1] != '/') {\r\n\t            urlCopy += '/';\r\n\t        }\r\n\t        urlCopy += 'identify?callback=?';\r\n\t        var __this = this;\r\n\t        if (this._popupRequest != null) {\r\n\t            this._popupRequest.abort();\r\n\t        }\r\n\t        this._popupRequest = $.get(urlCopy, queryParams, function (d) {\r\n\t            for (var _i = 0, _a = d['results']; _i < _a.length; _i++) {\r\n\t                var r = _a[_i];\r\n\t                var popupHtml = '<table class=\"esri-popup-table\">';\r\n\t                for (var a in r['attributes']) {\r\n\t                    if (r['attributes'].hasOwnProperty(a)) {\r\n\t                        var attrVal = r['attributes'][a];\r\n\t                        if (attrVal == null || attrVal.toString().toLowerCase() == 'null') {\r\n\t                            continue;\r\n\t                        }\r\n\t                        var attr = a;\r\n\t                        if (attr.length > 14) {\r\n\t                            attr = attr.slice(0, 11) + '...';\r\n\t                        }\r\n\t                        popupHtml += \"<tr><td>\" + attr + \"</td><td>\" + attrVal + \"</td></tr>\";\r\n\t                    }\r\n\t                }\r\n\t                popupHtml += '</table>';\r\n\t                mapPopup_1.default.addMapServicePopupContent(__this._esriFormat.readFeature(r), __this, popupHtml, r['layerName']);\r\n\t            }\r\n\t        }, 'json');\r\n\t        this._popupRequest.always(function () {\r\n\t            __this._popupRequest = null;\r\n\t        });\r\n\t    };\r\n\t    Object.defineProperty(LayerEsriMapServer.prototype, \"source\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {ol.source.TileArcGISRest} the vector source\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getSource.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(LayerEsriMapServer.prototype, \"olLayer\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns the ol layer\r\n\t         */\r\n\t        get: function () {\r\n\t            return _super.prototype.getOlLayer.call(this);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return LayerEsriMapServer;\r\n\t}(LayerBase_1.LayerBase));\r\n\texports.LayerEsriMapServer = LayerEsriMapServer;\r\n\tnm.LayerEsriMapServer = LayerEsriMapServer;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerEsriMapServer;\r\n\n\n/***/ },\n/* 17 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/16/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar makeGuid_1 = __webpack_require__(4);\r\n\tvar mapMove_1 = __webpack_require__(7);\r\n\tvar nm = provide_1.default('collections');\r\n\tvar $ = __webpack_require__(2);\r\n\tvar LayerGroup = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} [groupConfig={}] - group configuration object\r\n\t     * @param {string} groupConfig.groupName - the group name\r\n\t     * @param {boolean} [groupConfig.collapse=false] - if the group should be collapsed initially\r\n\t     * @param {boolean} [groupConfig.addCheck=true] - if the group should have a checkbox controlling visibility of all layers\r\n\t     * @param {LayerGroup} [parent=undefined] - the parent group\r\n\t     */\r\n\t    function LayerGroup(groupConfig, parent) {\r\n\t        this.groupLayers = [];\r\n\t        this.groupLayersLookup = {};\r\n\t        this.groupGroups = [];\r\n\t        this.groupGroupsLookup = {};\r\n\t        this.itemIdArray = [];\r\n\t        if (typeof groupConfig == 'undefined') {\r\n\t            this.parent = null;\r\n\t            this.groupId = 'root';\r\n\t            this.groupName = 'root';\r\n\t            this.allGroupLookup = { root: this };\r\n\t            this.allGroupArray = [this];\r\n\t            this.allLayerArray = [];\r\n\t            this.allLayerLookup = {};\r\n\t            this.layerParentLookup = {};\r\n\t            this.collapse = false;\r\n\t            this.addCheck = false;\r\n\t        }\r\n\t        else {\r\n\t            this.groupId = makeGuid_1.default();\r\n\t            this.parent = parent;\r\n\t            this.groupName = groupConfig.groupName;\r\n\t            this.collapse = typeof groupConfig.collapse == 'boolean' ? groupConfig.collapse : false;\r\n\t            this.addCheck = typeof groupConfig.addCheck == 'boolean' ? groupConfig.addCheck : true;\r\n\t        }\r\n\t    }\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} groupConfig - configuration object\r\n\t     * @param {string} groupConfig.groupName - the group name\r\n\t     * @param {boolean} groupConfig.collapse if the group should be collapsed initially\r\n\t     * @param {boolean} groupConfig.addCheck if the group should have a checkbox controlling visibility of all layers\r\n\t     * @param {Array<LayerGroup>} parents parent groups\r\n\t     * @returns {LayerGroup} the layer group just added\r\n\t     */\r\n\t    LayerGroup.prototype.addGroup = function (groupConfig, parents) {\r\n\t        var parent;\r\n\t        if (parents.length > 0) {\r\n\t            parent = parents[parents.length - 1];\r\n\t        }\r\n\t        else {\r\n\t            parent = 'root';\r\n\t        }\r\n\t        /**\r\n\t         * @type {LayerGroup}\r\n\t         */\r\n\t        var parentGroup = this.allGroupLookup[parent];\r\n\t        var newGroup = new LayerGroup(groupConfig, parentGroup);\r\n\t        this.allGroupLookup[newGroup.groupId] = newGroup;\r\n\t        this.allGroupArray.push(newGroup);\r\n\t        parentGroup.groupGroups.push(newGroup);\r\n\t        parentGroup.groupGroupsLookup[newGroup.groupId] = newGroup;\r\n\t        if (parentGroup.itemIdArray.indexOf(newGroup.groupId) > 0) {\r\n\t            console.log(newGroup.groupId);\r\n\t            throw 'layer and group ids must be unique';\r\n\t        }\r\n\t        parentGroup.itemIdArray.push(newGroup.groupId);\r\n\t        return newGroup;\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {LayerBase} newLayer the layer to be added\r\n\t     * @param {Array} parents array\r\n\t     */\r\n\t    LayerGroup.prototype.addLegendLayer = function (newLayer, parents) {\r\n\t        var parent;\r\n\t        if (parents.length > 0) {\r\n\t            parent = parents[parents.length - 1];\r\n\t        }\r\n\t        else {\r\n\t            parent = 'root';\r\n\t        }\r\n\t        this.allLayerLookup[newLayer.id] = newLayer;\r\n\t        this.allLayerArray.push(newLayer);\r\n\t        /**\r\n\t         * @type {LayerGroup}\r\n\t         */\r\n\t        var parentGroup = this.allGroupLookup[parent];\r\n\t        parentGroup.groupLayers.push(newLayer);\r\n\t        parentGroup.groupLayersLookup[newLayer.id] = newLayer;\r\n\t        if (parentGroup.itemIdArray.indexOf(newLayer.id) > 0) {\r\n\t            console.log(newLayer.id);\r\n\t            throw 'layer and group ids must be unique';\r\n\t        }\r\n\t        parentGroup.itemIdArray.push(newLayer.id);\r\n\t        this.layerParentLookup[newLayer.id] = parentGroup;\r\n\t    };\r\n\t    LayerGroup.prototype.getLegendHtml = function (legendId, options) {\r\n\t        var legendHtml = \"<ul id=\\\"\" + legendId + \"\\\" class=\\\"legend-container\\\">\";\r\n\t        legendHtml += \"<li>\" + options.legendTitle + \"<input type=\\\"checkbox\\\" checked id=\\\"suppress-by-extent-\" + legendId + \"\\\" class=\\\"suppress-by-extent\\\">\" +\r\n\t            (\"<label title=\\\"Suppress layers not visible at this zoom level\\\" for=\\\"suppress-by-extent-\" + legendId + \"\\\">\") +\r\n\t            \"<span></span>\" +\r\n\t            \"</label></li>\";\r\n\t        legendHtml += this._buildLegend(this.itemIdArray, this, options.layerDivClasses) + '</ul>';\r\n\t        return legendHtml;\r\n\t    };\r\n\t    /**\r\n\t     * @param {Array} itemIds the items to process\r\n\t     * @param {LayerGroup} theGroup new group\r\n\t     * @param {Array} [layerDivClasses=[]] optional classes to apply to the layer divs\r\n\t     * @static\r\n\t     * @returns {string} html string\r\n\t     */\r\n\t    LayerGroup.prototype._buildLegend = function (itemIds, theGroup, layerDivClasses) {\r\n\t        if (itemIds.length == 0) {\r\n\t            return '';\r\n\t        }\r\n\t        var theHml = '';\r\n\t        var itemId = itemIds[0];\r\n\t        if (theGroup.groupLayersLookup[itemId]) {\r\n\t            /**\r\n\t             * @type {LayerBase}\r\n\t             */\r\n\t            var lyr = theGroup.groupLayersLookup[itemId];\r\n\t            theHml += \"<li id=\\\"\" + lyr.id + \"-layer-li\\\" class=\\\"legend-layer-li \" + layerDivClasses.join(' ') + \"\\\">\" + lyr.getLegendDiv() + '</li>';\r\n\t        }\r\n\t        else if (theGroup.groupGroupsLookup[itemId]) {\r\n\t            /**\r\n\t             * type {LayerGroup}\r\n\t             */\r\n\t            var otherGroup = theGroup.groupGroupsLookup[itemId];\r\n\t            theHml += \"<li>\";\r\n\t            theHml += \"<div id=\\\"\" + otherGroup.groupId + \"-legend-layer-div\\\" \" +\r\n\t                (\"class=\\\"legend-layer-group  \" + layerDivClasses.join(' ') + \"\\\">\");\r\n\t            if (otherGroup.addCheck) {\r\n\t                theHml += \"<input type=\\\"checkbox\\\" checked id=\\\"\" + otherGroup.groupId + \"-group-chck\\\">\" +\r\n\t                    (\"<label for=\\\"\" + otherGroup.groupId + \"-group-chck\\\" title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\");\r\n\t            }\r\n\t            else {\r\n\t                theHml += \"<label title=\\\"Click arrow to expand or collapse\\\">\" + otherGroup.groupName + \"</label>\";\r\n\t            }\r\n\t            theHml += \"<span title=\\\"Expand/Collapse\\\" class=\\\"layer-group-expander\";\r\n\t            theHml += (otherGroup.collapse ? ' legend-layer-group-initial-collapse' : '') + \"\\\">\";\r\n\t            theHml += otherGroup.collapse ? '&#9654;' : '&#9660;';\r\n\t            theHml += '</span>';\r\n\t            //parents.push(groupId);\r\n\t            theHml += '<ul>' + this._buildLegend(otherGroup.itemIdArray, otherGroup, layerDivClasses) + '</ul>';\r\n\t            theHml += '</div>';\r\n\t            theHml += '</li>';\r\n\t        }\r\n\t        return theHml + this._buildLegend(itemIds.slice(1), theGroup, layerDivClasses);\r\n\t    };\r\n\t    return LayerGroup;\r\n\t}());\r\n\t/**\r\n\t * a wrapper to make a legend\r\n\t */\r\n\tvar LayerLegend = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param {Array} legendItems array of layers or objects with {groupName:  {string}, collapse: {boolean}, addCheck: {boolean}, items: {Array}}\r\n\t     * @param {string} divId the div where the legend should be added\r\n\t     * @param {object} options for legend\r\n\t     * @param {Array} [options.layerDivClasses=[]] optional array of classes to be applied to the layer legend divs for custom styling\r\n\t     * @param {string} [options.legendTitle=Legend] the legend title\r\n\t     * @param {boolean} [options.scaleDependent=true] if legend display is scale dependent\r\n\t     */\r\n\t    function LayerLegend(legendItems, divId, options) {\r\n\t        for (var _i = 0, legendItems_1 = legendItems; _i < legendItems_1.length; _i++) {\r\n\t            var i = legendItems_1[_i];\r\n\t            if (typeof i == 'undefined') {\r\n\t                throw 'undefined item passed in array to legend constructor';\r\n\t            }\r\n\t        }\r\n\t        options = options || {};\r\n\t        options.legendTitle = typeof options.legendTitle == 'string' ? options.legendTitle : 'Legend';\r\n\t        options.scaleDependent = typeof options.scaleDependent == 'boolean' ? options.scaleDependent : true;\r\n\t        options.layerDivClasses = options.layerDivClasses || [];\r\n\t        // if legend display is scale dependent, make sure the mapMove object is initialized first\r\n\t        if (options.scaleDependent) {\r\n\t            mapMove_1.default.checkInit();\r\n\t        }\r\n\t        this.$divElement = $('#' + divId);\r\n\t        this._legendItems = legendItems;\r\n\t        this.layerGroup = new LayerGroup();\r\n\t        this._buildTree(legendItems);\r\n\t        this.legendId = makeGuid_1.default();\r\n\t        this.$divElement.append(this.layerGroup.getLegendHtml(this.legendId, options));\r\n\t        for (var _a = 0, _b = this.layerGroup.allLayerArray; _a < _b.length; _a++) {\r\n\t            var l = _b[_a];\r\n\t            l.applyCollapse();\r\n\t        }\r\n\t        var _this = this;\r\n\t        //// if legend display is scale dependent, make sure the mapMove object is initialized first\r\n\t        if (options.scaleDependent) {\r\n\t            mapMove_1.default.checkInit();\r\n\t            mapMove_1.default.addCallback(function (ext, zoom, evt) {\r\n\t                if (typeof evt == 'undefined' || evt == 'change:resolution') {\r\n\t                    for (var _i = 0, _a = this.layerGroup.allLayerArray; _i < _a.length; _i++) {\r\n\t                        var lyr = _a[_i];\r\n\t                        var $lyrLi = $('#' + lyr.id + '-layer-li');\r\n\t                        if (zoom > lyr.maxZoom || zoom < lyr.minZoom) {\r\n\t                            $lyrLi.addClass('layer-not-visible');\r\n\t                        }\r\n\t                        else {\r\n\t                            $lyrLi.removeClass('layer-not-visible');\r\n\t                        }\r\n\t                    }\r\n\t                }\r\n\t            }, this, 100, true, 'legend1');\r\n\t        }\r\n\t        // <editor-fold desc=\"add event listeners\">\r\n\t        this.$divElement.find(\".suppress-by-extent\").change(function () {\r\n\t            var legendLayerLis = $('.legend-layer-li');\r\n\t            if (this.checked) {\r\n\t                legendLayerLis.removeClass('layer-force-show');\r\n\t            }\r\n\t            else {\r\n\t                legendLayerLis.addClass('layer-force-show');\r\n\t            }\r\n\t        });\r\n\t        this.$divElement.find('.legend-check').change(function () {\r\n\t            var lyrId = this.id.replace('-legend-layer-check', '');\r\n\t            _this.layerGroup.allLayerLookup[lyrId].visible = this.checked;\r\n\t        });\r\n\t        this.$divElement.find('.legend-layer-group > input[type=checkbox]').change(function () {\r\n\t            $(this).siblings('ul').find('input[type=checkbox]').prop('checked', this.checked).trigger('change');\r\n\t        });\r\n\t        this.$divElement.find('.layer-group-expander').click(function () {\r\n\t            var $this = $(this);\r\n\t            $this.removeClass('legend-layer-group-initial-collapse');\r\n\t            $this.siblings('ul').slideToggle();\r\n\t            if ($this.hasClass('legend-layer-group-collapsed')) {\r\n\t                $this.removeClass('legend-layer-group-collapsed');\r\n\t                $this.html('&#9660;');\r\n\t            }\r\n\t            else {\r\n\t                $this.addClass('legend-layer-group-collapsed');\r\n\t                $this.html('&#9654;');\r\n\t            }\r\n\t        });\r\n\t        this.$divElement.find('.legend-layer-group-initial-collapse').trigger('click');\r\n\t        // </editor-fold>\r\n\t    }\r\n\t    /**\r\n\t     * @param {Array} [legendItems=this._layerConfig] the legend items\r\n\t     * @param {Array} [parents=[]] the ordered list of groups in which this item is a member\r\n\t     * @private\r\n\t     */\r\n\t    LayerLegend.prototype._buildTree = function (legendItems, parents) {\r\n\t        if (legendItems.length == 0) {\r\n\t            return;\r\n\t        }\r\n\t        var oneItem = legendItems[0];\r\n\t        //reset the parent if the item is in the base array\r\n\t        if (this._legendItems.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n\t            parents = [];\r\n\t        }\r\n\t        if (typeof oneItem['groupName'] !== 'undefined') {\r\n\t            var groupItem = legendItems[0];\r\n\t            var newGroup = this.layerGroup.addGroup(groupItem, parents);\r\n\t            parents.push(newGroup.groupId);\r\n\t            this._buildTree(groupItem.items, parents);\r\n\t        }\r\n\t        else {\r\n\t            /**\r\n\t             * @type {LayerBase}\r\n\t             */\r\n\t            var layerItem = legendItems[0];\r\n\t            this.layerGroup.addLegendLayer(layerItem, parents);\r\n\t        }\r\n\t        this._buildTree(legendItems.slice(1), parents);\r\n\t    };\r\n\t    return LayerLegend;\r\n\t}());\r\n\tnm.LayerLegend = LayerLegend;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = LayerLegend;\r\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","/**\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    'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\n\r\nlet sixYearPlan = new LayerEsriMapServer(\r\n    'http://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/_test/simple_map.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 2\n// module chunks = 0 1 2 3 4 5 6","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 3\n// module chunks = 0 1 2 3","/**\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\nfunction 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 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 * 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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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 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): 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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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 {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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0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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==')\";\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    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) {\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){\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 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 * This callback is displayed as part of the Requester class.\r\n * @callback styleFunc\r\n * @param {ol.Feature} feat - openlayers feature\r\n * @param {number} resolution - map resolution\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, opacity) {\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) {\r\n    return String(str)\r\n        .replace(/&/g, '&amp;')\r\n        .replace(/\"/g, '&quot;')\r\n        .replace(/'/g, '&#39;')\r\n        .replace(/</g, '&lt;')\r\n        .replace(/>/g, '&gt;');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface EsriResponse{\r\n    drawingInfo: {\r\n        renderer: EsriRenderer\r\n    },\r\n    geometryType: string\r\n}\r\n\r\nexport interface EsriRenderer{\r\n    type: string;\r\n    symbol: EsriSymbol;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\r\n}\r\n\r\nexport interface EsriSymbol{\r\n    size: number;\r\n    type: string;\r\n    outline:{\r\n        color: string;\r\n        width: number;\r\n    },\r\n    color: string;\r\n    width: number;\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n    legendHtml: string;\r\n    opacity: number;\r\n    symbolObj: EsriSymbol;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    /**\r\n     *\r\n     * @param symbolObj\r\n     * @param {number} opacity\r\n     */\r\n    constructor(symbolObj: EsriSymbol, 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: EsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n    constructor(symbolObj: EsriSymbol, 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}\">&#9679;</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: EsriSymbol, 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: EsriSymbol, 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\nclass SymbolGenerator {\r\n    opacity: number;\r\n    renderer: EsriRenderer;\r\n    legendHtml: string;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    constructor(esriResponse: 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}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n    symbol: EsriSymbol;\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, 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: EsriSymbol;\r\n    defaultStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n    defaultLabelHtml: string;\r\n    labelArray: Array<string>;\r\n    legendArray: Array<string>;\r\n    propertyStyleLookup: Object;\r\n    valueArray: Array<any>;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\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: EsriResponse, 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\r\n        this.olStyle = (feature: ol.Feature) => {\r\n            let checkProperties = feature.getProperties();\r\n            let checkProperty = checkProperties[this.propertyName];\r\n\r\n            let returnValue;\r\n            if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n                returnValue = [this.propertyStyleLookup[checkProperty]];\r\n            } else {\r\n               returnValue = [this.defaultStyle];\r\n            }\r\n\r\n            return returnValue;\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\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * style and legend object\r\n * @typedef {object} styleAndLegend\r\n * @property {styleFunc} style - style function\r\n * @property {string} legend - legend content\r\n */\r\n\r\n/**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @returns {styleAndLegend} style and legend object\r\n */\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: EsriResponse) {\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\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: 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\">&#9660;</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 * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse) {\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            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 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\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n    addPopup?: boolean;\r\n    showLayers?: Array<number>;\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\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, 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._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        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        this.addLegendContent();\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);\r\n            super.addLegendContent(newHtml);\r\n        }, 'json');\r\n    }\r\n\r\n\r\n    getPopupInfo(queryParams) {\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 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\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: any;\r\n    addCheck: any;\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?, parent?) {\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, parents) {\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, parents) {\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    getLegendHtml(legendId, options) {\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, theGroup, layerDivClasses) {\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 ? '&#9654;' : '&#9660;';\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 * a wrapper to make a legend\r\n */\r\nclass LayerLegend {\r\n\r\n    $divElement: any;\r\n    _legendItems: any;\r\n    layerGroup: any;\r\n    legendId: any;\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, divId, options) {\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 = options || {};\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\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('&#9660;');\r\n            } else {\r\n                $this.addClass('legend-layer-group-collapsed');\r\n                $this.html('&#9654;');\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, parents?) {\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.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n            parents = [];\r\n        }\r\n\r\n        if (typeof oneItem['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(groupItem.items, parents);\r\n        } else {\r\n            /**\r\n             * @type {LayerBase}\r\n             */\r\n            let layerItem = legendItems[0];\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\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.ts"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap 6e5b1af915babfe1fe92?33e6******","webpack:///./src/_test/simple_map.ts","webpack:///./src/olHelpers/quickMap.ts?1069**","webpack:///./src/olHelpers/quickMapBase.ts?fb65**","webpack:///./src/util/provide.ts?5c82****","webpack:///external \"ol\"?81ed**","webpack:///external \"$\"?57aa****","webpack:///./src/olHelpers/mapMove.ts?6a2b**","webpack:///./src/olHelpers/mapMoveCls.ts?cd45**","webpack:///./src/olHelpers/mapInteractionBase.ts?f419**","webpack:///./src/util/checkDefined.ts?bcd7**","webpack:///./src/util/makeGuid.ts?e80e**","webpack:///./src/olHelpers/mapPopup.ts?5d6c**","webpack:///./src/olHelpers/mapPopupCls.ts?e3f7**","webpack:///./src/layers/LayerBase.ts?bf94**","webpack:///./src/olHelpers/zoomResolutionConvert.ts?dd4b**","webpack:///./src/olHelpers/esriToOlStyle.ts?9363*","webpack:///./src/layers/LayerEsriMapServer.ts?9c85*","webpack:///./src/collections/LayerLegend.ts?9de6"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;ACtCA;;IAEG;AACH,sEAA+C;AAC/C,wFAAgE;AAChE,+EAAqD;AAGrD,KAAI,GAAG,GAAG,mBAAQ,EAAE,CAAC;AAErB,KAAI,aAAa,GAAG,IAAI,uCAAkB,CACtC,8GAA8G,CAAC,CAAC;AAEpH,KAAI,WAAW,GAAG,IAAI,uCAAkB,CACpC,sGAAsG,EAAE,EAAC,IAAI,EAAE,eAAe,EAAE,cAAc,EAAE,IAAI,EAAC,CAAC,CAAC;AAE3J,IAAG,CAAC,QAAQ,CA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;SAAC,IAAI,CAAC,CAAC;aACJ;;gBAEG;aACH,IAAI,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;aAE/B,IAAI,CAAC,UAAU,CAAC,cAAc,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;SACvD,CAAC;SAED,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;KACnD,CAAC;KAEL,kBAAC;AAAD,EAAC;AAED,GAAE,CAAC,WAAW,GAAG,WAAW,CAAC;;AAC7B,mBAAe,WAAW,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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6e5b1af915babfe1fe92","/**\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    'http://transportal.cee.wisc.edu/applications/arcgis2/rest/services/MetaManager/Metamanager_regions/MapServer');\r\n\r\nlet sixYearPlan = new LayerEsriMapServer(\r\n    'http://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/_test/simple_map.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\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\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 12/15/2015.\r\n */\r\n\r\nimport provide from '../util/provide';\r\nimport ol = require('custom-ol');\r\nimport $ = require('jquery');\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}\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 = options || {} as quickMapOptions;\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\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,iVBOR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Xy7fb07/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+YICUz4DZVaX2TiNDhuYfTtY4geL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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+nVHPdrhiXCxu42d86ByksDc80P3MkJFBFQ8Ho1lQegpWJRWFGsDsRwwv7pIyvuQW0ZkrX6NDVF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ScFNcaR2ceP2u9R/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    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/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['gv'].util.provide = provide;\r\n\r\nexport default provide;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/util/provide.ts","module.exports = ol;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"ol\"\n// module id = 4\n// module chunks = 0 2 3 7","module.exports = $;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"$\"\n// module id = 5\n// module chunks = 0 2 3 4 5 7 8","/**\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 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: Object;\r\n    _arrLayer: Array<LayerBaseVector>;\r\n    _arrLyrTimeout: Array<number>;\r\n    _mapMoveCallbackTimeout: Array<number>;\r\n    _mapMoveCallbackDelays: Array<number>;\r\n    _mapMoveCallbacksLookup: Object;\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) =>{\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, theIndex) {\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] = functionId;\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 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 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): 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","/**\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\nfunction 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 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 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: Object;\r\n    private _arrPopupLayerIds: Array<string>;\r\n    private _arrPopupLayerNames: 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     * &param 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._arrPopupLayerNames = [];\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) => {\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\">&#9664;</span>';\r\n            popupHtml += '<span class=\"next-popup ol-popup-nav-arrow\">&#9654;</span>';\r\n            popupHtml += `<span class=\"current-popup-item-number\" style=\"font-weight: bold;\"></span>`;\r\n            popupHtml += `<span>&nbsp;of&nbsp;</span>`;\r\n            popupHtml += `<span class=\"popup-content-length\" style=\"font-weight: bold;\">${this._popupContentLength}</span>`;\r\n            popupHtml += `<span>&nbsp;&nbsp;-&nbsp;&nbsp;</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            if (evt['dragging']) {\r\n                return;\r\n            }\r\n            let pixel = this.map.getEventPixel(evt['originalEvent']);\r\n            let hit = this.map.hasFeatureAtPixel(pixel, (lyrCandidate) => {\r\n                for (let olLayer of this._arrPopupOlLayers) {\r\n                    if (lyrCandidate == olLayer) {\r\n                        return true;\r\n                    }\r\n                }\r\n\r\n                return false;\r\n            });\r\n            let mapElement = this.map.getTargetElement() as HTMLElement;\r\n            mapElement.style.cursor = hit ? 'pointer' : '';\r\n        });\r\n\r\n        return true;\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 = [];\r\n\r\n        this.map.forEachFeatureAtPixel(pixel, (feature: ol.Feature, layer: ol.layer.Vector) => {\r\n            let lyrIndex = this._arrPopupOlLayers.indexOf(layer);\r\n\r\n            if (lyrIndex > -1) {\r\n                layerFeatureObjectArray.push(\r\n                    new FeatureLayerProperties(\r\n                        feature, this._arrPopupLayers[lyrIndex], lyrIndex, this._selectionLayers[lyrIndex]));\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, 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._arrPopupLayerNames.push(lyr.name);\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) {\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._arrPopupLayerNames.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, 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","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\">&#9660;</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) {\r\n        this._addLegendContent(additionalContent);\r\n    }\r\n\r\n    applyCollapse() {\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('&#9660;');\r\n                    } else {\r\n                        $this.addClass('legend-layer-group-collapsed');\r\n                        $this.html('&#9654;');\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() {\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) {\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() {\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) {\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() {\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() {\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() {\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() {\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() {\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() {\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) {\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() {\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) {\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() {\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","/**\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) {\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){\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 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 * This callback is displayed as part of the Requester class.\r\n * @callback styleFunc\r\n * @param {ol.Feature} feat - openlayers feature\r\n * @param {number} resolution - map resolution\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, opacity) {\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) {\r\n    return String(str)\r\n        .replace(/&/g, '&amp;')\r\n        .replace(/\"/g, '&quot;')\r\n        .replace(/'/g, '&#39;')\r\n        .replace(/</g, '&lt;')\r\n        .replace(/>/g, '&gt;');\r\n}\r\n\r\nnm.htmlEscape = htmlEscape;\r\n\r\n\r\nexport interface EsriResponse{\r\n    drawingInfo: {\r\n        renderer: EsriRenderer\r\n    },\r\n    geometryType: string\r\n}\r\n\r\nexport interface EsriRenderer{\r\n    type: string;\r\n    symbol: EsriSymbol;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\r\n}\r\n\r\nexport interface EsriSymbol{\r\n    size: number;\r\n    type: string;\r\n    outline:{\r\n        color: string;\r\n        width: number;\r\n    },\r\n    color: string;\r\n    width: number;\r\n}\r\n\r\n\r\nclass CommonSymbol {\r\n    legendHtml: string;\r\n    opacity: number;\r\n    symbolObj: EsriSymbol;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    /**\r\n     *\r\n     * @param symbolObj\r\n     * @param {number} opacity\r\n     */\r\n    constructor(symbolObj: EsriSymbol, 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: EsriSymbol, opacity: number): CommonSymbol\r\n}\r\n\r\n\r\nclass PointSymbol extends CommonSymbol {\r\n    constructor(symbolObj: EsriSymbol, 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}\">&#9679;</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: EsriSymbol, 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: EsriSymbol, 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\nclass SymbolGenerator {\r\n    opacity: number;\r\n    renderer: EsriRenderer;\r\n    legendHtml: string;\r\n    olStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n\r\n    constructor(esriResponse: 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}\r\n\r\nclass SingleSymbol extends SymbolGenerator {\r\n    symbol: EsriSymbol;\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, 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: EsriSymbol;\r\n    defaultStyle: ol.style.Style|Array<ol.style.Style>|ol.StyleFunction;\r\n    defaultLabelHtml: string;\r\n    labelArray: Array<string>;\r\n    legendArray: Array<string>;\r\n    propertyStyleLookup: Object;\r\n    valueArray: Array<any>;\r\n    uniqueValueInfos: Array<{label: string, value: any, symbol: EsriSymbol}>;\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: EsriResponse, 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\r\n        this.olStyle = (feature: ol.Feature) => {\r\n            let checkProperties = feature.getProperties();\r\n            let checkProperty = checkProperties[this.propertyName];\r\n\r\n            let returnValue;\r\n            if (this.propertyStyleLookup[checkProperty] !== undefined) {\r\n                returnValue = [this.propertyStyleLookup[checkProperty]];\r\n            } else {\r\n               returnValue = [this.defaultStyle];\r\n            }\r\n\r\n            return returnValue;\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\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * style and legend object\r\n * @typedef {object} styleAndLegend\r\n * @property {styleFunc} style - style function\r\n * @property {string} legend - legend content\r\n */\r\n\r\n/**\r\n *\r\n * @param {object} esriResponse - layer info\r\n * @returns {styleAndLegend} style and legend object\r\n */\r\nexport function makeFeatureServiceLegendAndSymbol(esriResponse: EsriResponse) {\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\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: 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\">&#9660;</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 * @returns {string} legend content\r\n */\r\nexport function makeMapServiceLegend(esriResponse) {\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            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 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\nexport interface LayerEsriMapServerOptions extends LayerBaseOptions {\r\n    addPopup?: boolean;\r\n    showLayers?: Array<number>;\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\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, 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._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        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        this.addLegendContent();\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);\r\n            super.addLegendContent(newHtml);\r\n        }, 'json');\r\n    }\r\n\r\n\r\n    getPopupInfo(queryParams) {\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 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\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: any;\r\n    addCheck: any;\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?, parent?) {\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, parents) {\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, parents) {\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    getLegendHtml(legendId, options) {\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, theGroup, layerDivClasses) {\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 ? '&#9654;' : '&#9660;';\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 * a wrapper to make a legend\r\n */\r\nclass LayerLegend {\r\n\r\n    $divElement: any;\r\n    _legendItems: any;\r\n    layerGroup: any;\r\n    legendId: any;\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, divId, options) {\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 = options || {};\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\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('&#9660;');\r\n            } else {\r\n                $this.addClass('legend-layer-group-collapsed');\r\n                $this.html('&#9654;');\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, parents?) {\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.indexOf(oneItem) > -1 || typeof parents == 'undefined') {\r\n            parents = [];\r\n        }\r\n\r\n        if (typeof oneItem['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(groupItem.items, parents);\r\n        } else {\r\n            /**\r\n             * @type {LayerBase}\r\n             */\r\n            let layerItem = legendItems[0];\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\n\r\nnm.LayerLegend = LayerLegend;\r\nexport default LayerLegend;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/collections/LayerLegend.ts"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/js/slider-test.js b/test-html/js/slider-test.js
index 4951ab31c79a77ce8f8605b97f35abd9c575fe22..b736456348de0a852ee7ff9e144c1c9022fe69b2 100644
--- a/test-html/js/slider-test.js
+++ b/test-html/js/slider-test.js
@@ -1,2 +1,819 @@
-!function(e){function t(l){if(i[l])return i[l].exports;var r=i[l]={exports:{},id:l,loaded:!1};return e[l].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}({0:function(e,t,i){"use strict";var l=i(22),r=i(2);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 s=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=s,window.hat=s,window.bird=s},1:function(e,t){"use strict";function i(e){"undefined"==typeof window.gv&&(window.gv={});for(var t=e.split("."),i=window.gv,l=0;l<t.length;l++){var r=i[t[l]];"undefined"==typeof r&&(i[t[l]]={}),i=i[t[l]]}return i}i("util"),window.gv.util.provide=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},2:function(e,t){e.exports=$},22:function(e,t,i){"use strict";var l=i(1),r=i(2),s=l.default("collections"),o=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++){var r=l[i];t+=r.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}();s._Slider=a;var n=function(){function e(e,t,i,l,s,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=s,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 o(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(e=Number(e.toFixed(1)),0!=e){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 s=-1*Number((e/i.length).toFixed(1)),o=0,l=0;l<i.length;l++)o+=i[l].increment(s);this._handleRemainder(o,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],s=parseFloat(t.val()),o=l.weight,a=s-o;a=Number(a.toFixed(1)),l.weight=Number(s.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,s.Sliders=n,Object.defineProperty(t,"__esModule",{value:!0}),t.default=n}});
+/******/ (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] = {
+/******/ 			exports: {},
+/******/ 			id: moduleId,
+/******/ 			loaded: false
+/******/ 		};
+/******/
+/******/ 		// Execute the module function
+/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ 		// Flag the module as loaded
+/******/ 		module.loaded = 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;
+/******/
+/******/ 	// __webpack_public_path__
+/******/ 	__webpack_require__.p = "";
+/******/
+/******/ 	// Load entry module and return exports
+/******/ 	return __webpack_require__(0);
+/******/ })
+/************************************************************************/
+/******/ ({
+
+/***/ 0:
+/*!***********************************!*\
+  !*** ./dist/_test/slider-test.js ***!
+  \***********************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	"use strict";
+	/**
+	 * Created by gavorhes on 6/22/2016.
+	 */
+	var Sliders_1 = __webpack_require__(/*! ../collections/Sliders */ 34);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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;
+
+
+/***/ },
+
+/***/ 3:
+/*!******************************!*\
+  !*** ./dist/util/provide.js ***!
+  \******************************/
+/***/ function(module, exports) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	/**
+	 * 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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = provide;
+
+
+/***/ },
+
+/***/ 5:
+/*!********************!*\
+  !*** external "$" ***!
+  \********************/
+/***/ function(module, exports) {
+
+	module.exports = $;
+
+/***/ },
+
+/***/ 34:
+/*!*************************************!*\
+  !*** ./dist/collections/Sliders.js ***!
+  \*************************************/
+/***/ function(module, exports, __webpack_require__) {
+
+	/**
+	 * Created by gavorhes on 12/10/2015.
+	 */
+	"use strict";
+	var provide_1 = __webpack_require__(/*! ../util/provide */ 3);
+	var $ = __webpack_require__(/*! jquery */ 5);
+	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;
+	Object.defineProperty(exports, "__esModule", { value: true });
+	exports.default = TipSliders;
+
+
+/***/ }
+
+/******/ });
 //# sourceMappingURL=slider-test.js.map
\ No newline at end of file
diff --git a/test-html/js/slider-test.js.map b/test-html/js/slider-test.js.map
index 1f54014d38128b33d5f2d8847947fb9ec8b07ea1..cd268685048e98426c26b2275e5c547cdee3eba9 100644
--- a/test-html/js/slider-test.js.map
+++ b/test-html/js/slider-test.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///slider-test.js","webpack:///webpack/bootstrap 0da249d398ab392d2e0f?7457*****","webpack:///./src/_test/slider-test.ts","webpack:///./src/util/provide.ts?5c82*****","webpack:///external \"$\"?57aa*****","webpack:///./src/collections/Sliders.ts"],"names":["modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","0","Sliders_1","$","tipConfig","$loadingGif","$presetSelector","$regionSelector","$versionSelector","tipSegmentLayerMinZoom","slidersConfig","label","yearOptions","column","presetConfig","presets","value","append","sliders","TipSliders","chg","console","log","window","1","provide","namespace","parts","split","nameSpace","i","length","newObject","util","Object","defineProperty","default","2","22","provide_1","nm","TipPresets","conf","this","domId","replace","toLowerCase","theSum","_i","_a","pr","_Slider","sliderConfig","_dropdownSelection","_weight","name","_locked","_min","_max","labelLow","labelHigh","labelVal","slider","chk","atMin","atMax","sel","itm","selectedParamDefault","selectedParam","html","prototype","addToDom","$container","selectionBox","increment","delta","remainder","Number","toFixed","val","setValAndDropDown","newVal","min","max","weight","locked","get","set","prop","enumerable","configurable","attr","sliderConfigs","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","thePreset","presetValues","theSlider","_handleRemainder","remain","skipDomId","canChangeArray","inc","newRemainder","setValues","keyValList","k","hasOwnProperty","getSum","total","getParams","paramWeights","___this","find","$this","sldr","newValue","parseFloat","oldValue","diff","sum","loop1","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GAAMoC,EAAQtC,YAAY7E,EAC1B+E,GAAIvB,OACJ2D,EAAQ5C,iBAAmBQ,EAAIxB,QAGnCwE,EAAiB/C,KAAKD,GACtBoC,EAAQzB,kBAGZ,IAAK,GAAI1F,GAAI,EAAGA,EAAImH,EAAQtC,YAAY5E,OAAQD,IAAK,CACjD,GAAI+E,GAAMoC,EAAQtC,YAAY7E,EAC1B+E,GAAIvB,SAGRuB,EAAIzB,IAAM,IAAM6D,EAAQ5C,iBAG5B,GAA+B,GAA3BwD,EAAiB9H,OACjB8H,EAAiB,GAAG1E,IAAM0E,EAAiB,GAAGxE,WAE9C,KAAK,GAAIvD,GAAI,EAAGA,EAAI+H,EAAiB9H,OAAQD,IACzC+H,EAAiB/H,GAAGqD,IAAM,KAO1CjD,OAAAC,eAAIhB,EAAAoD,UAAA,6BL+ICgB,IK/IL,WACI,OAAQyD,aAAcrG,KAAKoG,YACvBe,OAAQnH,KAAK8D,iBAAiBzB,MAAiB+E,UAAWpH,KAAK+D,kBAAkB1B,QLiJpFU,YAAY,EACZC,cAAc,IKhJvBxE,IApXa1B,GAAA0B,aAsXbqB,EAAGwH,QAAU7I,ELoJZe,OAAOC,eAAe1C,EAAS,cAAgBuB,OAAO,IKnJvDvB,EAAA2C,QAAejB","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\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ 0:\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\r\n\t/**\r\n\t * Created by gavorhes on 6/22/2016.\r\n\t */\r\n\tvar Sliders_1 = __webpack_require__(22);\r\n\tvar $ = __webpack_require__(2);\r\n\texports.tipConfig = {\r\n\t    $loadingGif: $('#loading-gif'),\r\n\t    $presetSelector: $('#preset-selector'),\r\n\t    $regionSelector: $('#region-selector'),\r\n\t    $versionSelector: $('#version-selector'),\r\n\t    tipSegmentLayerMinZoom: 10,\r\n\t    slidersConfig: [\r\n\t        {\r\n\t            label: 'AADT',\r\n\t            yearOptions: [\r\n\t                { label: '1', column: 'aadtyr_1' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'AADT Future',\r\n\t            yearOptions: [\r\n\t                { label: '5', column: 'aadtyr_5' },\r\n\t                { label: '10', column: 'aadtyr_10' },\r\n\t                { label: '15', column: 'aadtyr_15' },\r\n\t                { label: '20', column: 'aadtyr_20' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Growth',\r\n\t            yearOptions: [\r\n\t                { label: '5', column: 'growth_5' },\r\n\t                { label: '10', column: 'growth_10' },\r\n\t                { label: '15', column: 'growth_15' },\r\n\t                { label: '20', column: 'growth_20' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Truck',\r\n\t            yearOptions: [\r\n\t                { label: '1', column: 'trkdyr_1' },\r\n\t                { label: '20', column: 'trkdyr_20' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'LOS',\r\n\t            yearOptions: [\r\n\t                { label: '1', column: 'losyr_1' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'LOS Future',\r\n\t            yearOptions: [\r\n\t                { label: '5', column: 'losyr_5' },\r\n\t                { label: '10', column: 'losyr_10' },\r\n\t                { label: '15', column: 'losyr_15' },\r\n\t                { label: '20', column: 'losyr_20' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Crash Rate',\r\n\t            yearOptions: [\r\n\t                { label: 1, column: 'crash_rate' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Severity',\r\n\t            yearOptions: [\r\n\t                { label: 1, column: 'crash_severity' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Weather',\r\n\t            yearOptions: [\r\n\t                { label: 1, column: 'weather' }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Event',\r\n\t            yearOptions: [\r\n\t                { label: 1, column: 'event' }\r\n\t            ]\r\n\t        }\r\n\t    ],\r\n\t    presetConfig: [\r\n\t        {\r\n\t            label: 'Default TIP',\r\n\t            presets: [\r\n\t                { column: 'aadtyr_1', value: 10.0 },\r\n\t                { column: 'aadtyr_20', value: 7.0 },\r\n\t                { column: 'growth_20', value: 7.0 },\r\n\t                { column: 'trkdyr_1', value: 4.0 },\r\n\t                { column: 'losyr_1', value: 12.0 },\r\n\t                { column: 'losyr_20', value: 12.0 },\r\n\t                { column: 'crash_rate', value: 15.0 },\r\n\t                { column: 'crash_severity', value: 13.0 },\r\n\t                { column: 'weather', value: 9.0 },\r\n\t                { column: 'event', value: 11.0 }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Safety',\r\n\t            presets: [\r\n\t                { column: 'aadtyr_1', value: 20.0 },\r\n\t                { column: 'aadtyr_20', value: 0.0 },\r\n\t                { column: 'growth_20', value: 0.0 },\r\n\t                { column: 'trkdyr_1', value: 0.0 },\r\n\t                { column: 'losyr_1', value: 0.0 },\r\n\t                { column: 'losyr_20', value: 0.0 },\r\n\t                { column: 'crash_rate', value: 40.0 },\r\n\t                { column: 'crash_severity', value: 40.0 },\r\n\t                { column: 'weather', value: 0.0 },\r\n\t                { column: 'event', value: 0.0 }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Mobility Present',\r\n\t            presets: [\r\n\t                { column: 'aadtyr_1', value: 25.0 },\r\n\t                { column: 'aadtyr_20', value: 25.0 },\r\n\t                { column: 'growth_20', value: 0.0 },\r\n\t                { column: 'trkdyr_1', value: 25.0 },\r\n\t                { column: 'losyr_1', value: 25.0 },\r\n\t                { column: 'losyr_20', value: 0.0 },\r\n\t                { column: 'crash_rate', value: 0.0 },\r\n\t                { column: 'crash_severity', value: 0.0 },\r\n\t                { column: 'weather', value: 0.0 },\r\n\t                { column: 'event', value: 0.0 }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Mobility Future',\r\n\t            presets: [\r\n\t                { column: 'aadtyr_1', value: 0.0 },\r\n\t                { column: 'aadtyr_20', value: 25.0 },\r\n\t                { column: 'growth_20', value: 25.0 },\r\n\t                { column: 'trkdyr_1', value: 25.0 },\r\n\t                { column: 'losyr_1', value: 0.0 },\r\n\t                { column: 'losyr_20', value: 25.0 },\r\n\t                { column: 'crash_rate', value: 0.0 },\r\n\t                { column: 'crash_severity', value: 0.0 },\r\n\t                { column: 'weather', value: 0.0 },\r\n\t                { column: 'event', value: 0.0 }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Service',\r\n\t            presets: [\r\n\t                { column: 'aadtyr_1', value: 30.0 },\r\n\t                { column: 'aadtyr_20', value: 0.0 },\r\n\t                { column: 'growth_20', value: 10.0 },\r\n\t                { column: 'trkdyr_1', value: 0.0 },\r\n\t                { column: 'losyr_1', value: 30.0 },\r\n\t                { column: 'losyr_20', value: 30.0 },\r\n\t                { column: 'crash_rate', value: 0.0 },\r\n\t                { column: 'crash_severity', value: 0.0 },\r\n\t                { column: 'weather', value: 0.0 },\r\n\t                { column: 'event', value: 0.0 }\r\n\t            ]\r\n\t        },\r\n\t        {\r\n\t            label: 'Freight Performance',\r\n\t            presets: [\r\n\t                { column: 'aadtyr_1', value: 20.0 },\r\n\t                { column: 'aadtyr_20', value: 0.0 },\r\n\t                { column: 'growth_20', value: 0.0 },\r\n\t                { column: 'trkdyr_1', value: 60.0 },\r\n\t                { column: 'losyr_1', value: 20.0 },\r\n\t                { column: 'losyr_20', value: 0.0 },\r\n\t                { column: 'crash_rate', value: 0.0 },\r\n\t                { column: 'crash_severity', value: 0.0 },\r\n\t                { column: 'weather', value: 0.0 },\r\n\t                { column: 'event', value: 0.0 }\r\n\t            ]\r\n\t        }\r\n\t    ]\r\n\t};\r\n\texports.tipConfig.$presetSelector.append('<option value=\"0\" disabled=>Custom</option>');\r\n\tvar 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\t// sliders.changedCallback = (chg) => {console.log(chg)};\r\n\twindow['glob'] = sliders;\r\n\twindow['hat'] = sliders;\r\n\twindow['bird'] = sliders;\r\n\n\n/***/ },\n\n/***/ 1:\n/***/ function(module, exports) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\t/**\r\n\t * create a namespace on the gv object\r\n\t * @param {string} namespace to create\r\n\t * @returns {object} object representing the namespace\r\n\t */\r\n\tfunction provide(namespace) {\r\n\t    \"use strict\";\r\n\t    if (typeof window['gv'] == 'undefined') {\r\n\t        window['gv'] = {};\r\n\t    }\r\n\t    var parts = namespace.split('.');\r\n\t    var nameSpace = window['gv'];\r\n\t    for (var i = 0; i < parts.length; i++) {\r\n\t        var newObject = nameSpace[parts[i]];\r\n\t        if (typeof newObject == 'undefined') {\r\n\t            nameSpace[parts[i]] = {};\r\n\t        }\r\n\t        nameSpace = nameSpace[parts[i]];\r\n\t    }\r\n\t    return nameSpace;\r\n\t}\r\n\tprovide('util');\r\n\twindow['gv'].util.provide = provide;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = provide;\r\n\n\n/***/ },\n\n/***/ 2:\n/***/ function(module, exports) {\n\n\tmodule.exports = $;\n\n/***/ },\n\n/***/ 22:\n/***/ function(module, exports, __webpack_require__) {\n\n\t/**\r\n\t * Created by gavorhes on 12/10/2015.\r\n\t */\r\n\t\"use strict\";\r\n\tvar provide_1 = __webpack_require__(1);\r\n\tvar $ = __webpack_require__(2);\r\n\tvar nm = provide_1.default('collections');\r\n\tvar TipPresets = (function () {\r\n\t    function TipPresets(conf) {\r\n\t        this.label = conf.label;\r\n\t        this.presets = conf.presets;\r\n\t        this.domId = this.label.replace(/ /g, '').toLowerCase();\r\n\t        var theSum = 0;\r\n\t        for (var _i = 0, _a = this.presets; _i < _a.length; _i++) {\r\n\t            var pr = _a[_i];\r\n\t            theSum += pr.value;\r\n\t        }\r\n\t        if (theSum != 100) {\r\n\t            throw 'preset sum does note equal 100';\r\n\t        }\r\n\t    }\r\n\t    return TipPresets;\r\n\t}());\r\n\tvar _Slider = (function () {\r\n\t    /**\r\n\t     * Slider constructor\r\n\t     * @param sliderConfig - the configuration\r\n\t\r\n\t     */\r\n\t    function _Slider(sliderConfig) {\r\n\t        this._dropdownSelection = null;\r\n\t        this._weight = null;\r\n\t        this.name = sliderConfig.label;\r\n\t        this.domId = this.name.toLowerCase().replace(/ /g, '-');\r\n\t        this._locked = false;\r\n\t        this._min = 0.0;\r\n\t        this._max = 100;\r\n\t        this.labelLow = null;\r\n\t        this.labelHigh = null;\r\n\t        this.labelVal = null;\r\n\t        this.slider = null;\r\n\t        this.chk = null;\r\n\t        this.atMin = false;\r\n\t        this.atMax = false;\r\n\t        var sel = \"<select class=\\\"\" + (sliderConfig.yearOptions.length == 1 ? 'hidden-select' : 'show-select') + \"\\\" id=\\\"\" + this.domId + \"_chg\\\">\";\r\n\t        for (var i = 0; i < sliderConfig.yearOptions.length; i++) {\r\n\t            var itm = sliderConfig.yearOptions[i];\r\n\t            sel += \"<option value=\\\"\" + itm.column + \"\\\">\" + itm.label + \"</option>\";\r\n\t        }\r\n\t        sel += '</select>';\r\n\t        this.selectedParamDefault = this.selectedParam;\r\n\t        this.html = '<div class=\"slider-div\">' +\r\n\t            (\"<label for=\\\"\" + this.domId + \"_chk\\\" class=\\\"slider-label\\\">\" + this.name + \"</label>\") +\r\n\t            sel + \"<br>\" +\r\n\t            (\"<input id=\\\"\" + this.domId + \"_chk\\\" type=\\\"checkbox\\\" title=\\\"Lock/Unlock Slider\\\">\") +\r\n\t            (\"<label id=\\\"\" + this.domId + \"_low\\\" class=\\\"low-high\\\"></label>\") +\r\n\t            (\"<input id=\\\"\" + this.domId + \"\\\" type=\\\"range\\\" value=\\\"50\\\" min=\\\"0\\\" max=\\\"100\\\" step=\\\"0.1\\\">\") +\r\n\t            (\"<label id=\\\"\" + this.domId + \"_high\\\" class=\\\"low-high\\\"></label>\") +\r\n\t            (\"<label id=\\\"\" + this.domId + \"_lbl\\\" for=\\\"\" + this.domId + \"\\\" class=\\\"percent-label\\\"></label></div>\");\r\n\t    }\r\n\t    /**\r\n\t     * add html to dom\r\n\t     * @param {jQuery} $container - container element\r\n\t     */\r\n\t    _Slider.prototype.addToDom = function ($container) {\r\n\t        $container.append(this.html);\r\n\t        this.labelLow = $(\"#\" + this.domId + \"_low\");\r\n\t        this.labelHigh = $(\"#\" + this.domId + \"_high\");\r\n\t        this.labelVal = $(\"#\" + this.domId + \"_lbl\");\r\n\t        this.slider = $(\"#\" + this.domId);\r\n\t        this.selectionBox = $(\"#\" + this.domId + \"_chg\");\r\n\t        this.chk = $(\"#\" + this.domId + \"_chk\");\r\n\t    };\r\n\t    /**\r\n\t     * increment the slider\r\n\t     * @param {number} delta change delta\r\n\t     * @returns {number} the remainder not able to be allocated to this slider\r\n\t     */\r\n\t    _Slider.prototype.increment = function (delta) {\r\n\t        var remainder = 0;\r\n\t        delta = Number(delta.toFixed(1));\r\n\t        this._weight += delta;\r\n\t        if (this._weight < this._min) {\r\n\t            remainder = this._min - this._weight;\r\n\t            this._weight = this._min;\r\n\t            this.atMin = true;\r\n\t        }\r\n\t        else if (this._weight > this._max) {\r\n\t            remainder = this._max - this._weight;\r\n\t            this._weight = this._max;\r\n\t            this.atMax = true;\r\n\t        }\r\n\t        else {\r\n\t            this.atMin = false;\r\n\t            this.atMax = false;\r\n\t        }\r\n\t        this.slider.val(this._weight.toFixed(1));\r\n\t        this.labelVal.html(this._weight.toFixed(1) + '%');\r\n\t        return remainder;\r\n\t    };\r\n\t    /**\r\n\t     * set the value and drop down\r\n\t     * @param {number} newVal the new value\r\n\t     * @param {string} selectedParam the selected parameter\r\n\t     */\r\n\t    _Slider.prototype.setValAndDropDown = function (newVal, selectedParam) {\r\n\t        this.min = 0;\r\n\t        this.max = 100;\r\n\t        this.weight = newVal;\r\n\t        this.slider.val(newVal.toFixed(1));\r\n\t        this.selectionBox.val(selectedParam);\r\n\t        this.selectedParam = selectedParam;\r\n\t        this.locked = true;\r\n\t    };\r\n\t    Object.defineProperty(_Slider.prototype, \"locked\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {boolean} if locked\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._locked;\r\n\t        },\r\n\t        /**\r\n\t         *\r\n\t         * @param {boolean} val if locked\r\n\t         */\r\n\t        set: function (val) {\r\n\t            this._locked = val;\r\n\t            this.slider.prop('disabled', this._locked);\r\n\t            this.selectionBox.prop('disabled', this._locked);\r\n\t            this.chk.prop('checked', !this._locked);\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(_Slider.prototype, \"min\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {number} the minimum\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._min;\r\n\t        },\r\n\t        /**\r\n\t         *\r\n\t         * @param {number} newVal new minimum\r\n\t         */\r\n\t        set: function (newVal) {\r\n\t            this._min = Number(newVal.toFixed(1));\r\n\t            if (this._min < 0) {\r\n\t                this._min = 0;\r\n\t            }\r\n\t            this.labelLow.html(this._min.toFixed(1));\r\n\t            this.slider.attr('min', this._min.toFixed(1));\r\n\t            this.atMin = this._weight == this._min;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(_Slider.prototype, \"max\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {number} the maximum\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._max;\r\n\t        },\r\n\t        /**\r\n\t         *\r\n\t         * @param {number} newVal the maximum\r\n\t         */\r\n\t        set: function (newVal) {\r\n\t            this._max = Number(newVal.toFixed(1));\r\n\t            if (this._max > 100) {\r\n\t                this._max = 100.0;\r\n\t            }\r\n\t            this.labelHigh.html(this._max.toFixed(1));\r\n\t            this.slider.attr('max', this._max.toFixed(1));\r\n\t            this.atMax = this._weight == this._max;\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    Object.defineProperty(_Slider.prototype, \"weight\", {\r\n\t        /**\r\n\t         *\r\n\t         * @returns {number} the weight\r\n\t         */\r\n\t        get: function () {\r\n\t            return this._weight;\r\n\t        },\r\n\t        /**\r\n\t         *\r\n\t         * @param {number} newVal the weight\r\n\t         */\r\n\t        set: function (newVal) {\r\n\t            this._weight = Number(newVal.toFixed(1));\r\n\t            this.labelVal.html(this._weight.toFixed(1) + '%');\r\n\t            if (this._weight <= this._min) {\r\n\t                this.atMin = true;\r\n\t                this.atMax = false;\r\n\t            }\r\n\t            else if (this._weight >= this._max) {\r\n\t                this.atMin = false;\r\n\t                this.atMax = true;\r\n\t            }\r\n\t            else {\r\n\t                this.atMin = false;\r\n\t                this.atMax = false;\r\n\t            }\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return _Slider;\r\n\t}());\r\n\tnm._Slider = _Slider;\r\n\t/**\r\n\t * class to keep track of the sliders\r\n\t */\r\n\tvar TipSliders = (function () {\r\n\t    /**\r\n\t     *\r\n\t     * @param sliderConfigs\r\n\t     * @param presetConfig\r\n\t     * @param divId\r\n\t     * @param presetSelector\r\n\t     * @param regionSelector\r\n\t     * @param versionSelector\r\n\t     * @param chgCallback\r\n\t     */\r\n\t    function TipSliders(sliderConfigs, presetConfig, divId, presetSelector, regionSelector, versionSelector, chgCallback) {\r\n\t        var _this = this;\r\n\t        this.resetting = false;\r\n\t        this.reservedPercent = 0.0;\r\n\t        this.$container = $('#' + divId);\r\n\t        this.$container.addClass('slider-container');\r\n\t        this._changedCallback = typeof chgCallback == 'function' ? chgCallback : function () { };\r\n\t        this._$presetSelector = presetSelector;\r\n\t        this._$regionSelector = regionSelector;\r\n\t        this._$versionSelector = versionSelector;\r\n\t        this._sliderList = [];\r\n\t        this._sliderLookup = {};\r\n\t        for (var i = 0; i < sliderConfigs.length; i++) {\r\n\t            var sld = new _Slider(sliderConfigs[i]);\r\n\t            this._sliderList.push(sld);\r\n\t            this._sliderLookup[sld.domId] = sld;\r\n\t            sld.addToDom(this.$container);\r\n\t        }\r\n\t        this._presetArray = [];\r\n\t        this._presetLookup = {};\r\n\t        for (var i = 0; i < presetConfig.length; i++) {\r\n\t            var preset = new TipPresets(presetConfig[i]);\r\n\t            var idx = (i + 1).toFixed();\r\n\t            this._presetLookup[idx] = preset;\r\n\t            this._presetArray.push(preset);\r\n\t            this._$presetSelector.append(\"<option value=\\\"\" + idx + \"\\\">\" + preset.label + \"</option>\");\r\n\t        }\r\n\t        this._lockedList = [];\r\n\t        this._inRangeList = [];\r\n\t        this._atMinList = [];\r\n\t        this._atMaxList = [];\r\n\t        this.lockedCount = 10;\r\n\t        this.notLockedCount = 0;\r\n\t        this._splitSliderArray();\r\n\t        this._$presetSelector.change(function () {\r\n\t            _this.setPresetValues();\r\n\t            _this._runChangedCallback();\r\n\t        });\r\n\t        this._$regionSelector.change(function () {\r\n\t            _this._runChangedCallback();\r\n\t        });\r\n\t        this._$versionSelector.change(function () {\r\n\t            _this._runChangedCallback();\r\n\t        });\r\n\t        this._$presetSelector.trigger('change');\r\n\t        this._addEventListeners();\r\n\t    }\r\n\t    TipSliders.prototype._runChangedCallback = function () {\r\n\t        this._changedCallback(this.paramWeightsRegionVersion);\r\n\t    };\r\n\t    Object.defineProperty(TipSliders.prototype, \"changedCallback\", {\r\n\t        get: function () {\r\n\t            return this._changedCallback;\r\n\t        },\r\n\t        set: function (chg) {\r\n\t            this._changedCallback = chg;\r\n\t            this._runChangedCallback();\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    TipSliders.prototype.setPresetValues = function () {\r\n\t        var idx = this._$presetSelector.val() || '1';\r\n\t        var thePreset = this._presetLookup[idx];\r\n\t        for (var i = 0; i < thePreset.presets.length; i++) {\r\n\t            var presetValues = thePreset.presets[i];\r\n\t            var theSlider = this._sliderList[i];\r\n\t            theSlider.locked = true;\r\n\t            theSlider.setValAndDropDown(presetValues.value, presetValues.column);\r\n\t        }\r\n\t    };\r\n\t    /**\r\n\t     * split array into subarrays holding the sliders\r\n\t     * @private\r\n\t     */\r\n\t    TipSliders.prototype._splitSliderArray = function () {\r\n\t        this._lockedList = [];\r\n\t        this._inRangeList = [];\r\n\t        this._atMinList = [];\r\n\t        this._atMaxList = [];\r\n\t        for (var i = 0; i < this._sliderList.length; i++) {\r\n\t            var sld = this._sliderList[i];\r\n\t            if (sld.locked) {\r\n\t                this._lockedList.push(sld);\r\n\t            }\r\n\t            else if (sld.atMin) {\r\n\t                this._atMinList.push(sld);\r\n\t            }\r\n\t            else if (sld.atMax) {\r\n\t                this._atMaxList.push(sld);\r\n\t            }\r\n\t            else {\r\n\t                this._inRangeList.push(sld);\r\n\t            }\r\n\t        }\r\n\t        this.lockedCount = this._lockedList.length;\r\n\t        this.notLockedCount = this._sliderList.length - this.lockedCount;\r\n\t    };\r\n\t    /**\r\n\t     * handle remainder, recursive to take care of min max overshoots\r\n\t     * @param {number} remain the remainder\r\n\t     * @param {string} skipDomId - this dom id\r\n\t     * @private\r\n\t     */\r\n\t    TipSliders.prototype._handleRemainder = function (remain, skipDomId) {\r\n\t        remain = Number(remain.toFixed(1));\r\n\t        if (remain == 0) {\r\n\t            return;\r\n\t        }\r\n\t        this._splitSliderArray();\r\n\t        var canChangeArray = [];\r\n\t        for (var i = 0; i < this._inRangeList.length; i++) {\r\n\t            var sld = this._inRangeList[i];\r\n\t            if (sld.domId == skipDomId) {\r\n\t                continue;\r\n\t            }\r\n\t            canChangeArray.push(sld);\r\n\t        }\r\n\t        if (remain > 0) {\r\n\t            for (var i = 0; i < this._atMaxList.length; i++) {\r\n\t                var sld = this._atMaxList[i];\r\n\t                if (sld.domId == skipDomId) {\r\n\t                    continue;\r\n\t                }\r\n\t                canChangeArray.push(sld);\r\n\t            }\r\n\t        }\r\n\t        else {\r\n\t            for (var i = 0; i < this._atMinList.length; i++) {\r\n\t                var sld = this._atMinList[i];\r\n\t                if (sld.domId == skipDomId) {\r\n\t                    continue;\r\n\t                }\r\n\t                canChangeArray.push(sld);\r\n\t            }\r\n\t        }\r\n\t        if (canChangeArray.length == 0) {\r\n\t            return;\r\n\t        }\r\n\t        var inc = -1 * Number((remain / canChangeArray.length).toFixed(1));\r\n\t        var newRemainder = 0;\r\n\t        for (var i = 0; i < canChangeArray.length; i++) {\r\n\t            newRemainder += canChangeArray[i].increment(inc);\r\n\t        }\r\n\t        this._handleRemainder(newRemainder, skipDomId);\r\n\t    };\r\n\t    /**\r\n\t     *\r\n\t     * @param {object} keyValList key and value list\r\n\t     */\r\n\t    TipSliders.prototype.setValues = function (keyValList) {\r\n\t        this.resetting = true;\r\n\t        for (var k in keyValList) {\r\n\t            if (keyValList.hasOwnProperty(k)) {\r\n\t                this._sliderLookup[k].setValAndDropDown(keyValList[k][0], keyValList[k][1]);\r\n\t            }\r\n\t        }\r\n\t        this.resetting = false;\r\n\t    };\r\n\t    /**\r\n\t     * get the weight sum\r\n\t     * @returns {number} the weight sum\r\n\t     */\r\n\t    TipSliders.prototype.getSum = function () {\r\n\t        var total = 0;\r\n\t        for (var i = 0; i < this._sliderList.length; i++) {\r\n\t            var sld = this._sliderList[i];\r\n\t            total += Number(sld.weight.toFixed(1));\r\n\t        }\r\n\t        return total;\r\n\t    };\r\n\t    /**\r\n\t     * get the parameter weights\r\n\t     * @returns {object} lookup with parameter weights\r\n\t     */\r\n\t    TipSliders.prototype.getParams = function () {\r\n\t        var paramWeights = {};\r\n\t        for (var i = 0; i < this._sliderList.length; i++) {\r\n\t            var sld = this._sliderList[i];\r\n\t            paramWeights[sld.selectedParam] = Number(sld.weight.toFixed(1));\r\n\t        }\r\n\t        return paramWeights;\r\n\t    };\r\n\t    TipSliders.prototype._addEventListeners = function () {\r\n\t        var ___this = this;\r\n\t        //change function\r\n\t        this.$container.find('input[type=\"range\"]').change(function () {\r\n\t            if (___this.resetting) {\r\n\t                return;\r\n\t            }\r\n\t            var $this = $(this);\r\n\t            var domId = this['id'];\r\n\t            var sldr = ___this._sliderLookup[domId];\r\n\t            var newValue = parseFloat($this.val());\r\n\t            var oldValue = sldr.weight;\r\n\t            var diff = newValue - oldValue;\r\n\t            diff = Number(diff.toFixed(1));\r\n\t            sldr.weight = Number(newValue.toFixed(1));\r\n\t            ___this._handleRemainder(diff, domId);\r\n\t            //cleanup, make sure the sum is still 100\r\n\t            var sum = Number(___this.getSum().toFixed(1));\r\n\t            if (sum > 100) {\r\n\t                loop1: while (true) {\r\n\t                    for (var i = 0; i < ___this._sliderList.length; i++) {\r\n\t                        var sld = ___this._sliderList[i];\r\n\t                        if (sld.domId == domId || sld.locked || sld.atMin) {\r\n\t                            continue;\r\n\t                        }\r\n\t                        sld.increment(-0.1);\r\n\t                        sum -= 0.1;\r\n\t                        if (sum.toFixed(1) == '100.0') {\r\n\t                            break loop1;\r\n\t                        }\r\n\t                    }\r\n\t                }\r\n\t            }\r\n\t            else if (sum < 100) {\r\n\t                loop1: while (true) {\r\n\t                    for (var i = 0; i < ___this._sliderList.length; i++) {\r\n\t                        var sld = ___this._sliderList[i];\r\n\t                        if (sld.domId == domId || sld.locked || sld.atMax) {\r\n\t                            continue;\r\n\t                        }\r\n\t                        sld.increment(0.1);\r\n\t                        sum += 0.1;\r\n\t                        if (sum.toFixed(1) == '100.0') {\r\n\t                            break loop1;\r\n\t                        }\r\n\t                    }\r\n\t                }\r\n\t            }\r\n\t            ___this._$presetSelector.val('0');\r\n\t            ___this._runChangedCallback();\r\n\t        });\r\n\t        //update the selected parameter when the selection is changed\r\n\t        $('.show-select').change(function () {\r\n\t            if (___this.resetting) {\r\n\t                return;\r\n\t            }\r\n\t            ___this._sliderLookup[this['id'].replace('_chg', '')].selectedParam = $(this).val();\r\n\t            ___this._$presetSelector.val('0');\r\n\t            ___this._runChangedCallback();\r\n\t        });\r\n\t        //lock the slider and update the reserved percent\r\n\t        this.$container.find('input[type=\"checkbox\"]').change(function () {\r\n\t            var domEl = this;\r\n\t            ___this._sliderLookup[domEl.id.replace('_chk', '')].locked = !domEl.checked;\r\n\t            ___this.reservedPercent = 0.0;\r\n\t            ___this.notLockedCount = 0;\r\n\t            var notLockedSliders = [];\r\n\t            for (var i = 0; i < ___this._sliderList.length; i++) {\r\n\t                var sld = ___this._sliderList[i];\r\n\t                if (sld.locked) {\r\n\t                    ___this.reservedPercent += sld.weight;\r\n\t                    continue;\r\n\t                }\r\n\t                notLockedSliders.push(sld);\r\n\t                ___this.notLockedCount++;\r\n\t            }\r\n\t            for (var i = 0; i < ___this._sliderList.length; i++) {\r\n\t                var sld = ___this._sliderList[i];\r\n\t                if (sld.locked) {\r\n\t                    continue;\r\n\t                }\r\n\t                sld.max = 100 - ___this.reservedPercent;\r\n\t            }\r\n\t            if (notLockedSliders.length == 1) {\r\n\t                notLockedSliders[0].min = notLockedSliders[0].weight;\r\n\t            }\r\n\t            else {\r\n\t                for (var i = 0; i < notLockedSliders.length; i++) {\r\n\t                    notLockedSliders[i].min = 0;\r\n\t                }\r\n\t            }\r\n\t        });\r\n\t    };\r\n\t    Object.defineProperty(TipSliders.prototype, \"paramWeightsRegionVersion\", {\r\n\t        get: function () {\r\n\t            return { paramWeights: this.getParams(),\r\n\t                region: this._$regionSelector.val(), mmVersion: this._$versionSelector.val() };\r\n\t        },\r\n\t        enumerable: true,\r\n\t        configurable: true\r\n\t    });\r\n\t    return TipSliders;\r\n\t}());\r\n\texports.TipSliders = TipSliders;\r\n\tnm.Sliders = TipSliders;\r\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\r\n\texports.default = TipSliders;\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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 0da249d398ab392d2e0f","/**\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\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/_test/slider-test.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 2\n// module chunks = 0 1 2 3 4 5 6","/**\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) {\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) {\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, skipDomId) {\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) {\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 = {};\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"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///webpack/bootstrap 6e5b1af915babfe1fe92?33e6*******","webpack:///./src/_test/slider-test.ts","webpack:///./src/util/provide.ts?5c82*****","webpack:///external \"$\"?57aa*****","webpack:///./src/collections/Sliders.ts"],"names":[],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;ACtCA;;IAEG;AACH,uEAAoF;AACpF,8CAA6B;AAoBhB,kBAAS,GAAG;KACrB,WAAW,EAAE,CAAC,CAAC,cAAc,CAAC;KAC9B,eAAe,EAAE,CAAC,CAAC,kBAAkB,CAAC;KACtC,eAAe,EAAE,CAAC,CAAC,kBAAkB,CAAC;KACtC,gBAAgB,EAAE,CAAC,CAAC,mBAAmB,CAAC;KACxC,sBAAsB,EAAE,EAAE;KAC1B,aAAa,EAAE;SACP;aACI,KAAK,EAAE,MAAM;aACb,WAAW,EAAE;iBACT,EAAC,KA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.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\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\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.loaded = 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// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 6e5b1af915babfe1fe92","/**\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\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/_test/slider-test.ts","/**\r\n * Created by gavorhes on 12/10/2015.\r\n */\r\n\r\n\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\r\n    let parts = namespace.split('.');\r\n    let nameSpace = 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\nwindow['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 = 5\n// module chunks = 0 2 3 4 5 7 8","/**\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) {\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) {\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, skipDomId) {\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) {\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 = {};\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"],"sourceRoot":""}
\ No newline at end of file
diff --git a/test-html/legend-test.html b/test-html/legend-test.html
index 6a904c660fdaa7f42822ab44f6ab39f37b064a02..6b0a07c3f08ffd7765ca596206dfa2e7a503fd3d 100644
--- a/test-html/legend-test.html
+++ b/test-html/legend-test.html
@@ -53,7 +53,8 @@
 //  document.body.classList.toggle('is-fullscreen', document.fullscreenEnabled);
 //});
 </script>
-
+<script src="lib/jquery.min.js"></script>
+<script src="lib/custom-ol-build.js"></script>
 <script src="js/legend-test.js"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/test-html/js/ext/custom-ol-build.js b/test-html/lib/custom-ol-build.js
similarity index 100%
rename from test-html/js/ext/custom-ol-build.js
rename to test-html/lib/custom-ol-build.js
diff --git a/test-html/js/ext/jquery.min.js b/test-html/lib/jquery.min.js
similarity index 100%
rename from test-html/js/ext/jquery.min.js
rename to test-html/lib/jquery.min.js
diff --git a/test-html/range-media.html b/test-html/range-media.html
index 1ad218e86b07d8ff6796ead3001d2f149d2b6e6f..a4050f7cef14607ddf75adeed8be9931f88e3877 100644
--- a/test-html/range-media.html
+++ b/test-html/range-media.html
@@ -7,7 +7,8 @@
 </head>
 <body>
 <div id="day-range"></div>
-
+<script src="lib/jquery.min.js"></script>
+<script src="lib/custom-ol-build.js"></script>
 <script src="js/range_media.js"></script>
 </body>
 </html>
\ No newline at end of file
diff --git a/test-html/simple_map.html b/test-html/simple_map.html
index d75b4e9c9a4567974fb2da17c95b4e3c9d2f9018..38d2b71a586917ef8781fd4715b7b3e699f1b141 100644
--- a/test-html/simple_map.html
+++ b/test-html/simple_map.html
@@ -14,7 +14,8 @@
     </div>
     <div id="map"></div>
 </div>
-
+<script src="lib/jquery.min.js"></script>
+<script src="lib/custom-ol-build.js"></script>
 <script src="js/simple_map.js"></script>
 
 </body>
diff --git a/test-html/slider-test.html b/test-html/slider-test.html
index a4060e021abbe63fcb2af02a12cd69c54f13305d..5706ed2cae7df67eb064da752a8f694e3a226f72 100644
--- a/test-html/slider-test.html
+++ b/test-html/slider-test.html
@@ -3,8 +3,8 @@
 <head>
     <meta charset="UTF-8">
     <title>Title</title>
-    <link rel="stylesheet" href="_css/all-ol-style.css">
-    <link rel="stylesheet" href="_css/layer-swipe.css">
+    <link rel="stylesheet" href="css/all-ol-style.css">
+    <link rel="stylesheet" href="css/layer-swipe.css">
     <style>
         body, html {
             height: 100%;
@@ -55,7 +55,8 @@
     </div>
 </div>
 
-<!--<button id="make-report">export</button>-->
+<script src="js/ext/jquery.min.js"></script>
+<script src="js/ext/custom-ol-build.js"></script>
 <script src="js/slider-test.js"></script>
 
 </body>