androlizer

amu

Oct 4th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*! jQuery Mobile 1.4.4 | Git HEADhash: b4150fb <> 2014-09-12T16:43:26Z | (c) 2010, 2014 jQuery Foundation, Inc. | jquery.org/license */
  2. ! function(a, b, c) {
  3.     "function" == typeof define && define.amd ? define(["jquery"], function(d) {
  4.         return c(d, a, b), d.mobile
  5.     }) : c(a.jQuery, a, b)
  6. }(this, document, function(a, b, c) {
  7.     ! function(a) {
  8.         a.mobile = {}
  9.     }(a),
  10.     function(a) {
  11.         a.extend(a.mobile, {
  12.             version: "1.4.4",
  13.             subPageUrlKey: "ui-page",
  14.             hideUrlBar: !0,
  15.             keepNative: ":jqmData(role='none'), :jqmData(role='nojs')",
  16.             activePageClass: "ui-page-active",
  17.             activeBtnClass: "ui-btn-active",
  18.             focusClass: "ui-focus",
  19.             ajaxEnabled: !0,
  20.             hashListeningEnabled: !0,
  21.             linkBindingEnabled: !0,
  22.             defaultPageTransition: "fade",
  23.             maxTransitionWidth: !1,
  24.             minScrollBack: 0,
  25.             defaultDialogTransition: "pop",
  26.             pageLoadErrorMessage: "Error Loading Page",
  27.             pageLoadErrorMessageTheme: "a",
  28.             phonegapNavigationEnabled: !1,
  29.             autoInitializePage: !0,
  30.             pushStateEnabled: !0,
  31.             ignoreContentEnabled: !1,
  32.             buttonMarkup: {
  33.                 hoverDelay: 200
  34.             },
  35.             dynamicBaseEnabled: !0,
  36.             pageContainer: a(),
  37.             allowCrossDomainPages: !1,
  38.             dialogHashKey: "&ui-state=dialog"
  39.         })
  40.     }(a, this),
  41.     function(a, b, c) {
  42.         var d = {},
  43.             e = a.find,
  44.             f = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
  45.             g = /:jqmData\(([^)]*)\)/g;
  46.         a.extend(a.mobile, {
  47.             ns: "",
  48.             getAttribute: function(b, c) {
  49.                 var d;
  50.                 b = b.jquery ? b[0] : b, b && b.getAttribute && (d = b.getAttribute("data-" + a.mobile.ns + c));
  51.                 try {
  52.                     d = "true" === d ? !0 : "false" === d ? !1 : "null" === d ? null : +d + "" === d ? +d : f.test(d) ? JSON.parse(d) : d
  53.                 } catch (e) {}
  54.                 return d
  55.             },
  56.             nsNormalizeDict: d,
  57.             nsNormalize: function(b) {
  58.                 return d[b] || (d[b] = a.camelCase(a.mobile.ns + b))
  59.             },
  60.             closestPageData: function(a) {
  61.                 return a.closest(":jqmData(role='page'), :jqmData(role='dialog')").data("mobile-page")
  62.             }
  63.         }), a.fn.jqmData = function(b, d) {
  64.             var e;
  65.             return "undefined" != typeof b && (b && (b = a.mobile.nsNormalize(b)), e = arguments.length < 2 || d === c ? this.data(b) : this.data(b, d)), e
  66.         }, a.jqmData = function(b, c, d) {
  67.             var e;
  68.             return "undefined" != typeof c && (e = a.data(b, c ? a.mobile.nsNormalize(c) : c, d)), e
  69.         }, a.fn.jqmRemoveData = function(b) {
  70.             return this.removeData(a.mobile.nsNormalize(b))
  71.         }, a.jqmRemoveData = function(b, c) {
  72.             return a.removeData(b, a.mobile.nsNormalize(c))
  73.         }, a.find = function(b, c, d, f) {
  74.             return b.indexOf(":jqmData") > -1 && (b = b.replace(g, "[data-" + (a.mobile.ns || "") + "$1]")), e.call(this, b, c, d, f)
  75.         }, a.extend(a.find, e)
  76.     }(a, this),
  77.     function(a, b) {
  78.         function d(b, c) {
  79.             var d, f, g, h = b.nodeName.toLowerCase();
  80.             return "area" === h ? (d = b.parentNode, f = d.name, b.href && f && "map" === d.nodeName.toLowerCase() ? (g = a("img[usemap=#" + f + "]")[0], !!g && e(g)) : !1) : (/input|select|textarea|button|object/.test(h) ? !b.disabled : "a" === h ? b.href || c : c) && e(b)
  81.         }
  82.  
  83.         function e(b) {
  84.             return a.expr.filters.visible(b) && !a(b).parents().addBack().filter(function() {
  85.                 return "hidden" === a.css(this, "visibility")
  86.             }).length
  87.         }
  88.         var f = 0,
  89.             g = /^ui-id-\d+$/;
  90.         a.ui = a.ui || {}, a.extend(a.ui, {
  91.             version: "c0ab71056b936627e8a7821f03c044aec6280a40",
  92.             keyCode: {
  93.                 BACKSPACE: 8,
  94.                 COMMA: 188,
  95.                 DELETE: 46,
  96.                 DOWN: 40,
  97.                 END: 35,
  98.                 ENTER: 13,
  99.                 ESCAPE: 27,
  100.                 HOME: 36,
  101.                 LEFT: 37,
  102.                 PAGE_DOWN: 34,
  103.                 PAGE_UP: 33,
  104.                 PERIOD: 190,
  105.                 RIGHT: 39,
  106.                 SPACE: 32,
  107.                 TAB: 9,
  108.                 UP: 38
  109.             }
  110.         }), a.fn.extend({
  111.             focus: function(b) {
  112.                 return function(c, d) {
  113.                     return "number" == typeof c ? this.each(function() {
  114.                         var b = this;
  115.                         setTimeout(function() {
  116.                             a(b).focus(), d && d.call(b)
  117.                         }, c)
  118.                     }) : b.apply(this, arguments)
  119.                 }
  120.             }(a.fn.focus),
  121.             scrollParent: function() {
  122.                 var b;
  123.                 return b = a.ui.ie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function() {
  124.                     return /(relative|absolute|fixed)/.test(a.css(this, "position")) && /(auto|scroll)/.test(a.css(this, "overflow") + a.css(this, "overflow-y") + a.css(this, "overflow-x"))
  125.                 }).eq(0) : this.parents().filter(function() {
  126.                     return /(auto|scroll)/.test(a.css(this, "overflow") + a.css(this, "overflow-y") + a.css(this, "overflow-x"))
  127.                 }).eq(0), /fixed/.test(this.css("position")) || !b.length ? a(this[0].ownerDocument || c) : b
  128.             },
  129.             uniqueId: function() {
  130.                 return this.each(function() {
  131.                     this.id || (this.id = "ui-id-" + ++f)
  132.                 })
  133.             },
  134.             removeUniqueId: function() {
  135.                 return this.each(function() {
  136.                     g.test(this.id) && a(this).removeAttr("id")
  137.                 })
  138.             }
  139.         }), a.extend(a.expr[":"], {
  140.             data: a.expr.createPseudo ? a.expr.createPseudo(function(b) {
  141.                 return function(c) {
  142.                     return !!a.data(c, b)
  143.                 }
  144.             }) : function(b, c, d) {
  145.                 return !!a.data(b, d[3])
  146.             },
  147.             focusable: function(b) {
  148.                 return d(b, !isNaN(a.attr(b, "tabindex")))
  149.             },
  150.             tabbable: function(b) {
  151.                 var c = a.attr(b, "tabindex"),
  152.                     e = isNaN(c);
  153.                 return (e || c >= 0) && d(b, !e)
  154.             }
  155.         }), a("<a>").outerWidth(1).jquery || a.each(["Width", "Height"], function(c, d) {
  156.             function e(b, c, d, e) {
  157.                 return a.each(f, function() {
  158.                     c -= parseFloat(a.css(b, "padding" + this)) || 0, d && (c -= parseFloat(a.css(b, "border" + this + "Width")) || 0), e && (c -= parseFloat(a.css(b, "margin" + this)) || 0)
  159.                 }), c
  160.             }
  161.             var f = "Width" === d ? ["Left", "Right"] : ["Top", "Bottom"],
  162.                 g = d.toLowerCase(),
  163.                 h = {
  164.                     innerWidth: a.fn.innerWidth,
  165.                     innerHeight: a.fn.innerHeight,
  166.                     outerWidth: a.fn.outerWidth,
  167.                     outerHeight: a.fn.outerHeight
  168.                 };
  169.             a.fn["inner" + d] = function(c) {
  170.                 return c === b ? h["inner" + d].call(this) : this.each(function() {
  171.                     a(this).css(g, e(this, c) + "px")
  172.                 })
  173.             }, a.fn["outer" + d] = function(b, c) {
  174.                 return "number" != typeof b ? h["outer" + d].call(this, b) : this.each(function() {
  175.                     a(this).css(g, e(this, b, !0, c) + "px")
  176.                 })
  177.             }
  178.         }), a.fn.addBack || (a.fn.addBack = function(a) {
  179.             return this.add(null == a ? this.prevObject : this.prevObject.filter(a))
  180.         }), a("<a>").data("a-b", "a").removeData("a-b").data("a-b") && (a.fn.removeData = function(b) {
  181.             return function(c) {
  182.                 return arguments.length ? b.call(this, a.camelCase(c)) : b.call(this)
  183.             }
  184.         }(a.fn.removeData)), a.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()), a.support.selectstart = "onselectstart" in c.createElement("div"), a.fn.extend({
  185.             disableSelection: function() {
  186.                 return this.bind((a.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function(a) {
  187.                     a.preventDefault()
  188.                 })
  189.             },
  190.             enableSelection: function() {
  191.                 return this.unbind(".ui-disableSelection")
  192.             },
  193.             zIndex: function(d) {
  194.                 if (d !== b) return this.css("zIndex", d);
  195.                 if (this.length)
  196.                     for (var e, f, g = a(this[0]); g.length && g[0] !== c;) {
  197.                         if (e = g.css("position"), ("absolute" === e || "relative" === e || "fixed" === e) && (f = parseInt(g.css("zIndex"), 10), !isNaN(f) && 0 !== f)) return f;
  198.                         g = g.parent()
  199.                     }
  200.                 return 0
  201.             }
  202.         }), a.ui.plugin = {
  203.             add: function(b, c, d) {
  204.                 var e, f = a.ui[b].prototype;
  205.                 for (e in d) f.plugins[e] = f.plugins[e] || [], f.plugins[e].push([c, d[e]])
  206.             },
  207.             call: function(a, b, c, d) {
  208.                 var e, f = a.plugins[b];
  209.                 if (f && (d || a.element[0].parentNode && 11 !== a.element[0].parentNode.nodeType))
  210.                     for (e = 0; e < f.length; e++) a.options[f[e][0]] && f[e][1].apply(a.element, c)
  211.             }
  212.         }
  213.     }(a),
  214.     function(a, b) {
  215.         var d = function(b, c) {
  216.             var d = b.parent(),
  217.                 e = [],
  218.                 f = d.children(":jqmData(role='header')"),
  219.                 g = b.children(":jqmData(role='header')"),
  220.                 h = d.children(":jqmData(role='footer')"),
  221.                 i = b.children(":jqmData(role='footer')");
  222.             return 0 === g.length && f.length > 0 && (e = e.concat(f.toArray())), 0 === i.length && h.length > 0 && (e = e.concat(h.toArray())), a.each(e, function(b, d) {
  223.                 c -= a(d).outerHeight()
  224.             }), Math.max(0, c)
  225.         };
  226.         a.extend(a.mobile, {
  227.             window: a(b),
  228.             document: a(c),
  229.             keyCode: a.ui.keyCode,
  230.             behaviors: {},
  231.             silentScroll: function(c) {
  232.                 "number" !== a.type(c) && (c = a.mobile.defaultHomeScroll), a.event.special.scrollstart.enabled = !1, setTimeout(function() {
  233.                     b.scrollTo(0, c), a.mobile.document.trigger("silentscroll", {
  234.                         x: 0,
  235.                         y: c
  236.                     })
  237.                 }, 20), setTimeout(function() {
  238.                     a.event.special.scrollstart.enabled = !0
  239.                 }, 150)
  240.             },
  241.             getClosestBaseUrl: function(b) {
  242.                 var c = a(b).closest(".ui-page").jqmData("url"),
  243.                     d = a.mobile.path.documentBase.hrefNoHash;
  244.                 return a.mobile.dynamicBaseEnabled && c && a.mobile.path.isPath(c) || (c = d), a.mobile.path.makeUrlAbsolute(c, d)
  245.             },
  246.             removeActiveLinkClass: function(b) {
  247.                 !a.mobile.activeClickedLink || a.mobile.activeClickedLink.closest("." + a.mobile.activePageClass).length && !b || a.mobile.activeClickedLink.removeClass(a.mobile.activeBtnClass), a.mobile.activeClickedLink = null
  248.             },
  249.             getInheritedTheme: function(a, b) {
  250.                 for (var c, d, e = a[0], f = "", g = /ui-(bar|body|overlay)-([a-z])\b/; e && (c = e.className || "", !(c && (d = g.exec(c)) && (f = d[2])));) e = e.parentNode;
  251.                 return f || b || "a"
  252.             },
  253.             enhanceable: function(a) {
  254.                 return this.haveParents(a, "enhance")
  255.             },
  256.             hijackable: function(a) {
  257.                 return this.haveParents(a, "ajax")
  258.             },
  259.             haveParents: function(b, c) {
  260.                 if (!a.mobile.ignoreContentEnabled) return b;
  261.                 var d, e, f, g, h, i = b.length,
  262.                     j = a();
  263.                 for (g = 0; i > g; g++) {
  264.                     for (e = b.eq(g), f = !1, d = b[g]; d;) {
  265.                         if (h = d.getAttribute ? d.getAttribute("data-" + a.mobile.ns + c) : "", "false" === h) {
  266.                             f = !0;
  267.                             break
  268.                         }
  269.                         d = d.parentNode
  270.                     }
  271.                     f || (j = j.add(e))
  272.                 }
  273.                 return j
  274.             },
  275.             getScreenHeight: function() {
  276.                 return b.innerHeight || a.mobile.window.height()
  277.             },
  278.             resetActivePageHeight: function(b) {
  279.                 var c = a("." + a.mobile.activePageClass),
  280.                     e = c.height(),
  281.                     f = c.outerHeight(!0);
  282.                 b = d(c, "number" == typeof b ? b : a.mobile.getScreenHeight()), c.css("min-height", ""), c.height() < b && c.css("min-height", b - (f - e))
  283.             },
  284.             loading: function() {
  285.                 var b = this.loading._widget || a(a.mobile.loader.prototype.defaultHtml).loader(),
  286.                     c = b.loader.apply(b, arguments);
  287.                 return this.loading._widget = b, c
  288.             }
  289.         }), a.addDependents = function(b, c) {
  290.             var d = a(b),
  291.                 e = d.jqmData("dependents") || a();
  292.             d.jqmData("dependents", a(e).add(c))
  293.         }, a.fn.extend({
  294.             removeWithDependents: function() {
  295.                 a.removeWithDependents(this)
  296.             },
  297.             enhanceWithin: function() {
  298.                 var b, c = {},
  299.                     d = a.mobile.page.prototype.keepNativeSelector(),
  300.                     e = this;
  301.                 a.mobile.nojs && a.mobile.nojs(this), a.mobile.links && a.mobile.links(this), a.mobile.degradeInputsWithin && a.mobile.degradeInputsWithin(this), a.fn.buttonMarkup && this.find(a.fn.buttonMarkup.initSelector).not(d).jqmEnhanceable().buttonMarkup(), a.fn.fieldcontain && this.find(":jqmData(role='fieldcontain')").not(d).jqmEnhanceable().fieldcontain(), a.each(a.mobile.widgets, function(b, f) {
  302.                     if (f.initSelector) {
  303.                         var g = a.mobile.enhanceable(e.find(f.initSelector));
  304.                         g.length > 0 && (g = g.not(d)), g.length > 0 && (c[f.prototype.widgetName] = g)
  305.                     }
  306.                 });
  307.                 for (b in c) c[b][b]();
  308.                 return this
  309.             },
  310.             addDependents: function(b) {
  311.                 a.addDependents(this, b)
  312.             },
  313.             getEncodedText: function() {
  314.                 return a("<a>").text(this.text()).html()
  315.             },
  316.             jqmEnhanceable: function() {
  317.                 return a.mobile.enhanceable(this)
  318.             },
  319.             jqmHijackable: function() {
  320.                 return a.mobile.hijackable(this)
  321.             }
  322.         }), a.removeWithDependents = function(b) {
  323.             var c = a(b);
  324.             (c.jqmData("dependents") || a()).remove(), c.remove()
  325.         }, a.addDependents = function(b, c) {
  326.             var d = a(b),
  327.                 e = d.jqmData("dependents") || a();
  328.             d.jqmData("dependents", a(e).add(c))
  329.         }, a.find.matches = function(b, c) {
  330.             return a.find(b, null, null, c)
  331.         }, a.find.matchesSelector = function(b, c) {
  332.             return a.find(c, null, null, [b]).length > 0
  333.         }
  334.     }(a, this),
  335.     function(a, b) {
  336.         var c = 0,
  337.             d = Array.prototype.slice,
  338.             e = a.cleanData;
  339.         a.cleanData = function(b) {
  340.             for (var c, d = 0; null != (c = b[d]); d++) try {
  341.                 a(c).triggerHandler("remove")
  342.             } catch (f) {}
  343.             e(b)
  344.         }, a.widget = function(b, c, d) {
  345.             var e, f, g, h, i = {},
  346.                 j = b.split(".")[0];
  347.             return b = b.split(".")[1], e = j + "-" + b, d || (d = c, c = a.Widget), a.expr[":"][e.toLowerCase()] = function(b) {
  348.                 return !!a.data(b, e)
  349.             }, a[j] = a[j] || {}, f = a[j][b], g = a[j][b] = function(a, b) {
  350.                 return this._createWidget ? void(arguments.length && this._createWidget(a, b)) : new g(a, b)
  351.             }, a.extend(g, f, {
  352.                 version: d.version,
  353.                 _proto: a.extend({}, d),
  354.                 _childConstructors: []
  355.             }), h = new c, h.options = a.widget.extend({}, h.options), a.each(d, function(b, d) {
  356.                 return a.isFunction(d) ? void(i[b] = function() {
  357.                     var a = function() {
  358.                             return c.prototype[b].apply(this, arguments)
  359.                         },
  360.                         e = function(a) {
  361.                             return c.prototype[b].apply(this, a)
  362.                         };
  363.                     return function() {
  364.                         var b, c = this._super,
  365.                             f = this._superApply;
  366.                         return this._super = a, this._superApply = e, b = d.apply(this, arguments), this._super = c, this._superApply = f, b
  367.                     }
  368.                 }()) : void(i[b] = d)
  369.             }), g.prototype = a.widget.extend(h, {
  370.                 widgetEventPrefix: f ? h.widgetEventPrefix || b : b
  371.             }, i, {
  372.                 constructor: g,
  373.                 namespace: j,
  374.                 widgetName: b,
  375.                 widgetFullName: e
  376.             }), f ? (a.each(f._childConstructors, function(b, c) {
  377.                 var d = c.prototype;
  378.                 a.widget(d.namespace + "." + d.widgetName, g, c._proto)
  379.             }), delete f._childConstructors) : c._childConstructors.push(g), a.widget.bridge(b, g), g
  380.         }, a.widget.extend = function(c) {
  381.             for (var e, f, g = d.call(arguments, 1), h = 0, i = g.length; i > h; h++)
  382.                 for (e in g[h]) f = g[h][e], g[h].hasOwnProperty(e) && f !== b && (c[e] = a.isPlainObject(f) ? a.isPlainObject(c[e]) ? a.widget.extend({}, c[e], f) : a.widget.extend({}, f) : f);
  383.             return c
  384.         }, a.widget.bridge = function(c, e) {
  385.             var f = e.prototype.widgetFullName || c;
  386.             a.fn[c] = function(g) {
  387.                 var h = "string" == typeof g,
  388.                     i = d.call(arguments, 1),
  389.                     j = this;
  390.                 return g = !h && i.length ? a.widget.extend.apply(null, [g].concat(i)) : g, this.each(h ? function() {
  391.                     var d, e = a.data(this, f);
  392.                     return "instance" === g ? (j = e, !1) : e ? a.isFunction(e[g]) && "_" !== g.charAt(0) ? (d = e[g].apply(e, i), d !== e && d !== b ? (j = d && d.jquery ? j.pushStack(d.get()) : d, !1) : void 0) : a.error("no such method '" + g + "' for " + c + " widget instance") : a.error("cannot call methods on " + c + " prior to initialization; attempted to call method '" + g + "'")
  393.                 } : function() {
  394.                     var b = a.data(this, f);
  395.                     b ? b.option(g || {})._init() : a.data(this, f, new e(g, this))
  396.                 }), j
  397.             }
  398.         }, a.Widget = function() {}, a.Widget._childConstructors = [], a.Widget.prototype = {
  399.             widgetName: "widget",
  400.             widgetEventPrefix: "",
  401.             defaultElement: "<div>",
  402.             options: {
  403.                 disabled: !1,
  404.                 create: null
  405.             },
  406.             _createWidget: function(b, d) {
  407.                 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, {
  408.                     remove: function(a) {
  409.                         a.target === d && this.destroy()
  410.                     }
  411.                 }), 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()
  412.             },
  413.             _getCreateOptions: a.noop,
  414.             _getCreateEventData: a.noop,
  415.             _create: a.noop,
  416.             _init: a.noop,
  417.             destroy: function() {
  418.                 this._destroy(), this.element.unbind(this.eventNamespace).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")
  419.             },
  420.             _destroy: a.noop,
  421.             widget: function() {
  422.                 return this.element
  423.             },
  424.             option: function(c, d) {
  425.                 var e, f, g, h = c;
  426.                 if (0 === arguments.length) return a.widget.extend({}, this.options);
  427.                 if ("string" == typeof c)
  428.                     if (h = {}, e = c.split("."), c = e.shift(), e.length) {
  429.                         for (f = h[c] = a.widget.extend({}, this.options[c]), g = 0; g < e.length - 1; g++) f[e[g]] = f[e[g]] || {}, f = f[e[g]];
  430.                         if (c = e.pop(), d === b) return f[c] === b ? null : f[c];
  431.                         f[c] = d
  432.                     } else {
  433.                         if (d === b) return this.options[c] === b ? null : this.options[c];
  434.                         h[c] = d
  435.                     }
  436.                 return this._setOptions(h), this
  437.             },
  438.             _setOptions: function(a) {
  439.                 var b;
  440.                 for (b in a) this._setOption(b, a[b]);
  441.                 return this
  442.             },
  443.             _setOption: function(a, b) {
  444.                 return this.options[a] = b, "disabled" === a && (this.widget().toggleClass(this.widgetFullName + "-disabled", !!b), this.hoverable.removeClass("ui-state-hover"), this.focusable.removeClass("ui-state-focus")), this
  445.             },
  446.             enable: function() {
  447.                 return this._setOptions({
  448.                     disabled: !1
  449.                 })
  450.             },
  451.             disable: function() {
  452.                 return this._setOptions({
  453.                     disabled: !0
  454.                 })
  455.             },
  456.             _on: function(b, c, d) {
  457.                 var e, f = this;
  458.                 "boolean" != typeof b && (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) {
  459.                     function h() {
  460.                         return b || f.options.disabled !== !0 && !a(this).hasClass("ui-state-disabled") ? ("string" == typeof g ? f[g] : g).apply(f, arguments) : void 0
  461.                     }
  462.                     "string" != typeof g && (h.guid = g.guid = g.guid || h.guid || a.guid++);
  463.                     var i = d.match(/^(\w+)\s*(.*)$/),
  464.                         j = i[1] + f.eventNamespace,
  465.                         k = i[2];
  466.                     k ? e.delegate(k, j, h) : c.bind(j, h)
  467.                 })
  468.             },
  469.             _off: function(a, b) {
  470.                 b = (b || "").split(" ").join(this.eventNamespace + " ") + this.eventNamespace, a.unbind(b).undelegate(b)
  471.             },
  472.             _delay: function(a, b) {
  473.                 function c() {
  474.                     return ("string" == typeof a ? d[a] : a).apply(d, arguments)
  475.                 }
  476.                 var d = this;
  477.                 return setTimeout(c, b || 0)
  478.             },
  479.             _hoverable: function(b) {
  480.                 this.hoverable = this.hoverable.add(b), this._on(b, {
  481.                     mouseenter: function(b) {
  482.                         a(b.currentTarget).addClass("ui-state-hover")
  483.                     },
  484.                     mouseleave: function(b) {
  485.                         a(b.currentTarget).removeClass("ui-state-hover")
  486.                     }
  487.                 })
  488.             },
  489.             _focusable: function(b) {
  490.                 this.focusable = this.focusable.add(b), this._on(b, {
  491.                     focusin: function(b) {
  492.                         a(b.currentTarget).addClass("ui-state-focus")
  493.                     },
  494.                     focusout: function(b) {
  495.                         a(b.currentTarget).removeClass("ui-state-focus")
  496.                     }
  497.                 })
  498.             },
  499.             _trigger: function(b, c, d) {
  500.                 var e, f, g = this.options[b];
  501.                 if (d = d || {}, c = a.Event(c), c.type = (b === this.widgetEventPrefix ? b : this.widgetEventPrefix + b).toLowerCase(), c.target = this.element[0], f = c.originalEvent)
  502.                     for (e in f) e in c || (c[e] = f[e]);
  503.                 return this.element.trigger(c, d), !(a.isFunction(g) && g.apply(this.element[0], [c].concat(d)) === !1 || c.isDefaultPrevented())
  504.             }
  505.         }, a.each({
  506.             show: "fadeIn",
  507.             hide: "fadeOut"
  508.         }, function(b, c) {
  509.             a.Widget.prototype["_" + b] = function(d, e, f) {
  510.                 "string" == typeof e && (e = {
  511.                     effect: e
  512.                 });
  513.                 var g, h = e ? e === !0 || "number" == typeof e ? c : e.effect || c : b;
  514.                 e = e || {}, "number" == typeof e && (e = {
  515.                     duration: e
  516.                 }), 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) {
  517.                     a(this)[b](), f && f.call(d[0]), c()
  518.                 })
  519.             }
  520.         })
  521.     }(a),
  522.     function(a) {
  523.         var b = /[A-Z]/g,
  524.             c = function(a) {
  525.                 return "-" + a.toLowerCase()
  526.             };
  527.         a.extend(a.Widget.prototype, {
  528.             _getCreateOptions: function() {
  529.                 var d, e, f = this.element[0],
  530.                     g = {};
  531.                 if (!a.mobile.getAttribute(f, "defaults"))
  532.                     for (d in this.options) e = a.mobile.getAttribute(f, d.replace(b, c)), null != e && (g[d] = e);
  533.                 return g
  534.             }
  535.         }), a.mobile.widget = a.Widget
  536.     }(a),
  537.     function(a) {
  538.         var b = "ui-loader",
  539.             c = a("html");
  540.         a.widget("mobile.loader", {
  541.             options: {
  542.                 theme: "a",
  543.                 textVisible: !1,
  544.                 html: "",
  545.                 text: "loading"
  546.             },
  547.             defaultHtml: "<div class='" + b + "'><span class='ui-icon-loading'></span><h1></h1></div>",
  548.             fakeFixLoader: function() {
  549.                 var b = a("." + a.mobile.activeBtnClass).first();
  550.                 this.element.css({
  551.                     top: a.support.scrollTop && this.window.scrollTop() + this.window.height() / 2 || b.length && b.offset().top || 100
  552.                 })
  553.             },
  554.             checkLoaderPosition: function() {
  555.                 var b = this.element.offset(),
  556.                     c = this.window.scrollTop(),
  557.                     d = a.mobile.getScreenHeight();
  558.                 (b.top < c || b.top - c > d) && (this.element.addClass("ui-loader-fakefix"), this.fakeFixLoader(), this.window.unbind("scroll", this.checkLoaderPosition).bind("scroll", a.proxy(this.fakeFixLoader, this)))
  559.             },
  560.             resetHtml: function() {
  561.                 this.element.html(a(this.defaultHtml).html())
  562.             },
  563.             show: function(d, e, f) {
  564.                 var g, h, i;
  565.                 this.resetHtml(), "object" === a.type(d) ? (i = a.extend({}, this.options, d), d = i.theme) : (i = this.options, d = d || i.theme), h = e || (i.text === !1 ? "" : i.text), c.addClass("ui-loading"), g = i.textVisible, this.element.attr("class", b + " ui-corner-all ui-body-" + d + " ui-loader-" + (g || e || d.text ? "verbose" : "default") + (i.textonly || f ? " ui-loader-textonly" : "")), i.html ? this.element.html(i.html) : this.element.find("h1").text(h), this.element.appendTo(a.mobile.pageContainer), this.checkLoaderPosition(), this.window.bind("scroll", a.proxy(this.checkLoaderPosition, this))
  566.             },
  567.             hide: function() {
  568.                 c.removeClass("ui-loading"), this.options.text && this.element.removeClass("ui-loader-fakefix"), a.mobile.window.unbind("scroll", this.fakeFixLoader), a.mobile.window.unbind("scroll", this.checkLoaderPosition)
  569.             }
  570.         })
  571.     }(a, this),
  572.     function(a, b, d) {
  573.         "$:nomunge";
  574.  
  575.         function e(a) {
  576.             return a = a || location.href, "#" + a.replace(/^[^#]*#?(.*)$/, "$1")
  577.         }
  578.         var f, g = "hashchange",
  579.             h = c,
  580.             i = a.event.special,
  581.             j = h.documentMode,
  582.             k = "on" + g in b && (j === d || j > 7);
  583.         a.fn[g] = function(a) {
  584.             return a ? this.bind(g, a) : this.trigger(g)
  585.         }, a.fn[g].delay = 50, i[g] = a.extend(i[g], {
  586.             setup: function() {
  587.                 return k ? !1 : void a(f.start)
  588.             },
  589.             teardown: function() {
  590.                 return k ? !1 : void a(f.stop)
  591.             }
  592.         }), f = function() {
  593.             function c() {
  594.                 var d = e(),
  595.                     h = n(j);
  596.                 d !== j ? (m(j = d, h), a(b).trigger(g)) : h !== j && (location.href = location.href.replace(/#.*/, "") + h), f = setTimeout(c, a.fn[g].delay)
  597.             }
  598.             var f, i = {},
  599.                 j = e(),
  600.                 l = function(a) {
  601.                     return a
  602.                 },
  603.                 m = l,
  604.                 n = l;
  605.             return i.start = function() {
  606.                 f || c()
  607.             }, i.stop = function() {
  608.                 f && clearTimeout(f), f = d
  609.             }, b.attachEvent && !b.addEventListener && !k && function() {
  610.                 var b, d;
  611.                 i.start = function() {
  612.                     b || (d = a.fn[g].src, d = d && d + e(), b = a('<iframe tabindex="-1" title="empty"/>').hide().one("load", function() {
  613.                         d || m(e()), c()
  614.                     }).attr("src", d || "javascript:0").insertAfter("body")[0].contentWindow, h.onpropertychange = function() {
  615.                         try {
  616.                             "title" === event.propertyName && (b.document.title = h.title)
  617.                         } catch (a) {}
  618.                     })
  619.                 }, i.stop = l, n = function() {
  620.                     return e(b.location.href)
  621.                 }, m = function(c, d) {
  622.                     var e = b.document,
  623.                         f = a.fn[g].domain;
  624.                     c !== d && (e.title = h.title, e.open(), f && e.write('<script>document.domain="' + f + '"</script>'), e.close(), b.location.hash = c)
  625.                 }
  626.             }(), i
  627.         }()
  628.     }(a, this),
  629.     function(a) {
  630.         b.matchMedia = b.matchMedia || function(a) {
  631.             var b, c = a.documentElement,
  632.                 d = c.firstElementChild || c.firstChild,
  633.                 e = a.createElement("body"),
  634.                 f = a.createElement("div");
  635.             return f.id = "mq-test-1", f.style.cssText = "position:absolute;top:-100em", e.style.background = "none", e.appendChild(f),
  636.                 function(a) {
  637.                     return f.innerHTML = '&shy;<style media="' + a + '"> #mq-test-1 { width: 42px; }</style>', c.insertBefore(e, d), b = 42 === f.offsetWidth, c.removeChild(e), {
  638.                         matches: b,
  639.                         media: a
  640.                     }
  641.                 }
  642.         }(c), a.mobile.media = function(a) {
  643.             return b.matchMedia(a).matches
  644.         }
  645.     }(a),
  646.     function(a) {
  647.         var b = {
  648.             touch: "ontouchend" in c
  649.         };
  650.         a.mobile.support = a.mobile.support || {}, a.extend(a.support, b), a.extend(a.mobile.support, b)
  651.     }(a),
  652.     function(a) {
  653.         a.extend(a.support, {
  654.             orientation: "orientation" in b && "onorientationchange" in b
  655.         })
  656.     }(a),
  657.     function(a, d) {
  658.         function e(a) {
  659.             var b, c = a.charAt(0).toUpperCase() + a.substr(1),
  660.                 e = (a + " " + o.join(c + " ") + c).split(" ");
  661.             for (b in e)
  662.                 if (n[e[b]] !== d) return !0
  663.         }
  664.  
  665.         function f() {
  666.             var c = b,
  667.                 d = !(!c.document.createElementNS || !c.document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect || c.opera && -1 === navigator.userAgent.indexOf("Chrome")),
  668.                 e = function(b) {
  669.                     b && d || a("html").addClass("ui-nosvg")
  670.                 },
  671.                 f = new c.Image;
  672.             f.onerror = function() {
  673.                 e(!1)
  674.             }, f.onload = function() {
  675.                 e(1 === f.width && 1 === f.height)
  676.             }, f.src = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="
  677.         }
  678.  
  679.         function g() {
  680.             var e, f, g, h = "transform-3d",
  681.                 i = a.mobile.media("(-" + o.join("-" + h + "),(-") + "-" + h + "),(" + h + ")");
  682.             if (i) return !!i;
  683.             e = c.createElement("div"), f = {
  684.                 MozTransform: "-moz-transform",
  685.                 transform: "transform"
  686.             }, m.append(e);
  687.             for (g in f) e.style[g] !== d && (e.style[g] = "translate3d( 100px, 1px, 1px )", i = b.getComputedStyle(e).getPropertyValue(f[g]));
  688.             return !!i && "none" !== i
  689.         }
  690.  
  691.         function h() {
  692.             var b, c, d = location.protocol + "//" + location.host + location.pathname + "ui-dir/",
  693.                 e = a("head base"),
  694.                 f = null,
  695.                 g = "";
  696.             return e.length ? g = e.attr("href") : e = f = a("<base>", {
  697.                 href: d
  698.             }).appendTo("head"), b = a("<a href='testurl' />").prependTo(m), c = b[0].href, e[0].href = g || location.pathname, f && f.remove(), 0 === c.indexOf(d)
  699.         }
  700.  
  701.         function i() {
  702.             var a, d = c.createElement("x"),
  703.                 e = c.documentElement,
  704.                 f = b.getComputedStyle;
  705.             return "pointerEvents" in d.style ? (d.style.pointerEvents = "auto", d.style.pointerEvents = "x", e.appendChild(d), a = f && "auto" === f(d, "").pointerEvents, e.removeChild(d), !!a) : !1
  706.         }
  707.  
  708.         function j() {
  709.             var a = c.createElement("div");
  710.             return "undefined" != typeof a.getBoundingClientRect
  711.         }
  712.  
  713.         function k() {
  714.             var a = b,
  715.                 c = navigator.userAgent,
  716.                 d = navigator.platform,
  717.                 e = c.match(/AppleWebKit\/([0-9]+)/),
  718.                 f = !!e && e[1],
  719.                 g = c.match(/Fennec\/([0-9]+)/),
  720.                 h = !!g && g[1],
  721.                 i = c.match(/Opera Mobi\/([0-9]+)/),
  722.                 j = !!i && i[1];
  723.             return (d.indexOf("iPhone") > -1 || d.indexOf("iPad") > -1 || d.indexOf("iPod") > -1) && f && 534 > f || a.operamini && "[object OperaMini]" === {}.toString.call(a.operamini) || i && 7458 > j || c.indexOf("Android") > -1 && f && 533 > f || h && 6 > h || "palmGetResource" in b && f && 534 > f || c.indexOf("MeeGo") > -1 && c.indexOf("NokiaBrowser/8.5.0") > -1 ? !1 : !0
  724.         }
  725.         var l, m = a("<body>").prependTo("html"),
  726.             n = m[0].style,
  727.             o = ["Webkit", "Moz", "O"],
  728.             p = "palmGetResource" in b,
  729.             q = b.operamini && "[object OperaMini]" === {}.toString.call(b.operamini),
  730.             r = b.blackberry && !e("-webkit-transform");
  731.         a.extend(a.mobile, {
  732.             browser: {}
  733.         }), a.mobile.browser.oldIE = function() {
  734.             var a = 3,
  735.                 b = c.createElement("div"),
  736.                 d = b.all || [];
  737.             do b.innerHTML = "<!--[if gt IE " + ++a + "]><br><![endif]-->"; while (d[0]);
  738.             return a > 4 ? a : !a
  739.         }(), a.extend(a.support, {
  740.             pushState: "pushState" in history && "replaceState" in history && !(b.navigator.userAgent.indexOf("Firefox") >= 0 && b.top !== b) && -1 === b.navigator.userAgent.search(/CriOS/),
  741.             mediaquery: a.mobile.media("only all"),
  742.             cssPseudoElement: !!e("content"),
  743.             touchOverflow: !!e("overflowScrolling"),
  744.             cssTransform3d: g(),
  745.             boxShadow: !!e("boxShadow") && !r,
  746.             fixedPosition: k(),
  747.             scrollTop: ("pageXOffset" in b || "scrollTop" in c.documentElement || "scrollTop" in m[0]) && !p && !q,
  748.             dynamicBaseTag: h(),
  749.             cssPointerEvents: i(),
  750.             boundingRect: j(),
  751.             inlineSVG: f
  752.         }), m.remove(), l = function() {
  753.             var a = b.navigator.userAgent;
  754.             return a.indexOf("Nokia") > -1 && (a.indexOf("Symbian/3") > -1 || a.indexOf("Series60/5") > -1) && a.indexOf("AppleWebKit") > -1 && a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)
  755.         }(), a.mobile.gradeA = function() {
  756.             return (a.support.mediaquery && a.support.cssPseudoElement || a.mobile.browser.oldIE && a.mobile.browser.oldIE >= 8) && (a.support.boundingRect || null !== a.fn.jquery.match(/1\.[0-7+]\.[0-9+]?/))
  757.         }, a.mobile.ajaxBlacklist = b.blackberry && !b.WebKitPoint || q || l, l && a(function() {
  758.             a("head link[rel='stylesheet']").attr("rel", "alternate stylesheet").attr("rel", "stylesheet")
  759.         }), a.support.boxShadow || a("html").addClass("ui-noboxshadow")
  760.     }(a),
  761.     function(a, b) {
  762.         var c, d = a.mobile.window,
  763.             e = function() {};
  764.         a.event.special.beforenavigate = {
  765.             setup: function() {
  766.                 d.on("navigate", e)
  767.             },
  768.             teardown: function() {
  769.                 d.off("navigate", e)
  770.             }
  771.         }, a.event.special.navigate = c = {
  772.             bound: !1,
  773.             pushStateEnabled: !0,
  774.             originalEventName: b,
  775.             isPushStateEnabled: function() {
  776.                 return a.support.pushState && a.mobile.pushStateEnabled === !0 && this.isHashChangeEnabled()
  777.             },
  778.             isHashChangeEnabled: function() {
  779.                 return a.mobile.hashListeningEnabled === !0
  780.             },
  781.             popstate: function(b) {
  782.                 var c = new a.Event("navigate"),
  783.                     e = new a.Event("beforenavigate"),
  784.                     f = b.originalEvent.state || {};
  785.                 e.originalEvent = b, d.trigger(e), e.isDefaultPrevented() || (b.historyState && a.extend(f, b.historyState), c.originalEvent = b, setTimeout(function() {
  786.                     d.trigger(c, {
  787.                         state: f
  788.                     })
  789.                 }, 0))
  790.             },
  791.             hashchange: function(b) {
  792.                 var c = new a.Event("navigate"),
  793.                     e = new a.Event("beforenavigate");
  794.                 e.originalEvent = b, d.trigger(e), e.isDefaultPrevented() || (c.originalEvent = b, d.trigger(c, {
  795.                     state: b.hashchangeState || {}
  796.                 }))
  797.             },
  798.             setup: function() {
  799.                 c.bound || (c.bound = !0, c.isPushStateEnabled() ? (c.originalEventName = "popstate", d.bind("popstate.navigate", c.popstate)) : c.isHashChangeEnabled() && (c.originalEventName = "hashchange", d.bind("hashchange.navigate", c.hashchange)))
  800.             }
  801.         }
  802.     }(a),
  803.     function(a, c) {
  804.         var d, e, f = "&ui-state=dialog";
  805.         a.mobile.path = d = {
  806.             uiStateKey: "&ui-state",
  807.             urlParseRE: /^\s*(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,
  808.             getLocation: function(a) {
  809.                 var b = this.parseUrl(a || location.href),
  810.                     c = a ? b : location,
  811.                     d = b.hash;
  812.                 return d = "#" === d ? "" : d, c.protocol + b.doubleSlash + c.host + ("" !== c.protocol && "/" !== c.pathname.substring(0, 1) ? "/" : "") + c.pathname + c.search + d
  813.             },
  814.             getDocumentUrl: function(b) {
  815.                 return b ? a.extend({}, d.documentUrl) : d.documentUrl.href
  816.             },
  817.             parseLocation: function() {
  818.                 return this.parseUrl(this.getLocation())
  819.             },
  820.             parseUrl: function(b) {
  821.                 if ("object" === a.type(b)) return b;
  822.                 var c = d.urlParseRE.exec(b || "") || [];
  823.                 return {
  824.                     href: c[0] || "",
  825.                     hrefNoHash: c[1] || "",
  826.                     hrefNoSearch: c[2] || "",
  827.                     domain: c[3] || "",
  828.                     protocol: c[4] || "",
  829.                     doubleSlash: c[5] || "",
  830.                     authority: c[6] || "",
  831.                     username: c[8] || "",
  832.                     password: c[9] || "",
  833.                     host: c[10] || "",
  834.                     hostname: c[11] || "",
  835.                     port: c[12] || "",
  836.                     pathname: c[13] || "",
  837.                     directory: c[14] || "",
  838.                     filename: c[15] || "",
  839.                     search: c[16] || "",
  840.                     hash: c[17] || ""
  841.                 }
  842.             },
  843.             makePathAbsolute: function(a, b) {
  844.                 var c, d, e, f;
  845.                 if (a && "/" === a.charAt(0)) return a;
  846.                 for (a = a || "", b = b ? b.replace(/^\/|(\/[^\/]*|[^\/]+)$/g, "") : "", c = b ? b.split("/") : [], d = a.split("/"), e = 0; e < d.length; e++) switch (f = d[e]) {
  847.                     case ".":
  848.                         break;
  849.                     case "..":
  850.                         c.length && c.pop();
  851.                         break;
  852.                     default:
  853.                         c.push(f)
  854.                 }
  855.                 return "/" + c.join("/")
  856.             },
  857.             isSameDomain: function(a, b) {
  858.                 return d.parseUrl(a).domain.toLowerCase() === d.parseUrl(b).domain.toLowerCase()
  859.             },
  860.             isRelativeUrl: function(a) {
  861.                 return "" === d.parseUrl(a).protocol
  862.             },
  863.             isAbsoluteUrl: function(a) {
  864.                 return "" !== d.parseUrl(a).protocol
  865.             },
  866.             makeUrlAbsolute: function(a, b) {
  867.                 if (!d.isRelativeUrl(a)) return a;
  868.                 b === c && (b = this.documentBase);
  869.                 var e = d.parseUrl(a),
  870.                     f = d.parseUrl(b),
  871.                     g = e.protocol || f.protocol,
  872.                     h = e.protocol ? e.doubleSlash : e.doubleSlash || f.doubleSlash,
  873.                     i = e.authority || f.authority,
  874.                     j = "" !== e.pathname,
  875.                     k = d.makePathAbsolute(e.pathname || f.filename, f.pathname),
  876.                     l = e.search || !j && f.search || "",
  877.                     m = e.hash;
  878.                 return g + h + i + k + l + m
  879.             },
  880.             addSearchParams: function(b, c) {
  881.                 var e = d.parseUrl(b),
  882.                     f = "object" == typeof c ? a.param(c) : c,
  883.                     g = e.search || "?";
  884.                 return e.hrefNoSearch + g + ("?" !== g.charAt(g.length - 1) ? "&" : "") + f + (e.hash || "")
  885.             },
  886.             convertUrlToDataUrl: function(a) {
  887.                 var c = a,
  888.                     e = d.parseUrl(a);
  889.                 return d.isEmbeddedPage(e) ? c = e.hash.split(f)[0].replace(/^#/, "").replace(/\?.*$/, "") : d.isSameDomain(e, this.documentBase) && (c = e.hrefNoHash.replace(this.documentBase.domain, "").split(f)[0]), b.decodeURIComponent(c)
  890.             },
  891.             get: function(a) {
  892.                 return a === c && (a = d.parseLocation().hash), d.stripHash(a).replace(/[^\/]*\.[^\/*]+$/, "")
  893.             },
  894.             set: function(a) {
  895.                 location.hash = a
  896.             },
  897.             isPath: function(a) {
  898.                 return /\//.test(a)
  899.             },
  900.             clean: function(a) {
  901.                 return a.replace(this.documentBase.domain, "")
  902.             },
  903.             stripHash: function(a) {
  904.                 return a.replace(/^#/, "")
  905.             },
  906.             stripQueryParams: function(a) {
  907.                 return a.replace(/\?.*$/, "")
  908.             },
  909.             cleanHash: function(a) {
  910.                 return d.stripHash(a.replace(/\?.*$/, "").replace(f, ""))
  911.             },
  912.             isHashValid: function(a) {
  913.                 return /^#[^#]+$/.test(a)
  914.             },
  915.             isExternal: function(a) {
  916.                 var b = d.parseUrl(a);
  917.                 return !(!b.protocol || b.domain.toLowerCase() === this.documentUrl.domain.toLowerCase())
  918.             },
  919.             hasProtocol: function(a) {
  920.                 return /^(:?\w+:)/.test(a)
  921.             },
  922.             isEmbeddedPage: function(a) {
  923.                 var b = d.parseUrl(a);
  924.                 return "" !== b.protocol ? !this.isPath(b.hash) && b.hash && (b.hrefNoHash === this.documentUrl.hrefNoHash || this.documentBaseDiffers && b.hrefNoHash === this.documentBase.hrefNoHash) : /^#/.test(b.href)
  925.             },
  926.             squash: function(a, b) {
  927.                 var c, e, f, g, h, i = this.isPath(a),
  928.                     j = this.parseUrl(a),
  929.                     k = j.hash,
  930.                     l = "";
  931.                 return b || (i ? b = d.getLocation() : (h = d.getDocumentUrl(!0), b = d.isPath(h.hash) ? d.squash(h.href) : h.href)), e = i ? d.stripHash(a) : a, e = d.isPath(j.hash) ? d.stripHash(j.hash) : e, g = e.indexOf(this.uiStateKey), g > -1 && (l = e.slice(g), e = e.slice(0, g)), c = d.makeUrlAbsolute(e, b), f = this.parseUrl(c).search, i ? ((d.isPath(k) || 0 === k.replace("#", "").indexOf(this.uiStateKey)) && (k = ""), l && -1 === k.indexOf(this.uiStateKey) && (k += l), -1 === k.indexOf("#") && "" !== k && (k = "#" + k), c = d.parseUrl(c), c = c.protocol + c.doubleSlash + c.host + c.pathname + f + k) : c += c.indexOf("#") > -1 ? l : "#" + l, c
  932.             },
  933.             isPreservableHash: function(a) {
  934.                 return 0 === a.replace("#", "").indexOf(this.uiStateKey)
  935.             },
  936.             hashToSelector: function(a) {
  937.                 var b = "#" === a.substring(0, 1);
  938.                 return b && (a = a.substring(1)), (b ? "#" : "") + a.replace(/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g, "\\$1")
  939.            },
  940.            getFilePath: function(a) {
  941.                return a && a.split(f)[0]
  942.            },
  943.            isFirstPageUrl: function(b) {
  944.                var e = d.parseUrl(d.makeUrlAbsolute(b, this.documentBase)),
  945.                    f = e.hrefNoHash === this.documentUrl.hrefNoHash || this.documentBaseDiffers && e.hrefNoHash === this.documentBase.hrefNoHash,
  946.                    g = a.mobile.firstPage,
  947.                    h = g && g[0] ? g[0].id : c;
  948.                return f && (!e.hash || "#" === e.hash || h && e.hash.replace(/^#/, "") === h)
  949.            },
  950.            isPermittedCrossDomainRequest: function(b, c) {
  951.                return a.mobile.allowCrossDomainPages && ("file:" === b.protocol || "content:" === b.protocol) && -1 !== c.search(/^https?:/)
  952.            }
  953.        }, d.documentUrl = d.parseLocation(), e = a("head").find("base"), d.documentBase = e.length ? d.parseUrl(d.makeUrlAbsolute(e.attr("href"), d.documentUrl.href)) : d.documentUrl, d.documentBaseDiffers = d.documentUrl.hrefNoHash !== d.documentBase.hrefNoHash, d.getDocumentBase = function(b) {
  954.            return b ? a.extend({}, d.documentBase) : d.documentBase.href
  955.        }, a.extend(a.mobile, {
  956.            getDocumentUrl: d.getDocumentUrl,
  957.            getDocumentBase: d.getDocumentBase
  958.        })
  959.    }(a),
  960.    function(a, b) {
  961.        a.mobile.History = function(a, b) {
  962.            this.stack = a || [], this.activeIndex = b || 0
  963.        }, a.extend(a.mobile.History.prototype, {
  964.            getActive: function() {
  965.                return this.stack[this.activeIndex]
  966.            },
  967.            getLast: function() {
  968.                return this.stack[this.previousIndex]
  969.            },
  970.            getNext: function() {
  971.                return this.stack[this.activeIndex + 1]
  972.            },
  973.            getPrev: function() {
  974.                return this.stack[this.activeIndex - 1]
  975.            },
  976.            add: function(a, b) {
  977.                b = b || {}, this.getNext() && this.clearForward(), b.hash && -1 === b.hash.indexOf("#") && (b.hash = "#" + b.hash), b.url = a, this.stack.push(b), this.activeIndex = this.stack.length - 1
  978.            },
  979.            clearForward: function() {
  980.                this.stack = this.stack.slice(0, this.activeIndex + 1)
  981.            },
  982.            find: function(a, b, c) {
  983.                b = b || this.stack;
  984.                var d, e, f, g = b.length;
  985.                for (e = 0; g > e; e++)
  986.                    if (d = b[e], (decodeURIComponent(a) === decodeURIComponent(d.url) || decodeURIComponent(a) === decodeURIComponent(d.hash)) && (f = e, c)) return f;
  987.                return f
  988.            },
  989.            closest: function(a) {
  990.                var c, d = this.activeIndex;
  991.                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
  992.            },
  993.            direct: function(c) {
  994.                var d = this.closest(c.url),
  995.                    e = this.activeIndex;
  996.                d !== b && (this.activeIndex = d, this.previousIndex = e), e > d ? (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())
  997.            }
  998.        })
  999.    }(a),
  1000.    function(a) {
  1001.        var d = a.mobile.path,
  1002.            e = location.href;
  1003.        a.mobile.Navigator = function(b) {
  1004.            this.history = b, this.ignoreInitialHashChange = !0, a.mobile.window.bind({
  1005.                "popstate.history": a.proxy(this.popstate, this),
  1006.                "hashchange.history": a.proxy(this.hashchange, this)
  1007.            })
  1008.        }, a.extend(a.mobile.Navigator.prototype, {
  1009.            squash: function(e, f) {
  1010.                var g, h, i = d.isPath(e) ? d.stripHash(e) : e;
  1011.                return h = d.squash(e), g = a.extend({
  1012.                    hash: i,
  1013.                    url: h
  1014.                }, f), b.history.replaceState(g, g.title || c.title, h), g
  1015.            },
  1016.            hash: function(a, b) {
  1017.                var c, e, f, g;
  1018.                return c = d.parseUrl(a), e = d.parseLocation(), e.pathname + e.search === c.pathname + c.search ? f = c.hash ? c.hash : c.pathname + c.search : d.isPath(a) ? (g = d.parseUrl(b), f = g.pathname + g.search + (d.isPreservableHash(g.hash) ? g.hash.replace("#", "") : "")) : f = a, f
  1019.            },
  1020.            go: function(e, f, g) {
  1021.                var h, i, j, k, l = a.event.special.navigate.isPushStateEnabled();
  1022.                i = d.squash(e), j = this.hash(e, i), g && j !== d.stripHash(d.parseLocation().hash) && (this.preventNextHashChange = g), this.preventHashAssignPopState = !0, b.location.hash = j, this.preventHashAssignPopState = !1, h = a.extend({
  1023.                    url: i,
  1024.                    hash: j,
  1025.                    title: c.title
  1026.                }, f), l && (k = new a.Event("popstate"), k.originalEvent = {
  1027.                    type: "popstate",
  1028.                    state: null
  1029.                }, this.squash(e, h), g || (this.ignorePopState = !0, a.mobile.window.trigger(k))), this.history.add(h.url, h)
  1030.            },
  1031.            popstate: function(b) {
  1032.                var c, f;
  1033.                if (a.event.special.navigate.isPushStateEnabled()) return this.preventHashAssignPopState ? (this.preventHashAssignPopState = !1, void b.stopImmediatePropagation()) : this.ignorePopState ? void(this.ignorePopState = !1) : !b.originalEvent.state && 1 === this.history.stack.length && this.ignoreInitialHashChange && (this.ignoreInitialHashChange = !1, location.href === e) ? void b.preventDefault() : (c = d.parseLocation().hash, !b.originalEvent.state && c ? (f = this.squash(c), this.history.add(f.url, f), void(b.historyState = f)) : void this.history.direct({
  1034.                    url: (b.originalEvent.state || {}).url || c,
  1035.                    present: function(c, d) {
  1036.                        b.historyState = a.extend({}, c), b.historyState.direction = d
  1037.                    }
  1038.                }))
  1039.            },
  1040.            hashchange: function(b) {
  1041.                var e, f;
  1042.                if (a.event.special.navigate.isHashChangeEnabled() && !a.event.special.navigate.isPushStateEnabled()) {
  1043.                    if (this.preventNextHashChange) return this.preventNextHashChange = !1, void b.stopImmediatePropagation();
  1044.                    e = this.history, f = d.parseLocation().hash, this.history.direct({
  1045.                        url: f,
  1046.                        present: function(c, d) {
  1047.                            b.hashchangeState = a.extend({}, c), b.hashchangeState.direction = d
  1048.                        },
  1049.                        missing: function() {
  1050.                            e.add(f, {
  1051.                                hash: f,
  1052.                                title: c.title
  1053.                            })
  1054.                        }
  1055.                    })
  1056.                }
  1057.            }
  1058.        })
  1059.    }(a),
  1060.    function(a) {
  1061.        a.mobile.navigate = function(b, c, d) {
  1062.            a.mobile.navigate.navigator.go(b, c, d)
  1063.        }, a.mobile.navigate.history = new a.mobile.History, a.mobile.navigate.navigator = new a.mobile.Navigator(a.mobile.navigate.history);
  1064.        var b = a.mobile.path.parseLocation();
  1065.        a.mobile.navigate.history.add(b.href, {
  1066.            hash: b.hash
  1067.        })
  1068.    }(a),
  1069.    function(a, b) {
  1070.        var d = {
  1071.                animation: {},
  1072.                transition: {}
  1073.            },
  1074.            e = c.createElement("a"),
  1075.            f = ["", "webkit-", "moz-", "o-"];
  1076.        a.each(["animation", "transition"], function(c, g) {
  1077.            var h = 0 === c ? g + "-name" : g;
  1078.            a.each(f, function(c, f) {
  1079.                return e.style[a.camelCase(f + h)] !== b ? (d[g].prefix = f, !1) : void 0
  1080.            }), d[g].duration = a.camelCase(d[g].prefix + g + "-duration"), d[g].event = a.camelCase(d[g].prefix + g + "-end"), "" === d[g].prefix && (d[g].event = d[g].event.toLowerCase())
  1081.        }), a.support.cssTransitions = d.transition.prefix !== b, a.support.cssAnimations = d.animation.prefix !== b, a(e).remove(), a.fn.animationComplete = function(e, f, g) {
  1082.            var h, i, j = this,
  1083.                k = function() {
  1084.                    clearTimeout(h), e.apply(this, arguments)
  1085.                },
  1086.                l = f && "animation" !== f ? "transition" : "animation";
  1087.            return a.support.cssTransitions && "transition" === l || a.support.cssAnimations && "animation" === l ? (g === b && (a(this).context !== c && (i = 3e3 * parseFloat(a(this).css(d[l].duration))), (0 === i || i === b || isNaN(i)) && (i = a.fn.animationComplete.defaultDuration)), h = setTimeout(function() {
  1088.                a(j).off(d[l].event, k), e.apply(j)
  1089.            }, i), a(this).one(d[l].event, k)) : (setTimeout(a.proxy(e, this), 0), a(this))
  1090.        }, a.fn.animationComplete.defaultDuration = 1e3
  1091.    }(a),
  1092.    function(a, b, c, d) {
  1093.        function e(a) {
  1094.            for (; a && "undefined" != typeof a.originalEvent;) a = a.originalEvent;
  1095.            return a
  1096.        }
  1097.  
  1098.        function f(b, c) {
  1099.            var f, g, h, i, j, k, l, m, n, o = b.type;
  1100.            if (b = a.Event(b), b.type = c, f = b.originalEvent, g = a.event.props, o.search(/^(mouse|click)/) > -1 && (g = E), f)
  1101.                for (l = g.length, i; l;) i = g[--l], b[i] = f[i];
  1102.            if (o.search(/mouse(down|up)|click/) > -1 && !b.which && (b.which = 1), -1 !== o.search(/^touch/) && (h = e(f), o = h.touches, j = h.changedTouches, k = o && o.length ? o[0] : j && j.length ? j[0] : d))
  1103.                for (m = 0, n = C.length; n > m; m++) i = C[m], b[i] = k[i];
  1104.            return b
  1105.        }
  1106.  
  1107.        function g(b) {
  1108.            for (var c, d, e = {}; b;) {
  1109.                c = a.data(b, z);
  1110.                for (d in c) c[d] && (e[d] = e.hasVirtualBinding = !0);
  1111.                b = b.parentNode
  1112.            }
  1113.            return e
  1114.        }
  1115.  
  1116.        function h(b, c) {
  1117.            for (var d; b;) {
  1118.                if (d = a.data(b, z), d && (!c || d[c])) return b;
  1119.                b = b.parentNode
  1120.            }
  1121.            return null
  1122.        }
  1123.  
  1124.        function i() {
  1125.            M = !1
  1126.        }
  1127.  
  1128.        function j() {
  1129.            M = !0
  1130.        }
  1131.  
  1132.        function k() {
  1133.            Q = 0, K.length = 0, L = !1, j()
  1134.        }
  1135.  
  1136.        function l() {
  1137.            i()
  1138.        }
  1139.  
  1140.        function m() {
  1141.            n(), G = setTimeout(function() {
  1142.                G = 0, k()
  1143.            }, a.vmouse.resetTimerDuration)
  1144.        }
  1145.  
  1146.        function n() {
  1147.            G && (clearTimeout(G), G = 0)
  1148.        }
  1149.  
  1150.        function o(b, c, d) {
  1151.            var e;
  1152.            return (d && d[b] || !d && h(c.target, b)) && (e = f(c, b), a(c.target).trigger(e)), e
  1153.        }
  1154.  
  1155.        function p(b) {
  1156.            var c, d = a.data(b.target, A);
  1157.            L || Q && Q === d || (c = o("v" + b.type, b), c && (c.isDefaultPrevented() && b.preventDefault(), c.isPropagationStopped() && b.stopPropagation(), c.isImmediatePropagationStopped() && b.stopImmediatePropagation()))
  1158.        }
  1159.  
  1160.        function q(b) {
  1161.            var c, d, f, h = e(b).touches;
  1162.            h && 1 === h.length && (c = b.target, d = g(c), d.hasVirtualBinding && (Q = P++, a.data(c, A, Q), n(), l(), J = !1, f = e(b).touches[0], H = f.pageX, I = f.pageY, o("vmouseover", b, d), o("vmousedown", b, d)))
  1163.        }
  1164.  
  1165.        function r(a) {
  1166.            M || (J || o("vmousecancel", a, g(a.target)), J = !0, m())
  1167.        }
  1168.  
  1169.        function s(b) {
  1170.            if (!M) {
  1171.                var c = e(b).touches[0],
  1172.                    d = J,
  1173.                    f = a.vmouse.moveDistanceThreshold,
  1174.                    h = g(b.target);
  1175.                J = J || Math.abs(c.pageX - H) > f || Math.abs(c.pageY - I) > f, J && !d && o("vmousecancel", b, h), o("vmousemove", b, h), m()
  1176.            }
  1177.        }
  1178.  
  1179.        function t(a) {
  1180.            if (!M) {
  1181.                j();
  1182.                var b, c, d = g(a.target);
  1183.                o("vmouseup", a, d), J || (b = o("vclick", a, d), b && b.isDefaultPrevented() && (c = e(a).changedTouches[0], K.push({
  1184.                    touchID: Q,
  1185.                    x: c.clientX,
  1186.                    y: c.clientY
  1187.                }), L = !0)), o("vmouseout", a, d), J = !1, m()
  1188.            }
  1189.        }
  1190.  
  1191.        function u(b) {
  1192.            var c, d = a.data(b, z);
  1193.            if (d)
  1194.                for (c in d)
  1195.                    if (d[c]) return !0;
  1196.            return !1
  1197.        }
  1198.  
  1199.        function v() {}
  1200.  
  1201.        function w(b) {
  1202.            var c = b.substr(1);
  1203.            return {
  1204.                setup: function() {
  1205.                    u(this) || a.data(this, z, {});
  1206.                    var d = a.data(this, z);
  1207.                    d[b] = !0, F[b] = (F[b] || 0) + 1, 1 === F[b] && O.bind(c, p), a(this).bind(c, v), N && (F.touchstart = (F.touchstart || 0) + 1, 1 === F.touchstart && O.bind("touchstart", q).bind("touchend", t).bind("touchmove", s).bind("scroll", r))
  1208.                },
  1209.                teardown: function() {
  1210.                    --F[b], F[b] || O.unbind(c, p), N && (--F.touchstart, F.touchstart || O.unbind("touchstart", q).unbind("touchmove", s).unbind("touchend", t).unbind("scroll", r));
  1211.                    var d = a(this),
  1212.                        e = a.data(this, z);
  1213.                    e && (e[b] = !1), d.unbind(c, v), u(this) || d.removeData(z)
  1214.                }
  1215.            }
  1216.        }
  1217.        var x, y, z = "virtualMouseBindings",
  1218.            A = "virtualTouchID",
  1219.            B = "vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),
  1220.            C = "clientX clientY pageX pageY screenX screenY".split(" "),
  1221.            D = a.event.mouseHooks ? a.event.mouseHooks.props : [],
  1222.            E = a.event.props.concat(D),
  1223.            F = {},
  1224.            G = 0,
  1225.            H = 0,
  1226.            I = 0,
  1227.            J = !1,
  1228.            K = [],
  1229.            L = !1,
  1230.            M = !1,
  1231.            N = "addEventListener" in c,
  1232.            O = a(c),
  1233.            P = 1,
  1234.            Q = 0;
  1235.        for (a.vmouse = {
  1236.                moveDistanceThreshold: 10,
  1237.                clickDistanceThreshold: 10,
  1238.                resetTimerDuration: 1500
  1239.            }, y = 0; y < B.length; y++) a.event.special[B[y]] = w(B[y]);
  1240.        N && c.addEventListener("click", function(b) {
  1241.            var c, d, e, f, g, h, i = K.length,
  1242.                j = b.target;
  1243.            if (i)
  1244.                for (c = b.clientX, d = b.clientY, x = a.vmouse.clickDistanceThreshold, e = j; e;) {
  1245.                    for (f = 0; i > f; f++)
  1246.                        if (g = K[f], h = 0, e === j && Math.abs(g.x - c) < x && Math.abs(g.y - d) < x || a.data(e, A) === g.touchID) return b.preventDefault(), void b.stopPropagation();
  1247.                    e = e.parentNode
  1248.                }
  1249.        }, !0)
  1250.    }(a, b, c),
  1251.    function(a, b, d) {
  1252.        function e(b, c, e, f) {
  1253.            var g = e.type;
  1254.            e.type = c, f ? a.event.trigger(e, d, b) : a.event.dispatch.call(b, e), e.type = g
  1255.        }
  1256.        var f = a(c),
  1257.            g = a.mobile.support.touch,
  1258.            h = "touchmove scroll",
  1259.            i = g ? "touchstart" : "mousedown",
  1260.            j = g ? "touchend" : "mouseup",
  1261.            k = g ? "touchmove" : "mousemove";
  1262.        a.each("touchstart touchmove touchend tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "), function(b, c) {
  1263.            a.fn[c] = function(a) {
  1264.                return a ? this.bind(c, a) : this.trigger(c)
  1265.            }, a.attrFn && (a.attrFn[c] = !0)
  1266.        }), a.event.special.scrollstart = {
  1267.            enabled: !0,
  1268.            setup: function() {
  1269.                function b(a, b) {
  1270.                    c = b, e(f, c ? "scrollstart" : "scrollstop", a)
  1271.                }
  1272.                var c, d, f = this,
  1273.                    g = a(f);
  1274.                g.bind(h, function(e) {
  1275.                    a.event.special.scrollstart.enabled && (c || b(e, !0), clearTimeout(d), d = setTimeout(function() {
  1276.                        b(e, !1)
  1277.                    }, 50))
  1278.                })
  1279.            },
  1280.            teardown: function() {
  1281.                a(this).unbind(h)
  1282.            }
  1283.        }, a.event.special.tap = {
  1284.            tapholdThreshold: 750,
  1285.            emitTapOnTaphold: !0,
  1286.            setup: function() {
  1287.                var b = this,
  1288.                    c = a(b),
  1289.                    d = !1;
  1290.                c.bind("vmousedown", function(g) {
  1291.                    function h() {
  1292.                        clearTimeout(k)
  1293.                    }
  1294.  
  1295.                    function i() {
  1296.                        h(), c.unbind("vclick", j).unbind("vmouseup", h), f.unbind("vmousecancel", i)
  1297.                    }
  1298.  
  1299.                    function j(a) {
  1300.                        i(), d || l !== a.target ? d && a.preventDefault() : e(b, "tap", a)
  1301.                    }
  1302.                    if (d = !1, g.which && 1 !== g.which) return !1;
  1303.                    var k, l = g.target;
  1304.                    c.bind("vmouseup", h).bind("vclick", j), f.bind("vmousecancel", i), k = setTimeout(function() {
  1305.                        a.event.special.tap.emitTapOnTaphold || (d = !0), e(b, "taphold", a.Event("taphold", {
  1306.                            target: l
  1307.                        }))
  1308.                    }, a.event.special.tap.tapholdThreshold)
  1309.                })
  1310.            },
  1311.            teardown: function() {
  1312.                a(this).unbind("vmousedown").unbind("vclick").unbind("vmouseup"), f.unbind("vmousecancel")
  1313.            }
  1314.        }, a.event.special.swipe = {
  1315.            scrollSupressionThreshold: 30,
  1316.            durationThreshold: 1e3,
  1317.            horizontalDistanceThreshold: 30,
  1318.            verticalDistanceThreshold: 30,
  1319.            getLocation: function(a) {
  1320.                var c = b.pageXOffset,
  1321.                    d = b.pageYOffset,
  1322.                    e = a.clientX,
  1323.                    f = a.clientY;
  1324.                return 0 === a.pageY && Math.floor(f) > Math.floor(a.pageY) || 0 === a.pageX && Math.floor(e) > Math.floor(a.pageX) ? (e -= c, f -= d) : (f < a.pageY - d || e < a.pageX - c) && (e = a.pageX - c, f = a.pageY - d), {
  1325.                    x: e,
  1326.                    y: f
  1327.                }
  1328.            },
  1329.            start: function(b) {
  1330.                var c = b.originalEvent.touches ? b.originalEvent.touches[0] : b,
  1331.                    d = a.event.special.swipe.getLocation(c);
  1332.                return {
  1333.                    time: (new Date).getTime(),
  1334.                    coords: [d.x, d.y],
  1335.                    origin: a(b.target)
  1336.                }
  1337.            },
  1338.            stop: function(b) {
  1339.                var c = b.originalEvent.touches ? b.originalEvent.touches[0] : b,
  1340.                    d = a.event.special.swipe.getLocation(c);
  1341.                return {
  1342.                    time: (new Date).getTime(),
  1343.                    coords: [d.x, d.y]
  1344.                }
  1345.            },
  1346.            handleSwipe: function(b, c, d, f) {
  1347.                if (c.time - b.time < a.event.special.swipe.durationThreshold && Math.abs(b.coords[0] - c.coords[0]) > a.event.special.swipe.horizontalDistanceThreshold && Math.abs(b.coords[1] - c.coords[1]) < a.event.special.swipe.verticalDistanceThreshold) {
  1348.                    var g = b.coords[0] > c.coords[0] ? "swipeleft" : "swiperight";
  1349.                    return e(d, "swipe", a.Event("swipe", {
  1350.                        target: f,
  1351.                        swipestart: b,
  1352.                        swipestop: c
  1353.                    }), !0), e(d, g, a.Event(g, {
  1354.                        target: f,
  1355.                        swipestart: b,
  1356.                        swipestop: c
  1357.                    }), !0), !0
  1358.                }
  1359.                return !1
  1360.            },
  1361.            eventInProgress: !1,
  1362.            setup: function() {
  1363.                var b, c = this,
  1364.                    d = a(c),
  1365.                    e = {};
  1366.                b = a.data(this, "mobile-events"), b || (b = {
  1367.                    length: 0
  1368.                }, a.data(this, "mobile-events", b)), b.length++, b.swipe = e, e.start = function(b) {
  1369.                    if (!a.event.special.swipe.eventInProgress) {
  1370.                        a.event.special.swipe.eventInProgress = !0;
  1371.                        var d, g = a.event.special.swipe.start(b),
  1372.                            h = b.target,
  1373.                            i = !1;
  1374.                        e.move = function(b) {
  1375.                            g && !b.isDefaultPrevented() && (d = a.event.special.swipe.stop(b), i || (i = a.event.special.swipe.handleSwipe(g, d, c, h), i && (a.event.special.swipe.eventInProgress = !1)), Math.abs(g.coords[0] - d.coords[0]) > a.event.special.swipe.scrollSupressionThreshold && b.preventDefault())
  1376.                        }, e.stop = function() {
  1377.                            i = !0, a.event.special.swipe.eventInProgress = !1, f.off(k, e.move), e.move = null
  1378.                        }, f.on(k, e.move).one(j, e.stop)
  1379.                    }
  1380.                }, d.on(i, e.start)
  1381.            },
  1382.            teardown: function() {
  1383.                var b, c;
  1384.                b = a.data(this, "mobile-events"), b && (c = b.swipe, delete b.swipe, b.length--, 0 === b.length && a.removeData(this, "mobile-events")), c && (c.start && a(this).off(i, c.start), c.move && f.off(k, c.move), c.stop && f.off(j, c.stop))
  1385.            }
  1386.        }, a.each({
  1387.            scrollstop: "scrollstart",
  1388.            taphold: "tap",
  1389.            swipeleft: "swipe.left",
  1390.            swiperight: "swipe.right"
  1391.        }, function(b, c) {
  1392.            a.event.special[b] = {
  1393.                setup: function() {
  1394.                    a(this).bind(c, a.noop)
  1395.                },
  1396.                teardown: function() {
  1397.                    a(this).unbind(c)
  1398.                }
  1399.            }
  1400.        })
  1401.    }(a, this),
  1402.    function(a) {
  1403.        a.event.special.throttledresize = {
  1404.            setup: function() {
  1405.                a(this).bind("resize", f)
  1406.            },
  1407.            teardown: function() {
  1408.                a(this).unbind("resize", f)
  1409.            }
  1410.        };
  1411.        var b, c, d, e = 250,
  1412.            f = function() {
  1413.                c = (new Date).getTime(), d = c - g, d >= e ? (g = c, a(this).trigger("throttledresize")) : (b && clearTimeout(b), b = setTimeout(f, e - d))
  1414.            },
  1415.            g = 0
  1416.    }(a),
  1417.    function(a, b) {
  1418.        function d() {
  1419.            var a = e();
  1420.            a !== f && (f = a, l.trigger(m))
  1421.        }
  1422.        var e, f, g, h, i, j, k, l = a(b),
  1423.            m = "orientationchange",
  1424.            n = {
  1425.                0: !0,
  1426.                180: !0
  1427.            };
  1428.        a.support.orientation && (i = b.innerWidth || l.width(), j = b.innerHeight || l.height(), k = 50, g = i > j && i - j > k, h = n[b.orientation], (g && h || !g && !h) && (n = {
  1429.            "-90": !0,
  1430.            90: !0
  1431.        })), a.event.special.orientationchange = a.extend({}, a.event.special.orientationchange, {
  1432.            setup: function() {
  1433.                return a.support.orientation && !a.event.special.orientationchange.disabled ? !1 : (f = e(), void l.bind("throttledresize", d))
  1434.            },
  1435.            teardown: function() {
  1436.                return a.support.orientation && !a.event.special.orientationchange.disabled ? !1 : void l.unbind("throttledresize", d)
  1437.            },
  1438.            add: function(a) {
  1439.                var b = a.handler;
  1440.                a.handler = function(a) {
  1441.                    return a.orientation = e(), b.apply(this, arguments)
  1442.                }
  1443.            }
  1444.        }), a.event.special.orientationchange.orientation = e = function() {
  1445.            var d = !0,
  1446.                e = c.documentElement;
  1447.            return d = a.support.orientation ? n[b.orientation] : e && e.clientWidth / e.clientHeight < 1.1, d ? "portrait" : "landscape"
  1448.        }, a.fn[m] = function(a) {
  1449.            return a ? this.bind(m, a) : this.trigger(m)
  1450.        }, a.attrFn && (a.attrFn[m] = !0)
  1451.    }(a, this),
  1452.    function(a) {
  1453.        var b = a("head").children("base"),
  1454.            c = {
  1455.                element: b.length ? b : a("<base>", {
  1456.                    href: a.mobile.path.documentBase.hrefNoHash
  1457.                }).prependTo(a("head")),
  1458.                linkSelector: "[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]",
  1459.                set: function(b) {
  1460.                    a.mobile.dynamicBaseEnabled && a.support.dynamicBaseTag && c.element.attr("href", a.mobile.path.makeUrlAbsolute(b, a.mobile.path.documentBase))
  1461.                },
  1462.                rewrite: function(b, d) {
  1463.                    var e = a.mobile.path.get(b);
  1464.                    d.find(c.linkSelector).each(function(b, c) {
  1465.                        var d = a(c).is("[href]") ? "href" : a(c).is("[src]") ? "src" : "action",
  1466.                            f = a.mobile.path.parseLocation(),
  1467.                            g = a(c).attr(d);
  1468.                        g = g.replace(f.protocol + f.doubleSlash + f.host + f.pathname, ""), /^(\w+:|#|\/)/.test(g) || a(c).attr(d, e + g)
  1469.                    })
  1470.                },
  1471.                reset: function() {
  1472.                    c.element.attr("href", a.mobile.path.documentBase.hrefNoSearch)
  1473.                }
  1474.            };
  1475.        a.mobile.base = c
  1476.    }(a),
  1477.    function(a, b) {
  1478.        a.mobile.widgets = {};
  1479.        var c = a.widget,
  1480.            d = a.mobile.keepNative;
  1481.        a.widget = function(c) {
  1482.            return function() {
  1483.                var d = c.apply(this, arguments),
  1484.                    e = d.prototype.widgetName;
  1485.                return d.initSelector = d.prototype.initSelector !== b ? d.prototype.initSelector : ":jqmData(role='" + e + "')", a.mobile.widgets[e] = d, d
  1486.            }
  1487.        }(a.widget), a.extend(a.widget, c), a.mobile.document.on("create", function(b) {
  1488.            a(b.target).enhanceWithin()
  1489.        }), a.widget("mobile.page", {
  1490.            options: {
  1491.                theme: "a",
  1492.                domCache: !1,
  1493.                keepNativeDefault: a.mobile.keepNative,
  1494.                contentTheme: null,
  1495.                enhanced: !1
  1496.            },
  1497.            _createWidget: function() {
  1498.                a.Widget.prototype._createWidget.apply(this, arguments), this._trigger("init")
  1499.            },
  1500.            _create: function() {
  1501.                return this._trigger("beforecreate") === !1 ? !1 : (this.options.enhanced || this._enhance(), this._on(this.element, {
  1502.                    pagebeforehide: "removeContainerBackground",
  1503.                    pagebeforeshow: "_handlePageBeforeShow"
  1504.                }), this.element.enhanceWithin(), void("dialog" === a.mobile.getAttribute(this.element[0], "role") && a.mobile.dialog && this.element.dialog()))
  1505.            },
  1506.            _enhance: function() {
  1507.                var c = "data-" + a.mobile.ns,
  1508.                    d = this;
  1509.                this.options.role && this.element.attr("data-" + a.mobile.ns + "role", this.options.role), this.element.attr("tabindex", "0").addClass("ui-page ui-page-theme-" + this.options.theme), this.element.find("[" + c + "role='content']").each(function() {
  1510.                    var e = a(this),
  1511.                        f = this.getAttribute(c + "theme") || b;
  1512.                    d.options.contentTheme = f || d.options.contentTheme || d.options.dialog && d.options.theme || "dialog" === d.element.jqmData("role") && d.options.theme, e.addClass("ui-content"), d.options.contentTheme && e.addClass("ui-body-" + d.options.contentTheme), e.attr("role", "main").addClass("ui-content")
  1513.                })
  1514.            },
  1515.            bindRemove: function(b) {
  1516.                var c = this.element;
  1517.                !c.data("mobile-page").options.domCache && c.is(":jqmData(external-page='true')") && c.bind("pagehide.remove", b || function(b, c) {
  1518.                    if (!c.samePage) {
  1519.                        var d = a(this),
  1520.                            e = new a.Event("pageremove");
  1521.                        d.trigger(e), e.isDefaultPrevented() || d.removeWithDependents()
  1522.                    }
  1523.                })
  1524.            },
  1525.            _setOptions: function(c) {
  1526.                c.theme !== b && this.element.removeClass("ui-page-theme-" + this.options.theme).addClass("ui-page-theme-" + c.theme), c.contentTheme !== b && this.element.find("[data-" + a.mobile.ns + "='content']").removeClass("ui-body-" + this.options.contentTheme).addClass("ui-body-" + c.contentTheme)
  1527.            },
  1528.            _handlePageBeforeShow: function() {
  1529.                this.setContainerBackground()
  1530.            },
  1531.            removeContainerBackground: function() {
  1532.                this.element.closest(":mobile-pagecontainer").pagecontainer({
  1533.                    theme: "none"
  1534.                })
  1535.            },
  1536.            setContainerBackground: function(a) {
  1537.                this.element.parent().pagecontainer({
  1538.                    theme: a || this.options.theme
  1539.                })
  1540.            },
  1541.            keepNativeSelector: function() {
  1542.                var b = this.options,
  1543.                    c = a.trim(b.keepNative || ""),
  1544.                    e = a.trim(a.mobile.keepNative),
  1545.                    f = a.trim(b.keepNativeDefault),
  1546.                    g = d === e ? "" : e,
  1547.                    h = "" === g ? f : "";
  1548.                return (c ? [c] : []).concat(g ? [g] : []).concat(h ? [h] : []).join(", ")
  1549.            }
  1550.        })
  1551.    }(a),
  1552.    function(a, d) {
  1553.        a.widget("mobile.pagecontainer", {
  1554.            options: {
  1555.                theme: "a"
  1556.            },
  1557.            initSelector: !1,
  1558.            _create: function() {
  1559.                this._trigger("beforecreate"), this.setLastScrollEnabled = !0, this._on(this.window, {
  1560.                    navigate: "_disableRecordScroll",
  1561.                    scrollstop: "_delayedRecordScroll"
  1562.                }), this._on(this.window, {
  1563.                    navigate: "_filterNavigateEvents"
  1564.                }), this._on({
  1565.                    pagechange: "_afterContentChange"
  1566.                }), this.window.one("navigate", a.proxy(function() {
  1567.                    this.setLastScrollEnabled = !0
  1568.                }, this))
  1569.            },
  1570.            _setOptions: function(a) {
  1571.                a.theme !== d && "none" !== a.theme ? this.element.removeClass("ui-overlay-" + this.options.theme).addClass("ui-overlay-" + a.theme) : a.theme !== d && this.element.removeClass("ui-overlay-" + this.options.theme), this._super(a)
  1572.            },
  1573.            _disableRecordScroll: function() {
  1574.                this.setLastScrollEnabled = !1
  1575.            },
  1576.            _enableRecordScroll: function() {
  1577.                this.setLastScrollEnabled = !0
  1578.            },
  1579.            _afterContentChange: function() {
  1580.                this.setLastScrollEnabled = !0, this._off(this.window, "scrollstop"), this._on(this.window, {
  1581.                    scrollstop: "_delayedRecordScroll"
  1582.                })
  1583.            },
  1584.            _recordScroll: function() {
  1585.                if (this.setLastScrollEnabled) {
  1586.                    var a, b, c, d = this._getActiveHistory();
  1587.                    d && (a = this._getScroll(), b = this._getMinScroll(), c = this._getDefaultScroll(), d.lastScroll = b > a ? c : a)
  1588.                }
  1589.            },
  1590.            _delayedRecordScroll: function() {
  1591.                setTimeout(a.proxy(this, "_recordScroll"), 100)
  1592.            },
  1593.            _getScroll: function() {
  1594.                return this.window.scrollTop()
  1595.            },
  1596.            _getMinScroll: function() {
  1597.                return a.mobile.minScrollBack
  1598.            },
  1599.            _getDefaultScroll: function() {
  1600.                return a.mobile.defaultHomeScroll
  1601.            },
  1602.            _filterNavigateEvents: function(b, c) {
  1603.                var d;
  1604.                b.originalEvent && b.originalEvent.isDefaultPrevented() || (d = b.originalEvent.type.indexOf("hashchange") > -1 ? c.state.hash : c.state.url, d || (d = this._getHash()), d && "#" !== d && 0 !== d.indexOf("#" + a.mobile.path.uiStateKey) || (d = location.href), this._handleNavigate(d, c.state))
  1605.            },
  1606.            _getHash: function() {
  1607.                return a.mobile.path.parseLocation().hash
  1608.            },
  1609.            getActivePage: function() {
  1610.                return this.activePage
  1611.            },
  1612.            _getInitialContent: function() {
  1613.                return a.mobile.firstPage
  1614.            },
  1615.            _getHistory: function() {
  1616.                return a.mobile.navigate.history
  1617.            },
  1618.            _getActiveHistory: function() {
  1619.                return this._getHistory().getActive()
  1620.            },
  1621.            _getDocumentBase: function() {
  1622.                return a.mobile.path.documentBase
  1623.            },
  1624.            back: function() {
  1625.                this.go(-1)
  1626.            },
  1627.            forward: function() {
  1628.                this.go(1)
  1629.            },
  1630.            go: function(c) {
  1631.                if (a.mobile.hashListeningEnabled) b.history.go(c);
  1632.                else {
  1633.                    var d = a.mobile.navigate.history.activeIndex,
  1634.                        e = d + parseInt(c, 10),
  1635.                        f = a.mobile.navigate.history.stack[e].url,
  1636.                        g = c >= 1 ? "forward" : "back";
  1637.                    a.mobile.navigate.history.activeIndex = e, a.mobile.navigate.history.previousIndex = d, this.change(f, {
  1638.                        direction: g,
  1639.                        changeHash: !1,
  1640.                        fromHashChange: !0
  1641.                    })
  1642.                }
  1643.            },
  1644.            _handleDestination: function(b) {
  1645.                var c;
  1646.                return "string" === a.type(b) && (b = a.mobile.path.stripHash(b)), b && (c = this._getHistory(), b = a.mobile.path.isPath(b) ? b : a.mobile.path.makeUrlAbsolute("#" + b, this._getDocumentBase())), b || this._getInitialContent()
  1647.            },
  1648.            _transitionFromHistory: function(a, b) {
  1649.                var c = this._getHistory(),
  1650.                    d = "back" === a ? c.getLast() : c.getActive();
  1651.                return d && d.transition || b
  1652.            },
  1653.            _handleDialog: function(b, c) {
  1654.                var d, e, f = this.getActivePage();
  1655.                return f && !f.data("mobile-dialog") ? ("back" === c.direction ? this.back() : this.forward(), !1) : (d = c.pageUrl, e = this._getActiveHistory(), a.extend(b, {
  1656.                    role: e.role,
  1657.                    transition: this._transitionFromHistory(c.direction, b.transition),
  1658.                    reverse: "back" === c.direction
  1659.                }), d)
  1660.            },
  1661.            _handleNavigate: function(b, c) {
  1662.                var d = a.mobile.path.stripHash(b),
  1663.                    e = this._getHistory(),
  1664.                    f = 0 === e.stack.length ? "none" : this._transitionFromHistory(c.direction),
  1665.                    g = {
  1666.                        changeHash: !1,
  1667.                        fromHashChange: !0,
  1668.                        reverse: "back" === c.direction
  1669.                    };
  1670.                a.extend(g, c, {
  1671.                    transition: f
  1672.                }), e.activeIndex > 0 && d.indexOf(a.mobile.dialogHashKey) > -1 && (d = this._handleDialog(g, c), d === !1) || this._changeContent(this._handleDestination(d), g)
  1673.            },
  1674.            _changeContent: function(b, c) {
  1675.                a.mobile.changePage(b, c)
  1676.            },
  1677.            _getBase: function() {
  1678.                return a.mobile.base
  1679.            },
  1680.            _getNs: function() {
  1681.                return a.mobile.ns
  1682.            },
  1683.            _enhance: function(a, b) {
  1684.                return a.page({
  1685.                    role: b
  1686.                })
  1687.            },
  1688.            _include: function(a, b) {
  1689.                a.appendTo(this.element), this._enhance(a, b.role), a.page("bindRemove")
  1690.            },
  1691.            _find: function(b) {
  1692.                var c, d = this._createFileUrl(b),
  1693.                    e = this._createDataUrl(b),
  1694.                    f = this._getInitialContent();
  1695.                return c = this.element.children("[data-" + this._getNs() + "url='" + a.mobile.path.hashToSelector(e) + "']"), 0 === c.length && e && !a.mobile.path.isPath(e) && (c = this.element.children(a.mobile.path.hashToSelector("#" + e)).attr("data-" + this._getNs() + "url", e).jqmData("url", e)), 0 === c.length && a.mobile.path.isFirstPageUrl(d) && f && f.parent().length && (c = a(f)), c
  1696.            },
  1697.            _getLoader: function() {
  1698.                return a.mobile.loading()
  1699.            },
  1700.            _showLoading: function(b, c, d, e) {
  1701.                this._loadMsg || (this._loadMsg = setTimeout(a.proxy(function() {
  1702.                    this._getLoader().loader("show", c, d, e), this._loadMsg = 0
  1703.                }, this), b))
  1704.            },
  1705.            _hideLoading: function() {
  1706.                clearTimeout(this._loadMsg), this._loadMsg = 0, this._getLoader().loader("hide")
  1707.            },
  1708.            _showError: function() {
  1709.                this._hideLoading(), this._showLoading(0, a.mobile.pageLoadErrorMessageTheme, a.mobile.pageLoadErrorMessage, !0), setTimeout(a.proxy(this, "_hideLoading"), 1500)
  1710.            },
  1711.            _parse: function(b, c) {
  1712.                var d, e = a("<div></div>");
  1713.                return e.get(0).innerHTML = b, d = e.find(":jqmData(role='page'), :jqmData(role='dialog')").first(), d.length || (d = a("<div data-" + this._getNs() + "role='page'>" + (b.split(/<\/?body[^>]*>/gim)[1] || "") + "</div>")), d.attr("data-" + this._getNs() + "url", this._createDataUrl(c)).attr("data-" + this._getNs() + "external-page", !0), d
  1714.            },
  1715.            _setLoadedTitle: function(b, c) {
  1716.                var d = c.match(/<title[^>]*>([^<]*)/) && RegExp.$1;
  1717.                d && !b.jqmData("title") && (d = a("<div>" + d + "</div>").text(), b.jqmData("title", d))
  1718.            },
  1719.            _isRewritableBaseTag: function() {
  1720.                return a.mobile.dynamicBaseEnabled && !a.support.dynamicBaseTag
  1721.            },
  1722.            _createDataUrl: function(b) {
  1723.                return a.mobile.path.convertUrlToDataUrl(b)
  1724.            },
  1725.            _createFileUrl: function(b) {
  1726.                return a.mobile.path.getFilePath(b)
  1727.            },
  1728.            _triggerWithDeprecated: function(b, c, d) {
  1729.                var e = a.Event("page" + b),
  1730.                    f = a.Event(this.widgetName + b);
  1731.                return (d || this.element).trigger(e, c), this._trigger(b, f, c), {
  1732.                    deprecatedEvent: e,
  1733.                    event: f
  1734.                }
  1735.            },
  1736.            _loadSuccess: function(b, c, e, f) {
  1737.                var g = this._createFileUrl(b);
  1738.                return a.proxy(function(h, i, j) {
  1739.                    var k, l = new RegExp("(<[^>]+\\bdata-" + this._getNs() + "role=[\"']?page[\"']?[^>]*>)"),
  1740.                         m = new RegExp("\\bdata-" + this._getNs() + "url=[\"']?([^\"'>]*)[\"']?");
  1741.                     l.test(h) && RegExp.$1 && m.test(RegExp.$1) && RegExp.$1 && (g = a.mobile.path.getFilePath(a("<div>" + RegExp.$1 + "</div>").text()), g = this.window[0].encodeURIComponent(g)), e.prefetch === d && this._getBase().set(g), k = this._parse(h, g), this._setLoadedTitle(k, h), c.xhr = j, c.textStatus = i, c.page = k, c.content = k, c.toPage = k, this._triggerWithDeprecated("load", c).event.isDefaultPrevented() || (this._isRewritableBaseTag() && k && this._getBase().rewrite(g, k), this._include(k, e), e.showLoadMsg && this._hideLoading(), f.resolve(b, e, k))
  1742.                 }, this)
  1743.             },
  1744.             _loadDefaults: {
  1745.                 type: "get",
  1746.                 data: d,
  1747.                 reloadPage: !1,
  1748.                 reload: !1,
  1749.                 role: d,
  1750.                 showLoadMsg: !1,
  1751.                 loadMsgDelay: 50
  1752.             },
  1753.             load: function(b, c) {
  1754.                 var e, f, g, h, i = c && c.deferred || a.Deferred(),
  1755.                     j = a.extend({}, this._loadDefaults, c),
  1756.                     k = null,
  1757.                     l = a.mobile.path.makeUrlAbsolute(b, this._findBaseWithDefault());
  1758.                 return j.reload = j.reloadPage, j.data && "get" === j.type && (l = a.mobile.path.addSearchParams(l, j.data), j.data = d), j.data && "post" === j.type && (j.reload = !0), e = this._createFileUrl(l), f = this._createDataUrl(l), k = this._find(l), 0 === k.length && a.mobile.path.isEmbeddedPage(e) && !a.mobile.path.isFirstPageUrl(e) ? (i.reject(l, j), i.promise()) : (this._getBase().reset(), k.length && !j.reload ? (this._enhance(k, j.role), i.resolve(l, j, k), j.prefetch || this._getBase().set(b), i.promise()) : (h = {
  1759.                     url: b,
  1760.                     absUrl: l,
  1761.                     toPage: b,
  1762.                     prevPage: c ? c.fromPage : d,
  1763.                     dataUrl: f,
  1764.                     deferred: i,
  1765.                     options: j
  1766.                 }, g = this._triggerWithDeprecated("beforeload", h), g.deprecatedEvent.isDefaultPrevented() || g.event.isDefaultPrevented() ? i.promise() : (j.showLoadMsg && this._showLoading(j.loadMsgDelay), j.prefetch === d && this._getBase().reset(), a.mobile.allowCrossDomainPages || a.mobile.path.isSameDomain(a.mobile.path.documentUrl, l) ? (a.ajax({
  1767.                     url: e,
  1768.                     type: j.type,
  1769.                     data: j.data,
  1770.                     contentType: j.contentType,
  1771.                     dataType: "html",
  1772.                     success: this._loadSuccess(l, h, j, i),
  1773.                     error: this._loadError(l, h, j, i)
  1774.                 }), i.promise()) : (i.reject(l, j), i.promise()))))
  1775.             },
  1776.             _loadError: function(b, c, d, e) {
  1777.                 return a.proxy(function(f, g, h) {
  1778.                     this._getBase().set(a.mobile.path.get()), c.xhr = f, c.textStatus = g, c.errorThrown = h;
  1779.                     var i = this._triggerWithDeprecated("loadfailed", c);
  1780.                     i.deprecatedEvent.isDefaultPrevented() || i.event.isDefaultPrevented() || (d.showLoadMsg && this._showError(), e.reject(b, d))
  1781.                 }, this)
  1782.             },
  1783.             _getTransitionHandler: function(b) {
  1784.                 return b = a.mobile._maybeDegradeTransition(b), a.mobile.transitionHandlers[b] || a.mobile.defaultTransitionHandler
  1785.             },
  1786.             _triggerCssTransitionEvents: function(b, c, d) {
  1787.                 var e = !1;
  1788.                 d = d || "", c && (b[0] === c[0] && (e = !0), this._triggerWithDeprecated(d + "hide", {
  1789.                     nextPage: b,
  1790.                     toPage: b,
  1791.                     prevPage: c,
  1792.                     samePage: e
  1793.                 }, c)), this._triggerWithDeprecated(d + "show", {
  1794.                     prevPage: c || a(""),
  1795.                     toPage: b
  1796.                 }, b)
  1797.             },
  1798.             _cssTransition: function(b, c, d) {
  1799.                 var e, f, g = d.transition,
  1800.                     h = d.reverse,
  1801.                     i = d.deferred;
  1802.                 this._triggerCssTransitionEvents(b, c, "before"), this._hideLoading(), e = this._getTransitionHandler(g), f = new e(g, h, b, c).transition(), f.done(a.proxy(function() {
  1803.                     this._triggerCssTransitionEvents(b, c)
  1804.                 }, this)), f.done(function() {
  1805.                     i.resolve.apply(i, arguments)
  1806.                 })
  1807.             },
  1808.             _releaseTransitionLock: function() {
  1809.                 f = !1, e.length > 0 && a.mobile.changePage.apply(null, e.pop())
  1810.             },
  1811.             _removeActiveLinkClass: function(b) {
  1812.                 a.mobile.removeActiveLinkClass(b)
  1813.             },
  1814.             _loadUrl: function(b, c, d) {
  1815.                 d.target = b, d.deferred = a.Deferred(), this.load(b, d), d.deferred.done(a.proxy(function(a, b, d) {
  1816.                     f = !1, b.absUrl = c.absUrl, this.transition(d, c, b)
  1817.                 }, this)), d.deferred.fail(a.proxy(function() {
  1818.                     this._removeActiveLinkClass(!0), this._releaseTransitionLock(), this._triggerWithDeprecated("changefailed", c)
  1819.                 }, this))
  1820.             },
  1821.             _triggerPageBeforeChange: function(b, c, d) {
  1822.                 var e;
  1823.                 return c.prevPage = this.activePage, a.extend(c, {
  1824.                     toPage: b,
  1825.                     options: d
  1826.                 }), c.absUrl = "string" === a.type(b) ? a.mobile.path.makeUrlAbsolute(b, this._findBaseWithDefault()) : d.absUrl, e = this._triggerWithDeprecated("beforechange", c), e.event.isDefaultPrevented() || e.deprecatedEvent.isDefaultPrevented() ? !1 : !0
  1827.             },
  1828.             change: function(b, c) {
  1829.                 if (f) return void e.unshift(arguments);
  1830.                 var d = a.extend({}, a.mobile.changePage.defaults, c),
  1831.                     g = {};
  1832.                 d.fromPage = d.fromPage || this.activePage, this._triggerPageBeforeChange(b, g, d) && (b = g.toPage, "string" === a.type(b) ? (f = !0, this._loadUrl(b, g, d)) : this.transition(b, g, d))
  1833.             },
  1834.             transition: function(b, g, h) {
  1835.                 var i, j, k, l, m, n, o, p, q, r, s, t, u, v;
  1836.                 if (f) return void e.unshift([b, h]);
  1837.                 if (this._triggerPageBeforeChange(b, g, h) && (g.prevPage = h.fromPage, v = this._triggerWithDeprecated("beforetransition", g), !v.deprecatedEvent.isDefaultPrevented() && !v.event.isDefaultPrevented())) {
  1838.                     if (f = !0, b[0] !== a.mobile.firstPage[0] || h.dataUrl || (h.dataUrl = a.mobile.path.documentUrl.hrefNoHash), i = h.fromPage, j = h.dataUrl && a.mobile.path.convertUrlToDataUrl(h.dataUrl) || b.jqmData("url"), k = j, l = a.mobile.path.getFilePath(j), m = a.mobile.navigate.history.getActive(), n = 0 === a.mobile.navigate.history.activeIndex, o = 0, p = c.title, q = ("dialog" === h.role || "dialog" === b.jqmData("role")) && b.jqmData("dialog") !== !0, i && i[0] === b[0] && !h.allowSamePageTransition) return f = !1, this._triggerWithDeprecated("transition", g), this._triggerWithDeprecated("change", g), void(h.fromHashChange && a.mobile.navigate.history.direct({
  1839.                         url: j
  1840.                     }));
  1841.                     b.page({
  1842.                         role: h.role
  1843.                     }), h.fromHashChange && (o = "back" === h.direction ? -1 : 1);
  1844.                     try {
  1845.                         c.activeElement && "body" !== c.activeElement.nodeName.toLowerCase() ? a(c.activeElement).blur() : a("input:focus, textarea:focus, select:focus").blur()
  1846.                     } catch (w) {}
  1847.                     r = !1, q && m && (m.url && m.url.indexOf(a.mobile.dialogHashKey) > -1 && this.activePage && !this.activePage.hasClass("ui-dialog") && a.mobile.navigate.history.activeIndex > 0 && (h.changeHash = !1, r = !0), j = m.url || "", j += !r && j.indexOf("#") > -1 ? a.mobile.dialogHashKey : "#" + a.mobile.dialogHashKey), s = m ? b.jqmData("title") || b.children(":jqmData(role='header')").find(".ui-title").text() : p, s && p === c.title && (p = s), b.jqmData("title") || b.jqmData("title", p), h.transition = h.transition || (o && !n ? m.transition : d) || (q ? a.mobile.defaultDialogTransition : a.mobile.defaultPageTransition), !o && r && (a.mobile.navigate.history.getActive().pageUrl = k), j && !h.fromHashChange && (!a.mobile.path.isPath(j) && j.indexOf("#") < 0 && (j = "#" + j), t = {
  1848.                         transition: h.transition,
  1849.                         title: p,
  1850.                         pageUrl: k,
  1851.                         role: h.role
  1852.                     }, h.changeHash !== !1 && a.mobile.hashListeningEnabled ? a.mobile.navigate(this.window[0].encodeURI(j), t, !0) : b[0] !== a.mobile.firstPage[0] && a.mobile.navigate.history.add(j, t)), c.title = p, a.mobile.activePage = b, this.activePage = b, h.reverse = h.reverse || 0 > o, u = a.Deferred(), this._cssTransition(b, i, {
  1853.                         transition: h.transition,
  1854.                         reverse: h.reverse,
  1855.                         deferred: u
  1856.                     }), u.done(a.proxy(function(c, d, e, f, i) {
  1857.                         a.mobile.removeActiveLinkClass(), h.duplicateCachedPage && h.duplicateCachedPage.remove(), i || a.mobile.focusPage(b), this._releaseTransitionLock(), this._triggerWithDeprecated("transition", g), this._triggerWithDeprecated("change", g)
  1858.                     }, this))
  1859.                 }
  1860.             },
  1861.             _findBaseWithDefault: function() {
  1862.                 var b = this.activePage && a.mobile.getClosestBaseUrl(this.activePage);
  1863.                 return b || a.mobile.path.documentBase.hrefNoHash
  1864.             }
  1865.         }), a.mobile.navreadyDeferred = a.Deferred();
  1866.         var e = [],
  1867.             f = !1
  1868.     }(a),
  1869.     function(a, d) {
  1870.         function e(a) {
  1871.             for (; a && ("string" != typeof a.nodeName || "a" !== a.nodeName.toLowerCase());) a = a.parentNode;
  1872.             return a
  1873.         }
  1874.         var f = a.Deferred(),
  1875.             g = a.Deferred(),
  1876.             h = function() {
  1877.                 g.resolve(), g = null
  1878.             },
  1879.             i = a.mobile.path.documentUrl,
  1880.             j = null;
  1881.         a.mobile.loadPage = function(b, c) {
  1882.             var d;
  1883.             return c = c || {}, d = c.pageContainer || a.mobile.pageContainer, c.deferred = a.Deferred(), d.pagecontainer("load", b, c), c.deferred.promise()
  1884.         }, a.mobile.back = function() {
  1885.             var c = b.navigator;
  1886.             this.phonegapNavigationEnabled && c && c.app && c.app.backHistory ? c.app.backHistory() : a.mobile.pageContainer.pagecontainer("back")
  1887.         }, a.mobile.focusPage = function(a) {
  1888.             var b = a.find("[autofocus]"),
  1889.                 c = a.find(".ui-title:eq(0)");
  1890.             return b.length ? void b.focus() : void(c.length ? c.focus() : a.focus())
  1891.         }, a.mobile._maybeDegradeTransition = a.mobile._maybeDegradeTransition || function(a) {
  1892.             return a
  1893.         }, a.mobile.changePage = function(b, c) {
  1894.             a.mobile.pageContainer.pagecontainer("change", b, c)
  1895.         }, a.mobile.changePage.defaults = {
  1896.             transition: d,
  1897.             reverse: !1,
  1898.             changeHash: !0,
  1899.             fromHashChange: !1,
  1900.             role: d,
  1901.             duplicateCachedPage: d,
  1902.             pageContainer: d,
  1903.             showLoadMsg: !0,
  1904.             dataUrl: d,
  1905.             fromPage: d,
  1906.             allowSamePageTransition: !1
  1907.         }, a.mobile._registerInternalEvents = function() {
  1908.             var c = function(b, c) {
  1909.                 var d, e, f, g, h = !0;
  1910.                 return !a.mobile.ajaxEnabled || b.is(":jqmData(ajax='false')") || !b.jqmHijackable().length || b.attr("target") ? !1 : (d = j && j.attr("formaction") || b.attr("action"), g = (b.attr("method") || "get").toLowerCase(), d || (d = a.mobile.getClosestBaseUrl(b), "get" === g && (d = a.mobile.path.parseUrl(d).hrefNoSearch), d === a.mobile.path.documentBase.hrefNoHash && (d = i.hrefNoSearch)), d = a.mobile.path.makeUrlAbsolute(d, a.mobile.getClosestBaseUrl(b)), a.mobile.path.isExternal(d) && !a.mobile.path.isPermittedCrossDomainRequest(i, d) ? !1 : (c || (e = b.serializeArray(), j && j[0].form === b[0] && (f = j.attr("name"), f && (a.each(e, function(a, b) {
  1911.                     return b.name === f ? (f = "", !1) : void 0
  1912.                 }), f && e.push({
  1913.                     name: f,
  1914.                     value: j.attr("value")
  1915.                 }))), h = {
  1916.                     url: d,
  1917.                     options: {
  1918.                         type: g,
  1919.                         data: a.param(e),
  1920.                         transition: b.jqmData("transition"),
  1921.                         reverse: "reverse" === b.jqmData("direction"),
  1922.                         reloadPage: !0
  1923.                     }
  1924.                 }), h))
  1925.             };
  1926.             a.mobile.document.delegate("form", "submit", function(b) {
  1927.                 var d;
  1928.                 b.isDefaultPrevented() || (d = c(a(this)), d && (a.mobile.changePage(d.url, d.options), b.preventDefault()))
  1929.             }), a.mobile.document.bind("vclick", function(b) {
  1930.                 var d, f, g = b.target,
  1931.                     h = !1;
  1932.                 if (!(b.which > 1) && a.mobile.linkBindingEnabled) {
  1933.                     if (j = a(g), a.data(g, "mobile-button")) {
  1934.                         if (!c(a(g).closest("form"), !0)) return;
  1935.                         g.parentNode && (g = g.parentNode)
  1936.                     } else {
  1937.                         if (g = e(g), !g || "#" === a.mobile.path.parseUrl(g.getAttribute("href") || "#").hash) return;
  1938.                         if (!a(g).jqmHijackable().length) return
  1939.                     }~g.className.indexOf("ui-link-inherit") ? g.parentNode && (f = a.data(g.parentNode, "buttonElements")) : f = a.data(g, "buttonElements"), f ? g = f.outer : h = !0, d = a(g), h && (d = d.closest(".ui-btn")), d.length > 0 && !d.hasClass("ui-state-disabled") && (a.mobile.removeActiveLinkClass(!0), a.mobile.activeClickedLink = d, a.mobile.activeClickedLink.addClass(a.mobile.activeBtnClass))
  1940.                 }
  1941.             }), a.mobile.document.bind("click", function(c) {
  1942.                 if (a.mobile.linkBindingEnabled && !c.isDefaultPrevented()) {
  1943.                     var f, g, h, j, k, l, m, n = e(c.target),
  1944.                         o = a(n),
  1945.                         p = function() {
  1946.                             b.setTimeout(function() {
  1947.                                 a.mobile.removeActiveLinkClass(!0)
  1948.                             }, 200)
  1949.                         };
  1950.                     if (a.mobile.activeClickedLink && a.mobile.activeClickedLink[0] === c.target.parentNode && p(), n && !(c.which > 1) && o.jqmHijackable().length) {
  1951.                         if (o.is(":jqmData(rel='back')")) return a.mobile.back(), !1;
  1952.                         if (f = a.mobile.getClosestBaseUrl(o), g = a.mobile.path.makeUrlAbsolute(o.attr("href") || "#", f), !a.mobile.ajaxEnabled && !a.mobile.path.isEmbeddedPage(g)) return void p();
  1953.                         if (!(-1 === g.search("#") || a.mobile.path.isExternal(g) && a.mobile.path.isAbsoluteUrl(g))) {
  1954.                             if (g = g.replace(/[^#]*#/, ""), !g) return void c.preventDefault();
  1955.                             g = a.mobile.path.isPath(g) ? a.mobile.path.makeUrlAbsolute(g, f) : a.mobile.path.makeUrlAbsolute("#" + g, i.hrefNoHash)
  1956.                         }
  1957.                         if (h = o.is("[rel='external']") || o.is(":jqmData(ajax='false')") || o.is("[target]"), j = h || a.mobile.path.isExternal(g) && !a.mobile.path.isPermittedCrossDomainRequest(i, g)) return void p();
  1958.                         k = o.jqmData("transition"), l = "reverse" === o.jqmData("direction") || o.jqmData("back"), m = o.attr("data-" + a.mobile.ns + "rel") || d, a.mobile.changePage(g, {
  1959.                             transition: k,
  1960.                             reverse: l,
  1961.                             role: m,
  1962.                             link: o
  1963.                         }), c.preventDefault()
  1964.                     }
  1965.                 }
  1966.             }), a.mobile.document.delegate(".ui-page", "pageshow.prefetch", function() {
  1967.                 var b = [];
  1968.                 a(this).find("a:jqmData(prefetch)").each(function() {
  1969.                     var c = a(this),
  1970.                         d = c.attr("href");
  1971.                     d && -1 === a.inArray(d, b) && (b.push(d), a.mobile.loadPage(d, {
  1972.                         role: c.attr("data-" + a.mobile.ns + "rel"),
  1973.                         prefetch: !0
  1974.                     }))
  1975.                 })
  1976.             }), a.mobile.pageContainer.pagecontainer(), a.mobile.document.bind("pageshow", function() {
  1977.                 g ? g.done(a.mobile.resetActivePageHeight) : a.mobile.resetActivePageHeight()
  1978.             }), a.mobile.window.bind("throttledresize", a.mobile.resetActivePageHeight)
  1979.         }, a(function() {
  1980.             f.resolve()
  1981.         }), "complete" === c.readyState ? h() : a.mobile.window.load(h), a.when(f, a.mobile.navreadyDeferred).done(function() {
  1982.             a.mobile._registerInternalEvents()
  1983.         })
  1984.     }(a),
  1985.     function(a, b) {
  1986.         a.mobile.Transition = function() {
  1987.             this.init.apply(this, arguments)
  1988.         }, a.extend(a.mobile.Transition.prototype, {
  1989.             toPreClass: " ui-page-pre-in",
  1990.             init: function(b, c, d, e) {
  1991.                 a.extend(this, {
  1992.                     name: b,
  1993.                     reverse: c,
  1994.                     $to: d,
  1995.                     $from: e,
  1996.                     deferred: new a.Deferred
  1997.                 })
  1998.             },
  1999.             cleanFrom: function() {
  2000.                 this.$from.removeClass(a.mobile.activePageClass + " out in reverse " + this.name).height("")
  2001.             },
  2002.             beforeDoneIn: function() {},
  2003.             beforeDoneOut: function() {},
  2004.             beforeStartOut: function() {},
  2005.             doneIn: function() {
  2006.                 this.beforeDoneIn(), this.$to.removeClass("out in reverse " + this.name).height(""), this.toggleViewportClass(), a.mobile.window.scrollTop() !== this.toScroll && this.scrollPage(), this.sequential || this.$to.addClass(a.mobile.activePageClass), this.deferred.resolve(this.name, this.reverse, this.$to, this.$from, !0)
  2007.             },
  2008.             doneOut: function(a, b, c, d) {
  2009.                 this.beforeDoneOut(), this.startIn(a, b, c, d)
  2010.             },
  2011.             hideIn: function(a) {
  2012.                 this.$to.css("z-index", -10), a.call(this), this.$to.css("z-index", "")
  2013.             },
  2014.             scrollPage: function() {
  2015.                 a.event.special.scrollstart.enabled = !1, (a.mobile.hideUrlBar || this.toScroll !== a.mobile.defaultHomeScroll) && b.scrollTo(0, this.toScroll), setTimeout(function() {
  2016.                     a.event.special.scrollstart.enabled = !0
  2017.                 }, 150)
  2018.             },
  2019.             startIn: function(b, c, d, e) {
  2020.                 this.hideIn(function() {
  2021.                     this.$to.addClass(a.mobile.activePageClass + this.toPreClass), e || a.mobile.focusPage(this.$to), this.$to.height(b + this.toScroll), d || this.scrollPage()
  2022.                 }), this.$to.removeClass(this.toPreClass).addClass(this.name + " in " + c), d ? this.doneIn() : this.$to.animationComplete(a.proxy(function() {
  2023.                     this.doneIn()
  2024.                 }, this))
  2025.             },
  2026.             startOut: function(b, c, d) {
  2027.                 this.beforeStartOut(b, c, d), this.$from.height(b + a.mobile.window.scrollTop()).addClass(this.name + " out" + c)
  2028.             },
  2029.             toggleViewportClass: function() {
  2030.                 a.mobile.pageContainer.toggleClass("ui-mobile-viewport-transitioning viewport-" + this.name)
  2031.             },
  2032.             transition: function() {
  2033.                 var b, c = this.reverse ? " reverse" : "",
  2034.                     d = a.mobile.getScreenHeight(),
  2035.                     e = a.mobile.maxTransitionWidth !== !1 && a.mobile.window.width() > a.mobile.maxTransitionWidth;
  2036.                 return this.toScroll = a.mobile.navigate.history.getActive().lastScroll || a.mobile.defaultHomeScroll, b = !a.support.cssTransitions || !a.support.cssAnimations || e || !this.name || "none" === this.name || Math.max(a.mobile.window.scrollTop(), this.toScroll) > a.mobile.getMaxScrollForTransition(), this.toggleViewportClass(), this.$from && !b ? this.startOut(d, c, b) : this.doneOut(d, c, b, !0), this.deferred.promise()
  2037.             }
  2038.         })
  2039.     }(a, this),
  2040.     function(a) {
  2041.         a.mobile.SerialTransition = function() {
  2042.             this.init.apply(this, arguments)
  2043.         }, a.extend(a.mobile.SerialTransition.prototype, a.mobile.Transition.prototype, {
  2044.             sequential: !0,
  2045.             beforeDoneOut: function() {
  2046.                 this.$from && this.cleanFrom()
  2047.             },
  2048.             beforeStartOut: function(b, c, d) {
  2049.                 this.$from.animationComplete(a.proxy(function() {
  2050.                     this.doneOut(b, c, d)
  2051.                 }, this))
  2052.             }
  2053.         })
  2054.     }(a),
  2055.     function(a) {
  2056.         a.mobile.ConcurrentTransition = function() {
  2057.             this.init.apply(this, arguments)
  2058.         }, a.extend(a.mobile.ConcurrentTransition.prototype, a.mobile.Transition.prototype, {
  2059.             sequential: !1,
  2060.             beforeDoneIn: function() {
  2061.                 this.$from && this.cleanFrom()
  2062.             },
  2063.             beforeStartOut: function(a, b, c) {
  2064.                 this.doneOut(a, b, c)
  2065.             }
  2066.         })
  2067.     }(a),
  2068.     function(a) {
  2069.         var b = function() {
  2070.             return 3 * a.mobile.getScreenHeight()
  2071.         };
  2072.         a.mobile.transitionHandlers = {
  2073.             sequential: a.mobile.SerialTransition,
  2074.             simultaneous: a.mobile.ConcurrentTransition
  2075.         }, a.mobile.defaultTransitionHandler = a.mobile.transitionHandlers.sequential, a.mobile.transitionFallbacks = {}, a.mobile._maybeDegradeTransition = function(b) {
  2076.             return b && !a.support.cssTransform3d && a.mobile.transitionFallbacks[b] && (b = a.mobile.transitionFallbacks[b]), b
  2077.         }, a.mobile.getMaxScrollForTransition = a.mobile.getMaxScrollForTransition || b
  2078.     }(a),
  2079.     function(a) {
  2080.         a.mobile.transitionFallbacks.flip = "fade"
  2081.     }(a, this),
  2082.     function(a) {
  2083.         a.mobile.transitionFallbacks.flow = "fade"
  2084.     }(a, this),
  2085.     function(a) {
  2086.         a.mobile.transitionFallbacks.pop = "fade"
  2087.     }(a, this),
  2088.     function(a) {
  2089.         a.mobile.transitionHandlers.slide = a.mobile.transitionHandlers.simultaneous, a.mobile.transitionFallbacks.slide = "fade"
  2090.     }(a, this),
  2091.     function(a) {
  2092.         a.mobile.transitionFallbacks.slidedown = "fade"
  2093.     }(a, this),
  2094.     function(a) {
  2095.         a.mobile.transitionFallbacks.slidefade = "fade"
  2096.     }(a, this),
  2097.     function(a) {
  2098.         a.mobile.transitionFallbacks.slideup = "fade"
  2099.     }(a, this),
  2100.     function(a) {
  2101.         a.mobile.transitionFallbacks.turn = "fade"
  2102.     }(a, this),
  2103.     function(a) {
  2104.         a.mobile.degradeInputs = {
  2105.             color: !1,
  2106.             date: !1,
  2107.             datetime: !1,
  2108.             "datetime-local": !1,
  2109.             email: !1,
  2110.             month: !1,
  2111.             number: !1,
  2112.             range: "number",
  2113.             search: "text",
  2114.             tel: !1,
  2115.             time: !1,
  2116.             url: !1,
  2117.             week: !1
  2118.         }, a.mobile.page.prototype.options.degradeInputs = a.mobile.degradeInputs, a.mobile.degradeInputsWithin = function(b) {
  2119.             b = a(b), b.find("input").not(a.mobile.page.prototype.keepNativeSelector()).each(function() {
  2120.                 var b, c, d, e, f = a(this),
  2121.                     g = this.getAttribute("type"),
  2122.                     h = a.mobile.degradeInputs[g] || "text";
  2123.                 a.mobile.degradeInputs[g] && (b = a("<div>").html(f.clone()).html(), c = b.indexOf(" type=") > -1, d = c ? /\s+type=["']?\w+['"]?/ : /\/?>/, e = ' type="' + h + '" data-' + a.mobile.ns + 'type="' + g + '"' + (c ? "" : ">"), f.replaceWith(b.replace(d, e)))
  2124.             })
  2125.         }
  2126.     }(a),
  2127.     function(a, b, c) {
  2128.         a.widget("mobile.page", a.mobile.page, {
  2129.             options: {
  2130.                 closeBtn: "left",
  2131.                 closeBtnText: "Close",
  2132.                 overlayTheme: "a",
  2133.                 corners: !0,
  2134.                 dialog: !1
  2135.             },
  2136.             _create: function() {
  2137.                 this._super(), this.options.dialog && (a.extend(this, {
  2138.                     _inner: this.element.children(),
  2139.                     _headerCloseButton: null
  2140.                 }), this.options.enhanced || this._setCloseBtn(this.options.closeBtn))
  2141.             },
  2142.             _enhance: function() {
  2143.                 this._super(), this.options.dialog && this.element.addClass("ui-dialog").wrapInner(a("<div/>", {
  2144.                     role: "dialog",
  2145.                     "class": "ui-dialog-contain ui-overlay-shadow" + (this.options.corners ? " ui-corner-all" : "")
  2146.                 }))
  2147.             },
  2148.             _setOptions: function(b) {
  2149.                 var d, e, f = this.options;
  2150.                 b.corners !== c && this._inner.toggleClass("ui-corner-all", !!b.corners), b.overlayTheme !== c && a.mobile.activePage[0] === this.element[0] && (f.overlayTheme = b.overlayTheme, this._handlePageBeforeShow()), b.closeBtnText !== c && (d = f.closeBtn, e = b.closeBtnText), b.closeBtn !== c && (d = b.closeBtn), d && this._setCloseBtn(d, e), this._super(b)
  2151.             },
  2152.             _handlePageBeforeShow: function() {
  2153.                 this.options.overlayTheme && this.options.dialog ? (this.removeContainerBackground(), this.setContainerBackground(this.options.overlayTheme)) : this._super()
  2154.             },
  2155.             _setCloseBtn: function(b, c) {
  2156.                 var d, e = this._headerCloseButton;
  2157.                 b = "left" === b ? "left" : "right" === b ? "right" : "none", "none" === b ? e && (e.remove(), e = null) : e ? (e.removeClass("ui-btn-left ui-btn-right").addClass("ui-btn-" + b), c && e.text(c)) : (d = this._inner.find(":jqmData(role='header')").first(), e = a("<a></a>", {
  2158.                     href: "#",
  2159.                     "class": "ui-btn ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-" + b
  2160.                 }).attr("data-" + a.mobile.ns + "rel", "back").text(c || this.options.closeBtnText || "").prependTo(d)), this._headerCloseButton = e
  2161.             }
  2162.         })
  2163.     }(a, this),
  2164.     function(a, b, c) {
  2165.         a.widget("mobile.dialog", {
  2166.             options: {
  2167.                 closeBtn: "left",
  2168.                 closeBtnText: "Close",
  2169.                 overlayTheme: "a",
  2170.                 corners: !0
  2171.             },
  2172.             _handlePageBeforeShow: function() {
  2173.                 this._isCloseable = !0, this.options.overlayTheme && this.element.page("removeContainerBackground").page("setContainerBackground", this.options.overlayTheme)
  2174.             },
  2175.             _handlePageBeforeHide: function() {
  2176.                 this._isCloseable = !1
  2177.             },
  2178.             _handleVClickSubmit: function(b) {
  2179.                 var c, d = a(b.target).closest("vclick" === b.type ? "a" : "form");
  2180.                 d.length && !d.jqmData("transition") && (c = {}, c["data-" + a.mobile.ns + "transition"] = (a.mobile.navigate.history.getActive() || {}).transition || a.mobile.defaultDialogTransition, c["data-" + a.mobile.ns + "direction"] = "reverse", d.attr(c))
  2181.             },
  2182.             _create: function() {
  2183.                 var b = this.element,
  2184.                     c = this.options;
  2185.                 b.addClass("ui-dialog").wrapInner(a("<div/>", {
  2186.                     role: "dialog",
  2187.                     "class": "ui-dialog-contain ui-overlay-shadow" + (c.corners ? " ui-corner-all" : "")
  2188.                 })), a.extend(this, {
  2189.                     _isCloseable: !1,
  2190.                     _inner: b.children(),
  2191.                     _headerCloseButton: null
  2192.                 }), this._on(b, {
  2193.                     vclick: "_handleVClickSubmit",
  2194.                     submit: "_handleVClickSubmit",
  2195.                     pagebeforeshow: "_handlePageBeforeShow",
  2196.                     pagebeforehide: "_handlePageBeforeHide"
  2197.                 }), this._setCloseBtn(c.closeBtn)
  2198.             },
  2199.             _setOptions: function(b) {
  2200.                 var d, e, f = this.options;
  2201.                 b.corners !== c && this._inner.toggleClass("ui-corner-all", !!b.corners), b.overlayTheme !== c && a.mobile.activePage[0] === this.element[0] && (f.overlayTheme = b.overlayTheme, this._handlePageBeforeShow()), b.closeBtnText !== c && (d = f.closeBtn, e = b.closeBtnText), b.closeBtn !== c && (d = b.closeBtn), d && this._setCloseBtn(d, e), this._super(b)
  2202.             },
  2203.             _setCloseBtn: function(b, c) {
  2204.                 var d, e = this._headerCloseButton;
  2205.                 b = "left" === b ? "left" : "right" === b ? "right" : "none", "none" === b ? e && (e.remove(), e = null) : e ? (e.removeClass("ui-btn-left ui-btn-right").addClass("ui-btn-" + b), c && e.text(c)) : (d = this._inner.find(":jqmData(role='header')").first(), e = a("<a></a>", {
  2206.                     role: "button",
  2207.                     href: "#",
  2208.                     "class": "ui-btn ui-corner-all ui-icon-delete ui-btn-icon-notext ui-btn-" + b
  2209.                 }).text(c || this.options.closeBtnText || "").prependTo(d), this._on(e, {
  2210.                     click: "close"
  2211.                 })), this._headerCloseButton = e
  2212.             },
  2213.             close: function() {
  2214.                 var b = a.mobile.navigate.history;
  2215.                 this._isCloseable && (this._isCloseable = !1, a.mobile.hashListeningEnabled && b.activeIndex > 0 ? a.mobile.back() : a.mobile.pageContainer.pagecontainer("back"))
  2216.             }
  2217.         })
  2218.     }(a, this),
  2219.     function(a, b) {
  2220.         var c = /([A-Z])/g,
  2221.             d = function(a) {
  2222.                 return "ui-btn-icon-" + (null === a ? "left" : a)
  2223.             };
  2224.         a.widget("mobile.collapsible", {
  2225.             options: {
  2226.                 enhanced: !1,
  2227.                 expandCueText: null,
  2228.                 collapseCueText: null,
  2229.                 collapsed: !0,
  2230.                 heading: "h1,h2,h3,h4,h5,h6,legend",
  2231.                 collapsedIcon: null,
  2232.                 expandedIcon: null,
  2233.                 iconpos: null,
  2234.                 theme: null,
  2235.                 contentTheme: null,
  2236.                 inset: null,
  2237.                 corners: null,
  2238.                 mini: null
  2239.             },
  2240.             _create: function() {
  2241.                 var b = this.element,
  2242.                     c = {
  2243.                         accordion: b.closest(":jqmData(role='collapsible-set'),:jqmData(role='collapsibleset')" + (a.mobile.collapsibleset ? ", :mobile-collapsibleset" : "")).addClass("ui-collapsible-set")
  2244.                     };
  2245.                 this._ui = c, this._renderedOptions = this._getOptions(this.options), this.options.enhanced ? (c.heading = this.element.children(".ui-collapsible-heading"), c.content = c.heading.next(), c.anchor = c.heading.children(), c.status = c.anchor.children(".ui-collapsible-heading-status")) : this._enhance(b, c), this._on(c.heading, {
  2246.                     tap: function() {
  2247.                         c.heading.find("a").first().addClass(a.mobile.activeBtnClass)
  2248.                     },
  2249.                     click: function(a) {
  2250.                         this._handleExpandCollapse(!c.heading.hasClass("ui-collapsible-heading-collapsed")), a.preventDefault(), a.stopPropagation()
  2251.                     }
  2252.                 })
  2253.             },
  2254.             _getOptions: function(b) {
  2255.                 var d, e = this._ui.accordion,
  2256.                     f = this._ui.accordionWidget;
  2257.                 b = a.extend({}, b), e.length && !f && (this._ui.accordionWidget = f = e.data("mobile-collapsibleset"));
  2258.                 for (d in b) b[d] = null != b[d] ? b[d] : f ? f.options[d] : e.length ? a.mobile.getAttribute(e[0], d.replace(c, "-$1").toLowerCase()) : null, null == b[d] && (b[d] = a.mobile.collapsible.defaults[d]);
  2259.                 return b
  2260.             },
  2261.             _themeClassFromOption: function(a, b) {
  2262.                 return b ? "none" === b ? "" : a + b : ""
  2263.             },
  2264.             _enhance: function(b, c) {
  2265.                 var e, f = this._renderedOptions,
  2266.                     g = this._themeClassFromOption("ui-body-", f.contentTheme);
  2267.                 return b.addClass("ui-collapsible " + (f.inset ? "ui-collapsible-inset " : "") + (f.inset && f.corners ? "ui-corner-all " : "") + (g ? "ui-collapsible-themed-content " : "")), c.originalHeading = b.children(this.options.heading).first(), c.content = b.wrapInner("<div class='ui-collapsible-content " + g + "'></div>").children(".ui-collapsible-content"), c.heading = c.originalHeading, c.heading.is("legend") && (c.heading = a("<div role='heading'>" + c.heading.html() + "</div>"), c.placeholder = a("<div><!-- placeholder for legend --></div>").insertBefore(c.originalHeading), c.originalHeading.remove()), e = f.collapsed ? f.collapsedIcon ? "ui-icon-" + f.collapsedIcon : "" : f.expandedIcon ? "ui-icon-" + f.expandedIcon : "", c.status = a("<span class='ui-collapsible-heading-status'></span>"), c.anchor = c.heading.detach().addClass("ui-collapsible-heading").append(c.status).wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a").first().addClass("ui-btn " + (e ? e + " " : "") + (e ? d(f.iconpos) + " " : "") + this._themeClassFromOption("ui-btn-", f.theme) + " " + (f.mini ? "ui-mini " : "")), c.heading.insertBefore(c.content), this._handleExpandCollapse(this.options.collapsed), c
  2268.             },
  2269.             refresh: function() {
  2270.                 this._applyOptions(this.options), this._renderedOptions = this._getOptions(this.options)
  2271.             },
  2272.             _applyOptions: function(a) {
  2273.                 var c, e, f, g, h, i = this.element,
  2274.                     j = this._renderedOptions,
  2275.                     k = this._ui,
  2276.                     l = k.anchor,
  2277.                     m = k.status,
  2278.                     n = this._getOptions(a);
  2279.                 a.collapsed !== b && this._handleExpandCollapse(a.collapsed), c = i.hasClass("ui-collapsible-collapsed"), c ? n.expandCueText !== b && m.text(n.expandCueText) : n.collapseCueText !== b && m.text(n.collapseCueText), h = n.collapsedIcon !== b ? n.collapsedIcon !== !1 : j.collapsedIcon !== !1, (n.iconpos !== b || n.collapsedIcon !== b || n.expandedIcon !== b) && (l.removeClass([d(j.iconpos)].concat(j.expandedIcon ? ["ui-icon-" + j.expandedIcon] : []).concat(j.collapsedIcon ? ["ui-icon-" + j.collapsedIcon] : []).join(" ")), h && l.addClass([d(n.iconpos !== b ? n.iconpos : j.iconpos)].concat(c ? ["ui-icon-" + (n.collapsedIcon !== b ? n.collapsedIcon : j.collapsedIcon)] : ["ui-icon-" + (n.expandedIcon !== b ? n.expandedIcon : j.expandedIcon)]).join(" "))), n.theme !== b && (f = this._themeClassFromOption("ui-btn-", j.theme), e = this._themeClassFromOption("ui-btn-", n.theme), l.removeClass(f).addClass(e)), n.contentTheme !== b && (f = this._themeClassFromOption("ui-body-", j.contentTheme), e = this._themeClassFromOption("ui-body-", n.contentTheme), k.content.removeClass(f).addClass(e)), n.inset !== b && (i.toggleClass("ui-collapsible-inset", n.inset), g = !(!n.inset || !n.corners && !j.corners)), n.corners !== b && (g = !(!n.corners || !n.inset && !j.inset)), g !== b && i.toggleClass("ui-corner-all", g), n.mini !== b && l.toggleClass("ui-mini", n.mini)
  2280.             },
  2281.             _setOptions: function(a) {
  2282.                 this._applyOptions(a), this._super(a), this._renderedOptions = this._getOptions(this.options)
  2283.             },
  2284.             _handleExpandCollapse: function(b) {
  2285.                 var c = this._renderedOptions,
  2286.                     d = this._ui;
  2287.                 d.status.text(b ? c.expandCueText : c.collapseCueText), d.heading.toggleClass("ui-collapsible-heading-collapsed", b).find("a").first().toggleClass("ui-icon-" + c.expandedIcon, !b).toggleClass("ui-icon-" + c.collapsedIcon, b || c.expandedIcon === c.collapsedIcon).removeClass(a.mobile.activeBtnClass), this.element.toggleClass("ui-collapsible-collapsed", b), d.content.toggleClass("ui-collapsible-content-collapsed", b).attr("aria-hidden", b).trigger("updatelayout"), this.options.collapsed = b, this._trigger(b ? "collapse" : "expand")
  2288.             },
  2289.             expand: function() {
  2290.                 this._handleExpandCollapse(!1)
  2291.             },
  2292.             collapse: function() {
  2293.                 this._handleExpandCollapse(!0)
  2294.             },
  2295.             _destroy: function() {
  2296.                 var a = this._ui,
  2297.                     b = this.options;
  2298.                 b.enhanced || (a.placeholder ? (a.originalHeading.insertBefore(a.placeholder), a.placeholder.remove(), a.heading.remove()) : (a.status.remove(), a.heading.removeClass("ui-collapsible-heading ui-collapsible-heading-collapsed").children().contents().unwrap()), a.anchor.contents().unwrap(), a.content.contents().unwrap(), this.element.removeClass("ui-collapsible ui-collapsible-collapsed ui-collapsible-themed-content ui-collapsible-inset ui-corner-all"))
  2299.             }
  2300.         }), a.mobile.collapsible.defaults = {
  2301.             expandCueText: " click to expand contents",
  2302.             collapseCueText: " click to collapse contents",
  2303.             collapsedIcon: "plus",
  2304.             contentTheme: "inherit",
  2305.             expandedIcon: "minus",
  2306.             iconpos: "left",
  2307.             inset: !0,
  2308.             corners: !0,
  2309.             theme: "inherit",
  2310.             mini: !1
  2311.         }
  2312.     }(a),
  2313.     function(a) {
  2314.         function b(b) {
  2315.             var d, e = b.length,
  2316.                 f = [];
  2317.             for (d = 0; e > d; d++) b[d].className.match(c) || f.push(b[d]);
  2318.             return a(f)
  2319.         }
  2320.         var c = /\bui-screen-hidden\b/;
  2321.         a.mobile.behaviors.addFirstLastClasses = {
  2322.             _getVisibles: function(a, c) {
  2323.                 var d;
  2324.                 return c ? d = b(a) : (d = a.filter(":visible"), 0 === d.length && (d = b(a))), d
  2325.             },
  2326.             _addFirstLastClasses: function(a, b, c) {
  2327.                 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")
  2328.             },
  2329.             _removeFirstLastClasses: function(a) {
  2330.                 a.removeClass("ui-first-child ui-last-child")
  2331.             }
  2332.         }
  2333.     }(a),
  2334.     function(a, b) {
  2335.         var c = ":mobile-collapsible, " + a.mobile.collapsible.initSelector;
  2336.         a.widget("mobile.collapsibleset", a.extend({
  2337.             initSelector: ":jqmData(role='collapsible-set'),:jqmData(role='collapsibleset')",
  2338.             options: a.extend({
  2339.                 enhanced: !1
  2340.             }, a.mobile.collapsible.defaults),
  2341.             _handleCollapsibleExpand: function(b) {
  2342.                 var c = a(b.target).closest(".ui-collapsible");
  2343.                 c.parent().is(":mobile-collapsibleset, :jqmData(role='collapsible-set')") && c.siblings(".ui-collapsible:not(.ui-collapsible-collapsed)").collapsible("collapse")
  2344.             },
  2345.             _create: function() {
  2346.                 var b = this.element,
  2347.                     c = this.options;
  2348.                 a.extend(this, {
  2349.                     _classes: ""
  2350.                 }), c.enhanced || (b.addClass("ui-collapsible-set " + this._themeClassFromOption("ui-group-theme-", c.theme) + " " + (c.corners && c.inset ? "ui-corner-all " : "")), this.element.find(a.mobile.collapsible.initSelector).collapsible()), this._on(b, {
  2351.                     collapsibleexpand: "_handleCollapsibleExpand"
  2352.                 })
  2353.             },
  2354.             _themeClassFromOption: function(a, b) {
  2355.                 return b ? "none" === b ? "" : a + b : ""
  2356.             },
  2357.             _init: function() {
  2358.                 this._refresh(!0), this.element.children(c).filter(":jqmData(collapsed='false')").collapsible("expand")
  2359.             },
  2360.             _setOptions: function(a) {
  2361.                 var c, d, e = this.element,
  2362.                     f = this._themeClassFromOption("ui-group-theme-", a.theme);
  2363.                 return f && e.removeClass(this._themeClassFromOption("ui-group-theme-", this.options.theme)).addClass(f), a.inset !== b && (d = !(!a.inset || !a.corners && !this.options.corners)), a.corners !== b && (d = !(!a.corners || !a.inset && !this.options.inset)), d !== b && e.toggleClass("ui-corner-all", d), c = this._super(a), this.element.children(":mobile-collapsible").collapsible("refresh"), c
  2364.             },
  2365.             _destroy: function() {
  2366.                 var a = this.element;
  2367.                 this._removeFirstLastClasses(a.children(c)), a.removeClass("ui-collapsible-set ui-corner-all " + this._themeClassFromOption("ui-group-theme-", this.options.theme)).children(":mobile-collapsible").collapsible("destroy")
  2368.             },
  2369.             _refresh: function(b) {
  2370.                 var d = this.element.children(c);
  2371.                 this.element.find(a.mobile.collapsible.initSelector).not(".ui-collapsible").collapsible(), this._addFirstLastClasses(d, this._getVisibles(d, b), b)
  2372.             },
  2373.             refresh: function() {
  2374.                 this._refresh(!1)
  2375.             }
  2376.         }, a.mobile.behaviors.addFirstLastClasses))
  2377.     }(a),
  2378.     function(a) {
  2379.         a.fn.fieldcontain = function() {
  2380.             return this.addClass("ui-field-contain")
  2381.         }
  2382.     }(a),
  2383.     function(a) {
  2384.         a.fn.grid = function(b) {
  2385.             return this.each(function() {
  2386.                 var c, d, e = a(this),
  2387.                     f = a.extend({
  2388.                         grid: null
  2389.                     }, b),
  2390.                     g = e.children(),
  2391.                     h = {
  2392.                         solo: 1,
  2393.                         a: 2,
  2394.                         b: 3,
  2395.                         c: 4,
  2396.                         d: 5
  2397.                     },
  2398.                     i = f.grid;
  2399.                 if (!i)
  2400.                     if (g.length <= 5)
  2401.                         for (d in h) h[d] === g.length && (i = d);
  2402.                     else i = "a", e.addClass("ui-grid-duo");
  2403.                 c = h[i], e.addClass("ui-grid-" + i), g.filter(":nth-child(" + c + "n+1)").addClass("ui-block-a"), c > 1 && g.filter(":nth-child(" + c + "n+2)").addClass("ui-block-b"), c > 2 && g.filter(":nth-child(" + c + "n+3)").addClass("ui-block-c"), c > 3 && g.filter(":nth-child(" + c + "n+4)").addClass("ui-block-d"), c > 4 && g.filter(":nth-child(" + c + "n+5)").addClass("ui-block-e")
  2404.             })
  2405.         }
  2406.     }(a),
  2407.     function(a, b) {
  2408.         a.widget("mobile.navbar", {
  2409.             options: {
  2410.                 iconpos: "top",
  2411.                 grid: null
  2412.             },
  2413.             _create: function() {
  2414.                 var d = this.element,
  2415.                     e = d.find("a, button"),
  2416.                     f = e.filter(":jqmData(icon)").length ? this.options.iconpos : b;
  2417.                 d.addClass("ui-navbar").attr("role", "navigation").find("ul").jqmEnhanceable().grid({
  2418.                     grid: this.options.grid
  2419.                 }), e.each(function() {
  2420.                     var b = a.mobile.getAttribute(this, "icon"),
  2421.                         c = a.mobile.getAttribute(this, "theme"),
  2422.                         d = "ui-btn";
  2423.                     c && (d += " ui-btn-" + c), b && (d += " ui-icon-" + b + " ui-btn-icon-" + f), a(this).addClass(d)
  2424.                 }), d.delegate("a", "vclick", function() {
  2425.                     var b = a(this);
  2426.                     b.hasClass("ui-state-disabled") || b.hasClass("ui-disabled") || b.hasClass(a.mobile.activeBtnClass) || (e.removeClass(a.mobile.activeBtnClass), b.addClass(a.mobile.activeBtnClass), a(c).one("pagehide", function() {
  2427.                         b.removeClass(a.mobile.activeBtnClass)
  2428.                     }))
  2429.                 }), d.closest(".ui-page").bind("pagebeforeshow", function() {
  2430.                     e.filter(".ui-state-persist").addClass(a.mobile.activeBtnClass)
  2431.                 })
  2432.             }
  2433.         })
  2434.     }(a),
  2435.     function(a) {
  2436.         var b = a.mobile.getAttribute;
  2437.         a.widget("mobile.listview", a.extend({
  2438.             options: {
  2439.                 theme: null,
  2440.                 countTheme: null,
  2441.                 dividerTheme: null,
  2442.                 icon: "carat-r",
  2443.                 splitIcon: "carat-r",
  2444.                 splitTheme: null,
  2445.                 corners: !0,
  2446.                 shadow: !0,
  2447.                 inset: !1
  2448.             },
  2449.             _create: function() {
  2450.                 var a = this,
  2451.                     b = "";
  2452.                 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(" ui-listview" + b), a.refresh(!0)
  2453.             },
  2454.             _findFirstElementByTagName: function(a, b, c, d) {
  2455.                 var e = {};
  2456.                 for (e[c] = e[d] = !0; a;) {
  2457.                     if (e[a.nodeName]) return a;
  2458.                     a = a[b]
  2459.                 }
  2460.                 return null
  2461.             },
  2462.             _addThumbClasses: function(b) {
  2463.                 var c, d, e = b.length;
  2464.                 for (c = 0; e > c; c++) d = a(this._findFirstElementByTagName(b[c].firstChild, "nextSibling", "img", "IMG")), d.length && a(this._findFirstElementByTagName(d[0].parentNode, "parentNode", "li", "LI")).addClass(d.hasClass("ui-li-icon") ? "ui-li-has-icon" : "ui-li-has-thumb")
  2465.             },
  2466.             _getChildrenByTagName: function(b, c, d) {
  2467.                 var e = [],
  2468.                     f = {};
  2469.                 for (f[c] = f[d] = !0, b = b.firstChild; b;) f[b.nodeName] && e.push(b), b = b.nextSibling;
  2470.                 return a(e)
  2471.             },
  2472.             _beforeListviewRefresh: a.noop,
  2473.             _afterListviewRefresh: a.noop,
  2474.             refresh: function(c) {
  2475.                 var d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x = this.options,
  2476.                     y = this.element,
  2477.                     z = !!a.nodeName(y[0], "ol"),
  2478.                     A = y.attr("start"),
  2479.                     B = {},
  2480.                     C = y.find(".ui-li-count"),
  2481.                     D = b(y[0], "counttheme") || this.options.countTheme,
  2482.                     E = D ? "ui-body-" + D : "ui-body-inherit";
  2483.                 for (x.theme && y.addClass("ui-group-theme-" + x.theme), z && (A || 0 === A) && (n = parseInt(A, 10) - 1, y.css("counter-reset", "listnumbering " + n)), this._beforeListviewRefresh(), w = this._getChildrenByTagName(y[0], "li", "LI"), e = 0, f = w.length; f > e; e++) g = w.eq(e), h = "", (c || g[0].className.search(/\bui-li-static\b|\bui-li-divider\b/) < 0) && (l = this._getChildrenByTagName(g[0], "a", "A"), m = "list-divider" === b(g[0], "role"), p = g.attr("value"), i = b(g[0], "theme"), l.length && l[0].className.search(/\bui-btn\b/) < 0 && !m ? (j = b(g[0], "icon"), k = j === !1 ? !1 : j || x.icon, l.removeClass("ui-link"), d = "ui-btn", i && (d += " ui-btn-" + i), l.length > 1 ? (h = "ui-li-has-alt", q = l.last(), r = b(q[0], "theme") || x.splitTheme || b(g[0], "theme", !0), s = r ? " ui-btn-" + r : "", t = b(q[0], "icon") || b(g[0], "icon") || x.splitIcon, u = "ui-btn ui-btn-icon-notext ui-icon-" + t + s, q.attr("title", a.trim(q.getEncodedText())).addClass(u).empty(), l = l.first()) : k && (d += " ui-btn-icon-right ui-icon-" + k), l.addClass(d)) : m ? (v = b(g[0], "theme") || x.dividerTheme || x.theme, h = "ui-li-divider ui-bar-" + (v ? v : "inherit"), g.attr("role", "heading")) : l.length <= 0 && (h = "ui-li-static ui-body-" + (i ? i : "inherit")), z && p && (o = parseInt(p, 10) - 1, g.css("counter-reset", "listnumbering " + o))), B[h] || (B[h] = []), B[h].push(g[0]);
  2484.                 for (h in B) a(B[h]).addClass(h);
  2485.                 C.each(function() {
  2486.                     a(this).closest("li").addClass("ui-li-has-count")
  2487.                 }), E && C.not("[class*='ui-body-']").addClass(E), this._addThumbClasses(w), this._addThumbClasses(w.find(".ui-btn")), this._afterListviewRefresh(), this._addFirstLastClasses(w, this._getVisibles(w, c), c)
  2488.             }
  2489.         }, a.mobile.behaviors.addFirstLastClasses))
  2490.     }(a),
  2491.     function(a) {
  2492.         function b(b) {
  2493.             var c = a.trim(b.text()) || null;
  2494.             return c ? c = c.slice(0, 1).toUpperCase() : null
  2495.         }
  2496.         a.widget("mobile.listview", a.mobile.listview, {
  2497.             options: {
  2498.                 autodividers: !1,
  2499.                 autodividersSelector: b
  2500.             },
  2501.             _beforeListviewRefresh: function() {
  2502.                 this.options.autodividers && (this._replaceDividers(), this._superApply(arguments))
  2503.             },
  2504.             _replaceDividers: function() {
  2505.                 var b, d, e, f, g, h = null,
  2506.                     i = this.element;
  2507.                 for (i.children("li:jqmData(role='list-divider')").remove(), d = i.children("li"), b = 0; b < d.length; b++) e = d[b], f = this.options.autodividersSelector(a(e)), f && h !== f && (g = c.createElement("li"), g.appendChild(c.createTextNode(f)), g.setAttribute("data-" + a.mobile.ns + "role", "list-divider"), e.parentNode.insertBefore(g, e)), h = f
  2508.             }
  2509.         })
  2510.     }(a),
  2511.     function(a) {
  2512.         var b = /(^|\s)ui-li-divider($|\s)/,
  2513.             c = /(^|\s)ui-screen-hidden($|\s)/;
  2514.         a.widget("mobile.listview", a.mobile.listview, {
  2515.             options: {
  2516.                 hideDividers: !1
  2517.             },
  2518.             _afterListviewRefresh: function() {
  2519.                 var a, d, e, f = !0;
  2520.                 if (this._superApply(arguments), this.options.hideDividers)
  2521.                     for (a = this._getChildrenByTagName(this.element[0], "li", "LI"), d = a.length - 1; d > -1; d--) e = a[d], e.className.match(b) ? (f && (e.className = e.className + " ui-screen-hidden"), f = !0) : e.className.match(c) || (f = !1)
  2522.             }
  2523.         })
  2524.     }(a),
  2525.     function(a) {
  2526.         a.mobile.nojs = function(b) {
  2527.             a(":jqmData(role='nojs')", b).addClass("ui-nojs")
  2528.         }
  2529.     }(a),
  2530.     function(a) {
  2531.         a.mobile.behaviors.formReset = {
  2532.             _handleFormReset: function() {
  2533.                 this._on(this.element.closest("form"), {
  2534.                     reset: function() {
  2535.                         this._delay("_reset")
  2536.                     }
  2537.                 })
  2538.             }
  2539.         }
  2540.     }(a),
  2541.     function(a, b) {
  2542.         var c = a.mobile.path.hashToSelector;
  2543.         a.widget("mobile.checkboxradio", a.extend({
  2544.             initSelector: "input:not( :jqmData(role='flipswitch' ) )[type='checkbox'],input[type='radio']:not( :jqmData(role='flipswitch' ))",
  2545.             options: {
  2546.                 theme: "inherit",
  2547.                 mini: !1,
  2548.                 wrapperClass: null,
  2549.                 enhanced: !1,
  2550.                 iconpos: "left"
  2551.             },
  2552.             _create: function() {
  2553.                 var b = this.element,
  2554.                     c = this.options,
  2555.                     d = function(a, b) {
  2556.                         return a.jqmData(b) || a.closest("form, fieldset").jqmData(b)
  2557.                     },
  2558.                     e = this.options.enhanced ? {
  2559.                         element: this.element.siblings("label"),
  2560.                         isParent: !1
  2561.                     } : this._findLabel(),
  2562.                     f = b[0].type,
  2563.                     g = "ui-" + f + "-on",
  2564.                     h = "ui-" + f + "-off";
  2565.                 ("checkbox" === f || "radio" === f) && (this.element[0].disabled && (this.options.disabled = !0), c.iconpos = d(b, "iconpos") || e.element.attr("data-" + a.mobile.ns + "iconpos") || c.iconpos, c.mini = d(b, "mini") || c.mini, a.extend(this, {
  2566.                     input: b,
  2567.                     label: e.element,
  2568.                     labelIsParent: e.isParent,
  2569.                     inputtype: f,
  2570.                     checkedClass: g,
  2571.                     uncheckedClass: h
  2572.                 }), this.options.enhanced || this._enhance(), this._on(e.element, {
  2573.                     vmouseover: "_handleLabelVMouseOver",
  2574.                     vclick: "_handleLabelVClick"
  2575.                 }), this._on(b, {
  2576.                     vmousedown: "_cacheVals",
  2577.                     vclick: "_handleInputVClick",
  2578.                     focus: "_handleInputFocus",
  2579.                     blur: "_handleInputBlur"
  2580.                 }), this._handleFormReset(), this.refresh())
  2581.             },
  2582.             _findLabel: function() {
  2583.                 var b, d, e, f = this.element,
  2584.                     g = f[0].labels;
  2585.                 return g && g.length > 0 ? (d = a(g[0]), e = a.contains(d[0], f[0])) : (b = f.closest("label"), e = b.length > 0, d = e ? b : a(this.document[0].getElementsByTagName("label")).filter("[for='" + c(f[0].id) + "']").first()), {
  2586.                     element: d,
  2587.                     isParent: e
  2588.                 }
  2589.             },
  2590.             _enhance: function() {
  2591.                 this.label.addClass("ui-btn ui-corner-all"), this.labelIsParent ? this.input.add(this.label).wrapAll(this._wrapper()) : (this.element.wrap(this._wrapper()), this.element.parent().prepend(this.label)), this._setOptions({
  2592.                     theme: this.options.theme,
  2593.                     iconpos: this.options.iconpos,
  2594.                     mini: this.options.mini
  2595.                 })
  2596.             },
  2597.             _wrapper: function() {
  2598.                 return a("<div class='" + (this.options.wrapperClass ? this.options.wrapperClass : "") + " ui-" + this.inputtype + (this.options.disabled ? " ui-state-disabled" : "") + "' ></div>")
  2599.             },
  2600.             _handleInputFocus: function() {
  2601.                 this.label.addClass(a.mobile.focusClass)
  2602.             },
  2603.             _handleInputBlur: function() {
  2604.                 this.label.removeClass(a.mobile.focusClass)
  2605.             },
  2606.             _handleInputVClick: function() {
  2607.                 this.element.prop("checked", this.element.is(":checked")), this._getInputSet().not(this.element).prop("checked", !1), this._updateAll(!0)
  2608.             },
  2609.             _handleLabelVMouseOver: function(a) {
  2610.                 this.label.parent().hasClass("ui-state-disabled") && a.stopPropagation()
  2611.             },
  2612.             _handleLabelVClick: function(a) {
  2613.                 var b = this.element;
  2614.                 return b.is(":disabled") ? void a.preventDefault() : (this._cacheVals(), b.prop("checked", "radio" === this.inputtype && !0 || !b.prop("checked")), b.triggerHandler("click"), this._getInputSet().not(b).prop("checked", !1), this._updateAll(), !1)
  2615.             },
  2616.             _cacheVals: function() {
  2617.                 this._getInputSet().each(function() {
  2618.                     a(this).attr("data-" + a.mobile.ns + "cacheVal", this.checked)
  2619.                 })
  2620.             },
  2621.             _getInputSet: function() {
  2622.                 var b, d, e = this.element[0],
  2623.                     f = e.name,
  2624.                     g = e.form,
  2625.                     h = this.element.parents().last().get(0),
  2626.                     i = this.element;
  2627.                 return f && "radio" === this.inputtype && h && (b = "input[type='radio'][name='" + c(f) + "']", g ? (d = g.getAttribute("id"), d && (i = a(b + "[form='" + c(d) + "']", h)), i = a(g).find(b).filter(function() {
  2628.                     return this.form === g
  2629.                 }).add(i)) : i = a(b, h).filter(function() {
  2630.                     return !this.form
  2631.                 })), i
  2632.             },
  2633.             _updateAll: function(b) {
  2634.                 var c = this;
  2635.                 this._getInputSet().each(function() {
  2636.                     var d = a(this);
  2637.                     !this.checked && "checkbox" !== c.inputtype || b || d.trigger("change")
  2638.                 }).checkboxradio("refresh")
  2639.             },
  2640.             _reset: function() {
  2641.                 this.refresh()
  2642.             },
  2643.             _hasIcon: function() {
  2644.                 var b, c, d = a.mobile.controlgroup;
  2645.                 return d && (b = this.element.closest(":mobile-controlgroup," + d.prototype.initSelector), b.length > 0) ? (c = a.data(b[0], "mobile-controlgroup"), "horizontal" !== (c ? c.options.type : b.attr("data-" + a.mobile.ns + "type"))) : !0
  2646.             },
  2647.             refresh: function() {
  2648.                 var b = this.element[0].checked,
  2649.                     c = a.mobile.activeBtnClass,
  2650.                     d = "ui-btn-icon-" + this.options.iconpos,
  2651.                     e = [],
  2652.                     f = [];
  2653.                 this._hasIcon() ? (f.push(c), e.push(d)) : (f.push(d), (b ? e : f).push(c)), b ? (e.push(this.checkedClass), f.push(this.uncheckedClass)) : (e.push(this.uncheckedClass), f.push(this.checkedClass)), this.widget().toggleClass("ui-state-disabled", this.element.prop("disabled")), this.label.addClass(e.join(" ")).removeClass(f.join(" "))
  2654.             },
  2655.             widget: function() {
  2656.                 return this.label.parent()
  2657.             },
  2658.             _setOptions: function(a) {
  2659.                 var c = this.label,
  2660.                     d = this.options,
  2661.                     e = this.widget(),
  2662.                     f = this._hasIcon();
  2663.                 a.disabled !== b && (this.input.prop("disabled", !!a.disabled), e.toggleClass("ui-state-disabled", !!a.disabled)), a.mini !== b && e.toggleClass("ui-mini", !!a.mini), a.theme !== b && c.removeClass("ui-btn-" + d.theme).addClass("ui-btn-" + a.theme), a.wrapperClass !== b && e.removeClass(d.wrapperClass).addClass(a.wrapperClass), a.iconpos !== b && f ? c.removeClass("ui-btn-icon-" + d.iconpos).addClass("ui-btn-icon-" + a.iconpos) : f || c.removeClass("ui-btn-icon-" + d.iconpos), this._super(a)
  2664.             }
  2665.         }, a.mobile.behaviors.formReset))
  2666.     }(a),
  2667.     function(a, b) {
  2668.         a.widget("mobile.button", {
  2669.             initSelector: "input[type='button'], input[type='submit'], input[type='reset']",
  2670.             options: {
  2671.                 theme: null,
  2672.                 icon: null,
  2673.                 iconpos: "left",
  2674.                 iconshadow: !1,
  2675.                 corners: !0,
  2676.                 shadow: !0,
  2677.                 inline: null,
  2678.                 mini: null,
  2679.                 wrapperClass: null,
  2680.                 enhanced: !1
  2681.             },
  2682.             _create: function() {
  2683.                 this.element.is(":disabled") && (this.options.disabled = !0), this.options.enhanced || this._enhance(), a.extend(this, {
  2684.                     wrapper: this.element.parent()
  2685.                 }), this._on({
  2686.                     focus: function() {
  2687.                         this.widget().addClass(a.mobile.focusClass)
  2688.                     },
  2689.                     blur: function() {
  2690.                         this.widget().removeClass(a.mobile.focusClass)
  2691.                     }
  2692.                 }), this.refresh(!0)
  2693.             },
  2694.             _enhance: function() {
  2695.                 this.element.wrap(this._button())
  2696.             },
  2697.             _button: function() {
  2698.                 var b = this.options,
  2699.                     c = this._getIconClasses(this.options);
  2700.                 return a("<div class='ui-btn ui-input-btn" + (b.wrapperClass ? " " + b.wrapperClass : "") + (b.theme ? " ui-btn-" + b.theme : "") + (b.corners ? " ui-corner-all" : "") + (b.shadow ? " ui-shadow" : "") + (b.inline ? " ui-btn-inline" : "") + (b.mini ? " ui-mini" : "") + (b.disabled ? " ui-state-disabled" : "") + (c ? " " + c : "") + "' >" + this.element.val() + "</div>")
  2701.             },
  2702.             widget: function() {
  2703.                 return this.wrapper
  2704.             },
  2705.             _destroy: function() {
  2706.                 this.element.insertBefore(this.wrapper), this.wrapper.remove()
  2707.             },
  2708.             _getIconClasses: function(a) {
  2709.                 return a.icon ? "ui-icon-" + a.icon + (a.iconshadow ? " ui-shadow-icon" : "") + " ui-btn-icon-" + a.iconpos : ""
  2710.             },
  2711.             _setOptions: function(c) {
  2712.                 var d = this.widget();
  2713.                 c.theme !== b && d.removeClass(this.options.theme).addClass("ui-btn-" + c.theme), c.corners !== b && d.toggleClass("ui-corner-all", c.corners), c.shadow !== b && d.toggleClass("ui-shadow", c.shadow), c.inline !== b && d.toggleClass("ui-btn-inline", c.inline), c.mini !== b && d.toggleClass("ui-mini", c.mini), c.disabled !== b && (this.element.prop("disabled", c.disabled), d.toggleClass("ui-state-disabled", c.disabled)), (c.icon !== b || c.iconshadow !== b || c.iconpos !== b) && d.removeClass(this._getIconClasses(this.options)).addClass(this._getIconClasses(a.extend({}, this.options, c))), this._super(c)
  2714.             },
  2715.             refresh: function(b) {
  2716.                 var c, d = this.element.prop("disabled");
  2717.                 this.options.icon && "notext" === this.options.iconpos && this.element.attr("title") && this.element.attr("title", this.element.val()), b || (c = this.element.detach(), a(this.wrapper).text(this.element.val()).append(c)), this.options.disabled !== d && this._setOptions({
  2718.                     disabled: d
  2719.                 })
  2720.             }
  2721.         })
  2722.     }(a),
  2723.     function(a) {
  2724.         var b = a("meta[name=viewport]"),
  2725.             c = b.attr("content"),
  2726.             d = c + ",maximum-scale=1, user-scalable=no",
  2727.             e = c + ",maximum-scale=10, user-scalable=yes",
  2728.             f = /(user-scalable[\s]*=[\s]*no)|(maximum-scale[\s]*=[\s]*1)[$,\s]/.test(c);
  2729.         a.mobile.zoom = a.extend({}, {
  2730.             enabled: !f,
  2731.             locked: !1,
  2732.             disable: function(c) {
  2733.                 f || a.mobile.zoom.locked || (b.attr("content", d), a.mobile.zoom.enabled = !1, a.mobile.zoom.locked = c || !1)
  2734.             },
  2735.             enable: function(c) {
  2736.                 f || a.mobile.zoom.locked && c !== !0 || (b.attr("content", e), a.mobile.zoom.enabled = !0, a.mobile.zoom.locked = !1)
  2737.             },
  2738.             restore: function() {
  2739.                 f || (b.attr("content", c), a.mobile.zoom.enabled = !0)
  2740.             }
  2741.         })
  2742.     }(a),
  2743.     function(a, b) {
  2744.         a.widget("mobile.textinput", {
  2745.             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']",
  2746.             options: {
  2747.                 theme: null,
  2748.                 corners: !0,
  2749.                 mini: !1,
  2750.                 preventFocusZoom: /iPhone|iPad|iPod/.test(navigator.platform) && navigator.userAgent.indexOf("AppleWebKit") > -1,
  2751.                 wrapperClass: "",
  2752.                 enhanced: !1
  2753.             },
  2754.             _create: function() {
  2755.                 var b = this.options,
  2756.                     c = this.element.is("[type='search'], :jqmData(type='search')"),
  2757.                     d = "TEXTAREA" === this.element[0].tagName,
  2758.                     e = this.element.is("[data-" + (a.mobile.ns || "") + "type='range']"),
  2759.                     f = (this.element.is("input") || this.element.is("[data-" + (a.mobile.ns || "") + "type='search']")) && !e;
  2760.                 this.element.prop("disabled") && (b.disabled = !0), a.extend(this, {
  2761.                     classes: this._classesFromOptions(),
  2762.                     isSearch: c,
  2763.                     isTextarea: d,
  2764.                     isRange: e,
  2765.                     inputNeedsWrap: f
  2766.                 }), this._autoCorrect(), b.enhanced || this._enhance(), this._on({
  2767.                     focus: "_handleFocus",
  2768.                     blur: "_handleBlur"
  2769.                 })
  2770.             },
  2771.             refresh: function() {
  2772.                 this.setOptions({
  2773.                     disabled: this.element.is(":disabled")
  2774.                 })
  2775.             },
  2776.             _enhance: function() {
  2777.                 var a = [];
  2778.                 this.isTextarea && a.push("ui-input-text"), (this.isTextarea || this.isRange) && a.push("ui-shadow-inset"), this.inputNeedsWrap ? this.element.wrap(this._wrap()) : a = a.concat(this.classes), this.element.addClass(a.join(" "))
  2779.             },
  2780.             widget: function() {
  2781.                 return this.inputNeedsWrap ? this.element.parent() : this.element
  2782.             },
  2783.             _classesFromOptions: function() {
  2784.                 var a = this.options,
  2785.                     b = [];
  2786.                 return b.push("ui-body-" + (null === a.theme ? "inherit" : a.theme)), a.corners && b.push("ui-corner-all"), a.mini && b.push("ui-mini"), a.disabled && b.push("ui-state-disabled"), a.wrapperClass && b.push(a.wrapperClass), b
  2787.             },
  2788.             _wrap: function() {
  2789.                 return a("<div class='" + (this.isSearch ? "ui-input-search " : "ui-input-text ") + this.classes.join(" ") + " ui-shadow-inset'></div>")
  2790.             },
  2791.             _autoCorrect: function() {
  2792.                 "undefined" == typeof this.element[0].autocorrect || a.support.touchOverflow || (this.element[0].setAttribute("autocorrect", "off"), this.element[0].setAttribute("autocomplete", "off"))
  2793.             },
  2794.             _handleBlur: function() {
  2795.                 this.widget().removeClass(a.mobile.focusClass), this.options.preventFocusZoom && a.mobile.zoom.enable(!0)
  2796.             },
  2797.             _handleFocus: function() {
  2798.                 this.options.preventFocusZoom && a.mobile.zoom.disable(!0), this.widget().addClass(a.mobile.focusClass)
  2799.             },
  2800.             _setOptions: function(a) {
  2801.                 var c = this.widget();
  2802.                 this._super(a), (a.disabled !== b || a.mini !== b || a.corners !== b || a.theme !== b || a.wrapperClass !== b) && (c.removeClass(this.classes.join(" ")), this.classes = this._classesFromOptions(), c.addClass(this.classes.join(" "))), a.disabled !== b && this.element.prop("disabled", !!a.disabled)
  2803.             },
  2804.             _destroy: function() {
  2805.                 this.options.enhanced || (this.inputNeedsWrap && this.element.unwrap(), this.element.removeClass("ui-input-text " + this.classes.join(" ")))
  2806.             }
  2807.         })
  2808.     }(a),
  2809.     function(a, d) {
  2810.         a.widget("mobile.slider", a.extend({
  2811.             initSelector: "input[type='range'], :jqmData(type='range'), :jqmData(role='slider')",
  2812.             widgetEventPrefix: "slide",
  2813.             options: {
  2814.                 theme: null,
  2815.                 trackTheme: null,
  2816.                 corners: !0,
  2817.                 mini: !1,
  2818.                 highlight: !1
  2819.             },
  2820.             _create: function() {
  2821.                 var e, f, g, h, i, j, k, l, m, n, o = this,
  2822.                     p = this.element,
  2823.                     q = this.options.trackTheme || a.mobile.getAttribute(p[0], "theme"),
  2824.                     r = q ? " ui-bar-" + q : " ui-bar-inherit",
  2825.                     s = this.options.corners || p.jqmData("corners") ? " ui-corner-all" : "",
  2826.                     t = this.options.mini || p.jqmData("mini") ? " ui-mini" : "",
  2827.                     u = p[0].nodeName.toLowerCase(),
  2828.                     v = "select" === u,
  2829.                     w = p.parent().is(":jqmData(role='rangeslider')"),
  2830.                     x = v ? "ui-slider-switch" : "",
  2831.                     y = p.attr("id"),
  2832.                     z = a("[for='" + y + "']"),
  2833.                     A = z.attr("id") || y + "-label",
  2834.                     B = v ? 0 : parseFloat(p.attr("min")),
  2835.                     C = v ? p.find("option").length - 1 : parseFloat(p.attr("max")),
  2836.                     D = b.parseFloat(p.attr("step") || 1),
  2837.                     E = c.createElement("a"),
  2838.                     F = a(E),
  2839.                     G = c.createElement("div"),
  2840.                     H = a(G),
  2841.                     I = this.options.highlight && !v ? function() {
  2842.                         var b = c.createElement("div");
  2843.                         return b.className = "ui-slider-bg " + a.mobile.activeBtnClass, a(b).prependTo(H)
  2844.                     }() : !1;
  2845.                 if (z.attr("id", A), this.isToggleSwitch = v, E.setAttribute("href", "#"), G.setAttribute("role", "application"), G.className = [this.isToggleSwitch ? "ui-slider ui-slider-track ui-shadow-inset " : "ui-slider-track ui-shadow-inset ", x, r, s, t].join(""), E.className = "ui-slider-handle", G.appendChild(E), F.attr({
  2846.                         role: "slider",
  2847.                         "aria-valuemin": B,
  2848.                         "aria-valuemax": C,
  2849.                         "aria-valuenow": this._value(),
  2850.                         "aria-valuetext": this._value(),
  2851.                         title: this._value(),
  2852.                         "aria-labelledby": A
  2853.                     }), a.extend(this, {
  2854.                         slider: H,
  2855.                         handle: F,
  2856.                         control: p,
  2857.                         type: u,
  2858.                         step: D,
  2859.                         max: C,
  2860.                         min: B,
  2861.                         valuebg: I,
  2862.                         isRangeslider: w,
  2863.                         dragging: !1,
  2864.                         beforeStart: null,
  2865.                         userModified: !1,
  2866.                         mouseMoved: !1
  2867.                     }), v) {
  2868.                     for (k = p.attr("tabindex"), k && F.attr("tabindex", k), p.attr("tabindex", "-1").focus(function() {
  2869.                             a(this).blur(), F.focus()
  2870.                         }), f = c.createElement("div"), f.className = "ui-slider-inneroffset", g = 0, h = G.childNodes.length; h > g; g++) f.appendChild(G.childNodes[g]);
  2871.                     for (G.appendChild(f), F.addClass("ui-slider-handle-snapping"), e = p.find("option"), i = 0, j = e.length; j > i; i++) l = i ? "a" : "b", m = i ? " " + a.mobile.activeBtnClass : "", n = c.createElement("span"), n.className = ["ui-slider-label ui-slider-label-", l, m].join(""), n.setAttribute("role", "img"), n.appendChild(c.createTextNode(e[i].innerHTML)), a(n).prependTo(H);
  2872.                     o._labels = a(".ui-slider-label", H)
  2873.                 }
  2874.                 p.addClass(v ? "ui-slider-switch" : "ui-slider-input"), this._on(p, {
  2875.                     change: "_controlChange",
  2876.                     keyup: "_controlKeyup",
  2877.                     blur: "_controlBlur",
  2878.                     vmouseup: "_controlVMouseUp"
  2879.                 }), H.bind("vmousedown", a.proxy(this._sliderVMouseDown, this)).bind("vclick", !1), this._on(c, {
  2880.                     vmousemove: "_preventDocumentDrag"
  2881.                 }), this._on(H.add(c), {
  2882.                     vmouseup: "_sliderVMouseUp"
  2883.                 }), H.insertAfter(p), v || w || (f = this.options.mini ? "<div class='ui-slider ui-mini'>" : "<div class='ui-slider'>", p.add(H).wrapAll(f)), this._on(this.handle, {
  2884.                     vmousedown: "_handleVMouseDown",
  2885.                     keydown: "_handleKeydown",
  2886.                     keyup: "_handleKeyup"
  2887.                 }), this.handle.bind("vclick", !1), this._handleFormReset(), this.refresh(d, d, !0)
  2888.             },
  2889.             _setOptions: function(a) {
  2890.                 a.theme !== d && this._setTheme(a.theme), a.trackTheme !== d && this._setTrackTheme(a.trackTheme), a.corners !== d && this._setCorners(a.corners), a.mini !== d && this._setMini(a.mini), a.highlight !== d && this._setHighlight(a.highlight), a.disabled !== d && this._setDisabled(a.disabled), this._super(a)
  2891.             },
  2892.             _controlChange: function(a) {
  2893.                 return this._trigger("controlchange", a) === !1 ? !1 : void(this.mouseMoved || this.refresh(this._value(), !0))
  2894.             },
  2895.             _controlKeyup: function() {
  2896.                 this.refresh(this._value(), !0, !0)
  2897.             },
  2898.             _controlBlur: function() {
  2899.                 this.refresh(this._value(), !0)
  2900.             },
  2901.             _controlVMouseUp: function() {
  2902.                 this._checkedRefresh()
  2903.             },
  2904.             _handleVMouseDown: function() {
  2905.                 this.handle.focus()
  2906.             },
  2907.             _handleKeydown: function(b) {
  2908.                 var c = this._value();
  2909.                 if (!this.options.disabled) {
  2910.                     switch (b.keyCode) {
  2911.                         case a.mobile.keyCode.HOME:
  2912.                         case a.mobile.keyCode.END:
  2913.                         case a.mobile.keyCode.PAGE_UP:
  2914.                         case a.mobile.keyCode.PAGE_DOWN:
  2915.                         case a.mobile.keyCode.UP:
  2916.                         case a.mobile.keyCode.RIGHT:
  2917.                         case a.mobile.keyCode.DOWN:
  2918.                         case a.mobile.keyCode.LEFT:
  2919.                             b.preventDefault(), this._keySliding || (this._keySliding = !0, this.handle.addClass("ui-state-active"))
  2920.                     }
  2921.                     switch (b.keyCode) {
  2922.                         case a.mobile.keyCode.HOME:
  2923.                             this.refresh(this.min);
  2924.                             break;
  2925.                         case a.mobile.keyCode.END:
  2926.                             this.refresh(this.max);
  2927.                             break;
  2928.                         case a.mobile.keyCode.PAGE_UP:
  2929.                         case a.mobile.keyCode.UP:
  2930.                         case a.mobile.keyCode.RIGHT:
  2931.                             this.refresh(c + this.step);
  2932.                             break;
  2933.                         case a.mobile.keyCode.PAGE_DOWN:
  2934.                         case a.mobile.keyCode.DOWN:
  2935.                         case a.mobile.keyCode.LEFT:
  2936.                             this.refresh(c - this.step)
  2937.                     }
  2938.                 }
  2939.             },
  2940.             _handleKeyup: function() {
  2941.                 this._keySliding && (this._keySliding = !1, this.handle.removeClass("ui-state-active"))
  2942.             },
  2943.             _sliderVMouseDown: function(a) {
  2944.                 return this.options.disabled || 1 !== a.which && 0 !== a.which && a.which !== d ? !1 : this._trigger("beforestart", a) === !1 ? !1 : (this.dragging = !0, this.userModified = !1, this.mouseMoved = !1, this.isToggleSwitch && (this.beforeStart = this.element[0].selectedIndex), this.refresh(a), this._trigger("start"), !1)
  2945.             },
  2946.             _sliderVMouseUp: function() {
  2947.                 return this.dragging ? (this.dragging = !1, this.isToggleSwitch && (this.handle.addClass("ui-slider-handle-snapping"), this.refresh(this.mouseMoved ? this.userModified ? 0 === this.beforeStart ? 1 : 0 : this.beforeStart : 0 === this.beforeStart ? 1 : 0)), this.mouseMoved = !1, this._trigger("stop"), !1) : void 0
  2948.             },
  2949.             _preventDocumentDrag: function(a) {
  2950.                 return this._trigger("drag", a) === !1 ? !1 : this.dragging && !this.options.disabled ? (this.mouseMoved = !0, this.isToggleSwitch && this.handle.removeClass("ui-slider-handle-snapping"), this.refresh(a), this.userModified = this.beforeStart !== this.element[0].selectedIndex, !1) : void 0
  2951.             },
  2952.             _checkedRefresh: function() {
  2953.                 this.value !== this._value() && this.refresh(this._value())
  2954.             },
  2955.             _value: function() {
  2956.                 return this.isToggleSwitch ? this.element[0].selectedIndex : parseFloat(this.element.val())
  2957.             },
  2958.             _reset: function() {
  2959.                 this.refresh(d, !1, !0)
  2960.             },
  2961.             refresh: function(b, d, e) {
  2962.                 var f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z = this,
  2963.                     A = a.mobile.getAttribute(this.element[0], "theme"),
  2964.                     B = this.options.theme || A,
  2965.                     C = B ? " ui-btn-" + B : "",
  2966.                     D = this.options.trackTheme || A,
  2967.                     E = D ? " ui-bar-" + D : " ui-bar-inherit",
  2968.                     F = this.options.corners ? " ui-corner-all" : "",
  2969.                     G = this.options.mini ? " ui-mini" : "";
  2970.                 if (z.slider[0].className = [this.isToggleSwitch ? "ui-slider ui-slider-switch ui-slider-track ui-shadow-inset" : "ui-slider-track ui-shadow-inset", E, F, G].join(""), (this.options.disabled || this.element.prop("disabled")) && this.disable(), this.value = this._value(), this.options.highlight && !this.isToggleSwitch && 0 === this.slider.find(".ui-slider-bg").length && (this.valuebg = function() {
  2971.                         var b = c.createElement("div");
  2972.                         return b.className = "ui-slider-bg " + a.mobile.activeBtnClass, a(b).prependTo(z.slider)
  2973.                     }()), this.handle.addClass("ui-btn" + C + " ui-shadow"), l = this.element, m = !this.isToggleSwitch, n = m ? [] : l.find("option"), o = m ? parseFloat(l.attr("min")) : 0, p = m ? parseFloat(l.attr("max")) : n.length - 1, q = m && parseFloat(l.attr("step")) > 0 ? parseFloat(l.attr("step")) : 1, "object" == typeof b) {
  2974.                     if (h = b, i = 8, f = this.slider.offset().left, g = this.slider.width(), j = g / ((p - o) / q), !this.dragging || h.pageX < f - i || h.pageX > f + g + i) return;
  2975.                     k = j > 1 ? (h.pageX - f) / g * 100 : Math.round((h.pageX - f) / g * 100)
  2976.                 } else null == b && (b = m ? parseFloat(l.val() || 0) : l[0].selectedIndex), k = (parseFloat(b) - o) / (p - o) * 100;
  2977.                 if (!isNaN(k) && (r = k / 100 * (p - o) + o, s = (r - o) % q, t = r - s, 2 * Math.abs(s) >= q && (t += s > 0 ? q : -q), u = 100 / ((p - o) / q), r = parseFloat(t.toFixed(5)), "undefined" == typeof j && (j = g / ((p - o) / q)), j > 1 && m && (k = (r - o) * u * (1 / q)), 0 > k && (k = 0), k > 100 && (k = 100), o > r && (r = o), r > p && (r = p), this.handle.css("left", k + "%"), this.handle[0].setAttribute("aria-valuenow", m ? r : n.eq(r).attr("value")), this.handle[0].setAttribute("aria-valuetext", m ? r : n.eq(r).getEncodedText()), this.handle[0].setAttribute("title", m ? r : n.eq(r).getEncodedText()), this.valuebg && this.valuebg.css("width", k + "%"), this._labels && (v = this.handle.width() / this.slider.width() * 100, w = k && v + (100 - v) * k / 100, x = 100 === k ? 0 : Math.min(v + 100 - w, 100), this._labels.each(function() {
  2978.                         var b = a(this).hasClass("ui-slider-label-a");
  2979.                         a(this).width((b ? w : x) + "%")
  2980.                     })), !e)) {
  2981.                     if (y = !1, m ? (y = parseFloat(l.val()) !== r, l.val(r)) : (y = l[0].selectedIndex !== r, l[0].selectedIndex = r), this._trigger("beforechange", b) === !1) return !1;
  2982.                     !d && y && l.trigger("change")
  2983.                 }
  2984.             },
  2985.             _setHighlight: function(a) {
  2986.                 a = !!a, a ? (this.options.highlight = !!a, this.refresh()) : this.valuebg && (this.valuebg.remove(), this.valuebg = !1)
  2987.             },
  2988.             _setTheme: function(a) {
  2989.                 this.handle.removeClass("ui-btn-" + this.options.theme).addClass("ui-btn-" + a);
  2990.                 var b = this.options.theme ? this.options.theme : "inherit",
  2991.                     c = a ? a : "inherit";
  2992.                 this.control.removeClass("ui-body-" + b).addClass("ui-body-" + c)
  2993.             },
  2994.             _setTrackTheme: function(a) {
  2995.                 var b = this.options.trackTheme ? this.options.trackTheme : "inherit",
  2996.                     c = a ? a : "inherit";
  2997.                 this.slider.removeClass("ui-body-" + b).addClass("ui-body-" + c)
  2998.             },
  2999.             _setMini: function(a) {
  3000.                 a = !!a, this.isToggleSwitch || this.isRangeslider || (this.slider.parent().toggleClass("ui-mini", a), this.element.toggleClass("ui-mini", a)), this.slider.toggleClass("ui-mini", a)
  3001.             },
  3002.             _setCorners: function(a) {
  3003.                 this.slider.toggleClass("ui-corner-all", a), this.isToggleSwitch || this.control.toggleClass("ui-corner-all", a)
  3004.             },
  3005.             _setDisabled: function(a) {
  3006.                 a = !!a, this.element.prop("disabled", a), this.slider.toggleClass("ui-state-disabled", a).attr("aria-disabled", a), this.element.toggleClass("ui-state-disabled", a)
  3007.             }
  3008.         }, a.mobile.behaviors.formReset))
  3009.     }(a),
  3010.     function(a) {
  3011.         function b() {
  3012.             return c || (c = a("<div></div>", {
  3013.                 "class": "ui-slider-popup ui-shadow ui-corner-all"
  3014.             })), c.clone()
  3015.         }
  3016.         var c;
  3017.         a.widget("mobile.slider", a.mobile.slider, {
  3018.             options: {
  3019.                 popupEnabled: !1,
  3020.                 showValue: !1
  3021.             },
  3022.             _create: function() {
  3023.                 this._super(), a.extend(this, {
  3024.                     _currentValue: null,
  3025.                     _popup: null,
  3026.                     _popupVisible: !1
  3027.                 }), this._setOption("popupEnabled", this.options.popupEnabled), this._on(this.handle, {
  3028.                     vmousedown: "_showPopup"
  3029.                 }), this._on(this.slider.add(this.document), {
  3030.                     vmouseup: "_hidePopup"
  3031.                 }), this._refresh()
  3032.             },
  3033.             _positionPopup: function() {
  3034.                 var a = this.handle.offset();
  3035.                 this._popup.offset({
  3036.                     left: a.left + (this.handle.width() - this._popup.width()) / 2,
  3037.                     top: a.top - this._popup.outerHeight() - 5
  3038.                 })
  3039.             },
  3040.             _setOption: function(a, c) {
  3041.                 this._super(a, c), "showValue" === a ? this.handle.html(c && !this.options.mini ? this._value() : "") : "popupEnabled" === a && c && !this._popup && (this._popup = b().addClass("ui-body-" + (this.options.theme || "a")).hide().insertBefore(this.element))
  3042.             },
  3043.             refresh: function() {
  3044.                 this._super.apply(this, arguments), this._refresh()
  3045.             },
  3046.             _refresh: function() {
  3047.                 var a, b = this.options;
  3048.                 b.popupEnabled && this.handle.removeAttr("title"), a = this._value(), a !== this._currentValue && (this._currentValue = a, b.popupEnabled && this._popup && (this._positionPopup(), this._popup.html(a)), b.showValue && !this.options.mini && this.handle.html(a))
  3049.             },
  3050.             _showPopup: function() {
  3051.                 this.options.popupEnabled && !this._popupVisible && (this.handle.html(""), this._popup.show(), this._positionPopup(), this._popupVisible = !0)
  3052.             },
  3053.             _hidePopup: function() {
  3054.                 var a = this.options;
  3055.                 a.popupEnabled && this._popupVisible && (a.showValue && !a.mini && this.handle.html(this._value()), this._popup.hide(), this._popupVisible = !1)
  3056.             }
  3057.         })
  3058.     }(a),
  3059.     function(a, b) {
  3060.         a.widget("mobile.flipswitch", a.extend({
  3061.             options: {
  3062.                 onText: "On",
  3063.                 offText: "Off",
  3064.                 theme: null,
  3065.                 enhanced: !1,
  3066.                 wrapperClass: null,
  3067.                 corners: !0,
  3068.                 mini: !1
  3069.             },
  3070.             _create: function() {
  3071.                 this.options.enhanced ? a.extend(this, {
  3072.                     flipswitch: this.element.parent(),
  3073.                     on: this.element.find(".ui-flipswitch-on").eq(0),
  3074.                     off: this.element.find(".ui-flipswitch-off").eq(0),
  3075.                     type: this.element.get(0).tagName
  3076.                 }) : this._enhance(), this._handleFormReset(), this._originalTabIndex = this.element.attr("tabindex"), null != this._originalTabIndex && this.on.attr("tabindex", this._originalTabIndex), this.element.attr("tabindex", "-1"), this._on({
  3077.                     focus: "_handleInputFocus"
  3078.                 }), this.element.is(":disabled") && this._setOptions({
  3079.                     disabled: !0
  3080.                 }), this._on(this.flipswitch, {
  3081.                     click: "_toggle",
  3082.                     swipeleft: "_left",
  3083.                     swiperight: "_right"
  3084.                 }), this._on(this.on, {
  3085.                     keydown: "_keydown"
  3086.                 }), this._on({
  3087.                     change: "refresh"
  3088.                 })
  3089.             },
  3090.             _handleInputFocus: function() {
  3091.                 this.on.focus()
  3092.             },
  3093.             widget: function() {
  3094.                 return this.flipswitch
  3095.             },
  3096.             _left: function() {
  3097.                 this.flipswitch.removeClass("ui-flipswitch-active"), "SELECT" === this.type ? this.element.get(0).selectedIndex = 0 : this.element.prop("checked", !1), this.element.trigger("change")
  3098.             },
  3099.             _right: function() {
  3100.                 this.flipswitch.addClass("ui-flipswitch-active"), "SELECT" === this.type ? this.element.get(0).selectedIndex = 1 : this.element.prop("checked", !0), this.element.trigger("change")
  3101.             },
  3102.             _enhance: function() {
  3103.                 var b = a("<div>"),
  3104.                     c = this.options,
  3105.                     d = this.element,
  3106.                     e = c.theme ? c.theme : "inherit",
  3107.                     f = a("<a></a>", {
  3108.                         href: "#"
  3109.                     }),
  3110.                     g = a("<span></span>"),
  3111.                     h = d.get(0).tagName,
  3112.                     i = "INPUT" === h ? c.onText : d.find("option").eq(1).text(),
  3113.                     j = "INPUT" === h ? c.offText : d.find("option").eq(0).text();
  3114.                 f.addClass("ui-flipswitch-on ui-btn ui-shadow ui-btn-inherit").text(i), g.addClass("ui-flipswitch-off").text(j), b.addClass("ui-flipswitch ui-shadow-inset ui-bar-" + e + " " + (c.wrapperClass ? c.wrapperClass : "") + " " + (d.is(":checked") || d.find("option").eq(1).is(":selected") ? "ui-flipswitch-active" : "") + (d.is(":disabled") ? " ui-state-disabled" : "") + (c.corners ? " ui-corner-all" : "") + (c.mini ? " ui-mini" : "")).append(f, g), d.addClass("ui-flipswitch-input").after(b).appendTo(b), a.extend(this, {
  3115.                     flipswitch: b,
  3116.                     on: f,
  3117.                     off: g,
  3118.                     type: h
  3119.                 })
  3120.             },
  3121.             _reset: function() {
  3122.                 this.refresh()
  3123.             },
  3124.             refresh: function() {
  3125.                 var a, b = this.flipswitch.hasClass("ui-flipswitch-active") ? "_right" : "_left";
  3126.                 a = "SELECT" === this.type ? this.element.get(0).selectedIndex > 0 ? "_right" : "_left" : this.element.prop("checked") ? "_right" : "_left", a !== b && this[a]()
  3127.             },
  3128.             _toggle: function() {
  3129.                 var a = this.flipswitch.hasClass("ui-flipswitch-active") ? "_left" : "_right";
  3130.                 this[a]()
  3131.             },
  3132.             _keydown: function(b) {
  3133.                 b.which === a.mobile.keyCode.LEFT ? this._left() : b.which === a.mobile.keyCode.RIGHT ? this._right() : b.which === a.mobile.keyCode.SPACE && (this._toggle(), b.preventDefault())
  3134.             },
  3135.             _setOptions: function(a) {
  3136.                 if (a.theme !== b) {
  3137.                     var c = a.theme ? a.theme : "inherit",
  3138.                         d = a.theme ? a.theme : "inherit";
  3139.                     this.widget().removeClass("ui-bar-" + c).addClass("ui-bar-" + d)
  3140.                 }
  3141.                 a.onText !== b && this.on.text(a.onText), a.offText !== b && this.off.text(a.offText), a.disabled !== b && this.widget().toggleClass("ui-state-disabled", a.disabled), a.mini !== b && this.widget().toggleClass("ui-mini", a.mini), a.corners !== b && this.widget().toggleClass("ui-corner-all", a.corners), this._super(a)
  3142.             },
  3143.             _destroy: function() {
  3144.                 this.options.enhanced || (null != this._originalTabIndex ? this.element.attr("tabindex", this._originalTabIndex) : this.element.removeAttr("tabindex"), this.on.remove(), this.off.remove(), this.element.unwrap(), this.flipswitch.remove(), this.removeClass("ui-flipswitch-input"))
  3145.             }
  3146.         }, a.mobile.behaviors.formReset))
  3147.     }(a),
  3148.     function(a, b) {
  3149.         a.widget("mobile.rangeslider", a.extend({
  3150.             options: {
  3151.                 theme: null,
  3152.                 trackTheme: null,
  3153.                 corners: !0,
  3154.                 mini: !1,
  3155.                 highlight: !0
  3156.             },
  3157.             _create: function() {
  3158.                 var b = this.element,
  3159.                     c = this.options.mini ? "ui-rangeslider ui-mini" : "ui-rangeslider",
  3160.                     d = b.find("input").first(),
  3161.                     e = b.find("input").last(),
  3162.                     f = b.find("label").first(),
  3163.                     g = a.data(d.get(0), "mobile-slider") || a.data(d.slider().get(0), "mobile-slider"),
  3164.                     h = a.data(e.get(0), "mobile-slider") || a.data(e.slider().get(0), "mobile-slider"),
  3165.                     i = g.slider,
  3166.                     j = h.slider,
  3167.                     k = g.handle,
  3168.                     l = a("<div class='ui-rangeslider-sliders' />").appendTo(b);
  3169.                 d.addClass("ui-rangeslider-first"), e.addClass("ui-rangeslider-last"), b.addClass(c), i.appendTo(l), j.appendTo(l), f.insertBefore(b), k.prependTo(j), a.extend(this, {
  3170.                     _inputFirst: d,
  3171.                     _inputLast: e,
  3172.                     _sliderFirst: i,
  3173.                     _sliderLast: j,
  3174.                     _label: f,
  3175.                     _targetVal: null,
  3176.                     _sliderTarget: !1,
  3177.                     _sliders: l,
  3178.                     _proxy: !1
  3179.                 }), this.refresh(), this._on(this.element.find("input.ui-slider-input"), {
  3180.                     slidebeforestart: "_slidebeforestart",
  3181.                     slidestop: "_slidestop",
  3182.                     slidedrag: "_slidedrag",
  3183.                     slidebeforechange: "_change",
  3184.                     blur: "_change",
  3185.                     keyup: "_change"
  3186.                 }), this._on({
  3187.                     mousedown: "_change"
  3188.                 }), this._on(this.element.closest("form"), {
  3189.                     reset: "_handleReset"
  3190.                 }), this._on(k, {
  3191.                     vmousedown: "_dragFirstHandle"
  3192.                 })
  3193.             },
  3194.             _handleReset: function() {
  3195.                 var a = this;
  3196.                 setTimeout(function() {
  3197.                     a._updateHighlight()
  3198.                 }, 0)
  3199.             },
  3200.             _dragFirstHandle: function(b) {
  3201.                 return a.data(this._inputFirst.get(0), "mobile-slider").dragging = !0, a.data(this._inputFirst.get(0), "mobile-slider").refresh(b), a.data(this._inputFirst.get(0), "mobile-slider")._trigger("start"), !1
  3202.             },
  3203.             _slidedrag: function(b) {
  3204.                 var c = a(b.target).is(this._inputFirst),
  3205.                     d = c ? this._inputLast : this._inputFirst;
  3206.                 return this._sliderTarget = !1, "first" === this._proxy && c || "last" === this._proxy && !c ? (a.data(d.get(0), "mobile-slider").dragging = !0, a.data(d.get(0), "mobile-slider").refresh(b), !1) : void 0
  3207.             },
  3208.             _slidestop: function(b) {
  3209.                 var c = a(b.target).is(this._inputFirst);
  3210.                 this._proxy = !1, this.element.find("input").trigger("vmouseup"), this._sliderFirst.css("z-index", c ? 1 : "")
  3211.             },
  3212.             _slidebeforestart: function(b) {
  3213.                 this._sliderTarget = !1, a(b.originalEvent.target).hasClass("ui-slider-track") && (this._sliderTarget = !0, this._targetVal = a(b.target).val())
  3214.             },
  3215.             _setOptions: function(a) {
  3216.                 a.theme !== b && this._setTheme(a.theme), a.trackTheme !== b && this._setTrackTheme(a.trackTheme), a.mini !== b && this._setMini(a.mini), a.highlight !== b && this._setHighlight(a.highlight), a.disabled !== b && this._setDisabled(a.disabled), this._super(a), this.refresh()
  3217.             },
  3218.             refresh: function() {
  3219.                 var a = this.element,
  3220.                     b = this.options;
  3221.                 (this._inputFirst.is(":disabled") || this._inputLast.is(":disabled")) && (this.options.disabled = !0), a.find("input").slider({
  3222.                     theme: b.theme,
  3223.                     trackTheme: b.trackTheme,
  3224.                     disabled: b.disabled,
  3225.                     corners: b.corners,
  3226.                     mini: b.mini,
  3227.                     highlight: b.highlight
  3228.                 }).slider("refresh"), this._updateHighlight()
  3229.             },
  3230.             _change: function(b) {
  3231.                 if ("keyup" === b.type) return this._updateHighlight(), !1;
  3232.                 var c = this,
  3233.                     d = parseFloat(this._inputFirst.val(), 10),
  3234.                     e = parseFloat(this._inputLast.val(), 10),
  3235.                     f = a(b.target).hasClass("ui-rangeslider-first"),
  3236.                     g = f ? this._inputFirst : this._inputLast,
  3237.                     h = f ? this._inputLast : this._inputFirst;
  3238.                 if (this._inputFirst.val() > this._inputLast.val() && "mousedown" === b.type && !a(b.target).hasClass("ui-slider-handle")) g.blur();
  3239.                 else if ("mousedown" === b.type) return;
  3240.                 return d > e && !this._sliderTarget ? (g.val(f ? e : d).slider("refresh"), this._trigger("normalize")) : d > e && (g.val(this._targetVal).slider("refresh"), setTimeout(function() {
  3241.                     h.val(f ? d : e).slider("refresh"), a.data(h.get(0), "mobile-slider").handle.focus(), c._sliderFirst.css("z-index", f ? "" : 1), c._trigger("normalize")
  3242.                 }, 0), this._proxy = f ? "first" : "last"), d === e ? (a.data(g.get(0), "mobile-slider").handle.css("z-index", 1), a.data(h.get(0), "mobile-slider").handle.css("z-index", 0)) : (a.data(h.get(0), "mobile-slider").handle.css("z-index", ""), a.data(g.get(0), "mobile-slider").handle.css("z-index", "")), this._updateHighlight(), d >= e ? !1 : void 0
  3243.             },
  3244.             _updateHighlight: function() {
  3245.                 var b = parseInt(a.data(this._inputFirst.get(0), "mobile-slider").handle.get(0).style.left, 10),
  3246.                     c = parseInt(a.data(this._inputLast.get(0), "mobile-slider").handle.get(0).style.left, 10),
  3247.                     d = c - b;
  3248.                 this.element.find(".ui-slider-bg").css({
  3249.                     "margin-left": b + "%",
  3250.                     width: d + "%"
  3251.                 })
  3252.             },
  3253.             _setTheme: function(a) {
  3254.                 this._inputFirst.slider("option", "theme", a), this._inputLast.slider("option", "theme", a)
  3255.             },
  3256.             _setTrackTheme: function(a) {
  3257.                 this._inputFirst.slider("option", "trackTheme", a), this._inputLast.slider("option", "trackTheme", a)
  3258.             },
  3259.             _setMini: function(a) {
  3260.                 this._inputFirst.slider("option", "mini", a), this._inputLast.slider("option", "mini", a), this.element.toggleClass("ui-mini", !!a)
  3261.             },
  3262.             _setHighlight: function(a) {
  3263.                 this._inputFirst.slider("option", "highlight", a), this._inputLast.slider("option", "highlight", a)
  3264.             },
  3265.             _setDisabled: function(a) {
  3266.                 this._inputFirst.prop("disabled", a), this._inputLast.prop("disabled", a)
  3267.             },
  3268.             _destroy: function() {
  3269.                 this._label.prependTo(this.element), this.element.removeClass("ui-rangeslider ui-mini"), this._inputFirst.after(this._sliderFirst), this._inputLast.after(this._sliderLast), this._sliders.remove(), this.element.find("input").removeClass("ui-rangeslider-first ui-rangeslider-last").slider("destroy")
  3270.             }
  3271.         }, a.mobile.behaviors.formReset))
  3272.     }(a),
  3273.     function(a, b) {
  3274.         a.widget("mobile.textinput", a.mobile.textinput, {
  3275.             options: {
  3276.                 clearBtn: !1,
  3277.                 clearBtnText: "Clear text"
  3278.             },
  3279.             _create: function() {
  3280.                 this._super(), this.isSearch && (this.options.clearBtn = !0), this.options.clearBtn && this.inputNeedsWrap && this._addClearBtn()
  3281.             },
  3282.             clearButton: function() {
  3283.                 return a("<a href='#' tabindex='-1' aria-hidden='true' class='ui-input-clear ui-btn ui-icon-delete ui-btn-icon-notext ui-corner-all'></a>").attr("title", this.options.clearBtnText).text(this.options.clearBtnText)
  3284.             },
  3285.             _clearBtnClick: function(a) {
  3286.                 this.element.val("").focus().trigger("change"), this._clearBtn.addClass("ui-input-clear-hidden"), a.preventDefault()
  3287.             },
  3288.             _addClearBtn: function() {
  3289.                 this.options.enhanced || this._enhanceClear(), a.extend(this, {
  3290.                     _clearBtn: this.widget().find("a.ui-input-clear")
  3291.                 }), this._bindClearEvents(), this._toggleClear()
  3292.             },
  3293.             _enhanceClear: function() {
  3294.                 this.clearButton().appendTo(this.widget()), this.widget().addClass("ui-input-has-clear")
  3295.             },
  3296.             _bindClearEvents: function() {
  3297.                 this._on(this._clearBtn, {
  3298.                     click: "_clearBtnClick"
  3299.                 }), this._on({
  3300.                     keyup: "_toggleClear",
  3301.                     change: "_toggleClear",
  3302.                     input: "_toggleClear",
  3303.                     focus: "_toggleClear",
  3304.                     blur: "_toggleClear",
  3305.                     cut: "_toggleClear",
  3306.                     paste: "_toggleClear"
  3307.                 })
  3308.             },
  3309.             _unbindClear: function() {
  3310.                 this._off(this._clearBtn, "click"), this._off(this.element, "keyup change input focus blur cut paste")
  3311.             },
  3312.             _setOptions: function(a) {
  3313.                 this._super(a), a.clearBtn === b || this.element.is("textarea, :jqmData(type='range')") || (a.clearBtn ? this._addClearBtn() : this._destroyClear()), a.clearBtnText !== b && this._clearBtn !== b && this._clearBtn.text(a.clearBtnText).attr("title", a.clearBtnText)
  3314.             },
  3315.             _toggleClear: function() {
  3316.                 this._delay("_toggleClearClass", 0)
  3317.             },
  3318.             _toggleClearClass: function() {
  3319.                 this._clearBtn.toggleClass("ui-input-clear-hidden", !this.element.val())
  3320.             },
  3321.             _destroyClear: function() {
  3322.                 this.widget().removeClass("ui-input-has-clear"), this._unbindClear(), this._clearBtn.remove()
  3323.             },
  3324.             _destroy: function() {
  3325.                 this._super(), this.options.clearBtn && this._destroyClear()
  3326.             }
  3327.         })
  3328.     }(a),
  3329.     function(a, b) {
  3330.         a.widget("mobile.textinput", a.mobile.textinput, {
  3331.             options: {
  3332.                 autogrow: !0,
  3333.                 keyupTimeoutBuffer: 100
  3334.             },
  3335.             _create: function() {
  3336.                 this._super(), this.options.autogrow && this.isTextarea && this._autogrow()
  3337.             },
  3338.             _autogrow: function() {
  3339.                 this.element.addClass("ui-textinput-autogrow"), this._on({
  3340.                     keyup: "_timeout",
  3341.                     change: "_timeout",
  3342.                     input: "_timeout",
  3343.                     paste: "_timeout"
  3344.                 }), this._on(!0, this.document, {
  3345.                     pageshow: "_handleShow",
  3346.                     popupbeforeposition: "_handleShow",
  3347.                     updatelayout: "_handleShow",
  3348.                     panelopen: "_handleShow"
  3349.                 })
  3350.             },
  3351.             _handleShow: function(b) {
  3352.                 a.contains(b.target, this.element[0]) && this.element.is(":visible") && ("popupbeforeposition" !== b.type && this.element.addClass("ui-textinput-autogrow-resize").animationComplete(a.proxy(function() {
  3353.                     this.element.removeClass("ui-textinput-autogrow-resize")
  3354.                 }, this), "transition"), this._prepareHeightUpdate())
  3355.             },
  3356.             _unbindAutogrow: function() {
  3357.                 this.element.removeClass("ui-textinput-autogrow"), this._off(this.element, "keyup change input paste"), this._off(this.document, "pageshow popupbeforeposition updatelayout panelopen")
  3358.             },
  3359.             keyupTimeout: null,
  3360.             _prepareHeightUpdate: function(a) {
  3361.                 this.keyupTimeout && clearTimeout(this.keyupTimeout), a === b ? this._updateHeight() : this.keyupTimeout = this._delay("_updateHeight", a)
  3362.             },
  3363.             _timeout: function() {
  3364.                 this._prepareHeightUpdate(this.options.keyupTimeoutBuffer)
  3365.             },
  3366.             _updateHeight: function() {
  3367.                 var a, b, c, d, e, f, g, h, i, j = this.window.scrollTop();
  3368.                 this.keyupTimeout = 0, "onpage" in this.element[0] || this.element.css({
  3369.                     height: 0,
  3370.                     "min-height": 0,
  3371.                     "max-height": 0
  3372.                 }), d = this.element[0].scrollHeight, e = this.element[0].clientHeight, f = parseFloat(this.element.css("border-top-width")), g = parseFloat(this.element.css("border-bottom-width")), h = f + g, i = d + h + 15, 0 === e && (a = parseFloat(this.element.css("padding-top")), b = parseFloat(this.element.css("padding-bottom")), c = a + b, i += c), this.element.css({
  3373.                     height: i,
  3374.                     "min-height": "",
  3375.                     "max-height": ""
  3376.                 }), this.window.scrollTop(j)
  3377.             },
  3378.             refresh: function() {
  3379.                 this.options.autogrow && this.isTextarea && this._updateHeight()
  3380.             },
  3381.             _setOptions: function(a) {
  3382.                 this._super(a), a.autogrow !== b && this.isTextarea && (a.autogrow ? this._autogrow() : this._unbindAutogrow())
  3383.             }
  3384.         })
  3385.     }(a),
  3386.     function(a) {
  3387.         a.widget("mobile.selectmenu", a.extend({
  3388.             initSelector: "select:not( :jqmData(role='slider')):not( :jqmData(role='flipswitch') )",
  3389.             options: {
  3390.                 theme: null,
  3391.                 icon: "carat-d",
  3392.                 iconpos: "right",
  3393.                 inline: !1,
  3394.                 corners: !0,
  3395.                 shadow: !0,
  3396.                 iconshadow: !1,
  3397.                 overlayTheme: null,
  3398.                 dividerTheme: null,
  3399.                 hidePlaceholderMenuItems: !0,
  3400.                 closeText: "Close",
  3401.                 nativeMenu: !0,
  3402.                 preventFocusZoom: /iPhone|iPad|iPod/.test(navigator.platform) && navigator.userAgent.indexOf("AppleWebKit") > -1,
  3403.                 mini: !1
  3404.             },
  3405.             _button: function() {
  3406.                 return a("<div/>")
  3407.             },
  3408.             _setDisabled: function(a) {
  3409.                 return this.element.attr("disabled", a), this.button.attr("aria-disabled", a), this._setOption("disabled", a)
  3410.             },
  3411.             _focusButton: function() {
  3412.                 var a = this;
  3413.                 setTimeout(function() {
  3414.                     a.button.focus()
  3415.                 }, 40)
  3416.             },
  3417.             _selectOptions: function() {
  3418.                 return this.select.find("option")
  3419.             },
  3420.             _preExtension: function() {
  3421.                 var b = this.options.inline || this.element.jqmData("inline"),
  3422.                     c = this.options.mini || this.element.jqmData("mini"),
  3423.                     d = "";
  3424.                 ~this.element[0].className.indexOf("ui-btn-left") && (d = " ui-btn-left"), ~this.element[0].className.indexOf("ui-btn-right") && (d = " ui-btn-right"), b && (d += " ui-btn-inline"), c && (d += " ui-mini"), this.select = this.element.removeClass("ui-btn-left ui-btn-right").wrap("<div class='ui-select" + d + "'>"), this.selectId = this.select.attr("id") || "select-" + this.uuid, this.buttonId = this.selectId + "-button", this.label = a("label[for='" + this.selectId + "']"), this.isMultiple = this.select[0].multiple
  3425.             },
  3426.             _destroy: function() {
  3427.                 var a = this.element.parents(".ui-select");
  3428.                 a.length > 0 && (a.is(".ui-btn-left, .ui-btn-right") && this.element.addClass(a.hasClass("ui-btn-left") ? "ui-btn-left" : "ui-btn-right"), this.element.insertAfter(a), a.remove())
  3429.             },
  3430.             _create: function() {
  3431.                 this._preExtension(), this.button = this._button();
  3432.                 var c = this,
  3433.                     d = this.options,
  3434.                     e = d.icon ? d.iconpos || this.select.jqmData("iconpos") : !1,
  3435.                     f = this.button.insertBefore(this.select).attr("id", this.buttonId).addClass("ui-btn" + (d.icon ? " ui-icon-" + d.icon + " ui-btn-icon-" + e + (d.iconshadow ? " ui-shadow-icon" : "") : "") + (d.theme ? " ui-btn-" + d.theme : "") + (d.corners ? " ui-corner-all" : "") + (d.shadow ? " ui-shadow" : ""));
  3436.                 this.setButtonText(), d.nativeMenu && b.opera && b.opera.version && f.addClass("ui-select-nativeonly"), this.isMultiple && (this.buttonCount = a("<span>").addClass("ui-li-count ui-body-inherit").hide().appendTo(f.addClass("ui-li-has-count"))), (d.disabled || this.element.attr("disabled")) && this.disable(), this.select.change(function() {
  3437.                     c.refresh(), d.nativeMenu && this.blur()
  3438.                 }), this._handleFormReset(), this._on(this.button, {
  3439.                     keydown: "_handleKeydown"
  3440.                 }), this.build()
  3441.             },
  3442.             build: function() {
  3443.                 var b = this;
  3444.                 this.select.appendTo(b.button).bind("vmousedown", function() {
  3445.                     b.button.addClass(a.mobile.activeBtnClass)
  3446.                 }).bind("focus", function() {
  3447.                     b.button.addClass(a.mobile.focusClass)
  3448.                 }).bind("blur", function() {
  3449.                     b.button.removeClass(a.mobile.focusClass)
  3450.                 }).bind("focus vmouseover", function() {
  3451.                     b.button.trigger("vmouseover")
  3452.                 }).bind("vmousemove", function() {
  3453.                     b.button.removeClass(a.mobile.activeBtnClass)
  3454.                 }).bind("change blur vmouseout", function() {
  3455.                     b.button.trigger("vmouseout").removeClass(a.mobile.activeBtnClass)
  3456.                 }), b.button.bind("vmousedown", function() {
  3457.                     b.options.preventFocusZoom && a.mobile.zoom.disable(!0)
  3458.                 }), b.label.bind("click focus", function() {
  3459.                     b.options.preventFocusZoom && a.mobile.zoom.disable(!0)
  3460.                 }), b.select.bind("focus", function() {
  3461.                     b.options.preventFocusZoom && a.mobile.zoom.disable(!0)
  3462.                 }), b.button.bind("mouseup", function() {
  3463.                     b.options.preventFocusZoom && setTimeout(function() {
  3464.                         a.mobile.zoom.enable(!0)
  3465.                     }, 0)
  3466.                 }), b.select.bind("blur", function() {
  3467.                     b.options.preventFocusZoom && a.mobile.zoom.enable(!0)
  3468.                 })
  3469.             },
  3470.             selected: function() {
  3471.                 return this._selectOptions().filter(":selected")
  3472.             },
  3473.             selectedIndices: function() {
  3474.                 var a = this;
  3475.                 return this.selected().map(function() {
  3476.                     return a._selectOptions().index(this)
  3477.                 }).get()
  3478.             },
  3479.             setButtonText: function() {
  3480.                 var b = this,
  3481.                     d = this.selected(),
  3482.                     e = this.placeholder,
  3483.                     f = a(c.createElement("span"));
  3484.                 this.button.children("span").not(".ui-li-count").remove().end().end().prepend(function() {
  3485.                     return e = d.length ? d.map(function() {
  3486.                         return a(this).text()
  3487.                     }).get().join(", ") : b.placeholder, e ? f.text(e) : f.html("&#160;"), f.addClass(b.select.attr("class")).addClass(d.attr("class")).removeClass("ui-screen-hidden")
  3488.                 }())
  3489.             },
  3490.             setButtonCount: function() {
  3491.                 var a = this.selected();
  3492.                 this.isMultiple && this.buttonCount[a.length > 1 ? "show" : "hide"]().text(a.length)
  3493.             },
  3494.             _handleKeydown: function() {
  3495.                 this._delay("_refreshButton")
  3496.             },
  3497.             _reset: function() {
  3498.                 this.refresh()
  3499.             },
  3500.             _refreshButton: function() {
  3501.                 this.setButtonText(), this.setButtonCount()
  3502.             },
  3503.             refresh: function() {
  3504.                 this._refreshButton()
  3505.             },
  3506.             open: a.noop,
  3507.             close: a.noop,
  3508.             disable: function() {
  3509.                 this._setDisabled(!0), this.button.addClass("ui-state-disabled")
  3510.             },
  3511.             enable: function() {
  3512.                 this._setDisabled(!1), this.button.removeClass("ui-state-disabled")
  3513.             }
  3514.         }, a.mobile.behaviors.formReset))
  3515.     }(a),
  3516.     function(a) {
  3517.         a.mobile.links = function(b) {
  3518.             a(b).find("a").jqmEnhanceable().filter(":jqmData(rel='popup')[href][href!='']").each(function() {
  3519.                 var a = this,
  3520.                     b = a.getAttribute("href").substring(1);
  3521.                 b && (a.setAttribute("aria-haspopup", !0), a.setAttribute("aria-owns", b), a.setAttribute("aria-expanded", !1))
  3522.             }).end().not(".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")
  3523.         }
  3524.     }(a),
  3525.     function(a, c) {
  3526.         function d(a, b, c, d) {
  3527.             var e = d;
  3528.             return e = b > a ? c + (a - b) / 2 : Math.min(Math.max(c, d - b / 2), c + a - b)
  3529.         }
  3530.  
  3531.         function e(a) {
  3532.             return {
  3533.                 x: a.scrollLeft(),
  3534.                 y: a.scrollTop(),
  3535.                 cx: a[0].innerWidth || a.width(),
  3536.                 cy: a[0].innerHeight || a.height()
  3537.             }
  3538.         }
  3539.         a.widget("mobile.popup", {
  3540.             options: {
  3541.                 wrapperClass: null,
  3542.                 theme: null,
  3543.                 overlayTheme: null,
  3544.                 shadow: !0,
  3545.                 corners: !0,
  3546.                 transition: "none",
  3547.                 positionTo: "origin",
  3548.                 tolerance: null,
  3549.                 closeLinkSelector: "a:jqmData(rel='back')",
  3550.                 closeLinkEvents: "click.popup",
  3551.                 navigateEvents: "navigate.popup",
  3552.                 closeEvents: "navigate.popup pagebeforechange.popup",
  3553.                 dismissible: !0,
  3554.                 enhanced: !1,
  3555.                 history: !a.mobile.browser.oldIE
  3556.             },
  3557.             _handleDocumentVmousedown: function(b) {
  3558.                 this._isOpen && a.contains(this._ui.container[0], b.target) && this._ignoreResizeEvents()
  3559.             },
  3560.             _create: function() {
  3561.                 var b = this.element,
  3562.                     c = b.attr("id"),
  3563.                     d = this.options;
  3564.                 d.history = d.history && a.mobile.ajaxEnabled && a.mobile.hashListeningEnabled, this._on(this.document, {
  3565.                     vmousedown: "_handleDocumentVmousedown"
  3566.                 }), a.extend(this, {
  3567.                     _scrollTop: 0,
  3568.                     _page: b.closest(".ui-page"),
  3569.                     _ui: null,
  3570.                     _fallbackTransition: "",
  3571.                     _currentTransition: !1,
  3572.                     _prerequisites: null,
  3573.                     _isOpen: !1,
  3574.                     _tolerance: null,
  3575.                     _resizeData: null,
  3576.                     _ignoreResizeTo: 0,
  3577.                     _orientationchangeInProgress: !1
  3578.                 }), 0 === this._page.length && (this._page = a("body")), d.enhanced ? this._ui = {
  3579.                     container: b.parent(),
  3580.                     screen: b.parent().prev(),
  3581.                     placeholder: a(this.document[0].getElementById(c + "-placeholder"))
  3582.                 } : (this._ui = this._enhance(b, c), this._applyTransition(d.transition)), this._setTolerance(d.tolerance)._ui.focusElement = this._ui.container, this._on(this._ui.screen, {
  3583.                     vclick: "_eatEventAndClose"
  3584.                 }), this._on(this.window, {
  3585.                     orientationchange: a.proxy(this, "_handleWindowOrientationchange"),
  3586.                     resize: a.proxy(this, "_handleWindowResize"),
  3587.                     keyup: a.proxy(this, "_handleWindowKeyUp")
  3588.                 }), this._on(this.document, {
  3589.                     focusin: "_handleDocumentFocusIn"
  3590.                 })
  3591.             },
  3592.             _enhance: function(b, c) {
  3593.                 var d = this.options,
  3594.                     e = d.wrapperClass,
  3595.                     f = {
  3596.                         screen: a("<div class='ui-screen-hidden ui-popup-screen " + this._themeClassFromOption("ui-overlay-", d.overlayTheme) + "'></div>"),
  3597.                         placeholder: a("<div style='display: none;'><!-- placeholder --></div>"),
  3598.                         container: a("<div class='ui-popup-container ui-popup-hidden ui-popup-truncate" + (e ? " " + e : "") + "'></div>")
  3599.                     },
  3600.                     g = this.document[0].createDocumentFragment();
  3601.                 return g.appendChild(f.screen[0]), g.appendChild(f.container[0]), c && (f.screen.attr("id", c + "-screen"), f.container.attr("id", c + "-popup"), f.placeholder.attr("id", c + "-placeholder").html("<!-- placeholder for " + c + " -->")), this._page[0].appendChild(g), f.placeholder.insertAfter(b), b.detach().addClass("ui-popup " + this._themeClassFromOption("ui-body-", d.theme) + " " + (d.shadow ? "ui-overlay-shadow " : "") + (d.corners ? "ui-corner-all " : "")).appendTo(f.container), f
  3602.             },
  3603.             _eatEventAndClose: function(a) {
  3604.                 return a.preventDefault(), a.stopImmediatePropagation(), this.options.dismissible && this.close(), !1
  3605.             },
  3606.             _resizeScreen: function() {
  3607.                 var a = this._ui.screen,
  3608.                     b = this._ui.container.outerHeight(!0),
  3609.                     c = a.removeAttr("style").height(),
  3610.                     d = this.document.height() - 1;
  3611.                 d > c ? a.height(d) : b > c && a.height(b)
  3612.             },
  3613.             _handleWindowKeyUp: function(b) {
  3614.                 return this._isOpen && b.keyCode === a.mobile.keyCode.ESCAPE ? this._eatEventAndClose(b) : void 0
  3615.             },
  3616.             _expectResizeEvent: function() {
  3617.                 var a = e(this.window);
  3618.                 if (this._resizeData) {
  3619.                     if (a.x === this._resizeData.windowCoordinates.x && a.y === this._resizeData.windowCoordinates.y && a.cx === this._resizeData.windowCoordinates.cx && a.cy === this._resizeData.windowCoordinates.cy) return !1;
  3620.                     clearTimeout(this._resizeData.timeoutId)
  3621.                 }
  3622.                 return this._resizeData = {
  3623.                     timeoutId: this._delay("_resizeTimeout", 200),
  3624.                     windowCoordinates: a
  3625.                 }, !0
  3626.             },
  3627.             _resizeTimeout: function() {
  3628.                 this._isOpen ? this._expectResizeEvent() || (this._ui.container.hasClass("ui-popup-hidden") && (this._ui.container.removeClass("ui-popup-hidden ui-popup-truncate"), this.reposition({
  3629.                     positionTo: "window"
  3630.                 }), this._ignoreResizeEvents()), this._resizeScreen(), this._resizeData = null, this._orientationchangeInProgress = !1) : (this._resizeData = null, this._orientationchangeInProgress = !1)
  3631.             },
  3632.             _stopIgnoringResizeEvents: function() {
  3633.                 this._ignoreResizeTo = 0
  3634.             },
  3635.             _ignoreResizeEvents: function() {
  3636.                 this._ignoreResizeTo && clearTimeout(this._ignoreResizeTo), this._ignoreResizeTo = this._delay("_stopIgnoringResizeEvents", 1e3)
  3637.             },
  3638.             _handleWindowResize: function() {
  3639.                 this._isOpen && 0 === this._ignoreResizeTo && (!this._expectResizeEvent() && !this._orientationchangeInProgress || this._ui.container.hasClass("ui-popup-hidden") || this._ui.container.addClass("ui-popup-hidden ui-popup-truncate").removeAttr("style"))
  3640.             },
  3641.             _handleWindowOrientationchange: function() {
  3642.                 !this._orientationchangeInProgress && this._isOpen && 0 === this._ignoreResizeTo && (this._expectResizeEvent(), this._orientationchangeInProgress = !0)
  3643.             },
  3644.             _handleDocumentFocusIn: function(b) {
  3645.                 var c, d = b.target,
  3646.                     e = this._ui;
  3647.                 if (this._isOpen) {
  3648.                     if (d !== e.container[0]) {
  3649.                         if (c = a(d), 0 === c.parents().filter(e.container[0]).length) return a(this.document[0].activeElement).one("focus", function() {
  3650.                             "body" !== d.nodeName.toLowerCase() && c.blur()
  3651.                         }), e.focusElement.focus(), b.preventDefault(), b.stopImmediatePropagation(), !1;
  3652.                         e.focusElement[0] === e.container[0] && (e.focusElement = c)
  3653.                     }
  3654.                     this._ignoreResizeEvents()
  3655.                 }
  3656.             },
  3657.             _themeClassFromOption: function(a, b) {
  3658.                 return b ? "none" === b ? "" : a + b : a + "inherit"
  3659.             },
  3660.             _applyTransition: function(b) {
  3661.                 return b && (this._ui.container.removeClass(this._fallbackTransition), "none" !== b && (this._fallbackTransition = a.mobile._maybeDegradeTransition(b), "none" === this._fallbackTransition && (this._fallbackTransition = ""), this._ui.container.addClass(this._fallbackTransition))), this
  3662.             },
  3663.             _setOptions: function(a) {
  3664.                 var b = this.options,
  3665.                     d = this.element,
  3666.                     e = this._ui.screen;
  3667.                 return a.wrapperClass !== c && this._ui.container.removeClass(b.wrapperClass).addClass(a.wrapperClass), a.theme !== c && d.removeClass(this._themeClassFromOption("ui-body-", b.theme)).addClass(this._themeClassFromOption("ui-body-", a.theme)), a.overlayTheme !== c && (e.removeClass(this._themeClassFromOption("ui-overlay-", b.overlayTheme)).addClass(this._themeClassFromOption("ui-overlay-", a.overlayTheme)), this._isOpen && e.addClass("in")), a.shadow !== c && d.toggleClass("ui-overlay-shadow", a.shadow), a.corners !== c && d.toggleClass("ui-corner-all", a.corners), a.transition !== c && (this._currentTransition || this._applyTransition(a.transition)), a.tolerance !== c && this._setTolerance(a.tolerance), a.disabled !== c && a.disabled && this.close(), this._super(a)
  3668.             },
  3669.             _setTolerance: function(b) {
  3670.                 var d, e = {
  3671.                     t: 30,
  3672.                     r: 15,
  3673.                     b: 30,
  3674.                     l: 15
  3675.                 };
  3676.                 if (b !== c) switch (d = String(b).split(","), a.each(d, function(a, b) {
  3677.                     d[a] = parseInt(b, 10)
  3678.                 }), d.length) {
  3679.                     case 1:
  3680.                         isNaN(d[0]) || (e.t = e.r = e.b = e.l = d[0]);
  3681.                         break;
  3682.                     case 2:
  3683.                         isNaN(d[0]) || (e.t = e.b = d[0]), isNaN(d[1]) || (e.l = e.r = d[1]);
  3684.                         break;
  3685.                     case 4:
  3686.                         isNaN(d[0]) || (e.t = d[0]), isNaN(d[1]) || (e.r = d[1]), isNaN(d[2]) || (e.b = d[2]), isNaN(d[3]) || (e.l = d[3])
  3687.                 }
  3688.                 return this._tolerance = e, this
  3689.             },
  3690.             _clampPopupWidth: function(a) {
  3691.                 var b, c = e(this.window),
  3692.                     d = {
  3693.                         x: this._tolerance.l,
  3694.                         y: c.y + this._tolerance.t,
  3695.                         cx: c.cx - this._tolerance.l - this._tolerance.r,
  3696.                         cy: c.cy - this._tolerance.t - this._tolerance.b
  3697.                     };
  3698.                 return a || this._ui.container.css("max-width", d.cx), b = {
  3699.                     cx: this._ui.container.outerWidth(!0),
  3700.                     cy: this._ui.container.outerHeight(!0)
  3701.                 }, {
  3702.                     rc: d,
  3703.                     menuSize: b
  3704.                 }
  3705.             },
  3706.             _calculateFinalLocation: function(a, b) {
  3707.                 var c, e = b.rc,
  3708.                     f = b.menuSize;
  3709.                 return c = {
  3710.                     left: d(e.cx, f.cx, e.x, a.x),
  3711.                     top: d(e.cy, f.cy, e.y, a.y)
  3712.                 }, c.top = Math.max(0, c.top), c.top -= Math.min(c.top, Math.max(0, c.top + f.cy - this.document.height())), c
  3713.             },
  3714.             _placementCoords: function(a) {
  3715.                 return this._calculateFinalLocation(a, this._clampPopupWidth())
  3716.             },
  3717.             _createPrerequisites: function(b, c, d) {
  3718.                 var e, f = this;
  3719.                 e = {
  3720.                     screen: a.Deferred(),
  3721.                     container: a.Deferred()
  3722.                 }, e.screen.then(function() {
  3723.                     e === f._prerequisites && b()
  3724.                 }), e.container.then(function() {
  3725.                     e === f._prerequisites && c()
  3726.                 }), a.when(e.screen, e.container).done(function() {
  3727.                     e === f._prerequisites && (f._prerequisites = null, d())
  3728.                 }), f._prerequisites = e
  3729.             },
  3730.             _animate: function(b) {
  3731.                 return this._ui.screen.removeClass(b.classToRemove).addClass(b.screenClassToAdd), b.prerequisites.screen.resolve(), b.transition && "none" !== b.transition && (b.applyTransition && this._applyTransition(b.transition), this._fallbackTransition) ? void this._ui.container.addClass(b.containerClassToAdd).removeClass(b.classToRemove).animationComplete(a.proxy(b.prerequisites.container, "resolve")) : (this._ui.container.removeClass(b.classToRemove), void b.prerequisites.container.resolve())
  3732.             },
  3733.             _desiredCoords: function(b) {
  3734.                 var c, d = null,
  3735.                     f = e(this.window),
  3736.                     g = b.x,
  3737.                     h = b.y,
  3738.                     i = b.positionTo;
  3739.                 if (i && "origin" !== i)
  3740.                     if ("window" === i) g = f.cx / 2 + f.x, h = f.cy / 2 + f.y;
  3741.                     else {
  3742.                         try {
  3743.                             d = a(i)
  3744.                         } catch (j) {
  3745.                             d = null
  3746.                         }
  3747.                         d && (d.filter(":visible"), 0 === d.length && (d = null))
  3748.                     }
  3749.                 return d && (c = d.offset(), g = c.left + d.outerWidth() / 2, h = c.top + d.outerHeight() / 2), ("number" !== a.type(g) || isNaN(g)) && (g = f.cx / 2 + f.x), ("number" !== a.type(h) || isNaN(h)) && (h = f.cy / 2 + f.y), {
  3750.                     x: g,
  3751.                     y: h
  3752.                 }
  3753.             },
  3754.             _reposition: function(a) {
  3755.                 a = {
  3756.                     x: a.x,
  3757.                     y: a.y,
  3758.                     positionTo: a.positionTo
  3759.                 }, this._trigger("beforeposition", c, a), this._ui.container.offset(this._placementCoords(this._desiredCoords(a)))
  3760.             },
  3761.             reposition: function(a) {
  3762.                 this._isOpen && this._reposition(a)
  3763.             },
  3764.             _openPrerequisitesComplete: function() {
  3765.                 var a = this.element.attr("id");
  3766.                 this._ui.container.addClass("ui-popup-active"), this._isOpen = !0, this._resizeScreen(), this._ui.container.attr("tabindex", "0").focus(), this._ignoreResizeEvents(), a && this.document.find("[aria-haspopup='true'][aria-owns='" + a + "']").attr("aria-expanded", !0), this._trigger("afteropen")
  3767.             },
  3768.             _open: function(b) {
  3769.                 var c = a.extend({}, this.options, b),
  3770.                     d = function() {
  3771.                         var a = navigator.userAgent,
  3772.                             b = a.match(/AppleWebKit\/([0-9\.]+)/),
  3773.                             c = !!b && b[1],
  3774.                             d = a.match(/Android (\d+(?:\.\d+))/),
  3775.                             e = !!d && d[1],
  3776.                             f = a.indexOf("Chrome") > -1;
  3777.                         return null !== d && "4.0" === e && c && c > 534.13 && !f ? !0 : !1
  3778.                     }();
  3779.                 this._createPrerequisites(a.noop, a.noop, a.proxy(this, "_openPrerequisitesComplete")), this._currentTransition = c.transition, this._applyTransition(c.transition), this._ui.screen.removeClass("ui-screen-hidden"), this._ui.container.removeClass("ui-popup-truncate"), this._reposition(c), this._ui.container.removeClass("ui-popup-hidden"), this.options.overlayTheme && d && this.element.closest(".ui-page").addClass("ui-popup-open"), this._animate({
  3780.                     additionalCondition: !0,
  3781.                     transition: c.transition,
  3782.                     classToRemove: "",
  3783.                     screenClassToAdd: "in",
  3784.                     containerClassToAdd: "in",
  3785.                     applyTransition: !1,
  3786.                     prerequisites: this._prerequisites
  3787.                 })
  3788.             },
  3789.             _closePrerequisiteScreen: function() {
  3790.                 this._ui.screen.removeClass("out").addClass("ui-screen-hidden")
  3791.             },
  3792.             _closePrerequisiteContainer: function() {
  3793.                 this._ui.container.removeClass("reverse out").addClass("ui-popup-hidden ui-popup-truncate").removeAttr("style")
  3794.             },
  3795.             _closePrerequisitesDone: function() {
  3796.                 var b = this._ui.container,
  3797.                     d = this.element.attr("id");
  3798.                 b.removeAttr("tabindex"), a.mobile.popup.active = c, a(":focus", b[0]).add(b[0]).blur(), d && this.document.find("[aria-haspopup='true'][aria-owns='" + d + "']").attr("aria-expanded", !1), this._trigger("afterclose")
  3799.             },
  3800.             _close: function(b) {
  3801.                 this._ui.container.removeClass("ui-popup-active"), this._page.removeClass("ui-popup-open"), this._isOpen = !1, this._createPrerequisites(a.proxy(this, "_closePrerequisiteScreen"), a.proxy(this, "_closePrerequisiteContainer"), a.proxy(this, "_closePrerequisitesDone")), this._animate({
  3802.                     additionalCondition: this._ui.screen.hasClass("in"),
  3803.                     transition: b ? "none" : this._currentTransition,
  3804.                     classToRemove: "in",
  3805.                     screenClassToAdd: "out",
  3806.                     containerClassToAdd: "reverse out",
  3807.                     applyTransition: !0,
  3808.                     prerequisites: this._prerequisites
  3809.                 })
  3810.             },
  3811.             _unenhance: function() {
  3812.                 this.options.enhanced || (this._setOptions({
  3813.                     theme: a.mobile.popup.prototype.options.theme
  3814.                 }), this.element.detach().insertAfter(this._ui.placeholder).removeClass("ui-popup ui-overlay-shadow ui-corner-all ui-body-inherit"), this._ui.screen.remove(), this._ui.container.remove(), this._ui.placeholder.remove())
  3815.             },
  3816.             _destroy: function() {
  3817.                 return a.mobile.popup.active === this ? (this.element.one("popupafterclose", a.proxy(this, "_unenhance")), this.close()) : this._unenhance(), this
  3818.             },
  3819.             _closePopup: function(c, d) {
  3820.                 var e, f, g = this.options,
  3821.                     h = !1;
  3822.                 c && c.isDefaultPrevented() || a.mobile.popup.active !== this || (b.scrollTo(0, this._scrollTop), c && "pagebeforechange" === c.type && d && (e = "string" == typeof d.toPage ? d.toPage : d.toPage.jqmData("url"), e = a.mobile.path.parseUrl(e), f = e.pathname + e.search + e.hash, this._myUrl !== a.mobile.path.makeUrlAbsolute(f) ? h = !0 : c.preventDefault()), this.window.off(g.closeEvents), this.element.undelegate(g.closeLinkSelector, g.closeLinkEvents), this._close(h))
  3823.             },
  3824.             _bindContainerClose: function() {
  3825.                 this.window.on(this.options.closeEvents, a.proxy(this, "_closePopup"))
  3826.             },
  3827.             widget: function() {
  3828.                 return this._ui.container
  3829.             },
  3830.             open: function(b) {
  3831.                 var c, d, e, f, g, h, i = this,
  3832.                     j = this.options;
  3833.                 return a.mobile.popup.active || j.disabled ? this : (a.mobile.popup.active = this, this._scrollTop = this.window.scrollTop(), j.history ? (h = a.mobile.navigate.history, d = a.mobile.dialogHashKey, e = a.mobile.activePage, f = e ? e.hasClass("ui-dialog") : !1, this._myUrl = c = h.getActive().url, (g = c.indexOf(d) > -1 && !f && h.activeIndex > 0) ? (i._open(b), i._bindContainerClose(), this) : (-1 !== c.indexOf(d) || f ? c = a.mobile.path.parseLocation().hash + d : c += c.indexOf("#") > -1 ? d : "#" + d, this.window.one("beforenavigate", function(a) {
  3834.                     a.preventDefault(), i._open(b), i._bindContainerClose()
  3835.                 }), this.urlAltered = !0, a.mobile.navigate(c, {
  3836.                     role: "dialog"
  3837.                 }), this)) : (i._open(b), i._bindContainerClose(), i.element.delegate(j.closeLinkSelector, j.closeLinkEvents, function(a) {
  3838.                     i.close(), a.preventDefault()
  3839.                 }), this))
  3840.             },
  3841.             close: function() {
  3842.                 return a.mobile.popup.active !== this ? this : (this._scrollTop = this.window.scrollTop(), this.options.history && this.urlAltered ? (a.mobile.back(), this.urlAltered = !1) : this._closePopup(), this)
  3843.             }
  3844.         }), a.mobile.popup.handleLink = function(b) {
  3845.             var c, d = a.mobile.path,
  3846.                 e = a(d.hashToSelector(d.parseUrl(b.attr("href")).hash)).first();
  3847.             e.length > 0 && e.data("mobile-popup") && (c = b.offset(), e.popup("open", {
  3848.                 x: c.left + b.outerWidth() / 2,
  3849.                 y: c.top + b.outerHeight() / 2,
  3850.                 transition: b.jqmData("transition"),
  3851.                 positionTo: b.jqmData("position-to")
  3852.             })), setTimeout(function() {
  3853.                 b.removeClass(a.mobile.activeBtnClass)
  3854.             }, 300)
  3855.         }, a.mobile.document.on("pagebeforechange", function(b, c) {
  3856.             "popup" === c.options.role && (a.mobile.popup.handleLink(c.options.link), b.preventDefault())
  3857.         })
  3858.     }(a),
  3859.     function(a, b) {
  3860.         var d = ".ui-disabled,.ui-state-disabled,.ui-li-divider,.ui-screen-hidden,:jqmData(role='placeholder')",
  3861.             e = function(a, b, c) {
  3862.                 var e = a[c + "All"]().not(d).first();
  3863.                 e.length && (b.blur().attr("tabindex", "-1"), e.find("a").first().focus())
  3864.             };
  3865.         a.widget("mobile.selectmenu", a.mobile.selectmenu, {
  3866.             _create: function() {
  3867.                 var a = this.options;
  3868.                 return a.nativeMenu = a.nativeMenu || this.element.parents(":jqmData(role='popup'),:mobile-popup").length > 0, this._super()
  3869.             },
  3870.             _handleSelectFocus: function() {
  3871.                 this.element.blur(), this.button.focus()
  3872.             },
  3873.             _handleKeydown: function(a) {
  3874.                 this._super(a), this._handleButtonVclickKeydown(a)
  3875.             },
  3876.             _handleButtonVclickKeydown: function(b) {
  3877.                 this.options.disabled || this.isOpen || this.options.nativeMenu || ("vclick" === b.type || b.keyCode && (b.keyCode === a.mobile.keyCode.ENTER || b.keyCode === a.mobile.keyCode.SPACE)) && (this._decideFormat(), "overlay" === this.menuType ? this.button.attr("href", "#" + this.popupId).attr("data-" + (a.mobile.ns || "") + "rel", "popup") : this.button.attr("href", "#" + this.dialogId).attr("data-" + (a.mobile.ns || "") + "rel", "dialog"), this.isOpen = !0)
  3878.             },
  3879.             _handleListFocus: function(b) {
  3880.                 var c = "focusin" === b.type ? {
  3881.                     tabindex: "0",
  3882.                     event: "vmouseover"
  3883.                 } : {
  3884.                     tabindex: "-1",
  3885.                     event: "vmouseout"
  3886.                 };
  3887.                 a(b.target).attr("tabindex", c.tabindex).trigger(c.event)
  3888.             },
  3889.             _handleListKeydown: function(b) {
  3890.                 var c = a(b.target),
  3891.                     d = c.closest("li");
  3892.                 switch (b.keyCode) {
  3893.                     case 38:
  3894.                         return e(d, c, "prev"), !1;
  3895.                     case 40:
  3896.                         return e(d, c, "next"), !1;
  3897.                     case 13:
  3898.                     case 32:
  3899.                         return c.trigger("click"), !1
  3900.                 }
  3901.             },
  3902.             _handleMenuPageHide: function() {
  3903.                 this._delayedTrigger(), this.thisPage.page("bindRemove")
  3904.             },
  3905.             _handleHeaderCloseClick: function() {
  3906.                 return "overlay" === this.menuType ? (this.close(), !1) : void 0
  3907.             },
  3908.             _handleListItemClick: function(b) {
  3909.                 var c = a(b.target).closest("li"),
  3910.                     d = this.select[0].selectedIndex,
  3911.                     e = a.mobile.getAttribute(c, "option-index"),
  3912.                     f = this._selectOptions().eq(e)[0];
  3913.                 f.selected = this.isMultiple ? !f.selected : !0, this.isMultiple && c.find("a").toggleClass("ui-checkbox-on", f.selected).toggleClass("ui-checkbox-off", !f.selected), this.isMultiple || d === e || (this._triggerChange = !0), this.isMultiple ? (this.select.trigger("change"), this.list.find("li:not(.ui-li-divider)").eq(e).find("a").first().focus()) : this.close(), b.preventDefault()
  3914.             },
  3915.             build: function() {
  3916.                 var c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v = this.options;
  3917.                 return v.nativeMenu ? this._super() : (c = this.selectId, d = c + "-listbox", e = c + "-dialog", f = this.label, g = this.element.closest(".ui-page"), h = this.element[0].multiple, i = c + "-menu", j = v.theme ? " data-" + a.mobile.ns + "theme='" + v.theme + "'" : "", k = v.overlayTheme || v.theme || null, l = k ? " data-" + a.mobile.ns + "overlay-theme='" + k + "'" : "", m = v.dividerTheme && h ? " data-" + a.mobile.ns + "divider-theme='" + v.dividerTheme + "'" : "", n = a("<div data-" + a.mobile.ns + "role='dialog' class='ui-selectmenu' id='" + e + "'" + j + l + "><div data-" + a.mobile.ns + "role='header'><div class='ui-title'></div></div><div data-" + a.mobile.ns + "role='content'></div></div>"), o = a("<div" + j + l + " id='" + d + "' class='ui-selectmenu'></div>").insertAfter(this.select).popup(), p = a("<ul class='ui-selectmenu-list' id='" + i + "' role='listbox' aria-labelledby='" + this.buttonId + "'" + j + m + "></ul>").appendTo(o), q = a("<div class='ui-header ui-bar-" + (v.theme ? v.theme : "inherit") + "'></div>").prependTo(o), r = a("<h1 class='ui-title'></h1>").appendTo(q), this.isMultiple && (u = a("<a>", {
  3918.                     role: "button",
  3919.                     text: v.closeText,
  3920.                     href: "#",
  3921.                     "class": "ui-btn ui-corner-all ui-btn-left ui-btn-icon-notext ui-icon-delete"
  3922.                 }).appendTo(q)), a.extend(this, {
  3923.                     selectId: c,
  3924.                     menuId: i,
  3925.                     popupId: d,
  3926.                     dialogId: e,
  3927.                     thisPage: g,
  3928.                     menuPage: n,
  3929.                     label: f,
  3930.                     isMultiple: h,
  3931.                     theme: v.theme,
  3932.                     listbox: o,
  3933.                     list: p,
  3934.                     header: q,
  3935.                     headerTitle: r,
  3936.                     headerClose: u,
  3937.                     menuPageContent: s,
  3938.                     menuPageClose: t,
  3939.                     placeholder: ""
  3940.                 }), this.refresh(), this._origTabIndex === b && (this._origTabIndex = null === this.select[0].getAttribute("tabindex") ? !1 : this.select.attr("tabindex")), this.select.attr("tabindex", "-1"), this._on(this.select, {
  3941.                     focus: "_handleSelectFocus"
  3942.                 }), this._on(this.button, {
  3943.                     vclick: "_handleButtonVclickKeydown"
  3944.                 }), this.list.attr("role", "listbox"), this._on(this.list, {
  3945.                     focusin: "_handleListFocus",
  3946.                     focusout: "_handleListFocus",
  3947.                     keydown: "_handleListKeydown",
  3948.                     "click li:not(.ui-disabled,.ui-state-disabled,.ui-li-divider)": "_handleListItemClick"
  3949.                 }), this._on(this.menuPage, {
  3950.                     pagehide: "_handleMenuPageHide"
  3951.                 }), this._on(this.listbox, {
  3952.                     popupafterclose: "_popupClosed"
  3953.                 }), this.isMultiple && this._on(this.headerClose, {
  3954.                     click: "_handleHeaderCloseClick"
  3955.                 }), this)
  3956.             },
  3957.             _popupClosed: function() {
  3958.                 this.close(), this._delayedTrigger()
  3959.             },
  3960.             _delayedTrigger: function() {
  3961.                 this._triggerChange && this.element.trigger("change"), this._triggerChange = !1
  3962.             },
  3963.             _isRebuildRequired: function() {
  3964.                 var a = this.list.find("li"),
  3965.                     b = this._selectOptions().not(".ui-screen-hidden");
  3966.                 return b.text() !== a.text()
  3967.             },
  3968.             selected: function() {
  3969.                 return this._selectOptions().filter(":selected:not( :jqmData(placeholder='true') )")
  3970.             },
  3971.             refresh: function(b) {
  3972.                 var c, d;
  3973.                 return this.options.nativeMenu ? this._super(b) : (c = this, (b || this._isRebuildRequired()) && c._buildList(), d = this.selectedIndices(), c.setButtonText(), c.setButtonCount(), void c.list.find("li:not(.ui-li-divider)").find("a").removeClass(a.mobile.activeBtnClass).end().attr("aria-selected", !1).each(function(b) {
  3974.                     if (a.inArray(b, d) > -1) {
  3975.                         var e = a(this);
  3976.                         e.attr("aria-selected", !0), c.isMultiple ? e.find("a").removeClass("ui-checkbox-off").addClass("ui-checkbox-on") : e.hasClass("ui-screen-hidden") ? e.next().find("a").addClass(a.mobile.activeBtnClass) : e.find("a").addClass(a.mobile.activeBtnClass)
  3977.                     }
  3978.                 }))
  3979.             },
  3980.             close: function() {
  3981.                 if (!this.options.disabled && this.isOpen) {
  3982.                     var a = this;
  3983.                     "page" === a.menuType ? (a.menuPage.dialog("close"), a.list.appendTo(a.listbox)) : a.listbox.popup("close"), a._focusButton(), a.isOpen = !1
  3984.                 }
  3985.             },
  3986.             open: function() {
  3987.                 this.button.click()
  3988.             },
  3989.             _focusMenuItem: function() {
  3990.                 var b = this.list.find("a." + a.mobile.activeBtnClass);
  3991.                 0 === b.length && (b = this.list.find("li:not(" + d + ") a.ui-btn")), b.first().focus()
  3992.             },
  3993.             _decideFormat: function() {
  3994.                 var b = this,
  3995.                     c = this.window,
  3996.                     d = b.list.parent(),
  3997.                     e = d.outerHeight(),
  3998.                     f = c.scrollTop(),
  3999.                     g = b.button.offset().top,
  4000.                     h = c.height();
  4001.                 e > h - 80 || !a.support.scrollTop ? (b.menuPage.appendTo(a.mobile.pageContainer).page(), b.menuPageContent = b.menuPage.find(".ui-content"), b.menuPageClose = b.menuPage.find(".ui-header a"), b.thisPage.unbind("pagehide.remove"), 0 === f && g > h && b.thisPage.one("pagehide", function() {
  4002.                     a(this).jqmData("lastScroll", g)
  4003.                 }), b.menuPage.one({
  4004.                     pageshow: a.proxy(this, "_focusMenuItem"),
  4005.                     pagehide: a.proxy(this, "close")
  4006.                 }), b.menuType = "page", b.menuPageContent.append(b.list), b.menuPage.find("div .ui-title").text(b.label.getEncodedText() || b.placeholder)) : (b.menuType = "overlay", b.listbox.one({
  4007.                     popupafteropen: a.proxy(this, "_focusMenuItem")
  4008.                 }))
  4009.             },
  4010.             _buildList: function() {
  4011.                 var b, d, e, f, g, h, i, j, k, l, m, n, o, p, q = this,
  4012.                     r = this.options,
  4013.                     s = this.placeholder,
  4014.                     t = !0,
  4015.                     u = "false",
  4016.                     v = "data-" + a.mobile.ns,
  4017.                     w = v + "option-index",
  4018.                     x = v + "icon",
  4019.                     y = v + "role",
  4020.                     z = v + "placeholder",
  4021.                     A = c.createDocumentFragment(),
  4022.                     B = !1;
  4023.                 for (q.list.empty().filter(".ui-listview").listview("destroy"), b = this._selectOptions(), d = b.length, e = this.select[0], g = 0; d > g; g++, B = !1) h = b[g], i = a(h), i.hasClass("ui-screen-hidden") || (j = h.parentNode, m = [], k = i.text(), l = c.createElement("a"), l.setAttribute("href", "#"), l.appendChild(c.createTextNode(k)), j !== e && "optgroup" === j.nodeName.toLowerCase() && (n = j.getAttribute("label"), n !== f && (o = c.createElement("li"), o.setAttribute(y, "list-divider"), o.setAttribute("role", "option"), o.setAttribute("tabindex", "-1"), o.appendChild(c.createTextNode(n)), A.appendChild(o), f = n)), !t || h.getAttribute("value") && 0 !== k.length && !i.jqmData("placeholder") || (t = !1, B = !0, null === h.getAttribute(z) && (this._removePlaceholderAttr = !0), h.setAttribute(z, !0), r.hidePlaceholderMenuItems && m.push("ui-screen-hidden"), s !== k && (s = q.placeholder = k)), p = c.createElement("li"), h.disabled && (m.push("ui-state-disabled"), p.setAttribute("aria-disabled", !0)), p.setAttribute(w, g), p.setAttribute(x, u), B && p.setAttribute(z, !0), p.className = m.join(" "), p.setAttribute("role", "option"), l.setAttribute("tabindex", "-1"), this.isMultiple && a(l).addClass("ui-btn ui-checkbox-off ui-btn-icon-right"), p.appendChild(l), A.appendChild(p));
  4024.                 q.list[0].appendChild(A), this.isMultiple || s.length ? this.headerTitle.text(this.placeholder) : this.header.addClass("ui-screen-hidden"), q.list.listview()
  4025.             },
  4026.             _button: function() {
  4027.                 return this.options.nativeMenu ? this._super() : a("<a>", {
  4028.                     href: "#",
  4029.                     role: "button",
  4030.                     id: this.buttonId,
  4031.                     "aria-haspopup": "true",
  4032.                     "aria-owns": this.menuId
  4033.                 })
  4034.             },
  4035.             _destroy: function() {
  4036.                 this.options.nativeMenu || (this.close(), this._origTabIndex !== b && (this._origTabIndex !== !1 ? this.select.attr("tabindex", this._origTabIndex) : this.select.removeAttr("tabindex")), this._removePlaceholderAttr && this._selectOptions().removeAttr("data-" + a.mobile.ns + "placeholder"), this.listbox.remove(), this.menuPage.remove()), this._super()
  4037.             }
  4038.         })
  4039.     }(a),
  4040.     function(a, b) {
  4041.         function c(a, b) {
  4042.             var c = b ? b : [];
  4043.             return c.push("ui-btn"), a.theme && c.push("ui-btn-" + a.theme), a.icon && (c = c.concat(["ui-icon-" + a.icon, "ui-btn-icon-" + a.iconpos]), a.iconshadow && c.push("ui-shadow-icon")), a.inline && c.push("ui-btn-inline"), a.shadow && c.push("ui-shadow"), a.corners && c.push("ui-corner-all"), a.mini && c.push("ui-mini"), c
  4044.         }
  4045.  
  4046.         function d(a) {
  4047.             var c, d, e, g = !1,
  4048.                 h = !0,
  4049.                 i = {
  4050.                     icon: "",
  4051.                     inline: !1,
  4052.                     shadow: !1,
  4053.                     corners: !1,
  4054.                     iconshadow: !1,
  4055.                     mini: !1
  4056.                 },
  4057.                 j = [];
  4058.             for (a = a.split(" "), c = 0; c < a.length; c++) e = !0, d = f[a[c]], d !== b ? (e = !1, i[d] = !0) : 0 === a[c].indexOf("ui-btn-icon-") ? (e = !1, h = !1, i.iconpos = a[c].substring(12)) : 0 === a[c].indexOf("ui-icon-") ? (e = !1, i.icon = a[c].substring(8)) : 0 === a[c].indexOf("ui-btn-") && 8 === a[c].length ? (e = !1, i.theme = a[c].substring(7)) : "ui-btn" === a[c] && (e = !1, g = !0), e && j.push(a[c]);
  4059.             return h && (i.icon = ""), {
  4060.                 options: i,
  4061.                 unknownClasses: j,
  4062.                 alreadyEnhanced: g
  4063.             }
  4064.         }
  4065.  
  4066.         function e(a) {
  4067.             return "-" + a.toLowerCase()
  4068.         }
  4069.         var f = {
  4070.                 "ui-shadow": "shadow",
  4071.                 "ui-corner-all": "corners",
  4072.                 "ui-btn-inline": "inline",
  4073.                 "ui-shadow-icon": "iconshadow",
  4074.                 "ui-mini": "mini"
  4075.             },
  4076.             g = function() {
  4077.                 var c = a.mobile.getAttribute.apply(this, arguments);
  4078.                 return null == c ? b : c
  4079.             },
  4080.             h = /[A-Z]/g;
  4081.         a.fn.buttonMarkup = function(f, i) {
  4082.             var j, k, l, m, n, o = a.fn.buttonMarkup.defaults;
  4083.             for (j = 0; j < this.length; j++) {
  4084.                 if (l = this[j], k = i ? {
  4085.                         alreadyEnhanced: !1,
  4086.                         unknownClasses: []
  4087.                     } : d(l.className), m = a.extend({}, k.alreadyEnhanced ? k.options : {}, f), !k.alreadyEnhanced)
  4088.                     for (n in o) m[n] === b && (m[n] = g(l, n.replace(h, e)));
  4089.                 l.className = c(a.extend({}, o, m), k.unknownClasses).join(" "), "button" !== l.tagName.toLowerCase() && l.setAttribute("role", "button")
  4090.             }
  4091.             return this
  4092.         }, a.fn.buttonMarkup.defaults = {
  4093.             icon: "",
  4094.             iconpos: "left",
  4095.             theme: null,
  4096.             inline: !1,
  4097.             shadow: !0,
  4098.             corners: !0,
  4099.             iconshadow: !1,
  4100.             mini: !1
  4101.         }, a.extend(a.fn.buttonMarkup, {
  4102.             initSelector: "a:jqmData(role='button'), .ui-bar > a, .ui-bar > :jqmData(role='controlgroup') > a, button:not(:jqmData(role='navbar') button)"
  4103.         })
  4104.     }(a),
  4105.     function(a, b) {
  4106.         a.widget("mobile.controlgroup", a.extend({
  4107.             options: {
  4108.                 enhanced: !1,
  4109.                 theme: null,
  4110.                 shadow: !1,
  4111.                 corners: !0,
  4112.                 excludeInvisible: !0,
  4113.                 type: "vertical",
  4114.                 mini: !1
  4115.             },
  4116.             _create: function() {
  4117.                 var b = this.element,
  4118.                     c = this.options;
  4119.                 a.fn.buttonMarkup && this.element.find(a.fn.buttonMarkup.initSelector).buttonMarkup(), a.each(this._childWidgets, a.proxy(function(b, c) {
  4120.                     a.mobile[c] && this.element.find(a.mobile[c].initSelector).not(a.mobile.page.prototype.keepNativeSelector())[c]()
  4121.                 }, this)), a.extend(this, {
  4122.                     _ui: null,
  4123.                     _initialRefresh: !0
  4124.                 }), this._ui = c.enhanced ? {
  4125.                     groupLegend: b.children(".ui-controlgroup-label").children(),
  4126.                     childWrapper: b.children(".ui-controlgroup-controls")
  4127.                 } : this._enhance()
  4128.             },
  4129.             _childWidgets: ["checkboxradio", "selectmenu", "button"],
  4130.             _themeClassFromOption: function(a) {
  4131.                 return a ? "none" === a ? "" : "ui-group-theme-" + a : ""
  4132.             },
  4133.             _enhance: function() {
  4134.                 var b = this.element,
  4135.                     c = this.options,
  4136.                     d = {
  4137.                         groupLegend: b.children("legend"),
  4138.                         childWrapper: b.addClass("ui-controlgroup ui-controlgroup-" + ("horizontal" === c.type ? "horizontal" : "vertical") + " " + this._themeClassFromOption(c.theme) + " " + (c.corners ? "ui-corner-all " : "") + (c.mini ? "ui-mini " : "")).wrapInner("<div class='ui-controlgroup-controls " + (c.shadow === !0 ? "ui-shadow" : "") + "'></div>").children()
  4139.                     };
  4140.                 return d.groupLegend.length > 0 && a("<div role='heading' class='ui-controlgroup-label'></div>").append(d.groupLegend).prependTo(b), d
  4141.             },
  4142.             _init: function() {
  4143.                 this.refresh()
  4144.             },
  4145.             _setOptions: function(a) {
  4146.                 var c, d, e = this.element;
  4147.                 return a.type !== b && (e.removeClass("ui-controlgroup-horizontal ui-controlgroup-vertical").addClass("ui-controlgroup-" + ("horizontal" === a.type ? "horizontal" : "vertical")), c = !0), a.theme !== b && e.removeClass(this._themeClassFromOption(this.options.theme)).addClass(this._themeClassFromOption(a.theme)), a.corners !== b && e.toggleClass("ui-corner-all", a.corners), a.mini !== b && e.toggleClass("ui-mini", a.mini), a.shadow !== b && this._ui.childWrapper.toggleClass("ui-shadow", a.shadow), a.excludeInvisible !== b && (this.options.excludeInvisible = a.excludeInvisible, c = !0), d = this._super(a), c && this.refresh(), d
  4148.             },
  4149.             container: function() {
  4150.                 return this._ui.childWrapper
  4151.             },
  4152.             refresh: function() {
  4153.                 var b = this.container(),
  4154.                     c = b.find(".ui-btn").not(".ui-slider-handle"),
  4155.                     d = this._initialRefresh;
  4156.                 a.mobile.checkboxradio && b.find(":mobile-checkboxradio").checkboxradio("refresh"), this._addFirstLastClasses(c, this.options.excludeInvisible ? this._getVisibles(c, d) : c, d), this._initialRefresh = !1
  4157.             },
  4158.             _destroy: function() {
  4159.                 var a, b, c = this.options;
  4160.                 return c.enhanced ? this : (a = this._ui, b = this.element.removeClass("ui-controlgroup ui-controlgroup-horizontal ui-controlgroup-vertical ui-corner-all ui-mini " + this._themeClassFromOption(c.theme)).find(".ui-btn").not(".ui-slider-handle"), this._removeFirstLastClasses(b), a.groupLegend.unwrap(), void a.childWrapper.children().unwrap())
  4161.             }
  4162.         }, a.mobile.behaviors.addFirstLastClasses))
  4163.     }(a),
  4164.     function(a, b) {
  4165.         a.widget("mobile.toolbar", {
  4166.             initSelector: ":jqmData(role='footer'), :jqmData(role='header')",
  4167.             options: {
  4168.                 theme: null,
  4169.                 addBackBtn: !1,
  4170.                 backBtnTheme: null,
  4171.                 backBtnText: "Back"
  4172.             },
  4173.             _create: function() {
  4174.                 var b, c, d = this.element.is(":jqmData(role='header')") ? "header" : "footer",
  4175.                     e = this.element.closest(".ui-page");
  4176.                 0 === e.length && (e = !1, this._on(this.document, {
  4177.                     pageshow: "refresh"
  4178.                 })), a.extend(this, {
  4179.                     role: d,
  4180.                     page: e,
  4181.                     leftbtn: b,
  4182.                     rightbtn: c
  4183.                 }), this.element.attr("role", "header" === d ? "banner" : "contentinfo").addClass("ui-" + d), this.refresh(), this._setOptions(this.options)
  4184.             },
  4185.             _setOptions: function(a) {
  4186.                 if (a.addBackBtn !== b && this._updateBackButton(), null != a.backBtnTheme && this.element.find(".ui-toolbar-back-btn").addClass("ui-btn ui-btn-" + a.backBtnTheme), a.backBtnText !== b && this.element.find(".ui-toolbar-back-btn .ui-btn-text").text(a.backBtnText), a.theme !== b) {
  4187.                     var c = this.options.theme ? this.options.theme : "inherit",
  4188.                         d = a.theme ? a.theme : "inherit";
  4189.                     this.element.removeClass("ui-bar-" + c).addClass("ui-bar-" + d)
  4190.                 }
  4191.                 this._super(a)
  4192.             },
  4193.             refresh: function() {
  4194.                 "header" === this.role && this._addHeaderButtonClasses(), this.page || (this._setRelative(), "footer" === this.role ? this.element.appendTo("body") : "header" === this.role && this._updateBackButton()), this._addHeadingClasses(), this._btnMarkup()
  4195.             },
  4196.             _setRelative: function() {
  4197.                 a("[data-" + a.mobile.ns + "role='page']").css({
  4198.                     position: "relative"
  4199.                 })
  4200.             },
  4201.             _btnMarkup: function() {
  4202.                 this.element.children("a").filter(":not([data-" + a.mobile.ns + "role='none'])").attr("data-" + a.mobile.ns + "role", "button"), this.element.trigger("create")
  4203.             },
  4204.             _addHeaderButtonClasses: function() {
  4205.                 var a = this.element.children("a, button");
  4206.                 this.leftbtn = a.hasClass("ui-btn-left") && !a.hasClass("ui-toolbar-back-btn"), this.rightbtn = a.hasClass("ui-btn-right"), this.leftbtn = this.leftbtn || a.eq(0).not(".ui-btn-right,.ui-toolbar-back-btn").addClass("ui-btn-left").length, this.rightbtn = this.rightbtn || a.eq(1).addClass("ui-btn-right").length
  4207.             },
  4208.             _updateBackButton: function() {
  4209.                 var b, c = this.options,
  4210.                     d = c.backBtnTheme || c.theme;
  4211.                 b = this._backButton = this._backButton || {}, this.options.addBackBtn && "header" === this.role && a(".ui-page").length > 1 && (this.page ? this.page[0].getAttribute("data-" + a.mobile.ns + "url") !== a.mobile.path.stripHash(location.hash) : a.mobile.navigate && a.mobile.navigate.history && a.mobile.navigate.history.activeIndex > 0) && !this.leftbtn ? b.attached || (this.backButton = b.element = (b.element || a("<a role='button' href='javascript:void(0);' class='ui-btn ui-corner-all ui-shadow ui-btn-left " + (d ? "ui-btn-" + d + " " : "") + "ui-toolbar-back-btn ui-icon-carat-l ui-btn-icon-left' data-" + a.mobile.ns + "rel='back'>" + c.backBtnText + "</a>")).prependTo(this.element), b.attached = !0) : b.element && (b.element.detach(), b.attached = !1)
  4212.             },
  4213.             _addHeadingClasses: function() {
  4214.                 this.element.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({
  4215.                     role: "heading",
  4216.                     "aria-level": "1"
  4217.                 })
  4218.             },
  4219.             _destroy: function() {
  4220.                 var a;
  4221.                 this.element.children("h1, h2, h3, h4, h5, h6").removeClass("ui-title").removeAttr("role").removeAttr("aria-level"), "header" === this.role && (this.element.children("a, button").removeClass("ui-btn-left ui-btn-right ui-btn ui-shadow ui-corner-all"), this.backButton && this.backButton.remove()), a = this.options.theme ? this.options.theme : "inherit", this.element.removeClass("ui-bar-" + a), this.element.removeClass("ui-" + this.role).removeAttr("role")
  4222.             }
  4223.         })
  4224.     }(a),
  4225.     function(a, b) {
  4226.         a.widget("mobile.toolbar", a.mobile.toolbar, {
  4227.             options: {
  4228.                 position: null,
  4229.                 visibleOnPageShow: !0,
  4230.                 disablePageZoom: !0,
  4231.                 transition: "slide",
  4232.                 fullscreen: !1,
  4233.                 tapToggle: !0,
  4234.                 tapToggleBlacklist: "a, button, input, select, textarea, .ui-header-fixed, .ui-footer-fixed, .ui-flipswitch, .ui-popup, .ui-panel, .ui-panel-dismiss-open",
  4235.                 hideDuringFocus: "input, textarea, select",
  4236.                 updatePagePadding: !0,
  4237.                 trackPersistentToolbars: !0,
  4238.                 supportBlacklist: function() {
  4239.                     return !a.support.fixedPosition
  4240.                 }
  4241.             },
  4242.             _create: function() {
  4243.                 this._super(), this.pagecontainer = a(":mobile-pagecontainer"), "fixed" !== this.options.position || this.options.supportBlacklist() || this._makeFixed()
  4244.             },
  4245.             _makeFixed: function() {
  4246.                 this.element.addClass("ui-" + this.role + "-fixed"), this.updatePagePadding(), this._addTransitionClass(), this._bindPageEvents(), this._bindToggleHandlers()
  4247.             },
  4248.             _setOptions: function(c) {
  4249.                 if ("fixed" === c.position && "fixed" !== this.options.position && this._makeFixed(), "fixed" === this.options.position && !this.options.supportBlacklist()) {
  4250.                     var d = this.page ? this.page : a(".ui-page-active").length > 0 ? a(".ui-page-active") : a(".ui-page").eq(0);
  4251.                     c.fullscreen !== b && (c.fullscreen ? (this.element.addClass("ui-" + this.role + "-fullscreen"), d.addClass("ui-page-" + this.role + "-fullscreen")) : (this.element.removeClass("ui-" + this.role + "-fullscreen"), d.removeClass("ui-page-" + this.role + "-fullscreen").addClass("ui-page-" + this.role + "-fixed")))
  4252.                 }
  4253.                 this._super(c)
  4254.             },
  4255.             _addTransitionClass: function() {
  4256.                 var a = this.options.transition;
  4257.                 a && "none" !== a && ("slide" === a && (a = this.element.hasClass("ui-header") ? "slidedown" : "slideup"), this.element.addClass(a))
  4258.             },
  4259.             _bindPageEvents: function() {
  4260.                 var a = this.page ? this.element.closest(".ui-page") : this.document;
  4261.                 this._on(a, {
  4262.                     pagebeforeshow: "_handlePageBeforeShow",
  4263.                     webkitAnimationStart: "_handleAnimationStart",
  4264.                     animationstart: "_handleAnimationStart",
  4265.                     updatelayout: "_handleAnimationStart",
  4266.                     pageshow: "_handlePageShow",
  4267.                     pagebeforehide: "_handlePageBeforeHide"
  4268.                 })
  4269.             },
  4270.             _handlePageBeforeShow: function() {
  4271.                 var b = this.options;
  4272.                 b.disablePageZoom && a.mobile.zoom.disable(!0), b.visibleOnPageShow || this.hide(!0)
  4273.             },
  4274.             _handleAnimationStart: function() {
  4275.                 this.options.updatePagePadding && this.updatePagePadding(this.page ? this.page : ".ui-page-active")
  4276.             },
  4277.             _handlePageShow: function() {
  4278.                 this.updatePagePadding(this.page ? this.page : ".ui-page-active"), this.options.updatePagePadding && this._on(this.window, {
  4279.                     throttledresize: "updatePagePadding"
  4280.                 })
  4281.             },
  4282.             _handlePageBeforeHide: function(b, c) {
  4283.                 var d, e, f, g, h = this.options;
  4284.                 h.disablePageZoom && a.mobile.zoom.enable(!0), h.updatePagePadding && this._off(this.window, "throttledresize"), h.trackPersistentToolbars && (d = a(".ui-footer-fixed:jqmData(id)", this.page), e = a(".ui-header-fixed:jqmData(id)", this.page), f = d.length && c.nextPage && a(".ui-footer-fixed:jqmData(id='" + d.jqmData("id") + "')", c.nextPage) || a(), g = e.length && c.nextPage && a(".ui-header-fixed:jqmData(id='" + e.jqmData("id") + "')", c.nextPage) || a(), (f.length || g.length) && (f.add(g).appendTo(a.mobile.pageContainer), c.nextPage.one("pageshow", function() {
  4285.                     g.prependTo(this), f.appendTo(this)
  4286.                 })))
  4287.             },
  4288.             _visible: !0,
  4289.             updatePagePadding: function(c) {
  4290.                 var d = this.element,
  4291.                     e = "header" === this.role,
  4292.                     f = parseFloat(d.css(e ? "top" : "bottom"));
  4293.                 this.options.fullscreen || (c = c && c.type === b && c || this.page || d.closest(".ui-page"), c = this.page ? this.page : ".ui-page-active", a(c).css("padding-" + (e ? "top" : "bottom"), d.outerHeight() + f))
  4294.             },
  4295.             _useTransition: function(b) {
  4296.                 var c = this.window,
  4297.                     d = this.element,
  4298.                     e = c.scrollTop(),
  4299.                     f = d.height(),
  4300.                     g = this.page ? d.closest(".ui-page").height() : a(".ui-page-active").height(),
  4301.                     h = a.mobile.getScreenHeight();
  4302.                 return !b && (this.options.transition && "none" !== this.options.transition && ("header" === this.role && !this.options.fullscreen && e > f || "footer" === this.role && !this.options.fullscreen && g - f > e + h) || this.options.fullscreen)
  4303.             },
  4304.             show: function(a) {
  4305.                 var b = "ui-fixed-hidden",
  4306.                     c = this.element;
  4307.                 this._useTransition(a) ? c.removeClass("out " + b).addClass("in").animationComplete(function() {
  4308.                     c.removeClass("in")
  4309.                 }) : c.removeClass(b), this._visible = !0
  4310.             },
  4311.             hide: function(a) {
  4312.                 var b = "ui-fixed-hidden",
  4313.                     c = this.element,
  4314.                     d = "out" + ("slide" === this.options.transition ? " reverse" : "");
  4315.                 this._useTransition(a) ? c.addClass(d).removeClass("in").animationComplete(function() {
  4316.                     c.addClass(b).removeClass(d)
  4317.                 }) : c.addClass(b).removeClass(d), this._visible = !1
  4318.             },
  4319.             toggle: function() {
  4320.                 this[this._visible ? "hide" : "show"]()
  4321.             },
  4322.             _bindToggleHandlers: function() {
  4323.                 var b, c, d = this,
  4324.                     e = d.options,
  4325.                     f = !0,
  4326.                     g = this.page ? this.page : a(".ui-page");
  4327.                 g.bind("vclick", function(b) {
  4328.                     e.tapToggle && !a(b.target).closest(e.tapToggleBlacklist).length && d.toggle()
  4329.                 }).bind("focusin focusout", function(g) {
  4330.                     screen.width < 1025 && a(g.target).is(e.hideDuringFocus) && !a(g.target).closest(".ui-header-fixed, .ui-footer-fixed").length && ("focusout" !== g.type || f ? "focusin" === g.type && f && (clearTimeout(b), f = !1, c = setTimeout(function() {
  4331.                         d.hide()
  4332.                     }, 0)) : (f = !0, clearTimeout(c), b = setTimeout(function() {
  4333.                         d.show()
  4334.                     }, 0)))
  4335.                 })
  4336.             },
  4337.             _setRelative: function() {
  4338.                 "fixed" !== this.options.position && a("[data-" + a.mobile.ns + "role='page']").css({
  4339.                     position: "relative"
  4340.                 })
  4341.             },
  4342.             _destroy: function() {
  4343.                 var b, c, d, e, f, g = this.pagecontainer.pagecontainer("getActivePage");
  4344.                 this._super(), "fixed" === this.options.position && (d = a("body>.ui-" + this.role + "-fixed").add(g.find(".ui-" + this.options.role + "-fixed")).not(this.element).length > 0, f = a("body>.ui-" + this.role + "-fixed").add(g.find(".ui-" + this.options.role + "-fullscreen")).not(this.element).length > 0, c = "ui-header-fixed ui-footer-fixed ui-header-fullscreen in out ui-footer-fullscreen fade slidedown slideup ui-fixed-hidden", this.element.removeClass(c), f || (b = "ui-page-" + this.role + "-fullscreen"), d || (e = "header" === this.role, b += " ui-page-" + this.role + "-fixed", g.css("padding-" + (e ? "top" : "bottom"), "")), g.removeClass(b))
  4345.             }
  4346.         })
  4347.     }(a),
  4348.     function(a) {
  4349.         a.widget("mobile.toolbar", a.mobile.toolbar, {
  4350.             _makeFixed: function() {
  4351.                 this._super(), this._workarounds()
  4352.             },
  4353.             _workarounds: function() {
  4354.                 var a = navigator.userAgent,
  4355.                     b = navigator.platform,
  4356.                     c = a.match(/AppleWebKit\/([0-9]+)/),
  4357.                     d = !!c && c[1],
  4358.                     e = null,
  4359.                     f = this;
  4360.                 if (b.indexOf("iPhone") > -1 || b.indexOf("iPad") > -1 || b.indexOf("iPod") > -1) e = "ios";
  4361.                 else {
  4362.                     if (!(a.indexOf("Android") > -1)) return;
  4363.                     e = "android"
  4364.                 }
  4365.                 if ("ios" === e) f._bindScrollWorkaround();
  4366.                 else {
  4367.                     if (!("android" === e && d && 534 > d)) return;
  4368.                     f._bindScrollWorkaround(), f._bindListThumbWorkaround()
  4369.                 }
  4370.             },
  4371.             _viewportOffset: function() {
  4372.                 var a = this.element,
  4373.                     b = a.hasClass("ui-header"),
  4374.                     c = Math.abs(a.offset().top - this.window.scrollTop());
  4375.                 return b || (c = Math.round(c - this.window.height() + a.outerHeight()) - 60), c
  4376.             },
  4377.             _bindScrollWorkaround: function() {
  4378.                 var a = this;
  4379.                 this._on(this.window, {
  4380.                     scrollstop: function() {
  4381.                         var b = a._viewportOffset();
  4382.                         b > 2 && a._visible && a._triggerRedraw()
  4383.                     }
  4384.                 })
  4385.             },
  4386.             _bindListThumbWorkaround: function() {
  4387.                 this.element.closest(".ui-page").addClass("ui-android-2x-fixed")
  4388.             },
  4389.             _triggerRedraw: function() {
  4390.                 var b = parseFloat(a(".ui-page-active").css("padding-bottom"));
  4391.                 a(".ui-page-active").css("padding-bottom", b + 1 + "px"), setTimeout(function() {
  4392.                     a(".ui-page-active").css("padding-bottom", b + "px")
  4393.                 }, 0)
  4394.             },
  4395.             destroy: function() {
  4396.                 this._super(), this.element.closest(".ui-page-active").removeClass("ui-android-2x-fix")
  4397.             }
  4398.         })
  4399.     }(a),
  4400.     function(a, b) {
  4401.         function c() {
  4402.             var a = e.clone(),
  4403.                 b = a.eq(0),
  4404.                 c = a.eq(1),
  4405.                 d = c.children();
  4406.             return {
  4407.                 arEls: c.add(b),
  4408.                 gd: b,
  4409.                 ct: c,
  4410.                 ar: d
  4411.             }
  4412.         }
  4413.         var d = a.mobile.browser.oldIE && a.mobile.browser.oldIE <= 8,
  4414.             e = a("<div class='ui-popup-arrow-guide'></div><div class='ui-popup-arrow-container" + (d ? " ie" : "") + "'><div class='ui-popup-arrow'></div></div>");
  4415.         a.widget("mobile.popup", a.mobile.popup, {
  4416.             options: {
  4417.                 arrow: ""
  4418.             },
  4419.             _create: function() {
  4420.                 var a, b = this._super();
  4421.                 return this.options.arrow && (this._ui.arrow = a = this._addArrow()), b
  4422.             },
  4423.             _addArrow: function() {
  4424.                 var a, b = this.options,
  4425.                     d = c();
  4426.                 return a = this._themeClassFromOption("ui-body-", b.theme), d.ar.addClass(a + (b.shadow ? " ui-overlay-shadow" : "")), d.arEls.hide().appendTo(this.element), d
  4427.             },
  4428.             _unenhance: function() {
  4429.                 var a = this._ui.arrow;
  4430.                 return a && a.arEls.remove(), this._super()
  4431.             },
  4432.             _tryAnArrow: function(a, b, c, d, e) {
  4433.                 var f, g, h, i = {},
  4434.                     j = {};
  4435.                 return d.arFull[a.dimKey] > d.guideDims[a.dimKey] ? e : (i[a.fst] = c[a.fst] + (d.arHalf[a.oDimKey] + d.menuHalf[a.oDimKey]) * a.offsetFactor - d.contentBox[a.fst] + (d.clampInfo.menuSize[a.oDimKey] - d.contentBox[a.oDimKey]) * a.arrowOffsetFactor, i[a.snd] = c[a.snd], f = d.result || this._calculateFinalLocation(i, d.clampInfo), g = {
  4436.                     x: f.left,
  4437.                     y: f.top
  4438.                 }, j[a.fst] = g[a.fst] + d.contentBox[a.fst] + a.tipOffset, j[a.snd] = Math.max(f[a.prop] + d.guideOffset[a.prop] + d.arHalf[a.dimKey], Math.min(f[a.prop] + d.guideOffset[a.prop] + d.guideDims[a.dimKey] - d.arHalf[a.dimKey], c[a.snd])), h = Math.abs(c.x - j.x) + Math.abs(c.y - j.y), (!e || h < e.diff) && (j[a.snd] -= d.arHalf[a.dimKey] + f[a.prop] + d.contentBox[a.snd], e = {
  4439.                     dir: b,
  4440.                     diff: h,
  4441.                     result: f,
  4442.                     posProp: a.prop,
  4443.                     posVal: j[a.snd]
  4444.                 }), e)
  4445.             },
  4446.             _getPlacementState: function(a) {
  4447.                 var b, c, d = this._ui.arrow,
  4448.                     e = {
  4449.                         clampInfo: this._clampPopupWidth(!a),
  4450.                         arFull: {
  4451.                             cx: d.ct.width(),
  4452.                             cy: d.ct.height()
  4453.                         },
  4454.                         guideDims: {
  4455.                             cx: d.gd.width(),
  4456.                             cy: d.gd.height()
  4457.                         },
  4458.                         guideOffset: d.gd.offset()
  4459.                     };
  4460.                 return b = this.element.offset(), d.gd.css({
  4461.                     left: 0,
  4462.                     top: 0,
  4463.                     right: 0,
  4464.                     bottom: 0
  4465.                 }), c = d.gd.offset(), e.contentBox = {
  4466.                     x: c.left - b.left,
  4467.                     y: c.top - b.top,
  4468.                     cx: d.gd.width(),
  4469.                     cy: d.gd.height()
  4470.                 }, d.gd.removeAttr("style"), e.guideOffset = {
  4471.                     left: e.guideOffset.left - b.left,
  4472.                     top: e.guideOffset.top - b.top
  4473.                 }, e.arHalf = {
  4474.                     cx: e.arFull.cx / 2,
  4475.                     cy: e.arFull.cy / 2
  4476.                 }, e.menuHalf = {
  4477.                     cx: e.clampInfo.menuSize.cx / 2,
  4478.                     cy: e.clampInfo.menuSize.cy / 2
  4479.                 }, e
  4480.             },
  4481.             _placementCoords: function(b) {
  4482.                 var c, e, f, g, h, i = this.options.arrow,
  4483.                     j = this._ui.arrow;
  4484.                 return j ? (j.arEls.show(), h = {}, c = this._getPlacementState(!0), f = {
  4485.                     l: {
  4486.                         fst: "x",
  4487.                         snd: "y",
  4488.                         prop: "top",
  4489.                         dimKey: "cy",
  4490.                         oDimKey: "cx",
  4491.                         offsetFactor: 1,
  4492.                         tipOffset: -c.arHalf.cx,
  4493.                         arrowOffsetFactor: 0
  4494.                     },
  4495.                     r: {
  4496.                         fst: "x",
  4497.                         snd: "y",
  4498.                         prop: "top",
  4499.                         dimKey: "cy",
  4500.                         oDimKey: "cx",
  4501.                         offsetFactor: -1,
  4502.                         tipOffset: c.arHalf.cx + c.contentBox.cx,
  4503.                         arrowOffsetFactor: 1
  4504.                     },
  4505.                     b: {
  4506.                         fst: "y",
  4507.                         snd: "x",
  4508.                         prop: "left",
  4509.                         dimKey: "cx",
  4510.                         oDimKey: "cy",
  4511.                         offsetFactor: -1,
  4512.                         tipOffset: c.arHalf.cy + c.contentBox.cy,
  4513.                         arrowOffsetFactor: 1
  4514.                     },
  4515.                     t: {
  4516.                         fst: "y",
  4517.                         snd: "x",
  4518.                         prop: "left",
  4519.                         dimKey: "cx",
  4520.                         oDimKey: "cy",
  4521.                         offsetFactor: 1,
  4522.                         tipOffset: -c.arHalf.cy,
  4523.                         arrowOffsetFactor: 0
  4524.                     }
  4525.                 }, a.each((i === !0 ? "l,t,r,b" : i).split(","), a.proxy(function(a, d) {
  4526.                     e = this._tryAnArrow(f[d], d, b, c, e)
  4527.                 }, this)), e ? (j.ct.removeClass("ui-popup-arrow-l ui-popup-arrow-t ui-popup-arrow-r ui-popup-arrow-b").addClass("ui-popup-arrow-" + e.dir).removeAttr("style").css(e.posProp, e.posVal).show(), d || (g = this.element.offset(), h[f[e.dir].fst] = j.ct.offset(), h[f[e.dir].snd] = {
  4528.                     left: g.left + c.contentBox.x,
  4529.                     top: g.top + c.contentBox.y
  4530.                 }), e.result) : (j.arEls.hide(), this._super(b))) : this._super(b)
  4531.             },
  4532.             _setOptions: function(a) {
  4533.                 var c, d = this.options.theme,
  4534.                     e = this._ui.arrow,
  4535.                     f = this._super(a);
  4536.                 if (a.arrow !== b) {
  4537.                     if (!e && a.arrow) return void(this._ui.arrow = this._addArrow());
  4538.                     e && !a.arrow && (e.arEls.remove(), this._ui.arrow = null)
  4539.                 }
  4540.                 return e = this._ui.arrow, e && (a.theme !== b && (d = this._themeClassFromOption("ui-body-", d), c = this._themeClassFromOption("ui-body-", a.theme), e.ar.removeClass(d).addClass(c)), a.shadow !== b && e.ar.toggleClass("ui-overlay-shadow", a.shadow)), f
  4541.             },
  4542.             _destroy: function() {
  4543.                 var a = this._ui.arrow;
  4544.                 return a && a.arEls.remove(), this._super()
  4545.             }
  4546.         })
  4547.     }(a),
  4548.     function(a, c) {
  4549.         a.widget("mobile.panel", {
  4550.             options: {
  4551.                 classes: {
  4552.                     panel: "ui-panel",
  4553.                     panelOpen: "ui-panel-open",
  4554.                     panelClosed: "ui-panel-closed",
  4555.                     panelFixed: "ui-panel-fixed",
  4556.                     panelInner: "ui-panel-inner",
  4557.                     modal: "ui-panel-dismiss",
  4558.                     modalOpen: "ui-panel-dismiss-open",
  4559.                     pageContainer: "ui-panel-page-container",
  4560.                     pageWrapper: "ui-panel-wrapper",
  4561.                     pageFixedToolbar: "ui-panel-fixed-toolbar",
  4562.                     pageContentPrefix: "ui-panel-page-content",
  4563.                     animate: "ui-panel-animate"
  4564.                 },
  4565.                 animate: !0,
  4566.                 theme: null,
  4567.                 position: "left",
  4568.                 dismissible: !0,
  4569.                 display: "reveal",
  4570.                 swipeClose: !0,
  4571.                 positionFixed: !1
  4572.             },
  4573.             _closeLink: null,
  4574.             _parentPage: null,
  4575.             _page: null,
  4576.             _modal: null,
  4577.             _panelInner: null,
  4578.             _wrapper: null,
  4579.             _fixedToolbars: null,
  4580.             _create: function() {
  4581.                 var b = this.element,
  4582.                     c = b.closest(".ui-page, :jqmData(role='page')");
  4583.                 a.extend(this, {
  4584.                     _closeLink: b.find(":jqmData(rel='close')"),
  4585.                     _parentPage: c.length > 0 ? c : !1,
  4586.                     _openedPage: null,
  4587.                     _page: this._getPage,
  4588.                     _panelInner: this._getPanelInner(),
  4589.                     _fixedToolbars: this._getFixedToolbars
  4590.                 }), "overlay" !== this.options.display && this._getWrapper(), this._addPanelClasses(), a.support.cssTransform3d && this.options.animate && this.element.addClass(this.options.classes.animate), this._bindUpdateLayout(), this._bindCloseEvents(), this._bindLinkListeners(), this._bindPageEvents(), this.options.dismissible && this._createModal(), this._bindSwipeEvents()
  4591.             },
  4592.             _getPanelInner: function() {
  4593.                 var a = this.element.find("." + this.options.classes.panelInner);
  4594.                 return 0 === a.length && (a = this.element.children().wrapAll("<div class='" + this.options.classes.panelInner + "' />").parent()), a
  4595.             },
  4596.             _createModal: function() {
  4597.                 var b = this,
  4598.                     c = b._parentPage ? b._parentPage.parent() : b.element.parent();
  4599.                 b._modal = a("<div class='" + b.options.classes.modal + "'></div>").on("mousedown", function() {
  4600.                     b.close()
  4601.                 }).appendTo(c)
  4602.             },
  4603.             _getPage: function() {
  4604.                 var b = this._openedPage || this._parentPage || a("." + a.mobile.activePageClass);
  4605.                 return b
  4606.             },
  4607.             _getWrapper: function() {
  4608.                 var a = this._page().find("." + this.options.classes.pageWrapper);
  4609.                 0 === a.length && (a = this._page().children(".ui-header:not(.ui-header-fixed), .ui-content:not(.ui-popup), .ui-footer:not(.ui-footer-fixed)").wrapAll("<div class='" + this.options.classes.pageWrapper + "'></div>").parent()), this._wrapper = a
  4610.             },
  4611.             _getFixedToolbars: function() {
  4612.                 var b = a("body").children(".ui-header-fixed, .ui-footer-fixed"),
  4613.                     c = this._page().find(".ui-header-fixed, .ui-footer-fixed"),
  4614.                     d = b.add(c).addClass(this.options.classes.pageFixedToolbar);
  4615.                 return d
  4616.             },
  4617.             _getPosDisplayClasses: function(a) {
  4618.                 return a + "-position-" + this.options.position + " " + a + "-display-" + this.options.display
  4619.             },
  4620.             _getPanelClasses: function() {
  4621.                 var a = this.options.classes.panel + " " + this._getPosDisplayClasses(this.options.classes.panel) + " " + this.options.classes.panelClosed + " ui-body-" + (this.options.theme ? this.options.theme : "inherit");
  4622.                 return this.options.positionFixed && (a += " " + this.options.classes.panelFixed), a
  4623.             },
  4624.             _addPanelClasses: function() {
  4625.                 this.element.addClass(this._getPanelClasses())
  4626.             },
  4627.             _handleCloseClick: function(a) {
  4628.                 a.isDefaultPrevented() || this.close()
  4629.             },
  4630.             _bindCloseEvents: function() {
  4631.                 this._on(this._closeLink, {
  4632.                     click: "_handleCloseClick"
  4633.                 }), this._on({
  4634.                     "click a:jqmData(ajax='false')": "_handleCloseClick"
  4635.                 })
  4636.             },
  4637.             _positionPanel: function(b) {
  4638.                 var c = this,
  4639.                     d = c._panelInner.outerHeight(),
  4640.                     e = d > a.mobile.getScreenHeight();
  4641.                 e || !c.options.positionFixed ? (e && (c._unfixPanel(), a.mobile.resetActivePageHeight(d)), b && this.window[0].scrollTo(0, a.mobile.defaultHomeScroll)) : c._fixPanel()
  4642.             },
  4643.             _bindFixListener: function() {
  4644.                 this._on(a(b), {
  4645.                     throttledresize: "_positionPanel"
  4646.                 })
  4647.             },
  4648.             _unbindFixListener: function() {
  4649.                 this._off(a(b), "throttledresize")
  4650.             },
  4651.             _unfixPanel: function() {
  4652.                 this.options.positionFixed && a.support.fixedPosition && this.element.removeClass(this.options.classes.panelFixed)
  4653.             },
  4654.             _fixPanel: function() {
  4655.                 this.options.positionFixed && a.support.fixedPosition && this.element.addClass(this.options.classes.panelFixed)
  4656.             },
  4657.             _bindUpdateLayout: function() {
  4658.                 var a = this;
  4659.                 a.element.on("updatelayout", function() {
  4660.                     a._open && a._positionPanel()
  4661.                 })
  4662.             },
  4663.             _bindLinkListeners: function() {
  4664.                 this._on("body", {
  4665.                     "click a": "_handleClick"
  4666.                 })
  4667.             },
  4668.             _handleClick: function(b) {
  4669.                 var d, e = this.element.attr("id");
  4670.                 b.currentTarget.href.split("#")[1] === e && e !== c && (b.preventDefault(), d = a(b.target), d.hasClass("ui-btn") && (d.addClass(a.mobile.activeBtnClass), this.element.one("panelopen panelclose", function() {
  4671.                     d.removeClass(a.mobile.activeBtnClass)
  4672.                 })), this.toggle())
  4673.             },
  4674.             _bindSwipeEvents: function() {
  4675.                 var a = this,
  4676.                     b = a._modal ? a.element.add(a._modal) : a.element;
  4677.                 a.options.swipeClose && ("left" === a.options.position ? b.on("swipeleft.panel", function() {
  4678.                     a.close()
  4679.                 }) : b.on("swiperight.panel", function() {
  4680.                     a.close()
  4681.                 }))
  4682.             },
  4683.             _bindPageEvents: function() {
  4684.                 var a = this;
  4685.                 this.document.on("panelbeforeopen", function(b) {
  4686.                     a._open && b.target !== a.element[0] && a.close()
  4687.                 }).on("keyup.panel", function(b) {
  4688.                     27 === b.keyCode && a._open && a.close()
  4689.                 }), this._parentPage || "overlay" === this.options.display || this._on(this.document, {
  4690.                     pageshow: "_getWrapper"
  4691.                 }), a._parentPage ? this.document.on("pagehide", ":jqmData(role='page')", function() {
  4692.                     a._open && a.close(!0)
  4693.                 }) : this.document.on("pagebeforehide", function() {
  4694.                     a._open && a.close(!0)
  4695.                 })
  4696.             },
  4697.             _open: !1,
  4698.             _pageContentOpenClasses: null,
  4699.             _modalOpenClasses: null,
  4700.             open: function(b) {
  4701.                 if (!this._open) {
  4702.                     var c = this,
  4703.                         d = c.options,
  4704.                         e = function() {
  4705.                             c._off(c.document, "panelclose"), c._page().jqmData("panel", "open"), a.support.cssTransform3d && d.animate && "overlay" !== d.display && (c._wrapper.addClass(d.classes.animate), c._fixedToolbars().addClass(d.classes.animate)), !b && a.support.cssTransform3d && d.animate ? (c._wrapper || c.element).animationComplete(f, "transition") : setTimeout(f, 0), d.theme && "overlay" !== d.display && c._page().parent().addClass(d.classes.pageContainer + "-themed " + d.classes.pageContainer + "-" + d.theme), c.element.removeClass(d.classes.panelClosed).addClass(d.classes.panelOpen), c._positionPanel(!0), c._pageContentOpenClasses = c._getPosDisplayClasses(d.classes.pageContentPrefix), "overlay" !== d.display && (c._page().parent().addClass(d.classes.pageContainer), c._wrapper.addClass(c._pageContentOpenClasses), c._fixedToolbars().addClass(c._pageContentOpenClasses)), c._modalOpenClasses = c._getPosDisplayClasses(d.classes.modal) + " " + d.classes.modalOpen, c._modal && c._modal.addClass(c._modalOpenClasses).height(Math.max(c._modal.height(), c.document.height()))
  4706.                         },
  4707.                         f = function() {
  4708.                             c._open && ("overlay" !== d.display && (c._wrapper.addClass(d.classes.pageContentPrefix + "-open"), c._fixedToolbars().addClass(d.classes.pageContentPrefix + "-open")), c._bindFixListener(), c._trigger("open"), c._openedPage = c._page())
  4709.                         };
  4710.                     c._trigger("beforeopen"), "open" === c._page().jqmData("panel") ? c._on(c.document, {
  4711.                         panelclose: e
  4712.                     }) : e(), c._open = !0
  4713.                 }
  4714.             },
  4715.             close: function(b) {
  4716.                 if (this._open) {
  4717.                     var c = this,
  4718.                         d = this.options,
  4719.                         e = function() {
  4720.                             c.element.removeClass(d.classes.panelOpen), "overlay" !== d.display && (c._wrapper.removeClass(c._pageContentOpenClasses), c._fixedToolbars().removeClass(c._pageContentOpenClasses)), !b && a.support.cssTransform3d && d.animate ? (c._wrapper || c.element).animationComplete(f, "transition") : setTimeout(f, 0), c._modal && c._modal.removeClass(c._modalOpenClasses).height("")
  4721.                         },
  4722.                         f = function() {
  4723.                             d.theme && "overlay" !== d.display && c._page().parent().removeClass(d.classes.pageContainer + "-themed " + d.classes.pageContainer + "-" + d.theme), c.element.addClass(d.classes.panelClosed), "overlay" !== d.display && (c._page().parent().removeClass(d.classes.pageContainer), c._wrapper.removeClass(d.classes.pageContentPrefix + "-open"), c._fixedToolbars().removeClass(d.classes.pageContentPrefix + "-open")), a.support.cssTransform3d && d.animate && "overlay" !== d.display && (c._wrapper.removeClass(d.classes.animate), c._fixedToolbars().removeClass(d.classes.animate)), c._fixPanel(), c._unbindFixListener(), a.mobile.resetActivePageHeight(), c._page().jqmRemoveData("panel"), c._trigger("close"), c._openedPage = null
  4724.                         };
  4725.                     c._trigger("beforeclose"), e(), c._open = !1
  4726.                 }
  4727.             },
  4728.             toggle: function() {
  4729.                 this[this._open ? "close" : "open"]()
  4730.             },
  4731.             _destroy: function() {
  4732.                 var b, c = this.options,
  4733.                     d = a("body > :mobile-panel").length + a.mobile.activePage.find(":mobile-panel").length > 1;
  4734.                 "overlay" !== c.display && (b = a("body > :mobile-panel").add(a.mobile.activePage.find(":mobile-panel")), 0 === b.not(".ui-panel-display-overlay").not(this.element).length && this._wrapper.children().unwrap(), this._open && (this._fixedToolbars().removeClass(c.classes.pageContentPrefix + "-open"), a.support.cssTransform3d && c.animate && this._fixedToolbars().removeClass(c.classes.animate), this._page().parent().removeClass(c.classes.pageContainer), c.theme && this._page().parent().removeClass(c.classes.pageContainer + "-themed " + c.classes.pageContainer + "-" + c.theme))), d || this.document.off("panelopen panelclose"), this._open && this._page().jqmRemoveData("panel"), this._panelInner.children().unwrap(), this.element.removeClass([this._getPanelClasses(), c.classes.panelOpen, c.classes.animate].join(" ")).off("swipeleft.panel swiperight.panel").off("panelbeforeopen").off("panelhide").off("keyup.panel").off("updatelayout"), this._modal && this._modal.remove()
  4735.             }
  4736.         })
  4737.     }(a),
  4738.     function(a, b) {
  4739.         a.widget("mobile.table", {
  4740.             options: {
  4741.                 classes: {
  4742.                     table: "ui-table"
  4743.                 },
  4744.                 enhanced: !1
  4745.             },
  4746.             _create: function() {
  4747.                 this.options.enhanced || this.element.addClass(this.options.classes.table), a.extend(this, {
  4748.                     headers: b,
  4749.                     allHeaders: b
  4750.                 }), this._refresh(!0)
  4751.             },
  4752.             _setHeaders: function() {
  4753.                 var a = this.element.find("thead tr");
  4754.                 this.headers = this.element.find("tr:eq(0)").children(), this.allHeaders = this.headers.add(a.children())
  4755.             },
  4756.             refresh: function() {
  4757.                 this._refresh()
  4758.             },
  4759.             rebuild: a.noop,
  4760.             _refresh: function() {
  4761.                 var b = this.element,
  4762.                     c = b.find("thead tr");
  4763.                 this._setHeaders(), c.each(function() {
  4764.                     var d = 0;
  4765.                     a(this).children().each(function() {
  4766.                         var e, f = parseInt(this.getAttribute("colspan"), 10),
  4767.                             g = ":nth-child(" + (d + 1) + ")";
  4768.                         if (this.setAttribute("data-" + a.mobile.ns + "colstart", d + 1), f)
  4769.                             for (e = 0; f - 1 > e; e++) d++, g += ", :nth-child(" + (d + 1) + ")";
  4770.                         a(this).jqmData("cells", b.find("tr").not(c.eq(0)).not(this).children(g)), d++
  4771.                     })
  4772.                 })
  4773.             }
  4774.         })
  4775.     }(a),
  4776.     function(a) {
  4777.         a.widget("mobile.table", a.mobile.table, {
  4778.             options: {
  4779.                 mode: "columntoggle",
  4780.                 columnBtnTheme: null,
  4781.                 columnPopupTheme: null,
  4782.                 columnBtnText: "Columns...",
  4783.                 classes: a.extend(a.mobile.table.prototype.options.classes, {
  4784.                     popup: "ui-table-columntoggle-popup",
  4785.                     columnBtn: "ui-table-columntoggle-btn",
  4786.                     priorityPrefix: "ui-table-priority-",
  4787.                     columnToggleTable: "ui-table-columntoggle"
  4788.                 })
  4789.             },
  4790.             _create: function() {
  4791.                 this._super(), "columntoggle" === this.options.mode && (a.extend(this, {
  4792.                     _menu: null
  4793.                 }), this.options.enhanced ? (this._menu = a(this.document[0].getElementById(this._id() + "-popup")).children().first(), this._addToggles(this._menu, !0)) : (this._menu = this._enhanceColToggle(), this.element.addClass(this.options.classes.columnToggleTable)), this._setupEvents(), this._setToggleState())
  4794.             },
  4795.             _id: function() {
  4796.                 return this.element.attr("id") || this.widgetName + this.uuid
  4797.             },
  4798.             _setupEvents: function() {
  4799.                 this._on(this.window, {
  4800.                     throttledresize: "_setToggleState"
  4801.                 }), this._on(this._menu, {
  4802.                     "change input": "_menuInputChange"
  4803.                 })
  4804.             },
  4805.             _addToggles: function(b, c) {
  4806.                 var d, e = 0,
  4807.                     f = this.options,
  4808.                     g = b.controlgroup("container");
  4809.                 c ? d = b.find("input") : g.empty(), this.headers.not("td").each(function() {
  4810.                     var b, h, i = a(this),
  4811.                         j = a.mobile.getAttribute(this, "priority");
  4812.                     j && (h = i.add(i.jqmData("cells")), h.addClass(f.classes.priorityPrefix + j), b = (c ? d.eq(e++) : a("<label><input type='checkbox' checked />" + (i.children("abbr").first().attr("title") || i.text()) + "</label>").appendTo(g).children(0).checkboxradio({
  4813.                         theme: f.columnPopupTheme
  4814.                     })).jqmData("header", i).jqmData("cells", h), i.jqmData("input", b))
  4815.                 }), c || b.controlgroup("refresh")
  4816.             },
  4817.             _menuInputChange: function(b) {
  4818.                 var c = a(b.target),
  4819.                     d = c[0].checked;
  4820.                 c.jqmData("cells").toggleClass("ui-table-cell-hidden", !d).toggleClass("ui-table-cell-visible", d)
  4821.             },
  4822.             _unlockCells: function(a) {
  4823.                 a.removeClass("ui-table-cell-hidden ui-table-cell-visible")
  4824.             },
  4825.             _enhanceColToggle: function() {
  4826.                 var b, c, d, e, f = this.element,
  4827.                     g = this.options,
  4828.                     h = a.mobile.ns,
  4829.                     i = this.document[0].createDocumentFragment();
  4830.                 return b = this._id() + "-popup", c = a("<a href='#" + b + "' class='" + g.classes.columnBtn + " ui-btn ui-btn-" + (g.columnBtnTheme || "a") + " ui-corner-all ui-shadow ui-mini' data-" + h + "rel='popup'>" + g.columnBtnText + "</a>"), d = a("<div class='" + g.classes.popup + "' id='" + b + "'></div>"), e = a("<fieldset></fieldset>").controlgroup(), this._addToggles(e, !1), e.appendTo(d), i.appendChild(d[0]), i.appendChild(c[0]), f.before(i), d.popup(), e
  4831.             },
  4832.             rebuild: function() {
  4833.                 this._super(), "columntoggle" === this.options.mode && this._refresh(!1)
  4834.             },
  4835.             _refresh: function(b) {
  4836.                 var c, d, e;
  4837.                 if (this._super(b), !b && "columntoggle" === this.options.mode)
  4838.                     for (c = this.headers, d = [], this._menu.find("input").each(function() {
  4839.                             var b = a(this),
  4840.                                 e = b.jqmData("header"),
  4841.                                 f = c.index(e[0]);
  4842.                             f > -1 && !b.prop("checked") && d.push(f)
  4843.                         }), this._unlockCells(this.element.find(".ui-table-cell-hidden, .ui-table-cell-visible")), this._addToggles(this._menu, b), e = d.length - 1; e > -1; e--) c.eq(d[e]).jqmData("input").prop("checked", !1).checkboxradio("refresh").trigger("change")
  4844.             },
  4845.             _setToggleState: function() {
  4846.                 this._menu.find("input").each(function() {
  4847.                     var b = a(this);
  4848.                     this.checked = "table-cell" === b.jqmData("cells").eq(0).css("display"), b.checkboxradio("refresh")
  4849.                 })
  4850.             },
  4851.             _destroy: function() {
  4852.                 this._super()
  4853.             }
  4854.         })
  4855.     }(a),
  4856.     function(a) {
  4857.         a.widget("mobile.table", a.mobile.table, {
  4858.             options: {
  4859.                 mode: "reflow",
  4860.                 classes: a.extend(a.mobile.table.prototype.options.classes, {
  4861.                     reflowTable: "ui-table-reflow",
  4862.                     cellLabels: "ui-table-cell-label"
  4863.                 })
  4864.             },
  4865.             _create: function() {
  4866.                 this._super(), "reflow" === this.options.mode && (this.options.enhanced || (this.element.addClass(this.options.classes.reflowTable), this._updateReflow()))
  4867.             },
  4868.             rebuild: function() {
  4869.                 this._super(), "reflow" === this.options.mode && this._refresh(!1)
  4870.             },
  4871.             _refresh: function(a) {
  4872.                 this._super(a), a || "reflow" !== this.options.mode || this._updateReflow()
  4873.             },
  4874.             _updateReflow: function() {
  4875.                 var b = this,
  4876.                     c = this.options;
  4877.                 a(b.allHeaders.get().reverse()).each(function() {
  4878.                     var d, e, f = a(this).jqmData("cells"),
  4879.                         g = a.mobile.getAttribute(this, "colstart"),
  4880.                         h = f.not(this).filter("thead th").length && " ui-table-cell-label-top",
  4881.                         i = a(this).clone().contents();
  4882.                     i.length > 0 && (h ? (d = parseInt(this.getAttribute("colspan"), 10), e = "", d && (e = "td:nth-child(" + d + "n + " + g + ")"), b._addLabels(f.filter(e), c.classes.cellLabels + h, i)) : b._addLabels(f, c.classes.cellLabels, i))
  4883.                 })
  4884.             },
  4885.             _addLabels: function(b, c, d) {
  4886.                 1 === d.length && "abbr" === d[0].nodeName.toLowerCase() && (d = d.eq(0).attr("title")), b.not(":has(b." + c + ")").prepend(a("<b class='" + c + "'></b>").append(d))
  4887.             }
  4888.         })
  4889.     }(a),
  4890.     function(a, c) {
  4891.         var d = function(b, c) {
  4892.             return -1 === ("" + (a.mobile.getAttribute(this, "filtertext") || a(this).text())).toLowerCase().indexOf(c)
  4893.         };
  4894.         a.widget("mobile.filterable", {
  4895.             initSelector: ":jqmData(filter='true')",
  4896.             options: {
  4897.                 filterReveal: !1,
  4898.                 filterCallback: d,
  4899.                 enhanced: !1,
  4900.                 input: null,
  4901.                 children: "> li, > option, > optgroup option, > tbody tr, > .ui-controlgroup-controls > .ui-btn, > .ui-controlgroup-controls > .ui-checkbox, > .ui-controlgroup-controls > .ui-radio"
  4902.             },
  4903.             _create: function() {
  4904.                 var b = this.options;
  4905.                 a.extend(this, {
  4906.                     _search: null,
  4907.                     _timer: 0
  4908.                 }), this._setInput(b.input), b.enhanced || this._filterItems((this._search && this._search.val() || "").toLowerCase())
  4909.             },
  4910.             _onKeyUp: function() {
  4911.                 var c, d, e = this._search;
  4912.                 if (e) {
  4913.                     if (c = e.val().toLowerCase(), d = a.mobile.getAttribute(e[0], "lastval") + "", d && d === c) return;
  4914.                     this._timer && (b.clearTimeout(this._timer), this._timer = 0), this._timer = this._delay(function() {
  4915.                         return this._trigger("beforefilter", null, {
  4916.                             input: e
  4917.                         }) === !1 ? !1 : (e[0].setAttribute("data-" + a.mobile.ns + "lastval", c), this._filterItems(c), void(this._timer = 0))
  4918.                     }, 250)
  4919.                 }
  4920.             },
  4921.             _getFilterableItems: function() {
  4922.                 var b = this.element,
  4923.                     c = this.options.children,
  4924.                     d = c ? a.isFunction(c) ? c() : c.nodeName ? a(c) : c.jquery ? c : this.element.find(c) : {
  4925.                         length: 0
  4926.                     };
  4927.                 return 0 === d.length && (d = b.children()), d
  4928.             },
  4929.             _filterItems: function(b) {
  4930.                 var c, e, f, g, h = [],
  4931.                     i = [],
  4932.                     j = this.options,
  4933.                     k = this._getFilterableItems();
  4934.                 if (null != b)
  4935.                     for (e = j.filterCallback || d, f = k.length, c = 0; f > c; c++) g = e.call(k[c], c, b) ? i : h, g.push(k[c]);
  4936.                 0 === i.length ? k[j.filterReveal && 0 === b.length ? "addClass" : "removeClass"]("ui-screen-hidden") : (a(i).addClass("ui-screen-hidden"), a(h).removeClass("ui-screen-hidden")), this._refreshChildWidget(), this._trigger("filter", null, {
  4937.                     items: k
  4938.                 })
  4939.             },
  4940.             _refreshChildWidget: function() {
  4941.                 var b, c, d = ["collapsibleset", "selectmenu", "controlgroup", "listview"];
  4942.                 for (c = d.length - 1; c > -1; c--) b = d[c], a.mobile[b] && (b = this.element.data("mobile-" + b), b && a.isFunction(b.refresh) && b.refresh())
  4943.             },
  4944.             _setInput: function(c) {
  4945.                 var d = this._search;
  4946.                 this._timer && (b.clearTimeout(this._timer), this._timer = 0), d && (this._off(d, "keyup change input"), d = null), c && (d = c.jquery ? c : c.nodeName ? a(c) : this.document.find(c), this._on(d, {
  4947.                     keydown: "_onKeyDown",
  4948.                     keypress: "_onKeyPress",
  4949.                     keyup: "_onKeyUp",
  4950.                     change: "_onKeyUp",
  4951.                     input: "_onKeyUp"
  4952.                 })), this._search = d
  4953.             },
  4954.             _onKeyDown: function(b) {
  4955.                 b.keyCode === a.ui.keyCode.ENTER && (b.preventDefault(), this._preventKeyPress = !0)
  4956.             },
  4957.             _onKeyPress: function(a) {
  4958.                 this._preventKeyPress && (a.preventDefault(), this._preventKeyPress = !1)
  4959.             },
  4960.             _setOptions: function(a) {
  4961.                 var b = !(a.filterReveal === c && a.filterCallback === c && a.children === c);
  4962.                 this._super(a), a.input !== c && (this._setInput(a.input), b = !0), b && this.refresh()
  4963.             },
  4964.             _destroy: function() {
  4965.                 var a = this.options,
  4966.                     b = this._getFilterableItems();
  4967.                 a.enhanced ? b.toggleClass("ui-screen-hidden", a.filterReveal) : b.removeClass("ui-screen-hidden")
  4968.             },
  4969.             refresh: function() {
  4970.                 this._timer && (b.clearTimeout(this._timer), this._timer = 0), this._filterItems((this._search && this._search.val() || "").toLowerCase())
  4971.             }
  4972.         })
  4973.     }(a),
  4974.     function(a, b) {
  4975.         var c = function(a, b) {
  4976.                 return function(c) {
  4977.                     b.call(this, c), a._syncTextInputOptions(c)
  4978.                 }
  4979.             },
  4980.             d = /(^|\s)ui-li-divider(\s|$)/,
  4981.             e = a.mobile.filterable.prototype.options.filterCallback;
  4982.         a.mobile.filterable.prototype.options.filterCallback = function(a, b) {
  4983.             return !this.className.match(d) && e.call(this, a, b)
  4984.         }, a.widget("mobile.filterable", a.mobile.filterable, {
  4985.             options: {
  4986.                 filterPlaceholder: "Filter items...",
  4987.                 filterTheme: null
  4988.             },
  4989.             _create: function() {
  4990.                 var b, c, d = this.element,
  4991.                     e = ["collapsibleset", "selectmenu", "controlgroup", "listview"],
  4992.                     f = {};
  4993.                 for (this._super(), a.extend(this, {
  4994.                         _widget: null
  4995.                     }), b = e.length - 1; b > -1; b--)
  4996.                     if (c = e[b], a.mobile[c]) {
  4997.                         if (this._setWidget(d.data("mobile-" + c))) break;
  4998.                         f[c + "create"] = "_handleCreate"
  4999.                     }
  5000.                 this._widget || this._on(d, f)
  5001.             },
  5002.             _handleCreate: function(a) {
  5003.                 this._setWidget(this.element.data("mobile-" + a.type.substring(0, a.type.length - 6)))
  5004.             },
  5005.             _trigger: function(a, b, c) {
  5006.                 return this._widget && "mobile-listview" === this._widget.widgetFullName && "beforefilter" === a && this._widget._trigger("beforefilter", b, c), this._super(a, b, c)
  5007.             },
  5008.             _setWidget: function(a) {
  5009.                 return !this._widget && a && (this._widget = a, this._widget._setOptions = c(this, this._widget._setOptions)), this._widget && (this._syncTextInputOptions(this._widget.options), "listview" === this._widget.widgetName && (this._widget.options.hideDividers = !0, this._widget.element.listview("refresh"))), !!this._widget
  5010.             },
  5011.             _isSearchInternal: function() {
  5012.                 return this._search && this._search.jqmData("ui-filterable-" + this.uuid + "-internal")
  5013.             },
  5014.             _setInput: function(b) {
  5015.                 var c = this.options,
  5016.                     d = !0,
  5017.                     e = {};
  5018.                 if (!b) {
  5019.                     if (this._isSearchInternal()) return;
  5020.                     d = !1, b = a("<input data-" + a.mobile.ns + "type='search' placeholder='" + c.filterPlaceholder + "'></input>").jqmData("ui-filterable-" + this.uuid + "-internal", !0), a("<form class='ui-filterable'></form>").append(b).submit(function(a) {
  5021.                         a.preventDefault(), b.blur()
  5022.                     }).insertBefore(this.element), a.mobile.textinput && (null != this.options.filterTheme && (e.theme = c.filterTheme), b.textinput(e))
  5023.                 }
  5024.                 this._super(b), this._isSearchInternal() && d && this._search.attr("placeholder", this.options.filterPlaceholder)
  5025.             },
  5026.             _setOptions: function(c) {
  5027.                 var d = this._super(c);
  5028.                 return c.filterPlaceholder !== b && this._isSearchInternal() && this._search.attr("placeholder", c.filterPlaceholder), c.filterTheme !== b && this._search && a.mobile.textinput && this._search.textinput("option", "theme", c.filterTheme), d
  5029.             },
  5030.             _refreshChildWidget: function() {
  5031.                 this._refreshingChildWidget = !0, this._superApply(arguments), this._refreshingChildWidget = !1
  5032.             },
  5033.             refresh: function() {
  5034.                 this._refreshingChildWidget || this._superApply(arguments)
  5035.             },
  5036.             _destroy: function() {
  5037.                 this._isSearchInternal() && this._search.remove(), this._super()
  5038.             },
  5039.             _syncTextInputOptions: function(c) {
  5040.                 var d, e = {};
  5041.                 if (this._isSearchInternal() && a.mobile.textinput) {
  5042.                     for (d in a.mobile.textinput.prototype.options) c[d] !== b && (e[d] = "theme" === d && null != this.options.filterTheme ? this.options.filterTheme : c[d]);
  5043.                     this._search.textinput("option", e)
  5044.                 }
  5045.             }
  5046.         }), a.widget("mobile.listview", a.mobile.listview, {
  5047.             options: {
  5048.                 filter: !1
  5049.             },
  5050.             _create: function() {
  5051.                 return this.options.filter !== !0 || this.element.data("mobile-filterable") || this.element.filterable(), this._super()
  5052.             },
  5053.             refresh: function() {
  5054.                 var a;
  5055.                 this._superApply(arguments), this.options.filter === !0 && (a = this.element.data("mobile-filterable"), a && a.refresh())
  5056.             }
  5057.         })
  5058.     }(a),
  5059.     function(a, b) {
  5060.         function c() {
  5061.             return ++e
  5062.         }
  5063.  
  5064.         function d(a) {
  5065.             return a.hash.length > 1 && decodeURIComponent(a.href.replace(f, "")) === decodeURIComponent(location.href.replace(f, ""))
  5066.         }
  5067.         var e = 0,
  5068.             f = /#.*$/;
  5069.         a.widget("ui.tabs", {
  5070.             version: "fadf2b312a05040436451c64bbfaf4814bc62c56",
  5071.             delay: 300,
  5072.             options: {
  5073.                 active: null,
  5074.                 collapsible: !1,
  5075.                 event: "click",
  5076.                 heightStyle: "content",
  5077.                 hide: null,
  5078.                 show: null,
  5079.                 activate: null,
  5080.                 beforeActivate: null,
  5081.                 beforeLoad: null,
  5082.                 load: null
  5083.             },
  5084.             _create: function() {
  5085.                 var b = this,
  5086.                     c = this.options;
  5087.                 this.running = !1, this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible", c.collapsible).delegate(".ui-tabs-nav > li", "mousedown" + this.eventNamespace, function(b) {
  5088.                     a(this).is(".ui-state-disabled") && b.preventDefault()
  5089.                 }).delegate(".ui-tabs-anchor", "focus" + this.eventNamespace, function() {
  5090.                     a(this).closest("li").is(".ui-state-disabled") && this.blur()
  5091.                 }), this._processTabs(), c.active = this._initialActive(), a.isArray(c.disabled) && (c.disabled = a.unique(c.disabled.concat(a.map(this.tabs.filter(".ui-state-disabled"), function(a) {
  5092.                     return b.tabs.index(a)
  5093.                 }))).sort()), this.active = this.options.active !== !1 && this.anchors.length ? this._findActive(c.active) : a(), this._refresh(), this.active.length && this.load(c.active)
  5094.             },
  5095.             _initialActive: function() {
  5096.                 var b = this.options.active,
  5097.                     c = this.options.collapsible,
  5098.                     d = location.hash.substring(1);
  5099.                 return null === b && (d && this.tabs.each(function(c, e) {
  5100.                     return a(e).attr("aria-controls") === d ? (b = c, !1) : void 0
  5101.                 }), null === b && (b = this.tabs.index(this.tabs.filter(".ui-tabs-active"))), (null === b || -1 === b) && (b = this.tabs.length ? 0 : !1)), b !== !1 && (b = this.tabs.index(this.tabs.eq(b)), -1 === b && (b = c ? !1 : 0)), !c && b === !1 && this.anchors.length && (b = 0), b
  5102.             },
  5103.             _getCreateEventData: function() {
  5104.                 return {
  5105.                     tab: this.active,
  5106.                     panel: this.active.length ? this._getPanelForTab(this.active) : a()
  5107.                 }
  5108.             },
  5109.             _tabKeydown: function(b) {
  5110.                 var c = a(this.document[0].activeElement).closest("li"),
  5111.                     d = this.tabs.index(c),
  5112.                     e = !0;
  5113.                 if (!this._handlePageNav(b)) {
  5114.                     switch (b.keyCode) {
  5115.                         case a.ui.keyCode.RIGHT:
  5116.                         case a.ui.keyCode.DOWN:
  5117.                             d++;
  5118.                             break;
  5119.                         case a.ui.keyCode.UP:
  5120.                         case a.ui.keyCode.LEFT:
  5121.                             e = !1, d--;
  5122.                             break;
  5123.                         case a.ui.keyCode.END:
  5124.                             d = this.anchors.length - 1;
  5125.                             break;
  5126.                         case a.ui.keyCode.HOME:
  5127.                             d = 0;
  5128.                             break;
  5129.                         case a.ui.keyCode.SPACE:
  5130.                             return b.preventDefault(), clearTimeout(this.activating), void this._activate(d);
  5131.                         case a.ui.keyCode.ENTER:
  5132.                             return b.preventDefault(), clearTimeout(this.activating), void this._activate(d === this.options.active ? !1 : d);
  5133.                         default:
  5134.                             return
  5135.                     }
  5136.                     b.preventDefault(), clearTimeout(this.activating), d = this._focusNextTab(d, e), b.ctrlKey || (c.attr("aria-selected", "false"), this.tabs.eq(d).attr("aria-selected", "true"), this.activating = this._delay(function() {
  5137.                         this.option("active", d)
  5138.                     }, this.delay))
  5139.                 }
  5140.             },
  5141.             _panelKeydown: function(b) {
  5142.                 this._handlePageNav(b) || b.ctrlKey && b.keyCode === a.ui.keyCode.UP && (b.preventDefault(), this.active.focus())
  5143.             },
  5144.             _handlePageNav: function(b) {
  5145.                 return b.altKey && b.keyCode === a.ui.keyCode.PAGE_UP ? (this._activate(this._focusNextTab(this.options.active - 1, !1)), !0) : b.altKey && b.keyCode === a.ui.keyCode.PAGE_DOWN ? (this._activate(this._focusNextTab(this.options.active + 1, !0)), !0) : void 0
  5146.             },
  5147.             _findNextTab: function(b, c) {
  5148.                 function d() {
  5149.                     return b > e && (b = 0), 0 > b && (b = e), b
  5150.                 }
  5151.                 for (var e = this.tabs.length - 1; - 1 !== a.inArray(d(), this.options.disabled);) b = c ? b + 1 : b - 1;
  5152.                 return b
  5153.             },
  5154.             _focusNextTab: function(a, b) {
  5155.                 return a = this._findNextTab(a, b), this.tabs.eq(a).focus(), a
  5156.             },
  5157.             _setOption: function(a, b) {
  5158.                 return "active" === a ? void this._activate(b) : "disabled" === a ? void this._setupDisabled(b) : (this._super(a, b), "collapsible" === a && (this.element.toggleClass("ui-tabs-collapsible", b), b || this.options.active !== !1 || this._activate(0)), "event" === a && this._setupEvents(b), void("heightStyle" === a && this._setupHeightStyle(b)))
  5159.             },
  5160.             _tabId: function(a) {
  5161.                 return a.attr("aria-controls") || "ui-tabs-" + c()
  5162.             },
  5163.             _sanitizeSelector: function(a) {
  5164.                 return a ? a.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&") : ""
  5165.             },
  5166.             refresh: function() {
  5167.                 var b = this.options,
  5168.                     c = this.tablist.children(":has(a[href])");
  5169.                 b.disabled = a.map(c.filter(".ui-state-disabled"), function(a) {
  5170.                     return c.index(a)
  5171.                 }), this._processTabs(), b.active !== !1 && this.anchors.length ? this.active.length && !a.contains(this.tablist[0], this.active[0]) ? this.tabs.length === b.disabled.length ? (b.active = !1, this.active = a()) : this._activate(this._findNextTab(Math.max(0, b.active - 1), !1)) : b.active = this.tabs.index(this.active) : (b.active = !1, this.active = a()), this._refresh()
  5172.             },
  5173.             _refresh: function() {
  5174.                 this._setupDisabled(this.options.disabled), this._setupEvents(this.options.event), this._setupHeightStyle(this.options.heightStyle), this.tabs.not(this.active).attr({
  5175.                     "aria-selected": "false",
  5176.                     tabIndex: -1
  5177.                 }), this.panels.not(this._getPanelForTab(this.active)).hide().attr({
  5178.                     "aria-expanded": "false",
  5179.                     "aria-hidden": "true"
  5180.                 }), this.active.length ? (this.active.addClass("ui-tabs-active ui-state-active").attr({
  5181.                     "aria-selected": "true",
  5182.                     tabIndex: 0
  5183.                 }), this._getPanelForTab(this.active).show().attr({
  5184.                     "aria-expanded": "true",
  5185.                     "aria-hidden": "false"
  5186.                 })) : this.tabs.eq(0).attr("tabIndex", 0)
  5187.             },
  5188.             _processTabs: function() {
  5189.                 var b = this;
  5190.                 this.tablist = this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role", "tablist"), this.tabs = this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({
  5191.                     role: "tab",
  5192.                     tabIndex: -1
  5193.                 }), this.anchors = this.tabs.map(function() {
  5194.                     return a("a", this)[0]
  5195.                 }).addClass("ui-tabs-anchor").attr({
  5196.                     role: "presentation",
  5197.                     tabIndex: -1
  5198.                 }), this.panels = a(), this.anchors.each(function(c, e) {
  5199.                     var f, g, h, i = a(e).uniqueId().attr("id"),
  5200.                         j = a(e).closest("li"),
  5201.                         k = j.attr("aria-controls");
  5202.                     d(e) ? (f = e.hash, g = b.element.find(b._sanitizeSelector(f))) : (h = b._tabId(j), f = "#" + h, g = b.element.find(f), g.length || (g = b._createPanel(h), g.insertAfter(b.panels[c - 1] || b.tablist)), g.attr("aria-live", "polite")), g.length && (b.panels = b.panels.add(g)), k && j.data("ui-tabs-aria-controls", k), j.attr({
  5203.                         "aria-controls": f.substring(1),
  5204.                         "aria-labelledby": i
  5205.                     }), g.attr("aria-labelledby", i)
  5206.                 }), this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role", "tabpanel")
  5207.             },
  5208.             _getList: function() {
  5209.                 return this.element.find("ol,ul").eq(0)
  5210.             },
  5211.             _createPanel: function(b) {
  5212.                 return a("<div>").attr("id", b).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy", !0)
  5213.             },
  5214.             _setupDisabled: function(b) {
  5215.                 a.isArray(b) && (b.length ? b.length === this.anchors.length && (b = !0) : b = !1);
  5216.                 for (var c, d = 0; c = this.tabs[d]; d++) b === !0 || -1 !== a.inArray(d, b) ? a(c).addClass("ui-state-disabled").attr("aria-disabled", "true") : a(c).removeClass("ui-state-disabled").removeAttr("aria-disabled");
  5217.                 this.options.disabled = b
  5218.             },
  5219.             _setupEvents: function(b) {
  5220.                 var c = {
  5221.                     click: function(a) {
  5222.                         a.preventDefault()
  5223.                     }
  5224.                 };
  5225.                 b && a.each(b.split(" "), function(a, b) {
  5226.                     c[b] = "_eventHandler"
  5227.                 }), this._off(this.anchors.add(this.tabs).add(this.panels)), this._on(this.anchors, c), this._on(this.tabs, {
  5228.                     keydown: "_tabKeydown"
  5229.                 }), this._on(this.panels, {
  5230.                     keydown: "_panelKeydown"
  5231.                 }), this._focusable(this.tabs), this._hoverable(this.tabs)
  5232.             },
  5233.             _setupHeightStyle: function(b) {
  5234.                 var c, d = this.element.parent();
  5235.                 "fill" === b ? (c = d.height(), c -= this.element.outerHeight() - this.element.height(), this.element.siblings(":visible").each(function() {
  5236.                     var b = a(this),
  5237.                         d = b.css("position");
  5238.                     "absolute" !== d && "fixed" !== d && (c -= b.outerHeight(!0))
  5239.                 }), this.element.children().not(this.panels).each(function() {
  5240.                     c -= a(this).outerHeight(!0)
  5241.                 }), this.panels.each(function() {
  5242.                     a(this).height(Math.max(0, c - a(this).innerHeight() + a(this).height()))
  5243.                 }).css("overflow", "auto")) : "auto" === b && (c = 0, this.panels.each(function() {
  5244.                     c = Math.max(c, a(this).height("").height())
  5245.                 }).height(c))
  5246.             },
  5247.             _eventHandler: function(b) {
  5248.                 var c = this.options,
  5249.                     d = this.active,
  5250.                     e = a(b.currentTarget),
  5251.                     f = e.closest("li"),
  5252.                     g = f[0] === d[0],
  5253.                     h = g && c.collapsible,
  5254.                     i = h ? a() : this._getPanelForTab(f),
  5255.                     j = d.length ? this._getPanelForTab(d) : a(),
  5256.                     k = {
  5257.                         oldTab: d,
  5258.                         oldPanel: j,
  5259.                         newTab: h ? a() : f,
  5260.                         newPanel: i
  5261.                     };
  5262.                 b.preventDefault(), f.hasClass("ui-state-disabled") || f.hasClass("ui-tabs-loading") || this.running || g && !c.collapsible || this._trigger("beforeActivate", b, k) === !1 || (c.active = h ? !1 : this.tabs.index(f), this.active = g ? a() : f, this.xhr && this.xhr.abort(), j.length || i.length || a.error("jQuery UI Tabs: Mismatching fragment identifier."), i.length && this.load(this.tabs.index(f), b), this._toggle(b, k))
  5263.             },
  5264.             _toggle: function(b, c) {
  5265.                 function d() {
  5266.                     f.running = !1, f._trigger("activate", b, c)
  5267.                 }
  5268.  
  5269.                 function e() {
  5270.                     c.newTab.closest("li").addClass("ui-tabs-active ui-state-active"), g.length && f.options.show ? f._show(g, f.options.show, d) : (g.show(), d())
  5271.                 }
  5272.                 var f = this,
  5273.                     g = c.newPanel,
  5274.                     h = c.oldPanel;
  5275.                 this.running = !0, h.length && this.options.hide ? this._hide(h, this.options.hide, function() {
  5276.                     c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), e()
  5277.                 }) : (c.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"), h.hide(), e()), h.attr({
  5278.                     "aria-expanded": "false",
  5279.                     "aria-hidden": "true"
  5280.                 }), c.oldTab.attr("aria-selected", "false"), g.length && h.length ? c.oldTab.attr("tabIndex", -1) : g.length && this.tabs.filter(function() {
  5281.                     return 0 === a(this).attr("tabIndex")
  5282.                 }).attr("tabIndex", -1), g.attr({
  5283.                     "aria-expanded": "true",
  5284.                     "aria-hidden": "false"
  5285.                 }), c.newTab.attr({
  5286.                     "aria-selected": "true",
  5287.                     tabIndex: 0
  5288.                 })
  5289.             },
  5290.             _activate: function(b) {
  5291.                 var c, d = this._findActive(b);
  5292.                 d[0] !== this.active[0] && (d.length || (d = this.active), c = d.find(".ui-tabs-anchor")[0], this._eventHandler({
  5293.                     target: c,
  5294.                     currentTarget: c,
  5295.                     preventDefault: a.noop
  5296.                 }))
  5297.             },
  5298.             _findActive: function(b) {
  5299.                 return b === !1 ? a() : this.tabs.eq(b)
  5300.             },
  5301.             _getIndex: function(a) {
  5302.                 return "string" == typeof a && (a = this.anchors.index(this.anchors.filter("[href$='" + a + "']"))), a
  5303.             },
  5304.             _destroy: function() {
  5305.                 this.xhr && this.xhr.abort(), this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"), this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"), this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(), this.tabs.add(this.panels).each(function() {
  5306.                     a.data(this, "ui-tabs-destroy") ? a(this).remove() : a(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")
  5307.                 }), this.tabs.each(function() {
  5308.                     var b = a(this),
  5309.                         c = b.data("ui-tabs-aria-controls");
  5310.                     c ? b.attr("aria-controls", c).removeData("ui-tabs-aria-controls") : b.removeAttr("aria-controls")
  5311.                 }), this.panels.show(), "content" !== this.options.heightStyle && this.panels.css("height", "")
  5312.             },
  5313.             enable: function(c) {
  5314.                 var d = this.options.disabled;
  5315.                 d !== !1 && (c === b ? d = !1 : (c = this._getIndex(c), d = a.isArray(d) ? a.map(d, function(a) {
  5316.                     return a !== c ? a : null
  5317.                 }) : a.map(this.tabs, function(a, b) {
  5318.                     return b !== c ? b : null
  5319.                 })), this._setupDisabled(d))
  5320.             },
  5321.             disable: function(c) {
  5322.                 var d = this.options.disabled;
  5323.                 if (d !== !0) {
  5324.                     if (c === b) d = !0;
  5325.                     else {
  5326.                         if (c = this._getIndex(c), -1 !== a.inArray(c, d)) return;
  5327.                         d = a.isArray(d) ? a.merge([c], d).sort() : [c]
  5328.                     }
  5329.                     this._setupDisabled(d)
  5330.                 }
  5331.             },
  5332.             load: function(b, c) {
  5333.                 b = this._getIndex(b);
  5334.                 var e = this,
  5335.                     f = this.tabs.eq(b),
  5336.                     g = f.find(".ui-tabs-anchor"),
  5337.                     h = this._getPanelForTab(f),
  5338.                     i = {
  5339.                         tab: f,
  5340.                         panel: h
  5341.                     };
  5342.                 d(g[0]) || (this.xhr = a.ajax(this._ajaxSettings(g, c, i)), this.xhr && "canceled" !== this.xhr.statusText && (f.addClass("ui-tabs-loading"), h.attr("aria-busy", "true"), this.xhr.success(function(a) {
  5343.                     setTimeout(function() {
  5344.                         h.html(a), e._trigger("load", c, i)
  5345.                     }, 1)
  5346.                 }).complete(function(a, b) {
  5347.                     setTimeout(function() {
  5348.                         "abort" === b && e.panels.stop(!1, !0), f.removeClass("ui-tabs-loading"), h.removeAttr("aria-busy"), a === e.xhr && delete e.xhr
  5349.                     }, 1)
  5350.                 })))
  5351.             },
  5352.             _ajaxSettings: function(b, c, d) {
  5353.                 var e = this;
  5354.                 return {
  5355.                     url: b.attr("href"),
  5356.                     beforeSend: function(b, f) {
  5357.                         return e._trigger("beforeLoad", c, a.extend({
  5358.                             jqXHR: b,
  5359.                             ajaxSettings: f
  5360.                         }, d))
  5361.                     }
  5362.                 }
  5363.             },
  5364.             _getPanelForTab: function(b) {
  5365.                 var c = a(b).attr("aria-controls");
  5366.                 return this.element.find(this._sanitizeSelector("#" + c))
  5367.             }
  5368.         })
  5369.     }(a),
  5370.     function() {}(a),
  5371.     function(a, b) {
  5372.         function c(a) {
  5373.             e = a.originalEvent, i = e.accelerationIncludingGravity, f = Math.abs(i.x), g = Math.abs(i.y), h = Math.abs(i.z), !b.orientation && (f > 7 || (h > 6 && 8 > g || 8 > h && g > 6) && f > 5) ? d.enabled && d.disable() : d.enabled || d.enable()
  5374.         }
  5375.         a.mobile.iosorientationfixEnabled = !0;
  5376.         var d, e, f, g, h, i, j = navigator.userAgent;
  5377.         return /iPhone|iPad|iPod/.test(navigator.platform) && /OS [1-5]_[0-9_]* like Mac OS X/i.test(j) && j.indexOf("AppleWebKit") > -1 ? (d = a.mobile.zoom, void a.mobile.document.on("mobileinit", function() {
  5378.             a.mobile.iosorientationfixEnabled && a.mobile.window.bind("orientationchange.iosorientationfix", d.enable).bind("devicemotion.iosorientationfix", c)
  5379.         })) : void(a.mobile.iosorientationfixEnabled = !1)
  5380.     }(a, this),
  5381.     function(a, b, d) {
  5382.         function e() {
  5383.             f.removeClass("ui-mobile-rendering")
  5384.         }
  5385.         var f = a("html"),
  5386.             g = a.mobile.window;
  5387.         a(b.document).trigger("mobileinit"), a.mobile.gradeA() && (a.mobile.ajaxBlacklist && (a.mobile.ajaxEnabled = !1), f.addClass("ui-mobile ui-mobile-rendering"), setTimeout(e, 5e3), a.extend(a.mobile, {
  5388.             initializePage: function() {
  5389.                 var b = a.mobile.path,
  5390.                     f = a(":jqmData(role='page'), :jqmData(role='dialog')"),
  5391.                     h = b.stripHash(b.stripQueryParams(b.parseLocation().hash)),
  5392.                     i = a.mobile.path.parseLocation(),
  5393.                     j = h ? c.getElementById(h) : d;
  5394.                 f.length || (f = a("body").wrapInner("<div data-" + a.mobile.ns + "role='page'></div>").children(0)), f.each(function() {
  5395.                     var c = a(this);
  5396.                     c[0].getAttribute("data-" + a.mobile.ns + "url") || c.attr("data-" + a.mobile.ns + "url", c.attr("id") || b.convertUrlToDataUrl(i.pathname + i.search))
  5397.                 }), a.mobile.firstPage = f.first(), a.mobile.pageContainer = a.mobile.firstPage.parent().addClass("ui-mobile-viewport").pagecontainer(), a.mobile.navreadyDeferred.resolve(), g.trigger("pagecontainercreate"), a.mobile.loading("show"), e(), a.mobile.hashListeningEnabled && a.mobile.path.isHashValid(location.hash) && (a(j).is(":jqmData(role='page')") || a.mobile.path.isPath(h) || h === a.mobile.dialogHashKey) ? a.event.special.navigate.isPushStateEnabled() ? (a.mobile.navigate.history.stack = [], a.mobile.navigate(a.mobile.path.isPath(location.hash) ? location.hash : location.href)) : g.trigger("hashchange", [!0]) : (a.event.special.navigate.isPushStateEnabled() && a.mobile.navigate.navigator.squash(b.parseLocation().href), a.mobile.changePage(a.mobile.firstPage, {
  5398.                     transition: "none",
  5399.                     reverse: !0,
  5400.                     changeHash: !1,
  5401.                     fromHashChange: !0
  5402.                 }))
  5403.             }
  5404.         }), a(function() {
  5405.             a.support.inlineSVG(), a.mobile.hideUrlBar && b.scrollTo(0, 1), a.mobile.defaultHomeScroll = a.support.scrollTop && 1 !== a.mobile.window.scrollTop() ? 1 : 0, a.mobile.autoInitializePage && a.mobile.initializePage(), a.mobile.hideUrlBar && g.load(a.mobile.silentScroll), a.support.cssPointerEvents || a.mobile.document.delegate(".ui-state-disabled,.ui-disabled", "vclick", function(a) {
  5406.                 a.preventDefault(), a.stopImmediatePropagation()
  5407.             })
  5408.         }))
  5409.     }(a, this)
  5410. });
  5411. //# sourceMappingURL=jquery.mobile-1.4.4.min.map
Add Comment
Please, Sign In to add comment