Blog2Social: Social Media Auto Post & Scheduler - Version 6.5.7

Version Description

Usability Optimization

Download this release

Release Info

Developer PR-Gateway
Plugin Icon 128x128 Blog2Social: Social Media Auto Post & Scheduler
Version 6.5.7
Comparing to
See all releases

Code changes from version 6.5.6 to 6.5.7

assets/css/b2s/network.css CHANGED
@@ -843,4 +843,25 @@ ul.b2s-network-item-auth-list li:last-child{
843
 
844
  .b2s-edit-template-preview-title-15 {
845
  font-weight: bold;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
846
  }
843
 
844
  .b2s-edit-template-preview-title-15 {
845
  font-weight: bold;
846
+ }
847
+
848
+ .b2s-edit-template-preview-profile-img-24 {
849
+ width: 30px;
850
+ border: 1px solid gray;
851
+ border-radius: 50%;
852
+ }
853
+
854
+ .b2s-edit-template-preview-inner-border-24 {
855
+ border: 1px solid gray;
856
+ border-radius: 5%;
857
+ }
858
+
859
+ .b2s-edit-template-preview-border-24, .b2s-edit-template-preview-image-border-24 {
860
+ padding: 10px;
861
+ }
862
+
863
+ .b2s-edit-template-preview-link-meta-box-24 {
864
+ margin-left: 16px;
865
+ padding-bottom: 10px;
866
+ border-left: 3px solid lightblue;
867
  }
assets/js/general.js CHANGED
@@ -1,725 +1,2484 @@
1
  /*!
2
- * Bootstrap
3
- * Copyright 2011-2019 Twitter, Inc.
4
  * Licensed under the MIT license
5
  */
6
- if ("undefined" == typeof jQuery)
7
- throw new Error("Bootstrap's JavaScript requires jQuery");
8
- +function (a) {
9
- "use strict";
10
- var b = a.fn.jquery.split(" ")[0].split(".");
11
- if (b[0] < 2 && b[1] < 9 || 1 == b[0] && 9 == b[1] && b[2] < 1 || b[0] > 2)
12
- throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")
13
- }(jQuery), +function (a) {
14
- "use strict";
15
- function b() {
16
- var a = document.createElement("bootstrap"), b = {WebkitTransition: "webkitTransitionEnd", MozTransition: "transitionend", OTransition: "oTransitionEnd otransitionend", transition: "transitionend"};
17
- for (var c in b)
18
- if (void 0 !== a.style[c])
19
- return{end: b[c]};
20
- return!1
21
- }
22
- a.fn.emulateTransitionEnd = function (b) {
23
- var c = !1, d = this;
24
- a(this).one("bsTransitionEnd", function () {
25
- c = !0
26
- });
27
- var e = function () {
28
- c || a(d).trigger(a.support.transition.end)
29
- };
30
- return setTimeout(e, b), this
31
- }, a(function () {
32
- a.support.transition = b(), a.support.transition && (a.event.special.bsTransitionEnd = {bindType: a.support.transition.end, delegateType: a.support.transition.end, handle: function (b) {
33
- return a(b.target).is(this) ? b.handleObj.handler.apply(this, arguments) : void 0
34
- }})
35
- })
36
- }(jQuery), +function (a) {
37
- "use strict";
38
- function b(b) {
39
- return this.each(function () {
40
- var c = a(this), e = c.data("bs.alert");
41
- e || c.data("bs.alert", e = new d(this)), "string" == typeof b && e[b].call(c)
42
- })
43
  }
44
- var c = '[data-dismiss="alert"]', d = function (b) {
45
- a(b).on("click", c, this.close)
46
- };
47
- d.VERSION = "3.3.6", d.TRANSITION_DURATION = 150, d.prototype.close = function (b) {
48
- function c() {
49
- g.detach().trigger("closed.bs.alert").remove()
50
- }
51
- var e = a(this), f = e.attr("data-target");
52
- f || (f = e.attr("href"), f = f && f.replace(/.*(?=#[^\s]*$)/, ""));
53
- var g = a(f);
54
- b && b.preventDefault(), g.length || (g = e.closest(".alert")), g.trigger(b = a.Event("close.bs.alert")), b.isDefaultPrevented() || (g.removeClass("in"), a.support.transition && g.hasClass("fade") ? g.one("bsTransitionEnd", c).emulateTransitionEnd(d.TRANSITION_DURATION) : c())
55
- };
56
- var e = a.fn.alert;
57
- a.fn.alert = b, a.fn.alert.Constructor = d, a.fn.alert.noConflict = function () {
58
- return a.fn.alert = e, this
59
- }, a(document).on("click.bs.alert.data-api", c, d.prototype.close)
60
- }(jQuery), +function (a) {
61
- "use strict";
62
- function b(b) {
63
- return this.each(function () {
64
- var d = a(this), e = d.data("bs.button"), f = "object" == typeof b && b;
65
- e || d.data("bs.button", e = new c(this, f)), "toggle" == b ? e.toggle() : b && e.setState(b)
66
- })
67
  }
68
- var c = function (b, d) {
69
- this.$element = a(b), this.options = a.extend({}, c.DEFAULTS, d), this.isLoading = !1
70
- };
71
- c.VERSION = "3.3.6", c.DEFAULTS = {loadingText: "loading..."}, c.prototype.setState = function (b) {
72
- var c = "disabled", d = this.$element, e = d.is("input") ? "val" : "html", f = d.data();
73
- b += "Text", null == f.resetText && d.data("resetText", d[e]()), setTimeout(a.proxy(function () {
74
- d[e](null == f[b] ? this.options[b] : f[b]), "loadingText" == b ? (this.isLoading = !0, d.addClass(c).attr(c, c)) : this.isLoading && (this.isLoading = !1, d.removeClass(c).removeAttr(c))
75
- }, this), 0)
76
- }, c.prototype.toggle = function () {
77
- var a = !0, b = this.$element.closest('[data-toggle="buttons"]');
78
- if (b.length) {
79
- var c = this.$element.find("input");
80
- "radio" == c.prop("type") ? (c.prop("checked") && (a = !1), b.find(".active").removeClass("active"), this.$element.addClass("active")) : "checkbox" == c.prop("type") && (c.prop("checked") !== this.$element.hasClass("active") && (a = !1), this.$element.toggleClass("active")), c.prop("checked", this.$element.hasClass("active")), a && c.trigger("change")
81
- } else
82
- this.$element.attr("aria-pressed", !this.$element.hasClass("active")), this.$element.toggleClass("active")
83
- };
84
- var d = a.fn.button;
85
- a.fn.button = b, a.fn.button.Constructor = c, a.fn.button.noConflict = function () {
86
- return a.fn.button = d, this
87
- }, a(document).on("click.bs.button.data-api", '[data-toggle^="button"]', function (c) {
88
- var d = a(c.target);
89
- d.hasClass("btn") || (d = d.closest(".btn")), b.call(d, "toggle"), a(c.target).is('input[type="radio"]') || a(c.target).is('input[type="checkbox"]') || c.preventDefault()
90
- }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]', function (b) {
91
- a(b.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(b.type))
92
- })
93
- }(jQuery), +function (a) {
94
- "use strict";
95
- function b(b) {
96
- return this.each(function () {
97
- var d = a(this), e = d.data("bs.carousel"), f = a.extend({}, c.DEFAULTS, d.data(), "object" == typeof b && b), g = "string" == typeof b ? b : f.slide;
98
- e || d.data("bs.carousel", e = new c(this, f)), "number" == typeof b ? e.to(b) : g ? e[g]() : f.interval && e.pause().cycle()
99
- })
100
  }
101
- var c = function (b, c) {
102
- this.$element = a(b), this.$indicators = this.$element.find(".carousel-indicators"), this.options = c, this.paused = null, this.sliding = null, this.interval = null, this.$active = null, this.$items = null, this.options.keyboard && this.$element.on("keydown.bs.carousel", a.proxy(this.keydown, this)), "hover" == this.options.pause && !("ontouchstart"in document.documentElement) && this.$element.on("mouseenter.bs.carousel", a.proxy(this.pause, this)).on("mouseleave.bs.carousel", a.proxy(this.cycle, this))
103
- };
104
- c.VERSION = "3.3.6", c.TRANSITION_DURATION = 600, c.DEFAULTS = {interval: 5e3, pause: "hover", wrap: !0, keyboard: !0}, c.prototype.keydown = function (a) {
105
- if (!/input|textarea/i.test(a.target.tagName)) {
106
- switch (a.which) {
107
- case 37:
108
- this.prev();
109
- break;
110
- case 39:
111
- this.next();
112
- break;
113
- default:
114
- return
115
- }
116
- a.preventDefault()
117
- }
118
- }, c.prototype.cycle = function (b) {
119
- return b || (this.paused = !1), this.interval && clearInterval(this.interval), this.options.interval && !this.paused && (this.interval = setInterval(a.proxy(this.next, this), this.options.interval)), this
120
- }, c.prototype.getItemIndex = function (a) {
121
- return this.$items = a.parent().children(".item"), this.$items.index(a || this.$active)
122
- }, c.prototype.getItemForDirection = function (a, b) {
123
- var c = this.getItemIndex(b), d = "prev" == a && 0 === c || "next" == a && c == this.$items.length - 1;
124
- if (d && !this.options.wrap)
125
- return b;
126
- var e = "prev" == a ? -1 : 1, f = (c + e) % this.$items.length;
127
- return this.$items.eq(f)
128
- }, c.prototype.to = function (a) {
129
- var b = this, c = this.getItemIndex(this.$active = this.$element.find(".item.active"));
130
- return a > this.$items.length - 1 || 0 > a ? void 0 : this.sliding ? this.$element.one("slid.bs.carousel", function () {
131
- b.to(a)
132
- }) : c == a ? this.pause().cycle() : this.slide(a > c ? "next" : "prev", this.$items.eq(a))
133
- }, c.prototype.pause = function (b) {
134
- return b || (this.paused = !0), this.$element.find(".next, .prev").length && a.support.transition && (this.$element.trigger(a.support.transition.end), this.cycle(!0)), this.interval = clearInterval(this.interval), this
135
- }, c.prototype.next = function () {
136
- return this.sliding ? void 0 : this.slide("next")
137
- }, c.prototype.prev = function () {
138
- return this.sliding ? void 0 : this.slide("prev")
139
- }, c.prototype.slide = function (b, d) {
140
- var e = this.$element.find(".item.active"), f = d || this.getItemForDirection(b, e), g = this.interval, h = "next" == b ? "left" : "right", i = this;
141
- if (f.hasClass("active"))
142
- return this.sliding = !1;
143
- var j = f[0], k = a.Event("slide.bs.carousel", {relatedTarget: j, direction: h});
144
- if (this.$element.trigger(k), !k.isDefaultPrevented()) {
145
- if (this.sliding = !0, g && this.pause(), this.$indicators.length) {
146
- this.$indicators.find(".active").removeClass("active");
147
- var l = a(this.$indicators.children()[this.getItemIndex(f)]);
148
- l && l.addClass("active")
149
- }
150
- var m = a.Event("slid.bs.carousel", {relatedTarget: j, direction: h});
151
- return a.support.transition && this.$element.hasClass("slide") ? (f.addClass(b), f[0].offsetWidth, e.addClass(h), f.addClass(h), e.one("bsTransitionEnd", function () {
152
- f.removeClass([b, h].join(" ")).addClass("active"), e.removeClass(["active", h].join(" ")), i.sliding = !1, setTimeout(function () {
153
- i.$element.trigger(m)
154
- }, 0)
155
- }).emulateTransitionEnd(c.TRANSITION_DURATION)) : (e.removeClass("active"), f.addClass("active"), this.sliding = !1, this.$element.trigger(m)), g && this.cycle(), this
156
- }
157
- };
158
- var d = a.fn.carousel;
159
- a.fn.carousel = b, a.fn.carousel.Constructor = c, a.fn.carousel.noConflict = function () {
160
- return a.fn.carousel = d, this
161
- };
162
- var e = function (c) {
163
- var d, e = a(this), f = a(e.attr("data-target") || (d = e.attr("href")) && d.replace(/.*(?=#[^\s]+$)/, ""));
164
- if (f.hasClass("carousel")) {
165
- var g = a.extend({}, f.data(), e.data()), h = e.attr("data-slide-to");
166
- h && (g.interval = !1), b.call(f, g), h && f.data("bs.carousel").to(h), c.preventDefault()
167
- }
168
- };
169
- a(document).on("click.bs.carousel.data-api", "[data-slide]", e).on("click.bs.carousel.data-api", "[data-slide-to]", e), a(window).on("load", function () {
170
- a('[data-ride="carousel"]').each(function () {
171
- var c = a(this);
172
- b.call(c, c.data())
173
- })
174
  })
175
- }(jQuery), +function (a) {
176
- "use strict";
177
- function b(b) {
178
- var c, d = b.attr("data-target") || (c = b.attr("href")) && c.replace(/.*(?=#[^\s]+$)/, "");
179
- return a(d)
180
- }
181
- function c(b) {
182
- return this.each(function () {
183
- var c = a(this), e = c.data("bs.collapse"), f = a.extend({}, d.DEFAULTS, c.data(), "object" == typeof b && b);
184
- !e && f.toggle && /show|hide/.test(b) && (f.toggle = !1), e || c.data("bs.collapse", e = new d(this, f)), "string" == typeof b && e[b]()
185
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  }
187
- var d = function (b, c) {
188
- this.$element = a(b), this.options = a.extend({}, d.DEFAULTS, c), this.$trigger = a('[data-toggle="collapse"][href="#' + b.id + '"],[data-toggle="collapse"][data-target="#' + b.id + '"]'), this.transitioning = null, this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger), this.options.toggle && this.toggle()
189
- };
190
- d.VERSION = "3.3.6", d.TRANSITION_DURATION = 350, d.DEFAULTS = {toggle: !0}, d.prototype.dimension = function () {
191
- var a = this.$element.hasClass("width");
192
- return a ? "width" : "height"
193
- }, d.prototype.show = function () {
194
- if (!this.transitioning && !this.$element.hasClass("in")) {
195
- var b, e = this.$parent && this.$parent.children(".panel").children(".in, .collapsing");
196
- if (!(e && e.length && (b = e.data("bs.collapse"), b && b.transitioning))) {
197
- var f = a.Event("show.bs.collapse");
198
- if (this.$element.trigger(f), !f.isDefaultPrevented()) {
199
- e && e.length && (c.call(e, "hide"), b || e.data("bs.collapse", null));
200
- var g = this.dimension();
201
- this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1;
202
- var h = function () {
203
- this.$element.removeClass("collapsing").addClass("collapse in")[g](""), this.transitioning = 0, this.$element.trigger("shown.bs.collapse")
204
- };
205
- if (!a.support.transition)
206
- return h.call(this);
207
- var i = a.camelCase(["scroll", g].join("-"));
208
- this.$element.one("bsTransitionEnd", a.proxy(h, this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])
209
- }
210
- }
211
- }
212
- }, d.prototype.hide = function () {
213
- if (!this.transitioning && this.$element.hasClass("in")) {
214
- var b = a.Event("hide.bs.collapse");
215
- if (this.$element.trigger(b), !b.isDefaultPrevented()) {
216
- var c = this.dimension();
217
- this.$element[c](this.$element[c]())[0].offsetHeight, this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1), this.$trigger.addClass("collapsed").attr("aria-expanded", !1), this.transitioning = 1;
218
- var e = function () {
219
- this.transitioning = 0, this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
220
- };
221
- return a.support.transition ? void this.$element[c](0).one("bsTransitionEnd", a.proxy(e, this)).emulateTransitionEnd(d.TRANSITION_DURATION) : e.call(this)
222
- }
223
- }
224
- }, d.prototype.toggle = function () {
225
- this[this.$element.hasClass("in") ? "hide" : "show"]()
226
- }, d.prototype.getParent = function () {
227
- return a(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(a.proxy(function (c, d) {
228
- var e = a(d);
229
- this.addAriaAndCollapsedClass(b(e), e)
230
- }, this)).end()
231
- }, d.prototype.addAriaAndCollapsedClass = function (a, b) {
232
- var c = a.hasClass("in");
233
- a.attr("aria-expanded", c), b.toggleClass("collapsed", !c).attr("aria-expanded", c)
234
- };
235
- var e = a.fn.collapse;
236
- a.fn.collapse = c, a.fn.collapse.Constructor = d, a.fn.collapse.noConflict = function () {
237
- return a.fn.collapse = e, this
238
- }, a(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]', function (d) {
239
- var e = a(this);
240
- e.attr("data-target") || d.preventDefault();
241
- var f = b(e), g = f.data("bs.collapse"), h = g ? "toggle" : e.data();
242
- c.call(f, h)
243
  })
244
- }(jQuery), +function (a) {
245
- "use strict";
246
- function b(b) {
247
- var c = b.attr("data-target");
248
- c || (c = b.attr("href"), c = c && /#[A-Za-z]/.test(c) && c.replace(/.*(?=#[^\s]*$)/, ""));
249
- var d = c && a(c);
250
- return d && d.length ? d : b.parent()
251
- }
252
- function c(c) {
253
- c && 3 === c.which || (a(e).remove(), a(f).each(function () {
254
- var d = a(this), e = b(d), f = {relatedTarget: this};
255
- e.hasClass("open") && (c && "click" == c.type && /input|textarea/i.test(c.target.tagName) && a.contains(e[0], c.target) || (e.trigger(c = a.Event("hide.bs.dropdown", f)), c.isDefaultPrevented() || (d.attr("aria-expanded", "false"), e.removeClass("open").trigger(a.Event("hidden.bs.dropdown", f)))))
256
- }))
257
- }
258
- function d(b) {
259
- return this.each(function () {
260
- var c = a(this), d = c.data("bs.dropdown");
261
- d || c.data("bs.dropdown", d = new g(this)), "string" == typeof b && d[b].call(c)
262
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  }
264
- var e = ".dropdown-backdrop", f = '[data-toggle="dropdown"]', g = function (b) {
265
- a(b).on("click.bs.dropdown", this.toggle)
266
- };
267
- g.VERSION = "3.3.6", g.prototype.toggle = function (d) {
268
- var e = a(this);
269
- if (!e.is(".disabled, :disabled")) {
270
- var f = b(e), g = f.hasClass("open");
271
- if (c(), !g) {
272
- "ontouchstart"in document.documentElement && !f.closest(".navbar-nav").length && a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click", c);
273
- var h = {relatedTarget: this};
274
- if (f.trigger(d = a.Event("show.bs.dropdown", h)), d.isDefaultPrevented())
275
- return;
276
- e.trigger("focus").attr("aria-expanded", "true"), f.toggleClass("open").trigger(a.Event("shown.bs.dropdown", h))
277
- }
278
- return!1
279
- }
280
- }, g.prototype.keydown = function (c) {
281
- if (/(38|40|27|32)/.test(c.which) && !/input|textarea/i.test(c.target.tagName)) {
282
- var d = a(this);
283
- if (c.preventDefault(), c.stopPropagation(), !d.is(".disabled, :disabled")) {
284
- var e = b(d), g = e.hasClass("open");
285
- if (!g && 27 != c.which || g && 27 == c.which)
286
- return 27 == c.which && e.find(f).trigger("focus"), d.trigger("click");
287
- var h = " li:not(.disabled):visible a", i = e.find(".dropdown-menu" + h);
288
- if (i.length) {
289
- var j = i.index(c.target);
290
- 38 == c.which && j > 0 && j--, 40 == c.which && j < i.length - 1 && j++, ~j || (j = 0), i.eq(j).trigger("focus")
291
- }
292
- }
293
- }
294
- };
295
- var h = a.fn.dropdown;
296
- a.fn.dropdown = d, a.fn.dropdown.Constructor = g, a.fn.dropdown.noConflict = function () {
297
- return a.fn.dropdown = h, this
298
- }, a(document).on("click.bs.dropdown.data-api", c).on("click.bs.dropdown.data-api", ".dropdown form", function (a) {
299
- a.stopPropagation()
300
- }).on("click.bs.dropdown.data-api", f, g.prototype.toggle).on("keydown.bs.dropdown.data-api", f, g.prototype.keydown).on("keydown.bs.dropdown.data-api", ".dropdown-menu", g.prototype.keydown)
301
- }(jQuery), +function (a) {
302
- "use strict";
303
- function b(b, d) {
304
- return this.each(function () {
305
- var e = a(this), f = e.data("bs.modal"), g = a.extend({}, c.DEFAULTS, e.data(), "object" == typeof b && b);
306
- f || e.data("bs.modal", f = new c(this, g)), "string" == typeof b ? f[b](d) : g.show && f.show(d)
307
- })
 
 
 
 
 
308
  }
309
- var c = function (b, c) {
310
- this.options = c, this.$body = a(document.body), this.$element = a(b), this.$dialog = this.$element.find(".modal-dialog"), this.$backdrop = null, this.isShown = null, this.originalBodyPad = null, this.scrollbarWidth = 0, this.ignoreBackdropClick = !1, this.options.remote && this.$element.find(".modal-content").load(this.options.remote, a.proxy(function () {
311
- this.$element.trigger("loaded.bs.modal")
312
- }, this))
313
- };
314
- c.VERSION = "3.3.6", c.TRANSITION_DURATION = 300, c.BACKDROP_TRANSITION_DURATION = 150, c.DEFAULTS = {backdrop: !0, keyboard: !0, show: !0}, c.prototype.toggle = function (a) {
315
- return this.isShown ? this.hide() : this.show(a)
316
- }, c.prototype.show = function (b) {
317
- var d = this, e = a.Event("show.bs.modal", {relatedTarget: b});
318
- this.$element.trigger(e), this.isShown || e.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', a.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal", function () {
319
- d.$element.one("mouseup.dismiss.bs.modal", function (b) {
320
- a(b.target).is(d.$element) && (d.ignoreBackdropClick = !0)
321
- })
322
- }), this.backdrop(function () {
323
- var e = a.support.transition && d.$element.hasClass("fade");
324
- d.$element.parent().length || d.$element.appendTo(d.$body), d.$element.show().scrollTop(0), d.adjustDialog(), e && d.$element[0].offsetWidth, d.$element.addClass("in"), d.enforceFocus();
325
- var f = a.Event("shown.bs.modal", {relatedTarget: b});
326
- e ? d.$dialog.one("bsTransitionEnd", function () {
327
- d.$element.trigger("focus").trigger(f)
328
- }).emulateTransitionEnd(c.TRANSITION_DURATION) : d.$element.trigger("focus").trigger(f)
329
- }))
330
- }, c.prototype.hide = function (b) {
331
- b && b.preventDefault(), b = a.Event("hide.bs.modal"), this.$element.trigger(b), this.isShown && !b.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), a(document).off("focusin.bs.modal"), this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), a.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", a.proxy(this.hideModal, this)).emulateTransitionEnd(c.TRANSITION_DURATION) : this.hideModal())
332
- }, c.prototype.enforceFocus = function () {
333
- a(document).off("focusin.bs.modal").on("focusin.bs.modal", a.proxy(function (a) {
334
- this.$element[0] === a.target || this.$element.has(a.target).length || this.$element.trigger("focus")
335
- }, this))
336
- }, c.prototype.escape = function () {
337
- this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", a.proxy(function (a) {
338
- 27 == a.which && this.hide()
339
- }, this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
340
- }, c.prototype.resize = function () {
341
- this.isShown ? a(window).on("resize.bs.modal", a.proxy(this.handleUpdate, this)) : a(window).off("resize.bs.modal")
342
- }, c.prototype.hideModal = function () {
343
- var a = this;
344
- this.$element.hide(), this.backdrop(function () {
345
- a.$body.removeClass("modal-open"), a.resetAdjustments(), a.resetScrollbar(), a.$element.trigger("hidden.bs.modal")
346
- })
347
- }, c.prototype.removeBackdrop = function () {
348
- this.$backdrop && this.$backdrop.remove(), this.$backdrop = null
349
- }, c.prototype.backdrop = function (b) {
350
- var d = this, e = this.$element.hasClass("fade") ? "fade" : "";
351
- if (this.isShown && this.options.backdrop) {
352
- var f = a.support.transition && e;
353
- if (this.$backdrop = a(document.createElement("div")).addClass("modal-backdrop " + e).appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", a.proxy(function (a) {
354
- return this.ignoreBackdropClick ? void(this.ignoreBackdropClick = !1) : void(a.target === a.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
355
- }, this)), f && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !b)
356
- return;
357
- f ? this.$backdrop.one("bsTransitionEnd", b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : b()
358
- } else if (!this.isShown && this.$backdrop) {
359
- this.$backdrop.removeClass("in");
360
- var g = function () {
361
- d.removeBackdrop(), b && b()
362
- };
363
- a.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION) : g()
364
- } else
365
- b && b()
366
- }, c.prototype.handleUpdate = function () {
367
- this.adjustDialog()
368
- }, c.prototype.adjustDialog = function () {
369
- var a = this.$element[0].scrollHeight > document.documentElement.clientHeight;
370
- this.$element.css({paddingLeft: !this.bodyIsOverflowing && a ? this.scrollbarWidth : "", paddingRight: this.bodyIsOverflowing && !a ? this.scrollbarWidth : ""})
371
- }, c.prototype.resetAdjustments = function () {
372
- this.$element.css({paddingLeft: "", paddingRight: ""})
373
- }, c.prototype.checkScrollbar = function () {
374
- var a = window.innerWidth;
375
- if (!a) {
376
- var b = document.documentElement.getBoundingClientRect();
377
- a = b.right - Math.abs(b.left)
378
- }
379
- this.bodyIsOverflowing = document.body.clientWidth < a, this.scrollbarWidth = this.measureScrollbar()
380
- }, c.prototype.setScrollbar = function () {
381
- var a = parseInt(this.$body.css("padding-right") || 0, 10);
382
- this.originalBodyPad = document.body.style.paddingRight || "", this.bodyIsOverflowing && this.$body.css("padding-right", a + this.scrollbarWidth)
383
- }, c.prototype.resetScrollbar = function () {
384
- this.$body.css("padding-right", this.originalBodyPad)
385
- }, c.prototype.measureScrollbar = function () {
386
- var a = document.createElement("div");
387
- a.className = "modal-scrollbar-measure", this.$body.append(a);
388
- var b = a.offsetWidth - a.clientWidth;
389
- return this.$body[0].removeChild(a), b
390
- };
391
- var d = a.fn.modal;
392
- a.fn.modal = b, a.fn.modal.Constructor = c, a.fn.modal.noConflict = function () {
393
- return a.fn.modal = d, this
394
- }, a(document).on("click.bs.modal.data-api", '[data-toggle="modal"]', function (c) {
395
- var d = a(this), e = d.attr("href"), f = a(d.attr("data-target") || e && e.replace(/.*(?=#[^\s]+$)/, "")), g = f.data("bs.modal") ? "toggle" : a.extend({remote: !/#/.test(e) && e}, f.data(), d.data());
396
- d.is("a") && c.preventDefault(), f.one("show.bs.modal", function (a) {
397
- a.isDefaultPrevented() || f.one("hidden.bs.modal", function () {
398
- d.is(":visible") && d.trigger("focus")
399
- })
400
- }), b.call(f, g, this)
401
  })
402
- }(jQuery), +function (a) {
403
- "use strict";
404
- function b(b) {
405
- return this.each(function () {
406
- var d = a(this), e = d.data("bs.tooltip"), f = "object" == typeof b && b;
407
- (e || !/destroy|hide/.test(b)) && (e || d.data("bs.tooltip", e = new c(this, f)), "string" == typeof b && e[b]())
408
- })
 
 
 
 
409
  }
410
- var c = function (a, b) {
411
- this.type = null, this.options = null, this.enabled = null, this.timeout = null, this.hoverState = null, this.$element = null, this.inState = null, this.init("tooltip", a, b)
412
- };
413
- c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.DEFAULTS = {animation: !0, placement: "top", selector: !1, template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>', trigger: "hover focus", title: "", delay: 0, html: !1, container: !1, viewport: {selector: "body", padding: 0}}, c.prototype.init = function (b, c, d) {
414
- if (this.enabled = !0, this.type = b, this.$element = a(c), this.options = this.getOptions(d), this.$viewport = this.options.viewport && a(a.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : this.options.viewport.selector || this.options.viewport), this.inState = {click: !1, hover: !1, focus: !1}, this.$element[0]instanceof document.constructor && !this.options.selector)
415
- throw new Error("Wordpress bug: `selector` option must be specified when initializing " + this.type + " on the window.document object!");
416
- for (var e = this.options.trigger.split(" "), f = e.length; f--; ) {
417
- var g = e[f];
418
- if ("click" == g)
419
- this.$element.on("click." + this.type, this.options.selector, a.proxy(this.toggle, this));
420
- else if ("manual" != g) {
421
- var h = "hover" == g ? "mouseenter" : "focusin", i = "hover" == g ? "mouseleave" : "focusout";
422
- this.$element.on(h + "." + this.type, this.options.selector, a.proxy(this.enter, this)), this.$element.on(i + "." + this.type, this.options.selector, a.proxy(this.leave, this))
423
- }
424
- }
425
- this.options.selector ? this._options = a.extend({}, this.options, {trigger: "manual", selector: ""}) : this.fixTitle()
426
- }, c.prototype.getDefaults = function () {
427
- return c.DEFAULTS
428
- }, c.prototype.getOptions = function (b) {
429
- return b = a.extend({}, this.getDefaults(), this.$element.data(), b), b.delay && "number" == typeof b.delay && (b.delay = {show: b.delay, hide: b.delay}), b
430
- }, c.prototype.getDelegateOptions = function () {
431
- var b = {}, c = this.getDefaults();
432
- return this._options && a.each(this._options, function (a, d) {
433
- c[a] != d && (b[a] = d)
434
- }), b
435
- }, c.prototype.enter = function (b) {
436
- var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
437
- return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusin" == b.type ? "focus" : "hover"] = !0), c.tip().hasClass("in") || "in" == c.hoverState ? void(c.hoverState = "in") : (clearTimeout(c.timeout), c.hoverState = "in", c.options.delay && c.options.delay.show ? void(c.timeout = setTimeout(function () {
438
- "in" == c.hoverState && c.show()
439
- }, c.options.delay.show)) : c.show())
440
- }, c.prototype.isInStateTrue = function () {
441
- for (var a in this.inState)
442
- if (this.inState[a])
443
- return!0;
444
- return!1
445
- }, c.prototype.leave = function (b) {
446
- var c = b instanceof this.constructor ? b : a(b.currentTarget).data("bs." + this.type);
447
- return c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c)), b instanceof a.Event && (c.inState["focusout" == b.type ? "focus" : "hover"] = !1), c.isInStateTrue() ? void 0 : (clearTimeout(c.timeout), c.hoverState = "out", c.options.delay && c.options.delay.hide ? void(c.timeout = setTimeout(function () {
448
- "out" == c.hoverState && c.hide()
449
- }, c.options.delay.hide)) : c.hide())
450
- }, c.prototype.show = function () {
451
- var b = a.Event("show.bs." + this.type);
452
- if (this.hasContent() && this.enabled) {
453
- this.$element.trigger(b);
454
- var d = a.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]);
455
- if (b.isDefaultPrevented() || !d)
456
- return;
457
- var e = this, f = this.tip(), g = this.getUID(this.type);
458
- this.setContent(), f.attr("id", g), this.$element.attr("aria-describedby", g), this.options.animation && f.addClass("fade");
459
- var h = "function" == typeof this.options.placement ? this.options.placement.call(this, f[0], this.$element[0]) : this.options.placement, i = /\s?auto?\s?/i, j = i.test(h);
460
- j && (h = h.replace(i, "") || "top"), f.detach().css({top: 0, left: 0, display: "block"}).addClass(h).data("bs." + this.type, this), this.options.container ? f.appendTo(this.options.container) : f.insertAfter(this.$element), this.$element.trigger("inserted.bs." + this.type);
461
- var k = this.getPosition(), l = f[0].offsetWidth, m = f[0].offsetHeight;
462
- if (j) {
463
- var n = h, o = this.getPosition(this.$viewport);
464
- h = "bottom" == h && k.bottom + m > o.bottom ? "top" : "top" == h && k.top - m < o.top ? "bottom" : "right" == h && k.right + l > o.width ? "left" : "left" == h && k.left - l < o.left ? "right" : h, f.removeClass(n).addClass(h)
465
- }
466
- var p = this.getCalculatedOffset(h, k, l, m);
467
- this.applyPlacement(p, h);
468
- var q = function () {
469
- var a = e.hoverState;
470
- e.$element.trigger("shown.bs." + e.type), e.hoverState = null, "out" == a && e.leave(e)
471
- };
472
- a.support.transition && this.$tip.hasClass("fade") ? f.one("bsTransitionEnd", q).emulateTransitionEnd(c.TRANSITION_DURATION) : q()
473
- }
474
- }, c.prototype.applyPlacement = function (b, c) {
475
- var d = this.tip(), e = d[0].offsetWidth, f = d[0].offsetHeight, g = parseInt(d.css("margin-top"), 10), h = parseInt(d.css("margin-left"), 10);
476
- isNaN(g) && (g = 0), isNaN(h) && (h = 0), b.top += g, b.left += h, a.offset.setOffset(d[0], a.extend({using: function (a) {
477
- d.css({top: Math.round(a.top), left: Math.round(a.left)})
478
- }}, b), 0), d.addClass("in");
479
- var i = d[0].offsetWidth, j = d[0].offsetHeight;
480
- "top" == c && j != f && (b.top = b.top + f - j);
481
- var k = this.getViewportAdjustedDelta(c, b, i, j);
482
- k.left ? b.left += k.left : b.top += k.top;
483
- var l = /top|bottom/.test(c), m = l ? 2 * k.left - e + i : 2 * k.top - f + j, n = l ? "offsetWidth" : "offsetHeight";
484
- d.offset(b), this.replaceArrow(m, d[0][n], l)
485
- }, c.prototype.replaceArrow = function (a, b, c) {
486
- this.arrow().css(c ? "left" : "top", 50 * (1 - a / b) + "%").css(c ? "top" : "left", "")
487
- }, c.prototype.setContent = function () {
488
- var a = this.tip(), b = this.getTitle();
489
- a.find(".tooltip-inner")[this.options.html ? "html" : "text"](b), a.removeClass("fade in top bottom left right")
490
- }, c.prototype.hide = function (b) {
491
- function d() {
492
- "in" != e.hoverState && f.detach(), e.$element.removeAttr("aria-describedby").trigger("hidden.bs." + e.type), b && b()
493
- }
494
- var e = this, f = a(this.$tip), g = a.Event("hide.bs." + this.type);
495
- return this.$element.trigger(g), g.isDefaultPrevented() ? void 0 : (f.removeClass("in"), a.support.transition && f.hasClass("fade") ? f.one("bsTransitionEnd", d).emulateTransitionEnd(c.TRANSITION_DURATION) : d(), this.hoverState = null, this)
496
- }, c.prototype.fixTitle = function () {
497
- var a = this.$element;
498
- (a.attr("title") || "string" != typeof a.attr("data-original-title")) && a.attr("data-original-title", a.attr("title") || "").attr("title", "")
499
- }, c.prototype.hasContent = function () {
500
- return this.getTitle()
501
- }, c.prototype.getPosition = function (b) {
502
- b = b || this.$element;
503
- var c = b[0], d = "BODY" == c.tagName, e = c.getBoundingClientRect();
504
- null == e.width && (e = a.extend({}, e, {width: e.right - e.left, height: e.bottom - e.top}));
505
- var f = d ? {top: 0, left: 0} : b.offset(), g = {scroll: d ? document.documentElement.scrollTop || document.body.scrollTop : b.scrollTop()}, h = d ? {width: a(window).width(), height: a(window).height()} : null;
506
- return a.extend({}, e, g, h, f)
507
- }, c.prototype.getCalculatedOffset = function (a, b, c, d) {
508
- return"bottom" == a ? {top: b.top + b.height, left: b.left + b.width / 2 - c / 2} : "top" == a ? {top: b.top - d, left: b.left + b.width / 2 - c / 2} : "left" == a ? {top: b.top + b.height / 2 - d / 2, left: b.left - c} : {top: b.top + b.height / 2 - d / 2, left: b.left + b.width}
509
- }, c.prototype.getViewportAdjustedDelta = function (a, b, c, d) {
510
- var e = {top: 0, left: 0};
511
- if (!this.$viewport)
512
- return e;
513
- var f = this.options.viewport && this.options.viewport.padding || 0, g = this.getPosition(this.$viewport);
514
- if (/right|left/.test(a)) {
515
- var h = b.top - f - g.scroll, i = b.top + f - g.scroll + d;
516
- h < g.top ? e.top = g.top - h : i > g.top + g.height && (e.top = g.top + g.height - i)
517
- } else {
518
- var j = b.left - f, k = b.left + f + c;
519
- j < g.left ? e.left = g.left - j : k > g.right && (e.left = g.left + g.width - k)
520
- }
521
- return e
522
- }, c.prototype.getTitle = function () {
523
- var a, b = this.$element, c = this.options;
524
- return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title)
525
- }, c.prototype.getUID = function (a) {
526
- do
527
- a += ~~(1e6 * Math.random());
528
- while (document.getElementById(a));
529
- return a
530
- }, c.prototype.tip = function () {
531
- if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length))
532
- throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");
533
- return this.$tip
534
- }, c.prototype.arrow = function () {
535
- return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
536
- }, c.prototype.enable = function () {
537
- this.enabled = !0
538
- }, c.prototype.disable = function () {
539
- this.enabled = !1
540
- }, c.prototype.toggleEnabled = function () {
541
- this.enabled = !this.enabled
542
- }, c.prototype.toggle = function (b) {
543
- var c = this;
544
- b && (c = a(b.currentTarget).data("bs." + this.type), c || (c = new this.constructor(b.currentTarget, this.getDelegateOptions()), a(b.currentTarget).data("bs." + this.type, c))), b ? (c.inState.click = !c.inState.click, c.isInStateTrue() ? c.enter(c) : c.leave(c)) : c.tip().hasClass("in") ? c.leave(c) : c.enter(c)
545
- }, c.prototype.destroy = function () {
546
- var a = this;
547
- clearTimeout(this.timeout), this.hide(function () {
548
- a.$element.off("." + a.type).removeData("bs." + a.type), a.$tip && a.$tip.detach(), a.$tip = null, a.$arrow = null, a.$viewport = null
549
- })
550
- };
551
- var d = a.fn.tooltip;
552
- a.fn.tooltip = b, a.fn.tooltip.Constructor = c, a.fn.tooltip.noConflict = function () {
553
- return a.fn.tooltip = d, this
554
- }
555
- }(jQuery), +function (a) {
556
- "use strict";
557
- function b(b) {
558
- return this.each(function () {
559
- var d = a(this), e = d.data("bs.popover"), f = "object" == typeof b && b;
560
- (e || !/destroy|hide/.test(b)) && (e || d.data("bs.popover", e = new c(this, f)), "string" == typeof b && e[b]())
561
  })
 
 
 
 
 
 
562
  }
563
- var c = function (a, b) {
564
- this.init("popover", a, b)
565
- };
566
- if (!a.fn.tooltip)
567
- throw new Error("Popover requires tooltip.js");
568
- c.VERSION = "3.3.6", c.DEFAULTS = a.extend({}, a.fn.tooltip.Constructor.DEFAULTS, {placement: "right", trigger: "click", content: "", template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}), c.prototype = a.extend({}, a.fn.tooltip.Constructor.prototype), c.prototype.constructor = c, c.prototype.getDefaults = function () {
569
- return c.DEFAULTS
570
- }, c.prototype.setContent = function () {
571
- var a = this.tip(), b = this.getTitle(), c = this.getContent();
572
- a.find(".popover-title")[this.options.html ? "html" : "text"](b), a.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof c ? "html" : "append" : "text"](c), a.removeClass("fade top bottom left right in"), a.find(".popover-title").html() || a.find(".popover-title").hide()
573
- }, c.prototype.hasContent = function () {
574
- return this.getTitle() || this.getContent()
575
- }, c.prototype.getContent = function () {
576
- var a = this.$element, b = this.options;
577
- return a.attr("data-content") || ("function" == typeof b.content ? b.content.call(a[0]) : b.content)
578
- }, c.prototype.arrow = function () {
579
- return this.$arrow = this.$arrow || this.tip().find(".arrow")
580
- };
581
- var d = a.fn.popover;
582
- a.fn.popover = b, a.fn.popover.Constructor = c, a.fn.popover.noConflict = function () {
583
- return a.fn.popover = d, this
584
- }
585
- }(jQuery), +function (a) {
586
- "use strict";
587
- function b(c, d) {
588
- this.$body = a(document.body), this.$scrollElement = a(a(c).is(document.body) ? window : c), this.options = a.extend({}, b.DEFAULTS, d), this.selector = (this.options.target || "") + " .nav li > a", this.offsets = [], this.targets = [], this.activeTarget = null, this.scrollHeight = 0, this.$scrollElement.on("scroll.bs.scrollspy", a.proxy(this.process, this)), this.refresh(), this.process()
589
- }
590
- function c(c) {
591
- return this.each(function () {
592
- var d = a(this), e = d.data("bs.scrollspy"), f = "object" == typeof c && c;
593
- e || d.data("bs.scrollspy", e = new b(this, f)), "string" == typeof c && e[c]()
594
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
595
  }
596
- b.VERSION = "3.3.6", b.DEFAULTS = {offset: 10}, b.prototype.getScrollHeight = function () {
597
- return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
598
- }, b.prototype.refresh = function () {
599
- var b = this, c = "offset", d = 0;
600
- this.offsets = [], this.targets = [], this.scrollHeight = this.getScrollHeight(), a.isWindow(this.$scrollElement[0]) || (c = "position", d = this.$scrollElement.scrollTop()), this.$body.find(this.selector).map(function () {
601
- var b = a(this), e = b.data("target") || b.attr("href"), f = /^#./.test(e) && a(e);
602
- return f && f.length && f.is(":visible") && [[f[c]().top + d, e]] || null
603
- }).sort(function (a, b) {
604
- return a[0] - b[0]
605
- }).each(function () {
606
- b.offsets.push(this[0]), b.targets.push(this[1])
607
- })
608
- }, b.prototype.process = function () {
609
- var a, b = this.$scrollElement.scrollTop() + this.options.offset, c = this.getScrollHeight(), d = this.options.offset + c - this.$scrollElement.height(), e = this.offsets, f = this.targets, g = this.activeTarget;
610
- if (this.scrollHeight != c && this.refresh(), b >= d)
611
- return g != (a = f[f.length - 1]) && this.activate(a);
612
- if (g && b < e[0])
613
- return this.activeTarget = null, this.clear();
614
- for (a = e.length; a--; )
615
- g != f[a] && b >= e[a] && (void 0 === e[a + 1] || b < e[a + 1]) && this.activate(f[a])
616
- }, b.prototype.activate = function (b) {
617
- this.activeTarget = b, this.clear();
618
- var c = this.selector + '[data-target="' + b + '"],' + this.selector + '[href="' + b + '"]', d = a(c).parents("li").addClass("active");
619
- d.parent(".dropdown-menu").length && (d = d.closest("li.dropdown").addClass("active")), d.trigger("activate.bs.scrollspy")
620
- }, b.prototype.clear = function () {
621
- a(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
622
- };
623
- var d = a.fn.scrollspy;
624
- a.fn.scrollspy = c, a.fn.scrollspy.Constructor = b, a.fn.scrollspy.noConflict = function () {
625
- return a.fn.scrollspy = d, this
626
- }, a(window).on("load.bs.scrollspy.data-api", function () {
627
- a('[data-spy="scroll"]').each(function () {
628
- var b = a(this);
629
- c.call(b, b.data())
630
- })
631
  })
632
- }(jQuery), +function (a) {
633
- "use strict";
634
- function b(b) {
635
- return this.each(function () {
636
- var d = a(this), e = d.data("bs.tab");
637
- e || d.data("bs.tab", e = new c(this)), "string" == typeof b && e[b]()
638
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
639
  }
640
- var c = function (b) {
641
- this.element = a(b)
642
- };
643
- c.VERSION = "3.3.6", c.TRANSITION_DURATION = 150, c.prototype.show = function () {
644
- var b = this.element, c = b.closest("ul:not(.dropdown-menu)"), d = b.data("target");
645
- if (d || (d = b.attr("href"), d = d && d.replace(/.*(?=#[^\s]*$)/, "")), !b.parent("li").hasClass("active")) {
646
- var e = c.find(".active:last a"), f = a.Event("hide.bs.tab", {relatedTarget: b[0]}), g = a.Event("show.bs.tab", {relatedTarget: e[0]});
647
- if (e.trigger(f), b.trigger(g), !g.isDefaultPrevented() && !f.isDefaultPrevented()) {
648
- var h = a(d);
649
- this.activate(b.closest("li"), c), this.activate(h, h.parent(), function () {
650
- e.trigger({type: "hidden.bs.tab", relatedTarget: b[0]}), b.trigger({type: "shown.bs.tab", relatedTarget: e[0]})
651
- })
652
- }
653
- }
654
- }, c.prototype.activate = function (b, d, e) {
655
- function f() {
656
- g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1), b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0), h ? (b[0].offsetWidth, b.addClass("in")) : b.removeClass("fade"), b.parent(".dropdown-menu").length && b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0), e && e()
657
- }
658
- var g = d.find("> .active"), h = e && a.support.transition && (g.length && g.hasClass("fade") || !!d.find("> .fade").length);
659
- g.length && h ? g.one("bsTransitionEnd", f).emulateTransitionEnd(c.TRANSITION_DURATION) : f(), g.removeClass("in")
660
- };
661
- var d = a.fn.tab;
662
- a.fn.tab = b, a.fn.tab.Constructor = c, a.fn.tab.noConflict = function () {
663
- return a.fn.tab = d, this
664
- };
665
- var e = function (c) {
666
- c.preventDefault(), b.call(a(this), "show")
667
- };
668
- a(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', e).on("click.bs.tab.data-api", '[data-toggle="pill"]', e)
669
- }(jQuery), +function (a) {
670
- "use strict";
671
- function b(b) {
672
- return this.each(function () {
673
- var d = a(this), e = d.data("bs.affix"), f = "object" == typeof b && b;
674
- e || d.data("bs.affix", e = new c(this, f)), "string" == typeof b && e[b]()
675
- })
676
  }
677
- var c = function (b, d) {
678
- this.options = a.extend({}, c.DEFAULTS, d), this.$target = a(this.options.target).on("scroll.bs.affix.data-api", a.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", a.proxy(this.checkPositionWithEventLoop, this)), this.$element = a(b), this.affixed = null, this.unpin = null, this.pinnedOffset = null, this.checkPosition()
679
- };
680
- c.VERSION = "3.3.6", c.RESET = "affix affix-top affix-bottom", c.DEFAULTS = {offset: 0, target: window}, c.prototype.getState = function (a, b, c, d) {
681
- var e = this.$target.scrollTop(), f = this.$element.offset(), g = this.$target.height();
682
- if (null != c && "top" == this.affixed)
683
- return c > e ? "top" : !1;
684
- if ("bottom" == this.affixed)
685
- return null != c ? e + this.unpin <= f.top ? !1 : "bottom" : a - d >= e + g ? !1 : "bottom";
686
- var h = null == this.affixed, i = h ? e : f.top, j = h ? g : b;
687
- return null != c && c >= e ? "top" : null != d && i + j >= a - d ? "bottom" : !1
688
- }, c.prototype.getPinnedOffset = function () {
689
- if (this.pinnedOffset)
690
- return this.pinnedOffset;
691
- this.$element.removeClass(c.RESET).addClass("affix");
692
- var a = this.$target.scrollTop(), b = this.$element.offset();
693
- return this.pinnedOffset = b.top - a
694
- }, c.prototype.checkPositionWithEventLoop = function () {
695
- setTimeout(a.proxy(this.checkPosition, this), 1)
696
- }, c.prototype.checkPosition = function () {
697
- if (this.$element.is(":visible")) {
698
- var b = this.$element.height(), d = this.options.offset, e = d.top, f = d.bottom, g = Math.max(a(document).height(), a(document.body).height());
699
- "object" != typeof d && (f = e = d), "function" == typeof e && (e = d.top(this.$element)), "function" == typeof f && (f = d.bottom(this.$element));
700
- var h = this.getState(g, b, e, f);
701
- if (this.affixed != h) {
702
- null != this.unpin && this.$element.css("top", "");
703
- var i = "affix" + (h ? "-" + h : ""), j = a.Event(i + ".bs.affix");
704
- if (this.$element.trigger(j), j.isDefaultPrevented())
705
- return;
706
- this.affixed = h, this.unpin = "bottom" == h ? this.getPinnedOffset() : null, this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix", "affixed") + ".bs.affix")
707
- }
708
- "bottom" == h && this.$element.offset({top: g - b - f})
709
- }
710
- };
711
- var d = a.fn.affix;
712
- a.fn.affix = b, a.fn.affix.Constructor = c, a.fn.affix.noConflict = function () {
713
- return a.fn.affix = d, this
714
- }, a(window).on("load", function () {
715
- a('[data-spy="affix"]').each(function () {
716
- var c = a(this), d = c.data();
717
- d.offset = d.offset || {}, null != d.offsetBottom && (d.offset.bottom = d.offsetBottom), null != d.offsetTop && (d.offset.top = d.offsetTop), b.call(c, d)
718
- })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
719
  })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
720
  }(jQuery);
721
 
722
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
723
 
 
724
 
 
 
 
725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  /*!
2
+ * Bootstrap v3.4.1
3
+ * Copyright 2011-2021 Twitter, Inc.
4
  * Licensed under the MIT license
5
  */
6
+
7
+ if (typeof jQuery === 'undefined') {
8
+ throw new Error('Bootstrap\'s JavaScript requires jQuery')
9
+ }
10
+
11
+ +function ($) {
12
+ 'use strict';
13
+ var version = $.fn.jquery.split(' ')[0].split('.')
14
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
15
+ throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
16
+ }
17
+ }(jQuery);
18
+
19
+
20
+ +function ($) {
21
+ 'use strict';
22
+
23
+ // CSS TRANSITION SUPPORT (Shoutout: https://modernizr.com/)
24
+ // ============================================================
25
+
26
+ function transitionEnd() {
27
+ var el = document.createElement('bootstrap')
28
+
29
+ var transEndEventNames = {
30
+ WebkitTransition : 'webkitTransitionEnd',
31
+ MozTransition : 'transitionend',
32
+ OTransition : 'oTransitionEnd otransitionend',
33
+ transition : 'transitionend'
 
 
 
 
 
 
 
 
 
34
  }
35
+
36
+ for (var name in transEndEventNames) {
37
+ if (el.style[name] !== undefined) {
38
+ return { end: transEndEventNames[name] }
39
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  }
41
+
42
+ return false // explicit for ie8 ( ._.)
43
+ }
44
+
45
+ // https://blog.alexmaccaw.com/css-transitions
46
+ $.fn.emulateTransitionEnd = function (duration) {
47
+ var called = false
48
+ var $el = this
49
+ $(this).one('bsTransitionEnd', function () { called = true })
50
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
51
+ setTimeout(callback, duration)
52
+ return this
53
+ }
54
+
55
+ $(function () {
56
+ $.support.transition = transitionEnd()
57
+
58
+ if (!$.support.transition) return
59
+
60
+ $.event.special.bsTransitionEnd = {
61
+ bindType: $.support.transition.end,
62
+ delegateType: $.support.transition.end,
63
+ handle: function (e) {
64
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
65
+ }
 
 
 
 
 
 
 
66
  }
67
+ })
68
+
69
+ }(jQuery);
70
+
71
+
72
+ +function ($) {
73
+ 'use strict';
74
+
75
+ // ALERT CLASS DEFINITION
76
+ // ======================
77
+
78
+ var dismiss = '[data-dismiss="alert"]'
79
+ var Alert = function (el) {
80
+ $(el).on('click', dismiss, this.close)
81
+ }
82
+
83
+ Alert.VERSION = '3.4.1'
84
+
85
+ Alert.TRANSITION_DURATION = 150
86
+
87
+ Alert.prototype.close = function (e) {
88
+ var $this = $(this)
89
+ var selector = $this.attr('data-target')
90
+
91
+ if (!selector) {
92
+ selector = $this.attr('href')
93
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
94
+ }
95
+
96
+ selector = selector === '#' ? [] : selector
97
+ var $parent = $(document).find(selector)
98
+
99
+ if (e) e.preventDefault()
100
+
101
+ if (!$parent.length) {
102
+ $parent = $this.closest('.alert')
103
+ }
104
+
105
+ $parent.trigger(e = $.Event('close.bs.alert'))
106
+
107
+ if (e.isDefaultPrevented()) return
108
+
109
+ $parent.removeClass('in')
110
+
111
+ function removeElement() {
112
+ // detach from parent, fire event then clean up data
113
+ $parent.detach().trigger('closed.bs.alert').remove()
114
+ }
115
+
116
+ $.support.transition && $parent.hasClass('fade') ?
117
+ $parent
118
+ .one('bsTransitionEnd', removeElement)
119
+ .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
120
+ removeElement()
121
+ }
122
+
123
+
124
+ // ALERT PLUGIN DEFINITION
125
+ // =======================
126
+
127
+ function Plugin(option) {
128
+ return this.each(function () {
129
+ var $this = $(this)
130
+ var data = $this.data('bs.alert')
131
+
132
+ if (!data) $this.data('bs.alert', (data = new Alert(this)))
133
+ if (typeof option == 'string') data[option].call($this)
 
 
 
 
 
 
134
  })
135
+ }
136
+
137
+ var old = $.fn.alert
138
+
139
+ $.fn.alert = Plugin
140
+ $.fn.alert.Constructor = Alert
141
+
142
+
143
+ // ALERT NO CONFLICT
144
+ // =================
145
+
146
+ $.fn.alert.noConflict = function () {
147
+ $.fn.alert = old
148
+ return this
149
+ }
150
+
151
+
152
+ // ALERT DATA-API
153
+ // ==============
154
+
155
+ $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
156
+
157
+ }(jQuery);
158
+
159
+
160
+ +function ($) {
161
+ 'use strict';
162
+
163
+ // BUTTON PUBLIC CLASS DEFINITION
164
+ // ==============================
165
+
166
+ var Button = function (element, options) {
167
+ this.$element = $(element)
168
+ this.options = $.extend({}, Button.DEFAULTS, options)
169
+ this.isLoading = false
170
+ }
171
+
172
+ Button.VERSION = '3.4.1'
173
+
174
+ Button.DEFAULTS = {
175
+ loadingText: 'loading...'
176
+ }
177
+
178
+ Button.prototype.setState = function (state) {
179
+ var d = 'disabled'
180
+ var $el = this.$element
181
+ var val = $el.is('input') ? 'val' : 'html'
182
+ var data = $el.data()
183
+
184
+ state += 'Text'
185
+
186
+ if (data.resetText == null) $el.data('resetText', $el[val]())
187
+
188
+ // push to event loop to allow forms to submit
189
+ setTimeout($.proxy(function () {
190
+ $el[val](data[state] == null ? this.options[state] : data[state])
191
+
192
+ if (state == 'loadingText') {
193
+ this.isLoading = true
194
+ $el.addClass(d).attr(d, d).prop(d, true)
195
+ } else if (this.isLoading) {
196
+ this.isLoading = false
197
+ $el.removeClass(d).removeAttr(d).prop(d, false)
198
+ }
199
+ }, this), 0)
200
+ }
201
+
202
+ Button.prototype.toggle = function () {
203
+ var changed = true
204
+ var $parent = this.$element.closest('[data-toggle="buttons"]')
205
+
206
+ if ($parent.length) {
207
+ var $input = this.$element.find('input')
208
+ if ($input.prop('type') == 'radio') {
209
+ if ($input.prop('checked')) changed = false
210
+ $parent.find('.active').removeClass('active')
211
+ this.$element.addClass('active')
212
+ } else if ($input.prop('type') == 'checkbox') {
213
+ if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
214
+ this.$element.toggleClass('active')
215
+ }
216
+ $input.prop('checked', this.$element.hasClass('active'))
217
+ if (changed) $input.trigger('change')
218
+ } else {
219
+ this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
220
+ this.$element.toggleClass('active')
221
  }
222
+ }
223
+
224
+
225
+ // BUTTON PLUGIN DEFINITION
226
+ // ========================
227
+
228
+ function Plugin(option) {
229
+ return this.each(function () {
230
+ var $this = $(this)
231
+ var data = $this.data('bs.button')
232
+ var options = typeof option == 'object' && option
233
+
234
+ if (!data) $this.data('bs.button', (data = new Button(this, options)))
235
+
236
+ if (option == 'toggle') data.toggle()
237
+ else if (option) data.setState(option)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
238
  })
239
+ }
240
+
241
+ var old = $.fn.button
242
+
243
+ $.fn.button = Plugin
244
+ $.fn.button.Constructor = Button
245
+
246
+
247
+ // BUTTON NO CONFLICT
248
+ // ==================
249
+
250
+ $.fn.button.noConflict = function () {
251
+ $.fn.button = old
252
+ return this
253
+ }
254
+
255
+
256
+ // BUTTON DATA-API
257
+ // ===============
258
+
259
+ $(document)
260
+ .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
261
+ var $btn = $(e.target).closest('.btn')
262
+ Plugin.call($btn, 'toggle')
263
+ if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
264
+ // Prevent double click on radios, and the double selections (so cancellation) on checkboxes
265
+ e.preventDefault()
266
+ // The target component still receive the focus
267
+ if ($btn.is('input,button')) $btn.trigger('focus')
268
+ else $btn.find('input:visible,button:visible').first().trigger('focus')
269
+ }
270
+ })
271
+ .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
272
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
273
+ })
274
+
275
+ }(jQuery);
276
+
277
+
278
+ +function ($) {
279
+ 'use strict';
280
+
281
+ // CAROUSEL CLASS DEFINITION
282
+ // =========================
283
+
284
+ var Carousel = function (element, options) {
285
+ this.$element = $(element)
286
+ this.$indicators = this.$element.find('.carousel-indicators')
287
+ this.options = options
288
+ this.paused = null
289
+ this.sliding = null
290
+ this.interval = null
291
+ this.$active = null
292
+ this.$items = null
293
+
294
+ this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
295
+
296
+ this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
297
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
298
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
299
+ }
300
+
301
+ Carousel.VERSION = '3.4.1'
302
+
303
+ Carousel.TRANSITION_DURATION = 600
304
+
305
+ Carousel.DEFAULTS = {
306
+ interval: 5000,
307
+ pause: 'hover',
308
+ wrap: true,
309
+ keyboard: true
310
+ }
311
+
312
+ Carousel.prototype.keydown = function (e) {
313
+ if (/input|textarea/i.test(e.target.tagName)) return
314
+ switch (e.which) {
315
+ case 37: this.prev(); break
316
+ case 39: this.next(); break
317
+ default: return
318
  }
319
+
320
+ e.preventDefault()
321
+ }
322
+
323
+ Carousel.prototype.cycle = function (e) {
324
+ e || (this.paused = false)
325
+
326
+ this.interval && clearInterval(this.interval)
327
+
328
+ this.options.interval
329
+ && !this.paused
330
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
331
+
332
+ return this
333
+ }
334
+
335
+ Carousel.prototype.getItemIndex = function (item) {
336
+ this.$items = item.parent().children('.item')
337
+ return this.$items.index(item || this.$active)
338
+ }
339
+
340
+ Carousel.prototype.getItemForDirection = function (direction, active) {
341
+ var activeIndex = this.getItemIndex(active)
342
+ var willWrap = (direction == 'prev' && activeIndex === 0)
343
+ || (direction == 'next' && activeIndex == (this.$items.length - 1))
344
+ if (willWrap && !this.options.wrap) return active
345
+ var delta = direction == 'prev' ? -1 : 1
346
+ var itemIndex = (activeIndex + delta) % this.$items.length
347
+ return this.$items.eq(itemIndex)
348
+ }
349
+
350
+ Carousel.prototype.to = function (pos) {
351
+ var that = this
352
+ var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
353
+
354
+ if (pos > (this.$items.length - 1) || pos < 0) return
355
+
356
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
357
+ if (activeIndex == pos) return this.pause().cycle()
358
+
359
+ return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
360
+ }
361
+
362
+ Carousel.prototype.pause = function (e) {
363
+ e || (this.paused = true)
364
+
365
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
366
+ this.$element.trigger($.support.transition.end)
367
+ this.cycle(true)
368
  }
369
+
370
+ this.interval = clearInterval(this.interval)
371
+
372
+ return this
373
+ }
374
+
375
+ Carousel.prototype.next = function () {
376
+ if (this.sliding) return
377
+ return this.slide('next')
378
+ }
379
+
380
+ Carousel.prototype.prev = function () {
381
+ if (this.sliding) return
382
+ return this.slide('prev')
383
+ }
384
+
385
+ Carousel.prototype.slide = function (type, next) {
386
+ var $active = this.$element.find('.item.active')
387
+ var $next = next || this.getItemForDirection(type, $active)
388
+ var isCycling = this.interval
389
+ var direction = type == 'next' ? 'left' : 'right'
390
+ var that = this
391
+
392
+ if ($next.hasClass('active')) return (this.sliding = false)
393
+
394
+ var relatedTarget = $next[0]
395
+ var slideEvent = $.Event('slide.bs.carousel', {
396
+ relatedTarget: relatedTarget,
397
+ direction: direction
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  })
399
+ this.$element.trigger(slideEvent)
400
+ if (slideEvent.isDefaultPrevented()) return
401
+
402
+ this.sliding = true
403
+
404
+ isCycling && this.pause()
405
+
406
+ if (this.$indicators.length) {
407
+ this.$indicators.find('.active').removeClass('active')
408
+ var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
409
+ $nextIndicator && $nextIndicator.addClass('active')
410
  }
411
+
412
+ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
413
+ if ($.support.transition && this.$element.hasClass('slide')) {
414
+ $next.addClass(type)
415
+ if (typeof $next === 'object' && $next.length) {
416
+ $next[0].offsetWidth // force reflow
417
+ }
418
+ $active.addClass(direction)
419
+ $next.addClass(direction)
420
+ $active
421
+ .one('bsTransitionEnd', function () {
422
+ $next.removeClass([type, direction].join(' ')).addClass('active')
423
+ $active.removeClass(['active', direction].join(' '))
424
+ that.sliding = false
425
+ setTimeout(function () {
426
+ that.$element.trigger(slidEvent)
427
+ }, 0)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  })
429
+ .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
430
+ } else {
431
+ $active.removeClass('active')
432
+ $next.addClass('active')
433
+ this.sliding = false
434
+ this.$element.trigger(slidEvent)
435
  }
436
+
437
+ isCycling && this.cycle()
438
+
439
+ return this
440
+ }
441
+
442
+
443
+ // CAROUSEL PLUGIN DEFINITION
444
+ // ==========================
445
+
446
+ function Plugin(option) {
447
+ return this.each(function () {
448
+ var $this = $(this)
449
+ var data = $this.data('bs.carousel')
450
+ var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
451
+ var action = typeof option == 'string' ? option : options.slide
452
+
453
+ if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
454
+ if (typeof option == 'number') data.to(option)
455
+ else if (action) data[action]()
456
+ else if (options.interval) data.pause().cycle()
457
+ })
458
+ }
459
+
460
+ var old = $.fn.carousel
461
+
462
+ $.fn.carousel = Plugin
463
+ $.fn.carousel.Constructor = Carousel
464
+
465
+
466
+ // CAROUSEL NO CONFLICT
467
+ // ====================
468
+
469
+ $.fn.carousel.noConflict = function () {
470
+ $.fn.carousel = old
471
+ return this
472
+ }
473
+
474
+
475
+ // CAROUSEL DATA-API
476
+ // =================
477
+
478
+ var clickHandler = function (e) {
479
+ var $this = $(this)
480
+ var href = $this.attr('href')
481
+ if (href) {
482
+ href = href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
483
  }
484
+
485
+ var target = $this.attr('data-target') || href
486
+ var $target = $(document).find(target)
487
+
488
+ if (!$target.hasClass('carousel')) return
489
+
490
+ var options = $.extend({}, $target.data(), $this.data())
491
+ var slideIndex = $this.attr('data-slide-to')
492
+ if (slideIndex) options.interval = false
493
+
494
+ Plugin.call($target, options)
495
+
496
+ if (slideIndex) {
497
+ $target.data('bs.carousel').to(slideIndex)
498
+ }
499
+
500
+ e.preventDefault()
501
+ }
502
+
503
+ $(document)
504
+ .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
505
+ .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
506
+
507
+ $(window).on('load', function () {
508
+ $('[data-ride="carousel"]').each(function () {
509
+ var $carousel = $(this)
510
+ Plugin.call($carousel, $carousel.data())
 
 
 
 
 
 
 
 
511
  })
512
+ })
513
+
514
+ }(jQuery);
515
+
516
+
517
+ /* jshint latedef: false */
518
+
519
+ +function ($) {
520
+ 'use strict';
521
+
522
+ // COLLAPSE PUBLIC CLASS DEFINITION
523
+ // ================================
524
+
525
+ var Collapse = function (element, options) {
526
+ this.$element = $(element)
527
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
528
+ this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
529
+ '[data-toggle="collapse"][data-target="#' + element.id + '"]')
530
+ this.transitioning = null
531
+
532
+ if (this.options.parent) {
533
+ this.$parent = this.getParent()
534
+ } else {
535
+ this.addAriaAndCollapsedClass(this.$element, this.$trigger)
536
  }
537
+
538
+ if (this.options.toggle) this.toggle()
539
+ }
540
+
541
+ Collapse.VERSION = '3.4.1'
542
+
543
+ Collapse.TRANSITION_DURATION = 350
544
+
545
+ Collapse.DEFAULTS = {
546
+ toggle: true
547
+ }
548
+
549
+ Collapse.prototype.dimension = function () {
550
+ var hasWidth = this.$element.hasClass('width')
551
+ return hasWidth ? 'width' : 'height'
552
+ }
553
+
554
+ Collapse.prototype.show = function () {
555
+ if (this.transitioning || this.$element.hasClass('in')) return
556
+
557
+ var activesData
558
+ var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
559
+
560
+ if (actives && actives.length) {
561
+ activesData = actives.data('bs.collapse')
562
+ if (activesData && activesData.transitioning) return
 
 
 
 
 
 
 
 
 
 
563
  }
564
+
565
+ var startEvent = $.Event('show.bs.collapse')
566
+ this.$element.trigger(startEvent)
567
+ if (startEvent.isDefaultPrevented()) return
568
+
569
+ if (actives && actives.length) {
570
+ Plugin.call(actives, 'hide')
571
+ activesData || actives.data('bs.collapse', null)
572
+ }
573
+
574
+ var dimension = this.dimension()
575
+
576
+ this.$element
577
+ .removeClass('collapse')
578
+ .addClass('collapsing')[dimension](0)
579
+ .attr('aria-expanded', true)
580
+
581
+ this.$trigger
582
+ .removeClass('collapsed')
583
+ .attr('aria-expanded', true)
584
+
585
+ this.transitioning = 1
586
+
587
+ var complete = function () {
588
+ this.$element
589
+ .removeClass('collapsing')
590
+ .addClass('collapse in')[dimension]('')
591
+ this.transitioning = 0
592
+ this.$element
593
+ .trigger('shown.bs.collapse')
594
+ }
595
+
596
+ if (!$.support.transition) return complete.call(this)
597
+
598
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
599
+
600
+ this.$element
601
+ .one('bsTransitionEnd', $.proxy(complete, this))
602
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
603
+ }
604
+
605
+ Collapse.prototype.hide = function () {
606
+ if (this.transitioning || !this.$element.hasClass('in')) return
607
+
608
+ var startEvent = $.Event('hide.bs.collapse')
609
+ this.$element.trigger(startEvent)
610
+ if (startEvent.isDefaultPrevented()) return
611
+
612
+ var dimension = this.dimension()
613
+
614
+ this.$element[dimension](this.$element[dimension]())[0].offsetHeight
615
+
616
+ this.$element
617
+ .addClass('collapsing')
618
+ .removeClass('collapse in')
619
+ .attr('aria-expanded', false)
620
+
621
+ this.$trigger
622
+ .addClass('collapsed')
623
+ .attr('aria-expanded', false)
624
+
625
+ this.transitioning = 1
626
+
627
+ var complete = function () {
628
+ this.transitioning = 0
629
+ this.$element
630
+ .removeClass('collapsing')
631
+ .addClass('collapse')
632
+ .trigger('hidden.bs.collapse')
633
+ }
634
+
635
+ if (!$.support.transition) return complete.call(this)
636
+
637
+ this.$element
638
+ [dimension](0)
639
+ .one('bsTransitionEnd', $.proxy(complete, this))
640
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
641
+ }
642
+
643
+ Collapse.prototype.toggle = function () {
644
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
645
+ }
646
+
647
+ Collapse.prototype.getParent = function () {
648
+ return $(document).find(this.options.parent)
649
+ .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
650
+ .each($.proxy(function (i, element) {
651
+ var $element = $(element)
652
+ this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
653
+ }, this))
654
+ .end()
655
+ }
656
+
657
+ Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
658
+ var isOpen = $element.hasClass('in')
659
+
660
+ $element.attr('aria-expanded', isOpen)
661
+ $trigger
662
+ .toggleClass('collapsed', !isOpen)
663
+ .attr('aria-expanded', isOpen)
664
+ }
665
+
666
+ function getTargetFromTrigger($trigger) {
667
+ var href
668
+ var target = $trigger.attr('data-target')
669
+ || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
670
+
671
+ return $(document).find(target)
672
+ }
673
+
674
+
675
+ // COLLAPSE PLUGIN DEFINITION
676
+ // ==========================
677
+
678
+ function Plugin(option) {
679
+ return this.each(function () {
680
+ var $this = $(this)
681
+ var data = $this.data('bs.collapse')
682
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
683
+
684
+ if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
685
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
686
+ if (typeof option == 'string') data[option]()
687
  })
688
+ }
689
+
690
+ var old = $.fn.collapse
691
+
692
+ $.fn.collapse = Plugin
693
+ $.fn.collapse.Constructor = Collapse
694
+
695
+
696
+ // COLLAPSE NO CONFLICT
697
+ // ====================
698
+
699
+ $.fn.collapse.noConflict = function () {
700
+ $.fn.collapse = old
701
+ return this
702
+ }
703
+
704
+
705
+ // COLLAPSE DATA-API
706
+ // =================
707
+
708
+ $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
709
+ var $this = $(this)
710
+
711
+ if (!$this.attr('data-target')) e.preventDefault()
712
+
713
+ var $target = getTargetFromTrigger($this)
714
+ var data = $target.data('bs.collapse')
715
+ var option = data ? 'toggle' : $this.data()
716
+
717
+ Plugin.call($target, option)
718
+ })
719
+
720
  }(jQuery);
