/*! jQuery Mobile v1.3.0 | Copyright 2010, 2013 jQuery Foundation, Inc. | jquery.org/license */
(function(a, b, c) {
typeof define == "function" && define.amd ? define(["jquery"], function(d) {
return c(d, a, b), d.mobile
}) : c(a.jQuery, a, b)
})(this, document, function(a, b, c, d) {
(function(a, b, d) {
function k(a) {
return a = a || location.href, "#" + a.replace(/^[^#]*#?(.*)$/, "$1")
}
var e = "hashchange",
f = c,
g, h = a.event.special,
i = f.documentMode,
j = "on" + e in b && (i === d || i > 7);
a.fn[e] = function(a) {
return a ? this.bind(e, a) : this.trigger(e)
}, a.fn[e].delay = 50, h[e] = a.extend(h[e], {
setup: function() {
if (j) return !1;
a(g.start)
},
teardown: function() {
if (j) return !1;
a(g.stop)
}
}), g = function() {
function n() {
var c = k(),
d = m(h);
c !== h ? (l(h = c, d), a(b).trigger(e)) : d !== h && (location.href = location.href.replace(/#.*/, "") + d), g = setTimeout(n, a.fn[e].delay)
}
var c = {},
g, h = k(),
i = function(a) {
return a
},
l = i,
m = i;
return c.start = function() {
g || n()
}, c.stop = function() {
g && clearTimeout(g), g = d
}, b.attachEvent && !b.addEventListener && !j && function() {
var b, d;
c.start = function() {
b || (d = a.fn[e].src, d = d && d + k(), b = a('').hide().one("load", function() {
d || l(k()), n()
}).attr("src", d || "javascript:0").insertAfter("body")[0].contentWindow, f.onpropertychange = function() {
try {
event.propertyName === "title" && (b.document.title = f.title)
} catch (a) {}
})
}, c.stop = i, m = function() {
return k(b.location.href)
}, l = function(c, d) {
var g = b.document,
h = a.fn[e].domain;
c !== d && (g.title = f.title, g.open(), h && g.write(''), g.close(), b.location.hash = c)
}
}(), c
}()
})(a, this),
function(a) {
a.event.special.throttledresize = {
setup: function() {
a(this).bind("resize", c)
},
teardown: function() {
a(this).unbind("resize", c)
}
};
var b = 250,
c = function() {
f = (new Date).getTime(), g = f - d, g >= b ? (d = f, a(this).trigger("throttledresize")) : (e && clearTimeout(e), e = setTimeout(c, b - g))
},
d = 0,
e, f, g
}(a),
function(a, b) {
a.fn.fieldcontain = function(a) {
return this.addClass("ui-field-contain ui-body ui-br").contents().filter(function() {
return this.nodeType === 3 && !/\S/.test(this.nodeValue)
}).remove()
}, a(c).bind("pagecreate create", function(b) {
a(":jqmData(role='fieldcontain')", b.target).jqmEnhanceable().fieldcontain()
})
}(a),
function(a, b) {
a.fn.grid = function(b) {
return this.each(function() {
var c = a(this),
d = a.extend({
grid: null
}, b),
e = c.children(),
f = {
solo: 1,
a: 2,
b: 3,
c: 4,
d: 5
},
g = d.grid,
h;
if (!g)
if (e.length <= 5)
for (var i in f) f[i] === e.length && (g = i);
else g = "a", c.addClass("ui-grid-duo");
h = f[g], c.addClass("ui-grid-" + g), e.filter(":nth-child(" + h + "n+1)").addClass("ui-block-a"), h > 1 && e.filter(":nth-child(" + h + "n+2)").addClass("ui-block-b"), h > 2 && e.filter(":nth-child(" + h + "n+3)").addClass("ui-block-c"), h > 3 && e.filter(":nth-child(" + h + "n+4)").addClass("ui-block-d"), h > 4 && e.filter(":nth-child(" + h + "n+5)").addClass("ui-block-e")
})
}
}(a),
function(a) {
a.mobile = {}
}(a),
function(a, b, d) {
var e = {};
a.mobile = a.extend(a.mobile, {
version: "1.3.0",
ns: "",
subPageUrlKey: "ui-page",
activePageClass: "ui-page-active",
activeBtnClass: "ui-btn-active",
focusClass: "ui-focus",
ajaxEnabled: !0,
hashListeningEnabled: !0,
linkBindingEnabled: !0,
defaultPageTransition: "fade",
maxTransitionWidth: !1,
minScrollBack: 250,
touchOverflowEnabled: !1,
defaultDialogTransition: "pop",
pageLoadErrorMessage: "Error Loading Page",
pageLoadErrorMessageTheme: "e",
phonegapNavigationEnabled: !1,
autoInitializePage: !0,
pushStateEnabled: !0,
ignoreContentEnabled: !1,
orientationChangeEnabled: !0,
buttonMarkup: {
hoverDelay: 200
},
window: a(b),
document: a(c),
keyCode: {
ALT: 18,
BACKSPACE: 8,
CAPS_LOCK: 20,
COMMA: 188,
COMMAND: 91,
COMMAND_LEFT: 91,
COMMAND_RIGHT: 93,
CONTROL: 17,
DELETE: 46,
DOWN: 40,
END: 35,
ENTER: 13,
ESCAPE: 27,
HOME: 36,
INSERT: 45,
LEFT: 37,
MENU: 93,
NUMPAD_ADD: 107,
NUMPAD_DECIMAL: 110,
NUMPAD_DIVIDE: 111,
NUMPAD_ENTER: 108,
NUMPAD_MULTIPLY: 106,
NUMPAD_SUBTRACT: 109,
PAGE_DOWN: 34,
PAGE_UP: 33,
PERIOD: 190,
RIGHT: 39,
SHIFT: 16,
SPACE: 32,
TAB: 9,
UP: 38,
WINDOWS: 91
},
behaviors: {},
silentScroll: function(c) {
a.type(c) !== "number" && (c = a.mobile.defaultHomeScroll), a.event.special.scrollstart.enabled = !1, setTimeout(function() {
b.scrollTo(0, c), a.mobile.document.trigger("silentscroll", {
x: 0,
y: c
})
}, 20), setTimeout(function() {
a.event.special.scrollstart.enabled = !0
}, 150)
},
nsNormalizeDict: e,
nsNormalize: function(b) {
if (!b) return;
return e[b] || (e[b] = a.camelCase(a.mobile.ns + b))
},
getInheritedTheme: function(a, b) {
var c = a[0],
d = "",
e = /ui-(bar|body|overlay)-([a-z])\b/,
f, g;
while (c) {
f = c.className || "";
if (f && (g = e.exec(f)) && (d = g[2])) break;
c = c.parentNode
}
return d || b || "a"
},
closestPageData: function(a) {
return a.closest(':jqmData(role="page"), :jqmData(role="dialog")').data("mobile-page")
},
enhanceable: function(a) {
return this.haveParents(a, "enhance")
},
hijackable: function(a) {
return this.haveParents(a, "ajax")
},
haveParents: function(b, c) {
if (!a.mobile.ignoreContentEnabled) return b;
var d = b.length,
e = a(),
f, g, h;
for (var i = 0; i < d; i++) {
g = b.eq(i), h = !1, f = b[i];
while (f) {
var j = f.getAttribute ? f.getAttribute("data-" + a.mobile.ns + c) : "";
if (j === "false") {
h = !0;
break
}
f = f.parentNode
}
h || (e = e.add(g))
}
return e
},
getScreenHeight: function() {
return b.innerHeight || a.mobile.window.height()
}
}, a.mobile), a.fn.jqmData = function(b, c) {
var e;
return typeof b != "undefined" && (b && (b = a.mobile.nsNormalize(b)), arguments.length < 2 || c === d ? e = this.data(b) : e = this.data(b, c)), e
}, a.jqmData = function(b, c, d) {
var e;
return typeof c != "undefined" && (e = a.data(b, c ? a.mobile.nsNormalize(c) : c, d)), e
}, a.fn.jqmRemoveData = function(b) {
return this.removeData(a.mobile.nsNormalize(b))
}, a.jqmRemoveData = function(b, c) {
return a.removeData(b, a.mobile.nsNormalize(c))
}, a.fn.removeWithDependents = function() {
a.removeWithDependents(this)
}, a.removeWithDependents = function(b) {
var c = a(b);
(c.jqmData("dependents") || a()).remove(), c.remove()
}, a.fn.addDependents = function(b) {
a.addDependents(a(this), b)
}, a.addDependents = function(b, c) {
var d = a(b).jqmData("dependents") || a();
a(b).jqmData("dependents", a.merge(d, c))
}, a.fn.getEncodedText = function() {
return a("
",
options: {
disabled: !1,
create: null
},
_createWidget: function(b, d) {
d = a(d || this.defaultElement || this)[0], this.element = a(d), this.uuid = c++, this.eventNamespace = "." + this.widgetName + this.uuid, this.options = a.widget.extend({}, this.options, this._getCreateOptions(), b), this.bindings = a(), this.hoverable = a(), this.focusable = a(), d !== this && (a.data(d, this.widgetFullName, this), this._on(!0, this.element, {
remove: function(a) {
a.target === d && this.destroy()
}
}), this.document = a(d.style ? d.ownerDocument : d.document || d), this.window = a(this.document[0].defaultView || this.document[0].parentWindow)), this._create(), this._trigger("create", null, this._getCreateEventData()), this._init()
},
_getCreateOptions: a.noop,
_getCreateEventData: a.noop,
_create: a.noop,
_init: a.noop,
destroy: function() {
this._destroy(), this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName)), this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName + "-disabled " + "ui-state-disabled"), this.bindings.unbind(this.eventNamespace), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")
},
_destroy: a.noop,
widget: function() {
return this.element
},
option: function(c, d) {
var e = c,
f, g, h;
if (arguments.length === 0) return a.widget.extend({}, this.options);
if (typeof c == "string") {
e = {}, f = c.split("."), c = f.shift();
if (f.length) {
g = e[c] = a.widget.extend({}, this.options[c]);
for (h = 0; h < f.length - 1; h++) g[f[h]] = g[f[h]] || {}, g = g[f[h]];
c = f.pop();
if (d === b) return g[c] === b ? null : g[c];
g[c] = d
} else {
if (d === b) return this.options[c] === b ? null : this.options[c];
e[c] = d
}
}
return this._setOptions(e), this
},
_setOptions: function(a) {
var b;
for (b in a) this._setOption(b, a[b]);
return this
},
_setOption: function(a, b) {
return this.options[a] = b, a === "disabled" && (this.widget().toggleClass(this.widgetFullName + "-disabled ui-state-disabled", !!b).attr("aria-disabled", b), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
},
enable: function() {
return this._setOption("disabled", !1)
},
disable: function() {
return this._setOption("disabled", !0)
},
_on: function(b, c, d) {
var e, f = this;
typeof b != "boolean" && (d = c, c = b, b = !1), d ? (c = e = a(c), this.bindings = this.bindings.add(c)) : (d = c, c = this.element, e = this.widget()), a.each(d, function(d, g) {
function h() {
if (!b && (f.options.disabled === !0 || a(this).hasClass("ui-state-disabled"))) return;
return (typeof g == "string" ? f[g] : g).apply(f, arguments)
}
typeof g != "string" && (h.guid = g.guid = g.guid || h.guid || a.guid++);
var i = d.match(/^(\w+)\s*(.*)$/),
j = i[1] + f.eventNamespace,
k = i[2];
k ? e.delegate(k, j, h) : c.bind(j, h)
})
},
_off: function(a, b) {
b = (b || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, a.unbind(b).undelegate(b)
},
_delay: function(a, b) {
function c() {
return (typeof a == "string" ? d[a] : a).apply(d, arguments)
}
var d = this;
return setTimeout(c, b || 0)
},
_hoverable: function(b) {
this.hoverable = this.hoverable.add(b), this._on(b, {
mouseenter: function(b) {
a(b.currentTarget).addClass("ui-state-hover")
},
mouseleave: function(b) {
a(b.currentTarget).removeClass("ui-state-hover")
}
})
},
_focusable: function(b) {
this.focusable = this.focusable.add(b), this._on(b, {
focusin: function(b) {
a(b.currentTarget).addClass("ui-state-focus")
},
focusout: function(b) {
a(b.currentTarget).removeClass("ui-state-focus")
}
})
},
_trigger: function(b, c, d) {
var e, f, g = this.options[b];
d = d || {}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent;
if (f)
for (e in f) e in c || (c[e] = f[e]);
return this.element.trigger(c, d), !(a.isFunction(g) && g.apply(this.element[0], [c].concat(d)) === !1 || c.isDefaultPrevented())
}
}, a.each({
show: "fadeIn",
hide: "fadeOut"
}, function(b, c) {
a.Widget.prototype["_" + b] = function(d, e, f) {
typeof e == "string" && (e = {
effect: e
});
var g, h = e ? e === !0 || typeof e == "number" ? c : e.effect || c : b;
e = e || {}, typeof e == "number" && (e = {
duration: e
}), g = !a.isEmptyObject(e), e.complete = f, e.delay && d.delay(e.delay), g && a.effects && a.effects.effect[h] ? d[b](e) : h !== b && d[h] ? d[h](e.duration, e.easing, f) : d.queue(function(c) {
a(this)[b](), f && f.call(d[0]), c()
})
}
})
}(a),
function(a, b) {
a.widget("mobile.widget", {
_createWidget: function() {
a.Widget.prototype._createWidget.apply(this, arguments), this._trigger("init")
},
_getCreateOptions: function() {
var c = this.element,
d = {};
return a.each(this.options, function(a) {
var e = c.jqmData(a.replace(/[A-Z]/g, function(a) {
return "-" + a.toLowerCase()
}));
e !== b && (d[a] = e)
}), d
},
enhanceWithin: function(b, c) {
this.enhance(a(this.options.initSelector, a(b)), c)
},
enhance: function(b, c) {
var d, e, f = a(b),
g = this;
f = a.mobile.enhanceable(f), c && f.length && (d = a.mobile.closestPageData(f), e = d && d.keepNativeSelector() || "", f = f.not(e)), f[this.widgetName]()
},
raise: function(a) {
throw "Widget [" + this.widgetName + "]: " + a
}
})
}(a),
function(a) {
var b = a("meta[name=viewport]"),
c = b.attr("content"),
d = c + ",maximum-scale=1, user-scalable=no",
e = c + ",maximum-scale=10, user-scalable=yes",
f = /(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test(c);
a.mobile.zoom = a.extend({}, {
enabled: !f,
locked: !1,
disable: function(c) {
!f && !a.mobile.zoom.locked && (b.attr("content", d), a.mobile.zoom.enabled = !1, a.mobile.zoom.locked = c || !1)
},
enable: function(c) {
!f && (!a.mobile.zoom.locked || c === !0) && (b.attr("content", e), a.mobile.zoom.enabled = !0, a.mobile.zoom.locked = !1)
},
restore: function() {
f || (b.attr("content", c), a.mobile.zoom.enabled = !0)
}
})
}(a),
function(a, c) {
var d, e, f, g = "&ui-state=dialog";
a.mobile.path = d = {
uiStateKey: "&ui-state",
urlParseRE: /^\s*(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
getLocation: function(a) {
var b = a ? this.parseUrl(a) : location,
c = this.parseUrl(a || location.href).hash;
return c = c === "#" ? "" : c, b.protocol + "//" + b.host + b.pathname + b.search + c
},
parseLocation: function() {
return this.parseUrl(this.getLocation())
},
parseUrl: function(b) {
if (a.type(b) === "object") return b;
var c = d.urlParseRE.exec(b || "") || [];
return {
href: c[0] || "",
hrefNoHash: c[1] || "",
hrefNoSearch: c[2] || "",
domain: c[3] || "",
protocol: c[4] || "",
doubleSlash: c[5] || "",
authority: c[6] || "",
username: c[8] || "",
password: c[9] || "",
host: c[10] || "",
hostname: c[11] || "",
port: c[12] || "",
pathname: c[13] || "",
directory: c[14] || "",
filename: c[15] || "",
search: c[16] || "",
hash: c[17] || ""
}
},
makePathAbsolute: function(a, b) {
if (a && a.charAt(0) === "/") return a;
a = a || "", b = b ? b.replace(/^\/|(\/[^\/]*|[^\/]+)$/g, "") : "";
var c = b ? b.split("/") : [],
d = a.split("/");
for (var e = 0; e < d.length; e++) {
var f = d[e];
switch (f) {
case ".":
break;
case "..":
c.length && c.pop();
break;
default:
c.push(f)
}
}
return "/" + c.join("/")
},
isSameDomain: function(a, b) {
return d.parseUrl(a).domain === d.parseUrl(b).domain
},
isRelativeUrl: function(a) {
return d.parseUrl(a).protocol === ""
},
isAbsoluteUrl: function(a) {
return d.parseUrl(a).protocol !== ""
},
makeUrlAbsolute: function(a, b) {
if (!d.isRelativeUrl(a)) return a;
b === c && (b = this.documentBase);
var e = d.parseUrl(a),
f = d.parseUrl(b),
g = e.protocol || f.protocol,
h = e.protocol ? e.doubleSlash : e.doubleSlash || f.doubleSlash,
i = e.authority || f.authority,
j = e.pathname !== "",
k = d.makePathAbsolute(e.pathname || f.filename, f.pathname),
l = e.search || !j && f.search || "",
m = e.hash;
return g + h + i + k + l + m
},
addSearchParams: function(b, c) {
var e = d.parseUrl(b),
f = typeof c == "object" ? a.param(c) : c,
g = e.search || "?";
return e.hrefNoSearch + g + (g.charAt(g.length - 1) !== "?" ? "&" : "") + f + (e.hash || "")
},
convertUrlToDataUrl: function(a) {
var c = d.parseUrl(a);
return d.isEmbeddedPage(c) ? c.hash.split(g)[0].replace(/^#/, "").replace(/\?.*$/, "") : d.isSameDomain(c, this.documentBase) ? c.hrefNoHash.replace(this.documentBase.domain, "").split(g)[0] : b.decodeURIComponent(a)
},
get: function(a) {
return a === c && (a = d.parseLocation().hash), d.stripHash(a).replace(/[^\/]*\.[^\/*]+$/, "")
},
set: function(a) {
location.hash = a
},
isPath: function(a) {
return /\//.test(a)
},
clean: function(a) {
return a.replace(this.documentBase.domain, "")
},
stripHash: function(a) {
return a.replace(/^#/, "")
},
stripQueryParams: function(a) {
return a.replace(/\?.*$/, "")
},
cleanHash: function(a) {
return d.stripHash(a.replace(/\?.*$/, "").replace(g, ""))
},
isHashValid: function(a) {
return /^#[^#]+$/.test(a)
},
isExternal: function(a) {
var b = d.parseUrl(a);
return b.protocol && b.domain !== this.documentUrl.domain ? !0 : !1
},
hasProtocol: function(a) {
return /^(:?\w+:)/.test(a)
},
isEmbeddedPage: function(a) {
var b = d.parseUrl(a);
return b.protocol !== "" ? !this.isPath(b.hash) && b.hash && (b.hrefNoHash === this.documentUrl.hrefNoHash || this.documentBaseDiffers && b.hrefNoHash === this.documentBase.hrefNoHash) : /^#/.test(b.href)
},
squash: function(a, b) {
var c, e, f, g, h, i = this.isPath(a),
j = this.parseUrl(a),
k = j.hash,
l = "";
b = b || (d.isPath(a) ? d.getLocation() : d.getDocumentUrl()), f = i ? d.stripHash(a) : a, f = d.isPath(j.hash) ? d.stripHash(j.hash) : f, h = f.indexOf(this.uiStateKey), h > -1 && (l = f.slice(h), f = f.slice(0, h)), e = d.makeUrlAbsolute(f, b), g = this.parseUrl(e).search;
if (i) {
if (d.isPath(k) || k.replace("#", "").indexOf(this.uiStateKey) === 0) k = "";
l && k.indexOf(this.uiStateKey) === -1 && (k += l), k.indexOf("#") === -1 && k !== "" && (k = "#" + k), e = d.parseUrl(e), e = e.protocol + "//" + e.host + e.pathname + g + k
} else e += e.indexOf("#") > -1 ? l : "#" + l;
return e
},
isPreservableHash: function(a) {
return a.replace("#", "").indexOf(this.uiStateKey) === 0
}
}, d.documentUrl = d.parseLocation(), f = a("head").find("base"), d.documentBase = f.length ? d.parseUrl(d.makeUrlAbsolute(f.attr("href"), d.documentUrl.href)) : d.documentUrl, d.documentBaseDiffers = d.documentUrl.hrefNoHash !== d.documentBase.hrefNoHash, d.getDocumentUrl = function(b) {
return b ? a.extend({}, d.documentUrl) : d.documentUrl.href
}, d.getDocumentBase = function(b) {
return b ? a.extend({}, d.documentBase) : d.documentBase.href
}
}(a),
function(a, b) {
var c = a.mobile.path;
a.mobile.History = function(a, b) {
this.stack = a || [], this.activeIndex = b || 0
}, a.extend(a.mobile.History.prototype, {
getActive: function() {
return this.stack[this.activeIndex]
},
getLast: function() {
return this.stack[this.previousIndex]
},
getNext: function() {
return this.stack[this.activeIndex + 1]
},
getPrev: function() {
return this.stack[this.activeIndex - 1]
},
add: function(a, b) {
b = b || {}, this.getNext() && this.clearForward(), b.hash && b.hash.indexOf("#") === -1 && (b.hash = "#" + b.hash), b.url = a, this.stack.push(b), this.activeIndex = this.stack.length - 1
},
clearForward: function() {
this.stack = this.stack.slice(0, this.activeIndex + 1)
},
find: function(a, b, c) {
b = b || this.stack;
var d, e, f = b.length,
g;
for (e = 0; e < f; e++) {
d = b[e];
if (decodeURIComponent(a) === decodeURIComponent(d.url) || decodeURIComponent(a) === decodeURIComponent(d.hash)) {
g = e;
if (c) return g
}
}
return g
},
closest: function(a) {
var c, d = this.activeIndex;
return c = this.find(a, this.stack.slice(0, d)), c === b && (c = this.find(a, this.stack.slice(d), !0), c = c === b ? c : c + d), c
},
direct: function(c) {
var d = this.closest(c.url),
e = this.activeIndex;
d !== b && (this.activeIndex = d, this.previousIndex = e), d < e ? (c.present || c.back || a.noop)(this.getActive(), "back") : d > e ? (c.present || c.forward || a.noop)(this.getActive(), "forward") : d === b && c.missing && c.missing(this.getActive())
}
})
}(a),
function(a, d) {
var e = a.mobile.path;
a.mobile.Navigator = function(b) {
this.history = b, this.ignoreInitialHashChange = !0, setTimeout(a.proxy(function() {
this.ignoreInitialHashChange = !1
}, this), 200), a.mobile.window.bind({
"popstate.history": a.proxy(this.popstate, this),
"hashchange.history": a.proxy(this.hashchange, this)
})
}, a.extend(a.mobile.Navigator.prototype, {
squash: function(d, f) {
var g, h, i = e.isPath(d) ? e.stripHash(d) : d;
return h = e.squash(d), g = a.extend({
hash: i,
url: h
}, f), b.history.replaceState(g, g.title || c.title, h), g
},
hash: function(a, b) {
var c, d, f;
c = e.parseUrl(a), d = e.parseLocation();
if (d.pathname + d.search === c.pathname + c.search) f = c.hash ? c.hash : c.pathname + c.search;
else if (e.isPath(a)) {
var g = e.parseUrl(b);
f = g.pathname + g.search + (e.isPreservableHash(g.hash) ? g.hash.replace("#", "") : "")
} else f = a;
return f
},
go: function(d, f, g) {
var h, i, j, k, l = a.event.special.navigate.isPushStateEnabled();
i = e.squash(d), j = this.hash(d, i), g && j !== e.stripHash(e.parseLocation().hash) && (this.preventNextHashChange = g), this.preventHashAssignPopState = !0, b.location.hash = j, this.preventHashAssignPopState = !1, h = a.extend({
url: i,
hash: j,
title: c.title
}, f), l && (k = new a.Event("popstate"), k.originalEvent = {
type: "popstate",
state: null
}, this.squash(d, h), g || (this.ignorePopState = !0, a.mobile.window.trigger(k))), this.history.add(h.url, h)
},
popstate: function(b) {
var c, d, f, g;
if (!a.event.special.navigate.isPushStateEnabled()) return;
if (this.preventHashAssignPopState) {
this.preventHashAssignPopState = !1, b.stopImmediatePropagation();
return
}
if (this.ignorePopState) {
this.ignorePopState = !1;
return
}
if (!b.originalEvent.state && this.history.stack.length === 1 && this.ignoreInitialHashChange) {
this.ignoreInitialHashChange = !1;
return
}
d = e.parseLocation().hash;
if (!b.originalEvent.state && d) {
f = this.squash(d), this.history.add(f.url, f), b.historyState = f;
return
}
this.history.direct({
url: (b.originalEvent.state || {}).url || d,
present: function(c, d) {
b.historyState = a.extend({}, c), b.historyState.direction = d
}
})
},
hashchange: function(b) {
var d, f;
if (!a.event.special.navigate.isHashChangeEnabled() || a.event.special.navigate.isPushStateEnabled()) return;
if (this.preventNextHashChange) {
this.preventNextHashChange = !1, b.stopImmediatePropagation();
return
}
d = this.history, f = e.parseLocation().hash, this.history.direct({
url: f,
present: function(c, d) {
b.hashchangeState = a.extend({}, c), b.hashchangeState.direction = d
},
missing: function() {
d.add(f, {
hash: f,
title: c.title
})
}
})
}
})
}(a),
function(a, b) {
a.mobile.navigate = function(b, c, d) {
a.mobile.navigate.navigator.go(b, c, d)
}, a.mobile.navigate.history = new a.mobile.History, a.mobile.navigate.navigator = new a.mobile.Navigator(a.mobile.navigate.history);
var c = a.mobile.path.parseLocation();
a.mobile.navigate.history.add(c.href, {
hash: c.hash
})
}(a),
function(a, b) {
a.mobile.behaviors.addFirstLastClasses = {
_getVisibles: function(a, b) {
var c;
return b ? c = a.not(".ui-screen-hidden") : (c = a.filter(":visible"), c.length === 0 && (c = a.not(".ui-screen-hidden"))), c
},
_addFirstLastClasses: function(a, b, c) {
a.removeClass("ui-first-child ui-last-child"), b.eq(0).addClass("ui-first-child").end().last().addClass("ui-last-child"), c || this.element.trigger("updatelayout")
}
}
}(a),
function(a, b) {
a.widget("mobile.collapsible", a.mobile.widget, {
options: {
expandCueText: " click to expand contents",
collapseCueText: " click to collapse contents",
collapsed: !0,
heading: "h1,h2,h3,h4,h5,h6,legend",
collapsedIcon: "plus",
expandedIcon: "minus",
iconpos: "left",
theme: null,
contentTheme: null,
inset: !0,
corners: !0,
mini: !1,
initSelector: ":jqmData(role='collapsible')"
},
_create: function() {
var c = this.element,
d = this.options,
e = c.addClass("ui-collapsible"),
f = c.children(d.heading).first(),
g = e.wrapInner("
").children(".ui-collapsible-content"),
h = c.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set"),
i = "";
f.is("legend") && (f = a("
" + f.html() + "
").insertBefore(f), f.next().remove()), h.length ? (d.theme || (d.theme = h.jqmData("theme") || a.mobile.getInheritedTheme(h, "c")), d.contentTheme || (d.contentTheme = h.jqmData("content-theme")), d.collapsedIcon = c.jqmData("collapsed-icon") || h.jqmData("collapsed-icon") || d.collapsedIcon, d.expandedIcon = c.jqmData("expanded-icon") || h.jqmData("expanded-icon") || d.expandedIcon, d.iconpos = c.jqmData("iconpos") || h.jqmData("iconpos") || d.iconpos, h.jqmData("inset") !== b ? d.inset = h.jqmData("inset") : d.inset = !0, d.corners = !1, d.mini || (d.mini = h.jqmData("mini"))) : d.theme || (d.theme = a.mobile.getInheritedTheme(c, "c")), !d.inset || (i += " ui-collapsible-inset", !d.corners || (i += " ui-corner-all")), d.contentTheme && (i += " ui-collapsible-themed-content", g.addClass("ui-body-" + d.contentTheme)), i !== "" && e.addClass(i), f.insertBefore(g).addClass("ui-collapsible-heading").append("
").wrapInner("
").find("a").first().buttonMarkup({
shadow: !1,
corners: !1,
iconpos: d.iconpos,
icon: d.collapsedIcon,
mini: d.mini,
theme: d.theme
}), e.bind("expand collapse", function(b) {
if (!b.isDefaultPrevented()) {
var c = a(this),
e = b.type === "collapse";
b.preventDefault(), f.toggleClass("ui-collapsible-heading-collapsed", e).find(".ui-collapsible-heading-status").text(e ? d.expandCueText : d.collapseCueText).end().find(".ui-icon").toggleClass("ui-icon-" + d.expandedIcon, !e).toggleClass("ui-icon-" + d.collapsedIcon, e || d.expandedIcon === d.collapsedIcon).end().find("a").first().removeClass(a.mobile.activeBtnClass), c.toggleClass("ui-collapsible-collapsed", e), g.toggleClass("ui-collapsible-content-collapsed", e).attr("aria-hidden", e), g.trigger("updatelayout")
}
}).trigger(d.collapsed ? "collapse" : "expand"), f.bind("tap", function(b) {
f.find("a").first().addClass(a.mobile.activeBtnClass)
}).bind("click", function(a) {
var b = f.is(".ui-collapsible-heading-collapsed") ? "expand" : "collapse";
e.trigger(b), a.preventDefault(), a.stopPropagation()
})
}
}), a.mobile.document.bind("pagecreate create", function(b) {
a.mobile.collapsible.prototype.enhanceWithin(b.target)
})
}(a),
function(a, b) {
a.widget("mobile.collapsibleset", a.mobile.widget, {
options: {
initSelector: ":jqmData(role='collapsible-set')"
},
_create: function() {
var c = this.element.addClass("ui-collapsible-set"),
d = this.options;
d.theme || (d.theme = a.mobile.getInheritedTheme(c, "c")), d.contentTheme || (d.contentTheme = c.jqmData("content-theme")), d.corners || (d.corners = c.jqmData("corners")), c.jqmData("inset") !== b && (d.inset = c.jqmData("inset")), d.inset = d.inset !== b ? d.inset : !0, d.corners = d.corners !== b ? d.corners : !0, !!d.corners && !!d.inset && c.addClass("ui-corner-all"), c.jqmData("collapsiblebound") || c.jqmData("collapsiblebound", !0).bind("expand", function(b) {
var c = a(b.target).closest(".ui-collapsible");
c.parent().is(":jqmData(role='collapsible-set')") && c.siblings(".ui-collapsible").trigger("collapse")
})
},
_init: function() {
var a = this.element,
b = a.children(":jqmData(role='collapsible')"),
c = b.filter(":jqmData(collapsed='false')");
this._refresh("true"), c.trigger("expand")
},
_refresh: function(b) {
var c = this.element.children(":jqmData(role='collapsible')");
a.mobile.collapsible.prototype.enhance(c.not(".ui-collapsible")), this._addFirstLastClasses(c, this._getVisibles(c, b), b)
},
refresh: function() {
this._refresh(!1)
}
}), a.widget("mobile.collapsibleset", a.mobile.collapsibleset, a.mobile.behaviors.addFirstLastClasses), a.mobile.document.bind("pagecreate create", function(b) {
a.mobile.collapsibleset.prototype.enhanceWithin(b.target)
})
}(a),
function(a, b) {
a.extend(a.mobile, {
loadingMessageTextVisible: d,
loadingMessageTheme: d,
loadingMessage: d,
showPageLoadingMsg: function(b, c, d) {
a.mobile.loading("show", b, c, d)
},
hidePageLoadingMsg: function() {
a.mobile.loading("hide")
},
loading: function() {
this.loaderWidget.loader.apply(this.loaderWidget, arguments)
}
});
var c = "ui-loader",
e = a("html"),
f = a.mobile.window;
a.widget("mobile.loader", {
options: {
theme: "a",
textVisible: !1,
html: "",
text: "loading"
},
defaultHtml: "
" + "" + "
" + "",
fakeFixLoader: function() {
var b = a("." + a.mobile.activeBtnClass).first();
this.element.css({
top: a.support.scrollTop && f.scrollTop() + f.height() / 2 || b.length && b.offset().top || 100
})
},
checkLoaderPosition: function() {
var b = this.element.offset(),
c = f.scrollTop(),
d = a.mobile.getScreenHeight();
if (b.top < c || b.top - c > d) this.element.addClass("ui-loader-fakefix"), this.fakeFixLoader(), f.unbind("scroll", this.checkLoaderPosition).bind("scroll", a.proxy(this.fakeFixLoader, this))
},
resetHtml: function() {
this.element.html(a(this.defaultHtml).html())
},
show: function(b, g, h) {
var i, j, k, l;
this.resetHtml(), a.type(b) === "object" ? (l = a.extend({}, this.options, b), b = l.theme || a.mobile.loadingMessageTheme) : (l = this.options, b = b || a.mobile.loadingMessageTheme || l.theme), j = g || a.mobile.loadingMessage || l.text, e.addClass("ui-loading");
if (a.mobile.loadingMessage !== !1 || l.html) a.mobile.loadingMessageTextVisible !== d ? i = a.mobile.loadingMessageTextVisible : i = l.textVisible, this.element.attr("class", c + " ui-corner-all ui-body-" + b + " ui-loader-" + (i || g || b.text ? "verbose" : "default") + (l.textonly || h ? " ui-loader-textonly" : "")), l.html ? this.element.html(l.html) : this.element.find("h1").text(j), this.element.appendTo(a.mobile.pageContainer), this.checkLoaderPosition(), f.bind("scroll", a.proxy(this.checkLoaderPosition, this))
},
hide: function() {
e.removeClass("ui-loading"), a.mobile.loadingMessage && this.element.removeClass("ui-loader-fakefix"), a.mobile.window.unbind("scroll", this.fakeFixLoader), a.mobile.window.unbind("scroll", this.checkLoaderPosition)
}
}), f.bind("pagecontainercreate", function() {
a.mobile.loaderWidget = a.mobile.loaderWidget || a(a.mobile.loader.prototype.defaultHtml).loader()
})
}(a, this),
function(a, b) {
a.widget("mobile.navbar", a.mobile.widget, {
options: {
iconpos: "top",
grid: null,
initSelector: ":jqmData(role='navbar')"
},
_create: function() {
var d = this.element,
e = d.find("a"),
f = e.filter(":jqmData(icon)").length ? this.options.iconpos : b;
d.addClass("ui-navbar ui-mini").attr("role", "navigation").find("ul").jqmEnhanceable().grid({
grid: this.options.grid
}), e.buttonMarkup({
corners: !1,
shadow: !1,
inline: !0,
iconpos: f
}), d.delegate("a", "vclick", function(b) {
if (!a(b.target).hasClass("ui-disabled")) {
e.removeClass(a.mobile.activeBtnClass), a(this).addClass(a.mobile.activeBtnClass);
var d = a(this);
a(c).one("pagechange", function(b) {
d.removeClass(a.mobile.activeBtnClass)
})
}
}), d.closest(".ui-page").bind("pagebeforeshow", function() {
e.filter(".ui-state-persist").addClass(a.mobile.activeBtnClass)
})
}
}), a.mobile.document.bind("pagecreate create", function(b) {
a.mobile.navbar.prototype.enhanceWithin(b.target)
})
}(a),
function(a, b) {
a.widget("mobile.page", a.mobile.widget, {
options: {
theme: "c",
domCache: !1,
keepNativeDefault: ":jqmData(role='none'), :jqmData(role='nojs')"
},
_create: function() {
if (this._trigger("beforecreate") === !1) return !1;
this.element.attr("tabindex", "0").addClass("ui-page ui-body-" + this.options.theme), this._on(this.element, {
pagebeforehide: "removeContainerBackground",
pagebeforeshow: "_handlePageBeforeShow"
})
},
_handlePageBeforeShow: function(a) {
this.setContainerBackground()
},
removeContainerBackground: function() {
a.mobile.pageContainer.removeClass("ui-overlay-" + a.mobile.getInheritedTheme(this.element.parent()))
},
setContainerBackground: function(b) {
this.options.theme && a.mobile.pageContainer.addClass("ui-overlay-" + (b || this.options.theme))
},
keepNativeSelector: function() {
var b = this.options,
c = b.keepNative && a.trim(b.keepNative);
return c && b.keepNative !== b.keepNativeDefault ? [b.keepNative, b.keepNativeDefault].join(", ") : b.keepNativeDefault
}
})
}(a),
function(a, b) {
a.mobile.page.prototype.options.degradeInputs = {
color: !1,
date: !1,
datetime: !1,
"datetime-local": !1,
email: !1,
month: !1,
number: !1,
range: "number",
search: "text",
tel: !1,
time: !1,
url: !1,
week: !1
}, a.mobile.document.bind("pagecreate create", function(b) {
var c = a.mobile.closestPageData(a(b.target)),
d;
if (!c) return;
d = c.options, a(b.target).find("input").not(c.keepNativeSelector()).each(function() {
var b = a(this),
c = this.getAttribute("type"),
e = d.degradeInputs[c] || "text";
if (d.degradeInputs[c]) {
var f = a("
").html(b.clone()).html(),
g = f.indexOf(" type=") > -1,
h = g ? /\s+type=["']?\w+['"]?/ : /\/?>/,
i = ' type="' + e + '" data-' + a.mobile.ns + 'type="' + c + '"' + (g ? "" : ">");
b.replaceWith(f.replace(h, i))
}
})
})
}(a),
function(a, b) {
a.widget("mobile.textinput", a.mobile.widget, {
options: {
theme: null,
mini: !1,
preventFocusZoom: /iPhone|iPad|iPod/.test(navigator.platform) && navigator.userAgent.indexOf("AppleWebKit") > -1,
initSelector: "input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea, input[type='time'], input[type='date'], input[type='month'], input[type='week'], input[type='datetime'], input[type='datetime-local'], input[type='color'], input:not([type]), input[type='file']",
clearBtn: !1,
clearSearchButtonText: null,
clearBtnText: "clear text",
disabled: !1
},
_create: function() {
function o() {
setTimeout(function() {
j.toggleClass("ui-input-clear-hidden", !c.val())
}, 0)
}
var b = this,
c = this.element,
d = this.options,
e = d.theme || a.mobile.getInheritedTheme(this.element, "c"),
f = " ui-body-" + e,
g = d.mini ? " ui-mini" : "",
h = c.is("[type='search'], :jqmData(type='search')"),
i, j, k = d.clearSearchButtonText || d.clearBtnText,
l = c.is("textarea, :jqmData(type='range')"),
m = !!d.clearBtn && !l,
n = c.is("input") && !c.is(":jqmData(type='range')");
a("label[for='" + c.attr("id") + "']").addClass("ui-input-text"), i = c.addClass("ui-input-text ui-body-" + e), typeof c[0].autocorrect != "undefined" && !a.support.touchOverflow && (c[0].setAttribute("autocorrect", "off"), c[0].setAttribute("autocomplete", "off")), h ? i = c.wrap("
").parent() : n && (i = c.wrap("
").parent()), m || h ? (j = a("
" + k + "").bind("click", function(a) {
c.val("").focus().trigger("change"), j.addClass("ui-input-clear-hidden"), a.preventDefault()
}).appendTo(i).buttonMarkup({
icon: "delete",
iconpos: "notext",
corners: !0,
shadow: !0,
mini: d.mini
}), h || i.addClass("ui-input-has-clear"), o(), c.bind("paste cut keyup input focus change blur", o)) : !n && !h && c.addClass("ui-corner-all ui-shadow-inset" + f + g), c.focus(function() {
d.preventFocusZoom && a.mobile.zoom.disable(!0), i.addClass(a.mobile.focusClass)
}).blur(function() {
i.removeClass(a.mobile.focusClass), d.preventFocusZoom && a.mobile.zoom.enable(!0)
});
if (c.is("textarea")) {
var p = 15,
q = 100,
r;
this._keyup = function() {
var a = c[0].scrollHeight,
b = c[0].clientHeight;
b < a && c.height(a + p)
}, c.on("keyup change input paste", function() {
clearTimeout(r), r = setTimeout(b._keyup, q)
}), this._on(a.mobile.document, {
pagechange: "_keyup"
}), a.trim(c.val()) && this._on(a.mobile.window, {
load: "_keyup"
})
}
c.attr("disabled") && this.disable()
},
disable: function() {
var a, b = this.element.is("[type='search'], :jqmData(type='search')"),
c = this.element.is("input") && !this.element.is(":jqmData(type='range')"),
d = this.element.attr("disabled", !0) && (c || b);
return d ? a = this.element.parent() : a = this.element, a.addClass("ui-disabled"), this._setOption("disabled", !0)
},
enable: function() {
var a, b = this.element.is("[type='search'], :jqmData(type='search')"),
c = this.element.is("input") && !this.element.is(":jqmData(type='range')"),
d = this.element.attr("disabled", !1) && (c || b);
return d ? a = this.element.parent() : a = this.element, a.removeClass("ui-disabled"), this._setOption("disabled", !1)
}
}), a.mobile.document.bind("pagecreate create", function(b) {
a.mobile.textinput.prototype.enhanceWithin(b.target, !0)
})
}(a),
function(a, d) {
function w(b) {
!!j && (!j.closest("." + a.mobile.activePageClass).length || b) && j.removeClass(a.mobile.activeBtnClass), j = null
}
function x() {
o = !1, n.length > 0 && a.mobile.changePage.apply(null, n.pop())
}
function B(b, c, d, e) {
c && c.data("mobile-page")._trigger("beforehide", null, {
nextPage: b
}), b.data("mobile-page")._trigger("beforeshow", null, {
prevPage: c || a("")
}), a.mobile.hidePageLoadingMsg(), d = a.mobile._maybeDegradeTransition(d);
var f = a.mobile.transitionHandlers[d || "default"] || a.mobile.defaultTransitionHandler,
g = f(d, e, b, c);
return g.done(function() {
c && c.data("mobile-page")._trigger("hide", null, {
nextPage: b
}), b.data("mobile-page")._trigger("show", null, {
prevPage: c || a("")
})
}), g
}
function C(b, c) {
c && b.attr("data-" + a.mobile.ns + "role", c), b.page()
}
function D() {
var b = a.mobile.activePage && F(a.mobile.activePage);
return b || s.hrefNoHash
}
function E(a) {
while (a) {
if (typeof a.nodeName == "string" && a.nodeName.toLowerCase() === "a") break;
a = a.parentNode
}
return a
}
function F(b) {
var c = a(b).closest(".ui-page").jqmData("url"),
d = s.hrefNoHash;
if (!c || !h.isPath(c)) c = d;
return h.makeUrlAbsolute(c, d)
}
var e = a.mobile.window,
f = a("html"),
g = a("head"),
h = a.extend(a.mobile.path, {
getFilePath: function(b) {
var c = "&" + a.mobile.subPageUrlKey;
return b && b.split(c)[0].split(p)[0]
},
isFirstPageUrl: function(b) {
var c = h.parseUrl(h.makeUrlAbsolute(b, this.documentBase)),
e = c.hrefNoHash === this.documentUrl.hrefNoHash || this.documentBaseDiffers && c.hrefNoHash === this.documentBase.hrefNoHash,
f = a.mobile.firstPage,
g = f && f[0] ? f[0].id : d;
return e && (!c.hash || c.hash === "#" || g && c.hash.replace(/^#/, "") === g)
},
isPermittedCrossDomainRequest: function(b, c) {
return a.mobile.allowCrossDomainPages && b.protocol === "file:" && c.search(/^https?:/) !== -1
}
}),
i = null,
j = null,
k = a.Deferred(),
l = a.mobile.navigate.history,
m = "[tabindex],a,button:visible,select:visible,input",
n = [],
o = !1,
p = "&ui-state=dialog",
q = g.children("base"),
r = h.documentUrl,
s = h.documentBase,
t = h.documentBaseDiffers,
u = a.mobile.getScreenHeight,
v = a.support.dynamicBaseTag ? {
element: q.length ? q : a("
", {
href: s.hrefNoHash
}).prependTo(g),
set: function(a) {
a = h.parseUrl(a).hrefNoHash, v.element.attr("href", h.makeUrlAbsolute(a, s))
},
reset: function() {
v.element.attr("href", s.hrefNoSearch)
}
} : d;
a.mobile.getDocumentUrl = h.getDocumentUrl, a.mobile.getDocumentBase = h.getDocumentBase, a.mobile.back = function() {
var a = b.navigator;
this.phonegapNavigationEnabled && a && a.app && a.app.backHistory ? a.app.backHistory() : b.history.back()
}, a.mobile.focusPage = function(a) {
var b = a.find("[autofocus]"),
c = a.find(".ui-title:eq(0)");
if (b.length) {
b.focus();
return
}
c.length ? c.focus() : a.focus()
};
var y = !0,
z, A;
z = function() {
if (!y) return;
var b = a.mobile.urlHistory.getActive();
if (b) {
var c = e.scrollTop();
b.lastScroll = c < a.mobile.minScrollBack ? a.mobile.defaultHomeScroll : c
}
}, A = function() {
setTimeout(z, 100)
}, e.bind(a.support.pushState ? "popstate" : "hashchange", function() {
y = !1
}), e.one(a.support.pushState ? "popstate" : "hashchange", function() {
y = !0
}), e.one("pagecontainercreate", function() {
a.mobile.pageContainer.bind("pagechange", function() {
y = !0, e.unbind("scrollstop", A), e.bind("scrollstop", A)
})
}), e.bind("scrollstop", A), a.mobile._maybeDegradeTransition = a.mobile._maybeDegradeTransition || function(a) {
return a
}, a.mobile.resetActivePageHeight = function(c) {
var d = a("." + a.mobile.activePageClass),
e = parseFloat(d.css("padding-top")),
f = parseFloat(d.css("padding-bottom")),
g = parseFloat(d.css("border-top-width")),
h = parseFloat(d.css("border-bottom-width"));
c = typeof c == "number" ? c : u(), d.css("min-height", c - e - f - g - h)
}, a.fn.animationComplete = function(b) {
return a.support.cssTransitions ? a(this).one("webkitAnimationEnd animationend", b) : (setTimeout(b, 0), a(this))
}, a.mobile.path = h, a.mobile.base = v, a.mobile.urlHistory = l, a.mobile.dialogHashKey = p, a.mobile.allowCrossDomainPages = !1, a.mobile._bindPageRemove = function() {
var b = a(this);
!b.data("mobile-page").options.domCache && b.is(":jqmData(external-page='true')") && b.bind("pagehide.remove", function(b) {
var c = a(this),
d = new a.Event("pageremove");
c.trigger(d), d.isDefaultPrevented() || c.removeWithDependents()
})
}, a.mobile.loadPage = function(b, c) {
var e = a.Deferred(),
f = a.extend({}, a.mobile.loadPage.defaults, c),
g = null,
i = null,
j = h.makeUrlAbsolute(b, D());
f.data && f.type === "get" && (j = h.addSearchParams(j, f.data), f.data = d), f.data && f.type === "post" && (f.reloadPage = !0);
var k = h.getFilePath(j),
l = h.convertUrlToDataUrl(j);
f.pageContainer = f.pageContainer || a.mobile.pageContainer, g = f.pageContainer.children("[data-" + a.mobile.ns + "url='" + l + "']"), g.length === 0 && l && !h.isPath(l) && (g = f.pageContainer.children("#" + l).attr("data-" + a.mobile.ns + "url", l).jqmData("url", l));
if (g.length === 0)
if (a.mobile.firstPage && h.isFirstPageUrl(k)) a.mobile.firstPage.parent().length && (g = a(a.mobile.firstPage));
else if (h.isEmbeddedPage(k)) return e.reject(j, c), e.promise();
if (g.length) {
if (!f.reloadPage) return C(g, f.role), e.resolve(j, c, g), e.promise();
i = g
}
var m = f.pageContainer,
n = new a.Event("pagebeforeload"),
o = {
url: b,
absUrl: j,
dataUrl: l,
deferred: e,
options: f
};
m.trigger(n, o);
if (n.isDefaultPrevented()) return e.promise();
if (f.showLoadMsg) var p = setTimeout(function() {
a.mobile.showPageLoadingMsg()
}, f.loadMsgDelay),
q = function() {
clearTimeout(p), a.mobile.hidePageLoadingMsg()
};
return v && v.reset(), !a.mobile.allowCrossDomainPages && !h.isSameDomain(r, j) ? e.reject(j, c) : a.ajax({
url: k,
type: f.type,
data: f.data,
dataType: "html",
success: function(d, m, n) {
var p = a("
"),
r = d.match(/
]*>([^<]*)/) && RegExp.$1,
s = new RegExp("(<[^>]+\\bdata-" + a.mobile.ns + "role=[\"']?page[\"']?[^>]*>)"),
t = new RegExp("\\bdata-" + a.mobile.ns + "url=[\"']?([^\"'>]*)[\"']?");
s.test(d) && RegExp.$1 && t.test(RegExp.$1) && RegExp.$1 && (b = k = h.getFilePath(a("" + RegExp.$1 + "
").text())), v && v.set(k), p.get(0).innerHTML = d, g = p.find(":jqmData(role='page'), :jqmData(role='dialog')").first(), g.length || (g = a("" + (d.split(/<\/?body[^>]*>/gmi)[1] || "") + "
")), r && !g.jqmData("title") && (~r.indexOf("&") && (r = a("" + r + "
").text()), g.jqmData("title", r));
if (!a.support.dynamicBaseTag) {
var u = h.get(k);
g.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function() {
var b = a(this).is("[href]") ? "href" : a(this).is("[src]") ? "src" : "action",
c = a(this).attr(b);
c = c.replace(location.protocol + "//" + location.host + location.pathname, ""), /^(\w+:|#|\/)/.test(c) || a(this).attr(b, u + c)
})
}
g.attr("data-" + a.mobile.ns + "url", h.convertUrlToDataUrl(k)).attr("data-" + a.mobile.ns + "external-page", !0).appendTo(f.pageContainer), g.one("pagecreate", a.mobile._bindPageRemove), C(g, f.role), j.indexOf("&" + a.mobile.subPageUrlKey) > -1 && (g = f.pageContainer.children("[data-" + a.mobile.ns + "url='" + l + "']")), f.showLoadMsg && q(), o.xhr = n, o.textStatus = m, o.page = g, f.pageContainer.trigger("pageload", o), e.resolve(j, c, g, i)
},
error: function(b, d, g) {
v && v.set(h.get()), o.xhr = b, o.textStatus = d, o.errorThrown = g;
var i = new a.Event("pageloadfailed");
f.pageContainer.trigger(i, o);
if (i.isDefaultPrevented()) return;
f.showLoadMsg && (q(), a.mobile.showPageLoadingMsg(a.mobile.pageLoadErrorMessageTheme, a.mobile.pageLoadErrorMessage, !0), setTimeout(a.mobile.hidePageLoadingMsg, 1500)), e.reject(j, c)
}
}), e.promise()
}, a.mobile.loadPage.defaults = {
type: "get",
data: d,
reloadPage: !1,
role: d,
showLoadMsg: !1,
pageContainer: d,
loadMsgDelay: 50
}, a.mobile.changePage = function(b, e) {
if (o) {
n.unshift(arguments);
return
}
var f = a.extend({}, a.mobile.changePage.defaults, e),
g;
f.pageContainer = f.pageContainer || a.mobile.pageContainer, f.fromPage = f.fromPage || a.mobile.activePage, g = typeof b == "string";
var i = f.pageContainer,
j = new a.Event("pagebeforechange"),
k = {
toPage: b,
options: f
};
g ? k.absUrl = h.makeUrlAbsolute(b, D()) : k.absUrl = b.data("absUrl"), i.trigger(j, k);
if (j.isDefaultPrevented()) return;
b = k.toPage, g = typeof b == "string", o = !0;
if (g) {
f.target = b, a.mobile.loadPage(b, f).done(function(b, c, d, e) {
o = !1, c.duplicateCachedPage = e, d.data("absUrl", k.absUrl), a.mobile.changePage(d, c)
}).fail(function(a, b) {
o = !1, w(!0), x(), f.pageContainer.trigger("pagechangefailed", k)
});
return
}
b[0] === a.mobile.firstPage[0] && !f.dataUrl && (f.dataUrl = r.hrefNoHash);
var m = f.fromPage,
q = f.dataUrl && h.convertUrlToDataUrl(f.dataUrl) || b.jqmData("url"),
s = q,
t = h.getFilePath(q),
u = l.getActive(),
v = l.activeIndex === 0,
y = 0,
z = c.title,
A = f.role === "dialog" || b.jqmData("role") === "dialog";
if (m && m[0] === b[0] && !f.allowSamePageTransition) {
o = !1, i.trigger("pagechange", k), f.fromHashChange && l.direct({
url: q
});
return
}
C(b, f.role), f.fromHashChange && (y = e.direction === "back" ? -1 : 1);
try {
c.activeElement && c.activeElement.nodeName.toLowerCase() !== "body" ? a(c.activeElement).blur() : a("input:focus, textarea:focus, select:focus").blur()
} catch (E) {}
var F = !1;
A && u && (u.url && u.url.indexOf(p) > -1 && a.mobile.activePage && !a.mobile.activePage.is(".ui-dialog") && l.activeIndex > 0 && (f.changeHash = !1, F = !0), q = u.url || "", !F && q.indexOf("#") > -1 ? q += p : q += "#" + p, l.activeIndex === 0 && q === l.initialDst && (q += p));
var G = u ? b.jqmData("title") || b.children(":jqmData(role='header')").find(".ui-title").getEncodedText() : z;
!!G && z === c.title && (z = G), b.jqmData("title") || b.jqmData("title", z), f.transition = f.transition || (y && !v ? u.transition : d) || (A ? a.mobile.defaultDialogTransition : a.mobile.defaultPageTransition), !y && F && (l.getActive().pageUrl = s);
if (q && !f.fromHashChange) {
var H;
!h.isPath(q) && q.indexOf("#") < 0 && (q = "#" + q), H = {
transition: f.transition,
title: z,
pageUrl: s,
role: f.role
}, f.changeHash !== !1 && a.mobile.hashListeningEnabled ? a.mobile.navigate(q, H, !0) : b[0] !== a.mobile.firstPage[0] && a.mobile.navigate.history.add(q, H)
}
c.title = z, a.mobile.activePage = b, f.reverse = f.reverse || y < 0, B(b, m, f.transition, f.reverse).done(function(c, d, e, g, h) {
w(), f.duplicateCachedPage && f.duplicateCachedPage.remove(), h || a.mobile.focusPage(b), x(), i.trigger("pagechange", k)
})
}, a.mobile.changePage.defaults = {
transition: d,
reverse: !1,
changeHash: !0,
fromHashChange: !1,
role: d,
duplicateCachedPage: d,
pageContainer: d,
showLoadMsg: !0,
dataUrl: d,
fromPage: d,
allowSamePageTransition: !1
}, a.mobile.navreadyDeferred = a.Deferred(), a.mobile._registerInternalEvents = function() {
var c = function(b, c) {
var d, e, f, g = !0,
j, k;
return !a.mobile.ajaxEnabled || b.is(":jqmData(ajax='false')") || !b.jqmHijackable().length ? !1 : (e = b.attr("target"), f = b.attr("action"), f || (f = F(b), f === s.hrefNoHash && (f = r.hrefNoSearch)), f = h.makeUrlAbsolute(f, F(b)), h.isExternal(f) && !h.isPermittedCrossDomainRequest(r, f) || e ? !1 : (c || (d = b.attr("method"), j = b.serializeArray(), i && i[0].form === b[0] && (k = i.attr("name"), k && (a.each(j, function(a, b) {
if (b.name === k) return k = "", !1
}), k && j.push({
name: k,
value: i.attr("value")
}))), g = {
url: f,
options: {
type: d && d.length && d.toLowerCase() || "get",
data: a.param(j),
transition: b.jqmData("transition"),
reverse: b.jqmData("direction") === "reverse",
reloadPage: !0
}
}), g))
};
a.mobile.document.delegate("form", "submit", function(b) {
var d = c(a(this));
d && (a.mobile.changePage(d.url, d.options), b.preventDefault())
}), a.mobile.document.bind("vclick", function(b) {
var d, e, f = b.target,
g = !1;
if (b.which > 1 || !a.mobile.linkBindingEnabled) return;
i = a(f);
if (a.data(f, "mobile-button")) {
if (!c(a(f).closest("form"), !0)) return;
f.parentNode && (f = f.parentNode)
} else {
f = E(f);
if (!f || h.parseUrl(f.getAttribute("href") || "#").hash === "#") return;
if (!a(f).jqmHijackable().length) return
}~f.className.indexOf("ui-link-inherit") ? f.parentNode && (e = a.data(f.parentNode, "buttonElements")) : e = a.data(f, "buttonElements"), e ? f = e.outer : g = !0, d = a(f), g && (d = d.closest(".ui-btn")), d.length > 0 && !d.hasClass("ui-disabled") && (w(!0), j = d, j.addClass(a.mobile.activeBtnClass))
}), a.mobile.document.bind("click", function(c) {
if (!a.mobile.linkBindingEnabled || c.isDefaultPrevented()) return;
var e = E(c.target),
f = a(e),
g;
if (!e || c.which > 1 || !f.jqmHijackable().length) return;
g = function() {
b.setTimeout(function() {
w(!0)
}, 200)
};
if (f.is(":jqmData(rel='back')")) return a.mobile.back(), !1;
var i = F(f),
j = h.makeUrlAbsolute(f.attr("href") || "#", i);
if (!a.mobile.ajaxEnabled && !h.isEmbeddedPage(j)) {
g();
return
}
if (j.search("#") !== -1) {
j = j.replace(/[^#]*#/, "");
if (!j) {
c.preventDefault();
return
}
h.isPath(j) ? j = h.makeUrlAbsolute(j, i) : j = h.makeUrlAbsolute("#" + j, r.hrefNoHash)
}
var k = f.is("[rel='external']") || f.is(":jqmData(ajax='false')") || f.is("[target]"),
l = k || h.isExternal(j) && !h.isPermittedCrossDomainRequest(r, j);
if (l) {
g();
return
}
var m = f.jqmData("transition"),
n = f.jqmData("direction") === "reverse" || f.jqmData("back"),
o = f.attr("data-" + a.mobile.ns + "rel") || d;
a.mobile.changePage(j, {
transition: m,
reverse: n,
role: o,
link: f
}), c.preventDefault()
}), a.mobile.document.delegate(".ui-page", "pageshow.prefetch", function() {
var b = [];
a(this).find("a:jqmData(prefetch)").each(function() {
var c = a(this),
d = c.attr("href");
d && a.inArray(d, b) === -1 && (b.push(d), a.mobile.loadPage(d, {
role: c.attr("data-" + a.mobile.ns + "rel")
}))
})
}), a.mobile._handleHashChange = function(c, e) {
var f = h.stripHash(c),
g = a.mobile.urlHistory.stack.length === 0 ? "none" : d,
i = {
changeHash: !1,
fromHashChange: !0,
reverse: e.direction === "back"
};
a.extend(i, e, {
transition: (l.getLast() || {}).transition || g
});
if (l.activeIndex > 0 && f.indexOf(p) > -1 && l.initialDst !== f) {
if (a.mobile.activePage && !a.mobile.activePage.is(".ui-dialog")) {
e.direction === "back" ? a.mobile.back() : b.history.forward();
return
}
f = e.pageUrl;
var j = a.mobile.urlHistory.getActive();
a.extend(i, {
role: j.role,
transition: j.transition,
reverse: e.direction === "back"
})
}
f ? (f = h.isPath(f) ? f : h.makeUrlAbsolute("#" + f, s), f === h.makeUrlAbsolute("#" + l.initialDst, s) && l.stack.length && l.stack[0].url !== l.initialDst.replace(p, "") && (f = a.mobile.firstPage), a.mobile.changePage(f, i)) : a.mobile.changePage(a.mobile.firstPage, i)
}, e.bind("navigate", function(b, c) {
var d = a.event.special.navigate.originalEventName.indexOf("hashchange") > -1 ? c.state.hash : c.state.url;
d || (d = a.mobile.path.parseLocation().hash);
if (!d || d === "#" || d.indexOf("#" + a.mobile.path.uiStateKey) === 0) d = location.href;
a.mobile._handleHashChange(d, c.state)
}), a.mobile.document.bind("pageshow", a.mobile.resetActivePageHeight), a.mobile.window.bind("throttledresize", a.mobile.resetActivePageHeight)
}, a(function() {
k.resolve()
}), a.when(k, a.mobile.navreadyDeferred).done(function() {
a.mobile._registerInternalEvents()
})
}(a),
function(a, b, c) {
a.widget("mobile.dialog", a.mobile.widget, {
options: {
closeBtn: "left",
closeBtnText: "Close",
overlayTheme: "a",
corners: !0,
initSelector: ":jqmData(role='dialog')"
},
_handlePageBeforeShow: function() {
this._isCloseable = !0, this.options.overlayTheme && this.element.page("removeContainerBackground").page("setContainerBackground", this.options.overlayTheme)
},
_create: function() {
var b = this,
c = this.element,
d = this.options.corners ? " ui-corner-all" : "",
e = a("", {
role: "dialog",
"class": "ui-dialog-contain ui-overlay-shadow" + d
});
c.addClass("ui-dialog ui-overlay-" + this.options.overlayTheme), c.wrapInner(e), c.bind("vclick submit", function(b) {
var c = a(b.target).closest(b.type === "vclick" ? "a" : "form"),
d;
c.length && !c.jqmData("transition") && (d = a.mobile.urlHistory.getActive() || {}, c.attr("data-" + a.mobile.ns + "transition", d.transition || a.mobile.defaultDialogTransition).attr("data-" + a.mobile.ns + "direction", "reverse"))
}), this._on(c, {
pagebeforeshow: "_handlePageBeforeShow"
}), a.extend(this, {
_createComplete: !1
}), this._setCloseBtn(this.options.closeBtn)
},
_setCloseBtn: function(b) {
var c = this,
d, e;
this._headerCloseButton && (this._headerCloseButton.remove(), this._headerCloseButton = null), b !== "none" && (e = b === "left" ? "left" : "right", d = a("" + this.options.closeBtnText + ""), this.element.children().find(":jqmData(role='header')").first().prepend(d), this._createComplete && a.fn.buttonMarkup && d.buttonMarkup(), this._createComplete = !0, d.bind("click", function() {
c.close()
}), this._headerCloseButton = d)
},
_setOption: function(b, c) {
b === "closeBtn" && (this._setCloseBtn(c), this._super(b, c), this.element.attr("data-" + (a.mobile.ns || "") + "close-btn", c))
},
close: function() {
var b, c, d = a.mobile.navigate.history;
this._isCloseable && (this._isCloseable = !1, a.mobile.hashListeningEnabled && d.activeIndex > 0 ? a.mobile.back() : (b = Math.max(0, d.activeIndex - 1), c = d.stack[b].pageUrl || d.stack[b].url, d.previousIndex = d.activeIndex, d.activeIndex = b, a.mobile.path.isPath(c) || (c = a.mobile.path.makeUrlAbsolute("#" + c)), a.mobile.changePage(c, {
direction: "back",
changeHash: !1,
fromHashChange: !0
})))
}
}), a.mobile.document.delegate(a.mobile.dialog.prototype.options.initSelector, "pagecreate", function() {
a.mobile.dialog.prototype.enhance(this)
})
}(a, this),
function(a, b) {
a.mobile.page.prototype.options.backBtnText = "Back", a.mobile.page.prototype.options.addBackBtn = !1, a.mobile.page.prototype.options.backBtnTheme = null, a.mobile.page.prototype.options.headerTheme = "a", a.mobile.page.prototype.options.footerTheme = "a", a.mobile.page.prototype.options.contentTheme = null, a.mobile.document.bind("pagecreate", function(b) {
var c = a(b.target),
d = c.data("mobile-page").options,
e = c.jqmData("role"),
f = d.theme;
a(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')", c).jqmEnhanceable().each(function() {
var b = a(this),
g = b.jqmData("role"),
h = b.jqmData("theme"),
i = h || d.contentTheme || e === "dialog" && f,
j, k, l, m;
b.addClass("ui-" + g);
if (g === "header" || g === "footer") {
var n = h || (g === "header" ? d.headerTheme : d.footerTheme) || f;
b.addClass("ui-bar-" + n).attr("role", g === "header" ? "banner" : "contentinfo"), g === "header" && (j = b.children("a, button"), k = j.hasClass("ui-btn-left"), l = j.hasClass("ui-btn-right"), k = k || j.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length, l = l || j.eq(1).addClass("ui-btn-right").length), d.addBackBtn && g === "header" && a(".ui-page").length > 1 && c.jqmData("url") !== a.mobile.path.stripHash(location.hash) && !k && (m = a("" + d.backBtnText + "").attr("data-" + a.mobile.ns + "theme", d.backBtnTheme || n).prependTo(b)), b.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({
role: "heading",
"aria-level": "1"
})
} else g === "content" && (i && b.addClass("ui-body-" + i), b.attr("role", "main"))
})
})
}(a),
function(a, b) {
a.widget("mobile.fixedtoolbar", a.mobile.widget, {
options: {
visibleOnPageShow: !0,
disablePageZoom: !0,
transition: "slide",
fullscreen: !1,
tapToggle: !0,
tapToggleBlacklist: "a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-popup, .ui-panel, .ui-panel-dismiss-open",
hideDuringFocus: "input, textarea, select",
updatePagePadding: !0,
trackPersistentToolbars: !0,
supportBlacklist: function() {
return !a.support.fixedPosition
},
initSelector: ":jqmData(position='fixed')"
},
_create: function() {
var b = this,
c = b.options,
d = b.element,
e = d.is(":jqmData(role='header')") ? "header" : "footer",
f = d.closest(".ui-page");
if (c.supportBlacklist()) {
b.destroy();
return
}
d.addClass("ui-" + e + "-fixed"), c.fullscreen ? (d.addClass("ui-" + e + "-fullscreen"), f.addClass("ui-page-" + e + "-fullscreen")) : f.addClass("ui-page-" + e + "-fixed"), a.extend(this, {
_thisPage: null
}), b._addTransitionClass(), b._bindPageEvents(), b._bindToggleHandlers()
},
_addTransitionClass: function() {
var a = this.options.transition;
a && a !== "none" && (a === "slide" && (a = this.element.is(".ui-header") ? "slidedown" : "slideup"), this.element.addClass(a))
},
_bindPageEvents: function() {
this._thisPage = this.element.closest(".ui-page"), this._on(this._thisPage, {
pagebeforeshow: "_handlePageBeforeShow",
webkitAnimationStart: "_handleAnimationStart",
animationstart: "_handleAnimationStart",
updatelayout: "_handleAnimationStart",
pageshow: "_handlePageShow",
pagebeforehide: "_handlePageBeforeHide"
})
},
_handlePageBeforeShow: function() {
var b = this.options;
b.disablePageZoom && a.mobile.zoom.disable(!0), b.visibleOnPageShow || this.hide(!0)
},
_handleAnimationStart: function() {
this.options.updatePagePadding && this.updatePagePadding(this._thisPage)
},
_handlePageShow: function() {
this.updatePagePadding(this._thisPage), this.options.updatePagePadding && this._on(a.mobile.window, {
throttledresize: "updatePagePadding"
})
},
_handlePageBeforeHide: function(b, c) {
var d = this.options;
d.disablePageZoom && a.mobile.zoom.enable(!0), d.updatePagePadding && this._off(a.mobile.window, "throttledresize");
if (d.trackPersistentToolbars) {
var e = a(".ui-footer-fixed:jqmData(id)", this._thisPage),
f = a(".ui-header-fixed:jqmData(id)", this._thisPage),
g = e.length && c.nextPage && a(".ui-footer-fixed:jqmData(id='" + e.jqmData("id") + "')", c.nextPage) || a(),
h = f.length && c.nextPage && a(".ui-header-fixed:jqmData(id='" + f.jqmData("id") + "')", c.nextPage) || a();
if (g.length || h.length) g.add(h).appendTo(a.mobile.pageContainer), c.nextPage.one("pageshow", function() {
h.prependTo(this), g.appendTo(this)
})
}
},
_visible: !0,
updatePagePadding: function(b) {
var c = this.element,
d = c.is(".ui-header"),
e = parseFloat(c.css(d ? "top" : "bottom"));
if (this.options.fullscreen) return;
b = b || this._thisPage || c.closest(".ui-page"), a(b).css("padding-" + (d ? "top" : "bottom"), c.outerHeight() + e)
},
_useTransition: function(b) {
var c = a.mobile.window,
d = this.element,
e = c.scrollTop(),
f = d.height(),
g = d.closest(".ui-page").height(),
h = a.mobile.getScreenHeight(),
i = d.is(":jqmData(role='header')") ? "header" : "footer";
return !b && (this.options.transition && this.options.transition !== "none" && (i === "header" && !this.options.fullscreen && e > f || i === "footer" && !this.options.fullscreen && e + h < g - f) || this.options.fullscreen)
},
show: function(a) {
var b = "ui-fixed-hidden",
c = this.element;
this._useTransition(a) ? c.removeClass("out " + b).addClass("in").animationComplete(function() {
c.removeClass("in")
}) : c.removeClass(b), this._visible = !0
},
hide: function(a) {
var b = "ui-fixed-hidden",
c = this.element,
d = "out" + (this.options.transition === "slide" ? " reverse" : "");
this._useTransition(a) ? c.addClass(d).removeClass("in").animationComplete(function() {
c.addClass(b).removeClass(d)
}) : c.addClass(b).removeClass(d), this._visible = !1
},
toggle: function() {
this[this._visible ? "hide" : "show"]()
},
_bindToggleHandlers: function() {
var b = this,
c, d = b.options,
e = b.element;
e.closest(".ui-page").bind("vclick", function(c) {
d.tapToggle && !a(c.target).closest(d.tapToggleBlacklist).length && b.toggle()
}).bind("focusin focusout", function(e) {
screen.width < 1025 && a(e.target).is(d.hideDuringFocus) && !a(e.target).closest(".ui-header-fixed, .ui-footer-fixed").length && (e.type === "focusout" && !b._visible ? c = setTimeout(function() {
b.show()
}, 0) : e.type === "focusin" && b._visible && (clearTimeout(c), b.hide()))
})
},
_destroy: function() {
var a = this.element,
b = a.is(".ui-header");
a.closest(".ui-page").css("padding-" + (b ? "top" : "bottom"), ""), a.removeClass("ui-header-fixed ui-footer-fixed ui-header-fullscreen ui-footer-fullscreen in out fade slidedown slideup ui-fixed-hidden"), a.closest(".ui-page").removeClass("ui-page-header-fixed ui-page-footer-fixed ui-page-header-fullscreen ui-page-footer-fullscreen")
}
}), a.mobile.document.bind("pagecreate create", function(b) {
a(b.target).jqmData("fullscreen") && a(a.mobile.fixedtoolbar.prototype.options.initSelector, b.target).not(":jqmData(fullscreen)").jqmData("fullscreen", !0), a.mobile.fixedtoolbar.prototype.enhanceWithin(b.target)
})
}(a),
function(a, b) {
a.widget("mobile.fixedtoolbar", a.mobile.fixedtoolbar, {
_create: function() {
this._super(), this._workarounds()
},
_workarounds: function() {
var a = navigator.userAgent,
b = navigator.platform,
c = a.match(/AppleWebKit\/([0-9]+)/),
d = !!c && c[1],
e = null,
f = this;
if (b.indexOf("iPhone") > -1 || b.indexOf("iPad") > -1 || b.indexOf("iPod") > -1) e = "ios";
else {
if (!(a.indexOf("Android") > -1)) return;
e = "android"
}
if (e === "ios") f._bindScrollWorkaround();
else {
if (!(e === "android" && d && d < 534)) return;
f._bindScrollWorkaround(), f._bindListThumbWorkaround()
}
},
_viewportOffset: function() {
var b = this.element,
c = b.is(".ui-header"),
d = Math.abs(b.offset().top - a.mobile.window.scrollTop());
return c || (d = Math.round(d - a.mobile.window.height() + b.outerHeight()) - 60), d
},
_bindScrollWorkaround: function() {
var b = this;
this._on(a.mobile.window, {
scrollstop: function() {
var a = b._viewportOffset();
a > 2 && b._visible && b._triggerRedraw()
}
})
},
_bindListThumbWorkaround: function() {
this.element.closest(".ui-page").addClass("ui-android-2x-fixed")
},
_triggerRedraw: function() {
var b = parseFloat(a(".ui-page-active").css("padding-bottom"));
a(".ui-page-active").css("padding-bottom", b + 1 + "px"), setTimeout(function() {
a(".ui-page-active").css("padding-bottom", b + "px")
}, 0)
},
destroy: function() {
this._super(), this.element.closest(".ui-page-active").removeClass("ui-android-2x-fix")
}
})
}(a),
function(a, b) {
var d = {};
a.widget("mobile.listview", a.mobile.widget, {
options: {
theme: null,
countTheme: "c",
headerTheme: "b",
dividerTheme: "b",
icon: "arrow-r",
splitIcon: "arrow-r",
splitTheme: "b",
corners: !0,
shadow: !0,
inset: !1,
initSelector: ":jqmData(role='listview')"
},
_create: function() {
var a = this,
b = "";
b += a.options.inset ? " ui-listview-inset" : "", !a.options.inset || (b += a.options.corners ? " ui-corner-all" : "", b += a.options.shadow ? " ui-shadow" : ""), a.element.addClass(function(a, c) {
return c + " ui-listview" + b
}), a.refresh(!0)
},
_findFirstElementByTagName: function(a, b, c, d) {
var e = {};
e[c] = e[d] = !0;
while (a) {
if (e[a.nodeName]) return a;
a = a[b]
}
return null
},
_getChildrenByTagName: function(b, c, d) {
var e = [],
f = {};
f[c] = f[d] = !0, b = b.firstChild;
while (b) f[b.nodeName] && e.push(b), b = b.nextSibling;
return a(e)
},
_addThumbClasses: function(b) {
var c, d, e = b.length;
for (c = 0; c < e; c++) d = a(this._findFirstElementByTagName(b[c].firstChild, "nextSibling", "img", "IMG")), d.length && (d.addClass("ui-li-thumb"), a(this._findFirstElementByTagName(d[0].parentNode, "parentNode", "li", "LI")).addClass(d.is(".ui-li-icon") ? "ui-li-has-icon" : "ui-li-has-thumb"))
},
refresh: function(b) {
this.parentPage = this.element.closest(".ui-page"), this._createSubPages();
var d = this.options,
e = this.element,
f = this,
g = e.jqmData("dividertheme") || d.dividerTheme,
h = e.jqmData("splittheme"),
i = e.jqmData("spliticon"),
j = e.jqmData("icon"),
k = this._getChildrenByTagName(e[0], "li", "LI"),
l = !!a.nodeName(e[0], "ol"),
m = !a.support.cssPseudoElement,
n = e.attr("start"),
o = {},
p, q, r, s, t, u, v, w, x, y, z, A, B, C;
l && m && e.find(".ui-li-dec").remove(), l && (n || n === 0 ? m ? v = parseInt(n, 10) : (w = parseInt(n, 10) - 1, e.css("counter-reset", "listnumbering " + w)) : m && (v = 1)), d.theme || (d.theme = a.mobile.getInheritedTheme(this.element, "c"));
for (var D = 0, E = k.length; D < E; D++) {
p = k.eq(D), q = "ui-li";
if (b || !p.hasClass("ui-li")) {
r = p.jqmData("theme") || d.theme, s = this._getChildrenByTagName(p[0], "a", "A");
var F = p.jqmData("role") === "list-divider";
s.length && !F ? (z = p.jqmData("icon"), p.buttonMarkup({
wrapperEls: "div",
shadow: !1,
corners: !1,
iconpos: "right",
icon: s.length > 1 || z === !1 ? !1 : z || j || d.icon,
theme: r
}), z !== !1 && s.length === 1 && p.addClass("ui-li-has-arrow"), s.first().removeClass("ui-link").addClass("ui-link-inherit"), s.length > 1 && (q += " ui-li-has-alt", t = s.last(), u = h || t.jqmData("theme") || d.splitTheme, C = t.jqmData("icon"), t.appendTo(p).attr("title", a.trim(t.getEncodedText())).addClass("ui-li-link-alt").empty().buttonMarkup({
shadow: !1,
corners: !1,
theme: r,
icon: !1,
iconpos: "notext"
}).find(".ui-btn-inner").append(a(c.createElement("span")).buttonMarkup({
shadow: !0,
corners: !0,
theme: u,
iconpos: "notext",
icon: C || z || i || d.splitIcon
})))) : F ? (q += " ui-li-divider ui-bar-" + (p.jqmData("theme") || g), p.attr("role", "heading"), l && (n || n === 0 ? m ? v = parseInt(n, 10) : (x = parseInt(n, 10) - 1, p.css("counter-reset", "listnumbering " + x)) : m && (v = 1))) : q += " ui-li-static ui-btn-up-" + r
}
l && m && q.indexOf("ui-li-divider") < 0 && (y = q.indexOf("ui-li-static") > 0 ? p : p.find(".ui-link-inherit"), y.addClass("ui-li-jsnumbering").prepend("" + v++ + ". ")), o[q] || (o[q] = []), o[q].push(p[0])
}
for (q in o) a(o[q]).addClass(q).children(".ui-btn-inner").addClass(q);
e.find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(".ui-li-aside").each(function() {
var b = a(this);
b.prependTo(b.parent())
}).end().find(".ui-li-count").each(function() {
a(this).closest("li").addClass("ui-li-has-count")
}).addClass("ui-btn-up-" + (e.jqmData("counttheme") || this.options.countTheme) + " ui-btn-corner-all"), this._addThumbClasses(k), this._addThumbClasses(e.find(".ui-link-inherit")), this._addFirstLastClasses(k, this._getVisibles(k, b), b), this._trigger("afterrefresh")
},
_idStringEscape: function(a) {
return a.replace(/[^a-zA-Z0-9]/g, "-")
},
_createSubPages: function() {
var b = this.element,
c = b.closest(".ui-page"),
e = c.jqmData("url"),
f = e || c[0][a.expando],
g = b.attr("id"),
h = this.options,
i = "data-" + a.mobile.ns,
j = this,
k = c.find(":jqmData(role='footer')").jqmData("id"),
l;
typeof d[f] == "undefined" && (d[f] = -1), g = g || ++d[f], a(b.find("li>ul, li>ol").toArray().reverse()).each(function(c) {
var d = this,
f = a(this),
j = f.attr("id") || g + "-" + c,
m = f.parent(),
n = a(f.prevAll().toArray().reverse()),
p = n.length ? n : a("" + a.trim(m.contents()[0].nodeValue) + ""),
q = p.first().getEncodedText(),
r = (e || "") + "&" + a.mobile.subPageUrlKey + "=" + j,
s = f.jqmData("theme") || h.theme,
t = f.jqmData("counttheme") || b.jqmData("counttheme") || h.countTheme,
u, v;
l = !0, u = f.detach().wrap("").parent().before("").after(k ? a("") : "").parent().appendTo(a.mobile.pageContainer), u.page(), v = m.find("a:first"), v.length || (v = a("
").html(p || q).prependTo(m.empty())), v.attr("href", "#" + r)
}).listview();
if (l && c.is(":jqmData(external-page='true')") && c.data("mobile-page").options.domCache === !1) {
var m = function(b, d) {
var f = d.nextPage,
g, h = new a.Event("pageremove");
d.nextPage && (g = f.jqmData("url"), g.indexOf(e + "&" + a.mobile.subPageUrlKey) !== 0 && (j.childPages().remove(), c.trigger(h), h.isDefaultPrevented() || c.removeWithDependents()))
};
c.unbind("pagehide.remove").bind("pagehide.remove", m)
}
},
childPages: function() {
var b = this.parentPage.jqmData("url");
return a(":jqmData(url^='" + b + "&" + a.mobile.subPageUrlKey + "')")
}
}), a.widget("mobile.listview", a.mobile.listview, a.mobile.behaviors.addFirstLastClasses), a.mobile.document.bind("pagecreate create", function(b) {
a.mobile.listview.prototype.enhanceWithin(b.target)
})
}(a),
function(a, b) {
a.mobile.listview.prototype.options.autodividers = !1, a.mobile.listview.prototype.options.autodividersSelector = function(b) {
var c = a.trim(b.text()) || null;
return c ? (c = c.slice(0, 1).toUpperCase(), c) : null
}, a.mobile.document.delegate("ul,ol", "listviewcreate", function() {
var b = a(this),
d = b.data("mobile-listview");
if (!d || !d.options.autodividers) return;
var e = function() {
b.find("li:jqmData(role='list-divider')").remove();
var e = b.find("li"),
f = null,
g, h;
for (var i = 0; i < e.length; i++) {
g = e[i], h = d.options.autodividersSelector(a(g));
if (h && f !== h) {
var j = c.createElement("li");
j.appendChild(c.createTextNode(h)), j.setAttribute("data-" + a.mobile.ns + "role", "list-divider"), g.parentNode.insertBefore(j, g)
}
f = h
}
},
f = function() {
b.unbind("listviewafterrefresh", f), e(), d.refresh(), b.bind("listviewafterrefresh", f)
};
f()
})
}(a),
function(a, b) {
a.mobile.listview.prototype.options.filter = !1, a.mobile.listview.prototype.options.filterPlaceholder = "Filter items...", a.mobile.listview.prototype.options.filterTheme = "c", a.mobile.listview.prototype.options.filterReveal = !1;
var c = function(a, b, c) {
return a.toString().toLowerCase().indexOf(b) === -1
};
a.mobile.listview.prototype.options.filterCallback = c, a.mobile.document.delegate("ul, ol", "listviewcreate", function() {
var b = a(this),
d = b.data("mobile-listview");
if (!d.options.filter) return;
d.options.filterReveal && b.children().addClass("ui-screen-hidden");
var e = a("