Map

Внесены поправки в класс координат (.ToString) Внесены

4/30/2019 8:44:04 PM

Details

diff --git a/ModelData/BusinessModel/MainEntities/EditedSettlement.cs b/ModelData/BusinessModel/MainEntities/EditedSettlement.cs
index 488c950..d45d660 100644
--- a/ModelData/BusinessModel/MainEntities/EditedSettlement.cs
+++ b/ModelData/BusinessModel/MainEntities/EditedSettlement.cs
@@ -28,13 +28,13 @@ namespace ModelData.BusinessModel.MainEntities
     {
         #region Обязательные данные
 
-        /// \property   public Settlement before
+        /// \property   public string before
         ///
-        /// \brief  Ссылка на экземпляр основного поселения
+        /// \brief  URL экземпляра основного поселения
         /// Обязательное свойство. Установлен атрибут IndexAttrib со значением 2
         /// \returns    The before.
 
-        [IndexAttrib(2)] public Settlement before { set; get; }
+        [IndexAttrib(2)] public string before { set; get; }
 
 
 
@@ -169,7 +169,7 @@ namespace ModelData.BusinessModel.MainEntities
         /// \param  hasBeginning    Точный год.
         /// \param  Source          Источник.
 
-        public EditedSettlement(string URL, Settlement before, InstantTime hasBeginning, string Source)
+        public EditedSettlement(string URL, string before, InstantTime hasBeginning, string Source)
         {
             this.URL = URL;
             this.before = before;
diff --git a/ModelData/BusinessModel/Tools/Coordinate.cs b/ModelData/BusinessModel/Tools/Coordinate.cs
index a77e442..2044ee5 100644
--- a/ModelData/BusinessModel/Tools/Coordinate.cs
+++ b/ModelData/BusinessModel/Tools/Coordinate.cs
@@ -118,7 +118,7 @@ namespace ModelData.BusinessModel.Tools
 
         public override string ToString()
         {
-            return Lat + " " + Long;
+            return Lat + " " +  Long;
         }
 
 
diff --git a/ModelData/BusinessModel/UnitOfWork/Context.cs b/ModelData/BusinessModel/UnitOfWork/Context.cs
index a6fa625..19e98a5 100644
--- a/ModelData/BusinessModel/UnitOfWork/Context.cs
+++ b/ModelData/BusinessModel/UnitOfWork/Context.cs
@@ -46,7 +46,7 @@ namespace ModelData.BusinessModel.UnitOfWork
                     {
                         URL = str,
                         Title = Convert(elem["title"])/*elem["title"].ToString()*/,
-                        Position = Convert(elem["lat"]) + " " + Convert(elem["long"]),
+                        Position = Convert(elem["long"]) + " " + Convert(elem["lat"]),                        
                         Population = Convert(elem["maxPop"])
                     };
                     MapPoints.Add(mapPoint);
@@ -88,8 +88,8 @@ namespace ModelData.BusinessModel.UnitOfWork
                         SettlementTypes.Add(settlementType);
                     }
 
-                    if (!mapPoint.Region.Contains(settlementType.Title))
-                        mapPoint.Region.Add(settlementType.Title);
+                    if (!mapPoint.Type.Contains(settlementType.Title))
+                        mapPoint.Type.Add(settlementType.Title);
                 }               
             }
         }
@@ -132,7 +132,7 @@ namespace ModelData.BusinessModel.UnitOfWork
                 edited = new EditedSettlement
                     (
                         elem["editedSettlement"].ToString(),
-                        settlement,
+                        settlement.URL,
                         new InstantTime(Convert(elem["year"])),
                         elem["source"].ToString()
                     );
diff --git a/ModelData/WebModel/WebDataManager.cs b/ModelData/WebModel/WebDataManager.cs
index e8a9b3b..8d22479 100644
--- a/ModelData/WebModel/WebDataManager.cs
+++ b/ModelData/WebModel/WebDataManager.cs
@@ -67,6 +67,7 @@ namespace ModelData.WebModel
 
                 temp.Add(settlement.Title);
             }
+            model.arrayNameSettlements = temp.ToArray();
 
             model.InitZoom(maxPop);
 
diff --git a/web-map/App_Data/Config/Config.xml b/web-map/App_Data/Config/Config.xml
new file mode 100644
index 0000000..fbcae20
--- /dev/null
+++ b/web-map/App_Data/Config/Config.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<ConfigManager xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+  <SPARQL_Query_Endpoint>http://jena.denhome.keenetic.link/map/query</SPARQL_Query_Endpoint>
+  <SPARQL_Change_Endpoint>http://jena.denhome.keenetic.link/map/update</SPARQL_Change_Endpoint>
+  <ModeratorName>sstu</ModeratorName>
+  <ModeratorPassword>sstu</ModeratorPassword>
+</ConfigManager>
\ No newline at end of file
diff --git a/web-map/App_Start/BundleConfig.cs b/web-map/App_Start/BundleConfig.cs
index eca21b6..5bcf35f 100644
--- a/web-map/App_Start/BundleConfig.cs
+++ b/web-map/App_Start/BundleConfig.cs
@@ -9,7 +9,8 @@ namespace web_map
         public static void RegisterBundles(BundleCollection bundles)
         {
             bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
-                        "~/Scripts/jquery-{version}.js"));
+                        "~/Scripts/jquery-{version}.js",
+                        "~/Scripts/jquery-ui/jquery-ui.js"));
 
             bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                         "~/Scripts/jquery.validate*"));
@@ -20,11 +21,13 @@ namespace web_map
                         "~/Scripts/modernizr-*"));
 
             bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
-                      "~/Scripts/bootstrap.js"));           
+                      "~/Scripts/bootstrap.js",
+                      "~/Scripts/jQRangeSlider-min.js"));           
 
             bundles.Add(new StyleBundle("~/Content/css").Include(
                       "~/Content/jquery-ui/jquery-ui.min.css",
                       "~/Content/bootstrap.css",
+                      "~/Content/jQRangeSlider-iThing.css",
                       "~/Content/site.css"));
         }
     }