721
 
722
 
723
+ +function ($) {
724
+ 'use strict';
725
+
726
+ // DROPDOWN CLASS DEFINITION
727
+ // =========================
728
+
729
+ var backdrop = '.dropdown-backdrop'
730
+ var toggle = '[data-toggle="dropdown"]'
731
+ var Dropdown = function (element) {
732
+ $(element).on('click.bs.dropdown', this.toggle)
733
+ }
734
+
735
+ Dropdown.VERSION = '3.4.1'
736
+
737
+ function getParent($this) {
738
+ var selector = $this.attr('data-target')
739
+
740
+ if (!selector) {
741
+ selector = $this.attr('href')
742
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
743
+ }
744
+
745
+ var $parent = selector !== '#' ? $(document).find(selector) : null
746
+
747
+ return $parent && $parent.length ? $parent : $this.parent()
748
+ }
749
+
750
+ function clearMenus(e) {
751
+ if (e && e.which === 3) return
752
+ $(backdrop).remove()
753
+ $(toggle).each(function () {
754
+ var $this = $(this)
755
+ var $parent = getParent($this)
756
+ var relatedTarget = { relatedTarget: this }
757
+
758
+ if (!$parent.hasClass('open')) return
759
+
760
+ if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
761
+
762
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
763
+
764
+ if (e.isDefaultPrevented()) return
765
+
766
+ $this.attr('aria-expanded', 'false')
767
+ $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
768
+ })
769
+ }
770
+
771
+ Dropdown.prototype.toggle = function (e) {
772
+ var $this = $(this)
773
+
774
+ if ($this.is('.disabled, :disabled')) return
775
+
776
+ var $parent = getParent($this)
777
+ var isActive = $parent.hasClass('open')
778
+
779
+ clearMenus()
780
+
781
+ if (!isActive) {
782
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
783
+ // if mobile we use a backdrop because click events don't delegate
784
+ $(document.createElement('div'))
785
+ .addClass('dropdown-backdrop')
786
+ .insertAfter($(this))
787
+ .on('click', clearMenus)
788
+ }
789
+
790
+ var relatedTarget = { relatedTarget: this }
791
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
792
 
793
+ if (e.isDefaultPrevented()) return
794
 
795
+ $this
796
+ .trigger('focus')
797
+ .attr('aria-expanded', 'true')
798
 
799
+ $parent
800
+ .toggleClass('open')
801
+ .trigger($.Event('shown.bs.dropdown', relatedTarget))
802
+ }
803
+
804
+ return false
805
+ }
806
+
807
+ Dropdown.prototype.keydown = function (e) {
808
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
809
+
810
+ var $this = $(this)
811
+
812
+ e.preventDefault()
813
+ e.stopPropagation()
814
+
815
+ if ($this.is('.disabled, :disabled')) return
816
+
817
+ var $parent = getParent($this)
818
+ var isActive = $parent.hasClass('open')
819
+
820
+ if (!isActive && e.which != 27 || isActive && e.which == 27) {
821
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
822
+ return $this.trigger('click')
823
+ }
824
+
825
+ var desc = ' li:not(.disabled):visible a'
826
+ var $items = $parent.find('.dropdown-menu' + desc)
827
+
828
+ if (!$items.length) return
829
+
830
+ var index = $items.index(e.target)
831
+
832
+ if (e.which == 38 && index > 0) index-- // up
833
+ if (e.which == 40 && index < $items.length - 1) index++ // down
834
+ if (!~index) index = 0
835
+
836
+ $items.eq(index).trigger('focus')
837
+ }
838
+
839
+
840
+ // DROPDOWN PLUGIN DEFINITION
841
+ // ==========================
842
+
843
+ function Plugin(option) {
844
+ return this.each(function () {
845
+ var $this = $(this)
846
+ var data = $this.data('bs.dropdown')
847
+
848
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
849
+ if (typeof option == 'string') data[option].call($this)
850
+ })
851
+ }
852
+
853
+ var old = $.fn.dropdown
854
+
855
+ $.fn.dropdown = Plugin
856
+ $.fn.dropdown.Constructor = Dropdown
857
+
858
+
859
+ // DROPDOWN NO CONFLICT
860
+ // ====================
861
+
862
+ $.fn.dropdown.noConflict = function () {
863
+ $.fn.dropdown = old
864
+ return this
865
+ }
866
+
867
+
868
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
869
+ // ===================================
870
+
871
+ $(document)
872
+ .on('click.bs.dropdown.data-api', clearMenus)
873
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
874
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
875
+ .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
876
+ .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
877
+
878
+ }(jQuery);
879
+
880
+
881
+ +function ($) {
882
+ 'use strict';
883
+
884
+ // MODAL CLASS DEFINITION
885
+ // ======================
886
+
887
+ var Modal = function (element, options) {
888
+ this.options = options
889
+ this.$body = $(document.body)
890
+ this.$element = $(element)
891
+ this.$dialog = this.$element.find('.modal-dialog')
892
+ this.$backdrop = null
893
+ this.isShown = null
894
+ this.originalBodyPad = null
895
+ this.scrollbarWidth = 0
896
+ this.ignoreBackdropClick = false
897
+ this.fixedContent = '.navbar-fixed-top, .navbar-fixed-bottom'
898
+
899
+ if (this.options.remote) {
900
+ this.$element
901
+ .find('.modal-content')
902
+ .load(this.options.remote, $.proxy(function () {
903
+ this.$element.trigger('loaded.bs.modal')
904
+ }, this))
905
+ }
906
+ }
907
+
908
+ Modal.VERSION = '3.4.1'
909
+
910
+ Modal.TRANSITION_DURATION = 300
911
+ Modal.BACKDROP_TRANSITION_DURATION = 150
912
+
913
+ Modal.DEFAULTS = {
914
+ backdrop: true,
915
+ keyboard: true,
916
+ show: true
917
+ }
918
+
919
+ Modal.prototype.toggle = function (_relatedTarget) {
920
+ return this.isShown ? this.hide() : this.show(_relatedTarget)
921
+ }
922
+
923
+ Modal.prototype.show = function (_relatedTarget) {
924
+ var that = this
925
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
926
+
927
+ this.$element.trigger(e)
928
+
929
+ if (this.isShown || e.isDefaultPrevented()) return
930
+
931
+ this.isShown = true
932
+
933
+ this.checkScrollbar()
934
+ this.setScrollbar()
935
+ this.$body.addClass('modal-open')
936
+
937
+ this.escape()
938
+ this.resize()
939
+
940
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
941
+
942
+ this.$dialog.on('mousedown.dismiss.bs.modal', function () {
943
+ that.$element.one('mouseup.dismiss.bs.modal', function (e) {
944
+ if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
945
+ })
946
+ })
947
+
948
+ this.backdrop(function () {
949
+ var transition = $.support.transition && that.$element.hasClass('fade')
950
+
951
+ if (!that.$element.parent().length) {
952
+ that.$element.appendTo(that.$body) // don't move modals dom position
953
+ }
954
+
955
+ that.$element
956
+ .show()
957
+ .scrollTop(0)
958
+
959
+ that.adjustDialog()
960
+
961
+ if (transition) {
962
+ that.$element[0].offsetWidth // force reflow
963
+ }
964
+
965
+ that.$element.addClass('in')
966
+
967
+ that.enforceFocus()
968
+
969
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
970
+
971
+ transition ?
972
+ that.$dialog // wait for modal to slide in
973
+ .one('bsTransitionEnd', function () {
974
+ that.$element.trigger('focus').trigger(e)
975
+ })
976
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
977
+ that.$element.trigger('focus').trigger(e)
978
+ })
979
+ }
980
+
981
+ Modal.prototype.hide = function (e) {
982
+ if (e) e.preventDefault()
983
+
984
+ e = $.Event('hide.bs.modal')
985
+
986
+ this.$element.trigger(e)
987
+
988
+ if (!this.isShown || e.isDefaultPrevented()) return
989
+
990
+ this.isShown = false
991
+
992
+ this.escape()
993
+ this.resize()
994
+
995
+ $(document).off('focusin.bs.modal')
996
+
997
+ this.$element
998
+ .removeClass('in')
999
+ .off('click.dismiss.bs.modal')
1000
+ .off('mouseup.dismiss.bs.modal')
1001
+
1002
+ this.$dialog.off('mousedown.dismiss.bs.modal')
1003
+
1004
+ $.support.transition && this.$element.hasClass('fade') ?
1005
+ this.$element
1006
+ .one('bsTransitionEnd', $.proxy(this.hideModal, this))
1007
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
1008
+ this.hideModal()
1009
+ }
1010
+
1011
+ Modal.prototype.enforceFocus = function () {
1012
+ $(document)
1013
+ .off('focusin.bs.modal') // guard against infinite focus loop
1014
+ .on('focusin.bs.modal', $.proxy(function (e) {
1015
+ if (document !== e.target &&
1016
+ this.$element[0] !== e.target &&
1017
+ !this.$element.has(e.target).length) {
1018
+ this.$element.trigger('focus')
1019
+ }
1020
+ }, this))
1021
+ }
1022
+
1023
+ Modal.prototype.escape = function () {
1024
+ if (this.isShown && this.options.keyboard) {
1025
+ this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
1026
+ e.which == 27 && this.hide()
1027
+ }, this))
1028
+ } else if (!this.isShown) {
1029
+ this.$element.off('keydown.dismiss.bs.modal')
1030
+ }
1031
+ }
1032
+
1033
+ Modal.prototype.resize = function () {
1034
+ if (this.isShown) {
1035
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
1036
+ } else {
1037
+ $(window).off('resize.bs.modal')
1038
+ }
1039
+ }
1040
+
1041
+ Modal.prototype.hideModal = function () {
1042
+ var that = this
1043
+ this.$element.hide()
1044
+ this.backdrop(function () {
1045
+ that.$body.removeClass('modal-open')
1046
+ that.resetAdjustments()
1047
+ that.resetScrollbar()
1048
+ that.$element.trigger('hidden.bs.modal')
1049
+ })
1050
+ }
1051
+
1052
+ Modal.prototype.removeBackdrop = function () {
1053
+ this.$backdrop && this.$backdrop.remove()
1054
+ this.$backdrop = null
1055
+ }
1056
+
1057
+ Modal.prototype.backdrop = function (callback) {
1058
+ var that = this
1059
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
1060
+
1061
+ if (this.isShown && this.options.backdrop) {
1062
+ var doAnimate = $.support.transition && animate
1063
+
1064
+ this.$backdrop = $(document.createElement('div'))
1065
+ .addClass('modal-backdrop ' + animate)
1066
+ .appendTo(this.$body)
1067
+
1068
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
1069
+ if (this.ignoreBackdropClick) {
1070
+ this.ignoreBackdropClick = false
1071
+ return
1072
+ }
1073
+ if (e.target !== e.currentTarget) return
1074
+ this.options.backdrop == 'static'
1075
+ ? this.$element[0].focus()
1076
+ : this.hide()
1077
+ }, this))
1078
+
1079
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
1080
+
1081
+ this.$backdrop.addClass('in')
1082
+
1083
+ if (!callback) return
1084
+
1085
+ doAnimate ?
1086
+ this.$backdrop
1087
+ .one('bsTransitionEnd', callback)
1088
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1089
+ callback()
1090
+
1091
+ } else if (!this.isShown && this.$backdrop) {
1092
+ this.$backdrop.removeClass('in')
1093
+
1094
+ var callbackRemove = function () {
1095
+ that.removeBackdrop()
1096
+ callback && callback()
1097
+ }
1098
+ $.support.transition && this.$element.hasClass('fade') ?
1099
+ this.$backdrop
1100
+ .one('bsTransitionEnd', callbackRemove)
1101
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
1102
+ callbackRemove()
1103
+
1104
+ } else if (callback) {
1105
+ callback()
1106
+ }
1107
+ }
1108
+
1109
+ // these following methods are used to handle overflowing modals
1110
+
1111
+ Modal.prototype.handleUpdate = function () {
1112
+ this.adjustDialog()
1113
+ }
1114
+
1115
+ Modal.prototype.adjustDialog = function () {
1116
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
1117
+
1118
+ this.$element.css({
1119
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
1120
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
1121
+ })
1122
+ }
1123
+
1124
+ Modal.prototype.resetAdjustments = function () {
1125
+ this.$element.css({
1126
+ paddingLeft: '',
1127
+ paddingRight: ''
1128
+ })
1129
+ }
1130
+
1131
+ Modal.prototype.checkScrollbar = function () {
1132
+ var fullWindowWidth = window.innerWidth
1133
+ if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
1134
+ var documentElementRect = document.documentElement.getBoundingClientRect()
1135
+ fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
1136
+ }
1137
+ this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
1138
+ this.scrollbarWidth = this.measureScrollbar()
1139
+ }
1140
+
1141
+ Modal.prototype.setScrollbar = function () {
1142
+ var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
1143
+ this.originalBodyPad = document.body.style.paddingRight || ''
1144
+ var scrollbarWidth = this.scrollbarWidth
1145
+ if (this.bodyIsOverflowing) {
1146
+ this.$body.css('padding-right', bodyPad + scrollbarWidth)
1147
+ $(this.fixedContent).each(function (index, element) {
1148
+ var actualPadding = element.style.paddingRight
1149
+ var calculatedPadding = $(element).css('padding-right')
1150
+ $(element)
1151
+ .data('padding-right', actualPadding)
1152
+ .css('padding-right', parseFloat(calculatedPadding) + scrollbarWidth + 'px')
1153
+ })
1154
+ }
1155
+ }
1156
+
1157
+ Modal.prototype.resetScrollbar = function () {
1158
+ this.$body.css('padding-right', this.originalBodyPad)
1159
+ $(this.fixedContent).each(function (index, element) {
1160
+ var padding = $(element).data('padding-right')
1161
+ $(element).removeData('padding-right')
1162
+ element.style.paddingRight = padding ? padding : ''
1163
+ })
1164
+ }
1165
+
1166
+ Modal.prototype.measureScrollbar = function () { // thx walsh
1167
+ var scrollDiv = document.createElement('div')
1168
+ scrollDiv.className = 'modal-scrollbar-measure'
1169
+ this.$body.append(scrollDiv)
1170
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
1171
+ this.$body[0].removeChild(scrollDiv)
1172
+ return scrollbarWidth
1173
+ }
1174
+
1175
+
1176
+ // MODAL PLUGIN DEFINITION
1177
+ // =======================
1178
+
1179
+ function Plugin(option, _relatedTarget) {
1180
+ return this.each(function () {
1181
+ var $this = $(this)
1182
+ var data = $this.data('bs.modal')
1183
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
1184
+
1185
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
1186
+ if (typeof option == 'string') data[option](_relatedTarget)
1187
+ else if (options.show) data.show(_relatedTarget)
1188
+ })
1189
+ }
1190
+
1191
+ var old = $.fn.modal
1192
+
1193
+ $.fn.modal = Plugin
1194
+ $.fn.modal.Constructor = Modal
1195
+
1196
+
1197
+ // MODAL NO CONFLICT
1198
+ // =================
1199
+
1200
+ $.fn.modal.noConflict = function () {
1201
+ $.fn.modal = old
1202
+ return this
1203
+ }
1204
+
1205
+
1206
+ // MODAL DATA-API
1207
+ // ==============
1208
+
1209
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
1210
+ var $this = $(this)
1211
+ var href = $this.attr('href')
1212
+ var target = $this.attr('data-target') ||
1213
+ (href && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
1214
+
1215
+ var $target = $(document).find(target)
1216
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
1217
+
1218
+ if ($this.is('a')) e.preventDefault()
1219
+
1220
+ $target.one('show.bs.modal', function (showEvent) {
1221
+ if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
1222
+ $target.one('hidden.bs.modal', function () {
1223
+ $this.is(':visible') && $this.trigger('focus')
1224
+ })
1225
+ })
1226
+ Plugin.call($target, option, this)
1227
+ })
1228
+
1229
+ }(jQuery);
1230
+
1231
+
1232
+ +function ($) {
1233
+ 'use strict';
1234
+
1235
+ var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']
1236
+
1237
+ var uriAttrs = [
1238
+ 'background',
1239
+ 'cite',
1240
+ 'href',
1241
+ 'itemtype',
1242
+ 'longdesc',
1243
+ 'poster',
1244
+ 'src',
1245
+ 'xlink:href'
1246
+ ]
1247
+
1248
+ var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
1249
+
1250
+ var DefaultWhitelist = {
1251
+ // Global attributes allowed on any supplied element below.
1252
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
1253
+ a: ['target', 'href', 'title', 'rel'],
1254
+ area: [],
1255
+ b: [],
1256
+ br: [],
1257
+ col: [],
1258
+ code: [],
1259
+ div: [],
1260
+ em: [],
1261
+ hr: [],
1262
+ h1: [],
1263
+ h2: [],
1264
+ h3: [],
1265
+ h4: [],
1266
+ h5: [],
1267
+ h6: [],
1268
+ i: [],
1269
+ img: ['src', 'alt', 'title', 'width', 'height'],
1270
+ li: [],
1271
+ ol: [],
1272
+ p: [],
1273
+ pre: [],
1274
+ s: [],
1275
+ small: [],
1276
+ span: [],
1277
+ sub: [],
1278
+ sup: [],
1279
+ strong: [],
1280
+ u: [],
1281
+ ul: []
1282
+ }
1283
+
1284
+
1285
+ var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi
1286
+
1287
+ var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i
1288
+
1289
+ function allowedAttribute(attr, allowedAttributeList) {
1290
+ var attrName = attr.nodeName.toLowerCase()
1291
+
1292
+ if ($.inArray(attrName, allowedAttributeList) !== -1) {
1293
+ if ($.inArray(attrName, uriAttrs) !== -1) {
1294
+ return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN))
1295
+ }
1296
+
1297
+ return true
1298
+ }
1299
+
1300
+ var regExp = $(allowedAttributeList).filter(function (index, value) {
1301
+ return value instanceof RegExp
1302
+ })
1303
+
1304
+ // Check if a regular expression validates the attribute.
1305
+ for (var i = 0, l = regExp.length; i < l; i++) {
1306
+ if (attrName.match(regExp[i])) {
1307
+ return true
1308
+ }
1309
+ }
1310
+
1311
+ return false
1312
+ }
1313
+
1314
+ function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
1315
+ if (unsafeHtml.length === 0) {
1316
+ return unsafeHtml
1317
+ }
1318
+
1319
+ if (sanitizeFn && typeof sanitizeFn === 'function') {
1320
+ return sanitizeFn(unsafeHtml)
1321
+ }
1322
+
1323
+ // IE 8 and below don't support createHTMLDocument
1324
+ if (!document.implementation || !document.implementation.createHTMLDocument) {
1325
+ return unsafeHtml
1326
+ }
1327
+
1328
+ var createdDocument = document.implementation.createHTMLDocument('sanitization')
1329
+ createdDocument.body.innerHTML = unsafeHtml
1330
+
1331
+ var whitelistKeys = $.map(whiteList, function (el, i) { return i })
1332
+ var elements = $(createdDocument.body).find('*')
1333
+
1334
+ for (var i = 0, len = elements.length; i < len; i++) {
1335
+ var el = elements[i]
1336
+ var elName = el.nodeName.toLowerCase()
1337
+
1338
+ if ($.inArray(elName, whitelistKeys) === -1) {
1339
+ el.parentNode.removeChild(el)
1340
+
1341
+ continue
1342
+ }
1343
+
1344
+ var attributeList = $.map(el.attributes, function (el) { return el })
1345
+ var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || [])
1346
+
1347
+ for (var j = 0, len2 = attributeList.length; j < len2; j++) {
1348
+ if (!allowedAttribute(attributeList[j], whitelistedAttributes)) {
1349
+ el.removeAttribute(attributeList[j].nodeName)
1350
+ }
1351
+ }
1352
+ }
1353
+
1354
+ return createdDocument.body.innerHTML
1355
+ }
1356
+
1357
+ // TOOLTIP PUBLIC CLASS DEFINITION
1358
+ // ===============================
1359
+
1360
+ var Tooltip = function (element, options) {
1361
+ this.type = null
1362
+ this.options = null
1363
+ this.enabled = null
1364
+ this.timeout = null
1365
+ this.hoverState = null
1366
+ this.$element = null
1367
+ this.inState = null
1368
+
1369
+ this.init('tooltip', element, options)
1370
+ }
1371
+
1372
+ Tooltip.VERSION = '3.4.1'
1373
+
1374
+ Tooltip.TRANSITION_DURATION = 150
1375
+
1376
+ Tooltip.DEFAULTS = {
1377
+ animation: true,
1378
+ placement: 'top',
1379
+ selector: false,
1380
+ template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1381
+ trigger: 'hover focus',
1382
+ title: '',
1383
+ delay: 0,
1384
+ html: false,
1385
+ container: false,
1386
+ viewport: {
1387
+ selector: 'body',
1388
+ padding: 0
1389
+ },
1390
+ sanitize : true,
1391
+ sanitizeFn : null,
1392
+ whiteList : DefaultWhitelist
1393
+ }
1394
+
1395
+ Tooltip.prototype.init = function (type, element, options) {
1396
+ this.enabled = true
1397
+ this.type = type
1398
+ this.$element = $(element)
1399
+ this.options = this.getOptions(options)
1400
+ this.$viewport = this.options.viewport && $(document).find($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
1401
+ this.inState = { click: false, hover: false, focus: false }
1402
+
1403
+ if (this.$element[0] instanceof document.constructor && !this.options.selector) {
1404
+ throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
1405
+ }
1406
+
1407
+ var triggers = this.options.trigger.split(' ')
1408
+
1409
+ for (var i = triggers.length; i--;) {
1410
+ var trigger = triggers[i]
1411
+
1412
+ if (trigger == 'click') {
1413
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
1414
+ } else if (trigger != 'manual') {
1415
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
1416
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
1417
+
1418
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
1419
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
1420
+ }
1421
+ }
1422
+
1423
+ this.options.selector ?
1424
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
1425
+ this.fixTitle()
1426
+ }
1427
+
1428
+ Tooltip.prototype.getDefaults = function () {
1429
+ return Tooltip.DEFAULTS
1430
+ }
1431
+
1432
+ Tooltip.prototype.getOptions = function (options) {
1433
+ var dataAttributes = this.$element.data()
1434
+
1435
+ for (var dataAttr in dataAttributes) {
1436
+ if (dataAttributes.hasOwnProperty(dataAttr) && $.inArray(dataAttr, DISALLOWED_ATTRIBUTES) !== -1) {
1437
+ delete dataAttributes[dataAttr]
1438
+ }
1439
+ }
1440
+
1441
+ options = $.extend({}, this.getDefaults(), dataAttributes, options)
1442
+
1443
+ if (options.delay && typeof options.delay == 'number') {
1444
+ options.delay = {
1445
+ show: options.delay,
1446
+ hide: options.delay
1447
+ }
1448
+ }
1449
+
1450
+ if (options.sanitize) {
1451
+ options.template = sanitizeHtml(options.template, options.whiteList, options.sanitizeFn)
1452
+ }
1453
+
1454
+ return options
1455
+ }
1456
+
1457
+ Tooltip.prototype.getDelegateOptions = function () {
1458
+ var options = {}
1459
+ var defaults = this.getDefaults()
1460
+
1461
+ this._options && $.each(this._options, function (key, value) {
1462
+ if (defaults[key] != value) options[key] = value
1463
+ })
1464
+
1465
+ return options
1466
+ }
1467
+
1468
+ Tooltip.prototype.enter = function (obj) {
1469
+ var self = obj instanceof this.constructor ?
1470
+ obj : $(obj.currentTarget).data('bs.' + this.type)
1471
+
1472
+ if (!self) {
1473
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1474
+ $(obj.currentTarget).data('bs.' + this.type, self)
1475
+ }
1476
+
1477
+ if (obj instanceof $.Event) {
1478
+ self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
1479
+ }
1480
+
1481
+ if (self.tip().hasClass('in') || self.hoverState == 'in') {
1482
+ self.hoverState = 'in'
1483
+ return
1484
+ }
1485
+
1486
+ clearTimeout(self.timeout)
1487
+
1488
+ self.hoverState = 'in'
1489
+
1490
+ if (!self.options.delay || !self.options.delay.show) return self.show()
1491
+
1492
+ self.timeout = setTimeout(function () {
1493
+ if (self.hoverState == 'in') self.show()
1494
+ }, self.options.delay.show)
1495
+ }
1496
+
1497
+ Tooltip.prototype.isInStateTrue = function () {
1498
+ for (var key in this.inState) {
1499
+ if (this.inState[key]) return true
1500
+ }
1501
+
1502
+ return false
1503
+ }
1504
+
1505
+ Tooltip.prototype.leave = function (obj) {
1506
+ var self = obj instanceof this.constructor ?
1507
+ obj : $(obj.currentTarget).data('bs.' + this.type)
1508
+
1509
+ if (!self) {
1510
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
1511
+ $(obj.currentTarget).data('bs.' + this.type, self)
1512
+ }
1513
+
1514
+ if (obj instanceof $.Event) {
1515
+ self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
1516
+ }
1517
+
1518
+ if (self.isInStateTrue()) return
1519
+
1520
+ clearTimeout(self.timeout)
1521
+
1522
+ self.hoverState = 'out'
1523
+
1524
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
1525
+
1526
+ self.timeout = setTimeout(function () {
1527
+ if (self.hoverState == 'out') self.hide()
1528
+ }, self.options.delay.hide)
1529
+ }
1530
+
1531
+ Tooltip.prototype.show = function () {
1532
+ var e = $.Event('show.bs.' + this.type)
1533
+
1534
+ if (this.hasContent() && this.enabled) {
1535
+ this.$element.trigger(e)
1536
+
1537
+ var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
1538
+ if (e.isDefaultPrevented() || !inDom) return
1539
+ var that = this
1540
+
1541
+ var $tip = this.tip()
1542
+
1543
+ var tipId = this.getUID(this.type)
1544
+
1545
+ this.setContent()
1546
+ $tip.attr('id', tipId)
1547
+ this.$element.attr('aria-describedby', tipId)
1548
+
1549
+ if (this.options.animation) $tip.addClass('fade')
1550
+
1551
+ var placement = typeof this.options.placement == 'function' ?
1552
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
1553
+ this.options.placement
1554
+
1555
+ var autoToken = /\s?auto?\s?/i
1556
+ var autoPlace = autoToken.test(placement)
1557
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
1558
+
1559
+ $tip
1560
+ .detach()
1561
+ .css({ top: 0, left: 0, display: 'block' })
1562
+ .addClass(placement)
1563
+ .data('bs.' + this.type, this)
1564
+
1565
+ this.options.container ? $tip.appendTo($(document).find(this.options.container)) : $tip.insertAfter(this.$element)
1566
+ this.$element.trigger('inserted.bs.' + this.type)
1567
+
1568
+ var pos = this.getPosition()
1569
+ var actualWidth = $tip[0].offsetWidth
1570
+ var actualHeight = $tip[0].offsetHeight
1571
+
1572
+ if (autoPlace) {
1573
+ var orgPlacement = placement
1574
+ var viewportDim = this.getPosition(this.$viewport)
1575
+
1576
+ placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
1577
+ placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
1578
+ placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
1579
+ placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
1580
+ placement
1581
+
1582
+ $tip
1583
+ .removeClass(orgPlacement)
1584
+ .addClass(placement)
1585
+ }
1586
+
1587
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
1588
+
1589
+ this.applyPlacement(calculatedOffset, placement)
1590
+
1591
+ var complete = function () {
1592
+ var prevHoverState = that.hoverState
1593
+ that.$element.trigger('shown.bs.' + that.type)
1594
+ that.hoverState = null
1595
+
1596
+ if (prevHoverState == 'out') that.leave(that)
1597
+ }
1598
+
1599
+ $.support.transition && this.$tip.hasClass('fade') ?
1600
+ $tip
1601
+ .one('bsTransitionEnd', complete)
1602
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1603
+ complete()
1604
+ }
1605
+ }
1606
+
1607
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
1608
+ var $tip = this.tip()
1609
+ var width = $tip[0].offsetWidth
1610
+ var height = $tip[0].offsetHeight
1611
+
1612
+ // manually read margins because getBoundingClientRect includes difference
1613
+ var marginTop = parseInt($tip.css('margin-top'), 10)
1614
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
1615
+
1616
+ // we must check for NaN for ie 8/9
1617
+ if (isNaN(marginTop)) marginTop = 0
1618
+ if (isNaN(marginLeft)) marginLeft = 0
1619
+
1620
+ offset.top += marginTop
1621
+ offset.left += marginLeft
1622
+
1623
+ // $.fn.offset doesn't round pixel values
1624
+ // so we use setOffset directly with our own function B-0
1625
+ $.offset.setOffset($tip[0], $.extend({
1626
+ using: function (props) {
1627
+ $tip.css({
1628
+ top: Math.round(props.top),
1629
+ left: Math.round(props.left)
1630
+ })
1631
+ }
1632
+ }, offset), 0)
1633
+
1634
+ $tip.addClass('in')
1635
+
1636
+ // check to see if placing tip in new offset caused the tip to resize itself
1637
+ var actualWidth = $tip[0].offsetWidth
1638
+ var actualHeight = $tip[0].offsetHeight
1639
+
1640
+ if (placement == 'top' && actualHeight != height) {
1641
+ offset.top = offset.top + height - actualHeight
1642
+ }
1643
+
1644
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
1645
+
1646
+ if (delta.left) offset.left += delta.left
1647
+ else offset.top += delta.top
1648
+
1649
+ var isVertical = /top|bottom/.test(placement)
1650
+ var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
1651
+ var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
1652
+
1653
+ $tip.offset(offset)
1654
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
1655
+ }
1656
+
1657
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
1658
+ this.arrow()
1659
+ .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
1660
+ .css(isVertical ? 'top' : 'left', '')
1661
+ }
1662
+
1663
+ Tooltip.prototype.setContent = function () {
1664
+ var $tip = this.tip()
1665
+ var title = this.getTitle()
1666
+
1667
+ if (this.options.html) {
1668
+ if (this.options.sanitize) {
1669
+ title = sanitizeHtml(title, this.options.whiteList, this.options.sanitizeFn)
1670
+ }
1671
+
1672
+ $tip.find('.tooltip-inner').html(title)
1673
+ } else {
1674
+ $tip.find('.tooltip-inner').text(title)
1675
+ }
1676
+
1677
+ $tip.removeClass('fade in top bottom left right')
1678
+ }
1679
+
1680
+ Tooltip.prototype.hide = function (callback) {
1681
+ var that = this
1682
+ var $tip = $(this.$tip)
1683
+ var e = $.Event('hide.bs.' + this.type)
1684
+
1685
+ function complete() {
1686
+ if (that.hoverState != 'in') $tip.detach()
1687
+ if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
1688
+ that.$element
1689
+ .removeAttr('aria-describedby')
1690
+ .trigger('hidden.bs.' + that.type)
1691
+ }
1692
+ callback && callback()
1693
+ }
1694
+
1695
+ this.$element.trigger(e)
1696
+
1697
+ if (e.isDefaultPrevented()) return
1698
+
1699
+ $tip.removeClass('in')
1700
+
1701
+ $.support.transition && $tip.hasClass('fade') ?
1702
+ $tip
1703
+ .one('bsTransitionEnd', complete)
1704
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
1705
+ complete()
1706
+
1707
+ this.hoverState = null
1708
+
1709
+ return this
1710
+ }
1711
+
1712
+ Tooltip.prototype.fixTitle = function () {
1713
+ var $e = this.$element
1714
+ if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
1715
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
1716
+ }
1717
+ }
1718
+
1719
+ Tooltip.prototype.hasContent = function () {
1720
+ return this.getTitle()
1721
+ }
1722
+
1723
+ Tooltip.prototype.getPosition = function ($element) {
1724
+ $element = $element || this.$element
1725
+
1726
+ var el = $element[0]
1727
+ var isBody = el.tagName == 'BODY'
1728
+
1729
+ var elRect = el.getBoundingClientRect()
1730
+ if (elRect.width == null) {
1731
+ // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
1732
+ elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
1733
+ }
1734
+ var isSvg = window.SVGElement && el instanceof window.SVGElement
1735
+ // Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
1736
+ // See https://github.com/twbs/bootstrap/issues/20280
1737
+ var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
1738
+ var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
1739
+ var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
1740
+
1741
+ return $.extend({}, elRect, scroll, outerDims, elOffset)
1742
+ }
1743
+
1744
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
1745
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1746
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
1747
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
1748
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
1749
+
1750
+ }
1751
+
1752
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
1753
+ var delta = { top: 0, left: 0 }
1754
+ if (!this.$viewport) return delta
1755
+
1756
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
1757
+ var viewportDimensions = this.getPosition(this.$viewport)
1758
+
1759
+ if (/right|left/.test(placement)) {
1760
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
1761
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
1762
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
1763
+ delta.top = viewportDimensions.top - topEdgeOffset
1764
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
1765
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
1766
+ }
1767
+ } else {
1768
+ var leftEdgeOffset = pos.left - viewportPadding
1769
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
1770
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
1771
+ delta.left = viewportDimensions.left - leftEdgeOffset
1772
+ } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
1773
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
1774
+ }
1775
+ }
1776
+
1777
+ return delta
1778
+ }
1779
+
1780
+ Tooltip.prototype.getTitle = function () {
1781
+ var title
1782
+ var $e = this.$element
1783
+ var o = this.options
1784
+
1785
+ title = $e.attr('data-original-title')
1786
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
1787
+
1788
+ return title
1789
+ }
1790
+
1791
+ Tooltip.prototype.getUID = function (prefix) {
1792
+ do prefix += ~~(Math.random() * 1000000)
1793
+ while (document.getElementById(prefix))
1794
+ return prefix
1795
+ }
1796
+
1797
+ Tooltip.prototype.tip = function () {
1798
+ if (!this.$tip) {
1799
+ this.$tip = $(this.options.template)
1800
+ if (this.$tip.length != 1) {
1801
+ throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
1802
+ }
1803
+ }
1804
+ return this.$tip
1805
+ }
1806
+
1807
+ Tooltip.prototype.arrow = function () {
1808
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
1809
+ }
1810
+
1811
+ Tooltip.prototype.enable = function () {
1812
+ this.enabled = true
1813
+ }
1814
+
1815
+ Tooltip.prototype.disable = function () {
1816
+ this.enabled = false
1817
+ }
1818
+
1819
+ Tooltip.prototype.toggleEnabled = function () {
1820
+ this.enabled = !this.enabled
1821
+ }
1822
+
1823
+ Tooltip.prototype.toggle = function (e) {
1824
+ var self = this
1825
+ if (e) {
1826
+ self = $(e.currentTarget).data('bs.' + this.type)
1827
+ if (!self) {
1828
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
1829
+ $(e.currentTarget).data('bs.' + this.type, self)
1830
+ }
1831
+ }
1832
+
1833
+ if (e) {
1834
+ self.inState.click = !self.inState.click
1835
+ if (self.isInStateTrue()) self.enter(self)
1836
+ else self.leave(self)
1837
+ } else {
1838
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
1839
+ }
1840
+ }
1841
+
1842
+ Tooltip.prototype.destroy = function () {
1843
+ var that = this
1844
+ clearTimeout(this.timeout)
1845
+ this.hide(function () {
1846
+ that.$element.off('.' + that.type).removeData('bs.' + that.type)
1847
+ if (that.$tip) {
1848
+ that.$tip.detach()
1849
+ }
1850
+ that.$tip = null
1851
+ that.$arrow = null
1852
+ that.$viewport = null
1853
+ that.$element = null
1854
+ })
1855
+ }
1856
+
1857
+ Tooltip.prototype.sanitizeHtml = function (unsafeHtml) {
1858
+ return sanitizeHtml(unsafeHtml, this.options.whiteList, this.options.sanitizeFn)
1859
+ }
1860
+
1861
+ // TOOLTIP PLUGIN DEFINITION
1862
+ // =========================
1863
+
1864
+ function Plugin(option) {
1865
+ return this.each(function () {
1866
+ var $this = $(this)
1867
+ var data = $this.data('bs.tooltip')
1868
+ var options = typeof option == 'object' && option
1869
+
1870
+ if (!data && /destroy|hide/.test(option)) return
1871
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
1872
+ if (typeof option == 'string') data[option]()
1873
+ })
1874
+ }
1875
+
1876
+ var old = $.fn.tooltip
1877
+
1878
+ $.fn.tooltip = Plugin
1879
+ $.fn.tooltip.Constructor = Tooltip
1880
+
1881
+
1882
+ // TOOLTIP NO CONFLICT
1883
+ // ===================
1884
+
1885
+ $.fn.tooltip.noConflict = function () {
1886
+ $.fn.tooltip = old
1887
+ return this
1888
+ }
1889
+
1890
+ }(jQuery);
1891
+
1892
+ /* ========================================================================
1893
+ * Bootstrap: popover.js v3.4.1
1894
+ * https://getbootstrap.com/docs/3.4/javascript/#popovers
1895
+ * ========================================================================
1896
+ * Copyright 2011-2019 Twitter, Inc.
1897
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
1898
+ * ======================================================================== */
1899
+
1900
+
1901
+ +function ($) {
1902
+ 'use strict';
1903
+
1904
+ // POPOVER PUBLIC CLASS DEFINITION
1905
+ // ===============================
1906
+
1907
+ var Popover = function (element, options) {
1908
+ this.init('popover', element, options)
1909
+ }
1910
+
1911
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
1912
+
1913
+ Popover.VERSION = '3.4.1'
1914
+
1915
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
1916
+ placement: 'right',
1917
+ trigger: 'click',
1918
+ content: '',
1919
+ template: '<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'
1920
+ })
1921
+
1922
+
1923
+ // NOTE: POPOVER EXTENDS tooltip.js
1924
+ // ================================
1925
+
1926
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
1927
+
1928
+ Popover.prototype.constructor = Popover
1929
+
1930
+ Popover.prototype.getDefaults = function () {
1931
+ return Popover.DEFAULTS
1932
+ }
1933
+
1934
+ Popover.prototype.setContent = function () {
1935
+ var $tip = this.tip()
1936
+ var title = this.getTitle()
1937
+ var content = this.getContent()
1938
+
1939
+ if (this.options.html) {
1940
+ var typeContent = typeof content
1941
+
1942
+ if (this.options.sanitize) {
1943
+ title = this.sanitizeHtml(title)
1944
+
1945
+ if (typeContent === 'string') {
1946
+ content = this.sanitizeHtml(content)
1947
+ }
1948
+ }
1949
+
1950
+ $tip.find('.popover-title').html(title)
1951
+ $tip.find('.popover-content').children().detach().end()[
1952
+ typeContent === 'string' ? 'html' : 'append'
1953
+ ](content)
1954
+ } else {
1955
+ $tip.find('.popover-title').text(title)
1956
+ $tip.find('.popover-content').children().detach().end().text(content)
1957
+ }
1958
+
1959
+ $tip.removeClass('fade top bottom left right in')
1960
+
1961
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
1962
+ // this manually by checking the contents.
1963
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
1964
+ }
1965
+
1966
+ Popover.prototype.hasContent = function () {
1967
+ return this.getTitle() || this.getContent()
1968
+ }
1969
+
1970
+ Popover.prototype.getContent = function () {
1971
+ var $e = this.$element
1972
+ var o = this.options
1973
+
1974
+ return $e.attr('data-content')
1975
+ || (typeof o.content == 'function' ?
1976
+ o.content.call($e[0]) :
1977
+ o.content)
1978
+ }
1979
+
1980
+ Popover.prototype.arrow = function () {
1981
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
1982
+ }
1983
+
1984
+
1985
+ // POPOVER PLUGIN DEFINITION
1986
+ // =========================
1987
+
1988
+ function Plugin(option) {
1989
+ return this.each(function () {
1990
+ var $this = $(this)
1991
+ var data = $this.data('bs.popover')
1992
+ var options = typeof option == 'object' && option
1993
+
1994
+ if (!data && /destroy|hide/.test(option)) return
1995
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
1996
+ if (typeof option == 'string') data[option]()
1997
+ })
1998
+ }
1999
+
2000
+ var old = $.fn.popover
2001
+
2002
+ $.fn.popover = Plugin
2003
+ $.fn.popover.Constructor = Popover
2004
+
2005
+
2006
+ // POPOVER NO CONFLICT
2007
+ // ===================
2008
+
2009
+ $.fn.popover.noConflict = function () {
2010
+ $.fn.popover = old
2011
+ return this
2012
+ }
2013
+
2014
+ }(jQuery);
2015
+
2016
+
2017
+ +function ($) {
2018
+ 'use strict';
2019
+
2020
+ // SCROLLSPY CLASS DEFINITION
2021
+ // ==========================
2022
+
2023
+ function ScrollSpy(element, options) {
2024
+ this.$body = $(document.body)
2025
+ this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
2026
+ this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
2027
+ this.selector = (this.options.target || '') + ' .nav li > a'
2028
+ this.offsets = []
2029
+ this.targets = []
2030
+ this.activeTarget = null
2031
+ this.scrollHeight = 0
2032
+
2033
+ this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
2034
+ this.refresh()
2035
+ this.process()
2036
+ }
2037
+
2038
+ ScrollSpy.VERSION = '3.4.1'
2039
+
2040
+ ScrollSpy.DEFAULTS = {
2041
+ offset: 10
2042
+ }
2043
+
2044
+ ScrollSpy.prototype.getScrollHeight = function () {
2045
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
2046
+ }
2047
+
2048
+ ScrollSpy.prototype.refresh = function () {
2049
+ var that = this
2050
+ var offsetMethod = 'offset'
2051
+ var offsetBase = 0
2052
+
2053
+ this.offsets = []
2054
+ this.targets = []
2055
+ this.scrollHeight = this.getScrollHeight()
2056
+
2057
+ if (!$.isWindow(this.$scrollElement[0])) {
2058
+ offsetMethod = 'position'
2059
+ offsetBase = this.$scrollElement.scrollTop()
2060
+ }
2061
+
2062
+ this.$body
2063
+ .find(this.selector)
2064
+ .map(function () {
2065
+ var $el = $(this)
2066
+ var href = $el.data('target') || $el.attr('href')
2067
+ var $href = /^#./.test(href) && $(href)
2068
+
2069
+ return ($href
2070
+ && $href.length
2071
+ && $href.is(':visible')
2072
+ && [[$href[offsetMethod]().top + offsetBase, href]]) || null
2073
+ })
2074
+ .sort(function (a, b) { return a[0] - b[0] })
2075
+ .each(function () {
2076
+ that.offsets.push(this[0])
2077
+ that.targets.push(this[1])
2078
+ })
2079
+ }
2080
+
2081
+ ScrollSpy.prototype.process = function () {
2082
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
2083
+ var scrollHeight = this.getScrollHeight()
2084
+ var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
2085
+ var offsets = this.offsets
2086
+ var targets = this.targets
2087
+ var activeTarget = this.activeTarget
2088
+ var i
2089
+
2090
+ if (this.scrollHeight != scrollHeight) {
2091
+ this.refresh()
2092
+ }
2093
+
2094
+ if (scrollTop >= maxScroll) {
2095
+ return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
2096
+ }
2097
+
2098
+ if (activeTarget && scrollTop < offsets[0]) {
2099
+ this.activeTarget = null
2100
+ return this.clear()
2101
+ }
2102
+
2103
+ for (i = offsets.length; i--;) {
2104
+ activeTarget != targets[i]
2105
+ && scrollTop >= offsets[i]
2106
+ && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
2107
+ && this.activate(targets[i])
2108
+ }
2109
+ }
2110
+
2111
+ ScrollSpy.prototype.activate = function (target) {
2112
+ this.activeTarget = target
2113
+
2114
+ this.clear()
2115
+
2116
+ var selector = this.selector +
2117
+ '[data-target="' + target + '"],' +
2118
+ this.selector + '[href="' + target + '"]'
2119
+
2120
+ var active = $(selector)
2121
+ .parents('li')
2122
+ .addClass('active')
2123
+
2124
+ if (active.parent('.dropdown-menu').length) {
2125
+ active = active
2126
+ .closest('li.dropdown')
2127
+ .addClass('active')
2128
+ }
2129
+
2130
+ active.trigger('activate.bs.scrollspy')
2131
+ }
2132
+
2133
+ ScrollSpy.prototype.clear = function () {
2134
+ $(this.selector)
2135
+ .parentsUntil(this.options.target, '.active')
2136
+ .removeClass('active')
2137
+ }
2138
+
2139
+
2140
+ // SCROLLSPY PLUGIN DEFINITION
2141
+ // ===========================
2142
+
2143
+ function Plugin(option) {
2144
+ return this.each(function () {
2145
+ var $this = $(this)
2146
+ var data = $this.data('bs.scrollspy')
2147
+ var options = typeof option == 'object' && option
2148
+
2149
+ if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
2150
+ if (typeof option == 'string') data[option]()
2151
+ })
2152
+ }
2153
+
2154
+ var old = $.fn.scrollspy
2155
+
2156
+ $.fn.scrollspy = Plugin
2157
+ $.fn.scrollspy.Constructor = ScrollSpy
2158
+
2159
+
2160
+ // SCROLLSPY NO CONFLICT
2161
+ // =====================
2162
+
2163
+ $.fn.scrollspy.noConflict = function () {
2164
+ $.fn.scrollspy = old
2165
+ return this
2166
+ }
2167
+
2168
+
2169
+ // SCROLLSPY DATA-API
2170
+ // ==================
2171
+
2172
+ $(window).on('load.bs.scrollspy.data-api', function () {
2173
+ $('[data-spy="scroll"]').each(function () {
2174
+ var $spy = $(this)
2175
+ Plugin.call($spy, $spy.data())
2176
+ })
2177
+ })
2178
+
2179
+ }(jQuery);
2180
+
2181
+
2182
+ +function ($) {
2183
+ 'use strict';
2184
+
2185
+ // TAB CLASS DEFINITION
2186
+ // ====================
2187
+
2188
+ var Tab = function (element) {
2189
+ // jscs:disable requireDollarBeforejQueryAssignment
2190
+ this.element = $(element)
2191
+ // jscs:enable requireDollarBeforejQueryAssignment
2192
+ }
2193
+
2194
+ Tab.VERSION = '3.4.1'
2195
+
2196
+ Tab.TRANSITION_DURATION = 150
2197
+
2198
+ Tab.prototype.show = function () {
2199
+ var $this = this.element
2200
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
2201
+ var selector = $this.data('target')
2202
+
2203
+ if (!selector) {
2204
+ selector = $this.attr('href')
2205
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
2206
+ }
2207
+
2208
+ if ($this.parent('li').hasClass('active')) return
2209
+
2210
+ var $previous = $ul.find('.active:last a')
2211
+ var hideEvent = $.Event('hide.bs.tab', {
2212
+ relatedTarget: $this[0]
2213
+ })
2214
+ var showEvent = $.Event('show.bs.tab', {
2215
+ relatedTarget: $previous[0]
2216
+ })
2217
+
2218
+ $previous.trigger(hideEvent)
2219
+ $this.trigger(showEvent)
2220
+
2221
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
2222
+
2223
+ var $target = $(document).find(selector)
2224
+
2225
+ this.activate($this.closest('li'), $ul)
2226
+ this.activate($target, $target.parent(), function () {
2227
+ $previous.trigger({
2228
+ type: 'hidden.bs.tab',
2229
+ relatedTarget: $this[0]
2230
+ })
2231
+ $this.trigger({
2232
+ type: 'shown.bs.tab',
2233
+ relatedTarget: $previous[0]
2234
+ })
2235
+ })
2236
+ }
2237
+
2238
+ Tab.prototype.activate = function (element, container, callback) {
2239
+ var $active = container.find('> .active')
2240
+ var transition = callback
2241
+ && $.support.transition
2242
+ && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
2243
+
2244
+ function next() {
2245
+ $active
2246
+ .removeClass('active')
2247
+ .find('> .dropdown-menu > .active')
2248
+ .removeClass('active')
2249
+ .end()
2250
+ .find('[data-toggle="tab"]')
2251
+ .attr('aria-expanded', false)
2252
+
2253
+ element
2254
+ .addClass('active')
2255
+ .find('[data-toggle="tab"]')
2256
+ .attr('aria-expanded', true)
2257
+
2258
+ if (transition) {
2259
+ element[0].offsetWidth // reflow for transition
2260
+ element.addClass('in')
2261
+ } else {
2262
+ element.removeClass('fade')
2263
+ }
2264
+
2265
+ if (element.parent('.dropdown-menu').length) {
2266
+ element
2267
+ .closest('li.dropdown')
2268
+ .addClass('active')
2269
+ .end()
2270
+ .find('[data-toggle="tab"]')
2271
+ .attr('aria-expanded', true)
2272
+ }
2273
+
2274
+ callback && callback()
2275
+ }
2276
+
2277
+ $active.length && transition ?
2278
+ $active
2279
+ .one('bsTransitionEnd', next)
2280
+ .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
2281
+ next()
2282
+
2283
+ $active.removeClass('in')
2284
+ }
2285
+
2286
+
2287
+ // TAB PLUGIN DEFINITION
2288
+ // =====================
2289
+
2290
+ function Plugin(option) {
2291
+ return this.each(function () {
2292
+ var $this = $(this)
2293
+ var data = $this.data('bs.tab')
2294
+
2295
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
2296
+ if (typeof option == 'string') data[option]()
2297
+ })
2298
+ }
2299
+
2300
+ var old = $.fn.tab
2301
+
2302
+ $.fn.tab = Plugin
2303
+ $.fn.tab.Constructor = Tab
2304
+
2305
+
2306
+ // TAB NO CONFLICT
2307
+ // ===============
2308
+
2309
+ $.fn.tab.noConflict = function () {
2310
+ $.fn.tab = old
2311
+ return this
2312
+ }
2313
+
2314
+
2315
+ // TAB DATA-API
2316
+ // ============
2317
+
2318
+ var clickHandler = function (e) {
2319
+ e.preventDefault()
2320
+ Plugin.call($(this), 'show')
2321
+ }
2322
+
2323
+ $(document)
2324
+ .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
2325
+ .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
2326
+
2327
+ }(jQuery);
2328
+
2329
+
2330
+ +function ($) {
2331
+ 'use strict';
2332
+
2333
+ // AFFIX CLASS DEFINITION
2334
+ // ======================
2335
+
2336
+ var Affix = function (element, options) {
2337
+ this.options = $.extend({}, Affix.DEFAULTS, options)
2338
+
2339
+ var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
2340
+
2341
+ this.$target = target
2342
+ .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
2343
+ .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
2344
+
2345
+ this.$element = $(element)
2346
+ this.affixed = null
2347
+ this.unpin = null
2348
+ this.pinnedOffset = null
2349
+
2350
+ this.checkPosition()
2351
+ }
2352
+
2353
+ Affix.VERSION = '3.4.1'
2354
+
2355
+ Affix.RESET = 'affix affix-top affix-bottom'
2356
+
2357
+ Affix.DEFAULTS = {
2358
+ offset: 0,
2359
+ target: window
2360
+ }
2361
+
2362
+ Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
2363
+ var scrollTop = this.$target.scrollTop()
2364
+ var position = this.$element.offset()
2365
+ var targetHeight = this.$target.height()
2366
+
2367
+ if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
2368
+
2369
+ if (this.affixed == 'bottom') {
2370
+ if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
2371
+ return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
2372
+ }
2373
+
2374
+ var initializing = this.affixed == null
2375
+ var colliderTop = initializing ? scrollTop : position.top
2376
+ var colliderHeight = initializing ? targetHeight : height
2377
+
2378
+ if (offsetTop != null && scrollTop <= offsetTop) return 'top'
2379
+ if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
2380
+
2381
+ return false
2382
+ }
2383
+
2384
+ Affix.prototype.getPinnedOffset = function () {
2385
+ if (this.pinnedOffset) return this.pinnedOffset
2386
+ this.$element.removeClass(Affix.RESET).addClass('affix')
2387
+ var scrollTop = this.$target.scrollTop()
2388
+ var position = this.$element.offset()
2389
+ return (this.pinnedOffset = position.top - scrollTop)
2390
+ }
2391
+
2392
+ Affix.prototype.checkPositionWithEventLoop = function () {
2393
+ setTimeout($.proxy(this.checkPosition, this), 1)
2394
+ }
2395
+
2396
+ Affix.prototype.checkPosition = function () {
2397
+ if (!this.$element.is(':visible')) return
2398
+
2399
+ var height = this.$element.height()
2400
+ var offset = this.options.offset
2401
+ var offsetTop = offset.top
2402
+ var offsetBottom = offset.bottom
2403
+ var scrollHeight = Math.max($(document).height(), $(document.body).height())
2404
+
2405
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
2406
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
2407
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
2408
+
2409
+ var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
2410
+
2411
+ if (this.affixed != affix) {
2412
+ if (this.unpin != null) this.$element.css('top', '')
2413
+
2414
+ var affixType = 'affix' + (affix ? '-' + affix : '')
2415
+ var e = $.Event(affixType + '.bs.affix')
2416
+
2417
+ this.$element.trigger(e)
2418
+
2419
+ if (e.isDefaultPrevented()) return
2420
+
2421
+ this.affixed = affix
2422
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
2423
+
2424
+ this.$element
2425
+ .removeClass(Affix.RESET)
2426
+ .addClass(affixType)
2427
+ .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
2428
+ }
2429
+
2430
+ if (affix == 'bottom') {
2431
+ this.$element.offset({
2432
+ top: scrollHeight - height - offsetBottom
2433
+ })
2434
+ }
2435
+ }
2436
+
2437
+
2438
+ // AFFIX PLUGIN DEFINITION
2439
+ // =======================
2440
+
2441
+ function Plugin(option) {
2442
+ return this.each(function () {
2443
+ var $this = $(this)
2444
+ var data = $this.data('bs.affix')
2445
+ var options = typeof option == 'object' && option
2446
+
2447
+ if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
2448
+ if (typeof option == 'string') data[option]()
2449
+ })
2450
+ }
2451
+
2452
+ var old = $.fn.affix
2453
+
2454
+ $.fn.affix = Plugin
2455
+ $.fn.affix.Constructor = Affix
2456
+
2457
+
2458
+ // AFFIX NO CONFLICT
2459
+ // =================
2460
+
2461
+ $.fn.affix.noConflict = function () {
2462
+ $.fn.affix = old
2463
+ return this
2464
+ }
2465
+
2466
+
2467
+ // AFFIX DATA-API
2468
+ // ==============
2469
+
2470
+ $(window).on('load', function () {
2471
+ $('[data-spy="affix"]').each(function () {
2472
+ var $spy = $(this)
2473
+ var data = $spy.data()
2474
+
2475
+ data.offset = data.offset || {}
2476
+
2477
+ if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
2478
+ if (data.offsetTop != null) data.offset.top = data.offsetTop
2479
+
2480
+ Plugin.call($spy, data)
2481
+ })
2482
+ })
2483
+
2484
+ }(jQuery);
blog2social.php CHANGED
@@ -6,12 +6,12 @@
6
  * Author: Blog2Social, Adenion
