<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="./jquery.easy-autocomplete.min.js"></script>
<link rel="stylesheet" href="./easy-autocomplete.min.css">

</head>
<body>
<div class="wrapper">
    <section class="page-section-pb">
      <div class="container">
        <div class="row">
          <div class="col-12">
            <div class="listing-search">
              <form method=post id="home_search_form" action="/search/results">
              <div class="row">

                <div class="col-md-5 sm-mb-12">
                  <label>Country</label>
                  <div class="easy-autocomplete eac-square">
                    <input name="product" id="product" class="form-control" placeholder="Type something..." />
                    <script>
                    
                    // Original 
                    // var options = {
                    //   	url: "./country.json",
                    //   	getValue: "label",
                    //   	list: {
                    //   		match: {
                    //   			enabled: true
                    //   		}
                    //   	}
                    //   };
                    //   $("#product").easyAutocomplete(options);


                      var options = {
                        url: "./country.json",
                        getValue: "label",
                        list: {
                          onLoadEvent: function () {
                                if ($("#AutoComplete").val() !== '') {
                                    var elementCount = $("#AutoComplete").getElementCount();
                                      if (elementCount <= 0) {
                                        $('#no-results').show();
                                      }
                                      else {
                                        $('#no-results').hide();
                                      }
                                    }
                                  }
                                },
                                theme: "square"
                              };
                              $("#product").easyAutocomplete(options);
                    </script>
                  </div>
                </div>
              </div>
            </form>
            </div>
          </div>
        </div>
      </div>
    </section>



</div>

</body>
</html>
// Code goes here

/* Styles go here */