diff --git a/web-map/Content/jQRangeSlider-iThing.css b/web-map/Content/jQRangeSlider-iThing.css
new file mode 100644
index 0000000..dc823cc
--- /dev/null
+++ b/web-map/Content/jQRangeSlider-iThing.css
@@ -0,0 +1,251 @@
+/**
+ * Theme for jQRangeSlider
+ * Inspired by http://cssdeck.com/item/381/itunes-10-storage-bar
+ *        and http://cssdeck.com/item/276/pure-css-arrow-with-border-tooltip
+ */
+
+.ui-rangeSlider{
+  height: 30px;
+  padding-top: 40px;
+}
+
+.ui-rangeSlider,
+.ui-rangeSlider-container,
+.ui-rangeSlider-arrow{
+  -webkit-box-sizing:content-box;
+     -moz-box-sizing:content-box;
+          box-sizing:content-box;
+}
+
+.ui-rangeSlider-withArrows .ui-rangeSlider-container{
+  margin: 0 15px;
+}
+
+.ui-rangeSlider-withArrows .ui-rangeSlider-container,
+.ui-rangeSlider-noArrow .ui-rangeSlider-container,
+.ui-rangeSlider-arrow{
+  -webkit-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.5);
+     -moz-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.5);
+          box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.5);
+}
+
+.ui-rangeSlider-disabled.ui-rangeSlider-withArrows .ui-rangeSlider-container,
+.ui-rangeSlider-disabled.ui-rangeSlider-noArrow .ui-rangeSlider-container,
+.ui-rangeSlider-disabled .ui-rangeSlider-arrow{
+  -webkit-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.3);
+     -moz-box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.3);
+          box-shadow: inset 0px 4px 6px -2px RGBA(0,0,0,0.3);
+}
+
+.ui-rangeSlider-noArrow .ui-rangeSlider-container{
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  border-left: solid 1px #515862;
+  border-right: solid 1px #515862;
+}
+
+.ui-rangeSlider-disabled.ui-rangeSlider-noArrow .ui-rangeSlider-container{
+  border-color: #8490a3;
+}
+
+.ui-rangeSlider-container,
+.ui-rangeSlider-arrow{
+ 	height: 30px;
+
+  border-top: solid 1px #232a32;
+  border-bottom: solid 1px #6a7179;
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-container,
+.ui-rangeSlider-disabled .ui-rangeSlider-arrow{
+  border-top-color: #49576b;
+  border-bottom-color: #9ca7b3;
+}
+
+.ui-rangeSlider-container,
+.ui-rangeSlider-arrow,
+.ui-rangeSlider-label{
+  background: #67707F;
+  background: -moz-linear-gradient(top, #67707F 0%, #888DA0 100%);
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#67707F), color-stop(100%,#888DA0));
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-container,
+.ui-rangeSlider-disabled .ui-rangeSlider-arrow,
+.ui-rangeSlider-disabled .ui-rangeSlider-label{
+  background: #95a4bd;
+  background: -moz-linear-gradient(top, #95a4bd 0%, #b2bbd8 100%);
+  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#95a4bd), color-stop(100%,#b2bbd8));
+}
+
+.ui-rangeSlider-arrow{
+  width:14px;
+  cursor:pointer;
+}
+
+.ui-rangeSlider-leftArrow{
+  border-radius:4px 0 0 4px;
+  border-left: solid 1px #515862;
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow{
+ border-left-color: #8792a2; 
+}
+
+.ui-rangeSlider-rightArrow{
+  border-radius:0 4px 4px 0;
+  border-right: solid 1px #515862;
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow{
+ border-right-color: #8792a2; 
+}
+
+.ui-rangeSlider-arrow-inner{
+  position: absolute;
+  top: 50%;
+  border: 10px solid transparent;
+  width:0;
+  height:0;
+
+  margin-top: -10px;
+}
+
+.ui-rangeSlider-leftArrow .ui-rangeSlider-arrow-inner{
+  border-right:10px solid #a4a8b7;
+  left: 0;
+  margin-left: -8px;
+}
+
+.ui-rangeSlider-leftArrow:hover .ui-rangeSlider-arrow-inner{
+  border-right:10px solid #b3b6c2;
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow .ui-rangeSlider-arrow-inner,
+.ui-rangeSlider-disabled .ui-rangeSlider-leftArrow:hover .ui-rangeSlider-arrow-inner{
+  border-right-color: #bbc0cf;
+}
+
+.ui-rangeSlider-rightArrow .ui-rangeSlider-arrow-inner{
+  border-left:10px solid #a4a8b7;
+  right: 0;
+  margin-right: -8px;
+}
+
+.ui-rangeSlider-rightArrow:hover .ui-rangeSlider-arrow-inner{
+  border-left:10px solid #b3b6c2;
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow .ui-rangeSlider-arrow-inner,
+.ui-rangeSlider-disabled .ui-rangeSlider-rightArrow:hover .ui-rangeSlider-arrow-inner{
+  border-left-color: #bbc0cf;
+}
+
+.ui-rangeSlider-innerBar{
+  width: 110%;
+  height: 100%;
+  left: -10px;
+  overflow: hidden;
+}
+
+.ui-rangeSlider-bar{
+	background: #68a1d6;
+  height: 29px;
+  margin:1px 0;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  cursor:move;
+	cursor:grab;
+	cursor: -moz-grab;
+  
+	-webkit-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.5);
+     -moz-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.5);
+          box-shadow: inset 0 2px 6px RGBA(0,0,0,0.5);
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-bar{
+  background: #93aeca;
+
+  -webkit-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.3);
+     -moz-box-shadow: inset 0 2px 6px RGBA(0,0,0,0.3);
+          box-shadow: inset 0 2px 6px RGBA(0,0,0,0.3);
+}
+
+.ui-rangeSlider-handle{
+	width:10px;
+	height:30px;
+	background: transparent;
+	cursor:col-resize;
+}
+
+.ui-rangeSlider-label{
+  padding: 5px 10px;
+  bottom:40px;
+
+  -moz-border-radius: 4px;
+       border-radius: 4px;
+
+  -webkit-box-shadow: 0px 1px 0px #c2c5d6;
+     -moz-box-shadow: 0px 1px 0px #c2c5d6;
+          box-shadow: 0px 1px 0px #c2c5d6;
+
+  color:white;
+  font-size:15px;
+
+  cursor:col-resize;
+}
+
+.ui-rangeSlider-label-inner{
+  position: absolute;
+  top: 100%;
+  left: 50%;
+  display: block;
+  z-index:99;
+  border-left: 10px solid transparent;
+  border-right: 10px solid transparent;
+
+  margin-left: -10px;
+  border-top: 10px solid #888DA0;
+}
+
+.ui-rangeSlider-disabled .ui-rangeSlider-label-inner{
+  border-top-color: #b2bbd8; 
+}
+
+.ui-editRangeSlider-inputValue{
+  width:2em;
+  text-align:center;
+  font-size:15px;
+}
+
+.ui-rangeSlider .ui-ruler-scale{
+  position:absolute;
+  top:0;
+  left:0;
+  bottom:0;
+  right:0;
+}
+
+.ui-rangeSlider .ui-ruler-tick { 
+  float: left; 
+}
+
+.ui-rangeSlider .ui-ruler-scale0 .ui-ruler-tick-inner{
+  color:white;
+  margin-top:1px;
+  border-left: 1px solid white;
+  height:29px;
+  padding-left:2px;
+  position:relative;
+}
+
+.ui-rangeSlider .ui-ruler-scale0 .ui-ruler-tick-label{
+  position:absolute;
+  bottom: 6px;
+}
+
+.ui-rangeSlider .ui-ruler-scale1 .ui-ruler-tick-inner{
+  border-left:1px solid white;
+  margin-top: 25px;
+  height: 5px;
+}
\ No newline at end of file
diff --git a/web-map/Content/Site.css b/web-map/Content/Site.css
index faa0b70..79de3a0 100644
--- a/web-map/Content/Site.css
+++ b/web-map/Content/Site.css
@@ -30,24 +30,43 @@ textarea {
 #sidebar {
     width: 250px;
     position: fixed;
-    top: 20px;
+    top: 55px;
     left: 0px;
-    height: 100vh;
+    bottom: 30px;
     z-index: 999;
-    background: #7386D5;
+    background: #5a6268; /*#6c757d;*/ /*.bg-secondary*/
     color: #fff;
     transition: all 0.3s;
+    overflow-x: auto;
+    overflow-y: auto;
 }
 
 #sidebar.active {
-    margin-left: -250px;
+    transform: translateX(-115%);
 }
 
 #sidebar .sidebar-header {
-    padding: 20px;
-    background: #6d7fcc;
+    position: sticky;
+    top: 0px;
+    padding: 15px;
+    background: #4d4d4d; /*#343a40;*/ /*.bg-dark*/
+}
+
+#sidebar .sidebar-text {
+    padding: 0.2rem 0.2rem;
+}
+#sidebar-text .sidebar-text-element {
+    margin-bottom: 0.5rem;
+    padding: 0.5rem 0.5rem;
+    background-color: #696969;
+    border-radius: .3rem;
 }
 
+#sidebar p {
+    margin-bottom: 0.2rem;
+}
+
+
 #sidebar ul.components {
     padding: 20px 0;
     border-bottom: 1px solid #47748b;
@@ -103,13 +122,13 @@ ul.CTAs {
     padding: 20px;
 }
 
-    ul.CTAs a {
-        text-align: center;
-        font-size: 0.9em !important;
-        display: block;
-        border-radius: 5px;
-        margin-bottom: 5px;
-    }
+ul.CTAs a {
+    text-align: center;
+    font-size: 0.9em !important;
+    display: block;
+    border-radius: 5px;
+    margin-bottom: 5px;
+}
 
 a.download {
     background: #fff;
@@ -120,3 +139,15 @@ a.article, a.article:hover {
     background: #6d7fcc !important;
     color: #fff !important;
 }
+
+/*
+    для свернуть/развернуть строку
+*/
+.hideLine p,
+.hideLine [type="checkbox"] {
+    display: none;
+}
+
+    .hideLine [type="checkbox"]:checked ~ p {
+        display: block;
+    }
diff --git a/web-map/Controllers/MapAPIController.cs b/web-map/Controllers/MapAPIController.cs
index 64147dd..441d454 100644
--- a/web-map/Controllers/MapAPIController.cs
+++ b/web-map/Controllers/MapAPIController.cs
@@ -50,7 +50,15 @@ namespace web_map.Controllers
             WebDataManager webData = WebDataManager.Get();
 
             return Json(webData.GetSettlementsNames(subName), JsonRequestBehavior.AllowGet);
-        }        
+        }
+
+        [HttpGet]
+        public JsonResult GetYears()
+        {
+            WebDataManager webData = WebDataManager.Get();
+
+            return Json(webData.GetYears(), JsonRequestBehavior.AllowGet);
+        }
 
     }
 }
\ No newline at end of file
diff --git a/web-map/packages.config b/web-map/packages.config
index 5f0e837..9a89e7b 100644
--- a/web-map/packages.config
+++ b/web-map/packages.config
@@ -2,7 +2,8 @@
 <packages>
   <package id="Antlr" version="3.5.0.2" targetFramework="net45" />
   <package id="bootstrap" version="4.3.1" targetFramework="net47" />
-  <package id="HtmlAgilityPack" version="1.11.0" targetFramework="net47" />
+  <package id="bootstrap-slider" version="5.0.13" targetFramework="net47" />
+  <package id="HtmlAgilityPack" version="1.11.3" targetFramework="net47" />
   <package id="jQuery" version="3.3.1" targetFramework="net45" />
   <package id="jQuery.Validation" version="1.17.0" targetFramework="net45" />
   <package id="Microsoft.ApplicationInsights" version="2.9.1" targetFramework="net47" />
@@ -32,7 +33,7 @@
   <package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.11" targetFramework="net47" />
   <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
   <package id="Modernizr" version="2.8.3" targetFramework="net45" />
-  <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net47" />
+  <package id="Newtonsoft.Json" version="12.0.2" targetFramework="net47" />
   <package id="popper.js" version="1.14.3" targetFramework="net47" />
   <package id="System.Diagnostics.DiagnosticSource" version="4.5.1" targetFramework="net47" />
   <package id="VDS.Common" version="1.10.0" targetFramework="net45" />