7
  * Text Domain: blog2social
8
  * Domain Path: /languages
9
- * Version: 6.5.6
10
  * Author URI: https://www.blog2social.com
11
  * License: GPL2+
12
  */
13
 
14
- define('B2S_PLUGIN_VERSION', '656');
15
  define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
16
  define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
17
  define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
6
  * Author: Blog2Social, Adenion
7
  * Text Domain: blog2social
8
  * Domain Path: /languages
9
+ * Version: 6.5.7
10
  * Author URI: https://www.blog2social.com
11
  * License: GPL2+
12
  */
13
 
14
+ define('B2S_PLUGIN_VERSION', '657');
15
  define('B2S_PLUGIN_LANGUAGE', serialize(array('de_DE', 'en_US')));
16
  define('B2S_PLUGIN_DIR', plugin_dir_path(__FILE__));
17
  define('B2S_PLUGIN_URL', plugin_dir_url(__FILE__));
includes/B2S/AutoPost.php CHANGED
@@ -40,18 +40,6 @@ class B2S_AutoPost {
40
 
41
  public function prepareShareData($networkAuthId = 0, $networkId = 0, $networkType = 0, $networkKind = 0) {
42
 
43
- if ($this->userVersion >= 3) {
44
- global $wpdb;
45
- $sqlGetData = $wpdb->prepare("SELECT `data` FROM `{$wpdb->prefix}b2s_posts_network_details` WHERE `network_auth_id` = %d", (int) $networkAuthId);
46
- $dataString = $wpdb->get_var($sqlGetData);
47
- if ($dataString !== NULL && !empty($dataString)) {
48
- $networkAuthData = unserialize($dataString);
49
- if (!empty($this->url) && $networkAuthData != false && is_array($networkAuthData) && isset($networkAuthData['url_parameter'][0]['querys']) && !empty($networkAuthData['url_parameter'][0]['querys'])) {
50
- $this->url = B2S_Util::addUrlParameter($this->url, $networkAuthData['url_parameter'][0]['querys']);
51
- }
52
- }
53
- }
54
-
55
  if ((int) $networkId > 0 && (int) $networkAuthId > 0) {
56
  $postData = array('content' => '', 'custom_title' => '', 'tags' => array(), 'network_auth_id' => (int) $networkAuthId);
57
 
@@ -272,6 +260,18 @@ class B2S_AutoPost {
272
 
273
  public function saveShareData($shareData = array(), $network_id = 0, $network_type = 0, $network_auth_id = 0, $shareApprove = 0, $network_display_name = '') {
274
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  if (isset($shareData['image_url']) && !empty($shareData['image_url']) && function_exists('wp_check_filetype') && defined('B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF')) {
276
  $image_data = wp_check_filetype($shareData['image_url']);
277
  $not_allow_gif = json_decode(B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF, true);
@@ -331,7 +331,6 @@ class B2S_AutoPost {
331
  }
332
  }
333
 
334
- global $wpdb;
335
  $networkDetailsId = 0;
336
  $schedDetailsId = 0;
337
  $networkDetailsIdSelect = $wpdb->get_col($wpdb->prepare("SELECT postNetworkDetails.id FROM {$wpdb->prefix}b2s_posts_network_details AS postNetworkDetails WHERE postNetworkDetails.network_auth_id = %s", $network_auth_id));
40
 
41
  public function prepareShareData($networkAuthId = 0, $networkId = 0, $networkType = 0, $networkKind = 0) {
42
 
 
 
 
 
 
 
 
 
 
 
 
 
43
  if ((int) $networkId > 0 && (int) $networkAuthId > 0) {
44
  $postData = array('content' => '', 'custom_title' => '', 'tags' => array(), 'network_auth_id' => (int) $networkAuthId);
45
 
260
 
261
  public function saveShareData($shareData = array(), $network_id = 0, $network_type = 0, $network_auth_id = 0, $shareApprove = 0, $network_display_name = '') {
262
 
263
+ global $wpdb;
264
+ if ($this->userVersion >= 3) {
265
+ $sqlGetData = $wpdb->prepare("SELECT `data` FROM `{$wpdb->prefix}b2s_posts_network_details` WHERE `network_auth_id` = %d", (int) $network_auth_id);
266
+ $dataString = $wpdb->get_var($sqlGetData);
267
+ if ($dataString !== NULL && !empty($dataString)) {
268
+ $networkAuthData = unserialize($dataString);
269
+ if (!empty($shareData['url']) && $networkAuthData != false && is_array($networkAuthData) && isset($networkAuthData['url_parameter'][0]['querys']) && !empty($networkAuthData['url_parameter'][0]['querys'])) {
270
+ $shareData['url'] = B2S_Util::addUrlParameter($shareData['url'], $networkAuthData['url_parameter'][0]['querys']);
271
+ }
272
+ }
273
+ }
274
+
275
  if (isset($shareData['image_url']) && !empty($shareData['image_url']) && function_exists('wp_check_filetype') && defined('B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF')) {
276
  $image_data = wp_check_filetype($shareData['image_url']);
277
  $not_allow_gif = json_decode(B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF, true);
331
  }
332
  }
333
 
 
334
  $networkDetailsId = 0;
335
  $schedDetailsId = 0;
336
  $networkDetailsIdSelect = $wpdb->get_col($wpdb->prepare("SELECT postNetworkDetails.id FROM {$wpdb->prefix}b2s_posts_network_details AS postNetworkDetails WHERE postNetworkDetails.network_auth_id = %s", $network_auth_id));
includes/B2S/Network/Item.php CHANGED
@@ -150,7 +150,7 @@ class B2S_Network_Item {
150
  if($networkId == 6){
151
  $html .= '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn" data-auth-method="client" data-network-mandant-id="' . esc_attr($mandantId) . '">+ ' . esc_html__('Profile', 'blog2social') . '</a>';
152
  } else {
153
- if($networkId == 24 && B2S_PLUGIN_USER_VERSION < 3) {
154
  $html .= '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-btn-disabled b2sBusinessFeatureModalBtn" data-title="' . esc_attr__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("BUSINESS", "blog2social") . '</a>';
155
  } else {
156
  $html .= ($networkId != 18 || (B2S_PLUGIN_USER_VERSION >= 2 && $networkId == 18)) ? '<a href="#" onclick="wop(\'' . $b2sAuthUrl . '&choose=profile\', \'Blog2Social Network\'); return false;" class="btn btn-primary btn-sm b2s-network-auth-btn">+ ' . esc_html($name) . '</a>' : '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-btn-disabled b2sProFeatureModalBtn" data-title="' . esc_attr__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("PRO", "blog2social") . '</a>';
@@ -1340,6 +1340,49 @@ class B2S_Network_Item {
1340
  $preview .= '<img class="b2s-edit-template-preview-image-image b2s-edit-template-preview-image-image-15" src="' . $this->previewImage . '">';
1341
  $preview .= '</div>';
1342
  $preview .= '</div>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1343
  $preview .= '</div>';
1344
  $preview .= '</div>';
1345
  break;
150
  if($networkId == 6){
151
  $html .= '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn" data-auth-method="client" data-network-mandant-id="' . esc_attr($mandantId) . '">+ ' . esc_html__('Profile', 'blog2social') . '</a>';
152
  } else {
153
+ if($networkId == 24 && B2S_PLUGIN_USER_VERSION < 1) {
154
  $html .= '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-btn-disabled b2sBusinessFeatureModalBtn" data-title="' . esc_attr__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("BUSINESS", "blog2social") . '</a>';
155
  } else {
156
  $html .= ($networkId != 18 || (B2S_PLUGIN_USER_VERSION >= 2 && $networkId == 18)) ? '<a href="#" onclick="wop(\'' . $b2sAuthUrl . '&choose=profile\', \'Blog2Social Network\'); return false;" class="btn btn-primary btn-sm b2s-network-auth-btn">+ ' . esc_html($name) . '</a>' : '<a href="#" class="btn btn-primary btn-sm b2s-network-auth-btn b2s-btn-disabled b2sProFeatureModalBtn" data-title="' . esc_attr__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("PRO", "blog2social") . '</a>';
1340
  $preview .= '<img class="b2s-edit-template-preview-image-image b2s-edit-template-preview-image-image-15" src="' . $this->previewImage . '">';
1341
  $preview .= '</div>';
1342
  $preview .= '</div>';
1343
+ $preview .= '</div>';
1344
+ $preview .= '</div>';
1345
+ break;
1346
+ case '24':
1347
+ $preview .= '<div class="row">';
1348
+ $preview .= '<div class="col-sm-2">';
1349
+ $preview .= '<span class="b2s-edit-template-section-headline">' . esc_html__('Preview', 'blog2social') . ':</span>';
1350
+ $preview .= '</div>';
1351
+ $preview .= '<div class="col-sm-8 b2s-edit-template-preview-border b2s-edit-template-preview-border-24">';
1352
+ $preview .= '<div class="row" style="padding-right: 10px;">';
1353
+ $preview .= '<div class="col-sm-1">';
1354
+ $preview .= '<img class="b2s-edit-template-preview-profile-img-24" src="' . plugins_url('/assets/images/b2s@64.png', B2S_PLUGIN_FILE) . '">';
1355
+ $preview .= '</div>';
1356
+ $preview .= '<div class="col-sm-10 col-sm-push-1 b2s-edit-template-preview-inner-border-24">';
1357
+ $preview .= '<div class="b2s-edit-template-link-preview" data-network-type="' . esc_attr($networkType) . '" ' . (((int) $schema[$networkType]['format'] == 0) ? '' : 'style="display: none;"') . '>';
1358
+ $preview .= '<div class="row">';
1359
+ $preview .= '<div class="col-sm-12 b2s-edit-template-preview-content-24">';
1360
+ $preview .= '<span class="b2s-edit-template-preview-content" data-network-type="' . esc_attr($networkType) . '">' . preg_replace("/\n/", "<br>", esc_html($schema[$networkType]['content'])) . '</span>';
1361
+ $preview .= '<br><br><span>' . esc_html($domain) . '</span><br>';
1362
+ $preview .= '</div>';
1363
+ $preview .= '</div>';
1364
+ $preview .= '<div class="row">';
1365
+ $preview .= '<div class="col-sm-11 b2s-edit-template-preview-link-meta-box-24">';
1366
+ $preview .= '<span class="b2s-edit-template-preview-link-title">' . esc_html($title) . '</span>';
1367
+ $preview .= '<img class="b2s-edit-template-preview-link-image b2s-edit-template-preview-link-image-24" src="' . $this->previewImage . '">';
1368
+ $preview .= '</div>';
1369
+ $preview .= '</div>';
1370
+ $preview .= '</div>';
1371
+ $preview .= '<div class="b2s-edit-template-image-preview" data-network-type="' . esc_attr($networkType) . '" ' . (((int) $schema[$networkType]['format'] == 1) ? '' : 'style="display: none;"') . '>';
1372
+ $preview .= '<div class="row">';
1373
+ $preview .= '<div class="col-sm-12 b2s-edit-template-preview-image-border-24">';
1374
+ $preview .= '<img class="b2s-edit-template-preview-image-image b2s-edit-template-preview-image-image-24" src="' . $this->previewImage . '">';
1375
+ $preview .= '</div>';
1376
+ $preview .= '</div>';
1377
+ $preview .= '<div class="row">';
1378
+ $preview .= '<div class="col-sm-12 b2s-edit-template-preview-image-border-24">';
1379
+ $preview .= '<span class="b2s-edit-template-preview-content" data-network-type="' . esc_attr($networkType) . '">' . preg_replace("/\n/", "<br>", esc_html($schema[$networkType]['content'])) . '</span>';
1380
+ $preview .= '</div>';
1381
+ $preview .= '</div>';
1382
+ $preview .= '</div>';
1383
+ $preview .= '</div>';
1384
+ $preview .= '</div>';
1385
+
1386
  $preview .= '</div>';
1387
  $preview .= '</div>';
1388
  break;
includes/B2S/RePost/Save.php CHANGED
@@ -139,18 +139,6 @@ class B2S_RePost_Save {
139
 
140
  public function prepareShareData($networkAuthId = 0, $networkId = 0, $networkType = 0, $networkKind = 0) {
141
 
142
- if ($this->userVersion >= 3) {
143
- global $wpdb;
144
- $sqlGetData = $wpdb->prepare("SELECT `data` FROM `{$wpdb->prefix}b2s_posts_network_details` WHERE `network_auth_id` = %d", (int) $networkAuthId);
145
- $dataString = $wpdb->get_var($sqlGetData);
146
- if ($dataString !== NULL && !empty($dataString)) {
147
- $networkAuthData = unserialize($dataString);
148
- if (!empty($this->url) && $networkAuthData != false && is_array($networkAuthData) && isset($networkAuthData['url_parameter'][0]['querys']) && !empty($networkAuthData['url_parameter'][0]['querys'])) {
149
- $this->url = B2S_Util::addUrlParameter($this->url, $networkAuthData['url_parameter'][0]['querys']);
150
- }
151
- }
152
- }
153
-
154
  if ((int) $networkId > 0 && (int) $networkAuthId > 0) {
155
  $postData = array('content' => '', 'custom_title' => '', 'tags' => array(), 'network_auth_id' => (int) $networkAuthId);
156
 
@@ -372,6 +360,18 @@ class B2S_RePost_Save {
372
 
373
  public function saveShareData($shareData = array(), $network_id = 0, $network_type = 0, $network_auth_id = 0, $shareApprove = 0, $network_display_name = '', $sched_date = '0000-00-00 00:00:00', $sched_date_utc = '0000-00-00 00:00:00') {
374
 
 
 
 
 
 
 
 
 
 
 
 
 
375
  if (isset($shareData['image_url']) && !empty($shareData['image_url']) && function_exists('wp_check_filetype') && defined('B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF')) {
376
  $image_data = wp_check_filetype($shareData['image_url']);
377
  $not_allow_gif = json_decode(B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF, true);
@@ -380,7 +380,6 @@ class B2S_RePost_Save {
380
  }
381
  }
382
 
383
- global $wpdb;
384
  $networkDetailsId = 0;
385
  $schedDetailsId = 0;
386
  $networkDetailsIdSelect = $wpdb->get_col($wpdb->prepare("SELECT postNetworkDetails.id FROM {$wpdb->prefix}b2s_posts_network_details AS postNetworkDetails WHERE postNetworkDetails.network_auth_id = %s", $network_auth_id));
139
 
140
  public function prepareShareData($networkAuthId = 0, $networkId = 0, $networkType = 0, $networkKind = 0) {
141
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  if ((int) $networkId > 0 && (int) $networkAuthId > 0) {
143
  $postData = array('content' => '', 'custom_title' => '', 'tags' => array(), 'network_auth_id' => (int) $networkAuthId);
144
 
360
 
361
  public function saveShareData($shareData = array(), $network_id = 0, $network_type = 0, $network_auth_id = 0, $shareApprove = 0, $network_display_name = '', $sched_date = '0000-00-00 00:00:00', $sched_date_utc = '0000-00-00 00:00:00') {
362
 
363
+ global $wpdb;
364
+ if ($this->userVersion >= 3) {
365
+ $sqlGetData = $wpdb->prepare("SELECT `data` FROM `{$wpdb->prefix}b2s_posts_network_details` WHERE `network_auth_id` = %d", (int) $network_auth_id);
366
+ $dataString = $wpdb->get_var($sqlGetData);
367
+ if ($dataString !== NULL && !empty($dataString)) {
368
+ $networkAuthData = unserialize($dataString);
369
+ if (!empty($shareData['url']) && $networkAuthData != false && is_array($networkAuthData) && isset($networkAuthData['url_parameter'][0]['querys']) && !empty($networkAuthData['url_parameter'][0]['querys'])) {
370
+ $shareData['url'] = B2S_Util::addUrlParameter($shareData['url'], $networkAuthData['url_parameter'][0]['querys']);
371
+ }
372
+ }
373
+ }
374
+
375
  if (isset($shareData['image_url']) && !empty($shareData['image_url']) && function_exists('wp_check_filetype') && defined('B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF')) {
376
  $image_data = wp_check_filetype($shareData['image_url']);
377
  $not_allow_gif = json_decode(B2S_PLUGIN_NETWORK_NOT_ALLOW_GIF, true);
380
  }
381
  }
382
 
 
383
  $networkDetailsId = 0;
384
  $schedDetailsId = 0;
385
  $networkDetailsIdSelect = $wpdb->get_col($wpdb->prepare("SELECT postNetworkDetails.id FROM {$wpdb->prefix}b2s_posts_network_details AS postNetworkDetails WHERE postNetworkDetails.network_auth_id = %s", $network_auth_id));
includes/B2S/Ship/Portale.php CHANGED
@@ -39,7 +39,7 @@ class B2S_Ship_Portale {
39
  if($portal->id == 6) {
40
  $html .= '<a href="#" class="btn btn-primary btn-sm b2s-network-list-add-btn" data-auth-method="client">+ ' . esc_html__('Profile', 'blog2social') . '</a>';
41
  } else {
42
- if($portal->id == 24 && B2S_PLUGIN_USER_VERSION < 3) {
43
  $html .= '<button type="button" class="btn btn-primary btn-sm b2s-network-list-add-btn b2s-network-list-add-btn-profeature b2s-btn-disabled b2sBusinessFeatureModalBtn" data-title="' . esc_html__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("BUSINESS", "blog2social") . '</a></button>';
44
  } else {
45
  $html .= ($portal->id != 18 || (B2S_PLUGIN_USER_VERSION >= 2 && $portal->id == 18)) ? ('<a href="#" onclick="wop(\'' . $b2sAuthUrl . '&choose=profile\', \'Blog2Social Network\'); return false;" class="btn btn-primary btn-sm b2s-network-list-add-btn">+ ' . esc_html($name) . '</a>') : '<button type="button" class="btn btn-primary btn-sm b2s-network-list-add-btn b2s-network-list-add-btn-profeature b2s-btn-disabled b2sProFeatureModalBtn" data-title="' . esc_html__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("PRO", "blog2social") . '</a></button>';
39
  if($portal->id == 6) {
40
  $html .= '<a href="#" class="btn btn-primary btn-sm b2s-network-list-add-btn" data-auth-method="client">+ ' . esc_html__('Profile', 'blog2social') . '</a>';
41
  } else {
42
+ if($portal->id == 24 && B2S_PLUGIN_USER_VERSION < 1) {
43
  $html .= '<button type="button" class="btn btn-primary btn-sm b2s-network-list-add-btn b2s-network-list-add-btn-profeature b2s-btn-disabled b2sBusinessFeatureModalBtn" data-title="' . esc_html__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("BUSINESS", "blog2social") . '</a></button>';
44
  } else {
45
  $html .= ($portal->id != 18 || (B2S_PLUGIN_USER_VERSION >= 2 && $portal->id == 18)) ? ('<a href="#" onclick="wop(\'' . $b2sAuthUrl . '&choose=profile\', \'Blog2Social Network\'); return false;" class="btn btn-primary btn-sm b2s-network-list-add-btn">+ ' . esc_html($name) . '</a>') : '<button type="button" class="btn btn-primary btn-sm b2s-network-list-add-btn b2s-network-list-add-btn-profeature b2s-btn-disabled b2sProFeatureModalBtn" data-title="' . esc_html__('You want to connect a network profile?', 'blog2social') . '" data-type="auth-network">+ ' . esc_html__('Profile', 'blog2social') . ' <span class="label label-success">' . esc_html__("PRO", "blog2social") . '</a></button>';
includes/Loader.php CHANGED
@@ -70,7 +70,7 @@ class B2S_Loader {
70
  2 => array('short_text' => array('active' => 0, 'range_min' => 1499, 'range_max' => 1500, 'excerpt_range_min' => 1499, 'excerpt_range_max' => 1500, 'limit' => 0), 'content' => '{CONTENT} {KEYWORDS}', 'format' => 0)),
71
  18 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 1499, 'range_max' => 1500, 'excerpt_range_min' => 1499, 'excerpt_range_max' => 1500, 'limit' => 1500), 'content' => '{CONTENT} {KEYWORDS}', 'format' => false)),
72
  19 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 1000), 'content' => '{CONTENT}', 'format' => 0),
73
- 1 => array('short_text' => array(0 => array('deprecated_date' => '2020-11-30', 'active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 400), 4 => array('active' => 0, 'range_min' => 880, 'range_max' => 920, 'excerpt_range_min' => 880, 'excerpt_range_max' => 920, 'limit' => 1000)), 'content' => '{CONTENT}', 'format' => 1),
74
  2 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 10000), 'content' => '{CONTENT}', 'format' => 1)),
75
  24 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 420), 'content' => '{CONTENT}', 'format' => 0))
76
  )));
70
  2 => array('short_text' => array('active' => 0, 'range_min' => 1499, 'range_max' => 1500, 'excerpt_range_min' => 1499, 'excerpt_range_max' => 1500, 'limit' => 0), 'content' => '{CONTENT} {KEYWORDS}', 'format' => 0)),
71
  18 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 1499, 'range_max' => 1500, 'excerpt_range_min' => 1499, 'excerpt_range_max' => 1500, 'limit' => 1500), 'content' => '{CONTENT} {KEYWORDS}', 'format' => false)),
72
  19 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 1000), 'content' => '{CONTENT}', 'format' => 0),
73
+ 1 => array('short_text' => array(0 => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 400), 4 => array('active' => 0, 'range_min' => 880, 'range_max' => 920, 'excerpt_range_min' => 880, 'excerpt_range_max' => 920, 'limit' => 1000)), 'content' => '{CONTENT}', 'format' => 1),
74
  2 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 10000), 'content' => '{CONTENT}', 'format' => 1)),
75
  24 => array(0 => array('short_text' => array('active' => 0, 'range_min' => 239, 'range_max' => 320, 'excerpt_range_min' => 239, 'excerpt_range_max' => 320, 'limit' => 420), 'content' => '{CONTENT}', 'format' => 0))
76
  )));
includes/Util.php CHANGED
@@ -413,28 +413,39 @@ class B2S_Util {
413
  if (mb_strlen($text, 'UTF-8') < $count) {
414
  return trim($text);
415
  }
416
- $stops = array('.', ':');
417
- $min = 1;
 
 
 
 
418
  $cleanTruncateWord = true;
419
  $max = ($max !== false) ? ($max - $min) : ($min - 1);
420
  if (mb_strlen($text, 'UTF-8') < $max) {
421
  return trim($text);
422
  }
423
 
424
- $sub = mb_substr($text, $min, mb_strripos(mb_substr($text, $min, $max, 'UTF-8'), ' '), 'UTF-8');
425
-
 
426
  for ($i = 0; $i < count($stops); $i++) {
427
- if (count($subArray = explode($stops[$i], $sub)) > 1) {
 
 
 
 
 
 
 
428
  $cleanTruncateWord = false;
429
  if (mb_substr($subArray[count($subArray) - 1], 0, 1) == ' ' || mb_substr($subArray[count($subArray) - 1], 0, 1) == "\n") { //empty first charcater in last explode - delete last explode
430
  $subArray[count($subArray) - 1] = ' ';
431
  }
432
- if (mb_stripos($subArray[count($subArray) - 1], $stops[$i]) === false) { //delete last explode if no stops set
433
  $subArray[count($subArray) - 1] = mb_substr($subArray[count($subArray) - 1], 0, mb_stripos($subArray[count($subArray) - 1], ' '));
434
  }
435
- $sub = implode($stops[$i], $subArray);
436
  $add = false;
437
- break;
438
  }
439
  }
440
 
413
  if (mb_strlen($text, 'UTF-8') < $count) {
414
  return trim($text);
415
  }
416
+ if ($max !== false && mb_strlen($text, 'UTF-8') < $max) {
417
+ return trim($text);
418
+ }
419
+
420
+ $stops = array('.', ':', '?', '!');
421
+ $min = $count;
422
  $cleanTruncateWord = true;
423
  $max = ($max !== false) ? ($max - $min) : ($min - 1);
424
  if (mb_strlen($text, 'UTF-8') < $max) {
425
  return trim($text);
426
  }
427
 
428
+ $sub = mb_substr($text, $min, $max, 'UTF-8');
429
+ $stopAt = '';
430
+ $stopAtPos = 0;
431
  for ($i = 0; $i < count($stops); $i++) {
432
+ if (mb_strripos($sub, $stops[$i]) > $stopAtPos) {
433
+ $stopAt = $stops[$i];
434
+ $stopAtPos = mb_strripos($sub, $stops[$i]);
435
+ }
436
+ }
437
+
438
+ if (!empty($stopAt)) {
439
+ if (count($subArray = explode($stopAt, $sub)) > 1) {
440
  $cleanTruncateWord = false;
441
  if (mb_substr($subArray[count($subArray) - 1], 0, 1) == ' ' || mb_substr($subArray[count($subArray) - 1], 0, 1) == "\n") { //empty first charcater in last explode - delete last explode
442
  $subArray[count($subArray) - 1] = ' ';
443
  }
444
+ if (mb_stripos($subArray[count($subArray) - 1], $stopAt) === false) { //delete last explode if no stops set
445
  $subArray[count($subArray) - 1] = mb_substr($subArray[count($subArray) - 1], 0, mb_stripos($subArray[count($subArray) - 1], ' '));
446
  }
447
+ $sub = implode($stopAt, $subArray);
448
  $add = false;
 
449
  }
450
  }
451
 
readme.txt CHANGED
@@ -4,8 +4,8 @@ Requires PHP: 5.5.3
4
  Tags: auto post, auto publish, social media scheduling, social media calendar, social media automation, social media share, auto-publish, scheduling, social media post, social url share, social network share, share tweet, share links, share this, sharethis, social tools, admin, api, auto share to, autopost, auto-Posting, auto-schedule, auto-schedule social media posts, automatic social sharing plugin, blog marketing, blog2social, blogger, buffer, crossposting, cross-promotion, cross-promoting, bloglovin, bloglovin auto post, facebook, facebook auto post, facebook pages, google auto post, instagram, instagram auto post, jetpack, jetpack sharing, linkedin, linkedin auto post, medium, medium auto post, multiposting, pinterest, re-post, scheduling plugin, social media, social media auto publish, social media button, social media manager, social media plugin, social media publishing, social media scheduling tool, social media sharing, social media tool, social network auto publish, social network icon, social network widget, socialmedia, timing, torial, torial auto post, tumblr, twitter, twitter auto post, xing, xing auto post, xing groups, xing gruppen, xing personal profiles, xing company profiles, xing business pages, xing pages, xing seiten, auto post scheduler, repost, social media management, facebook fan page auto post, facebook profile auto post, social auto post, social autoposting, flickr, flickr auto posting, linkedin, linkedin auto posting, linkedin profile, facebook group, facebook gruppen, reddit, reddit auto posting, reddit auto post, social media calendar, editorial calendar, calendar plugin, Social Media Automatisierung, Social Media Management, Kalender, Planungs Kalender, Social Media Kalender, Content Marketing, Revive, Revive posts, Revive old posts, old posts, Reshare, Re-Share, automatically re-post, automatically reshare, auto repost, auto republish, recycle posts, bulk schedule, Google My Business, Google posts, imgur, vk, vkontakte, Vkontakte.ru, vk.com. Telegram, Telegram channels, Telegram groups, share multiple images, image gallery
5
  Donate link: https://paypal.me/adenion
6
  Requires at least: 4.7.0
7
- Tested up to: 5.5
8
- Stable tag: 6.5.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -218,6 +218,8 @@ To get started with the basics of Blog2Social and maybe find some useful tips an
218
  7. Keep track of your shared posts and scheduling plan with the Social Media Calendar.
219
 
220
  == Changelog ==
 
 
221
  = 6.5.6 =
222
  Usability Optimization
223
  = 6.5.5 =
@@ -300,6 +302,8 @@ Usability Optimization
300
  Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
301
 
302
  == Upgrade Notice ==
 
 
303
  = 6.5.6 =
304
  Usability Optimization
305
  = 6.5.5 =
4
  Tags: auto post, auto publish, social media scheduling, social media calendar, social media automation, social media share, auto-publish, scheduling, social media post, social url share, social network share, share tweet, share links, share this, sharethis, social tools, admin, api, auto share to, autopost, auto-Posting, auto-schedule, auto-schedule social media posts, automatic social sharing plugin, blog marketing, blog2social, blogger, buffer, crossposting, cross-promotion, cross-promoting, bloglovin, bloglovin auto post, facebook, facebook auto post, facebook pages, google auto post, instagram, instagram auto post, jetpack, jetpack sharing, linkedin, linkedin auto post, medium, medium auto post, multiposting, pinterest, re-post, scheduling plugin, social media, social media auto publish, social media button, social media manager, social media plugin, social media publishing, social media scheduling tool, social media sharing, social media tool, social network auto publish, social network icon, social network widget, socialmedia, timing, torial, torial auto post, tumblr, twitter, twitter auto post, xing, xing auto post, xing groups, xing gruppen, xing personal profiles, xing company profiles, xing business pages, xing pages, xing seiten, auto post scheduler, repost, social media management, facebook fan page auto post, facebook profile auto post, social auto post, social autoposting, flickr, flickr auto posting, linkedin, linkedin auto posting, linkedin profile, facebook group, facebook gruppen, reddit, reddit auto posting, reddit auto post, social media calendar, editorial calendar, calendar plugin, Social Media Automatisierung, Social Media Management, Kalender, Planungs Kalender, Social Media Kalender, Content Marketing, Revive, Revive posts, Revive old posts, old posts, Reshare, Re-Share, automatically re-post, automatically reshare, auto repost, auto republish, recycle posts, bulk schedule, Google My Business, Google posts, imgur, vk, vkontakte, Vkontakte.ru, vk.com. Telegram, Telegram channels, Telegram groups, share multiple images, image gallery
5
  Donate link: https://paypal.me/adenion
6
  Requires at least: 4.7.0
7
+ Tested up to: 5.6
8
+ Stable tag: 6.5.7
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
218
  7. Keep track of your shared posts and scheduling plan with the Social Media Calendar.
219
 
220
  == Changelog ==
221
+ = 6.5.7 =
222
+ Usability Optimization
223
  = 6.5.6 =
224
  Usability Optimization
225
  = 6.5.5 =
302
  Content Curation with links, WooCommerce compatibility, gutenberg editor compatibility
303
 
304
  == Upgrade Notice ==
305
+ = 6.5.7 =
306
+ Usability Optimization
307
  = 6.5.6 =
308
  Usability Optimization
309
  = 6.5.5 =