[{"value":"4","label":"Afghanistan"},{"value":"8","label":"Albania"},{"value":"24","label":"Angola"},{"value":"28","label":"Antigua and Barbuda"},{"value":"32","label":"Argentina"},{"value":"51","label":"Armenia"},{"value":"36","label":"Australia"},{"value":"40","label":"Austria"},{"value":"48","label":"Bahrain, Kingdom of"},{"value":"50","label":"Bangladesh"},{"value":"52","label":"Barbados"},{"value":"56","label":"Belgium"},{"value":"58","label":"Belgium-Luxembourg"},{"value":"84","label":"Belize"},{"value":"204","label":"Benin"},{"value":"68","label":"Bolivia, Plurinational State of"},{"value":"72","label":"Botswana"},{"value":"76","label":"Brazil"},{"value":"96","label":"Brunei Darussalam"},{"value":"100","label":"Bulgaria"},{"value":"854","label":"Burkina Faso"},{"value":"108","label":"Burundi"},{"value":"132","label":"Cabo Verde"},{"value":"116","label":"Cambodia"},{"value":"120","label":"Cameroon"},{"value":"124","label":"Canada"},{"value":"140","label":"Central African Republic"},{"value":"148","label":"Chad"},{"value":"152","label":"Chile"},{"value":"156","label":"China"},{"value":"158","label":"Chinese Taipei"},{"value":"170","label":"Colombia"},{"value":"178","label":"Congo"},{"value":"188","label":"Costa Rica"},{"value":"191","label":"Croatia"},{"value":"192","label":"Cuba"},{"value":"196","label":"Cyprus"},{"value":"203","label":"Czech Republic"},{"value":"384","label":"C\u00f4te d'Ivoire"},{"value":"180","label":"Democratic Republic of the Congo"},{"value":"208","label":"Denmark"},{"value":"262","label":"Djibouti"},{"value":"212","label":"Dominica"},{"value":"214","label":"Dominican Republic"},{"value":"229","label":"EU Intra-trade Adjustment"},{"value":"218","label":"Ecuador"},{"value":"818","label":"Egypt"},{"value":"222","label":"El Salvador"},{"value":"233","label":"Estonia"},{"value":"748","label":"Eswatini"},{"value":"918","label":"European Union"},{"value":"899","label":"European Union (partner code)"},{"value":"228","label":"European Union, n.e.s."},{"value":"242","label":"Fiji"},{"value":"246","label":"Finland"},{"value":"250","label":"France"},{"value":"266","label":"Gabon"},{"value":"268","label":"Georgia"},{"value":"276","label":"Germany"},{"value":"288","label":"Ghana"},{"value":"300","label":"Greece"},{"value":"308","label":"Grenada"},{"value":"320","label":"Guatemala"},{"value":"324","label":"Guinea"},{"value":"624","label":"Guinea-Bissau"},{"value":"328","label":"Guyana"},{"value":"332","label":"Haiti"},{"value":"340","label":"Honduras"},{"value":"344","label":"Hong Kong, China"},{"value":"348","label":"Hungary"},{"value":"352","label":"Iceland"},{"value":"356","label":"India"},{"value":"360","label":"Indonesia"},{"value":"372","label":"Ireland"},{"value":"376","label":"Israel"},{"value":"380","label":"Italy"},{"value":"388","label":"Jamaica"},{"value":"392","label":"Japan"},{"value":"400","label":"Jordan"},{"value":"398","label":"Kazakhstan"},{"value":"404","label":"Kenya"},{"value":"410","label":"Korea, Republic of"},{"value":"414","label":"Kuwait, the State of"},{"value":"417","label":"Kyrgyz Republic"},{"value":"418","label":"Lao People's Democratic Republic"},{"value":"428","label":"Latvia"},{"value":"426","label":"Lesotho"},{"value":"430","label":"Liberia"},{"value":"438","label":"Liechtenstein"},{"value":"440","label":"Lithuania"},{"value":"442","label":"Luxembourg"},{"value":"446","label":"Macao, China"},{"value":"450","label":"Madagascar"},{"value":"454","label":"Malawi"},{"value":"458","label":"Malaysia"},{"value":"462","label":"Maldives"},{"value":"466","label":"Mali"},{"value":"470","label":"Malta"},{"value":"478","label":"Mauritania"},{"value":"480","label":"Mauritius"},{"value":"484","label":"Mexico"},{"value":"498","label":"Moldova, Republic of"},{"value":"496","label":"Mongolia"},{"value":"893","label":"Montenegro"},{"value":"504","label":"Morocco"},{"value":"508","label":"Mozambique"},{"value":"104","label":"Myanmar"},{"value":"516","label":"Namibia"},{"value":"524","label":"Nepal"},{"value":"528","label":"Netherlands"},{"value":"554","label":"New Zealand"},{"value":"558","label":"Nicaragua"},{"value":"562","label":"Niger"},{"value":"566","label":"Nigeria"},{"value":"578","label":"Norway"},{"value":"512","label":"Oman"},{"value":"586","label":"Pakistan"},{"value":"591","label":"Panama"},{"value":"598","label":"Papua New Guinea"},{"value":"600","label":"Paraguay"},{"value":"604","label":"Peru"},{"value":"608","label":"Philippines"},{"value":"616","label":"Poland"},{"value":"620","label":"Portugal"},{"value":"634","label":"Qatar"},{"value":"642","label":"Romania"},{"value":"643","label":"Russian Federation"},{"value":"646","label":"Rwanda"},{"value":"659","label":"Saint Kitts and Nevis"},{"value":"662","label":"Saint Lucia"},{"value":"670","label":"Saint Vincent and the Grenadines"},{"value":"882","label":"Samoa"},{"value":"682","label":"Saudi Arabia, Kingdom of"},{"value":"686","label":"Senegal"},{"value":"690","label":"Seychelles"},{"value":"694","label":"Sierra Leone"},{"value":"702","label":"Singapore"},{"value":"703","label":"Slovak Republic"},{"value":"705","label":"Slovenia"},{"value":"90","label":"Solomon Islands"},{"value":"710","label":"South Africa"},{"value":"724","label":"Spain"},{"value":"144","label":"Sri Lanka"},{"value":"740","label":"Suriname"},{"value":"752","label":"Sweden"},{"value":"756","label":"Switzerland"},{"value":"762","label":"Tajikistan"},{"value":"834","label":"Tanzania"},{"value":"764","label":"Thailand"},{"value":"270","label":"The Gambia"},{"value":"807","label":"The former Yugoslav Republic of Macedonia"},{"value":"768","label":"Togo"},{"value":"776","label":"Tonga"},{"value":"780","label":"Trinidad and Tobago"},{"value":"788","label":"Tunisia"},{"value":"792","label":"Turkey"},{"value":"800","label":"Uganda"},{"value":"804","label":"Ukraine"},{"value":"784","label":"United Arab Emirates"},{"value":"826","label":"United Kingdom"},{"value":"840","label":"United States of America"},{"value":"858","label":"Uruguay"},{"value":"548","label":"Vanuatu"},{"value":"862","label":"Venezuela, Bolivarian Republic of"},{"value":"704","label":"Viet Nam"},{"value":"887","label":"Yemen"},{"value":"894","label":"Zambia"},{"value":"716","label":"Zimbabwe"}]
/*
 * easy-autocomplete
 * jQuery plugin for autocompletion
 * 
 * @author Łukasz Pawełczak (http://github.com/pawelczak)
 * @version 1.3.5
 * Copyright  License: 
 */


