equation-admin-template
Version:
Booststrap 4 admin template made by equation
875 lines (866 loc) • 136 kB
JavaScript
/*! Select2 4.0.6-rc.1 | https://github.com/select2/select2/blob/master/LICENSE.md */ ! function(a) {
"function" == typeof define && define.amd ? define(["jquery"], a) : "object" == typeof module && module.exports ? module.exports = function(b, c) {
return void 0 === c && (c = "undefined" != typeof window ? require("jquery") : require("jquery")(b)), a(c), c
} : a(jQuery)
}(function(a) {
var b = function() {
if (a && a.fn && a.fn.select2 && a.fn.select2.amd) var b = a.fn.select2.amd;
var b;
return function() {
if (!b || !b.requirejs) {
b ? c = b : b = {};
var a, c, d;
! function(b) {
function e(a, b) {
return v.call(a, b)
}
function f(a, b) {
var c, d, e, f, g, h, i, j, k, l, m, n, o = b && b.split("/"),
p = t.map,
q = p && p["*"] || {};
if (a) {
for (a = a.split("/"), g = a.length - 1, t.nodeIdCompat && x.test(a[g]) && (a[g] = a[g].replace(x, "")), "." === a[0].charAt(0) && o && (n = o.slice(0, o.length - 1), a = n.concat(a)), k = 0; k < a.length; k++)
if ("." === (m = a[k])) a.splice(k, 1), k -= 1;
else if (".." === m) {
if (0 === k || 1 === k && ".." === a[2] || ".." === a[k - 1]) continue;
k > 0 && (a.splice(k - 1, 2), k -= 2)
}
a = a.join("/")
}
if ((o || q) && p) {
for (c = a.split("/"), k = c.length; k > 0; k -= 1) {
if (d = c.slice(0, k).join("/"), o)
for (l = o.length; l > 0; l -= 1)
if ((e = p[o.slice(0, l).join("/")]) && (e = e[d])) {
f = e, h = k;
break
}
if (f) break;
!i && q && q[d] && (i = q[d], j = k)
}!f && i && (f = i, h = j), f && (c.splice(0, h, f), a = c.join("/"))
}
return a
}
function g(a, c) {
return function() {
var d = w.call(arguments, 0);
return "string" != typeof d[0] && 1 === d.length && d.push(null), o.apply(b, d.concat([a, c]))
}
}
function h(a) {
return function(b) {
return f(b, a)
}
}
function i(a) {
return function(b) {
r[a] = b
}
}
function j(a) {
if (e(s, a)) {
var c = s[a];
delete s[a], u[a] = !0, n.apply(b, c)
}
if (!e(r, a) && !e(u, a)) throw new Error("No " + a);
return r[a]
}
function k(a) {
var b, c = a ? a.indexOf("!") : -1;
return c > -1 && (b = a.substring(0, c), a = a.substring(c + 1, a.length)), [b, a]
}
function l(a) {
return a ? k(a) : []
}
function m(a) {
return function() {
return t && t.config && t.config[a] || {}
}
}
var n, o, p, q, r = {},
s = {},
t = {},
u = {},
v = Object.prototype.hasOwnProperty,
w = [].slice,
x = /\.js$/;
p = function(a, b) {
var c, d = k(a),
e = d[0],
g = b[1];
return a = d[1], e && (e = f(e, g), c = j(e)), e ? a = c && c.normalize ? c.normalize(a, h(g)) : f(a, g) : (a = f(a, g), d = k(a), e = d[0], a = d[1], e && (c = j(e))), {
f: e ? e + "!" + a : a,
n: a,
pr: e,
p: c
}
}, q = {
require: function(a) {
return g(a)
},
exports: function(a) {
var b = r[a];
return void 0 !== b ? b : r[a] = {}
},
module: function(a) {
return {
id: a,
uri: "",
exports: r[a],
config: m(a)
}
}
}, n = function(a, c, d, f) {
var h, k, m, n, o, t, v, w = [],
x = typeof d;
if (f = f || a, t = l(f), "undefined" === x || "function" === x) {
for (c = !c.length && d.length ? ["require", "exports", "module"] : c, o = 0; o < c.length; o += 1)
if (n = p(c[o], t), "require" === (k = n.f)) w[o] = q.require(a);
else if ("exports" === k) w[o] = q.exports(a), v = !0;
else if ("module" === k) h = w[o] = q.module(a);
else if (e(r, k) || e(s, k) || e(u, k)) w[o] = j(k);
else {
if (!n.p) throw new Error(a + " missing " + k);
n.p.load(n.n, g(f, !0), i(k), {}), w[o] = r[k]
}
m = d ? d.apply(r[a], w) : void 0, a && (h && h.exports !== b && h.exports !== r[a] ? r[a] = h.exports : m === b && v || (r[a] = m))
} else a && (r[a] = d)
}, a = c = o = function(a, c, d, e, f) {
if ("string" == typeof a) return q[a] ? q[a](c) : j(p(a, l(c)).f);
if (!a.splice) {
if (t = a, t.deps && o(t.deps, t.callback), !c) return;
c.splice ? (a = c, c = d, d = null) : a = b
}
return c = c || function() {}, "function" == typeof d && (d = e, e = f), e ? n(b, a, c, d) : setTimeout(function() {
n(b, a, c, d)
}, 4), o
}, o.config = function(a) {
return o(a)
}, a._defined = r, d = function(a, b, c) {
if ("string" != typeof a) throw new Error("See almond README: incorrect module build, no module name");
b.splice || (c = b, b = []), e(r, a) || e(s, a) || (s[a] = [a, b, c])
}, d.amd = {
jQuery: !0
}
}(), b.requirejs = a, b.require = c, b.define = d
}
}(), b.define("almond", function() {}), b.define("jquery", [], function() {
var b = a || $;
return null == b && console && console.error && console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."), b
}), b.define("select2/utils", ["jquery"], function(a) {
function b(a) {
var b = a.prototype,
c = [];
for (var d in b) {
"function" == typeof b[d] && ("constructor" !== d && c.push(d))
}
return c
}
var c = {};
c.Extend = function(a, b) {
function c() {
this.constructor = a
}
var d = {}.hasOwnProperty;
for (var e in b) d.call(b, e) && (a[e] = b[e]);
return c.prototype = b.prototype, a.prototype = new c, a.__super__ = b.prototype, a
}, c.Decorate = function(a, c) {
function d() {
var b = Array.prototype.unshift,
d = c.prototype.constructor.length,
e = a.prototype.constructor;
d > 0 && (b.call(arguments, a.prototype.constructor), e = c.prototype.constructor), e.apply(this, arguments)
}
function e() {
this.constructor = d
}
var f = b(c),
g = b(a);
c.displayName = a.displayName, d.prototype = new e;
for (var h = 0; h < g.length; h++) {
var i = g[h];
d.prototype[i] = a.prototype[i]
}
for (var j = (function(a) {
var b = function() {};
a in d.prototype && (b = d.prototype[a]);
var e = c.prototype[a];
return function() {
return Array.prototype.unshift.call(arguments, b), e.apply(this, arguments)
}
}), k = 0; k < f.length; k++) {
var l = f[k];
d.prototype[l] = j(l)
}
return d
};
var d = function() {
this.listeners = {}
};
d.prototype.on = function(a, b) {
this.listeners = this.listeners || {}, a in this.listeners ? this.listeners[a].push(b) : this.listeners[a] = [b]
}, d.prototype.trigger = function(a) {
var b = Array.prototype.slice,
c = b.call(arguments, 1);
this.listeners = this.listeners || {}, null == c && (c = []), 0 === c.length && c.push({}), c[0]._type = a, a in this.listeners && this.invoke(this.listeners[a], b.call(arguments, 1)), "*" in this.listeners && this.invoke(this.listeners["*"], arguments)
}, d.prototype.invoke = function(a, b) {
for (var c = 0, d = a.length; c < d; c++) a[c].apply(this, b)
}, c.Observable = d, c.generateChars = function(a) {
for (var b = "", c = 0; c < a; c++) {
b += Math.floor(36 * Math.random()).toString(36)
}
return b
}, c.bind = function(a, b) {
return function() {
a.apply(b, arguments)
}
}, c._convertData = function(a) {
for (var b in a) {
var c = b.split("-"),
d = a;
if (1 !== c.length) {
for (var e = 0; e < c.length; e++) {
var f = c[e];
f = f.substring(0, 1).toLowerCase() + f.substring(1), f in d || (d[f] = {}), e == c.length - 1 && (d[f] = a[b]), d = d[f]
}
delete a[b]
}
}
return a
}, c.hasScroll = function(b, c) {
var d = a(c),
e = c.style.overflowX,
f = c.style.overflowY;
return (e !== f || "hidden" !== f && "visible" !== f) && ("scroll" === e || "scroll" === f || (d.innerHeight() < c.scrollHeight || d.innerWidth() < c.scrollWidth))
}, c.escapeMarkup = function(a) {
var b = {
"\\": "\",
"&": "&",
"<": "<",
">": ">",
'"': """,
"'": "'",
"/": "/"
};
return "string" != typeof a ? a : String(a).replace(/[&<>"'\/\\]/g, function(a) {
return b[a]
})
}, c.appendMany = function(b, c) {
if ("1.7" === a.fn.jquery.substr(0, 3)) {
var d = a();
a.map(c, function(a) {
d = d.add(a)
}), c = d
}
b.append(c)
}, c.__cache = {};
var e = 0;
return c.GetUniqueElementId = function(a) {
var b = a.getAttribute("data-select2-id");
return null == b && (a.id ? (b = a.id, a.setAttribute("data-select2-id", b)) : (a.setAttribute("data-select2-id", ++e), b = e.toString())), b
}, c.StoreData = function(a, b, d) {
var e = c.GetUniqueElementId(a);
c.__cache[e] || (c.__cache[e] = {}), c.__cache[e][b] = d
}, c.GetData = function(b, d) {
var e = c.GetUniqueElementId(b);
return d ? c.__cache[e] && null != c.__cache[e][d] ? c.__cache[e][d] : a(b).data(d) : c.__cache[e]
}, c.RemoveData = function(a) {
var b = c.GetUniqueElementId(a);
null != c.__cache[b] && delete c.__cache[b]
}, c
}), b.define("select2/results", ["jquery", "./utils"], function(a, b) {
function c(a, b, d) {
this.$element = a, this.data = d, this.options = b, c.__super__.constructor.call(this)
}
return b.Extend(c, b.Observable), c.prototype.render = function() {
var b = a('<ul class="select2-results__options" role="tree"></ul>');
return this.options.get("multiple") && b.attr("aria-multiselectable", "true"), this.$results = b, b
}, c.prototype.clear = function() {
this.$results.empty()
}, c.prototype.displayMessage = function(b) {
var c = this.options.get("escapeMarkup");
this.clear(), this.hideLoading();
var d = a('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),
e = this.options.get("translations").get(b.message);
d.append(c(e(b.args))), d[0].className += " select2-results__message", this.$results.append(d)
}, c.prototype.hideMessages = function() {
this.$results.find(".select2-results__message").remove()
}, c.prototype.append = function(a) {
this.hideLoading();
var b = [];
if (null == a.results || 0 === a.results.length) return void(0 === this.$results.children().length && this.trigger("results:message", {
message: "noResults"
}));
a.results = this.sort(a.results);
for (var c = 0; c < a.results.length; c++) {
var d = a.results[c],
e = this.option(d);
b.push(e)
}
this.$results.append(b)
}, c.prototype.position = function(a, b) {
b.find(".select2-results").append(a)
}, c.prototype.sort = function(a) {
return this.options.get("sorter")(a)
}, c.prototype.highlightFirstItem = function() {
var a = this.$results.find(".select2-results__option[aria-selected]"),
b = a.filter("[aria-selected=true]");
b.length > 0 ? b.first().trigger("mouseenter") : a.first().trigger("mouseenter"), this.ensureHighlightVisible()
}, c.prototype.setClasses = function() {
var c = this;
this.data.current(function(d) {
var e = a.map(d, function(a) {
return a.id.toString()
});
c.$results.find(".select2-results__option[aria-selected]").each(function() {
var c = a(this),
d = b.GetData(this, "data"),
f = "" + d.id;
null != d.element && d.element.selected || null == d.element && a.inArray(f, e) > -1 ? c.attr("aria-selected", "true") : c.attr("aria-selected", "false")
})
})
}, c.prototype.showLoading = function(a) {
this.hideLoading();
var b = this.options.get("translations").get("searching"),
c = {
disabled: !0,
loading: !0,
text: b(a)
},
d = this.option(c);
d.className += " loading-results", this.$results.prepend(d)
}, c.prototype.hideLoading = function() {
this.$results.find(".loading-results").remove()
}, c.prototype.option = function(c) {
var d = document.createElement("li");
d.className = "select2-results__option";
var e = {
role: "treeitem",
"aria-selected": "false"
};
c.disabled && (delete e["aria-selected"], e["aria-disabled"] = "true"), null == c.id && delete e["aria-selected"], null != c._resultId && (d.id = c._resultId), c.title && (d.title = c.title), c.children && (e.role = "group", e["aria-label"] = c.text, delete e["aria-selected"]);
for (var f in e) {
var g = e[f];
d.setAttribute(f, g)
}
if (c.children) {
var h = a(d),
i = document.createElement("strong");
i.className = "select2-results__group";
a(i);
this.template(c, i);
for (var j = [], k = 0; k < c.children.length; k++) {
var l = c.children[k],
m = this.option(l);
j.push(m)
}
var n = a("<ul></ul>", {
class: "select2-results__options select2-results__options--nested"
});
n.append(j), h.append(i), h.append(n)
} else this.template(c, d);
return b.StoreData(d, "data", c), d
}, c.prototype.bind = function(c, d) {
var e = this,
f = c.id + "-results";
this.$results.attr("id", f), c.on("results:all", function(a) {
e.clear(), e.append(a.data), c.isOpen() && (e.setClasses(), e.highlightFirstItem())
}), c.on("results:append", function(a) {
e.append(a.data), c.isOpen() && e.setClasses()
}), c.on("query", function(a) {
e.hideMessages(), e.showLoading(a)
}), c.on("select", function() {
c.isOpen() && (e.setClasses(), e.highlightFirstItem())
}), c.on("unselect", function() {
c.isOpen() && (e.setClasses(), e.highlightFirstItem())
}), c.on("open", function() {
e.$results.attr("aria-expanded", "true"), e.$results.attr("aria-hidden", "false"), e.setClasses(), e.ensureHighlightVisible()
}), c.on("close", function() {
e.$results.attr("aria-expanded", "false"), e.$results.attr("aria-hidden", "true"), e.$results.removeAttr("aria-activedescendant")
}), c.on("results:toggle", function() {
var a = e.getHighlightedResults();
0 !== a.length && a.trigger("mouseup")
}), c.on("results:select", function() {
var a = e.getHighlightedResults();
if (0 !== a.length) {
var c = b.GetData(a[0], "data");
"true" == a.attr("aria-selected") ? e.trigger("close", {}) : e.trigger("select", {
data: c
})
}
}), c.on("results:previous", function() {
var a = e.getHighlightedResults(),
b = e.$results.find("[aria-selected]"),
c = b.index(a);
if (!(c <= 0)) {
var d = c - 1;
0 === a.length && (d = 0);
var f = b.eq(d);
f.trigger("mouseenter");
var g = e.$results.offset().top,
h = f.offset().top,
i = e.$results.scrollTop() + (h - g);
0 === d ? e.$results.scrollTop(0) : h - g < 0 && e.$results.scrollTop(i)
}
}), c.on("results:next", function() {
var a = e.getHighlightedResults(),
b = e.$results.find("[aria-selected]"),
c = b.index(a),
d = c + 1;
if (!(d >= b.length)) {
var f = b.eq(d);
f.trigger("mouseenter");
var g = e.$results.offset().top + e.$results.outerHeight(!1),
h = f.offset().top + f.outerHeight(!1),
i = e.$results.scrollTop() + h - g;
0 === d ? e.$results.scrollTop(0) : h > g && e.$results.scrollTop(i)
}
}), c.on("results:focus", function(a) {
a.element.addClass("select2-results__option--highlighted")
}), c.on("results:message", function(a) {
e.displayMessage(a)
}), a.fn.mousewheel && this.$results.on("mousewheel", function(a) {
var b = e.$results.scrollTop(),
c = e.$results.get(0).scrollHeight - b + a.deltaY,
d = a.deltaY > 0 && b - a.deltaY <= 0,
f = a.deltaY < 0 && c <= e.$results.height();
d ? (e.$results.scrollTop(0), a.preventDefault(), a.stopPropagation()) : f && (e.$results.scrollTop(e.$results.get(0).scrollHeight - e.$results.height()), a.preventDefault(), a.stopPropagation())
}), this.$results.on("mouseup", ".select2-results__option[aria-selected]", function(c) {
var d = a(this),
f = b.GetData(this, "data");
if ("true" === d.attr("aria-selected")) return void(e.options.get("multiple") ? e.trigger("unselect", {
originalEvent: c,
data: f
}) : e.trigger("close", {}));
e.trigger("select", {
originalEvent: c,
data: f
})
}), this.$results.on("mouseenter", ".select2-results__option[aria-selected]", function(c) {
var d = b.GetData(this, "data");
e.getHighlightedResults().removeClass("select2-results__option--highlighted"), e.trigger("results:focus", {
data: d,
element: a(this)
})
})
}, c.prototype.getHighlightedResults = function() {
return this.$results.find(".select2-results__option--highlighted")
}, c.prototype.destroy = function() {
this.$results.remove()
}, c.prototype.ensureHighlightVisible = function() {
var a = this.getHighlightedResults();
if (0 !== a.length) {
var b = this.$results.find("[aria-selected]"),
c = b.index(a),
d = this.$results.offset().top,
e = a.offset().top,
f = this.$results.scrollTop() + (e - d),
g = e - d;
f -= 2 * a.outerHeight(!1), c <= 2 ? this.$results.scrollTop(0) : (g > this.$results.outerHeight() || g < 0) && this.$results.scrollTop(f)
}
}, c.prototype.template = function(b, c) {
var d = this.options.get("templateResult"),
e = this.options.get("escapeMarkup"),
f = d(b, c);
null == f ? c.style.display = "none" : "string" == typeof f ? c.innerHTML = e(f) : a(c).append(f)
}, c
}), b.define("select2/keys", [], function() {
return {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
ESC: 27,
SPACE: 32,
PAGE_UP: 33,
PAGE_DOWN: 34,
END: 35,
HOME: 36,
LEFT: 37,
UP: 38,
RIGHT: 39,
DOWN: 40,
DELETE: 46
}
}), b.define("select2/selection/base", ["jquery", "../utils", "../keys"], function(a, b, c) {
function d(a, b) {
this.$element = a, this.options = b, d.__super__.constructor.call(this)
}
return b.Extend(d, b.Observable), d.prototype.render = function() {
var c = a('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');
return this._tabindex = 0, null != b.GetData(this.$element[0], "old-tabindex") ? this._tabindex = b.GetData(this.$element[0], "old-tabindex") : null != this.$element.attr("tabindex") && (this._tabindex = this.$element.attr("tabindex")), c.attr("title", this.$element.attr("title")), c.attr("tabindex", this._tabindex), this.$selection = c, c
}, d.prototype.bind = function(a, b) {
var d = this,
e = (a.id, a.id + "-results");
this.container = a, this.$selection.on("focus", function(a) {
d.trigger("focus", a)
}), this.$selection.on("blur", function(a) {
d._handleBlur(a)
}), this.$selection.on("keydown", function(a) {
d.trigger("keypress", a), a.which === c.SPACE && a.preventDefault()
}), a.on("results:focus", function(a) {
d.$selection.attr("aria-activedescendant", a.data._resultId)
}), a.on("selection:update", function(a) {
d.update(a.data)
}), a.on("open", function() {
d.$selection.attr("aria-expanded", "true"), d.$selection.attr("aria-owns", e), d._attachCloseHandler(a)
}), a.on("close", function() {
d.$selection.attr("aria-expanded", "false"), d.$selection.removeAttr("aria-activedescendant"), d.$selection.removeAttr("aria-owns"), d.$selection.focus(), window.setTimeout(function() {
d.$selection.focus()
}, 0), d._detachCloseHandler(a)
}), a.on("enable", function() {
d.$selection.attr("tabindex", d._tabindex)
}), a.on("disable", function() {
d.$selection.attr("tabindex", "-1")
})
}, d.prototype._handleBlur = function(b) {
var c = this;
window.setTimeout(function() {
document.activeElement == c.$selection[0] || a.contains(c.$selection[0], document.activeElement) || c.trigger("blur", b)
}, 1)
}, d.prototype._attachCloseHandler = function(c) {
a(document.body).on("mousedown.select2." + c.id, function(c) {
var d = a(c.target),
e = d.closest(".select2");
a(".select2.select2-container--open").each(function() {
a(this), this != e[0] && b.GetData(this, "element").select2("close")
})
})
}, d.prototype._detachCloseHandler = function(b) {
a(document.body).off("mousedown.select2." + b.id)
}, d.prototype.position = function(a, b) {
b.find(".selection").append(a)
}, d.prototype.destroy = function() {
this._detachCloseHandler(this.container)
}, d.prototype.update = function(a) {
throw new Error("The `update` method must be defined in child classes.")
}, d
}), b.define("select2/selection/single", ["jquery", "./base", "../utils", "../keys"], function(a, b, c, d) {
function e() {
e.__super__.constructor.apply(this, arguments)
}
return c.Extend(e, b), e.prototype.render = function() {
var a = e.__super__.render.call(this);
return a.addClass("select2-selection--single"), a.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'), a
}, e.prototype.bind = function(a, b) {
var c = this;
e.__super__.bind.apply(this, arguments);
var d = a.id + "-container";
this.$selection.find(".select2-selection__rendered").attr("id", d).attr("role", "textbox").attr("aria-readonly", "true"), this.$selection.attr("aria-labelledby", d), this.$selection.on("mousedown", function(a) {
1 === a.which && c.trigger("toggle", {
originalEvent: a
})
}), this.$selection.on("focus", function(a) {}), this.$selection.on("blur", function(a) {}), a.on("focus", function(b) {
a.isOpen() || c.$selection.focus()
})
}, e.prototype.clear = function() {
var a = this.$selection.find(".select2-selection__rendered");
a.empty(), a.removeAttr("title")
}, e.prototype.display = function(a, b) {
var c = this.options.get("templateSelection");
return this.options.get("escapeMarkup")(c(a, b))
}, e.prototype.selectionContainer = function() {
return a("<span></span>")
}, e.prototype.update = function(a) {
if (0 === a.length) return void this.clear();
var b = a[0],
c = this.$selection.find(".select2-selection__rendered"),
d = this.display(b, c);
c.empty().append(d), c.attr("title", b.title || b.text)
}, e
}), b.define("select2/selection/multiple", ["jquery", "./base", "../utils"], function(a, b, c) {
function d(a, b) {
d.__super__.constructor.apply(this, arguments)
}
return c.Extend(d, b), d.prototype.render = function() {
var a = d.__super__.render.call(this);
return a.addClass("select2-selection--multiple"), a.html('<ul class="select2-selection__rendered"></ul>'), a
}, d.prototype.bind = function(b, e) {
var f = this;
d.__super__.bind.apply(this, arguments), this.$selection.on("click", function(a) {
f.trigger("toggle", {
originalEvent: a
})
}), this.$selection.on("click", ".select2-selection__choice__remove", function(b) {
if (!f.options.get("disabled")) {
var d = a(this),
e = d.parent(),
g = c.GetData(e[0], "data");
f.trigger("unselect", {
originalEvent: b,
data: g
})
}
})
}, d.prototype.clear = function() {
var a = this.$selection.find(".select2-selection__rendered");
a.empty(), a.removeAttr("title")
}, d.prototype.display = function(a, b) {
var c = this.options.get("templateSelection");
return this.options.get("escapeMarkup")(c(a, b))
}, d.prototype.selectionContainer = function() {
return a('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')
}, d.prototype.update = function(a) {
if (this.clear(), 0 !== a.length) {
for (var b = [], d = 0; d < a.length; d++) {
var e = a[d],
f = this.selectionContainer(),
g = this.display(e, f);
f.append(g), f.attr("title", e.title || e.text), c.StoreData(f[0], "data", e), b.push(f)
}
var h = this.$selection.find(".select2-selection__rendered");
c.appendMany(h, b)
}
}, d
}), b.define("select2/selection/placeholder", ["../utils"], function(a) {
function b(a, b, c) {
this.placeholder = this.normalizePlaceholder(c.get("placeholder")), a.call(this, b, c)
}
return b.prototype.normalizePlaceholder = function(a, b) {
return "string" == typeof b && (b = {
id: "",
text: b
}), b
}, b.prototype.createPlaceholder = function(a, b) {
var c = this.selectionContainer();
return c.html(this.display(b)), c.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"), c
}, b.prototype.update = function(a, b) {
var c = 1 == b.length && b[0].id != this.placeholder.id;
if (b.length > 1 || c) return a.call(this, b);
this.clear();
var d = this.createPlaceholder(this.placeholder);
this.$selection.find(".select2-selection__rendered").append(d)
}, b
}), b.define("select2/selection/allowClear", ["jquery", "../keys", "../utils"], function(a, b, c) {
function d() {}
return d.prototype.bind = function(a, b, c) {
var d = this;
a.call(this, b, c), null == this.placeholder && this.options.get("debug") && window.console && console.error && console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."), this.$selection.on("mousedown", ".select2-selection__clear", function(a) {
d._handleClear(a)
}), b.on("keypress", function(a) {
d._handleKeyboardClear(a, b)
})
}, d.prototype._handleClear = function(a, b) {
if (!this.options.get("disabled")) {
var d = this.$selection.find(".select2-selection__clear");
if (0 !== d.length) {
b.stopPropagation();
var e = c.GetData(d[0], "data"),
f = this.$element.val();
this.$element.val(this.placeholder.id);
var g = {
data: e
};
if (this.trigger("clear", g), g.prevented) return void this.$element.val(f);
for (var h = 0; h < e.length; h++)
if (g = {
data: e[h]
}, this.trigger("unselect", g), g.prevented) return void this.$element.val(f);
this.$element.trigger("change"), this.trigger("toggle", {})
}
}
}, d.prototype._handleKeyboardClear = function(a, c, d) {
d.isOpen() || c.which != b.DELETE && c.which != b.BACKSPACE || this._handleClear(c)
}, d.prototype.update = function(b, d) {
if (b.call(this, d), !(this.$selection.find(".select2-selection__placeholder").length > 0 || 0 === d.length)) {
var e = a('<span class="select2-selection__clear">×</span>');
c.StoreData(e[0], "data", d), this.$selection.find(".select2-selection__rendered").prepend(e)
}
}, d
}), b.define("select2/selection/search", ["jquery", "../utils", "../keys"], function(a, b, c) {
function d(a, b, c) {
a.call(this, b, c)
}
return d.prototype.render = function(b) {
var c = a('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');
this.$searchContainer = c, this.$search = c.find("input");
var d = b.call(this);
return this._transferTabIndex(), d
}, d.prototype.bind = function(a, d, e) {
var f = this;
a.call(this, d, e), d.on("open", function() {
f.$search.trigger("focus")
}), d.on("close", function() {
f.$search.val(""), f.$search.removeAttr("aria-activedescendant"), f.$search.trigger("focus")
}), d.on("enable", function() {
f.$search.prop("disabled", !1), f._transferTabIndex()
}), d.on("disable", function() {
f.$search.prop("disabled", !0)
}), d.on("focus", function(a) {
f.$search.trigger("focus")
}), d.on("results:focus", function(a) {
f.$search.attr("aria-activedescendant", a.id)
}), this.$selection.on("focusin", ".select2-search--inline", function(a) {
f.trigger("focus", a)
}), this.$selection.on("focusout", ".select2-search--inline", function(a) {
f._handleBlur(a)
}), this.$selection.on("keydown", ".select2-search--inline", function(a) {
if (a.stopPropagation(), f.trigger("keypress", a), f._keyUpPrevented = a.isDefaultPrevented(), a.which === c.BACKSPACE && "" === f.$search.val()) {
var d = f.$searchContainer.prev(".select2-selection__choice");
if (d.length > 0) {
var e = b.GetData(d[0], "data");
f.searchRemoveChoice(e), a.preventDefault()
}
}
});
var g = document.documentMode,
h = g && g <= 11;
this.$selection.on("input.searchcheck", ".select2-search--inline", function(a) {
if (h) return void f.$selection.off("input.search input.searchcheck");
f.$selection.off("keyup.search")
}), this.$selection.on("keyup.search input.search", ".select2-search--inline", function(a) {
if (h && "input" === a.type) return void f.$selection.off("input.search input.searchcheck");
var b = a.which;
b != c.SHIFT && b != c.CTRL && b != c.ALT && b != c.TAB && f.handleSearch(a)
})
}, d.prototype._transferTabIndex = function(a) {
this.$search.attr("tabindex", this.$selection.attr("tabindex")), this.$selection.attr("tabindex", "-1")
}, d.prototype.createPlaceholder = function(a, b) {
this.$search.attr("placeholder", b.text)
}, d.prototype.update = function(a, b) {
var c = this.$search[0] == document.activeElement;
if (this.$search.attr("placeholder", ""), a.call(this, b), this.$selection.find(".select2-selection__rendered").append(this.$searchContainer), this.resizeSearch(), c) {
this.$element.find("[data-select2-tag]").length ? this.$element.focus() : this.$search.focus()
}
}, d.prototype.handleSearch = function() {
if (this.resizeSearch(), !this._keyUpPrevented) {
var a = this.$search.val();
this.trigger("query", {
term: a
})
}
this._keyUpPrevented = !1
}, d.prototype.searchRemoveChoice = function(a, b) {
this.trigger("unselect", {
data: b
}), this.$search.val(b.text), this.handleSearch()
}, d.prototype.resizeSearch = function() {
this.$search.css("width", "25px");
var a = "";
if ("" !== this.$search.attr("placeholder")) a = this.$selection.find(".select2-selection__rendered").innerWidth();
else {
a = .75 * (this.$search.val().length + 1) + "em"
}
this.$search.css("width", a)
}, d
}), b.define("select2/selection/eventRelay", ["jquery"], function(a) {
function b() {}
return b.prototype.bind = function(b, c, d) {
var e = this,
f = ["open", "opening", "close", "closing", "select", "selecting", "unselect", "unselecting", "clear", "clearing"],
g = ["opening", "closing", "selecting", "unselecting", "clearing"];
b.call(this, c, d), c.on("*", function(b, c) {
if (-1 !== a.inArray(b, f)) {
c = c || {};
var d = a.Event("select2:" + b, {
params: c
});
e.$element.trigger(d), -1 !== a.inArray(b, g) && (c.prevented = d.isDefaultPrevented())
}
})
}, b
}), b.define("select2/translation", ["jquery", "require"], function(a, b) {
function c(a) {
this.dict = a || {}
}
return c.prototype.all = function() {
return this.dict
}, c.prototype.get = function(a) {
return this.dict[a]
}, c.prototype.extend = function(b) {
this.dict = a.extend({}, b.all(), this.dict)
}, c._cache = {}, c.loadPath = function(a) {
if (!(a in c._cache)) {
var d = b(a);
c._cache[a] = d
}
return new c(c._cache[a])
}, c
}), b.define("select2/diacritics", [], function() {
return {
"Ⓐ": "A",
"A": "A",
"À": "A",
"Á": "A",
"Â": "A",
"Ầ": "A",
"Ấ": "A",
"Ẫ": "A",
"Ẩ": "A",
"Ã": "A",
"Ā": "A",
"Ă": "A",
"Ằ": "A",
"Ắ": "A",
"Ẵ": "A",
"Ẳ": "A",
"Ȧ": "A",
"Ǡ": "A",
"Ä": "A",
"Ǟ": "A",
"Ả": "A",
"Å": "A",
"Ǻ": "A",
"Ǎ": "A",
"Ȁ": "A",
"Ȃ": "A",
"Ạ": "A",
"Ậ": "A",
"Ặ": "A",
"Ḁ": "A",
"Ą": "A",
"Ⱥ": "A",
"Ɐ": "A",
"Ꜳ": "AA",
"Æ": "AE",
"Ǽ": "AE",
"Ǣ": "AE",
"Ꜵ": "AO",
"Ꜷ": "AU",
"Ꜹ": "AV",
"Ꜻ": "AV",
"Ꜽ": "AY",
"Ⓑ": "B",
"B": "B",
"Ḃ": "B",
"Ḅ": "B",
"Ḇ": "B",
"Ƀ": "B",
"Ƃ": "B",
"Ɓ": "B",
"Ⓒ": "C",
"C": "C",
"Ć": "C",
"Ĉ": "C",
"Ċ": "C",
"Č": "C",
"Ç": "C",
"Ḉ": "C",
"Ƈ": "C",
"Ȼ": "C",
"Ꜿ": "C",
"Ⓓ": "D",
"D": "D",
"Ḋ": "D",
"Ď": "D",
"Ḍ": "D",
"Ḑ": "D",
"Ḓ": "D",
"Ḏ": "D",
"Đ": "D",
"Ƌ": "D",
"Ɗ": "D",
"Ɖ": "D",
"Ꝺ": "D",
"DZ": "DZ",
"DŽ": "DZ",
"Dz": "Dz",
"Dž": "Dz",
"Ⓔ": "E",
"E": "E",
"È": "E",
"É": "E",
"Ê": "E",
"Ề":