diff --git a/web-map/Scripts/jQRangeSlider-min.js b/web-map/Scripts/jQRangeSlider-min.js
new file mode 100644
index 0000000..8a4af49
--- /dev/null
+++ b/web-map/Scripts/jQRangeSlider-min.js
@@ -0,0 +1,2 @@
+/*! jQRangeSlider 5.7.2 - 2016-01-18 - Copyright (C) Guillaume Gautreau 2012 - MIT and GPLv3 licenses.*/!function(a,b){"use strict";a.widget("ui.rangeSliderMouseTouch",a.ui.mouse,{enabled:!0,_mouseInit:function(){var b=this;a.ui.mouse.prototype._mouseInit.apply(this),this._mouseDownEvent=!1,this.element.bind("touchstart."+this.widgetName,function(a){return b._touchStart(a)})},_mouseDestroy:function(){a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),a.ui.mouse.prototype._mouseDestroy.apply(this)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},destroy:function(){this._mouseDestroy(),a.ui.mouse.prototype.destroy.apply(this),this._mouseInit=null},_touchStart:function(b){if(!this.enabled)return!1;b.which=1,b.preventDefault(),this._fillTouchEvent(b);var c=this,d=this._mouseDownEvent;this._mouseDown(b),d!==this._mouseDownEvent&&(this._touchEndDelegate=function(a){c._touchEnd(a)},this._touchMoveDelegate=function(a){c._touchMove(a)},a(document).bind("touchmove."+this.widgetName,this._touchMoveDelegate).bind("touchend."+this.widgetName,this._touchEndDelegate))},_mouseDown:function(b){return this.enabled?a.ui.mouse.prototype._mouseDown.apply(this,[b]):!1},_touchEnd:function(b){this._fillTouchEvent(b),this._mouseUp(b),a(document).unbind("touchmove."+this.widgetName,this._touchMoveDelegate).unbind("touchend."+this.widgetName,this._touchEndDelegate),this._mouseDownEvent=!1,a(document).trigger("mouseup")},_touchMove:function(a){return a.preventDefault(),this._fillTouchEvent(a),this._mouseMove(a)},_fillTouchEvent:function(a){var b;b="undefined"==typeof a.targetTouches&&"undefined"==typeof a.changedTouches?a.originalEvent.targetTouches[0]||a.originalEvent.changedTouches[0]:a.targetTouches[0]||a.changedTouches[0],a.pageX=b.pageX,a.pageY=b.pageY,a.which=1}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderDraggable",a.ui.rangeSliderMouseTouch,{cache:null,options:{containment:null},_create:function(){a.ui.rangeSliderMouseTouch.prototype._create.apply(this),setTimeout(a.proxy(this._initElementIfNotDestroyed,this),10)},destroy:function(){this.cache=null,a.ui.rangeSliderMouseTouch.prototype.destroy.apply(this)},_initElementIfNotDestroyed:function(){this._mouseInit&&this._initElement()},_initElement:function(){this._mouseInit(),this._cache()},_setOption:function(b,c){"containment"===b&&(null===c||0===a(c).length?this.options.containment=null:this.options.containment=a(c))},_mouseStart:function(a){return this._cache(),this.cache.click={left:a.pageX,top:a.pageY},this.cache.initialOffset=this.element.offset(),this._triggerMouseEvent("mousestart"),!0},_mouseDrag:function(a){var b=a.pageX-this.cache.click.left;return b=this._constraintPosition(b+this.cache.initialOffset.left),this._applyPosition(b),this._triggerMouseEvent("sliderDrag"),!1},_mouseStop:function(){this._triggerMouseEvent("stop")},_constraintPosition:function(a){return 0!==this.element.parent().length&&null!==this.cache.parent.offset&&(a=Math.min(a,this.cache.parent.offset.left+this.cache.parent.width-this.cache.width.outer),a=Math.max(a,this.cache.parent.offset.left)),a},_applyPosition:function(a){this._cacheIfNecessary();var b={top:this.cache.offset.top,left:a};this.element.offset({left:a}),this.cache.offset=b},_cacheIfNecessary:function(){null===this.cache&&this._cache()},_cache:function(){this.cache={},this._cacheMargins(),this._cacheParent(),this._cacheDimensions(),this.cache.offset=this.element.offset()},_cacheMargins:function(){this.cache.margin={left:this._parsePixels(this.element,"marginLeft"),right:this._parsePixels(this.element,"marginRight"),top:this._parsePixels(this.element,"marginTop"),bottom:this._parsePixels(this.element,"marginBottom")}},_cacheParent:function(){if(null!==this.options.parent){var a=this.element.parent();this.cache.parent={offset:a.offset(),width:a.width()}}else this.cache.parent=null},_cacheDimensions:function(){this.cache.width={outer:this.element.outerWidth(),inner:this.element.width()}},_parsePixels:function(a,b){return parseInt(a.css(b),10)||0},_triggerMouseEvent:function(a){var b=this._prepareEventData();this.element.trigger(a,b)},_prepareEventData:function(){return{element:this.element,offset:this.cache.offset||null}}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSlider",{options:{bounds:{min:0,max:100},defaultValues:{min:20,max:50},wheelMode:null,wheelSpeed:4,arrows:!0,valueLabels:"show",formatter:null,durationIn:0,durationOut:400,delayOut:200,range:{min:!1,max:!1},step:!1,scales:!1,enabled:!0,symmetricPositionning:!1},_values:null,_valuesChanged:!1,_initialized:!1,bar:null,leftHandle:null,rightHandle:null,innerBar:null,container:null,arrows:null,labels:null,changing:{min:!1,max:!1},changed:{min:!1,max:!1},ruler:null,_create:function(){this._setDefaultValues(),this.labels={left:null,right:null,leftDisplayed:!0,rightDisplayed:!0},this.arrows={left:null,right:null},this.changing={min:!1,max:!1},this.changed={min:!1,max:!1},this._createElements(),this._bindResize(),setTimeout(a.proxy(this.resize,this),1),setTimeout(a.proxy(this._initValues,this),1)},_setDefaultValues:function(){this._values={min:this.options.defaultValues.min,max:this.options.defaultValues.max}},_bindResize:function(){var b=this;this._resizeProxy=function(a){b.resize(a)},a(window).resize(this._resizeProxy)},_initWidth:function(){this.container.css("width",this.element.width()-this.container.outerWidth(!0)+this.container.width()),this.innerBar.css("width",this.container.width()-this.innerBar.outerWidth(!0)+this.innerBar.width())},_initValues:function(){this._initialized=!0,this.values(this._values.min,this._values.max)},_setOption:function(a,b){this._setWheelOption(a,b),this._setArrowsOption(a,b),this._setLabelsOption(a,b),this._setLabelsDurations(a,b),this._setFormatterOption(a,b),this._setBoundsOption(a,b),this._setRangeOption(a,b),this._setStepOption(a,b),this._setScalesOption(a,b),this._setEnabledOption(a,b),this._setPositionningOption(a,b)},_validProperty:function(a,b,c){return null===a||"undefined"==typeof a[b]?c:a[b]},_setStepOption:function(a,b){"step"===a&&(this.options.step=b,this._leftHandle("option","step",b),this._rightHandle("option","step",b),this._changed(!0))},_setScalesOption:function(a,b){"scales"===a&&(b===!1||null===b?(this.options.scales=!1,this._destroyRuler()):b instanceof Array&&(this.options.scales=b,this._updateRuler()))},_setRangeOption:function(a,b){"range"===a&&(this._bar("option","range",b),this.options.range=this._bar("option","range"),this._changed(!0))},_setBoundsOption:function(a,b){"bounds"===a&&"undefined"!=typeof b.min&&"undefined"!=typeof b.max&&this.bounds(b.min,b.max)},_setWheelOption:function(a,b){("wheelMode"===a||"wheelSpeed"===a)&&(this._bar("option",a,b),this.options[a]=this._bar("option",a))},_setLabelsOption:function(a,b){if("valueLabels"===a){if("hide"!==b&&"show"!==b&&"change"!==b)return;this.options.valueLabels=b,"hide"!==b?(this._createLabels(),this._leftLabel("update"),this._rightLabel("update")):this._destroyLabels()}},_setFormatterOption:function(a,b){"formatter"===a&&null!==b&&"function"==typeof b&&"hide"!==this.options.valueLabels&&(this._leftLabel("option","formatter",b),this.options.formatter=this._rightLabel("option","formatter",b))},_setArrowsOption:function(a,b){"arrows"!==a||b!==!0&&b!==!1||b===this.options.arrows||(b===!0?(this.element.removeClass("ui-rangeSlider-noArrow").addClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","block"),this.arrows.right.css("display","block"),this.options.arrows=!0):b===!1&&(this.element.addClass("ui-rangeSlider-noArrow").removeClass("ui-rangeSlider-withArrows"),this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.options.arrows=!1),this._initWidth())},_setLabelsDurations:function(a,b){if("durationIn"===a||"durationOut"===a||"delayOut"===a){if(parseInt(b,10)!==b)return;null!==this.labels.left&&this._leftLabel("option",a,b),null!==this.labels.right&&this._rightLabel("option",a,b),this.options[a]=b}},_setEnabledOption:function(a,b){"enabled"===a&&this.toggle(b)},_setPositionningOption:function(a,b){"symmetricPositionning"===a&&(this._rightHandle("option",a,b),this.options[a]=this._leftHandle("option",a,b))},_createElements:function(){"absolute"!==this.element.css("position")&&this.element.css("position","relative"),this.element.addClass("ui-rangeSlider"),this.container=a("<div class='ui-rangeSlider-container' />").css("position","absolute").appendTo(this.element),this.innerBar=a("<div class='ui-rangeSlider-innerBar' />").css("position","absolute").css("top",0).css("left",0),this._createHandles(),this._createBar(),this.container.prepend(this.innerBar),this._createArrows(),"hide"!==this.options.valueLabels?this._createLabels():this._destroyLabels(),this._updateRuler(),this.options.enabled||this._toggle(this.options.enabled)},_createHandle:function(b){return a("<div />")[this._handleType()](b).bind("sliderDrag",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this))},_createHandles:function(){this.leftHandle=this._createHandle({isLeft:!0,bounds:this.options.bounds,value:this._values.min,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container),this.rightHandle=this._createHandle({isLeft:!1,bounds:this.options.bounds,value:this._values.max,step:this.options.step,symmetricPositionning:this.options.symmetricPositionning}).appendTo(this.container)},_createBar:function(){this.bar=a("<div />").prependTo(this.container).bind("sliderDrag scroll zoom",a.proxy(this._changing,this)).bind("stop",a.proxy(this._changed,this)),this._bar({leftHandle:this.leftHandle,rightHandle:this.rightHandle,values:{min:this._values.min,max:this._values.max},type:this._handleType(),range:this.options.range,wheelMode:this.options.wheelMode,wheelSpeed:this.options.wheelSpeed}),this.options.range=this._bar("option","range"),this.options.wheelMode=this._bar("option","wheelMode"),this.options.wheelSpeed=this._bar("option","wheelSpeed")},_createArrows:function(){this.arrows.left=this._createArrow("left"),this.arrows.right=this._createArrow("right"),this.options.arrows?this.element.addClass("ui-rangeSlider-withArrows"):(this.arrows.left.css("display","none"),this.arrows.right.css("display","none"),this.element.addClass("ui-rangeSlider-noArrow"))},_createArrow:function(b){var c,d=a("<div class='ui-rangeSlider-arrow' />").append("<div class='ui-rangeSlider-arrow-inner' />").addClass("ui-rangeSlider-"+b+"Arrow").css("position","absolute").css(b,0).appendTo(this.element);return c="right"===b?a.proxy(this._scrollRightClick,this):a.proxy(this._scrollLeftClick,this),d.bind("mousedown touchstart",c),d},_proxy:function(a,b,c){var d=Array.prototype.slice.call(c);return a&&a[b]?a[b].apply(a,d):null},_handleType:function(){return"rangeSliderHandle"},_barType:function(){return"rangeSliderBar"},_bar:function(){return this._proxy(this.bar,this._barType(),arguments)},_labelType:function(){return"rangeSliderLabel"},_leftLabel:function(){return this._proxy(this.labels.left,this._labelType(),arguments)},_rightLabel:function(){return this._proxy(this.labels.right,this._labelType(),arguments)},_leftHandle:function(){return this._proxy(this.leftHandle,this._handleType(),arguments)},_rightHandle:function(){return this._proxy(this.rightHandle,this._handleType(),arguments)},_getValue:function(a,b){return b===this.rightHandle&&(a-=b.outerWidth()),a*(this.options.bounds.max-this.options.bounds.min)/(this.container.innerWidth()-b.outerWidth(!0))+this.options.bounds.min},_trigger:function(a){var b=this;setTimeout(function(){b.element.trigger(a,{label:b.element,values:b.values()})},1)},_changing:function(){this._updateValues()&&(this._trigger("valuesChanging"),this._valuesChanged=!0)},_deactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","hide"),this._rightLabel("option","show","hide"))},_reactivateLabels:function(){"change"===this.options.valueLabels&&(this._leftLabel("option","show","change"),this._rightLabel("option","show","change"))},_changed:function(a){a===!0&&this._deactivateLabels(),(this._updateValues()||this._valuesChanged)&&(this._trigger("valuesChanged"),a!==!0&&this._trigger("userValuesChanged"),this._valuesChanged=!1),a===!0&&this._reactivateLabels()},_updateValues:function(){var a=this._leftHandle("value"),b=this._rightHandle("value"),c=this._min(a,b),d=this._max(a,b),e=c!==this._values.min||d!==this._values.max;return this._values.min=this._min(a,b),this._values.max=this._max(a,b),e},_min:function(a,b){return Math.min(a,b)},_max:function(a,b){return Math.max(a,b)},_createLabel:function(b,c){var d;return null===b?(d=this._getLabelConstructorParameters(b,c),b=a("<div />").appendTo(this.element)[this._labelType()](d)):(d=this._getLabelRefreshParameters(b,c),b[this._labelType()](d)),b},_getLabelConstructorParameters:function(a,b){return{handle:b,handleType:this._handleType(),formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getLabelRefreshParameters:function(){return{formatter:this._getFormatter(),show:this.options.valueLabels,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}},_getFormatter:function(){return this.options.formatter===!1||null===this.options.formatter?this._defaultFormatter:this.options.formatter},_defaultFormatter:function(a){return Math.round(a)},_destroyLabel:function(a){return null!==a&&(a[this._labelType()]("destroy"),a.remove(),a=null),a},_createLabels:function(){this.labels.left=this._createLabel(this.labels.left,this.leftHandle),this.labels.right=this._createLabel(this.labels.right,this.rightHandle),this._leftLabel("pair",this.labels.right)},_destroyLabels:function(){this.labels.left=this._destroyLabel(this.labels.left),this.labels.right=this._destroyLabel(this.labels.right)},_stepRatio:function(){return this._leftHandle("stepRatio")},_scrollRightClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollRight",4*this._stepRatio(),1)):!1},_continueScrolling:function(a,b,c,d){if(!this.options.enabled)return!1;this._bar(a,c),d=d||5,d--;var e=this,f=16,g=Math.max(1,4/this._stepRatio());this._scrollTimeout=setTimeout(function(){0===d&&(b>f?b=Math.max(f,b/1.5):c=Math.min(g,2*c),d=5),e._continueScrolling(a,b,c,d)},b)},_scrollLeftClick:function(a){return this.options.enabled?(a.preventDefault(),this._bar("startScroll"),this._bindStopScroll(),void this._continueScrolling("scrollLeft",4*this._stepRatio(),1)):!1},_bindStopScroll:function(){var b=this;this._stopScrollHandle=function(a){a.preventDefault(),b._stopScroll()},a(document).bind("mouseup touchend",this._stopScrollHandle)},_stopScroll:function(){a(document).unbind("mouseup touchend",this._stopScrollHandle),this._stopScrollHandle=null,this._bar("stopScroll"),clearTimeout(this._scrollTimeout)},_createRuler:function(){this.ruler=a("<div class='ui-rangeSlider-ruler' />").appendTo(this.innerBar)},_setRulerParameters:function(){this.ruler.ruler({min:this.options.bounds.min,max:this.options.bounds.max,scales:this.options.scales})},_destroyRuler:function(){null!==this.ruler&&a.fn.ruler&&(this.ruler.ruler("destroy"),this.ruler.remove(),this.ruler=null)},_updateRuler:function(){this._destroyRuler(),this.options.scales!==!1&&a.fn.ruler&&(this._createRuler(),this._setRulerParameters())},values:function(a,b){var c;if("undefined"!=typeof a&&"undefined"!=typeof b){if(!this._initialized)return this._values.min=a,this._values.max=b,this._values;this._deactivateLabels(),c=this._bar("values",a,b),this._changed(!0),this._reactivateLabels()}else c=this._bar("values",a,b);return c},min:function(a){return this._values.min=this.values(a,this._values.max).min,this._values.min},max:function(a){return this._values.max=this.values(this._values.min,a).max,this._values.max},bounds:function(a,b){return this._isValidValue(a)&&this._isValidValue(b)&&b>a&&(this._setBounds(a,b),this._updateRuler(),this._changed(!0)),this.options.bounds},_isValidValue:function(a){return"undefined"!=typeof a&&parseFloat(a)===a},_setBounds:function(a,b){this.options.bounds={min:a,max:b},this._leftHandle("option","bounds",this.options.bounds),this._rightHandle("option","bounds",this.options.bounds),this._bar("option","bounds",this.options.bounds)},zoomIn:function(a){this._bar("zoomIn",a)},zoomOut:function(a){this._bar("zoomOut",a)},scrollLeft:function(a){this._bar("startScroll"),this._bar("scrollLeft",a),this._bar("stopScroll")},scrollRight:function(a){this._bar("startScroll"),this._bar("scrollRight",a),this._bar("stopScroll")},resize:function(){this.container&&(this._initWidth(),this._leftHandle("update"),this._rightHandle("update"),this._bar("update"))},enable:function(){this.toggle(!0)},disable:function(){this.toggle(!1)},toggle:function(a){a===b&&(a=!this.options.enabled),this.options.enabled!==a&&this._toggle(a)},_toggle:function(a){this.options.enabled=a,this.element.toggleClass("ui-rangeSlider-disabled",!a);var b=a?"enable":"disable";this._bar(b),this._leftHandle(b),this._rightHandle(b),this._leftLabel(b),this._rightLabel(b)},destroy:function(){this.element.removeClass("ui-rangeSlider-withArrows ui-rangeSlider-noArrow ui-rangeSlider-disabled"),this._destroyWidgets(),this._destroyElements(),this.element.removeClass("ui-rangeSlider"),this.options=null,a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this._bindResize=null,a.Widget.prototype.destroy.apply(this,arguments)},_destroyWidget:function(a){this["_"+a]("destroy"),this[a].remove(),this[a]=null},_destroyWidgets:function(){this._destroyWidget("bar"),this._destroyWidget("leftHandle"),this._destroyWidget("rightHandle"),this._destroyRuler(),this._destroyLabels()},_destroyElements:function(){this.container.remove(),this.container=null,this.innerBar.remove(),this.innerBar=null,this.arrows.left.remove(),this.arrows.right.remove(),this.arrows=null}})}(jQuery),function(a,b){"use strict";a.widget("ui.rangeSliderHandle",a.ui.rangeSliderDraggable,{currentMove:null,margin:0,parentElement:null,options:{isLeft:!0,bounds:{min:0,max:100},range:!1,value:0,step:!1},_value:0,_left:0,_create:function(){a.ui.rangeSliderDraggable.prototype._create.apply(this),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-handle").toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this.element.append("<div class='ui-rangeSlider-handle-inner' />"),this._value=this._constraintValue(this.options.value)},destroy:function(){this.element.empty(),a.ui.rangeSliderDraggable.prototype.destroy.apply(this)},_setOption:function(b,c){"isLeft"!==b||c!==!0&&c!==!1||c===this.options.isLeft?"step"===b&&this._checkStep(c)?(this.options.step=c,this.update()):"bounds"===b?(this.options.bounds=c,this.update()):"range"===b&&this._checkRange(c)?(this.options.range=c,this.update()):"symmetricPositionning"===b&&(this.options.symmetricPositionning=c===!0,this.update()):(this.options.isLeft=c,this.element.toggleClass("ui-rangeSlider-leftHandle",this.options.isLeft).toggleClass("ui-rangeSlider-rightHandle",!this.options.isLeft),this._position(this._value),this.element.trigger("switch",this.options.isLeft)),a.ui.rangeSliderDraggable.prototype._setOption.apply(this,[b,c])},_checkRange:function(a){return a===!1||!this._isValidValue(a.min)&&!this._isValidValue(a.max)},_isValidValue:function(a){return"undefined"!=typeof a&&a!==!1&&parseFloat(a)!==a},_checkStep:function(a){return a===!1||parseFloat(a)===a},_initElement:function(){a.ui.rangeSliderDraggable.prototype._initElement.apply(this),0===this.cache.parent.width||null===this.cache.parent.width?setTimeout(a.proxy(this._initElementIfNotDestroyed,this),500):(this._position(this._value),this._triggerMouseEvent("initialize"))},_bounds:function(){return this.options.bounds},_cache:function(){a.ui.rangeSliderDraggable.prototype._cache.apply(this),this._cacheParent()},_cacheParent:function(){var a=this.element.parent();this.cache.parent={element:a,offset:a.offset(),padding:{left:this._parsePixels(a,"paddingLeft")},width:a.width()}},_position:function(a){var b=this._getPositionForValue(a);this._applyPosition(b)},_constraintPosition:function(a){var b=this._getValueForPosition(a);return this._getPositionForValue(b)},_applyPosition:function(b){a.ui.rangeSliderDraggable.prototype._applyPosition.apply(this,[b]),this._left=b,this._setValue(this._getValueForPosition(b)),this._triggerMouseEvent("moving")},_prepareEventData:function(){var b=a.ui.rangeSliderDraggable.prototype._prepareEventData.apply(this);return b.value=this._value,b},_setValue:function(a){a!==this._value&&(this._value=a)},_constraintValue:function(a){if(a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min),a=this._round(a),this.options.range!==!1){var b=this.options.range.min||!1,c=this.options.range.max||!1;b!==!1&&(a=Math.max(a,this._round(b))),c!==!1&&(a=Math.min(a,this._round(c))),a=Math.min(a,this._bounds().max),a=Math.max(a,this._bounds().min)}return a},_round:function(a){return this.options.step!==!1&&this.options.step>0?Math.round(a/this.options.step)*this.options.step:a},_getPositionForValue:function(a){if(!this.cache||!this.cache.parent||null===this.cache.parent.offset)return 0;a=this._constraintValue(a);var b=(a-this.options.bounds.min)/(this.options.bounds.max-this.options.bounds.min),c=this.cache.parent.width,d=this.cache.parent.offset.left,e=this.options.isLeft?0:this.cache.width.outer;return this.options.symmetricPositionning?b*(c-2*this.cache.width.outer)+d+e:b*c+d-e},_getValueForPosition:function(a){var b=this._getRawValueForPositionAndBounds(a,this.options.bounds.min,this.options.bounds.max);return this._constraintValue(b)},_getRawValueForPositionAndBounds:function(a,b,c){var d,e,f=null===this.cache.parent.offset?0:this.cache.parent.offset.left;return this.options.symmetricPositionning?(a-=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width-2*this.cache.width.outer):(a+=this.options.isLeft?0:this.cache.width.outer,d=this.cache.parent.width),0===d?this._value:(e=(a-f)/d,e*(c-b)+b)},value:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintValue(a),this._position(a)),this._value},update:function(){this._cache();var a=this._constraintValue(this._value),b=this._getPositionForValue(a);a!==this._value?(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update")):b!==this.cache.offset.left&&(this._triggerMouseEvent("updating"),this._position(a),this._triggerMouseEvent("update"))},position:function(a){return"undefined"!=typeof a&&(this._cache(),a=this._constraintPosition(a),this._applyPosition(a)),this._left},add:function(a,b){return a+b},substract:function(a,b){return a-b},stepsBetween:function(a,b){return this.options.step===!1?b-a:(b-a)/this.options.step},multiplyStep:function(a,b){return a*b},moveRight:function(a){var b;return this.options.step===!1?(b=this._left,this.position(this._left+a),this._left-b):(b=this._value,this.value(this.add(b,this.multiplyStep(this.options.step,a))),this.stepsBetween(b,this._value))},moveLeft:function(a){return-this.moveRight(-a)},stepRatio:function(){if(this.options.step===!1)return 1;var a=(this.options.bounds.max-this.options.bounds.min)/this.options.step;return this.cache.parent.width/a}})}(jQuery),function(a,b){"use strict";function c(a,b){return"undefined"==typeof a?b||!1:a}a.widget("ui.rangeSliderBar",a.ui.rangeSliderDraggable,{options:{leftHandle:null,rightHandle:null,bounds:{min:0,max:100},type:"rangeSliderHandle",range:!1,drag:function(){},stop:function(){},values:{min:0,max:20},wheelSpeed:4,wheelMode:null},_values:{min:0,max:20},_waitingToInit:2,_wheelTimeout:!1,_create:function(){a.ui.rangeSliderDraggable.prototype._create.apply(this),this.element.css("position","absolute").css("top",0).addClass("ui-rangeSlider-bar"),this.options.leftHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this.options.rightHandle.bind("initialize",a.proxy(this._onInitialized,this)).bind("mousestart",a.proxy(this._cache,this)).bind("stop",a.proxy(this._onHandleStop,this)),this._bindHandles(),this._values=this.options.values,this._setWheelModeOption(this.options.wheelMode)},destroy:function(){this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this.options=null,a.ui.rangeSliderDraggable.prototype.destroy.apply(this)},_setOption:function(a,b){"range"===a?this._setRangeOption(b):"wheelSpeed"===a?this._setWheelSpeedOption(b):"wheelMode"===a&&this._setWheelModeOption(b)},_setRangeOption:function(a){if(("object"!=typeof a||null===a)&&(a=!1),a!==!1||this.options.range!==!1){if(a!==!1){var b=c(a.min,this.options.range.min),d=c(a.max,this.options.range.max);this.options.range={min:b,max:d}}else this.options.range=!1;this._setLeftRange(),this._setRightRange()}},_setWheelSpeedOption:function(a){"number"==typeof a&&0!==a&&(this.options.wheelSpeed=a)},_setWheelModeOption:function(a){(null===a||a===!1||"zoom"===a||"scroll"===a)&&(this.options.wheelMode!==a&&this.element.parent().unbind("mousewheel.bar"),this._bindMouseWheel(a),this.options.wheelMode=a)},_bindMouseWheel:function(b){"zoom"===b?this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelZoom,this)):"scroll"===b&&this.element.parent().bind("mousewheel.bar",a.proxy(this._mouseWheelScroll,this))},_setLeftRange:function(){if(this.options.range===!1)return!1;var a=this._values.max,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.max=this._leftHandle("substract",a,this.options.range.min):b.max=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.min=this._leftHandle("substract",a,this.options.range.max):b.min=!1,this._leftHandle("option","range",b)},_setRightRange:function(){var a=this._values.min,b={min:!1,max:!1};"undefined"!=typeof this.options.range.min&&this.options.range.min!==!1?b.min=this._rightHandle("add",a,this.options.range.min):b.min=!1,"undefined"!=typeof this.options.range.max&&this.options.range.max!==!1?b.max=this._rightHandle("add",a,this.options.range.max):b.max=!1,this._rightHandle("option","range",b)},_deactivateRange:function(){this._leftHandle("option","range",!1),this._rightHandle("option","range",!1)},_reactivateRange:function(){this._setRangeOption(this.options.range)},_onInitialized:function(){this._waitingToInit--,0===this._waitingToInit&&this._initMe()},_initMe:function(){this._cache(),this.min(this._values.min),this.max(this._values.max);var a=this._leftHandle("position"),b=this._rightHandle("position")+this.options.rightHandle.width();this.element.offset({left:a}),this.element.css("width",b-a)},_leftHandle:function(){return this._handleProxy(this.options.leftHandle,arguments)},_rightHandle:function(){return this._handleProxy(this.options.rightHandle,arguments)},_handleProxy:function(a,b){var c=Array.prototype.slice.call(b);return a[this.options.type].apply(a,c)},_cache:function(){a.ui.rangeSliderDraggable.prototype._cache.apply(this),this._cacheHandles()},_cacheHandles:function(){this.cache.rightHandle={},this.cache.rightHandle.width=this.options.rightHandle.width(),this.cache.rightHandle.offset=this.options.rightHandle.offset(),this.cache.leftHandle={},this.cache.leftHandle.offset=this.options.leftHandle.offset()},_mouseStart:function(b){a.ui.rangeSliderDraggable.prototype._mouseStart.apply(this,[b]),this._deactivateRange()},_mouseStop:function(b){a.ui.rangeSliderDraggable.prototype._mouseStop.apply(this,[b]),this._cacheHandles(),this._values.min=this._leftHandle("value"),this._values.max=this._rightHandle("value"),this._reactivateRange(),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},_onDragLeftHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.leftHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragRightHandle(a,b);this._values.min=b.value,this.cache.offset.left=b.offset.left,this.cache.leftHandle.offset=b.offset,this._positionBar()}},_onDragRightHandle:function(a,b){if(this._cacheIfNecessary(),b.element[0]===this.options.rightHandle[0]){if(this._switchedValues())return this._switchHandles(),void this._onDragLeftHandle(a,b);this._values.max=b.value,this.cache.rightHandle.offset=b.offset,this._positionBar()}},_positionBar:function(){var a=this.cache.rightHandle.offset.left+this.cache.rightHandle.width-this.cache.leftHandle.offset.left;this.cache.width.inner=a,this.element.css("width",a).offset({left:this.cache.leftHandle.offset.left})},_onHandleStop:function(){this._setLeftRange(),this._setRightRange()},_switchedValues:function(){if(this.min()>this.max()){var a=this._values.min;return this._values.min=this._values.max,this._values.max=a,!0}return!1},_switchHandles:function(){var a=this.options.leftHandle;this.options.leftHandle=this.options.rightHandle,this.options.rightHandle=a,this._leftHandle("option","isLeft",!0),this._rightHandle("option","isLeft",!1),this._bindHandles(),this._cacheHandles()},_bindHandles:function(){this.options.leftHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragLeftHandle,this)),this.options.rightHandle.unbind(".bar").bind("sliderDrag.bar update.bar moving.bar",a.proxy(this._onDragRightHandle,this))},_constraintPosition:function(b){var c,d={};return d.left=a.ui.rangeSliderDraggable.prototype._constraintPosition.apply(this,[b]),d.left=this._leftHandle("position",d.left),c=this._rightHandle("position",d.left+this.cache.width.outer-this.cache.rightHandle.width),d.width=c-d.left+this.cache.rightHandle.width,d},_applyPosition:function(b){a.ui.rangeSliderDraggable.prototype._applyPosition.apply(this,[b.left]),this.element.width(b.width)},_mouseWheelZoom:function(b,c,d,e){if(!this.enabled)return!1;var f=this._values.min+(this._values.max-this._values.min)/2,g={},h={};return this.options.range===!1||this.options.range.min===!1?(g.max=f,h.min=f):(g.max=f-this.options.range.min/2,h.min=f+this.options.range.min/2),this.options.range!==!1&&this.options.range.max!==!1&&(g.min=f-this.options.range.max/2,h.max=f+this.options.range.max/2),this._leftHandle("option","range",g),this._rightHandle("option","range",h),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.zoomIn(e*this.options.wheelSpeed),!1},_mouseWheelScroll:function(b,c,d,e){return this.enabled?(this._wheelTimeout===!1?this.startScroll():clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(a.proxy(this._wheelStop,this),200),this.scrollLeft(e*this.options.wheelSpeed),!1):!1},_wheelStop:function(){this.stopScroll(),this._wheelTimeout=!1},min:function(a){return this._leftHandle("value",a)},max:function(a){return this._rightHandle("value",a)},startScroll:function(){this._deactivateRange()},stopScroll:function(){this._reactivateRange(),this._triggerMouseEvent("stop"),this._leftHandle().trigger("stop"),this._rightHandle().trigger("stop")},scrollLeft:function(a){return a=a||1,0>a?this.scrollRight(-a):(a=this._leftHandle("moveLeft",a),this._rightHandle("moveLeft",a),this.update(),void this._triggerMouseEvent("scroll"))},scrollRight:function(a){return a=a||1,0>a?this.scrollLeft(-a):(a=this._rightHandle("moveRight",a),this._leftHandle("moveRight",a),this.update(),void this._triggerMouseEvent("scroll"))},zoomIn:function(a){if(a=a||1,0>a)return this.zoomOut(-a);var b=this._rightHandle("moveLeft",a);a>b&&(b/=2,this._rightHandle("moveRight",b)),this._leftHandle("moveRight",b),this.update(),this._triggerMouseEvent("zoom")},zoomOut:function(a){if(a=a||1,0>a)return this.zoomIn(-a);var b=this._rightHandle("moveRight",a);a>b&&(b/=2,this._rightHandle("moveLeft",b)),this._leftHandle("moveLeft",b),this.update(),this._triggerMouseEvent("zoom")},values:function(a,b){if("undefined"!=typeof a&&"undefined"!=typeof b){var c=Math.min(a,b),d=Math.max(a,b);
+this._deactivateRange(),this.options.leftHandle.unbind(".bar"),this.options.rightHandle.unbind(".bar"),this._values.min=this._leftHandle("value",c),this._values.max=this._rightHandle("value",d),this._bindHandles(),this._reactivateRange(),this.update()}return{min:this._values.min,max:this._values.max}},update:function(){this._values.min=this.min(),this._values.max=this.max(),this._cache(),this._positionBar()}})}(jQuery),function(a,b){"use strict";function c(b,c,d,e){this.label1=b,this.label2=c,this.type=d,this.options=e,this.handle1=this.label1[this.type]("option","handle"),this.handle2=this.label2[this.type]("option","handle"),this.cache=null,this.left=b,this.right=c,this.moving=!1,this.initialized=!1,this.updating=!1,this.Init=function(){this.BindHandle(this.handle1),this.BindHandle(this.handle2),"show"===this.options.show?(setTimeout(a.proxy(this.PositionLabels,this),1),this.initialized=!0):setTimeout(a.proxy(this.AfterInit,this),1e3),this._resizeProxy=a.proxy(this.onWindowResize,this),a(window).resize(this._resizeProxy)},this.Destroy=function(){this._resizeProxy&&(a(window).unbind("resize",this._resizeProxy),this._resizeProxy=null,this.handle1.unbind(".positionner"),this.handle1=null,this.handle2.unbind(".positionner"),this.handle2=null,this.label1=null,this.label2=null,this.left=null,this.right=null),this.cache=null},this.AfterInit=function(){this.initialized=!0},this.Cache=function(){"none"!==this.label1.css("display")&&(this.cache={},this.cache.label1={},this.cache.label2={},this.cache.handle1={},this.cache.handle2={},this.cache.offsetParent={},this.CacheElement(this.label1,this.cache.label1),this.CacheElement(this.label2,this.cache.label2),this.CacheElement(this.handle1,this.cache.handle1),this.CacheElement(this.handle2,this.cache.handle2),this.CacheElement(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheIfNecessary=function(){null===this.cache?this.Cache():(this.CacheWidth(this.label1,this.cache.label1),this.CacheWidth(this.label2,this.cache.label2),this.CacheHeight(this.label1,this.cache.label1),this.CacheHeight(this.label2,this.cache.label2),this.CacheWidth(this.label1.offsetParent(),this.cache.offsetParent))},this.CacheElement=function(a,b){this.CacheWidth(a,b),this.CacheHeight(a,b),b.offset=a.offset(),b.margin={left:this.ParsePixels("marginLeft",a),right:this.ParsePixels("marginRight",a)},b.border={left:this.ParsePixels("borderLeftWidth",a),right:this.ParsePixels("borderRightWidth",a)}},this.CacheWidth=function(a,b){b.width=a.width(),b.outerWidth=a.outerWidth()},this.CacheHeight=function(a,b){b.outerHeightMargin=a.outerHeight(!0)},this.ParsePixels=function(a,b){return parseInt(b.css(a),10)||0},this.BindHandle=function(b){b.bind("updating.positionner",a.proxy(this.onHandleUpdating,this)),b.bind("update.positionner",a.proxy(this.onHandleUpdated,this)),b.bind("moving.positionner",a.proxy(this.onHandleMoving,this)),b.bind("stop.positionner",a.proxy(this.onHandleStop,this))},this.PositionLabels=function(){if(this.CacheIfNecessary(),null!==this.cache){var a=this.GetRawPosition(this.cache.label1,this.cache.handle1),b=this.GetRawPosition(this.cache.label2,this.cache.handle2);this.label1[d]("option","isLeft")?this.ConstraintPositions(a,b):this.ConstraintPositions(b,a),this.PositionLabel(this.label1,a.left,this.cache.label1),this.PositionLabel(this.label2,b.left,this.cache.label2)}},this.PositionLabel=function(a,b,c){var d,e,f,g=this.cache.offsetParent.offset.left+this.cache.offsetParent.border.left;g-b>=0?(a.css("right",""),a.offset({left:b})):(d=g+this.cache.offsetParent.width,e=b+c.margin.left+c.outerWidth+c.margin.right,f=d-e,a.css("left",""),a.css("right",f))},this.ConstraintPositions=function(a,b){(a.center<b.center&&a.outerRight>b.outerLeft||a.center>b.center&&b.outerRight>a.outerLeft)&&(a=this.getLeftPosition(a,b),b=this.getRightPosition(a,b))},this.getLeftPosition=function(a,b){var c=(b.center+a.center)/2,d=c-a.cache.outerWidth-a.cache.margin.right+a.cache.border.left;return a.left=d,a},this.getRightPosition=function(a,b){var c=(b.center+a.center)/2;return b.left=c+b.cache.margin.left+b.cache.border.left,b},this.ShowIfNecessary=function(){"show"===this.options.show||this.moving||!this.initialized||this.updating||(this.label1.stop(!0,!0).fadeIn(this.options.durationIn||0),this.label2.stop(!0,!0).fadeIn(this.options.durationIn||0),this.moving=!0)},this.HideIfNeeded=function(){this.moving===!0&&(this.label1.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.label2.stop(!0,!0).delay(this.options.delayOut||0).fadeOut(this.options.durationOut||0),this.moving=!1)},this.onHandleMoving=function(a,b){this.ShowIfNecessary(),this.CacheIfNecessary(),this.UpdateHandlePosition(b),this.PositionLabels()},this.onHandleUpdating=function(){this.updating=!0},this.onHandleUpdated=function(){this.updating=!1,this.cache=null},this.onHandleStop=function(){this.HideIfNeeded()},this.onWindowResize=function(){this.cache=null},this.UpdateHandlePosition=function(a){null!==this.cache&&(a.element[0]===this.handle1[0]?this.UpdatePosition(a,this.cache.handle1):this.UpdatePosition(a,this.cache.handle2))},this.UpdatePosition=function(a,b){b.offset=a.offset,b.value=a.value},this.GetRawPosition=function(a,b){var c=b.offset.left+b.outerWidth/2,d=c-a.outerWidth/2,e=d+a.outerWidth-a.border.left-a.border.right,f=d-a.margin.left-a.border.left,g=b.offset.top-a.outerHeightMargin;return{left:d,outerLeft:f,top:g,right:e,outerRight:f+a.outerWidth+a.margin.left+a.margin.right,cache:a,center:c}},this.Init()}a.widget("ui.rangeSliderLabel",a.ui.rangeSliderMouseTouch,{options:{handle:null,formatter:!1,handleType:"rangeSliderHandle",show:"show",durationIn:0,durationOut:500,delayOut:500,isLeft:!1},cache:null,_positionner:null,_valueContainer:null,_innerElement:null,_value:null,_create:function(){this.options.isLeft=this._handle("option","isLeft"),this.element.addClass("ui-rangeSlider-label").css("position","absolute").css("display","block"),this._createElements(),this._toggleClass(),this.options.handle.bind("moving.label",a.proxy(this._onMoving,this)).bind("update.label",a.proxy(this._onUpdate,this)).bind("switch.label",a.proxy(this._onSwitch,this)),"show"!==this.options.show&&this.element.hide(),this._mouseInit()},destroy:function(){this.options.handle.unbind(".label"),this.options.handle=null,this._valueContainer=null,this._innerElement=null,this.element.empty(),this._positionner&&(this._positionner.Destroy(),this._positionner=null),a.ui.rangeSliderMouseTouch.prototype.destroy.apply(this)},_createElements:function(){this._valueContainer=a("<div class='ui-rangeSlider-label-value' />").appendTo(this.element),this._innerElement=a("<div class='ui-rangeSlider-label-inner' />").appendTo(this.element)},_handle:function(){var a=Array.prototype.slice.apply(arguments);return this.options.handle[this.options.handleType].apply(this.options.handle,a)},_setOption:function(a,b){"show"===a?this._updateShowOption(b):("durationIn"===a||"durationOut"===a||"delayOut"===a)&&this._updateDurations(a,b),this._setFormatterOption(a,b)},_setFormatterOption:function(a,b){"formatter"===a&&("function"==typeof b||b===!1)&&(this.options.formatter=b,this._display(this._value))},_updateShowOption:function(a){this.options.show=a,"show"!==this.options.show?(this.element.hide(),this._positionner.moving=!1):(this.element.show(),this._display(this.options.handle[this.options.handleType]("value")),this._positionner.PositionLabels()),this._positionner.options.show=this.options.show},_updateDurations:function(a,b){parseInt(b,10)===b&&(this._positionner.options[a]=b,this.options[a]=b)},_display:function(a){this.options.formatter===!1?this._displayText(Math.round(a)):this._displayText(this.options.formatter(a)),this._value=a},_displayText:function(a){this._valueContainer.text(a)},_toggleClass:function(){this.element.toggleClass("ui-rangeSlider-leftLabel",this.options.isLeft).toggleClass("ui-rangeSlider-rightLabel",!this.options.isLeft)},_positionLabels:function(){this._positionner.PositionLabels()},_mouseDown:function(a){this.options.handle.trigger(a)},_mouseUp:function(a){this.options.handle.trigger(a)},_mouseMove:function(a){this.options.handle.trigger(a)},_onMoving:function(a,b){this._display(b.value)},_onUpdate:function(){"show"===this.options.show&&this.update()},_onSwitch:function(a,b){this.options.isLeft=b,this._toggleClass(),this._positionLabels()},pair:function(a){null===this._positionner&&(this._positionner=new c(this.element,a,this.widgetName,{show:this.options.show,durationIn:this.options.durationIn,durationOut:this.options.durationOut,delayOut:this.options.delayOut}),a[this.widgetName]("positionner",this._positionner))},positionner:function(a){return"undefined"!=typeof a&&(this._positionner=a),this._positionner},update:function(){this._positionner.cache=null,this._display(this._handle("value")),"show"===this.options.show&&this._positionLabels()}})}(jQuery);
\ No newline at end of file
diff --git a/web-map/Scripts/SiteScripts/AjaxQuery.js b/web-map/Scripts/SiteScripts/AjaxQuery.js
index efcad4f..c971e0d 100644
--- a/web-map/Scripts/SiteScripts/AjaxQuery.js
+++ b/web-map/Scripts/SiteScripts/AjaxQuery.js
@@ -81,18 +81,26 @@ function GetNames(subName, functionWhatNeedToDoWithInfo) {
 }
 
 //  Функция запроса дат
-function GetDate() {
-    MinYear = 1590;
-    CurrentMinYear = 2016;
-    CurrentMaxYear = MaxYear = new Date().getFullYear();
-    return;
+function GetDate(load = false) {
     $.ajax({
-        url: '/MapAPI/GetDate',
+        url: '/MapAPI/GetYears',
         type: 'GET',
         contentType: "application/json; charset=utf-8",
         dataType: 'json',
         cache: false,
         success: function (data) {
+            
+            MinYear = data.Item1;
+            CurrentMinYear = data.Item2;
+            CurrentMaxYear = MaxYear = new Date().getFullYear();
+
+            document.getElementById('slider-label-min').innerHTML = '<b>' + MinYear + '</b>';
+            document.getElementById('slider-label-max').innerHTML = '<b>' + MaxYear + '</b>';
+
+            if (load == true) {
+                SliderInit();
+                GetAllPoints(CurrentMinYear, CurrentMaxYear);
+            }
             //  Присвоить даты
         },
 
diff --git a/web-map/Scripts/SiteScripts/Events.js b/web-map/Scripts/SiteScripts/Events.js
index b2bedd1..957b959 100644
--- a/web-map/Scripts/SiteScripts/Events.js
+++ b/web-map/Scripts/SiteScripts/Events.js
@@ -1,18 +1,17 @@
 //  Функция обработчик движения слайдера
-function SliderOnFinishMoving(data) {    
-    CurrentMinYear = data.from;
-    CurrentMaxYear = data.to;
+function SliderOnFinishMoving(data) {   
+    CurrentMinYear = data.min;
+    CurrentMaxYear = data.max;
     console.log(CurrentMinYear + " " + CurrentMaxYear);
+    GetAllPoints(CurrentMinYear, CurrentMaxYear);
 }
 
 //  Заполнение массивов из исходного (response.data)
 //  В соответствии с параметрами поселения
 function FillDataArrays(fromData) {
     Collections.All = new Array();
-    Collections.Religion_1 = new Array();
-    Collections.Religion_2 = new Array();
-    Collections.Religion_3 = new Array();
-    Collections.Religion_4 = new Array();
+    Collections.SettlementTypes = new Array();
+    Collections.Regions = new Array();
     Collections.Zoom_8 = new Array();
     Collections.Zoom_9 = new Array();
     Collections.Zoom_10 = new Array();
@@ -27,23 +26,29 @@ function FillDataArrays(fromData) {
     Collections.Zoom_19 = new Array();
     Collections.Names = new Array();
 
-    fromData.forEach(function (element)
+    Collections.Names = fromData.arrayNameSettlements;
+    Collections.SettlementTypes = fromData.arrayNameTypes;
+    Collections.Regions = fromData.arrayNameRegions;
+
+    console.log(fromData.arraySettlements.length);
+
+    fromData.arraySettlements.forEach(function (element)
     {
-        Collections.Names.push(element.Name);   //  Массив всех имён поселений для автодополнения
         //Collections.All.push(element); //   В массив All идут все данные
         var pop = Number.parseInt(element.Population);  //  Получить числовое представления для сравнения с ключом константы
         //  Для каждой константы (пара ключ-значение, где 
-        //                                                ключ = минимальное количество населения для попадания в массив
-        //                                                значение = имя массива, в который нужно добавить поселение
+        //                                                ключ = имя массива, в который нужно добавить поселение
+        //                                                значение = минимальное количество населения для попадания в массив 
         //                        )
         //  Выполнить сравнение количества населения и, если удовлетворяет условию, внести поселение в массив
-        for (var key in ConstPopulation)
+        for (var key in fromData.ZoomLevel)
         {
-            var value = ConstPopulation[key];
-            if (pop > key)
-                Collections[value].push(element);
+            var value = fromData.ZoomLevel[key];
+            if (pop > value)
+                Collections[key].push(element);
         }          
     });
+
     AutoCompleteInit(Collections.Names);
 }
 
@@ -73,9 +78,6 @@ function SelectDataFromArrays(isNeedLoadCollection = false, isNeedPlaceCollectio
         default: ResultDataArray = new Array()/*Collections.All*/;
     }   
 
-
-
-
     if (isNeedLoadCollection)
         LoadCollection(ResultDataArray, isNeedPlaceCollection);
     return ResultDataArray;
@@ -90,22 +92,22 @@ function LoadCollection(fromData, bool = false)
     {
         CollectionVisible.add(CreateYandexPlacemark(element)); //  Добавление
     });
-
     if (bool)
         PlaceFromCollection();
 }
 
 //  Функция создания Яндекс-объекта из одного элемента JSON массива
 function CreateYandexPlacemark(fromElement) {
-    var placemark = new ymaps.Placemark([fromElement.Position.X, fromElement.Position.Y],
+    var coord = fromElement.Position.split(' ');
+    var placemark = new ymaps.Placemark([coord[0], coord[1]],
         {
-            iconContent: fromElement.Name,   //  Содержимое названия
-            hintContent: [fromElement.Position.X, fromElement.Position.Y]//  Содержимое подписи при наведении
+            iconContent: fromElement.Title,   //  Содержимое названия
+            hintContent: fromElement.Position//  Содержимое подписи при наведении
         }
     );
 
     //Добавить свойство - Имя поселения
-    placemark.options.set('Name', fromElement.Name);
+    placemark.options.set('Name', fromElement.Title);
     placemark.options.set('URL', fromElement.URL);
 
     //  Переопределяем стадартный обработчик нажатия
diff --git a/web-map/Scripts/SiteScripts/Init.js b/web-map/Scripts/SiteScripts/Init.js
index 96b1358..596ec21 100644
--- a/web-map/Scripts/SiteScripts/Init.js
+++ b/web-map/Scripts/SiteScripts/Init.js
@@ -5,9 +5,7 @@ function MapInit()
     console.log("MapInit");
     YandexMapInit();
     CollectionsInit();
-    GetDate();    
-    SliderInit();    
-    GetAllPoints(CurrentMinYear, CurrentMaxYear);
+    GetDate(true);    
 }
 
 var Collections;
@@ -21,21 +19,6 @@ var CurrentMinYear;
 var CurrentMaxYear;
 //var clusterer;
 
-var ConstPopulation = Object.freeze({
-    10000: "Zoom_8",
-    5000: "Zoom_9",
-    1000: "Zoom_10",
-    800: "Zoom_11",
-    600: "Zoom_12",
-    400: "Zoom_13",
-    200: "Zoom_14",
-    100: "Zoom_15",
-    60: "Zoom_16",
-    20: "Zoom_17",
-    10: "Zoom_18",
-    0: "Zoom_19"
-});
-
 //  Функция загрузки Яндекс карты
 function YandexMapInit()
 {
@@ -83,7 +66,7 @@ function YandexMapInit()
                 ]],
                 {},
                 {
-                    fillColor: '#ffffff',
+                    fillColor: '#c3c3c3',
                     strokeWidth: 0,
                     // Для того чтобы полигон отобразился на весь мир, нам нужно поменять
                     // алгоритм пересчета координат геометрии в пиксельные координаты.
@@ -102,6 +85,8 @@ function YandexMapInit()
             Map.geoObjects.add(background);
         });    
 
+    // центрирование карты
+    //myMap.setCenter(coord, 13);
 
     //Создание кластера
     //clusterer = new ymaps.Clusterer({
@@ -132,63 +117,68 @@ function YandexMapInit()
 
 //  Функция создания слайдера дат и обработчик поля ввода дат
 function SliderInit() {
-    // $j optional alias to jQuery noConflict()
-    var $j = jQuery.noConflict();
-    var $slider;
-
-    $j(document).ready(function () {
-        $slider = $("#slider").ionRangeSlider({
-            skin: "modern",
-            hide_min_max: true,
-            type: "double",
-            grid: true,
-            drag_interval: true,
-            min: MinYear,
-            max: MaxYear,
-            from: CurrentMinYear,
-            to: new Date().getFullYear(),
-            onFinish: function (data) {
-                console.log("finish");
-                // Вызывается, когда пользователь перетсал двигать ползунок слайдера
-                SliderOnFinishMoving(data);
-            },
-            onUpdate: function (data) {
-                console.log("update");
-                // Вызывается, когда значение слайдера изменилось с помощью некоторой функции (см. обработчик inputField)
-                SliderOnFinishMoving(data);
-            }
-        });
+    var slider = $("#slider").rangeSlider({
+        bounds: { min: MinYear, max: MaxYear },
+        defaultValues: { min: CurrentMinYear, max: CurrentMaxYear },
+        arrows: true,
+        symmetricPositionning: true,
+        step: 1
     });
-    //  Поле ввода даты. Обработчик изменения дат слайдера
-    var inputFieldYear = document.getElementById('inputYear');
-    inputFieldYear.oninput = function () {
-        if (inputFieldYear.value <= MaxYear && inputFieldYear.value >= MinYear) {
-            var slider_instance = $slider.data("ionRangeSlider");
-            slider_instance.update({
-                from: inputFieldYear.value,
-                to: inputFieldYear.value
-            });
+    //"valuesChanged" для ручного и машинного изменения
+    //"userValuesChanged" для ручного изменения
+    $("#slider").bind("valuesChanged", function (e, data) {
+        SliderOnFinishMoving(data.values);
+    });   
+
+    //  Поле ввода меньшей даты. Обработчик изменения дат слайдера
+    var inputFieldMinYear = document.getElementById('inputMinYear');
+    inputFieldMinYear.oninput = function () {
+        if (inputFieldMinYear.value <= MaxYear && inputFieldMinYear.value >= MinYear) {
+            $("#slider").rangeSlider("values", inputFieldMinYear.value - 0, $("#slider").rangeSlider("values").max);
+        }
+    };
+
+    //  Поле ввода большей даты. Обработчик изменения дат слайдера
+    var inputFieldMaxYear = document.getElementById('inputMaxYear');
+    inputFieldMaxYear.oninput = function () {
+        if (inputFieldMaxYear.value <= MaxYear && inputFieldMaxYear.value >= MinYear) {
+            $("#slider").rangeSlider("values", $("#slider").rangeSlider("values").min, inputFieldMaxYear.value - 0);
         }
     };
+
     //  Обработчик кнопки поиска по имени
     $('#buttonSearch').bind('click', function () {
-        //alert($(this).text());
         var resultName = document.getElementById('inputName').value;
         if (resultName.length != 0)
             OnFindNameUsing(resultName);
     });
+
+    //  Обработчик кнопки скорытия боковой панели
+    $('#sidebar-close').bind('click', function () {
+        $('#sidebar, #content').addClass('active');
+        $('.collapse.in').toggleClass('in');
+        $('a[aria-expanded=true]').attr('aria-expanded', 'false');
+    });
 }
 
 function AutoCompleteInit(data) {
     $('input#inputName').autocomplete({
         source: function (request, response) {
-            var results = $.ui.autocomplete.filter(data, request.term);
-            var value = document.getElementById('NameCount').value;
-            if (isNaN(value) || value <= 0)
-                value = 10;
+            var term = request.term;
+            var pattern = new RegExp("^" + term, "i");
 
-            response(results.slice(0, value));
+            var results = $.map(data, function (elem) {
+                if (pattern.test(elem)) {
+                    return elem;
+                }
+            })
+            response(results.slice(0, 10));
         },
+        //source: function (request, response) {
+        //    var results = $.ui.autocomplete.filter(data, request.term);
+
+        //    response(results.slice(0, 10));
+        //},
         minLength: 2,
         delay: 300,
         select: function(event, ui) {
@@ -204,10 +194,8 @@ function CollectionsInit() {
 
     Collections = new Object();
     Collections.All = new Array();
-    Collections.Religion_1 = new Array();
-    Collections.Religion_2 = new Array();
-    Collections.Religion_3 = new Array();
-    Collections.Religion_4 = new Array();
+    Collections.SettlementTypes = new Array();
+    Collections.Regions = new Array();
     Collections.Zoom_8 = new Array();
     Collections.Zoom_9 = new Array();
     Collections.Zoom_10 = new Array();
diff --git a/web-map/Scripts/SiteScripts/Output.js b/web-map/Scripts/SiteScripts/Output.js
index 51dec7d..f2b9377 100644
--- a/web-map/Scripts/SiteScripts/Output.js
+++ b/web-map/Scripts/SiteScripts/Output.js
@@ -1,18 +1,52 @@
 //  Функция выводит данные о поселении в боковую панель из JSON объекта
-function PrintInfoAboutSettlement(info) {
-    var header = "<h3>" + info.Name + "</h3>"
-    document.getElementById('sidebar-header').innerHTML = header;
-    //Name Region Type Population PopulationOfMan PopulationOfWoman Year Description
-    var text = '';
-    text += '<p>' + 'Тип: ' + info.Type + '</p><br/>';
-    text += '<p>' + 'Время основания: ' + info.Year + '</p><br/>';
-    text += '<p>' + 'Входит в состав: ' + info.Region + '</p><br/>';
-    text += '<p>' + 'Количество населения: ' + info.Population + '</p>';
-    text += '<p>' + 'Мужское население: ' + info.PopulationOfMan + '</p>';
-    text += '<p>' + 'Женское население: ' + info.PopulationOfWoman + '</p><br/>';
-    text += '<p>' + 'Описание: ' + info.Description + '</p><br/>';
-    text += '<p>' + 'Ссылка: ' + '<a href="' + info.Source + '">' + '[0]' + '</a>' + '</p><br/>';
-    
+function PrintInfoAboutSettlement(info)
+{
+    // ВНИМАНИЕ! я никудышный верстальщик, поэтому делаю как умею. никогда этому не учился, и никто меня не учил
+
+    document.getElementById('settlement-title').innerHTML = info.Title;
+
+    //jumbotron
+
+    var text = '<div class="sidebar-text-element">';
+    text += '<p>' + 'Координаты: ' + info.Coordinate.Lat + ' ' + info.Coordinate.Long + '</p>';
+    if (info.Founder != null)
+        text += '<p>' + 'Основатель: ' + info.Founder + '</p>';
+
+    if (info.Legend != null)
+    {
+        //text += '<p>' + 'Легенда:</p>';
+        text += '<div class="hideLine"><label for="hideLine1">Легенда: [показать]</label><input type="checkbox" id="hideLine1"/>';
+        text += '<p class="content">' + info.Legend + '</p></div>';
+    }
+    if (info.hasBeginning != null)
+        text += '<p>' + 'Время основания: ' + info.hasBeginning + '</p>';
+
+    text += '</div>';
+    if (info.EditedSettlements != null)
+        info.EditedSettlements.forEach(function (element) {
+            text += '<div class="sidebar-text-element">';
+
+            if (element.PopulationAll != null)
+                text += '<p>' + 'Количество населения: ' + element.PopulationAll + '</p>';
+            if (element.PopulationFemales != null)
+                text += '<p>' + 'Количество мужского населения: ' + element.PopulationFemales + '</p>';
+            if (element.PopulationMales != null)
+                text += '<p>' + 'Количество женского населения: ' + element.PopulationMales + '</p>';
+            if (element.Region != null)
+                text += '<p>' + 'Регион: ' + element.Region.Title + '</p>';
+            if (element.Type != null)
+                text += '<p>' + 'Тип поселения: ' + element.Type.Title + '</p>';
+            if (element.Title != null)
+                text += '<p>' + 'Название поселения: ' + element.Title + '</p>';
+
+            text += '<p>' + 'Год: ' + element.hasBeginning.Year + '</p>';
+            if (element.Source.includes("www") || element.Source.includes("http"))
+                text += '<p>Источник: <a href="' + element.Source + '">ссылка</a></p>';
+            else 
+                text += '<p>Источник: ' + element.Source + '</p>';
+
+            text += '</div>';
+        });    
 
     document.getElementById('sidebar-text').innerHTML = text;
 }
diff --git a/web-map/Views/Map/Map.cshtml b/web-map/Views/Map/Map.cshtml
index df3a0d6..2ac0702 100644
--- a/web-map/Views/Map/Map.cshtml
+++ b/web-map/Views/Map/Map.cshtml
@@ -2,66 +2,49 @@
     ViewBag.Title = "Map";
 }
 
-<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&amp;apikey=0ea4f7d6-01f0-471d-b717-ada9d94faa49&lang=ru_RU" type="text/javascript"></script>
-
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.0/css/ion.rangeSlider.min.css" />
-
-<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
-<script src="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.3.0/js/ion.rangeSlider.min.js"></script>
-<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.12.1/jquery-ui.js"></script>
-
-
-@section Scripts {@Scripts.Render("~/Scripts/SiteScripts/AjaxQuery.js",
-"~/Scripts/SiteScripts/Events.js",
-"~/Scripts/SiteScripts/Output.js",
-"~/Scripts/SiteScripts/Init.js")}
-
-
-<div class="row" style="margin-top: 20px">
-    <div class="col-xs-1">
-        <input id="NameCount" type="text" class="form-control" value="10">
-    </div>
-
-    <div class="col-xs-11">
-        <div class="input-group">
-            <span class="input-group-btn">
-                <button id="buttonSearch" class="btn btn-secondary" type="button">Найти</button>
-            </span>
-            <input id="inputName" type="text" class="form-control" placeholder="Введите название">
+<div class="wrapper">
+    <!-- боковая панель -->
+    <nav id="sidebar" class="active rounded-right">
+        <div id="sidebar-header" class="sidebar-header display-3 rounded-right">
+            <h2 id="settlement-title" class="text-center"></h2>
+            <div class="d-flex justify-content-center  btn-group w-100" role="group">
+                <button id="sidebar-close" class="btn btn-secondary" type="button">Скрыть<br>панель</button>
+                <button id="add-to-export-group" class="btn btn-secondary" type="button">Добавить<br>в экспорт</button>
+            </div>
         </div>
-    </div>
+        <div id="sidebar-text" class="sidebar-text">
+        </div>
+    </nav>
+</div>
 
-    @*<div class="col-xs-10">
-            <div class="input-group">
-                <span class="input-group-addon" id="basic-addon1"><i class="glyphicon glyphicon-search"></i></span>
-                <input id="inputName" type="text" class="form-control" placeholder="Введите название">
-            </div>
-        </div>*@
+<div class="input-group mt-3 mb-2">
+    <span class="input-group-btn">
+        <button id="buttonSearch" class="btn btn-secondary" type="button">Найти</button>
+    </span>
+    <input id="inputName" type="text" class="form-control" placeholder="Введите название">
 </div>
-<div class="row" style="margin-top: 20px; margin-bottom: 10px">
-    <div class="col-xs-8 col-sm-8" style="line-height: 43px;">
-        <div class="row" style="position:relative;">
-            <span style="position: absolute;top:-15px;left:50%;margin-left:-20px;">Год:</span>
-            <div class="col-xs-1" style="margin-top: 18px"><b>1590</b></div>
-            <div class="col-xs-10">
-                <input type="text" id="slider" class="js-range-slider" value="" />
 
-            </div>
-            <div class="col-xs-1" style="margin-top: 18px"><b>2018</b></div>
-        </div>
+<div id="slider"></div>
+
+<div class="input-group w-100 mb-3 mt-1">
+    <div class="input-group-prepend">
+        <span id="slider-label-min" class="input-group-text tooltip-test" title="мин год">1590</span>
     </div>
-    <div class="col-xs-4 col-sm-4">
-        <div class="row">
-            <div class="col-xs-12">
-                <div class="input-group">
-                    <span class="input-group-addon">Год: </span>
-                    <input id="inputYear" type="text" class="form-control" placeholder="Введите год">
-                </div>
-            </div>
-        </div>
+    <input id="inputMinYear" type="text" class="form-control tooltip-test" placeholder="Нижняя граница поиска (год)" title="Выбор определенного года на временной линии">
+    <input id="inputMaxYear" type="text" class="form-control tooltip-test" placeholder="Верхняя граница поиска (год)" title="Выбор определенного года на временной линии">
+    <div class="input-group-append">
+        <span id="slider-label-max" class="input-group-text tooltip-test" title="макс год">2019</span>
     </div>
 </div>
 
 <div id="map" style="width: 100%; height: 1000px; padding-left: 0px; "></div>
 
+<script src="https://api-maps.yandex.ru/2.1/?lang=ru_RU&amp;apikey=0ea4f7d6-01f0-471d-b717-ada9d94faa49&lang=ru_RU" type="text/javascript"></script>
+@section Scripts {@Scripts.Render("~/Scripts/SiteScripts/AjaxQuery.js",
+"~/Scripts/SiteScripts/Events.js",
+"~/Scripts/SiteScripts/Output.js",
+"~/Scripts/SiteScripts/Init.js")}
 
+<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" />
+<link rel="stylesheet" href="http://bootstraptema.ru/plugins/2018/irs/ion.rangeSlider.css" />
+<link rel="stylesheet" href="http://bootstraptema.ru/plugins/2018/irs/ion.rangeSlider.skin.css" />
\ No newline at end of file
diff --git a/web-map/Views/Shared/_Layout.cshtml b/web-map/Views/Shared/_Layout.cshtml
index 27b480b..574b37d 100644
--- a/web-map/Views/Shared/_Layout.cshtml
+++ b/web-map/Views/Shared/_Layout.cshtml
@@ -9,34 +9,20 @@
     
 </head>
 <body>
-    <div class="navbar navbar-inverse navbar-fixed-top">
+    <nav class="navbar navbar-expand-sm navbar-dark fixed-top bg-dark">
         <div class="container">
-            <div class="navbar-header">
-                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
-                    <span class="icon-bar"></span>
-                    <span class="icon-bar"></span>
-                    <span class="icon-bar"></span>
-                </button>
-                @Html.ActionLink("Главная", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
-            </div>
-            <div class="navbar-collapse collapse">
-                <ul class="nav navbar-nav">
-                    <li>@Html.ActionLink("О проекте", "Index", "Home")</li>
-                    <li>@Html.ActionLink("Карта", "Map", "Map")</li>
-                    <li>@Html.ActionLink("Инструкция", "FAQ", "Home")</li>
+            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
+                <span class="navbar-toggler-icon"></span>
+            </button>
+            <div class="navbar-collapse collapse" id="navbarSupportedContent">
+                <ul class="nav navbar-nav mr-auto">
+                    <li class="nav-item">@Html.ActionLink("О проекте", "Index", "Home", null, new { @class = "nav-link" })</li>
+                    <li class="nav-item">@Html.ActionLink("Карта", "Map", "Map", null, new { @class = "nav-link" })</li>
+                    <li class="nav-item">@Html.ActionLink("Инструкция", "FAQ", "Home", null, new { @class = "nav-link" })</li>
                 </ul>
             </div>
         </div>
-    </div>
-    <div class="wrapper">
-        <!-- Sidebar Holder -->
-        <nav id="sidebar" class="active">
-            <div id="sidebar-header" class="sidebar-header">
-            </div>
-            <div id="sidebar-text">
-            </div>
-        </nav>
-    </div>
+    </nav>
     <div class="container body-content">
         @RenderBody()
         <hr />
@@ -47,7 +33,7 @@
 
     @Scripts.Render("~/bundles/jquery")
     @Scripts.Render("~/bundles/bootstrap")
-    
+
     @RenderSection("scripts", required: false)
 </body>
 </html>
diff --git a/web-map/Web.config b/web-map/Web.config
index b206598..0d45d2a 100644
--- a/web-map/Web.config
+++ b/web-map/Web.config
@@ -77,7 +77,7 @@
       </dependentAssembly>
       <dependentAssembly>
         <assemblyIdentity name="HtmlAgilityPack" publicKeyToken="bd319b19eaf3b43a" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-1.11.0.0" newVersion="1.11.0.0" />
+        <bindingRedirect oldVersion="0.0.0.0-1.11.3.0" newVersion="1.11.3.0" />
       </dependentAssembly>
     </assemblyBinding>
   </runtime>
diff --git a/web-map/web-map.csproj b/web-map/web-map.csproj
index e829efe..c2f92bd 100644
--- a/web-map/web-map.csproj
+++ b/web-map/web-map.csproj
@@ -51,8 +51,8 @@
     <Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
       <HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
     </Reference>
-    <Reference Include="HtmlAgilityPack, Version=1.11.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
-      <HintPath>..\packages\HtmlAgilityPack.1.11.0\lib\Net45\HtmlAgilityPack.dll</HintPath>
+    <Reference Include="HtmlAgilityPack, Version=1.11.3.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
+      <HintPath>..\packages\HtmlAgilityPack.1.11.3\lib\Net45\HtmlAgilityPack.dll</HintPath>
     </Reference>
     <Reference Include="Microsoft.AI.Agent.Intercept, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
       <HintPath>..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.4.0\lib\net45\Microsoft.AI.Agent.Intercept.dll</HintPath>
@@ -86,7 +86,7 @@
       <HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
     </Reference>
     <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
-      <HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+      <HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
     </Reference>
     <Reference Include="System" />
     <Reference Include="System.Data" />
@@ -177,12 +177,14 @@
     <Content Include="Content\bootstrap-reboot.min.css" />
     <Content Include="Content\bootstrap.css" />
     <Content Include="Content\bootstrap.min.css" />
+    <Content Include="Content\jQRangeSlider-iThing.css" />
     <Content Include="Content\jquery-ui\jquery-ui.css" />
     <Content Include="Content\jquery-ui\jquery-ui.min.css" />
     <Content Include="Content\jquery-ui\jquery-ui.structure.css" />
     <Content Include="Content\jquery-ui\jquery-ui.structure.min.css" />
     <Content Include="Content\jquery-ui\jquery-ui.theme.css" />
     <Content Include="Content\jquery-ui\jquery-ui.theme.min.css" />
+    <Content Include="Content\bootstrap-slider.min.css" />
     <Content Include="favicon.ico" />
     <Content Include="Global.asax" />
     <Content Include="Content\Site.css" />
@@ -197,6 +199,7 @@
     <Content Include="Content\bootstrap-grid.css.map" />
     <None Include="packages.config" />
     <None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
+    <Content Include="Scripts\bootstrap-slider.min.js" />
     <Content Include="Scripts\bootstrap.bundle.js" />
     <Content Include="Scripts\bootstrap.bundle.min.js" />
     <Content Include="Scripts\bootstrap.js" />
@@ -214,6 +217,7 @@
     <Content Include="Scripts\esm\popper-utils.min.js.map" />
     <Content Include="Scripts\esm\popper-utils.js.map" />
     <None Include="Scripts\jquery-3.3.1.intellisense.js" />
+    <Content Include="Scripts\jQRangeSlider-min.js" />
     <Content Include="Scripts\jquery-3.3.1.js" />
     <Content Include="Scripts\jquery-3.3.1.min.js" />
     <Content Include="Scripts\jquery-3.3.1.slim.js" />