var EasyAutocomplete = function(a) {
    return a.Configuration = function(a) {
      function b() {
        if ("xml" === a.dataType && (a.getValue || (a.getValue = function(a) {
            return $(a).text()
          }), a.list || (a.list = {}), a.list.sort || (a.list.sort = {}), a.list.sort.method = function(b, c) {
            return b = a.getValue(b), c = a.getValue(c), c > b ? -1 : b > c ? 1 : 0
          }, a.list.match || (a.list.match = {}), a.list.match.method = function(a, b) {
            return a.search(b) > -1
          }), void 0 !== a.categories && a.categories instanceof Array) {
          for (var b = [], c = 0, d = a.categories.length; d > c; c += 1) {
            var e = a.categories[c];
            for (var f in h.categories[0]) void 0 === e[f] && (e[f] = h.categories[0][f]);
            b.push(e)
          }
          a.categories = b
        }
      }

      function c() {
        function b(a, c) {
          var d = a || {};
          for (var e in a) void 0 !== c[e] && null !== c[e] && ("object" != typeof c[e] || c[e] instanceof Array ? d[e] = c[e] : b(a[e], c[e]));
          return void 0 !== c.data && null !== c.data && "object" == typeof c.data && (d.data = c.data), d
        }
        h = b(h, a)
      }

      function d() {
        if ("list-required" !== h.url && "function" != typeof h.url) {
          var b = h.url;
          h.url = function() {
            return b
          }
        }
        if (void 0 !== h.ajaxSettings.url && "function" != typeof h.ajaxSettings.url) {
          var b = h.ajaxSettings.url;
          h.ajaxSettings.url = function() {
            return b
          }
        }
        if ("string" == typeof h.listLocation) {
          var c = h.listLocation;
          "XML" === h.dataType.toUpperCase() ? h.listLocation = function(a) {
            return $(a).find(c)
          } : h.listLocation = function(a) {
            return a[c]
          }
        }
        if ("string" == typeof h.getValue) {
          var d = h.getValue;
          h.getValue = function(a) {
            return a[d]
          }
        }
        void 0 !== a.categories && (h.categoriesAssigned = !0)
      }

      function e() {
        void 0 !== a.ajaxSettings && "object" == typeof a.ajaxSettings ? h.ajaxSettings = a.ajaxSettings : h.ajaxSettings = {}
      }

      function f(a) {
        return void 0 !== h[a] && null !== h[a]
      }

      function g(a, b) {
        function c(b, d) {
          for (var e in d) void 0 === b[e] && a.log("Property '" + e + "' does not exist in EasyAutocomplete options API."), "object" == typeof b[e] && -1 === $.inArray(e, i) && c(b[e], d[e])
        }
        c(h, b)
      }
      var h = {
          data: "list-required",
          url: "list-required",
          dataType: "json",
          listLocation: function(a) {
            return a
          },
          xmlElementName: "",
          getValue: function(a) {
            return a
          },
          autocompleteOff: !0,
          placeholder: !1,
          ajaxCallback: function() {},
          matchResponseProperty: !1,
          list: {
            sort: {
              enabled: !1,
              method: function(a, b) {
                return a = h.getValue(a), b = h.getValue(b), b > a ? -1 : a > b ? 1 : 0
              }
            },
            maxNumberOfElements: 6,
            hideOnEmptyPhrase: !0,
            match: {
              enabled: !1,
              caseSensitive: !1,
              method: function(a, b) {
                return a.search(b) > -1
              }
            },
            showAnimation: {
              type: "normal",
              time: 400,
              callback: function() {}
            },
            hideAnimation: {
              type: "normal",
              time: 400,
              callback: function() {}
            },
            onClickEvent: function() {},
            onSelectItemEvent: function() {},
            onLoadEvent: function() {},
            onChooseEvent: function() {},
            onKeyEnterEvent: function() {},
            onMouseOverEvent: function() {},
            onMouseOutEvent: function() {},
            onShowListEvent: function() {},
            onHideListEvent: function() {}
          },
          highlightPhrase: !0,
          theme: "",
          cssClasses: "",
          minCharNumber: 0,
          requestDelay: 0,
          adjustWidth: !0,
          ajaxSettings: {},
          preparePostData: function(a, b) {
            return a
          },
          loggerEnabled: !0,
          template: "",
          categoriesAssigned: !1,
          categories: [{
            maxNumberOfElements: 4
          }]
        },
        i = ["ajaxSettings", "template"];
      this.get = function(a) {
        return h[a]
      }, this.equals = function(a, b) {
        return !(!f(a) || h[a] !== b)
      }, this.checkDataUrlProperties = function() {
        return "list-required" !== h.url || "list-required" !== h.data
      }, this.checkRequiredProperties = function() {
        for (var a in h)
          if ("required" === h[a]) return logger.error("Option " + a + " must be defined"), !1;
        return !0
      }, this.printPropertiesThatDoesntExist = function(a, b) {
        g(a, b)
      }, b(), c(), h.loggerEnabled === !0 && g(console, a), e(), d()
    }, a
  }(EasyAutocomplete || {}),
  EasyAutocomplete = function(a) {
    return a.Logger = function() {
      this.error = function(a) {
        console.log("ERROR: " + a)
      }, this.warning = function(a) {
        console.log("WARNING: " + a)
      }
    }, a
  }(EasyAutocomplete || {}),
  EasyAutocomplete = function(a) {
    return a.Constans = function() {
      var a = {
        CONTAINER_CLASS: "easy-autocomplete-container",
        CONTAINER_ID: "eac-container-",
        WRAPPER_CSS_CLASS: "easy-autocomplete"
      };
      this.getValue = function(b) {
        return a[b]
      }
    }, a
  }(EasyAutocomplete || {}),
  EasyAutocomplete = function(a) {
    return a.ListBuilderService = function(a, b) {
      function c(b, c) {
        function d() {
          var d, e = {};
          return void 0 !== b.xmlElementName && (e.xmlElementName = b.xmlElementName), void 0 !== b.listLocation ? d = b.listLocation : void 0 !== a.get("listLocation") && (d = a.get("listLocation")), void 0 !== d ? "string" == typeof d ? e.data = $(c).find(d) : "function" == typeof d && (e.data = d(c)) : e.data = c, e
        }

        function e() {
          var a = {};
          return void 0 !== b.listLocation ? "string" == typeof b.listLocation ? a.data = c[b.listLocation] : "function" == typeof b.listLocation && (a.data = b.listLocation(c)) : a.data = c, a
        }
        var f = {};
        if (f = "XML" === a.get("dataType").toUpperCase() ? d() : e(), void 0 !== b.header && (f.header = b.header), void 0 !== b.maxNumberOfElements && (f.maxNumberOfElements = b.maxNumberOfElements), void 0 !== a.get("list").maxNumberOfElements && (f.maxListSize = a.get("list").maxNumberOfElements), void 0 !== b.getValue)
          if ("string" == typeof b.getValue) {
            var g = b.getValue;
            f.getValue = function(a) {
              return a[g]
            }
          } else "function" == typeof b.getValue && (f.getValue = b.getValue);
        else f.getValue = a.get("getValue");
        return f
      }

      function d(b) {
        var c = [];
        return void 0 === b.xmlElementName && (b.xmlElementName = a.get("xmlElementName")), $(b.data).find(b.xmlElementName).each(function() {
          c.push(this)
        }), c
      }
      this.init = function(b) {
        var c = [],
          d = {};
        return d.data = a.get("listLocation")(b), d.getValue = a.get("getValue"), d.maxListSize = a.get("list").maxNumberOfElements, c.push(d), c
      }, this.updateCategories = function(b, d) {
        if (a.get("categoriesAssigned")) {
          b = [];
          for (var e = 0; e < a.get("categories").length; e += 1) {
            var f = c(a.get("categories")[e], d);
            b.push(f)
          }
        }
        return b
      }, this.convertXml = function(b) {
        if ("XML" === a.get("dataType").toUpperCase())
          for (var c = 0; c < b.length; c += 1) b[c].data = d(b[c]);
        return b
      }, this.processData = function(c, d) {
        for (var e = 0, f = c.length; f > e; e += 1) c[e].data = b(a, c[e], d);
        return c
      }, this.checkIfDataExists = function(a) {
        for (var b = 0, c = a.length; c > b; b += 1)
          if (void 0 !== a[b].data && a[b].data instanceof Array && a[b].data.length > 0) return !0;
        return !1
      }
    }, a
  }(EasyAutocomplete || {}),
  EasyAutocomplete = function(a) {
    return a.proccess = function(b, c, d) {
      function e(a, c) {
        var d = [],
          e = "";
        if (b.get("list").match.enabled)
          for (var g = 0, h = a.length; h > g; g += 1) e = b.get("getValue")(a[g]), f(e, c) && d.push(a[g]);
        else d = a;
        return d
      }

      function f(a, c) {
        return b.get("list").match.caseSensitive || ("string" == typeof a && (a = a.toLowerCase()), c = c.toLowerCase()), !!b.get("list").match.method(a, c)
      }

      function g(a) {
        return void 0 !== c.maxNumberOfElements && a.length > c.maxNumberOfElements && (a = a.slice(0, c.maxNumberOfElements)), a
      }

      function h(a) {
        return b.get("list").sort.enabled && a.sort(b.get("list").sort.method), a
      }
      a.proccess.match = f;
      var i = c.data,
        j = d;
      return i = e(i, j), i = g(i), i = h(i)
    }, a
  }(EasyAutocomplete || {}),
  EasyAutocomplete = function(a) {
    return a.Template = function(a) {
      var b = {
          basic: {
            type: "basic",
            method: function(a) {
              return a
            },
            cssClass: ""
          },
          description: {
            type: "description",
            fields: {
              description: "description"
            },
            method: function(a) {
              return a + " - description"
            },
            cssClass: "eac-description"
          },
          iconLeft: {
            type: "iconLeft",
            fields: {
              icon: ""
            },
            method: function(a) {
              return a
            },
            cssClass: "eac-icon-left"
          },
          iconRight: {
            type: "iconRight",
            fields: {
              iconSrc: ""
            },
            method: function(a) {
              return a
            },
            cssClass: "eac-icon-right"
          },
          links: {
            type: "links",
            fields: {
              link: ""
            },
            method: function(a) {
              return a
            },
            cssClass: ""
          },
          custom: {
            type: "custom",
            method: function() {},
            cssClass: ""
          }
        },
        c = function(a) {
          var c, d = a.fields;
          return "description" === a.type ? (c = b.description.method, "string" == typeof d.description ? c = function(a, b) {
            return a + " - <span>" + b[d.description] + "</span>"
          } : "function" == typeof d.description && (c = function(a, b) {
            return a + " - <span>" + d.description(b) + "</span>"
          }), c) : "iconRight" === a.type ? ("string" == typeof d.iconSrc ? c = function(a, b) {
            return a + "<img class='eac-icon' src='" + b[d.iconSrc] + "' />"
          } : "function" == typeof d.iconSrc && (c = function(a, b) {
            return a + "<img class='eac-icon' src='" + d.iconSrc(b) + "' />"
          }), c) : "iconLeft" === a.type ? ("string" == typeof d.iconSrc ? c = function(a, b) {
            return "<img class='eac-icon' src='" + b[d.iconSrc] + "' />" + a
          } : "function" == typeof d.iconSrc && (c = function(a, b) {
            return "<img class='eac-icon' src='" + d.iconSrc(b) + "' />" + a
          }), c) : "links" === a.type ? ("string" == typeof d.link ? c = function(a, b) {
            return "<a href='" + b[d.link] + "' >" + a + "</a>"
          } : "function" == typeof d.link && (c = function(a, b) {
            return "<a href='" + d.link(b) + "' >" + a + "</a>"
          }), c) : "custom" === a.type ? a.method : b.basic.method
        },
        d = function(a) {
          return a && a.type && a.type && b[a.type] ? c(a) : b.basic.method
        },
        e = function(a) {
          var c = function() {
            return ""
          };
          return a && a.type && a.type && b[a.type] ? function() {
            var c = b[a.type].cssClass;
            return function() {
              return c
            }
          }() : c
        };
      this.getTemplateClass = e(a), this.build = d(a)
    }, a
  }(EasyAutocomplete || {}),
  EasyAutocomplete = function(a) {
    return a.main = function(b, c) {
      function d() {
        return 0 === t.length ? void p.error("Input field doesn't exist.") : o.checkDataUrlProperties() ? o.checkRequiredProperties() ? (e(), void g()) : void p.error("Will not work without mentioned properties.") : void p.error("One of options variables 'data' or 'url' must be defined.")
      }

      function e() {
        function a() {
          var a = $("<div>"),
            c = n.getValue("WRAPPER_CSS_CLASS");
          o.get("theme") && "" !== o.get("theme") && (c += " eac-" + o.get("theme")), o.get("cssClasses") && "" !== o.get("cssClasses") && (c += " " + o.get("cssClasses")), "" !== q.getTemplateClass() && (c += " " + q.getTemplateClass()), a.addClass(c), t.wrap(a), o.get("adjustWidth") === !0 && b()
        }

        function b() {
          var a = t.outerWidth();
          t.parent().css("width", a)
        }

        function c() {
          t.unwrap()
        }

        function d() {
          var a = $("<div>").addClass(n.getValue("CONTAINER_CLASS"));
          a.attr("id", f()).prepend($("<ul>")),
            function() {
              a.on("show.eac", function() {
                switch (o.get("list").showAnimation.type) {
                  case "slide":
                    var b = o.get("list").showAnimation.time,
                      c = o.get("list").showAnimation.callback;
                    a.find("ul").slideDown(b, c);
                    break;
                  case "fade":
                    var b = o.get("list").showAnimation.time,
                      c = o.get("list").showAnimation.callback;
                    a.find("ul").fadeIn(b), c;
                    break;
                  default:
                    a.find("ul").show()
                }
                o.get("list").onShowListEvent()
              }).on("hide.eac", function() {
                switch (o.get("list").hideAnimation.type) {
                  case "slide":
                    var b = o.get("list").hideAnimation.time,
                      c = o.get("list").hideAnimation.callback;
                    a.find("ul").slideUp(b, c);
                    break;
                  case "fade":
                    var b = o.get("list").hideAnimation.time,
                      c = o.get("list").hideAnimation.callback;
                    a.find("ul").fadeOut(b, c);
                    break;
                  default:
                    a.find("ul").hide()
                }
                o.get("list").onHideListEvent()
              }).on("selectElement.eac", function() {
                a.find("ul li").removeClass("selected"), a.find("ul li").eq(w).addClass("selected"), o.get("list").onSelectItemEvent()
              }).on("loadElements.eac", function(b, c, d) {
                var e = "",
                  f = a.find("ul");
                f.empty().detach(), v = [];
                for (var h = 0, i = 0, k = c.length; k > i; i += 1) {
                  var l = c[i].data;
                  if (0 !== l.length) {
                    void 0 !== c[i].header && c[i].header.length > 0 && f.append("<div class='eac-category' >" + c[i].header + "</div>");
                    for (var m = 0, n = l.length; n > m && h < c[i].maxListSize; m += 1) e = $("<li><div class='eac-item'></div></li>"),
                      function() {
                        var a = m,
                          b = h,
                          f = c[i].getValue(l[a]);
                        e.find(" > div").on("click", function() {
                          t.val(f).trigger("change"), w = b, j(b), o.get("list").onClickEvent(), o.get("list").onChooseEvent()
                        }).mouseover(function() {
                          w = b, j(b), o.get("list").onMouseOverEvent()
                        }).mouseout(function() {
                          o.get("list").onMouseOutEvent()
                        }).html(q.build(g(f, d), l[a]))
                      }(), f.append(e), v.push(l[m]), h += 1
                  }
                }
                a.append(f), o.get("list").onLoadEvent()
              })
            }(), t.after(a)
        }

        function e() {
          t.next("." + n.getValue("CONTAINER_CLASS")).remove()
        }

        function g(a, b) {
          return o.get("highlightPhrase") && "" !== b ? i(a, b) : a
        }

        function h(a) {
          return a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&")
        }

        function i(a, b) {
          var c = h(b);
          return (a + "").replace(new RegExp("(" + c + ")", "gi"), "<b>$1</b>")
        }
        t.parent().hasClass(n.getValue("WRAPPER_CSS_CLASS")) && (e(), c()), a(), d(), u = $("#" + f()), o.get("placeholder") && t.attr("placeholder", o.get("placeholder"))
      }

      function f() {
        var a = t.attr("id");
        return a = n.getValue("CONTAINER_ID") + a
      }

      function g() {
        function a() {
          s("autocompleteOff", !0) && n(), b(), c(), d(), e(), f(), g()
        }

        function b() {
          t.focusout(function() {
            var a, b = t.val();
            o.get("list").match.caseSensitive || (b = b.toLowerCase());
            for (var c = 0, d = v.length; d > c; c += 1)
              if (a = o.get("getValue")(v[c]), o.get("list").match.caseSensitive || (a = a.toLowerCase()), a === b) return w = c, void j(w)
          })
        }

        function c() {
          t.off("keyup").keyup(function(a) {
            function b(a) {
              function b() {
                var a = {},
                  b = o.get("ajaxSettings") || {};
                for (var c in b) a[c] = b[c];
                return a
              }

              function c(a, b) {
                return o.get("matchResponseProperty") !== !1 ? "string" == typeof o.get("matchResponseProperty") ? b[o.get("matchResponseProperty")] === a : "function" == typeof o.get("matchResponseProperty") ? o.get("matchResponseProperty")(b) === a : !0 : !0
              }
              if (!(a.length < o.get("minCharNumber"))) {
                if ("list-required" !== o.get("data")) {
                  var d = o.get("data"),
                    e = r.init(d);
                  e = r.updateCategories(e, d), e = r.processData(e, a), k(e, a), t.parent().find("li").length > 0 ? h() : i()
                }
                var f = b();
                void 0 !== f.url && "" !== f.url || (f.url = o.get("url")), void 0 !== f.dataType && "" !== f.dataType || (f.dataType = o.get("dataType")), void 0 !== f.url && "list-required" !== f.url && (f.url = f.url(a), f.data = o.get("preparePostData")(f.data, a), $.ajax(f).done(function(b) {
                  var d = r.init(b);
                  d = r.updateCategories(d, b), d = r.convertXml(d), c(a, b) && (d = r.processData(d, a), k(d, a)), r.checkIfDataExists(d) && t.parent().find("li").length > 0 ? h() : i(), o.get("ajaxCallback")()
                }).fail(function() {
                  p.warning("Fail to load response data")
                }).always(function() {}))
              }
            }
            switch (a.keyCode) {
              case 27:
                i(), l();
                break;
              case 38:
                a.preventDefault(), v.length > 0 && w > 0 && (w -= 1, t.val(o.get("getValue")(v[w])), j(w));
                break;
              case 40:
                a.preventDefault(), v.length > 0 && w < v.length - 1 && (w += 1, t.val(o.get("getValue")(v[w])), j(w));
                break;
              default:
                if (a.keyCode > 40 || 8 === a.keyCode) {
                  var c = t.val();
                  o.get("list").hideOnEmptyPhrase !== !0 || 8 !== a.keyCode || "" !== c ? o.get("requestDelay") > 0 ? (void 0 !== m && clearTimeout(m), m = setTimeout(function() {
                    b(c)
                  }, o.get("requestDelay"))) : b(c) : i()
                }
            }
          })
        }

        function d() {
          t.on("keydown", function(a) {
            a = a || window.event;
            var b = a.keyCode;
            return 38 === b ? (suppressKeypress = !0, !1) : void 0
          }).keydown(function(a) {
            13 === a.keyCode && w > -1 && (t.val(o.get("getValue")(v[w])), o.get("list").onKeyEnterEvent(), o.get("list").onChooseEvent(), w = -1, i(), a.preventDefault())
          })
        }

        function e() {
          t.off("keypress")
        }

        function f() {
          t.focus(function() {
            "" !== t.val() && v.length > 0 && (w = -1, h())
          })
        }

        function g() {
          t.blur(function() {
            setTimeout(function() {
              w = -1, i()
            }, 250)
          })
        }

        function n() {
          t.attr("autocomplete", "off")
        }
        a()
      }

      function h() {
        u.trigger("show.eac")
      }

      function i() {
        u.trigger("hide.eac")
      }

      function j(a) {
        u.trigger("selectElement.eac", a)
      }

      function k(a, b) {
        u.trigger("loadElements.eac", [a, b])
      }

      function l() {
        t.trigger("blur")
      }
      var m, n = new a.Constans,
        o = new a.Configuration(c),
        p = new a.Logger,
        q = new a.Template(c.template),
        r = new a.ListBuilderService(o, a.proccess),
        s = o.equals,
        t = b,
        u = "",
        v = [],
        w = -1;
      a.consts = n, this.getConstants = function() {
        return n
      }, this.getConfiguration = function() {
        return o
      }, this.getContainer = function() {
        return u
      }, this.getSelectedItemIndex = function() {
        return w
      }, this.getItems = function() {
        return v
      }, this.getItemData = function(a) {
        return v.length < a || void 0 === v[a] ? -1 : v[a]
      }, this.getSelectedItemData = function() {
        return this.getItemData(w)
      }, this.build = function() {
        e()
      }, this.init = function() {
        d()
      }
    }, a.eacHandles = [], a.getHandle = function(b) {
      return a.eacHandles[b]
    }, a.inputHasId = function(a) {
      return void 0 !== $(a).attr("id") && $(a).attr("id").length > 0
    }, a.assignRandomId = function(b) {
      var c = "";
      do c = "eac-" + Math.floor(1e4 * Math.random()); while (0 !== $("#" + c).length);
      elementId = a.consts.getValue("CONTAINER_ID") + c, $(b).attr("id", c)
    }, a.setHandle = function(b, c) {
      a.eacHandles[c] = b
    }, a
  }(EasyAutocomplete || {});
! function(a) {
  a.fn.easyAutocomplete = function(b) {
    return this.each(function() {
      var c = a(this),
        d = new EasyAutocomplete.main(c, b);
      EasyAutocomplete.inputHasId(c) || EasyAutocomplete.assignRandomId(c), d.init(), EasyAutocomplete.setHandle(d, c.attr("id"))
    })
  }, a.fn.getSelectedItemIndex = function() {
    var b = a(this).attr("id");
    return void 0 !== b ? EasyAutocomplete.getHandle(b).getSelectedItemIndex() : -1
  }, a.fn.getItems = function() {
    var b = a(this).attr("id");
    return void 0 !== b ? EasyAutocomplete.getHandle(b).getItems() : -1
  }, a.fn.getItemData = function(b) {
    var c = a(this).attr("id");
    return void 0 !== c && b > -1 ? EasyAutocomplete.getHandle(c).getItemData(b) : -1
  }, a.fn.getSelectedItemData = function() {
    var b = a(this).attr("id");
    return void 0 !== b ? EasyAutocomplete.getHandle(b).getSelectedItemData() : -1
  }

}(jQuery);

$.fn.getElementCount = function () {
    	    var inputId = $(this).attr("id");
    	    if (inputId !== undefined) {
    	        return EasyAutocomplete.getHandle(inputId).getElementCount();
    	    }
    	    return -1;
    	};
    this.getElementCount = function () {
    	        return elementsList.length;
    	    };
/*
 * easy-autocomplete
 * jQuery plugin for autocompletion
 * 
 * @author Łukasz Pawełczak (http://github.com/pawelczak)
 * @version 1.3.5
 * Copyright  License: 
 */

.easy-autocomplete{position:relative}.easy-autocomplete input{border-color:#ccc;border-radius:4px;border-style:solid;border-width:1px;box-shadow:0 1px 2px rgba(0,0,0,0.1) inset;color:#555;float:none;padding:6px 12px}.easy-autocomplete input:hover,.easy-autocomplete input:focus{box-shadow:none}.easy-autocomplete a{display:block}.easy-autocomplete.eac-blue-light input:hover,.easy-autocomplete.eac-blue-light input:focus{border-color:#66afe9;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.easy-autocomplete.eac-blue-light ul{border-color:#66afe9;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(102,175,233,0.6)}.easy-autocomplete.eac-blue-light ul li,.easy-autocomplete.eac-blue-light ul .eac-category{border-color:#66afe9}.easy-autocomplete.eac-blue-light ul li.selected,.easy-autocomplete.eac-blue-light ul .eac-category.selected{background-color:#ecf5fc}.easy-autocomplete.eac-green-light input:hover,.easy-autocomplete.eac-green-light input:focus{border-color:#41DB00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(146,237,107,0.6)}.easy-autocomplete.eac-green-light ul{border-color:#41DB00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(146,237,107,0.6)}.easy-autocomplete.eac-green-light ul li,.easy-autocomplete.eac-green-light ul .eac-category{border-color:#41DB00}.easy-autocomplete.eac-green-light ul li.selected,.easy-autocomplete.eac-green-light ul .eac-category.selected{background-color:#9eff75}.easy-autocomplete.eac-red-light input:hover,.easy-autocomplete.eac-red-light input:focus{border-color:#ff5b5b;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,90,90,0.6)}.easy-autocomplete.eac-red-light ul{border-color:#ff5b5b;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,90,90,0.6)}.easy-autocomplete.eac-red-light ul li,.easy-autocomplete.eac-red-light ul .eac-category{border-color:#ff5b5b}.easy-autocomplete.eac-red-light ul li.selected,.easy-autocomplete.eac-red-light ul .eac-category.selected{background-color:#ff8e8e}.easy-autocomplete.eac-yellow-light input:hover,.easy-autocomplete.eac-yellow-light input:focus{border-color:#ffdb00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,231,84,0.6)}.easy-autocomplete.eac-yellow-light ul{border-color:#ffdb00;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(255,231,84,0.6)}.easy-autocomplete.eac-yellow-light ul li,.easy-autocomplete.eac-yellow-light ul .eac-category{border-color:#ffdb00}.easy-autocomplete.eac-yellow-light ul li.selected,.easy-autocomplete.eac-yellow-light ul .eac-category.selected{background-color:#ffe233}.easy-autocomplete.eac-dark-light input:hover,.easy-autocomplete.eac-dark-light input:focus{border-color:#333;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(55,55,55,0.6)}.easy-autocomplete.eac-dark-light ul{border-color:#333;box-shadow:0 1px 1px rgba(0,0,0,0.075) inset,0 0 8px rgba(55,55,55,0.6)}.easy-autocomplete.eac-dark-light ul li,.easy-autocomplete.eac-dark-light ul .eac-category{border-color:#333}.easy-autocomplete.eac-dark-light ul li.selected,.easy-autocomplete.eac-dark-light ul .eac-category.selected{background-color:#4d4d4d;color:#fff}.easy-autocomplete.eac-dark{color:#fff}.easy-autocomplete.eac-dark input{background-color:#404040;border-radius:4px;box-shadow:0;color:#f6f6f6}.easy-autocomplete.eac-dark input:hover,.easy-autocomplete.eac-dark input:focus{border-color:#333;box-shadow:0}.easy-autocomplete.eac-dark ul{border-color:#333}.easy-autocomplete.eac-dark ul li,.easy-autocomplete.eac-dark ul .eac-category{background-color:#404040;border-color:#333}.easy-autocomplete.eac-dark ul li.selected,.easy-autocomplete.eac-dark ul .eac-category.selected{background-color:#737373;color:#f6f6f6}.easy-autocomplete.eac-dark-glass{color:#fff}.easy-autocomplete.eac-dark-glass input{background-color:rgba(0,0,0,0.8);border-radius:4px;box-shadow:0;color:#f6f6f6}.easy-autocomplete.eac-dark-glass input:hover,.easy-autocomplete.eac-dark-glass input:focus{border-color:rgba(0,0,0,0.8);box-shadow:0}.easy-autocomplete.eac-dark-glass ul{border-color:rgba(0,0,0,0.8)}.easy-autocomplete.eac-dark-glass ul li,.easy-autocomplete.eac-dark-glass ul .eac-category{background-color:rgba(0,0,0,0.8);border-color:rgba(0,0,0,0.8)}.easy-autocomplete.eac-dark-glass ul li.selected,.easy-autocomplete.eac-dark-glass ul .eac-category.selected{background-color:rgba(64,64,64,0.8);color:#f6f6f6}.easy-autocomplete.eac-dark-glass ul li:last-child,.easy-autocomplete.eac-dark-glass ul .eac-category:last-child{border-radius:0 0 4px 4px}.easy-autocomplete.eac-blue{color:#fff}.easy-autocomplete.eac-blue input{background-color:#6d9ed1;border-radius:4px;box-shadow:0;color:#f6f6f6}.easy-autocomplete.eac-blue input::-webkit-input-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input:-moz-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input::-moz-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input:-ms-input-placeholder{color:#f6f6f6}.easy-autocomplete.eac-blue input:hover,.easy-autocomplete.eac-blue input:focus{border-color:#5A91CB;box-shadow:0}.easy-autocomplete.eac-blue ul{border-color:#5A91CB}.easy-autocomplete.eac-blue ul li,.easy-autocomplete.eac-blue ul .eac-category{background-color:#6d9ed1;border-color:#5A91CB}.easy-autocomplete.eac-blue ul li.selected,.easy-autocomplete.eac-blue ul .eac-category.selected{background-color:#94b8dd;color:#f6f6f6}.easy-autocomplete.eac-yellow{color:#333}.easy-autocomplete.eac-yellow input{background-color:#ffdb7e;border-color:#333;border-radius:4px;box-shadow:0;color:#333}.easy-autocomplete.eac-yellow input:hover,.easy-autocomplete.eac-yellow input:focus{border-color:#333;box-shadow:0}.easy-autocomplete.eac-yellow ul{border-color:#333}.easy-autocomplete.eac-yellow ul li,.easy-autocomplete.eac-yellow ul .eac-category{background-color:#ffdb7e;border-color:#333}.easy-autocomplete.eac-yellow ul li.selected,.easy-autocomplete.eac-yellow ul .eac-category.selected{background-color:#ffe9b1;color:#333}.easy-autocomplete.eac-purple{color:#333}.easy-autocomplete.eac-purple input{background-color:#d6d1e7;border-color:#b8afd5;box-shadow:0;color:#333}.easy-autocomplete.eac-purple input:hover,.easy-autocomplete.eac-purple input:focus{border-color:#333;box-shadow:0}.easy-autocomplete.eac-purple ul{border-color:#333}.easy-autocomplete.eac-purple ul li,.easy-autocomplete.eac-purple ul .eac-category{background-color:#d6d1e7;border-color:#333}.easy-autocomplete.eac-purple ul li.selected,.easy-autocomplete.eac-purple ul .eac-category.selected{background-color:#ebe8f3;color:#333}.easy-autocomplete.eac-bootstrap input{border-color:#ccc;border-radius:4px;border-style:solid;border-width:1px;color:#555;padding:6px 12px}.easy-autocomplete-container{left:0;position:absolute;width:100%;z-index:2}.easy-autocomplete-container ul{background:none repeat scroll 0 0 #ffffff;border-top:1px dotted #ccc;display:none;margin-top:0;padding-bottom:0;padding-left:0;position:relative;top:-1px}.easy-autocomplete-container ul li,.easy-autocomplete-container ul .eac-category{background:inherit;border-color:#ccc;border-image:none;border-style:solid;border-width:0 1px;display:block;font-size:14px;font-weight:normal;padding:4px 12px}.easy-autocomplete-container ul li:last-child{border-radius:0 0 2px 2px;border-width:0 1px 1px}.easy-autocomplete-container ul li.selected{background:none repeat scroll 0 0 #ebebeb;cursor:pointer}.easy-autocomplete-container ul li.selected div{font-weight:normal}.easy-autocomplete-container ul li div{display:block;font-weight:normal;word-break:break-all}.easy-autocomplete-container ul li b{font-weight:bold}.easy-autocomplete-container ul .eac-category{font-color:#aaa;font-style:italic}.eac-description .eac-item span{color:#aaa;font-style:italic;font-size:0.9em}.eac-icon-left .eac-item img{margin-right:4px;max-height:30px}.eac-icon-right .eac-item{margin-top:8px;min-height:24px;position:relative}.eac-icon-right .eac-item img{margin-left:4px;max-height:30px;position:absolute;right:-4px;top:-8px}
/*# sourceMappingURL=easy-autocomplete.min.css.map */