text: /*
   * Copyright (c) 2015 Samsung Electronics Co., Ltd
   *
   * Licensed under the Flora License, Version 1.1 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *     http://floralicense.org/license/
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  !function(a,b,c){var d=a.tau=a.tau||{},e=a.tauConfig=a.tauConfig||{};e.rootNamespace="tau",e.fileName="tau",d.version="0.12.7",function(a,b,d){"use strict";var e=0,f=+new Date,g=[].slice,h=d.rootNamespace,i=d.fileName,j=function(a){var b=new Date;a.unshift("["+h+"]["+b.toLocaleString()+"]")};b.getUniqueId=function(){return h+"-"+b.getNumberUniqueId()+"-"+f},b.getNumberUniqueId=function(){return e++},b.log=function(){var a=g.call(arguments);j(a),console},b.warn=function(){var a=g.call(arguments);j(a),console},b.error=function(){var a=g.call(arguments);j(a),console},b.getConfig=function(a,b){return d[a]===c?b:d[a]},b.setConfig=function(a,b,e){(!e||e&&d[a]===c)&&(d[a]=b)},b.getFrameworkPath=function(){var b,c,d,e,f=a.getElementsByTagName("script"),g=f.length;for(b=0;g>b;b++)if(c=f[b].src,d=c.split("/"),e=d.length,d[e-1]===i+".js"||d[e-1]===i+".min.js")return d.slice(0,e-1).join("/");return null}}(a.document,d,e),function(a){"use strict";a.defaults={},Object.defineProperty(a.defaults,"autoInitializePage",{get:function(){return a.getConfig("autoInitializePage",!0)},set:function(b){return a.setConfig("autoInitializePage",b)}}),Object.defineProperty(a.defaults,"dynamicBaseEnabled",{get:function(){return a.getConfig("dynamicBaseEnabled",!0)},set:function(b){return a.setConfig("dynamicBaseEnabled",b)}}),Object.defineProperty(a.defaults,"pageTransition",{get:function(){return a.getConfig("pageTransition","none")},set:function(b){return a.setConfig("pageTransition",b)}}),Object.defineProperty(a.defaults,"popupTransition",{get:function(){return a.getConfig("popupTransition","none")},set:function(b){return a.setConfig("popupTransition",b)}}),Object.defineProperty(a.defaults,"popupFullSize",{get:function(){return a.getConfig("popupFullSize",!1)},set:function(b){return a.setConfig("popupFullSize",b)}}),Object.defineProperty(a.defaults,"enablePageScroll",{get:function(){return a.getConfig("enablePageScroll",!1)},set:function(b){return a.setConfig("enablePageScroll",b)}}),Object.defineProperty(a.defaults,"scrollEndEffectArea",{get:function(){return a.getConfig("scrollEndEffectArea","content")},set:function(b){return a.setConfig("scrollEndEffectArea",b)}}),Object.defineProperty(a.defaults,"enablePopupScroll",{get:function(){return a.getConfig("enablePopupScroll",!1)},set:function(b){return a.setConfig("enablePopupScroll",b)}})}(d),function(a){"use strict";a.setConfig("rootDir",a.getFrameworkPath(),!0),a.setConfig("version",""),a.setConfig("allowCrossDomainPages",!1,!0),a.setConfig("domCache",!1,!0)}(d),function(a,b,c){"use strict";function d(){var a,c=b.createElement("div"),d=b.createElement("body"),e=b.getElementsByTagName("html")[0],f=getComputedStyle(c);return c.classList.add("is-circle-test"),d.appendChild(c),e.insertBefore(d,e.firstChild),a="1px"===f.width,e.removeChild(d),a}var e=!("undefined"==typeof tizen);c.support={cssTransitions:!0,mediaquery:!0,cssPseudoElement:!0,touchOverflow:!0,cssTransform3d:!0,boxShadow:!0,scrollTop:0,dynamicBaseTag:!0,cssPointerEvents:!1,boundingRect:!0,browser:{ie:!1,tizen:e},shape:{circle:e?a.matchMedia("(-tizen-geometric-shape: circle)").matches:d()},gradeA:function(){return!0}}}(a,a.document,d),function(a){"use strict";a.setConfig("autoBuildOnPageChange",!1,!0),a.setConfig("pageTransition","pop"),a.setConfig("popupTransition","slideup"),a.setConfig("enablePageScroll",!0),a.setConfig("enablePopupScroll",!0)}(d),function(a,b,c){"use strict";function d(a,b){var c,d=new XMLHttpRequest;return d.open("get",a,!1),b&&d.overrideMimeType(b),d.send(),4===d.readyState&&(c=d.status,200===c||0===c&&d.responseText)?d.responseText:null}function e(a){for(var b,c=l.call(a.querySelectorAll("script[src]")),d=c.length;--d>=0;)b=c[d],b.parentNode.removeChild(b);return c}function f(b){return function(){try{a.eval(b)}catch(c){"undefined"!=typeof console&&(c.stack||c.name&&c.message)}}}function g(b){var c,d=b.length;for(c=0;d>c;++c)b[c].call(a)}function h(a,c){var e,g,h,i,j=[];for(h=0,i=a.length;i>h;++h)g=d(a[h].src,"text/plain"),g&&(e=b.adoptNode(a[h]),e.setAttribute("data-src",a[h].src),e.removeAttribute("src"),j.push(f(g)),c&&c.appendChild(e));return j}var i=null,j=(a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(b){i=a.setTimeout(b.bind(b,+new Date),1e3/60)}).bind(a),k=c.util||{},l=[].slice;k.fetchSync=d,k.safeEvalWrap=f,k.batchCall=g,k.requestAnimationFrame=j,k.cancelAnimationFrame=(a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.mozCancelAnimationFrame||a.oCancelAnimationFrame||a.msCancelAnimationFrame||function(){a.clearTimeout(i)}).bind(a),k.async=j,k.importEvaluateAndAppendElement=function(a,c){var d=h(e(a),a),f=b.importNode(a,!0);return c.appendChild(f),g(d),f},k.isNumber=function(a){var b=parseFloat(a);return!isNaN(b)&&isFinite(b)},k.runScript=function(a,c){var e,f,g=b.createElement("script"),h=null,i=l.call(c.attributes),j=c.getAttribute("src"),m=k.path;for(null!==j&&(j=m.makeUrlAbsolute(j,a)),e=i.length;--e>=0;)f=i[e],"src"!==f.name?g.setAttribute(f.name,f.value):g.setAttribute("data-src",f.value);h=j?d(j,"text/plain"):c.textContent,h&&(g.src=URL.createObjectURL(new Blob([h],{type:"text/javascript"})),g.textContent=h),c.parentNode.replaceChild(g,c)},c.util=k}(a,a.document,d),function(a,b,d){"use strict";function e(a,b,c){var d,e,f,g=[],h=c||1,i=!1;if(isNaN(a)||isNaN(b)?isNaN(a)&&isNaN(b)?(i=!0,d=a.charCodeAt(0),e=b.charCodeAt(0)):(d=isNaN(a)?0:a,e=isNaN(b)?0:b):(d=a,e=b),f=e>=d)for(;e>=d;)g.push(i?String.fromCharCode(d):d),d+=h;else for(;d>=e;)g.push(i?String.fromCharCode(d):d),d-=h;return g}function f(a){var b=typeof a,c=a&&a.length;return a&&a!==a.window?Array.isArray(a)||a instanceof NodeList||"function"===b&&(0===c||"number"==typeof c&&c>0&&c-1 in a):!1}function g(a,b){var c,d;for(a instanceof Array||(a=[].slice.call(a)),d=a.length,c=0;d>c;c++)b(a[c],c,a)}function h(a,b){var c,d,e,f=[];for(a instanceof Array||(a=[].slice.call(a)),d=a.length,c=0;d>c;c++)e=a[c],b(e,c,a)&&f.push(e);return f}function i(a,b){var c,d,e=[];for(a instanceof Array||(a=[].slice.call(a)),d=a.length,c=0;d>c;c++)e.push(b(a[c],c,a));return e}function j(a,b,d){var e,f,g,h=d;for(a instanceof Array||(a=[].slice.call(a)),f=a.length,e=0;f>e;e++)g=a[e],h=h===c&&0===e?g:b(h,g,e,a);return h}d.util.array={range:e,isArrayLike:f,forEach:g,filter:h,map:i,reduce:j}}(a,a.document,d),function(a,d){"use strict";var e=Array.isArray,f=d.util.array.isArrayLike,g=/\s+/g,h=function(a){return a.trim()},i=function(a,b){var c,d,f=[];if("string"==typeof a&&(a=a.split(g).map(h)),e(a))for(d=0;d<a.length;d++)f.push({type:a[d],callback:b});else for(c in a)a.hasOwnProperty(c)&&f.push({type:c,callback:a[c]});return f};d.event={trigger:function(a,b,c,d,e){var f=new CustomEvent(b,{detail:c,bubbles:"boolean"==typeof d?d:!0,cancelable:"boolean"==typeof e?e:!0});return a.dispatchEvent(f)},preventDefault:function(a){var b=a._originalEvent;b&&b.preventDefault&&b.preventDefault(),a.preventDefault()},stopPropagation:function(a){var b=a._originalEvent;b&&b.stopPropagation&&b.stopPropagation(),a.stopPropagation()},stopImmediatePropagation:function(a){var b=a._originalEvent;b&&b.stopImmediatePropagation&&b.stopImmediatePropagation(),a.stopImmediatePropagation()},documentRelativeCoordsFromEvent:function(c){var d,e=c?c:a.event,f={x:e.clientX,y:e.clientY},g={x:e.pageX,y:e.pageY},h=0,i=0,j=b.body,k=b.documentElement;return c.type.match(/^touch/)&&(d=e.targetTouches[0]||e.originalEvent.targetTouches[0],g={x:d.pageX,y:d.pageY},f={x:d.clientX,y:d.clientY}),g.x||g.y?(h=g.x,i=g.y):(f.x||f.y)&&(h=f.x+j.scrollLeft+k.scrollLeft,i=f.y+j.scrollTop+k.scrollTop),{x:h,y:i}},targetRelativeCoordsFromEvent:function(a){var b=a.target,e={x:a.offsetX,y:a.offsetY};return(e.x===c||isNaN(e.x)||e.y===c||isNaN(e.y))&&(e=d.event.documentRelativeCoordsFromEvent(a),e.x-=b.offsetLeft,e.y-=b.offsetTop),e},fastOn:function(a,b,c,d){a.addEventListener(b,c,d||!1)},fastOff:function(a,b,c,d){a.removeEventListener(b,c,d||!1)},prefixedFastOn:function(a,b,c,d){var e=b.charAt(0).toLocaleUpperCase()+b.substring(1);a.addEventListener(b.toLowerCase(),c,d||!1),a.addEventListener("webkit"+e,c,d||!1),a.addEventListener("moz"+e,c,d||!1),a.addEventListener("ms"+e,c,d||!1),a.addEventListener("o"+e.toLowerCase(),c,d||!1)},prefixedFastOff:function(a,b,c,d){var e=b.charAt(0).toLocaleUpperCase()+b.substring(1);a.removeEventListener(b.toLowerCase(),c,d||!1),a.removeEventListener("webkit"+e,c,d||!1),a.removeEventListener("moz"+e,c,d||!1),a.removeEventListener("ms"+e,c,d||!1),a.removeEventListener("o"+e.toLowerCase(),c,d||!1)},on:function(a,b,c,e){var g,h,j,k,l,m;for(l=f(a)?a:[a],j=l.length,m=i(b,c),k=m.length,g=0;j>g;g++)if("function"==typeof l[g].addEventListener)for(h=0;k>h;h++)d.event.fastOn(l[g],m[h].type,m[h].callback,e)},off:function(a,b,c,e){var g,h,j,k,l,m;for(l=f(a)?a:[a],j=l.length,m=i(b,c),k=m.length,g=0;j>g;g++)if("function"==typeof l[g].addEventListener)for(h=0;k>h;h++)d.event.fastOff(l[g],m[h].type,m[h].callback,e)},one:function(a,b,c,e){var g,h,j,k,l,m,n=[].slice,o=[];for(l=f(a)?n.call(a):[a],j=l.length,m=i(b,c),k=m.length,g=0;j>g;g++)if("function"==typeof l[g].addEventListener)for(o[g]=[],h=0;k>h;h++)o[g][h]=function(a,b){var c=n.call(arguments);d.event.fastOff(l[a],m[b].type,o[a][b],e),c.shift(),c.shift(),m[b].callback.apply(this,c)}.bind(null,g,h),d.event.fastOn(l[g],m[h].type,o[g][h],e)}}}(a,d),function(a,b,c){"use strict";var d=c.event,e={profile:"default",theme:"default",version:c.version,refreshTheme:function(c){var e=b.createElement("span"),f=b.body,g=null;return"interactive"!==b.readyState&&"complete"!==b.readyState?(d.fastOn(b,"DOMContentLoaded",this.refreshTheme.bind(this,c)),null):(e.classList.add("tau-info-theme"),f.appendChild(e),g=a.getComputedStyle(e,":after").content,f.removeChild(e),g&&g.length>0&&(this.theme=g),g=g||null,c&&c(g),g)}};e.refreshTheme(),c.info=e}(a,a.document,d),function(b,c){"use strict";function d(a){var b=c.getConfig("namespace");return"[data-"+(b?b+"-":"")+a+"]"}function e(a,b){return l&&a[l]?a[l](b):!1}function f(a){for(var c=[],d=a.parentNode;d&&d!==b;)c.push(d),d=d.parentNode;return c}function g(a,c){for(var d=a;d&&d!==b;){if(c(d))return d;d=d.parentNode}return null}function h(a,b){return e(b,a)}function i(a,b){return b&&b.classList&&b.classList.contains(a)}function j(a,b){return b.tagName.toLowerCase()===a}var k=[].slice,l=function(){var a=b.createElement("div");return"function"==typeof a.webkitMatchesSelector?"webkitMatchesSelector":"function"==typeof a.mozMatchesSelector?"mozMatchesSelector":"function"==typeof a.msMatchesSelector?"msMatchesSelector":"function"==typeof a.matchesSelector?"matchesSelector":"function"==typeof a.matches?"matches":!1}();c.util.selectors={matchesSelector:e,getChildrenBySelector:function(a,b){return k.call(a.children).filter(h.bind(null,b))},getChildrenByDataNS:function(a,b){return k.call(a.children).filter(h.bind(null,d(b)))},getChildrenByClass:function(a,b){return k.call(a.children).filter(i.bind(null,b))},getChildrenByTag:function(a,b){return k.call(a.children).filter(j.bind(null,b))},getParents:f,getParentsBySelector:function(a,b){return f(a).filter(h.bind(null,b))},getParentsBySelectorNS:function(a,b){return f(a).filter(h.bind(null,d(b)))},getParentsByClass:function(a,b){return f(a).filter(i.bind(null,b))},getParentsByTag:function(a,b){return f(a).filter(j.bind(null,b))},getClosestBySelector:function(a,b){return g(a,h.bind(null,b))},getClosestBySelectorNS:function(a,b){return g(a,h.bind(null,d(b)))},getClosestByClass:function(a,b){return g(a,i.bind(null,b))},getClosestByTag:function(a,b){return g(a,j.bind(null,b))},getAllByDataNS:function(a,b){return k.call(a.querySelectorAll(d(b)))},getScrollableParent:function(c){for(var d,e;c&&c!=b.body;){if(e=a.getComputedStyle(c),e&&(d=e.getPropertyValue("overflow-y"),"scroll"===d||"auto"===d&&c.scrollHeight>c.clientHeight))return c;c=c.parentNode}return null}}}(a.document,d),function(a){"use strict";var b={copy:function(a){return b.merge({},a)},fastMerge:function(a,b){var c;for(c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a},merge:function(){var a,b,d,e,f,g=[].slice.call(arguments),h=g.length;for(a=g.shift(),d=!0,"boolean"==typeof arguments[h-1]&&(d=arguments[h-1],h--),f=0;h>f;f++)if(b=g.shift(),null!==b)for(e in b)b.hasOwnProperty(e)&&(d||a[e]===c)&&(a[e]=b[e]);return a},inherit:function(a,b,c){var d,e,f=new b;for(d in c)c.hasOwnProperty(d)&&(e=c[d],"function"==typeof e?f[d]=function(a,b,c){var d=function(){var c=a.prototype[b];return c?c.apply(this,arguments):null};return function(){var a,b=this._super;return this._super=d,a=c.apply(this,arguments),this._super=b,a}}(b,d,e):f[d]=e);a.prototype=f,a.prototype.constructor=a},hasPropertiesOfValue:function(a,b){var c=Object.keys(a),d=c.length;if(0===d)return!1;for(;--d>=0;)if(a[c[d]]!==b)return!1;return!0},removeProperties:function(a,b){var c,d,e=b.length;for(d=0;e>d;d++)c=b[d],a.hasOwnProperty(c)&&delete a[c];return a}};a.util.object=b}(d),function(a,b,d){"use strict";function e(a){return a.match(/\[data-role=/)&&!a.match(/:not\(\[data-role=/)?a.trim():a.trim()+":not([data-role='none'])"}function f(a,f,g,h,i,j,k){var l;if(a){if(!J[a]||j)return g=g||[],g.push("destroy","disable","enable","option","refresh","value"),l={name:a,methods:g,selector:f||"",selectors:f?f.split(",").map(e):[],widgetClass:h||null,namespace:i||"",widgetNameToLowercase:k===c?!0:!!k},J[a]=l,G.trigger(b,"widgetdefined",l,!1),!0}else d.error("Widget with selector ["+f+"] defined without a name, aborting!");return!1}function g(a,c){var d,e,f,g=a&&typeof a!==N?a.id:a;return typeof a===N&&(a=b.getElementById(g)),d=K[g],d&&"object"==typeof d&&(c?e=d.instances[c]:(f=Object.keys(d.instances),e=d.instances[f[0]]),e&&e.element===a)?e:null}function h(a){var b=a.element.id,c=a.name,d=K[b];d||(d={elementId:b,element:a.element,instances:{}}),d.instances[c]=a,K[b]=d}function i(a){var b=a&&typeof a!==N?a.id:a;return K[b]&&K[b].instances||null}function j(a,b){var c,d;return c=b.split(S),d=c.indexOf(a),d>-1&&(c.splice(d,1),b=c.join(S)),b}function k(a){a.removeAttribute(P),a.removeAttribute(R),a.removeAttribute(Q)}function l(a,b){var c,d,e;b?(c=j(b,a.getAttribute(P)||""),d=j(b,a.getAttribute(R)||""),e=j(b,a.getAttribute(Q)||""),c&&d&&e?(a.setAttribute(P,c),a.setAttribute(R,d),a.setAttribute(Q,e)):k(a)):k(a)}function m(a,b){var c=a[b];return c?(c.element&&typeof c.element.setAttribute===O&&l(c.element,b),a[b]=null,!0):!1}function n(a,b){var c,d,e,f=typeof a===N?a:a.id,g=K[f],h=!1;if(g&&(typeof a===N&&(a=g.element),a&&l(a,b),c=K[f]&&K[f].instances)){if(!b){h=!0;for(d in c)c.hasOwnProperty(d)&&(e=m(c,d),c[d]=null,h=h&&e);return H.hasPropertiesOfValue(c,null)&&(K[f]=null),h}return e=m(c,b),H.hasPropertiesOfValue(c,null)&&(K[f]=null),e}return!1}function o(a){return n(a)}function p(a,c){return(!a||!a instanceof HTMLElement)&&(a=typeof c.createEmptyElement===O?c.createEmptyElement():b.createElement("div")),a}function q(a,c,d){var e,f,i,j,k=d||{},l=k.create,m=c.widgetClass;return a=p(a,m),e=m?new m(a):!1,i=I.getParentsBySelectorNS(a,"enhance=false"),j=g(a,c.name),j&&j.element===a?j.element:(e&&!i.length&&(e.configure(c,a,d),typeof l===O&&G.one(a,c.name.toLowerCase()+"create",l),a.id&&(e.id=a.id),f=a.getAttribute(P),(!f||f&&-1===f.split(S).indexOf(e.name))&&(a=e.build(a)),a&&(e.element=a,h(e),e.trigger(V.WIDGET_BUILT,e,!1),M||e.init(a),e.bindEvents(a,M),G.trigger(a,V.WIDGET_BOUND,e,!1),G.trigger(b,V.WIDGET_BOUND,e))),e.element)}function r(a,c){var d;typeof a===N&&(a=b.getElementById(a)),d=g(a,c),d&&(d.destroy(),d.trigger("widgetdestroyed"),n(a,c))}function s(a,c){var d,e,f,g,h;if(typeof a===N&&(a=b.getElementById(a)),!c){f=i(a);for(d in f)f.hasOwnProperty(d)&&(e=f[d],e&&(e.destroy(),e.trigger("widgetdestroyed")))}for(g=F.call(a.querySelectorAll("["+R+"]")),h=g.length-1;h>=0;h-=1)g[h]&&s(g[h],!1);o(a)}function t(a,b,c){var d=a&&a.getAttribute(Q)||b&&b.name;return b=b||d&&J[d]||{name:d},q(a,b,c)}function u(a,b){var c=Node.DOCUMENT_POSITION_CONTAINS|Node.DOCUMENT_POSITION_PRECEDING;return a.element===b.element?0:a.element.compareDocumentPosition(b.element)&c?1:-1}function v(a){t(a.element||a,J[a.widgetName])}function w(a){var c,d,e,f,g,h,i=F.call(a.querySelectorAll(T)),j=[],k=[],l=Object.keys(J),m=l.length;for(i.forEach(v),d=0;m>d;++d)if(g=l[d],f=J[g],h=f.selectors,h.length)for(c=U(g),j=F.call(a.querySelectorAll(h.join(c+",")+c)),e=j.length;--e>=0;)k.push({element:j[e],widgetName:g});k.sort(u),k.forEach(v),G.trigger(b,"built"),G.trigger(b,V.BOUND)}function x(a){w(a.target)}function y(){var a,c,d,e,f=b.head;if(c=f.querySelectorAll('[name="viewport"]'),a=c.length,a>0)for(--a,e=0;a>e;++e)f.removeChild(c[e]);else d=b.createElement("meta"),d.setAttribute("name","viewport"),d.setAttribute("content","width=device-width, user-scalable=no"),f.firstChild?f.insertBefore(d,f.firstChild):f.appendChild(d)}function z(){E&&(y(),G.trigger(b,"beforerouterinit",E,!1),E.init(M),G.trigger(b,"routerinit",E,!1))}function A(){E&&E.destroy()}function B(a,b){var c=b instanceof HTMLElement?"HTMLElement":typeof b;return a[c]=b,a}function C(a){return tau.util.array.reduce(a,B,{})}var D,E,F=[].slice,G=d.event,H=d.util.object,I=d.util.selectors,J={},K={},L=a.location,M="#build"===L.hash,N="string",O="function",P="data-tau-built",Q="data-tau-name",R="data-tau-bound",S=",",T="*["+P+"]["+Q+"]:not(["+R+"])",U=function(a){return":not(["+P+"*='"+a+"']):not(["+R+"*='"+a+"'])"},V={INIT:"tauinit",WIDGET_BOUND:"widgetbound",WIDGET_DEFINED:"widgetdefined",WIDGET_BUILT:"widgetbuilt",BOUND:"bound"};d.widgetDefinitions={},D={justBuild:"#build"===L.hash,dataTau:{built:P,name:Q,bound:R,separator:S},destroyWidget:r,destroyAllWidgets:s,createWidgets:w,getDefinitions:function(){return J},getWidgetDefinition:function(a){return J[a]},defineWidget:f,getBinding:g,getAllBindings:i,setBinding:h,removeBinding:n,removeAllBindings:o,_clearBindings:function(){K={}},build:z,run:function(){switch(A(),G.fastOn(b,"create",x),G.trigger(b,V.INIT,{tau:d}),b.readyState){case"interactive":case"complete":z();break;default:G.fastOn(b,"DOMContentLoaded",z.bind(D))}},getRouter:function(){return E},initRouter:function(a){E=new a},instanceWidget:function(a,b,c){var d,e,f=C(arguments);return a=f.HTMLElement,b=f.string,c=f.object,a&&(d=g(a,b)),!d&&J[b]&&(e=J[b],a=t(a,e,c),d=g(a,b)),d},stop:A,setJustBuild:function(a){a?L.hash="build":L.hash="",M=a},getJustBuild:function(){return M},_createEventHandler:x},D.eventType=V,d.engine=D}(a,a.document,d),function(a,b,c){"use strict";function d(a){return a=w.getClosestBySelector(a,"a, label")}function e(a){return a=w.getClosestByTag(a,"li")}function f(){var a;r=d(r),q||!r||"A"!==r.tagName&&"LABEL"!==r.tagName||(a=e(r),a&&a.classList.add(v))}function g(){return a.getElementsByClassName(v)}function h(){var a,b=g(),c=b.length;for(a=0;c>a;a++)b[a]&&b[a].classList.remove(v)}function i(a){var b=a.touches[0];q=q||Math.abs(b.clientX-o)>u.scrollThreshold||Math.abs(b.clientY-p)>u.scrollThreshold,q&&(t(),h())}function j(b){var c=b.touches,d=c[0];1===c.length&&(q=!1,o=d.clientX,p=d.clientY,r=b.target,a.addEventListener("touchmove",i,!1),clearTimeout(s),s=setTimeout(f,u.addActiveClassDelay))}function k(a){0===a.touches.length&&(clearTimeout(s),s=null,q||setTimeout(h,u.keepActiveClassDelay),q=!1)}function l(){"hidden"===a.visibilityState&&h()}function m(){a.addEventListener("touchstart",j,!1),a.addEventListener("touchend",k,!1),a.addEventListener("visibilitychange",l,!1),b.addEventListener("pagehide",h,!1)}function n(){a.removeEventListener("touchstart",j,!1),a.removeEventListener("touchend",k,!1),b.removeEventListener("pagehide",h,!1)}var o,p,q,r,s,t,u={scrollThreshold:30,addActiveClassDelay:10,keepActiveClassDelay:100},v="ui-li-active",w=c.util.selectors;t=function(){a.removeEventListener("touchmove",i,!1)},m(),c.util.anchorHighlight={enable:m,disable:n}}(b,a,d),function(a){"use strict";a.util.DOM=a.util.DOM||{}}(d),function(a,b,d){"use strict";function e(a){var b=d.getConfig(b);return"data-"+(b?b+"-":"")+a}function f(a,b,c){a[b]=c,a.setAttribute(b,c)}var g=d.util.selectors,h=d.util.DOM;h.inheritAttr=function(a,b,c){var d,e=a.getAttribute(b);return!e&&(d=g.getClosestBySelector(a,c))?d.getAttribute(b):e},h.getNumberFromAttribute=function(a,b,c,d){var e=a.getAttribute(b),f=d;return isNaN(e)||("float"===c?(e=parseFloat(e),isNaN(e)||(f=e)):(e=parseInt(e,10),isNaN(e)||(f=e))),f},h.setNSData=function(a,b,c){a.setAttribute(e(b),c)},h.getNSData=function(a,b){var c=a.getAttribute(e(b));return"true"===c?!0:"false"===c?!1:c},h.hasNSData=function(a,b){return a.hasAttribute(e(b))},h.nsData=function(a,b,d){return d===c?h.getNSData(a,b):h.setNSData(a,b,d)},h.removeNSData=function(a,b){a.removeAttribute(e(b))},h.getData=function(a){var b,c,d,e,f="data-",g={},h=a.attributes,i=h.length;for(e=0;i>e;e++)b=h.item(e),c=b.nodeName,c.indexOf(f)>-1&&(d=b.value,g[c.replace(f,"")]="true"===d.toLowerCase()?!0:"false"===d.toLowerCase()?!1:d);return g},h.removeAttribute=function(a,b){a.removeAttribute(b),a[b]=!1},h.setAttribute=f,h.setAttributes=function(a,b){var c,d,e,g=Object.keys(b);for(c=0,e=g.length;e>c;c++)d=g[c],f(a,d,b[d])}}(a,a.document,d),function(a,b){"use strict";function c(a,b,c){return d.instanceWidget(b,a,c)}var d=b.engine,e={getInstance:d.getBinding,getAllInstances:d.getAllBindings};a.addEventListener(d.eventType.WIDGET_DEFINED,function(a){var d=a.detail,e=d.name;b.widget[e]=c.bind(null,e)},!0),b.widget=e}(a.document,d),function(a,b,c){"use strict";var d=[].slice,e=b.engine,f=e.dataTau,g=b.util,h=b.event,i=g.DOM,j=g.object,k=function(){return this},l={},m="function",n="ui-state-disabled",o="aria-disabled";k.classes={disable:n},l.configure=function(a,c,d){var e,f,g=this;g.options=g.options||{},g.element=g.element||null,a&&(e=a.name,f=a.namespace,g.name=e,g.widgetName=e,g.widgetEventPrefix=e.toLowerCase(),g.namespace=f,g.widgetFullName=((f?f+"-":"")+e).toLowerCase(),g.id=b.getUniqueId(),g.selector=a.selector),typeof g._configure===m&&g._configure(c),g._getCreateOptions(c),j.fastMerge(g.options,d)},l._getCreateOptions=function(a){var b=this.options,d=/[A-Z]/g;return b!==c&&Object.keys(b).forEach(function(c){var e=i.getNSData(a,c.replace(d,function(a){return"-"+a.toLowerCase()}));null!==e&&(b[c]=e)}),b},l.build=function(a){var b,c,d=this,e=a.getAttribute(f.built),g=a.getAttribute(f.name);return h.trigger(a,d.widgetEventPrefix+"beforecreate"),b=a.id,b?d.id=b:a.id=d.id,c=typeof d._build===m?d._build(a):a,e=e?e+f.separator+d.name:d.name,g=g?g+f.separator+d.name:d.name,a.setAttribute(f.built,e),a.setAttribute(f.name,g),c},l.init=function(a){var b=this;return b.id=a.id,typeof b._init===m&&b._init(a),a.getAttribute("disabled")||b.options.disabled===!0?b.disable():b.enable(),b},l.getContainer=function(){var a=this;return typeof a._getContainer===m?a._getContainer():a.element},l.bindEvents=function(a,b){var c=this,d=a.getAttribute(f.bound);return b||(d=d?d+f.separator+c.name:c.name,a.setAttribute(f.bound,d)),typeof c._buildBindEvents===m&&c._buildBindEvents(a),b||typeof c._bindEvents!==m||c._bindEvents(a),c.trigger(c.widgetEventPrefix+"create",c),c},l.focus=function(b){var c,d,f=this,g=f.element;return b=b||{},c=b.previousElement,c&&(d=e.getBinding(c),d?(b=j.merge({},b,{element:c}),d.blur(b)):c.blur()),b=j.merge({},b,{element:g}),h.trigger(a,"taufocus",b),g.focus(),!0},l.blur=function(b){var c=this,d=c.element;return b=j.merge({},b,{element:d}),h.trigger(a,"taublur",b),d.blur(),!0},l.destroy=function(a){var b=this;a=a||b.element,typeof b._destroy===m&&b._destroy(a),b.element&&b.trigger(b.widgetEventPrefix+"destroy"),a&&e.removeBinding(a,b.name)},l.disable=function(){var a=this,b=d.call(arguments),c=a.element;return c.classList.add(n),c.setAttribute(o,!0),typeof a._disable===m&&(b.unshift(c),a._disable.apply(a,b)),this},l.isDisabled=function(){var a=this;return a.element.getAttribute("disabled")||a.options.disabled===!0},l.enable=function(){var a=this,b=d.call(arguments),c=a.element;return c.classList.remove(n),c.setAttribute(o,!1),typeof a._enable===m&&(b.unshift(c),a._enable.apply(a,b)),this},l.refresh=function(){var a=this;return typeof a._refresh===m&&a._refresh.apply(a,arguments),a},l.option=function(){var a,b,e,f=this,g=d.call(arguments),h=g.shift(),i=g.shift(),j=!1;if("string"==typeof h)b=f._oneOption(h,i),h!==c&&i!==c&&(j=b,b=c);else if("object"==typeof h)for(a in h)h.hasOwnProperty(a)&&(e=f._oneOption(a,h[a]),a!==c&&h[a]!==c&&(j=j||e));return j&&f.refresh(),b},l._oneOption=function(a,b){var d,e=this,f=!1;return b===c?(d="_get"+(a[0].toUpperCase()+a.slice(1)),typeof e[d]===m?e[d]():e.options[a]):(d="_set"+(a[0].toUpperCase()+a.slice(1)),typeof e[d]===m?e[d](e.element,b):(e.options[a]=b,e.element&&(e.element.setAttribute("data-"+a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}),b),f=!0)),f)},l.isBound=function(a){var b=this.element;return a=a||this.name,b&&b.hasAttribute(f.bound)&&b.getAttribute(f.bound).indexOf(a)>-1},l.isBuilt=function(a){var b=this.element;return a=a||this.name,b&&b.hasAttribute(f.built)&&b.getAttribute(f.built).indexOf(a)>-1},l.value=function(a){var b=this;return a!==c?typeof b._setValue===m?b._setValue(a):b:typeof b._getValue===m?b._getValue():b},l.trigger=function(a,b,c,d){return h.trigger(this.element,a,b,c,d)},l.on=function(a,b,c){h.on(this.element,a,b,c)},l.off=function(a,b,c){h.off(this.element,a,b,c)},k.prototype=l,b.widget.BaseWidget=k}(a.document,d),function(a,b){"use strict";b.widget.core=b.widget.core||{}}(a.document,d),function(a,b,c){"use strict";function d(b,c,d,e){var f=a.getComputedStyle(b),g=null,h=d;if(f&&(g=f.getPropertyValue(c)))switch(e){case"integer":g=parseInt(g,10),isNaN(g)||(h=g);break;case"float":g=parseFloat(g),isNaN(g)||(h=g);break;default:h=g}return h}function e(b,d,e,f){var g,h=a.getComputedStyle(b,e),i=null,j=c.util;for(g in d)d.hasOwnProperty(g)&&(i=h.getPropertyValue(g),j.isNumber(i)&&!f?i.match(/\./gi)?d[g]=parseFloat(i):d[g]=parseInt(i,10):d[g]=i)}function f(a,b,c,d,f,g){var h,i,j,k=0,l=null,m=null,n=null,o=b&&"outer"===b||!1,p=0,q={height:0,"margin-top":0,"margin-bottom":0,"padding-top":0,"padding-bottom":0,"border-top-width":0,"border-bottom-width":0,"box-sizing":""};if(a){h=a.style,"none"!==h.display?(e(a,q,f,!0),p=a.offsetHeight):g&&(l=h.display,m=h.visibility,n=h.position,h.display="block",h.visibility="hidden",h.position="relative",e(a,q,f,!0),p=a.offsetHeight,h.display=l,h.visibility=m,h.position=n),"string"==typeof q.height&&-1===q.height.indexOf("px")&&(q.height=0);for(j in q)q.hasOwnProperty(j)&&"box-sizing"!==j&&(i=parseFloat(q[j]),isNaN(i)&&(i=0),q[j]=i);k+=q.height,"border-box"!==q["box-sizing"]&&(k+=q["padding-top"]+q["padding-bottom"]),c?k=p:o&&"border-box"!==q["box-sizing"]&&(k+=q["border-top-width"]+q["border-bottom-width"]),d&&(k+=Math.max(0,q["margin-top"])+Math.max(0,q["margin-bottom"]))}return k}function g(a,b,c,d,f,g){var h,i,j,k=0,l=null,m=null,n=null,o=0,p=b&&"outer"===b||!1,q={width:0,"margin-left":0,"margin-right":0,"padding-left":0,"padding-right":0,"border-left-width":0,"border-right-width":0,"box-sizing":""};if(a){h=a.style,"none"!==h.display?(e(a,q,f,!0),o=a.offsetWidth):g&&(l=h.display,m=h.visibility,n=h.position,h.display="block",h.visibility="hidden",h.position="relative",e(a,q,f,!0),h.display=l,h.visibility=m,h.position=n),"string"==typeof q.width&&-1===q.width.indexOf("px")&&(q.width=0);for(j in q)q.hasOwnProperty(j)&&"box-sizing"!==j&&(i=parseFloat(q[j]),isNaN(i)&&(i=0),q[j]=i);k+=q.width,"border-box"!==q["box-sizing"]&&(k+=q["padding-left"]+q["padding-right"]),c?k=o:p&&"border-box"!==q["box-sizing"]&&(k+=q["border-left-width"]+q["border-right-width"]),d&&(k+=Math.max(0,q["margin-left"])+Math.max(0,q["margin-right"]))}return k}function h(a){var b=0,c=0;do c+=a.offsetTop,b+=a.offsetLeft,a=a.offsetParent;while(null!==a);return{top:c,left:b}}function i(a){return!(a.offsetWidth<=0&&a.offsetHeight<=0)}function j(a,b){return b.toLocaleUpperCase()}function k(a){return a.replace(q,j)}function l(a){return a.charAt(0).toLocaleUpperCase()+a.substring(1)}function m(a,b,c){var d=a.style,e=l(k(b)),f="string"==typeof c?{webkit:c,moz:c,o:c,ms:c,normal:c}:c;d[b]=f.normal,d["webkit"+e]=f.webkit,d["moz"+e]=f.moz,d["o"+e]=f.o,d["ms"+e]=f.ms}function n(a){return{webkit:"-webkit-"+a,moz:"-moz-"+a,o:"-ms-"+a,ms:"-o-"+a,normal:a}}function o(a,b){var c,d,e=n(b);for(d in e)if(c=a[e[d]],c&&"none"!==c)return c;return c}var p=c.util.DOM,q=/-([a-z])/gi;p.getCSSProperty=d,p.extractCSSProperties=e,p.getElementHeight=f,p.getElementWidth=g,p.getElementOffset=h,p.isOccupiedPlace=i,p.setPrefixedStyle=m,p.getPrefixedValue=n,p.getPrefixedStyleValue=o}(a,a.document,d),function(b,c){"use strict";var d=c.widget.BaseWidget,e=c.util,f=e.DOM,g=e.selectors,h=c.engine,i=function(){var a=this;a.contentFillAfterResizeCallback=null,a._initialContentStyle={},a.options={},a._contentStyleAttributes=["height","width","minHeight","marginTop","marginBottom"],a._ui={}},j={SHOW:"pageshow",HIDE:"pagehide",CREATE:"pagecreate",BEFORE_CREATE:"pagebeforecreate",BEFORE_SHOW:"pagebeforeshow",BEFORE_HIDE:"pagebeforehide"},k={uiPage:"ui-page",uiPageActive:"ui-page-active",uiSection:"ui-section",uiHeader:"ui-header",uiFooter:"ui-footer",uiContent:"ui-content"},l=new d;i.classes=k,i.events=j,l._configure=function(){var a=this.options||{};a.header=null,a.footer=null,a.content=null,this.options=a},l._contentFill=function(){var b,c,d,e,g,h,i=this,j=i.element,l=a.innerWidth,m=a.innerHeight,n=k.uiContent,o=k.uiHeader,p=k.uiFooter,q=0,r=[].slice.call(j.children),s=r.length,t=j.style;for(t.width=l+"px",t.height=m+"px",b=0;s>b;b++)c=r[b],(c.classList.contains(o)||c.classList.contains(p))&&(q+=f.getElementHeight(c));for(b=0;s>b;b++)c=r[b],h=c.style,c.classList.contains(n)&&(d=a.getComputedStyle(c),e=parseFloat(d.marginTop),g=parseFloat(d.marginBottom),h.height=m-q-e-g+"px",h.width=l+"px")},l._storeContentStyle=function(){var a=this._initialContentStyle,b=this._contentStyleAttributes,c=this.element.querySelector("."+k.uiContent),d=c?c.style:{};b.forEach(function(b){a[b]=d[b]})},l._restoreContentStyle=function(){var a=this._initialContentStyle,b=this._contentStyleAttributes,c=this.element.querySelector("."+k.uiContent),d=c?c.style:{};b.forEach(function(b){d[b]=a[b]})},l._setFooter=function(a,c){var d=this,e=d._ui,f=e.footer;!f&&c&&(f=b.createElement("footer"),a.appendChild(f),e.footer=f),f&&(c===!1?a.removeChild(f):(f.classList.add(k.uiFooter),"string"==typeof c&&(e.footer.textContent=c)),d.options.footer=c)},l._setHeader=function(a,c){var d=this,e=d._ui,f=e.header;!f&&c&&(f=b.createElement("header"),a.appendChild(f),e.header=f),f&&(c===!1?a.removeChild(f):(f.classList.add(k.uiHeader),"string"==typeof c&&(e.header.textContent=c)),d.options.header=c)},l._setContent=function(a,c){var d,e=this,f=e._ui,g=f.content,h=a.firstChild;if(!g&&c){for(g=b.createElement("div");h;)d=h.nextSibling,h!==f.footer&&h!==f.header&&g.appendChild(h),h=d;a.insertBefore(g,f.footer),f.content=g}g&&(c===!1?a.removeChild(g):(g.classList.add(k.uiContent),"string"==typeof c&&(g.textContent=c)),e.options.content=c)},l._buildHeader=function(a){var b=this;b._ui.header=g.getChildrenBySelector(a,"header,[data-role='header'],."+k.uiHeader)[0],b._setHeader(a,b.options.header)},l._buildFooter=function(a){var b=this;b._ui.footer=g.getChildrenBySelector(a,"footer,[data-role='footer'],."+k.uiFooter)[0],b._setFooter(a,b.options.footer)},l._buildContent=function(a){var b=this;b._ui.content=g.getChildrenBySelector(a,"[data-role='content'],."+k.uiContent)[0],b._setContent(a,b.options.content)},l._build=function(a){var b=this;return a.classList.add(k.uiPage),b._buildHeader(a),b._buildFooter(a),b._buildContent(a),a},l.setActive=function(a){var b=this.element.classList;a?(this.focus(),b.add(k.uiPageActive)):(this.blur(),b.remove(k.uiPageActive))},l.isActive=function(){return this.element.classList.contains(k.uiPageActive)},l.focus=function(){var a=this.element,b=a.querySelector("[autofocus]")||a;b.focus()},l.blur=function(){var a=this.element,b=a.querySelector(":focus")||a;b.blur()},l._bindEvents=function(b){var c=this;c.contentFillAfterResizeCallback=c._contentFill.bind(c),
  a.addEventListener("resize",c.contentFillAfterResizeCallback,!1)},l._refresh=function(){this._restoreContentStyle(),this._contentFill()},l.layout=function(){this._storeContentStyle(),this._contentFill()},l.onBeforeShow=function(){this.trigger(j.BEFORE_SHOW)},l.onShow=function(){this.trigger(j.SHOW)},l.onBeforeHide=function(){this.trigger(j.BEFORE_HIDE)},l.onHide=function(){this._restoreContentStyle(),this.trigger(j.HIDE)},l._destroy=function(){var b=this,c=b.element;c=c||b.element,a.removeEventListener("resize",b.contentFillAfterResizeCallback,!1),h.destroyAllWidgets(c,!0)},i.prototype=l,i.createEmptyElement=function(){var a=b.createElement("div");return a.classList.add(k.uiPage),f.setNSData(a,"role","page"),a},c.widget.core.Page=i,h.defineWidget("Page","[data-role=page],.ui-page",["layout","focus","blur","setActive","isActive"],i,"core"),h.defineWidget("page","",["layout","focus","blur","setActive","isActive"],i,"core"),c.widget.page=c.widget.Page}(a.document,d),function(b,c){"use strict";var d=c.widget.BaseWidget,e=(c.widget.core.Page,c.util),f=c.event,g=e.DOM,h=c.engine,i={pageContainer:"ui-page-container",uiViewportTransitioning:"ui-viewport-transitioning",out:"out","in":"in",reverse:"reverse",uiPreIn:"ui-pre-in",uiBuild:"ui-page-build"},j=function(){this.activePage=null,this.inTransition=!1},k={PAGE_BEFORE_CHANGE:"pagebeforechange",PAGE_CHANGE:"pagechange",PAGE_REMOVE:"pageremove"},l="animationend",m="webkitAnimationEnd",n="mozAnimationEnd",o="msAnimationEnd",p="oAnimationEnd",q=new d;j.events=k,j.classes=i,q.change=function(a,b){var d,e=this,f=e.getActivePage();b=b||{},b.widget=b.widget||"Page",f&&f.element===a||(a.parentNode!==e.element&&(a=e._include(a)),e.trigger(k.PAGE_BEFORE_CHANGE),a.classList.add(i.uiBuild),d=h.instanceWidget(a,b.widget),d.layout(),c.getConfig("autoBuildOnPageChange",!1)&&h.createWidgets(a),f&&f.onBeforeHide(),d.onBeforeShow(),a.classList.remove(i.uiBuild),b.deferred={resolve:function(){f&&(f.onHide(),b.reverse&&f.destroy(),e._removeExternalPage(f,b)),d.onShow(),e.trigger(k.PAGE_CHANGE)}},e._transition(d,f,b))},q._transition=function(b,c,d){var e,g,h,j=this,k=j.element,q=k.classList,r=c&&d.transition?d.transition:"none",s=d.deferred,t=[i["in"],i.out,i.uiPreIn,r];d.reverse&&t.push(i.reverse),j.inTransition=!0,q.add(i.uiViewportTransitioning),e=s.resolve,s.resolve=function(){var a=c&&c.element.classList,d=b.element.classList;j._setActivePage(b),q.remove(i.uiViewportTransitioning),j.inTransition=!1,t.forEach(function(a){d.remove(a)}),a&&t.forEach(function(b){a.remove(b)}),e()},"none"!==r?(h=function(){f.off(b.element,[l,m,n,o,p],h,!1),s.resolve()},f.on(b.element,[l,m,n,o,p],h,!1),c&&(g=c.element.classList,g.add(r),g.add(i.out),d.reverse&&g.add(i.reverse)),g=b.element.classList,g.add(r),g.add(i["in"]),g.add(i.uiPreIn),d.reverse&&g.add(i.reverse)):a.setTimeout(s.resolve,0)},q._include=function(a){var b=this.element;return a.parentNode!==b&&(a=e.importEvaluateAndAppendElement(a,b)),a},q._setActivePage=function(a){var b=this;b.activePage&&b.activePage.setActive(!1),b.activePage=a,a.setActive(!0)},q.getActivePage=function(){return this.activePage},q.showLoading=function(){return null},q.hideLoading=function(){return null},q._removeExternalPage=function(a,b){var c=a.element;b=b||{},b.reverse&&g.hasNSData(c,"external")&&c.parentNode&&(c.parentNode.removeChild(c),this.trigger(k.PAGE_REMOVE))},j.prototype=q,c.widget.core.PageContainer=j,h.defineWidget("pagecontainer","",["change","getActivePage","showLoading","hideLoading"],j,"core")}(a.document,d),function(a,b){"use strict";function c(a){a.reset()}function d(a,b){var c=a._ui.marqueeInnerElement,d=c.scrollWidth,e=d/b;return e}function e(b,c){var d,e,f=b._ui.marqueeInnerElement,g=b.element,h=g.offsetWidth,i=f.scrollWidth,j=a.createElement("style"),k=c+"-"+b.id;switch(c){case u.SLIDE:d="@-webkit-keyframes "+k+" {0% { -webkit-transform: translate3d(0, 0, 0);}95%, 100% { -webkit-transform: translate3d(-"+(i-h)+"px, 0, 0);} }";break;case u.SCROLL:d="@-webkit-keyframes "+k+" {0% { -webkit-transform: translate3d(0, 0, 0);}95%, 100% { -webkit-transform: translate3d(-100%, 0, 0);} }";break;case u.ALTERNATE:d="@-webkit-keyframes "+k+" {0% { -webkit-transform: translate3d(0, 0, 0);}50% { -webkit-transform: translate3d(-"+(i-h)+"px, 0, 0);}100% { -webkit-transform: translate3d(0, 0, 0);} }";break;case u.ENDTOEND:e=parseInt(i/(i+h)*100,10),d="@-webkit-keyframes "+k+" {0% { -webkit-transform: translate3d(0, 0, 0);}"+e+"% { -webkit-transform: translate3d(-100%, 0, 0); opacity: 1;}"+(e+1)+"% { -webkit-transform: translate3d(-100%, 0, 0); opacity: 0; }"+(e+2)+"% { -webkit-transform: translate3d("+h+"px, 0, 0); opacity: 0; }"+(e+3)+"% { -webkit-transform: translate3d("+h+"px, 0, 0); opacity: 1; }100% { -webkit-transform: translate3d(0, 0, 0);} }";break;default:d=null}return d&&(b.element.appendChild(j),j.sheet.insertRule(d,0),b._ui.styleSheelElement=j),k}function f(a,c){var f=a._ui.marqueeInnerElement,g=f.style,h=d(a,isNaN(parseInt(c.speed,10))?w.speed:c.speed),i=e(a,c.marqueeStyle);isNaN(parseInt(c.speed,10))&&b.warn("speed value must be number(px/sec)"),"infinite"!==c.iteration&&isNaN(c.iteration)&&b.warn("iteration count must be number or 'infinite'"),isNaN(c.delay)&&b.warn("delay value must be number"),g.webkitAnimationName=i,g.webkitAnimationDuration=h+"s",g.webkitAnimationIterationCount=c.iteration,g.webkitAnimationTimingFunction=c.timingFunction,g.webkitAnimationDelay=c.delay+"ms"}function g(a,b,c){var d=a.element;switch(b){case v.GRADIENT:c&&d.classList.add(s.MARQUEE_GRADIENT);break;case v.ELLIPSIS:d.classList.add(s.MARQUEE_ELLIPSIS)}}function h(a,b){b?a.start():a.stop()}var i=b.widget.BaseWidget,j=b.engine,k=b.event,l=b.util.object,m=b.util.DOM,n=function(){this._ui={},this._ui.marqueeInnerElement=null,this._ui.styleSheelElement=null,this._state=q.STOPPED,this._hasEllipsisText=!1,this.options=l.merge({},n.defaults),this._callbacks={}},o=new i,p="ui-marquee",q={RUNNING:"running",STOPPED:"stopped",IDLE:"idle"},r={MARQUEE_START:"marqueestart",MARQUEE_END:"marqueeend",MARQUEE_STOPPED:"marqueestopped"},s={MARQUEE_CONTENT:p+"-content",MARQUEE_GRADIENT:p+"-gradient",MARQUEE_ELLIPSIS:p+"-ellipsis",ANIMATION_RUNNING:p+"-anim-running",ANIMATION_STOPPED:p+"-anim-stopped",ANIMATION_IDLE:p+"-anim-idle"},t={MARQUEE_CONTENT:"."+p+"-content"},u={SCROLL:"scroll",SLIDE:"slide",ALTERNATE:"alternate",ENDTOEND:"endToEnd"},v={GRADIENT:"gradient",ELLIPSIS:"ellipsis",NONE:"none"},w={marqueeStyle:u.SLIDE,speed:60,iteration:1,delay:0,timingFunction:"linear",ellipsisEffect:"gradient",runOnlyOnEllipsisText:!0,autoRun:!0};n.classes=s,n.defaults=w,o._build=function(b){for(var c=a.createElement("div");b.hasChildNodes();)c.appendChild(b.removeChild(b.firstChild));return c.classList.add(s.MARQUEE_CONTENT),b.appendChild(c),this._ui.marqueeInnerElement=c,b},o._init=function(a){var b=this;return b._ui.marqueeInnerElement=b._ui.marqueeInnerElement||a.querySelector(t.MARQUEE_CONTENT),b._hasEllipsisText=a.offsetWidth-m.getCSSProperty(a,"padding-right",null,"float")<b._ui.marqueeInnerElement.scrollWidth,(!b.options.runOnlyOnEllipsisText||b._hasEllipsisText)&&(g(b,b.options.ellipsisEffect,b._hasEllipsisText),f(b,b.options),h(b,b.options.autoRun)),a},o._bindEvents=function(){var a=this,b=a._ui.marqueeInnerElement,d=c.bind(null,a);a._callbacks.animationEnd=d,k.one(b,"webkitAnimationEnd",d)},o._refresh=function(){var a=this;a._resetStyle(),a._hasEllipsisText=a.element.offsetWidth<a._ui.marqueeInnerElement.scrollWidth,(!a.options.runOnlyOnEllipsisText||a._hasEllipsisText)&&(g(a,a.options.ellipsisEffect,a._hasEllipsisText),f(a,a.options),h(a,a.options.autoRun))},o._resetStyle=function(){var a=this,b=a.element,c=a._ui.styleSheelElement,d=a._ui.marqueeInnerElement.style;b.contains(c)&&b.removeChild(c),d.webkitAnimationName="",d.webkitAnimationDuration="",d.webkitAnimationDelay="",d.webkitAnimationIterationCount="",d.webkitAnimationTimingFunction=""},o._resetDOM=function(){for(var a=this._ui;a.marqueeInnerElement.hasChildNodes();)this.element.appendChild(a.marqueeInnerElement.removeChild(a.marqueeInnerElement.firstChild));return this.element.removeChild(a.marqueeInnerElement),null},o._destroy=function(){var a=this;return a._resetStyle(),a._resetDOM(),a._callbacks=null,a._ui=null,null},o._animationStart=function(){var a=this,b=a.element.classList,c=a._ui.marqueeInnerElement.classList;a._state=q.RUNNING,b.contains(s.MARQUEE_ELLIPSIS)&&b.remove(s.MARQUEE_ELLIPSIS),c.remove(s.ANIMATION_IDLE,s.ANIMATION_STOPPED),c.add(s.ANIMATION_RUNNING),a.trigger(r.MARQUEE_START)},o.start=function(){var a=this;if(!a.options.runOnlyOnEllipsisText||a._hasEllipsisText)switch(a._state){case q.IDLE:f(a,a.options),a._bindEvents(),a._animationStart();break;case q.STOPPED:a._state=q.RUNNING,a._animationStart();break;case q.RUNNING:}},o.stop=function(){var a=this,b=a._ui.marqueeInnerElement.classList;(!a.options.runOnlyOnEllipsisText||a._hasEllipsisText)&&a._state!=q.IDLE&&(a._state=q.STOPPED,b.remove(s.ANIMATION_RUNNING),b.add(s.ANIMATION_STOPPED),a.trigger(r.MARQUEE_STOPPED))},o.reset=function(){var a=this,b=a.element.classList,c=a._ui.marqueeInnerElement.classList;(!a.options.runOnlyOnEllipsisText||a._hasEllipsisText)&&a._state!=q.IDLE&&(a._state=q.IDLE,c.remove(s.ANIMATION_RUNNING,s.ANIMATION_STOPPED),c.add(s.ANIMATION_IDLE),a.options.ellipsisEffect===v.ELLIPSIS&&b.add(s.MARQUEE_ELLIPSIS),a._resetStyle(),a.trigger(r.MARQUEE_END))},n.prototype=o,b.widget.core.Marquee=n,j.defineWidget("Marquee",".ui-marquee",["start","stop","reset"],n,"core")}(a.document,d),function(b,d){"use strict";var e=d.widget.BaseWidget,f=d.engine,g=function(){var a=this;a._activeIndex=null,a.options={}},h={indicator:"ui-page-indicator",indicatorActive:"ui-page-indicator-active",indicatorItem:"ui-page-indicator-item",linearIndicator:"ui-page-indicator-linear",circularIndicator:"ui-page-indicator-circular"},i={IN_CIRCLE:60,IN_LINEAR:11},j={LINEAR:"linear",CIRCULAR:"circular"},k=15,l=new e;g.classes=h,l._configure=function(){this.options={maxPage:null,numberOfPages:null,layout:"linear",intervalAngle:6}},l._build=function(a){var b=this;return b._createIndicator(a),b.options.layout===j.CIRCULAR&&b._circularPositioning(a),a},l._createIndicator=function(a){var c,e,f,g,i=this,k=i.options.numberOfPages;if(null===k)return void d.error("build error: numberOfPages is null");for(i.options.layout=i.options.layout.toLowerCase(),i.options.layout===j.CIRCULAR?(a.classList.remove(h.linearIndicator),a.classList.add(h.circularIndicator)):(a.classList.remove(h.circularIndicator),a.classList.add(h.linearIndicator)),f=i._getMaxPage(),e=f>k?k:f,c=0;e>c;c++)g=b.createElement("span"),g.classList.add(h.indicatorItem),a.appendChild(g)},l._circularPositioning=function(a){var b,c,d,e=this,f=a.children,g=f.length,h=e.options.intervalAngle-"0";for(b=a.offsetWidth/2-k,d=0;g>d;d++)c="rotate("+(d*h-90-(g-1)*h*.5)+"deg) translate("+b+"px) ",f[d].style.transform=c},l._getMaxPage=function(){var a,b=this,c=b.options;return a=c.layout===j.CIRCULAR?c.maxPage||i.IN_CIRCLE:c.maxPage||i.IN_LINEAR},l._removeIndicator=function(a){a.textContent=""},l.setActive=function(b){var e,f,g,i=this,j=b,k=i.element.children,l=i.options.numberOfPages,m=0,n=h.indicatorActive;if(null!==b&&b!==c){if(i._activeIndex=b,e=i._getMaxPage(),f=a.parseInt(e/2,10),l>e)m=l-e;else{if(null===l)return void d.error("setActive error: numberOfPages is null");if(0===l)return}g=i.element.querySelector("."+n),g&&g.classList.remove(n),b>f&&f+m>=b?j=f:b>f+m&&(j=b-m),k[j].classList.add(n)}},l._refresh=function(){var a=this,b=a.element;a._removeIndicator(b),a._createIndicator(b),a.options.layout===j.CIRCULAR&&a._circularPositioning(b)},l._destroy=function(){this._removeIndicator(this.element)},g.prototype=l,d.widget.core.PageIndicator=g,f.defineWidget("PageIndicator","[data-role='page-indicator'], .ui-page-indicator",["setActive"],g,"core")}(a.document,d),function(a,b,d){"use strict";d.util.callbacks=function(a){var b,e,f,g,h,i,j,k,l=d.util.object,m=l.copy(a),n=[].slice,o=[],p=!m.once&&[],q={add:function(){if(o){var a=o.length;k(arguments),f?h=o.length:b&&(g=a,j(b))}return this},remove:function(){return o&&n.call(arguments).forEach(function(a){for(var b=o.indexOf(a);b>-1;)o.splice(b,1),f&&(h>=b&&h--,i>=b&&i--),b=o.indexOf(a,b)}),this},has:function(a){return a?!!o&&o.indexOf(a)>-1:!(!o||!o.length)},empty:function(){return o=[],h=0,this},disable:function(){return o=p=b=c,this},disabled:function(){return!o},lock:function(){return p=c,b||q.disable(),this},locked:function(){return!p},fireWith:function(a,b){return!o||e&&!p||(b=b||[],b=[a,b.slice?b.slice():b],f?p.push(b):j(b)),this},fire:function(){return q.fireWith(this,arguments),this},fired:function(){return!!e}};return k=function(a){n.call(a).forEach(function(a){var b=typeof a;"function"===b?m.unique&&q.has(a)||o.push(a):a&&a.length&&"string"!==b&&k(a)})},j=function(a){for(b=m.memory&&a,e=!0,i=g||0,g=0,h=o.length,f=!0;o&&h>i;){if(o[i].apply(a[0],a[1])===!1&&m.stopOnFalse){b=!1;break}i++}f=!1,o&&(p?p.length&&j(p.shift()):b?o=[]:q.disable())},q}}(a,a.document,d),function(a,b,c){"use strict";var d=function(a){var b=c.util.callbacks,e=c.util.object,f=[["resolve","done",b({once:!0,memory:!0}),"resolved"],["reject","fail",b({once:!0,memory:!0}),"rejected"],["notify","progress",b({memory:!0})]],g="pending",h={},i={state:function(){return g},always:function(){return h.done(arguments).fail(arguments),this},then:function(){var a=arguments;return new d(function(b){f.forEach(function(c,d){var e="function"==typeof a[d]&&a[d];h[c[1]](function(){var a=e&&e.apply(this,arguments);a&&"function"==typeof a.promise?a.promise().done(b.resolve).fail(b.reject).progress(b.notify):b[c[0]+"With"](this===i?b.promise():this,e?[a]:arguments)})}),a=null}).promise()},promise:function(a){return a?e.merge(a,i):i}};return i.pipe=i.then,f.forEach(function(a,b){var c=a[2],d=a[3];i[a[1]]=c.add,d&&c.add(function(){g=d},f[1^b][2].disable,f[2][2].lock),h[a[0]]=function(){return h[a[0]+"With"](this===h?i:this,arguments),this},h[a[0]+"With"]=c.fireWith}),i.promise(h),a&&a.call(h,h),h};c.util.deferred=d}(a,a.document,d),function(c){"use strict";function d(a,b,c){var d=a.element,e=d.classList,f=a._ui.overlay,g=a._callbacks.animationEnd;d.removeEventListener("animationend",g,!1),d.removeEventListener("webkitAnimationEnd",g,!1),d.removeEventListener("mozAnimationEnd",g,!1),d.removeEventListener("oAnimationEnd",g,!1),d.removeEventListener("msAnimationEnd",g,!1),b.split(" ").forEach(function(a){a=a.trim(),a.length>0&&(e.remove(a),f&&f.classList.remove(a))}),"pending"===c.state()&&c.resolve()}function e(a,b){var c=new i;return c.then(function(){c===a._callbacks.transitionDeferred&&b()}),a._callbacks.transitionDeferred=c,c}var f=c.widget.BaseWidget,g=c.engine,h=c.util.object,i=c.util.deferred,j=c.util.selectors,k=c.event,l=function(){var a=this,b={};a.selectors=q,a.options=h.merge({},l.defaults),a.events=h.merge({},l.events),a.classes=h.merge({},l.classes),a.storedOptions=null,a.state=n.CLOSED,b.overlay=null,b.header=null,b.footer=null,b.content=null,b.container=null,b.wrapper=null,a._ui=b,a._callbacks={}},m={transition:"none",dismissible:!0,overlay:!0,header:!1,footer:!1,content:null,overlayClass:"",closeLinkSelector:"[data-rel='back']",history:!0},n={DURING_OPENING:0,OPENED:1,DURING_CLOSING:2,CLOSED:3},o="ui-popup",p={popup:o,active:o+"-active",overlay:o+"-overlay",header:o+"-header",footer:o+"-footer",content:o+"-content",wrapper:o+"-wrapper",build:"ui-build"},q={header:"."+p.header,content:"."+p.content,footer:"."+p.footer},r="popup",s={show:r+"show",hide:r+"hide",before_show:r+"beforeshow",before_hide:r+"beforehide"},t=new f;l.classes=p,l.events=s,l.defaults=m,t._buildContent=function(a){var c,d,e=this,f=e._ui,g=e.selectors,h=e.classes,i=e.options,j=f.content||a.querySelector(g.content),k=f.footer||a.querySelector(g.footer),l=[].slice.call(a.childNodes),m=l.length;if(!j){for(j=b.createElement("div"),j.className=h.content,c=0;m>c;++c)d=l[c],d!==f.footer&&d!==f.header&&j.appendChild(d);"string"==typeof i.content&&(j.innerHTML=i.content),a.insertBefore(j,k)}j.classList.add(h.content),f.content=j},t._buildHeader=function(a){var c=this,d=c._ui,e=c.options,f=c.classes,g=c.selectors,h=d.content||a.querySelector(g.content),i=d.header||a.querySelector(g.header);i||e.header===!1||(i=b.createElement("div"),i.className=f.header,"boolean"!=typeof e.header&&(i.innerHTML=e.header),a.insertBefore(i,h)),i&&i.classList.add(f.header),d.header=i},t._setHeader=function(a,b){var c=this,d=c._ui,e=d.header;e&&(e.parentNode.removeChild(e),d.header=null),c.options.header=b,c._buildHeader(d.container)},t._buildFooter=function(a){var c=this,d=c._ui,e=c.options,f=c.classes,g=d.footer||a.querySelector(c.selectors.footer);g||e.footer===!1||(g=b.createElement("div"),g.className=f.footer,"boolean"!=typeof e.footer&&(g.innerHTML=e.footer),a.appendChild(g)),g&&g.classList.add(f.footer),d.footer=g},t._setFooter=function(a,b){var c=this,d=c._ui,e=d.footer;e&&(e.parentNode.removeChild(e),d.footer=null),c.options.footer=b,c._buildFooter(d.container)},t._build=function(a){var c,d=this,e=d._ui,f=d.classes,g=a.firstChild;for(a.classList.add(f.popup),c=b.createElement("div"),c.classList.add(f.wrapper),e.wrapper=c,e.container=c;g;)c.appendChild(g),g=a.firstChild;return a.appendChild(c),this._buildHeader(e.container),this._buildFooter(e.container),this._buildContent(e.container),this._setOverlay(a,this.options.overlay),a},t._setOverlay=function(a,c){var d=this,e=d.classes,f=d.options.overlayClass,g=d._ui,h=g.overlay;a.classList.contains("ui-slider-popup")||(h||(h=b.createElement("div"),a.parentNode.insertBefore(h,a),g.overlay=h),h.className=e.overlay+(f?" "+f:""),c?h.style.opacity="":h.style.opacity=0)},t._isActive=function(){var a=this.state;return a===n.DURING_OPENING||a===n.OPENED},t._isOpened=function(){return this.state===n.OPENED},t._init=function(b){var c=this,d=c.selectors,e=c.classes,f=c._ui;f.header=f.header||b.querySelector(d.header),f.footer=f.footer||b.querySelector(d.footer),f.content=f.content||b.querySelector(d.content),f.wrapper=f.wrapper||b.querySelector("."+e.wrapper),f.container=f.wrapper||b,f.page=j.getClosestByClass(b,"ui-page")||a},t._setActive=function(a){var b,c=this,d=c.classes.active,e=c.element.classList,f=g.getRouter().getRoute("popup");b=h.merge({},c.options,{positionTo:null,link:null}),a?(f.setActive(c,b),e.add(d),c.state=n.OPENED):(f.setActive(null,b),e.remove(d),c.state=n.CLOSED)},t._bindEvents=function(){var b=this,c=b.element.querySelectorAll(b.options.closeLinkSelector);b._ui.page.addEventListener("pagebeforehide",b,!1),a.addEventListener("resize",b,!1),k.on(c,"click",b,!1),b._bindOverlayEvents()},t._bindOverlayEvents=function(){var a=this._ui.overlay;a&&a.addEventListener("click",this,!1)},t._unbindOverlayEvents=function(){var a=this._ui.overlay;a&&a.removeEventListener("click",this,!1)},t._unbindEvents=function(){var b=this;b._ui.page.removeEventListener("pagebeforehide",b,!1),a.removeEventListener("resize",b,!1),b._unbindOverlayEvents()},t._layout=function(a){},t.open=function(a){var b,c=this;c._isActive()||(c._storeOpenOptions(a),b=h.merge(c.options,a),b.dismissible||g.getRouter().lock(),c._show(b))},t.close=function(a){var b=this,c=h.merge(b.options,a);b._isActive()&&(c.dismissible||g.getRouter().unlock(),b._hide(c))},t._storeOpenOptions=function(a){var b,c=this,d=c.options,e={};for(b in a)a.hasOwnProperty(b)&&(e[b]=d[b]);c.storedOptions=e},t._restoreOpenOptions=function(){var a=this,b=a.options,c=["x","y","fromHashChange"];b=h.merge(b,a.storedOptions),h.removeProperties(b,c)},t._show=function(b){var c=this,d=h.merge({},b),e=c._ui.overlay;c._layout(c.element),c.state=n.DURING_OPENING,d.ext=" in ",c.trigger(c.events.before_show),e&&(e.style.display="block"),a.requestAnimationFrame(c._transition.bind(c,d,c._onShow.bind(c)))},t._onShow=function(){var a=this;a._setActive(!0),a.trigger(a.events.show)},t._hide=function(a){var b=this,c=b._isOpened(),d=b._callbacks;b.state=n.DURING_CLOSING,b.trigger(b.events.before_hide),c?(a.ext=" out ",b._transition(a,b._onHide.bind(b))):(d.transitionDeferred&&d.transitionDeferred.reject(),d.animationEnd&&d.animationEnd(),b._onHide())},t._onHide=function(){var a=this,b=a._ui.overlay;a._setActive(!1),b&&(b.style.display=""),a._restoreOpenOptions(),a.trigger(a.events.hide)},t.handleEvent=function(a){var b=this;switch(a.type){case"pagebeforehide":g.getRouter().close(null,{transition:"none",rel:"popup"});break;case"resize":b._onResize(a);break;case"click":a.target===b._ui.overlay&&b._onClickOverlay(a)}},t._refresh=function(){var a=this;a._unbindOverlayEvents(),a._setOverlay(a.element,a.options.overlay),a._bindOverlayEvents()},t._onClickOverlay=function(a){var b=this.options;a.preventDefault(),a.stopPropagation(),b.dismissible&&g.getRouter().close()},t._onResize=function(){this._isOpened()&&this._refresh()},t._transition=function(b,c){var f,g,h=this,i=b.transition||h.options.transition||"none",j=i+b.ext,k=h.element,l=k.classList,m=h._ui.overlay.classList;return f=e(h,c),"none"!==i?(g=d.bind(null,h,j,f),h._callbacks.animationEnd=g,k.addEventListener("animationend",g,!1),k.addEventListener("webkitAnimationEnd",g,!1),k.addEventListener("mozAnimationEnd",g,!1),k.addEventListener("oAnimationEnd",g,!1),k.addEventListener("msAnimationEnd",g,!1),j.split(" ").forEach(function(a){a=a.trim(),a.length>0&&(l.add(a),m.add(a))})):a.setTimeout(f.resolve,0),f},t._destroy=function(){var a,b=this,c=b.element,d=b._ui,e=d.wrapper;if(e){for(a=e.firstChild;a;)c.appendChild(a),a=e.firstChild;e.parentNode&&e.parentNode.removeChild(e)}b._unbindEvents(c),b._setOverlay(c,!1),d.wrapper=null},l.prototype=t,c.widget.core.Popup=l,g.defineWidget("Popup","[data-role='popup'], .ui-popup",["open","close","reposition"],l,"core")}(d),function(a,b,c){"use strict";var d=c.widget.core.Popup,e=(d.prototype,c.engine),f=c.util.object,g={toastDuration:2e3,transition:"slideup"},h={DURING_OPENING:0,OPENED:1,DURING_CLOSING:2,CLOSED:3},i=f.merge({},d.classes,{popup:"ui-toast",active:"ui-toast-active",overlay:"ui-toast-overlay",header:"ui-toast-header",footer:"ui-toast-footer",content:"ui-toast-content",wrapper:"ui-toast-wrapper",build:"ui-build"}),j={header:"."+i.header,content:"."+i.content,footer:"."+i.footer},k="toast",l={show:k+"show",hide:k+"hide",before_show:k+"beforeshow",before_hide:k+"beforehide"},m=function(){var a=this;d.call(a),a.selectors=j,a.options=f.merge(a.options,g),a.events=l,a.classes=i,a._timeOutId=null},n=new d;n._onClickOverlay=function(a){var b=this.options;a.preventDefault(),a.stopPropagation(),b.dismissible&&this.close()},n._setActive=function(a){var b=this,c=i.active,d=b.element.classList;a?(d.add(c),b.state=h.OPENED):(d.remove(c),b.state=h.CLOSED)},n.open=function(a){var b,c=this;c._isActive()||(c._storeOpenOptions(a),b=f.merge(c.options,a),c._show(b),c._timeOutId=setTimeout(function(){c._isActive()&&c.close()},c.options.toastDuration))},n.close=function(a){var b=this,c=f.merge(b.options,a);clearTimeout(b._timeOutId),b._timeOutId=null,b._isActive()&&b._hide(c)},n._bindEvents=function(){var b=this;a.addEventListener("resize",b,!1),b._bindOverlayEvents()},n._unbindEvents=function(){var b=this;a.removeEventListener("resize",b,!1),b._unbindOverlayEvents()},m.prototype=n,c.widget.core.Toast=m,e.defineWidget("Toast","[data-role='toast'], .ui-toast",["open","close","reposition"],m,"core",!0)}(a,a.document,d),function(a,b,c){"use strict";var d=function(b,c){return new a.event.gesture.Instance(b,c)};d.defaults={triggerEvent:!1,updateVelocityInterval:16,estimatedPointerTimeDifference:15},d.Orientation={VERTICAL:"vertical",HORIZONTAL:"horizontal"},d.Direction={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right"},d.Event={START:"start",MOVE:"move",END:"end",CANCEL:"cancel",BLOCKED:"blocked"},d.Result={PENDING:1,RUNNING:2,FINISHED:4,BLOCK:8},d.plugin={},d.createDetector=function(a,b,c){if(!d.plugin[a])throw a+" gesture is not supported";return new d.plugin[a](b,c)},a.event.gesture=d}(d,a),function(a,b,c){"use strict";var d=a.event.gesture;d.utils={getCenter:function(a){var c=[],d=[];return[].forEach.call(a,function(a){c.push(isNaN(a.clientX)?a.pageX:a.clientX),d.push(isNaN(a.clientY)?a.pageY:a.clientY)}),{clientX:(b.min.apply(b,c)+b.max.apply(b,c))/2,clientY:(b.min.apply(b,d)+b.max.apply(b,d))/2}},getVelocity:function(a,c,d){return{x:b.abs(c/a)||0,y:b.abs(d/a)||0}},getAngle:function(a,c){var d=c.clientY-a.clientY,e=c.clientX-a.clientX;return 180*b.atan2(d,e)/b.PI},getDirection:function(a,c){var e=b.abs(a.clientX-c.clientX),f=b.abs(a.clientY-c.clientY);return e>=f?a.clientX-c.clientX>0?d.Direction.LEFT:d.Direction.RIGHT:a.clientY-c.clientY>0?d.Direction.UP:d.Direction.DOWN},getDistance:function(a,c){var d=c.clientX-a.clientX,e=c.clientY-a.clientY;return b.sqrt(d*d+e*e)},getScale:function(a,b){return a.length>=2&&b.length>=2?this.getDistance(b[0],b[1])/this.getDistance(a[0],a[1]):1},getRotation:function(a,b){return a.length>=2&&b.length>=2?this.getAngle(b[1],b[0])-this.getAngle(a[1],a[0]):0},isVertical:function(a){return a===d.Direction.UP||a===d.Direction.DOWN},isHorizontal:function(a){return a===d.Direction.LEFT||a===d.Direction.RIGHT},getOrientation:function(a){return this.isVertical(a)?d.Orientation.VERTICAL:d.Orientation.HORIZONTAL}}}(d,a.Math),function(a,b,c){"use strict";var d=a.event.gesture,e=a.util.object.merge,f=function(a,b){this.sender=b,this.strategy=a.create(),this.name=this.strategy.name,this.index=this.strategy.index||100,this.options=this.strategy.options||{}};f.prototype.detect=function(a){return this.strategy.handler(a,this.sender,this.strategy.options)},f.Sender={sendEvent:function(){}},f.plugin={},f.plugin.create=function(a){a.types||(a.types=[a.name]);var b=f.plugin[a.name]=function(b){this.options=e({},a.defaults,b)};return b.prototype.create=function(){return e({options:this.options},a)},b},d.Detector=f}(d,a),function(a,b,c){"use strict";var d=a.event.gesture,e=a.util.object.merge,f="ontouchstart"in b;d.Manager=function(){var a=null,b=null,g=!1,h=!1,i=function(){this.instances=[],this.gestureDetectors=[],this.runningDetectors=[],this.detectorRequestedBlock=null,this.unregisterBlockList=[],this.gestureEvents=null,this.velocity=null};return i.prototype={_bindStartEvents:function(a){var b=a.getElement();f&&b.addEventListener("touchstart",this),b.addEventListener("mousedown",this)},_bindEvents:function(){f&&(c.addEventListener("touchmove",this),c.addEventListener("touchend",this),c.addEventListener("touchcancel",this)),c.addEventListener("mousemove",this),c.addEventListener("mouseup",this)},_unbindStartEvents:function(a){var b=a.getElement();f&&b.removeEventListener("touchstart",this),b.removeEventListener("mousedown",this)},_unbindEvents:function(){f&&(c.removeEventListener("touchmove",this),c.removeEventListener("touchend",this),c.removeEventListener("touchcancel",this)),c.removeEventListener("mousemove",this),c.removeEventListener("mouseup",this)},handleEvent:function(a){var b=a.type.toLowerCase();if(b.match(/touch/)&&(h=!0),!b.match(/mouse/)||!h&&1===a.which)switch(a.type){case"mousedown":case"touchstart":this._start(a);break;case"mousemove":case"touchmove":this._move(a);break;case"mouseup":case"touchend":this._end(a);break;case"touchcancel":this._cancel(a)}},_start:function(a){var b=a.currentTarget,c={},f=[];g||(this._resetDetecting(),this._bindEvents(),c=this._createDefaultEventData(d.Event.START,a),this.gestureEvents={start:c,last:c},this.velocity={event:c,x:0,y:0},c=e(c,this._createGestureEvent(d.Event.START,a)),g=!0),this.instances.forEach(function(a){a.getElement()===b&&(f=f.concat(a.getGestureDetectors()))},this),f.sort(function(a,b){return a.index<b.index?-1:a.index>b.index?1:0}),this.gestureDetectors=this.gestureDetectors.concat(f),this._detect(f,c)},_move:function(a){g&&(a=this._createGestureEvent(d.Event.MOVE,a),this._detect(this.gestureDetectors,a),this.gestureEvents.last=a)},_end:function(a){a=e({},this.gestureEvents.last,this._createDefaultEventData(d.Event.END,a)),a.pointers.length>0||(this._detect(this.gestureDetectors,a),this.unregisterBlockList.forEach(function(a){this.unregist(a)},this),this._resetDetecting(),h=!1)},_cancel:function(a){a=e({},this.gestureEvents.last,this._createDefaultEventData(d.Event.CANCEL,a)),this._detect(this.gestureDetectors,a),this.unregisterBlockList.forEach(function(a){this.unregist(a)},this),this._resetDetecting(),h=!1},_detect:function(a,b){var c=[];a.forEach(function(a){var e;this.detectorRequestedBlock||(e=a.detect(b),e&d.Result.RUNNING&&this.runningDetectors.indexOf(a)<0&&this.runningDetectors.push(a),e&d.Result.FINISHED&&c.push(a),e&d.Result.BLOCK&&(this.detectorRequestedBlock=a))},this),c.forEach(function(a){var b;b=this.gestureDetectors.indexOf(a),b>-1&&this.gestureDetectors.splice(b,1),b=this.runningDetectors.indexOf(a),b>-1&&this.runningDetectors.splice(b,1)},this),this.detectorRequestedBlock&&(this.runningDetectors.forEach(function(a){var c=e({},b,{eventType:d.Event.BLOCKED});a.detect(c)}),this.runningDetectors.length=0,this.gestureDetectors.length=0,c.indexOf(this.detectorRequestedBlock)<0&&this.gestureDetectors.push(this.detectorRequestedBlock))},_resetDetecting:function(){g=!1,b=null,this.gestureDetectors.length=0,this.runningDetectors.length=0,this.detectorRequestedBlock=null,this.gestureEvents=null,this.velocity=null,this._unbindEvents()},_createDefaultEventData:function(a,b){var c=b.touches?b.touches:"mouseup"===b.type?[]:b.identifier=[b],d=c[0],e=(new Date).getTime();return{eventType:a,timeStamp:e,pointer:d,pointers:c,srcEvent:b,preventDefault:function(){this.srcEvent.preventDefault()},stopPropagation:function(){this.srcEvent.stopPropagation()}}},_createGestureEvent:function(a,b){var c,f=this._createDefaultEventData(a,b),g=this.gestureEvents.start,h=this.gestureEvents.last,i=this.velocity.event,j={time:f.timeStamp-g.timeStamp,x:f.pointer.clientX-g.pointer.clientX,y:f.pointer.clientY-g.pointer.clientY},k={x:f.pointer.clientX-h.pointer.clientX,y:f.pointer.clientY-h.pointer.clientY},l=this.velocity,m=d.defaults.estimatedPointerTimeDifference;return g&&f.pointers.length!==g.pointers.length&&(g.pointers=[],[].forEach.call(f.pointers,function(a){g.pointers.push(e({},a))})),f.timeStamp-i.timeStamp>d.defaults.updateVelocityInterval&&(this.velocity=d.utils.getVelocity(f.timeStamp-i.timeStamp,f.pointer.clientX-i.pointer.clientX,f.pointer.clientY-i.pointer.clientY),e(this.velocity,l,{direction:d.utils.getDirection(i.pointer,f.pointer),event:f})),c={x:Math.round(f.pointer.clientX+m*l.x*(k.x<0?-1:1)),y:Math.round(f.pointer.clientY+m*l.y*(k.y<0?-1:1))},(k.x<0&&c.x>h.estimatedX||k.x>0&&c.x<h.estimatedX)&&(c.x=h.estimatedX),(k.y<0&&c.y>h.estimatedY||k.y>0&&c.y<h.estimatedY)&&(c.y=h.estimatedY),e(f,{deltaTime:j.time,deltaX:j.x,deltaY:j.y,velocityX:l.x,velocityY:l.y,velocityDirection:l.direction,estimatedX:c.x,estimatedY:c.y,estimatedDeltaX:c.x-g.pointer.clientX,estimatedDeltaY:c.y-g.pointer.clientY,distance:d.utils.getDistance(g.pointer,f.pointer),angle:d.utils.getAngle(g.pointer,f.pointer),direction:d.utils.getDirection(g.pointer,f.pointer),scale:d.utils.getScale(g.pointers,f.pointers),rotation:d.utils.getRotation(g.pointers,f.pointers),startEvent:g,lastEvent:h}),f},register:function(a){var b=this.instances.indexOf(a);0>b&&(this.instances.push(a),this._bindStartEvents(a))},unregister:function(a){var b;return this.gestureDetectors.length?void this.unregisterBlockList.push(a):(b=this.instances.indexOf(a),b>-1&&(this.instances.splice(b,1),this._unbindStartEvents(a)),void(this.instances.length||this._destroy()))},_destroy:function(){this._resetDetecting(),this.instances.length=0,this.unregisterBlockList.length=0,h=!1,a=null}},{getInstance:function(){return a?a:a=new i}}}()}(d,a,a.document),function(a,b,c){"use strict";var d=a.event.gesture,e=a.event.gesture.Detector,f=a.event.gesture.Manager,g=a.event,h=a.util.object.merge;d.Instance=function(a,b){this.element=a,this.eventDetectors=[],this.options=h({},d.defaults,b),this.gestureManager=null,this._init()},d.Instance.prototype={_init:function(){this.gestureManager=f.getInstance(),this.eventSender=h({},e.Sender,{
  sendEvent:this.trigger.bind(this)})},_findGestureDetector:function(a){var b,c,d=e.plugin;for(c in d)if(d.hasOwnProperty(c)&&(b=d[c],b.prototype.types.indexOf(a)>-1))return b},setOptions:function(a){return h(this.options,a),this},addDetector:function(a){var b=new e(a,this.eventSender),c=!!this.eventDetectors.length;return this.eventDetectors.push(b),this.eventDetectors.length&&!c&&this.gestureManager.register(this),this},removeDetector:function(a){var b=this.eventDetectors.indexOf(a);return b>-1&&this.eventDetectors.splice(b,1),this.eventDetectors.length||this.gestureManager.unregister(this),this},trigger:function(a,b){return g.trigger(this.element,a,b,!1)},getElement:function(){return this.element},getGestureDetectors:function(){return this.eventDetectors},destroy:function(){this.element=null,this.eventHandlers={},this.gestureManager=null,this.eventSender=null,this.eventDetectors.length=0}}}(d,a),function(a,b,c){"use strict";var d=a.event.gesture,e=a.event.gesture.Detector,f=a.util.object.merge,g=!!b.navigator.userAgent.match(/tizen/i);a.event.gesture.Drag=e.plugin.create({name:"drag",index:500,types:["drag","dragstart","dragend","dragcancel","dragprepare","dragrelease"],defaults:{blockHorizontal:!1,blockVertical:!1,threshold:20,delay:0},triggerd:!1,handler:function(a,b,c){var e=a,h=c.threshold,i=d.Result.PENDING,j={drag:this.types[0],start:this.types[1],end:this.types[2],cancel:this.types[3],prepare:this.types[4],release:this.types[5]},k=e.direction;if(!this.triggerd&&e.eventType===d.Event.MOVE){if(Math.abs(e.deltaX)<h&&Math.abs(e.deltaY)<h)return g||e.preventDefault(),d.Result.PENDING;if(c.delay&&e.deltaTime<c.delay)return g||e.preventDefault(),d.Result.PENDING;if(c.blockHorizontal&&d.utils.isHorizontal(e.direction)||c.blockVertical&&d.utils.isVertical(e.direction))return b.sendEvent(j.release,e),d.Result.FINISHED;this.fixedStartPointX=0,this.fixedStartPointY=0,d.utils.isHorizontal(e.direction)?this.fixedStartPointX=(e.deltaX<0?1:-1)*h:this.fixedStartPointY=(e.deltaY<0?1:-1)*h}switch(c.blockHorizontal&&(k=e.deltaY<0?d.Direction.UP:d.Direction.DOWN),c.blockVertical&&(k=e.deltaX<0?d.Direction.LEFT:d.Direction.RIGHT),e=f({},e,{deltaX:e.deltaX+this.fixedStartPointX,deltaY:e.deltaY+this.fixedStartPointY,estimatedDeltaX:e.estimatedDeltaX+this.fixedStartPointX,estimatedDeltaY:e.estimatedDeltaY+this.fixedStartPointY,direction:k}),e.eventType){case d.Event.START:this.triggerd=!1,b.sendEvent(j.prepare,e)===!1&&(i=d.Result.FINISHED);break;case d.Event.MOVE:if(!this.triggerd&&b.sendEvent(j.start,e)===!1){i=d.Result.FINISHED,e.preventDefault();break}i=b.sendEvent(j.drag,e)?d.Result.RUNNING:d.Result.FINISHED,e.preventDefault(),this.triggerd=!0;break;case d.Event.BLOCKED:case d.Event.END:i=d.Result.FINISHED,this.triggerd&&(b.sendEvent(j.end,e),e.preventDefault(),this.triggerd=!1),b.sendEvent(j.release,e);break;case d.Event.CANCEL:i=d.Result.FINISHED,this.triggerd&&(b.sendEvent(j.cancel,e),e.preventDefault(),this.triggerd=!1),b.sendEvent(j.release,e)}return i}})}(d,a),function(a,b,c){"use strict";var d=a.event.gesture,e=a.event.gesture.Detector;a.event.gesture.Swipe=e.plugin.create({name:"swipe",index:400,defaults:{timeThreshold:400,velocity:.6,orientation:d.Orientation.HORIZONTAL},handler:function(a,b,c){var e=a,f=d.Result.PENDING;return e.eventType!==d.Event.END?f:e.deltaTime>c.timeThreshold||c.orientation!==d.utils.getOrientation(e.direction)?f=d.Result.FINISHED:((e.velocityX>c.velocity||e.velocityY>c.velocity)&&(b.sendEvent(this.name,a),f=d.Result.FINISHED|d.Result.BLOCK),f)}})}(d,a),function(a,b,c){"use strict";var d=a.event.gesture,e=a.event.gesture.Detector;a.event.gesture.Pinch=e.plugin.create({name:"pinch",index:300,types:["pinchstart","pinchmove","pinchend","pinchcancel","pinchin","pinchout"],defaults:{velocity:.6,timeThreshold:400},triggerd:!1,handler:function(a,b,c){var e=a,f=d.Result.PENDING,g={start:this.types[0],move:this.types[1],end:this.types[2],cancel:this.types[3],"in":this.types[4],out:this.types[5]};switch(e.eventType){case d.Event.MOVE:if(1===e.pointers.length&&e.distance>35)return f=d.Result.FINISHED;if(!this.triggerd&&e.pointers.length>=2)this.triggerd=!0,b.sendEvent(g.start,e),e.preventDefault(),f=d.Result.RUNNING;else if(this.triggerd){if(e.deltaTime<c.timeThreshold&&(e.velocityX>c.velocity||e.velocityY>c.velocity))return e.scale<1?b.sendEvent(g["in"],a):b.sendEvent(g.out,a),e.preventDefault(),this.triggerd=!1,f=d.Result.FINISHED|d.Result.BLOCK;b.sendEvent(g.move,e),e.preventDefault(),f=d.Result.RUNNING}break;case d.Event.BLOCKED:case d.Event.END:this.triggerd&&(b.sendEvent(g.end,e),e.preventDefault(),this.triggerd=!1,f=d.Result.FINISHED);break;case d.Event.CANCEL:this.triggerd&&(b.sendEvent(g.cancel,e),e.preventDefault(),this.triggerd=!1,f=d.Result.FINISHED)}return f}})}(d,a),function(a,b,c){"use strict";var d=a.event.gesture,e=a.event.gesture.Detector;a.event.gesture.LongPress=e.plugin.create({name:"longpress",index:600,defaults:{longPressTimeThreshold:750,longPressDistanceThreshold:20,preventClick:!0},isTriggered:!1,longPressTimeOutId:0,handler:function(a,b,c){var e=a,f=d.Result.PENDING;switch(e.eventType){case d.Event.START:this.isTriggered=!1,this.longPressTimeOutId=setTimeout(function(){return this.isTriggered=!0,b.sendEvent(this.name,a),f=d.Result.FINISHED}.bind(this),c.longPressTimeThreshold);break;case d.Event.MOVE:e.distance>c.longPressDistanceThreshold&&!this.isTriggered&&(clearTimeout(this.longPressTimeOutId),f=d.Result.FINISHED);break;case d.Event.END:this.isTriggered?c.preventClick&&e.preventDefault():clearTimeout(this.longPressTimeOutId),f=d.Result.FINISHED}return f}})}(d,a),function(a){"use strict";function b(a){var b;return d.forEach(function(c){c.element===a&&(b=c.instance)}),b}function c(a){d.forEach(function(b,c){b.element===a&&d.splice(c,1)})}var d=[],e=a.event.gesture||{};a.event.enableGesture=function(){var a=arguments[0],c=b(a),f=arguments.length,g=1;for(c||(c=new e.Instance(a),d.push({element:a,instance:c}));f>g;g++)c.addDetector(arguments[g])},a.event.disableGesture=function(){var a=arguments[0],d=b(a),e=arguments.length,f=1;d&&(e>1?d.removeDetector(arguments[f]):(d.destroy(),c(a)))},a.event.gesture=e}(d),function(a,b){"use strict";b.widget.core.scroller=b.widget.core.scroller||{}}(a,d),function(a,b){"use strict";b.widget.core.scroller.effect=b.widget.core.scroller.effect||{}}(a,d),function(a,b){"use strict";var c=b.util.object,d=b.util.selectors,e=function(a,d){var f=this;f._orientation=null,f._maxValue=null,f._container=null,f._minEffectElement=null,f._maxEffectElement=null,f.options=c.merge({},e.defaults,{scrollEndEffectArea:b.getConfig("scrollEndEffectArea",e.defaults.scrollEndEffectArea)}),f._targetElement=null,f._isShow=!1,f._isDrag=!1,f._isShowAnimating=!1,f._isHideAnimating=!1,f._create(a,d)},f={content:"content",screen:"screen"},g={duration:500,scrollEndEffectArea:"content"},h={bouncingEffect:"ui-scrollbar-bouncing-effect",page:"ui-page",left:"ui-left",right:"ui-right",top:"ui-top",bottom:"ui-bottom",hide:"ui-hide",show:"ui-show"};e.defaults=g,e.prototype={_create:function(a,b){var c=this;c.options.scrollEndEffectArea===f.content?c._container=a:c._container=d.getClosestByClass(a,h.page),c._orientation=b.orientation,c._maxValue=c._getValue(b.maxScrollX,b.maxScrollY),c._initLayout()},_initLayout:function(){var c=this,d=c._minEffectElement=a.createElement("DIV"),e=c._maxEffectElement=a.createElement("DIV"),f=h.bouncingEffect;c._orientation===b.widget.core.scroller.Scroller.Orientation.HORIZONTAL?(d.className=f+" "+h.left,e.className=f+" "+h.right):(d.className=f+" "+h.top,e.className=f+" "+h.bottom),c._container.appendChild(d),c._container.appendChild(e),d.addEventListener("animationEnd",this),d.addEventListener("webkitAnimationEnd",this),d.addEventListener("mozAnimationEnd",this),d.addEventListener("msAnimationEnd",this),d.addEventListener("oAnimationEnd",this),e.addEventListener("animationEnd",this),e.addEventListener("webkitAnimationEnd",this),e.addEventListener("mozAnimationEnd",this),e.addEventListener("msAnimationEnd",this),e.addEventListener("oAnimationEnd",this)},drag:function(a,b){this._isDrag=!0,this._checkAndShow(a,b)},dragEnd:function(){var a=this;!a._isShow||a._isShowAnimating||a._isHideAnimating||a._beginHide(),a._isDrag=!1},show:function(){var a=this;a._targetElement&&(a._isShow=!0,a._beginShow())},hide:function(){var a=this;a._isShow&&(a._minEffectElement.style.display="none",a._maxEffectElement.style.display="none",a._targetElement.classList.remove(h.hide),a._targetElement.classList.remove(h.show)),a._isShow=!1,a._isShowAnimating=!1,a._isHideAnimating=!1,a._targetElement=null},_checkAndShow:function(a,b){var c=this,d=c._getValue(a,b);c._isShow?!c._isShow||c._isDrag||c._isShowAnimating||c._isHideAnimating||c._beginHide():d>=0?(c._targetElement=c._minEffectElement,c.show()):d<=c._maxValue&&(c._targetElement=c._maxEffectElement,c.show())},_getValue:function(a,c){return this._orientation===b.widget.core.scroller.Scroller.Orientation.HORIZONTAL?a:c},_beginShow:function(){var a=this;a._targetElement&&!a._isShowAnimating&&(a._targetElement.style.display="block",a._targetElement.classList.remove(h.hide),a._targetElement.classList.add(h.show),a._isShowAnimating=!0,a._isHideAnimating=!1)},_finishShow:function(){var a=this;a._isShowAnimating=!1,a._isDrag||(a._targetElement.classList.remove(h.show),a._beginHide())},_beginHide:function(){var a=this;a._isHideAnimating||(a._targetElement.classList.remove(h.show),a._targetElement.classList.add(h.hide),a._isHideAnimating=!0,a._isShowAnimating=!1)},_finishHide:function(){var a=this;a._isHideAnimating=!1,a._targetElement.classList.remove(h.hide),a.hide(),a._checkAndShow()},handleEvent:function(a){a.type.toLowerCase().indexOf("animationend")>-1&&(this._isShowAnimating?this._finishShow():this._isHideAnimating&&this._finishHide())},destroy:function(){var a=this,b=this._maxEffectElement,c=this._minEffectElement;c.removeEventListener("animationEnd",this),c.removeEventListener("webkitAnimationEnd",this),c.removeEventListener("mozAnimationEnd",this),c.removeEventListener("msAnimationEnd",this),c.removeEventListener("oAnimationEnd",this),b.removeEventListener("animationEnd",this),b.removeEventListener("webkitAnimationEnd",this),b.removeEventListener("mozAnimationEnd",this),b.removeEventListener("msAnimationEnd",this),b.removeEventListener("oAnimationEnd",this),a._container.removeChild(c),a._container.removeChild(b),a._container=null,a._minEffectElement=null,a._maxEffectElement=null,a._targetElement=null,a._isShow=null,a._orientation=null,a._maxValue=null}},b.widget.core.scroller.effect.Bouncing=e}(a.document,d),function(b,c){"use strict";var d=c.widget.BaseWidget,e=(c.event.gesture,c.engine),f=c.util.object,g=c.event,h=g.trigger,i=new d,j=c.widget.core.scroller.effect.Bouncing,k={START:"scrollstart",MOVE:"scrollmove",END:"scrollend",CANCEL:"scrollcancel"},l=!1,m=function(){};m.Orientation={VERTICAL:"vertical",HORIZONTAL:"horizontal"},m.EventType=k,i._build=function(a){if(1!==a.children.length)throw"scroller has only one child.";return this.scroller=a.children[0],this.scrollerStyle=this.scroller.style,this.bouncingEffect=null,this.scrollbar=null,this.scrollerWidth=0,this.scrollerHeight=0,this.scrollerOffsetX=0,this.scrollerOffsetY=0,this.maxScrollX=0,this.maxScrollY=0,this.startScrollerOffsetX=0,this.startScrollerOffsetY=0,this.orientation=null,this.enabled=!0,this.scrolled=!1,this.dragging=!1,this.scrollCanceled=!1,a},i._configure=function(){this.options=f.merge({},this.options,{scrollDelay:0,threshold:30,scrollbar:"",useBouncingEffect:!1,orientation:"vertical"})},i._init=function(a){var b=this.options,c=this.scroller.children,d=this.element.style,e=this.scroller.style,f=this.element.offsetWidth/2,g=this.element.offsetHeight/2;return this.orientation=this.orientation?this.orientation:"horizontal"===b.orientation?m.Orientation.HORIZONTAL:m.Orientation.VERTICAL,this.scrollerWidth=this.scroller.offsetWidth,this.scrollerHeight=this.scroller.offsetHeight,this.maxScrollX=f-this.scrollerWidth+c[c.length-1].offsetWidth/2,this.maxScrollY=g-this.scrollerHeight+c[c.length-1].offsetHeight/2,this.minScrollX=f-c[0].offsetWidth/2,this.minScrollY=g-c[0].offsetHeight/2,this.scrolled=!1,this.touching=!0,this.scrollCanceled=!1,this.orientation===m.Orientation.HORIZONTAL?this.maxScrollY=0:this.maxScrollX=0,d.overflow="hidden",d.position="relative",e.position="absolute",e.top="0px",e.left="0px",e.width=this.scrollerWidth+"px",e.height=this.scrollerHeight+"px",this._initScrollbar(),this._initBouncingEffect(),a},i._initScrollbar=function(){var a,b=this.options.scrollbar;b&&(a=c.widget.core.scroller.scrollbar.type[b],a&&(this.scrollbar=e.instanceWidget(this.element,"ScrollBar",{type:a,orientation:this.orientation})))},i._initBouncingEffect=function(){var a=this.options;a.useBouncingEffect&&(this.bouncingEffect=new j(this.element,{maxScrollX:this.maxScrollX,maxScrollY:this.maxScrollY,orientation:this.orientation}))},i._resetLayout=function(){var a=this.element.style,b=this.scrollerStyle;a.overflow="",a.position="",a.overflow="hidden",a.position="relative",b&&(b.position="",b.top="",b.left="",b.width="",b.height="",b["-webkit-transform"]="",b["-moz-transition"]="",b["-ms-transition"]="",b["-o-transition"]="",b.transition="")},i._bindEvents=function(){c.event.enableGesture(this.scroller,new c.event.gesture.Drag({threshold:this.options.threshold,delay:this.options.scrollDelay,blockVertical:this.orientation===m.Orientation.HORIZONTAL,blockHorizontal:this.orientation===m.Orientation.VERTICAL})),g.on(this.scroller,"drag dragstart dragend dragcancel",this),a.addEventListener("resize",this)},i._unbindEvents=function(){this.scroller&&(c.event.disableGesture(this.scroller),g.off(this.scroller,"drag dragstart dragend dragcancel",this),a.removeEventListener("resize",this))},i.handleEvent=function(a){switch(a.type){case"dragstart":this._start(a);break;case"drag":this._move(a);break;case"dragend":this._end(a);break;case"dragcancel":this.cancel(a);break;case"resize":this.refresh()}},i.setOptions=function(a){var b;for(b in a)a.hasOwnProperty(b)&&a[b]&&(this.options[b]=a[b])},i._refresh=function(){this._clear(),this._unbindEvents(),this._init(this.element),this._bindEvents()},i.scrollTo=function(a,b,c){this._translate(a,b,c),this._translateScrollbar(a,b,c)},i._translate=function(b,c,d){var e,f={normal:"none",webkit:"none",moz:"none",ms:"none",o:"none"},g=this.scrollerStyle;d&&(f.normal="transform "+d/1e3+"s ease-out",f.webkit="-webkit-transform "+d/1e3+"s ease-out",f.moz="-moz-transform "+d/1e3+"s ease-out",f.ms="-ms-transform "+d/1e3+"s ease-out",f.o="-o-transform "+d/1e3+"s ease-out"),e="translate3d("+b+"px,"+c+"px, 0)",g["-webkit-transform"]=g["-moz-transform"]=g["-ms-transform"]=g["-o-transform"]=g.transform=e,g.transition=f.normal,g["-webkit-transition"]=f.webkit,g["-moz-transition"]=f.moz,g["-ms-transition"]=f.ms,g["-o-transition"]=f.o,this.scrollerOffsetX=a.parseInt(b,10),this.scrollerOffsetY=a.parseInt(c,10)},i._translateScrollbar=function(a,b,c,d){this.scrollbar&&this.scrollbar.translate(this.orientation===m.Orientation.HORIZONTAL?-a:-b,c,d)},i._start=function(){this.scrolled=!1,this.dragging=!0,this.scrollCanceled=!1,this.startScrollerOffsetX=this.scrollerOffsetX,this.startScrollerOffsetY=this.scrollerOffsetY},i._move=function(a,b){var c=this.startScrollerOffsetX,d=this.startScrollerOffsetY,e=!l;this.enabled&&!this.scrollCanceled&&this.dragging&&(this.orientation===m.Orientation.HORIZONTAL?c+=a.detail.estimatedDeltaX:d+=a.detail.estimatedDeltaY,(c>this.minScrollX||c<this.maxScrollX)&&(c=c>this.minScrollX?this.minScrollX:this.maxScrollX),(d>this.minScrollY||d<this.maxScrollY)&&(d=d>this.minScrollY?this.minScrollY:this.maxScrollY),c!==this.scrollerOffsetX||d!==this.scrollerOffsetY?(this.scrolled||this._fireEvent(k.START),this.scrolled=!0,this._translate(c,d),this._translateScrollbar(c,d,0,e),this._fireEvent(k.MOVE),this.bouncingEffect&&this.bouncingEffect.hide()):(this.bouncingEffect&&this.bouncingEffect.drag(c,d),this._translateScrollbar(c,d,0,e)))},i._end=function(){this.dragging&&(this.bouncingEffect&&this.bouncingEffect.dragEnd(),this.scrollbar&&this.scrollbar.end(),this._endScroll(),this.dragging=!1)},i._endScroll=function(){this.scrolled&&this._fireEvent(k.END),this.scrolled=!1},i.cancel=function(){this.scrollCanceled=!0,this.scrolled&&(this._translate(this.startScrollerOffsetX,this.startScrollerOffsetY),this._translateScrollbar(this.startScrollerOffsetX,this.startScrollerOffsetY),this._fireEvent(k.CANCEL)),this.scrollbar&&this.scrollbar.end(),this.scrolled=!1,this.dragging=!1},i._fireEvent=function(a,b){h(this.element,a,b)},i._clear=function(){this.scrolled=!1,this.scrollCanceled=!1,this._resetLayout(),this._clearScrollbar(),this._clearBouncingEffect()},i._clearScrollbar=function(){this.scrollbar&&this.scrollbar.destroy(),this.scrollbar=null},i._clearBouncingEffect=function(){this.bouncingEffect&&this.bouncingEffect.destroy(),this.bouncingEffect=null},i._disable=function(){this.enabled=!1},i._enable=function(){this.enabled=!0},i._destroy=function(){this._clear(),this._unbindEvents(),this.scrollerStyle=null,this.scroller=null},m.prototype=i,c.widget.core.scroller.Scroller=m,e.defineWidget("Scroller",".scroller",["scrollTo","cancel"],m)}(a.document,d),function(a){"use strict";function b(a,b,d){a.forEach(function(a){c.matchesSelector(a,b)&&a.classList.add(d)})}var c=a.util.selectors,d=[].slice,e=[null,"solo","a","b","c","d"];a.util.grid={makeGrid:function(a,c){var f,g=a.classList,h=d.call(a.children);c||(c=e[h.length],c||(c="a",f=2,g.add("ui-grid-duo"))),f||(f=e.indexOf(c)),g.add("ui-grid-"+c),b(h,":nth-child("+f+"n+1)","ui-block-a"),f>1&&b(h,":nth-child("+f+"n+2)","ui-block-b"),f>2&&b(h,":nth-child("+f+"n+3)","ui-block-c"),f>3&&b(h,":nth-child("+f+"n+4)","ui-block-d"),f>4&&b(h,":nth-child("+f+"n+5)","ui-block-e")}}}(d),function(a,b,c){"use strict";function d(a,b,c,d){var e,f,g,h;for(e=0,f=d.length;f>e;++e)h=d[e],(isNaN(c[h])===!1||isNaN(a[h])===!1)&&(g=Object.getOwnPropertyDescriptor(b,h),"detail"===h||g&&!g.writable||(b[h]=c[h]||a[h]))}function e(a,b,c){var e,f,g,h,i=new CustomEvent(a,{bubbles:b.bubbles,cancelable:b.cancelable,detail:b.detail}),j=b.type,k=0;if(d(b,i,c,w),i._originalEvent=b,-1!==j.indexOf("touch")&&(j=b.touches,e=b.changedTouches,f=j&&j.length?j[0]:e&&e.length?e[0]:null))for(g=C.length;g>k;k++)h=C[k],i[h]=f[h];return i}function f(a,b,c){return b.target.dispatchEvent(e(a,b,c||{}))}function g(a){f("vmousedown",a)}function h(a){var b=a.clientX,c=a.clientY;return b||c?void 0:s(a)}function i(a){f("vclick",a,h(a))}function j(a){f("vmouseup",a)}function k(a){f("vmousemove",a)}function l(a){f("vmouseover",a)}function m(a){f("vmouseout",a)}function n(a){var c,d,e=a.touches;e&&1===e.length&&(x=!1,c=e[0],A=c.pageX,B=c.pageY,d=b.elementFromPoint(A,B),d&&(z=d,f("vmouseover",a)),f("vmousedown",a))}function o(a){var b=a.touches;b&&0===b.length&&(f("vmouseup",a),f("vmouseout",a),z=null)}function p(a){var c,d=a.touches&&a.touches[0],e=x,g=v.eventDistanceThreshold;return d.identifier>0?(a.preventDefault(),void a.stopPropagation()):(x=x||Math.abs(d.pageX-A)>g||Math.abs(d.pageY-B)>g,c=b.elementFromPoint(d.pageX,d.pageY),c&&z!==c&&(z=c,f("vmouseover",a)),x&&!e&&(f("vmousecancel",a),z=null),void f("vmousemove",a))}function q(a){x||f("vmousecancel",a),x=!0}function r(a){f("vmousecancel",a),z=null}function s(a){var b=a.target&&a.target.getBoundingClientRect(),c={};return b&&(c={clientX:b.left+b.width/2,clientY:b.top+b.height/2,which:1}),c}function t(a){var b;a.keyCode===D.enter&&(b=s(a),f("vmouseup",a,b),f("vclick",a,b))}function u(a){a.keyCode===D.enter&&f("vmousedown",a,s(a))}var v,w,x,y=a.hasOwnProperty("ontouchstart"),z=null,A=0,B=0,C=["clientX","clientY","pageX","pageY","screenX","screenY"],D={enter:13};w=["currentTarget","detail","button","buttons","clientX","clientY","offsetX","offsetY","pageX","pageY","screenX","screenY","toElement","which"],v={eventDistanceThreshold:10,touchSupport:y},v.bindCommonEvents=function(){b.addEventListener("keyup",t,!0),b.addEventListener("keydown",u,!0),b.addEventListener("scroll",q,!0),b.addEventListener("click",i,!0)},v.bindTouch=function(){b.addEventListener("touchstart",n,!0),b.addEventListener("touchend",o,!0),b.addEventListener("touchmove",p,!0),b.addEventListener("touchcancel",r,!0),b.addEventListener("touchcancel",r,!0)},v.bindMouse=function(){b.addEventListener("mousedown",g,!0),b.addEventListener("mouseup",j,!0),b.addEventListener("mousemove",k,!0),b.addEventListener("mouseover",l,!0),b.addEventListener("mouseout",m,!0)},c.event.vmouse=v,y?v.bindTouch():v.bindMouse(),v.bindCommonEvents()}(a,a.document,d),function(a){"use strict";a.util.easing={cubicOut:function(a,b,c,d){return a/=d,a--,c*(a*a*a+1)+b},easeOutQuad:function(a,b,c,d){return-c*(a/=d)*(a-2)+b},easeOutExpo:function(a,b,c,d){return a===d?b+c:c*(-Math.pow(2,-10*a/d)+1)+b},linear:function(a,b,c,d){return b+d*a}}}(d),function(a,b,d){"use strict";var e,f=b.body,g=null,h=d.event,i={supported:a.orientation!==c&&a.onorientationchange!==c,getOrientation:function(){return g},trigger:function(a){h.trigger(a,"orientationchange",{orientation:g})},properties:["orientation"]},j=function(b){var c=a.innerWidth,d=a.innerHeight;a.screen&&(c=a.screen.availWidth,d=a.screen.availHeight),g=c>d?"landscape":"portrait",b||h.trigger(a,"orientationchange",{orientation:g})},k=function(){if(a.orientation)switch(a.orientation){case 90:case-90:g="portrait";break;default:g="landscape"}else j(!0)},l=function(b){g=b.matches?"portrait":"landscape",h.trigger(a,"orientationchange",{orientation:g})};i.supported?(a.addEventListener("orientationchange",k,!1),k()):a.matchMedia?(e=a.matchMedia("(orientation: portrait)"),g=e.matches?"portrait":"landscape",e.addListener(l)):(f.addEventListener("throttledresize",j),j()),d.event.orientationchange=i}(a,a.document,d),function(a,b,c){"use strict";function d(a){"static"===o.getCSSProperty(a,"position")?a.style.position="relative":a.style.position="absolute"}function e(a,b,c,d,e,f,g,h,i,j){var k=(new Date).getTime()-c,n=parseInt(m.cubicOut(k,d,f,j),10),o=parseInt(m.cubicOut(k,e,g,j),10);b.scrollLeft!==h&&(b.scrollLeft=n),b.scrollTop!==i&&(b.scrollTop=o),(n!==h||o!==i)&&n>=0&&o>=0&&a.currentTransition?l.requestAnimationFrame(a.currentTransition):a.currentTransition=null}function f(a,b,c,d,f){f?(a.currentTransition=e.bind(null,a,b,(new Date).getTime(),b.scrollLeft,b.scrollTop,c,d,b.scrollLeft+c,b.scrollTop+d,f),l.requestAnimationFrame(a.currentTransition)):(c&&(b.scrollLeft=b.scrollLeft+c),d&&(b.scrollTop=b.scrollTop+d))}function g(a){var b=a._ui,c=b.jumpHorizontalButton,d=b.jumpVerticalButton,e=c||d?o.getElementOffset(a.element):null;c&&(c.style.left=e.left+"px"),d&&(d.style.top=e.top+"px")}function h(a){var b=a.classList,c=p.getChildrenByClass(a,v.indicatorTop)[0],d=p.getChildrenByClass(a,v.indicatorBottom)[0];b.remove(v.indicatorTopShown),b.remove(v.indicatorBottomShown),b.remove(v.indicatorRightShown),b.remove(v.indicatorLeftShown),c.style="",d.style=""}function i(a,b){var c,d=p.getChildrenByClass(a,v.indicatorTop)[0],e=p.getChildrenByClass(a,v.indicatorBottom)[0];d&&(c=d.style,c.width=b.width+"px",c.top=b.clipTop+"px",c.backgroundColor=b.color),e&&(c=e.style,c.width=b.width+"px",c.top=b.clipTop+b.clipHeight-o.getElementHeight(e)+"px",c.backgroundColor=b.color)}var j=c.widget.BaseWidget,k=c.engine,l=c.util,m=c.util.easing,n=c.event,o=c.util.DOM,p=c.util.selectors,q=null,r=c.widget.core.Page,s=r.classes.uiPage,t=r.classes.uiPageActive,u=function(){var a,b=this;b.state={currentTransition:null},b.scrollDuration=300,b.scrollviewSetHeight=!1,b.options={scroll:"y",scrollJump:!1,scrollIndicator:!1},a=b._ui||{},a.view=null,a.page=null,a.jumpHorizontalButton=null,a.jumpVerticalButton=null,b._ui=a,b._callbacks={repositionJumps:null,jumpTop:null,jumpBottom:null},b._timers={scrollIndicatorHide:null}},v={view:"ui-scrollview-view",clip:"ui-scrollview-clip",jumpTop:"ui-scroll-jump-top-bg",jumpLeft:"ui-scroll-jump-left-bg",indicatorTop:"ui-overflow-indicator-top",indicatorBottom:"ui-overflow-indicator-bottom",indicatorTopShown:"ui-scrollindicator-top",indicatorBottomShown:"ui-scrollindicator-bottom",indicatorLeftShown:"ui-scrollindicator-left",indicatorRightShown:"ui-scrollindicator-right"};u.classes=v,u.prototype=new j,u.prototype._build=function(a){var c,e,f=this,g=f._ui,h=p.getChildrenByClass(a,v.view)[0]||b.createElement("div"),i=a.style,j=null,l=a.firstChild,m=f.options,n=m.scroll;for(h.className=v.view;l;)j=l,l=l.nextSibling,h!==j&&h.appendChild(j);switch(h.parentNode!==a&&a.appendChild(h),d(h),a.classList.add(v.clip),n){case"x":i.overflowX="scroll";break;case"xy":i.overflow="scroll";break;default:i.overflowY="auto"}return m.scrollJump&&(n.indexOf("x")>-1&&(e=b.createElement("div"),e.className=v.jumpLeft,c=b.createElement("div"),e.appendChild(c),a.appendChild(e),k.instanceWidget(c,"Button",{icon:"scrollleft",style:"box"}),g.jumpHorizontalButton=e),n.indexOf("y")>-1&&(e=b.createElement("div"),e.className=v.jumpTop,c=b.createElement("div"),e.appendChild(c),a.appendChild(e),k.instanceWidget(c,"Button",{icon:"scrolltop",style:"box"}),g.jumpVerticalButton=e)),g.view=h,m.scrollIndicator&&f._addOverflowIndicator(a),a},u.prototype._init=function(a){var b=this._ui,c=b.page;b.view||(b.view=p.getChildrenByClass(a,v.view)[0]),c||(c=p.getClosestByClass(a,s),c&&(b.page=c,c.classList.contains(t)&&this.options.scrollJump&&g(this)))},u.prototype._addOverflowIndicator=function(a){a.insertAdjacentHTML("beforeend","<div class='"+v.indicatorTop+"'></div><div class='"+v.indicatorBottom+"'></div>")},u.prototype._showScrollIndicator=function(){var b=this,c=b.element,d=b._ui.view,e=c.scrollTop,f=o.getElementHeight(c),g=o.getElementOffset(c),j=o.getElementHeight(d),k=o.getElementWidth(d),l=o.getElementOffset(d);switch(h(c),b.options.scroll){case"x":break;case"xy":break;default:i(c,{clipTop:g.top,clipHeight:f,width:k,color:a.getComputedStyle(c).backgroundColor}),l.top-e<g.top&&c.classList.add(v.indicatorTopShown),l.top-e+j>g.top+f&&c.classList.add(v.indicatorBottomShown)}},u.prototype._hideScrollIndicator=function(){var b=this,c=b._timers,d=c.scrollIndicatorHide;d&&a.clearTimeout(d),c.scrollIndicatorHide=a.setTimeout(function(){h(b.element)},1500)},u.prototype.scrollTo=function(a,b,c){var d=this.element;this.translateTo(a-d.scrollLeft,b-d.scrollTop,c)},u.prototype.translateTo=function(a,b,c){f(this.state,this.element,a,b,c)},u.prototype.ensureElementIsVisible=function(a){var b,c,d,e,f,g=this.element,h=o.getElementHeight(g),i=o.getElementWidth(g),j=0,k=h,l=o.getElementHeight(a),m=o.getElementWidth(a),n=0,p=h>=l&&i>=m,q=function(a){var b=a.getAttribute("id"),c=a.tagName.toLowerCase();return b&&["input","textarea","button"].indexOf(c)>-1?a.parentNode.querySelector("label[for="+b+"]"):void 0},r=!0;for(f=a.parentNode;f&&f!==g;)n+=f.offsetTop,f=f.parentNode;switch(b=n+l,r){case p&&n>j&&k>b:break;case p&&n>j&&b>k:case p&&j>n&&k>b:case p:this.centerToElement(a);break;case n>j&&k>n&&b>k:case j>n&&k>b:break;default:for(c=q(a),c||(c=a),d=c.offsetLeft+o.getCSSProperty(c,"margin-left",0,"integer"),e=c.offsetTop+o.getCSSProperty(c,"margin-top",0,"integer"),f=c.parentNode;f&&f!==g;)d+=f.offsetLeft,e+=f.offsetTop,f=f.parentNode;this.scrollTo(d,e,this.scrollDuration)}},u.prototype.centerToElement=function(a){for(var b=this.element,c=parseInt(o.getElementWidth(b)/2-o.getElementWidth(a)/2,10),d=parseInt(o.getElementHeight(b)/2-o.getElementHeight(a)/2,10),e=a.offsetLeft,f=a.offsetTop,g=a.parentNode;g&&g!==b;)e+=g.offsetLeft+o.getCSSProperty(g,"margin-left",0,"integer"),f+=g.offsetTop+o.getCSSProperty(g,"margin-top",0,"integer"),g=g.parentNode;this.scrollTo(e-c,f-d,this.scrollDuration)},u.prototype.skipDragging=function(){c.warn&&c.warn("ns.widget.core.Scrollview: skipDragging is deprecated")},u.prototype.getScrollPosition=function(){var a=this.element;return{x:a.scrollLeft,y:a.scrollTop}},u.prototype._bindEvents=function(c){var d,e,f,h=null,i=(c.children[0],o.getElementHeight(c),o.getElementWidth(c),function(){n.trigger(c,"scrollstop"),a.clearTimeout(h),h=null}),j=this,k=j._ui,l=k.page,m=k.jumpVerticalButton,p=k.jumpHorizontalButton,r=j._callbacks;l&&(this.options.scrollJump&&(d=g.bind(null,this),e=function(){j.scrollTo(c.scrollLeft,0,250)},f=function(){j.scrollTo(0,c.scrollTop,250)},l.addEventListener("pageshow",d,!1),m&&m.firstChild.addEventListener("vclick",e,!1),p&&p.firstChild.addEventListener("vclick",f,!1),r.repositionJumps=d,r.jumpTop=e,r.jumpLeft=f),c.addEventListener("scroll",function(){h?a.clearTimeout(h):n.trigger(c,"scrollstart"),h=a.setTimeout(i,100),n.trigger(c,"scrollupdate")},!1),b.addEventListener("vmousedown",function(){q&&(q=null)},!1),j.options.scrollIndicator&&(r.scrollUpdate=j._showScrollIndicator.bind(j),c.addEventListener("scrollupdate",r.scrollUpdate,!1),r.scrollStop=j._hideScrollIndicator.bind(j),c.addEventListener("scrollstop",r.scrollStop,!1)))},u.prototype._destroy=function(){var b=this,c=b.element,d=b._ui,e=d.page,f=this.options.scrollJump,g=d.jumpVerticalButton,h=d.jumpHorizontalButton,i=b._callbacks,j=i.repositionJumps,k=i.jumpTop,l=i.jumpLeft;f&&(e&&j&&e.removeEventListener("pageshow",j,!1),g&&k&&g.firstChild.removeEventListener("vclick",k,!1),h&&l&&h.firstChild.removeEventListener("vclick",l,!1)),b.options.scrollIndicator&&c.removeEventListener("scrollupdate",i.scrollUpdate,!1),b._timers.scrollIndicatorHide&&a.clearTimeout(b._timers.scrollIndicatorHide)},c.widget.core.Scrollview=u}(a,a.document,d),function(a,b){"use strict";var c=b.widget.BaseWidget,d=b.engine,e=b.event,f=function(){},g={},h={TAB_CHANGE:"tabchange"},i=new c;f.prototype=i,f.classes=g,i._setActive=function(a){var b=this.element;e.trigger(b,h.TAB_CHANGE,{active:a})},i.setActive=function(a){this._setActive(a)},i._getActive=function(){return this.options.active},i.getActive=function(){return this._getActive()},b.widget.core.Tab=f,d.defineWidget("Tab","",["setActive","getActive"],f,"tizen")}(a.document,d),function(a,b){"use strict";var c=b.widget.core.Tab,d=b.engine,e=b.util.object,f=function(){this.tabSize=0,this.width=0},g=c.prototype,h=new c;f.prototype=h,h._init=function(a){var b=this.options;this.width=a.offsetWidth,a.classList.add(b.wrapperClass)},h._configure=function(){e.merge(this.options,{margin:4,triggerEvent:!1,wrapperClass:"ui-tab-indicator",itemClass:"ui-tab-item",activeClass:"ui-tab-active",active:0})},h._createIndicator=function(){var b,c=this.options,d=a.createDocumentFragment(),e=[],f=c.margin,g=0,h=this.tabSize,i=this.width-f*(h-1),j=Math.floor(i/h),k=i%h,l=0;for(g=0;h>g;g++)e[g]=j;for(g=Math.floor((h-k)/2);k>0;g++,k--)e[g]+=1;for(g=0;h>g;g++)b=a.createElement("span"),b.classList.add(c.itemClass),b.style.width=e[g]+"px",b.style.left=l+"px",l+=e[g]+f,g===c.active&&b.classList.add(c.activeClass),d.appendChild(b);this.element.appendChild(d)},h._removeIndicator=function(){this.element.innerHTML=""},h._fireEvent=function(a,c){b.fireEvent(this.element,a,c)},h._refresh=function(){this._removeIndicator(),this._createIndicator()},h._setActive=function(a){var b=this.options,c=this.element.children;b.active=a,[].forEach.call(c,function(a){a.classList.remove(b.activeClass)}),a<c.length&&(c[a].classList.add(b.activeClass),g._setActive.call(this,a))},h.setSize=function(a){var b=this.tabSize!==a;this.tabSize=a,b&&this.refresh()},h._destroy=function(){var a=this.options;this._removeIndicator(),this.element.classList.remove(a.wrapperClass)},b.widget.core.TabIndicator=f,d.defineWidget("TabIndicator",".ui-tab",["setActive","getActive","setSize"],f)}(a.document,d),function(b,d){"use strict";function e(){this.options={}}function f(a,b,d){var e,f=d!==c?d:b.length,g=0;for(e=0;f>e;e++)g+=a===h.Orientation.HORIZONTAL?b[e].offsetWidth:b[e].offsetHeight;return g}function g(a,b,c){var d=f(a,b,c+1);return d-=a===h.Orientation.HORIZONTAL?b[c].offsetWidth/2:b[c].offsetHeight/2}var h=d.widget.core.scroller.Scroller,i=d.event.gesture,j=d.engine,k=d.util.object,l=d.event,m=d.util.object.merge({CHANGE:"sectionchange"},h.EventType),n={uiSectionChanger:"ui-section-changer"};k.inherit(e,h,{_build:function(a){
  return this.tabIndicatorElement=null,this.tabIndicator=null,this.sections=null,this.sectionPositions=[],this.activeIndex=0,this.beforeIndex=0,this._super(a),a.classList.add(n.uiSectionChanger),a},_configure:function(){this._super(),this.options=k.merge(this.options,{items:"section",activeClass:"ui-section-active",circular:!1,animate:!0,animateDuration:100,orientation:"horizontal",changeThreshold:-1,useTab:!1,fillContent:!0})},_init:function(a){var b,c,d,e,f=this.options,g=this.scroller;if(g.style.position="absolute",b=a.offsetHeight,0===b&&(b=a.parentNode.offsetHeight,a.style.height=b+"px"),this._sectionChangerWidth=a.offsetWidth,this._sectionChangerHeight=b,this._sectionChangerHalfWidth=this._sectionChangerWidth/2,this._sectionChangerHalfHeight=this._sectionChangerHeight/2,this.orientation="horizontal"===f.orientation?h.Orientation.HORIZONTAL:h.Orientation.VERTICAL,"tab"===f.scrollbar&&(f.scrollbar=!1,f.useTab=!0),this.sections="string"==typeof f.items?g.querySelectorAll(f.items):f.items,c=this.sections.length,f.circular&&3>c)throw"if you use circular option, you must have at least three sections.";for(this.activeIndex>=c&&(this.activeIndex=c-1),d=0;c>d;d++)e=this.sections[d].className,e&&e.indexOf(f.activeClass)>-1&&(this.activeIndex=d),this.sectionPositions[d]=d;return this._prepareLayout(),this._initLayout(),this._super(),this._repositionSections(!0),this.setActiveSection(this.activeIndex),f.animate||(f.animateDuration=0),f.changeThreshold<0&&(f.changeThreshold=this._sectionChangerHalfWidth),a},_prepareLayout:function(){var a,b=this.options,c=this.sections.length,d=this._sectionChangerWidth,e=this._sectionChangerHeight,g=this.orientation,i=this.scroller.style;b.useTab&&(this._initTabIndicator(),a=this.tabIndicatorElement.offsetHeight,e-=a,this._sectionChangerHalfHeight=e/2,this.element.style.height=e+"px",this._sectionChangerHeight=e),g===h.Orientation.HORIZONTAL?(i.width=(b.fillContent?d*c:f(g,this.sections))+"px",i.height=e+"px"):(i.width=d+"px",i.height=(b.fillContent?e*c:f(g,this.sections))+"px")},_initLayout:function(){var a,b,c=this.sections.style,d=0,e=0;for(a=0,b=this.sections.length;b>a;a++)c=this.sections[a].style,c.position="absolute",this.options.fillContent&&(c.width=this._sectionChangerWidth+"px",c.height=this._sectionChangerHeight+"px"),this.orientation===h.Orientation.HORIZONTAL?(e=0,d=f(this.orientation,this.sections,a)):(e=f(this.orientation,this.sections,a),d=0),c.top=e+"px",c.left=d+"px"},_initBouncingEffect:function(){var a=this.options;a.circular||this._super()},_translateScrollbar:function(a,b,c,d){var e;this.scrollbar&&(e=this.orientation===h.Orientation.HORIZONTAL?-a+this.minScrollX:-b+this.minScrollY,this.scrollbar.translate(e,c,d))},_translateScrollbarWithPageIndex:function(a,b){var c;this.scrollbar&&(c=f(this.orientation,this.sections,this.activeIndex),this.scrollbar.translate(c,b))},_initTabIndicator:function(){var a=this.tabIndicatorElement=b.createElement("div");this.element.parentNode.insertBefore(a,this.element),this.tabIndicator=new j.instanceWidget(a,"TabIndicator"),this.tabIndicator.setSize(this.sections.length),this.tabIndicator.setActive(this.activeIndex),this.tabIndicatorHandler=function(a){this.tabIndicator.setActive(a.detail.active)}.bind(this),this.element.addEventListener(m.CHANGE,this.tabIndicatorHandler,!1)},_clearTabIndicator:function(){this.tabIndicator&&(this.element.parentNode.removeChild(this.tabIndicatorElement),this.element.removeEventListener(m.CHANGE,this.tabIndicatorHandler,!1),this.tabIndicator.destroy(),this.tabIndicator=null,this.tabIndicatorElement=null,this.tabIndicatorHandler=null)},_resetLayout:function(){var a,b,c=this.sections.style;for(a=0,b=this.sections.length;b>a;a++)c=this.sections[a].style,c.position="",c.width="",c.height="",c.top="",c.left="";this._super()},_bindEvents:function(){this._super(),d.event.enableGesture(this.scroller,new d.event.gesture.Swipe({orientation:this.orientation===h.Orientation.HORIZONTAL?i.Orientation.HORIZONTAL:i.Orientation.VERTICAL})),l.on(this.scroller,"swipe transitionEnd webkitTransitionEnd mozTransitionEnd msTransitionEnd oTransitionEnd",this)},_unbindEvents:function(){this._super(),this.scroller&&(d.event.disableGesture(this.scroller),l.off(this.scroller,"swipe transitionEnd webkitTransitionEnd mozTransitionEnd msTransitionEnd oTransitionEnd",this))},handleEvent:function(a){switch(this._super(a),a.type){case"swipe":this._swipe(a);break;case"webkitTransitionEnd":case"mozTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"transitionEnd":a.target===this.scroller&&this._endScroll()}},_notifyChanagedSection:function(a){var b,c=this.options.activeClass,d=this.sections.length,e=0;for(e=0;d>e;e++)b=this.sections[e],b.classList.remove(c),e===this.activeIndex&&b.classList.add(c);this._fireEvent(m.CHANGE,{active:a})},setActiveSection:function(a,b,c){var d=this.sectionPositions[a],e=b,f=this.activeIndex,i=0,j=0;this.orientation===h.Orientation.HORIZONTAL?i=this._sectionChangerHalfWidth-g(this.orientation,this.sections,d):j=this._sectionChangerHalfHeight-g(this.orientation,this.sections,d),(this.beforeIndex-a>1||this.beforeIndex-a<-1)&&(e=0),this.activeIndex=a,this.beforeIndex=this.activeIndex,i!==this.scrollerOffsetX||j!==this.scrollerOffsetY?(c!==!1&&(this._fireEvent(m.START),this.scrolled=!0),this._translate(i,j,b),this._translateScrollbarWithPageIndex(a,e)):this._endScroll(),this.activeIndex!==f&&this._notifyChanagedSection(this.activeIndex)},getActiveSectionIndex:function(){return this.activeIndex},_start:function(a){this._super(a),this.beforeIndex=this.activeIndex},_move:function(a){var b=this.options.changeThreshold,c=this.orientation===h.Orientation.HORIZONTAL?a.detail.deltaX:a.detail.deltaY,d=this.activeIndex;this._super(a),this.scrolled&&(c>b?this.activeIndex=this._calculateIndex(this.beforeIndex-1):-b>c?this.activeIndex=this._calculateIndex(this.beforeIndex+1):this.activeIndex=this.beforeIndex,this.activeIndex!==d&&this._notifyChanagedSection(this.activeIndex))},_end:function(){this.scrollbar&&this.scrollbar.end(),this.enabled&&!this.scrollCanceled&&this.dragging&&(this.bouncingEffect&&this.bouncingEffect.dragEnd(),this.setActiveSection(this.activeIndex,this.options.animateDuration,!1),this.dragging=!1)},_swipe:function(a){var b=a.detail.direction===i.Direction.UP||a.detail.direction===i.Direction.LEFT?1:-1,c=this._calculateIndex(this.beforeIndex+b);this.enabled&&!this.scrollCanceled&&this.dragging&&(this.bouncingEffect&&this.bouncingEffect.dragEnd(),this.activeIndex!==c&&(this.activeIndex=c,this._notifyChanagedSection(c)),this.setActiveSection(c,this.options.animateDuration,!1),this.dragging=!1)},_endScroll:function(){this.enabled&&this.scrolled&&!this.scrollCanceled&&(this._repositionSections(),this._super())},_repositionSections:function(b){var c,d,e,i,j,k,l,m=this.sections.length,n=this.sectionPositions[this.activeIndex],o=a.parseInt(m/2,10),p=this.options.circular,q=0,r=0;if(this.orientation===h.Orientation.HORIZONTAL?(k=-g(this.orientation,this.sections,p?o:this.activeIndex),l=0):(k=0,l=-g(this.orientation,this.sections,p?o:this.activeIndex)),this._translateScrollbarWithPageIndex(this.activeIndex),(b||0===n||n===m-1)&&(this.orientation===h.Orientation.HORIZONTAL?q=this._sectionChangerHalfWidth+k:r=this._sectionChangerHalfHeight+l,this._translate(q,r),p))for(c=0;m>c;c++)e=(m+this.activeIndex-o+c)%m,d=this.sections[e].style,this.sectionPositions[e]=c,this.orientation===h.Orientation.HORIZONTAL?(i=0,j=f(this.orientation,this.sections,c)):(i=f(this.orientation,this.sections,c),j=0),d.top=i+"px",d.left=j+"px"},_calculateIndex:function(a){var b=this.sections.length;return a=this.options.circular?(b+a)%b:0>a?0:a>b-1?b-1:a},_clear:function(){this._clearTabIndicator(),this._super(),this.sectionPositions.length=0}}),d.widget.core.SectionChanger=e,j.defineWidget("SectionChanger","[data-role='section-changer'], .ui-section-changer",["getActiveSectionIndex","setActiveSection"],e)}(a.document,d),function(a,b,c){"use strict";var d=b.createDocumentFragment(),e=b.createDocumentFragment(),f=0,g=[].slice,h=c.util.DOM;h.appendNodes=function(a,b){var c,d;if(a){if(b instanceof Array||b instanceof NodeList||b instanceof HTMLCollection)for(b=g.call(b),c=0,d=b.length;d>c;++c)a.appendChild(b[c]);else a.appendChild(b);return b}throw"Context empty!"},h.replaceWithNodes=function(a,b){return b instanceof Array||b instanceof NodeList||b instanceof HTMLCollection?(b=this.insertNodesBefore(a,b),a.parentNode.removeChild(a)):a.parentNode.replaceChild(b,a),b},h.removeAllChildren=function(a){a.innerHTML=""},h.insertNodesBefore=function(a,b){var c,d,e;if(a){if(e=a.parentNode,b instanceof Array||b instanceof NodeList||b instanceof HTMLCollection)for(b=g.call(b),c=0,d=b.length;d>c;++c)e.insertBefore(b[c],a);else e.insertBefore(b,a);return b}throw"Context empty!"},h.insertNodeAfter=function(a,b){if(a)return a.parentNode.insertBefore(b,a.nextSibling),b;throw"Context empty!"},h.wrapInHTML=function(a,c){var g,h=b.createElement("div"),i=!1,j=a.length,k=j?a[0].parentNode:a.parentNode,l=j?a[j-1].nextSibling:a.nextSibling;for(d.appendChild(h),c=c.replace(/(\$\{content\})/gi,function(){return i=!0,"<span id='temp-container-"+ ++f+"'></span>"}),h.innerHTML=c,i===!0?(g=h.querySelector("span#temp-container-"+f),a=this.replaceWithNodes(g,a)):(g=h.children[0],a=this.appendNodes(g||h,a));d.firstChild.firstChild;)e.appendChild(d.firstChild.firstChild);for(;d.firstChild;)d.removeChild(d.firstChild);if(k)l?k.insertBefore(e,l):k.appendChild(e);else for(;e.firstChild;)e.removeChild(e.firstChild);return a}}(a,a.document,d),function(a,b){"use strict";b.widget.wearable=b.widget.wearable||{}}(a,d),function(b,c){"use strict";var d=c.widget.core.Page,e=c.util,f=e.DOM,g=e.selectors,h=c.util.object,i=c.event,j=(i.gesture,c.engine),k=function(){var a=this;d.call(a),a._contentStyleAttributes=["height","width","minHeight","marginTop","marginBottom"]},l=h.merge({uiHeader:"ui-header",uiPageScroll:"ui-scroll-on",uiScroller:"ui-scroller",uiFixed:"ui-fixed"},d.classes),m=new d;m._configure=function(){d.prototype._configure.call(this),this.options.enablePageScroll=c.getConfig("enablePageScroll")},m._contentFill=function(){var c,d,e,h=this,i=h.options,j=h.element,k=a.innerWidth,m=a.innerHeight,n=l.uiPageScroll,o=[].slice.call(j.children),p=j.style;p.width=k+"px",p.height=m+"px",i.enablePageScroll!==!0||j.querySelector("."+l.uiScroller)||(j.classList.add(n),c=b.createElement("div"),c.classList.add(l.uiScroller),d=b.createDocumentFragment(),o.forEach(function(a){g.matchesSelector(a,".ui-header:not(.ui-fixed), .ui-content, .ui-footer:not(.ui-fixed)")&&d.appendChild(a)}),j.children.length>0&&j.children[0].classList.contains(l.uiHeader)?f.insertNodeAfter(j.children[0],c):j.insertBefore(c,j.firstChild),e=d.firstChild,c.appendChild(d))},m.getScroller=function(){var a=this.element,b=a.querySelector("."+l.uiScroller);return b||a.querySelector("."+l.uiContent)||a},m._destroy=function(){d.prototype._destroy.call(this)},k.prototype=m,c.widget.wearable.Page=k,j.defineWidget("Page","[data-role=page],.ui-page",["layout","focus","blur","setActive","isActive"],k,"wearable",!0)}(a.document,d),function(a,b,c){"use strict";function d(b,c){var d,e,f,g=b.options,h=g.arrow.split(","),i=b.element,j=a.innerWidth,l=a.innerHeight,m=k.getElementWidth(i,"outer"),n=k.getElementHeight(i,"outer"),o=c.getBoundingClientRect(),p=o.left,q=o.top,r=Math.min(o.width,j-p),s=Math.min(o.height,l-q),t={l:{dir:"l",fixedPositionField:"x",fixedPositionFactor:1,size:m,max:p},r:{dir:"r",fixedPositionField:"x",fixedPositionFactor:-1,size:m,max:j-p-r},b:{dir:"b",fixedPositionField:"y",fixedPositionFactor:-1,size:n,max:q},t:{dir:"t",fixedPositionField:"y",fixedPositionFactor:1,size:n,max:l-q-s}};return d=t[h[0]]||t.t,h.forEach(function(a){var b=t[a],c=b.max;e||(b.size<c?e=b:c>d.max&&(d=b))}),e||(e=d,"x"===e.fixedPositionField?m=e.max:n=e.max),f={x:p+r/2-m/2,y:q+s/2-n/2,w:m,h:n,dir:e.dir},f[e.fixedPositionField]+=("x"===e.fixedPositionField?(m+r)*e.fixedPositionFactor:(n+s)*e.fixedPositionFactor)/2+g.distance*e.fixedPositionFactor,f.x=f.x<0?0:f.x+f.w>j?j-f.w:f.x,f.y=f.y<0?0:f.y+f.h>l?l-f.h:f.y,f}function e(b,c,d,e){var f,g,h,i=b._ui,j=i.wrapper,l=i.arrow,m=b.element,n=l.style,o=a.innerWidth,p=a.innerHeight,q=j.getBoundingClientRect(),r=l.offsetWidth/2,s={"padding-top":0,"padding-bottom":0,"padding-left":0,"padding-right":0,"border-top-width":0,"border-left-width":0,"box-sizing":null},t={"margin-top":0,"margin-bottom":0,"margin-left":0,"margin-right":0,"padding-top":0,"padding-bottom":0,"padding-left":0,"padding-right":0},u={t:{pos:d,min:"left",max:"right",posField:"x",valField:"w",styleField:"left"},b:{pos:d,min:"left",max:"right",posField:"x",valField:"w",styleField:"left"},l:{pos:e,min:"top",max:"bottom",posField:"y",valField:"h",styleField:"top"},r:{pos:e,min:"top",max:"bottom",posField:"y",valField:"h",styleField:"top"}},v=u[c.dir];return k.extractCSSProperties(m,s),k.extractCSSProperties(j,t),h="border-box"===s["box-sizing"],f={t:s["padding-top"]+t["margin-top"]+t["padding-top"],b:s["padding-bottom"]+t["margin-bottom"]+t["padding-bottom"],l:s["padding-left"]+t["margin-left"]+t["padding-left"],r:s["padding-right"]+t["margin-right"]+t["padding-right"]},q={left:f.l+c.x,right:f.l+q.width+c.x,top:f.t+c.y,bottom:q.height+f.t+c.y},q[v.min]>v.pos-r?(g=c[v.posField],g>0?(c[v.posField]=Math.max(v.pos-r,0),v.pos=c[v.posField]+r):v.pos=q[v.min]+r):q[v.max]<v.pos+r&&(g=("w"===v.valField?o:p)-(c[v.posField]+c[v.valField]),g>0?(c[v.posField]+=Math.min(g,v.pos+r-q[v.max]),v.pos=c[v.posField]+c[v.valField]-r):v.pos=q[v.max]-r),n[v.styleField]=v.pos-r-c[v.posField]-(h?s["border-"+v.styleField+"-width"]:0)+"px",c}function f(a,b){var c=b.getBoundingClientRect(),d={};switch(a){case"l":d.x=c.right,d.y=c.top+c.height/2;break;case"r":d.x=c.left,d.y=c.top+c.height/2;break;case"t":d.x=c.left+c.width/2,d.y=c.bottom;break;case"b":d.x=c.left+c.width/2,d.y=c.top}return d}var g=c.widget.core.Popup,h=g.prototype,i=c.engine,j=c.util.object,k=c.util.DOM,l={arrow:"l,b,r,t",positionTo:"window",positionOriginCenter:!1,distance:0,link:null},m=function(){var a,b=this;g.call(b),b.options=j.merge(b.options,l),a=b._ui||{},a.arrow=null,b._ui=a},n="ui-popup",o=j.merge({},g.classes,{context:"ui-ctxpopup",contextOverlay:"ui-ctxpopup-overlay",arrow:"ui-arrow",arrowDir:n+"-arrow-"}),p=j.merge({},g.events,{before_position:"beforeposition"}),q={WINDOW:"window",ORIGIN:"origin",ABSOLUTE:"absolute"},r=new g;m.defaults=j.merge({},g.defaults,l),m.classes=o,m.events=p,m.positionTypes=q,r._build=function(a){var c,d=this,e=d._ui;return h._build.call(d,a),a.classList.add(o.popup),c=b.createElement("div"),c.appendChild(b.createElement("span")),c.classList.add(o.arrow),e.arrow=c,a.appendChild(c),a},r._init=function(a){var b=this,c=b._ui;h._init.call(this,a),c.arrow=c.arrow||a.querySelector("."+o.arrow)},r._layout=function(a){var b=this;this._reposition(),h._layout.call(b,a)},r._reposition=function(a){var b=this,c=b.element,d=b._ui,e=c.classList;a=j.merge({},b.options,a),b.trigger(p.before_position,null,!1),e.add(o.build),b._setContentHeight(),"origin"===a.positionTo&&d.overlay&&d.overlay.classList.add(o.contextOverlay),b._placementCoords(a),e.remove(o.build)},r._placementCoordsWindow=function(b){var c=b.style,d=b.offsetWidth,e=b.offsetHeight,f=k.getCSSProperty(b,"margin-top",0,"float"),g=a.innerHeight-e-f;c.top=g+"px",c.left="50%",c.marginLeft=-(d/2)+"px"},r._placementCoordsAbsolute=function(a,b,c){var d=a.style,e=a.offsetWidth,f=a.offsetHeight;d.top=c+"px",d.left=b+"px",d.marginTop=-(f/2)+"px",d.marginLeft=-(e/2)+"px"},r._findClickedElement=function(a,c){return b.elementFromPoint(a,c)},r._placementCoordsOrigin=function(a,b){var c,g,h,i,j=this,k=j.element,l=k.style,m=k.classList,n=b.x,p=b.y;m.add(o.context),i=k.offsetHeight,c=d(j,a),h=c.dir,m.add(o.arrowDir+h),j._ui.arrow.setAttribute("type",h),("number"!=typeof n&&"number"!=typeof p||j.options.positionOriginCenter)&&(g=f(h,a),n=g.x,p=g.y),c=e(j,c,n,p),i>c.h&&j._setContentHeight(c.h),l.left=c.x+"px",l.top=c.y+"px"},r._placementCoordsElement=function(a,b){var c,e,f=this,g=f.element,h=g.style;g.classList.add(o.context),e=g.offsetHeight,c=d(f,a),e>c.h&&f._setContentHeight(c.h),h.left=c.x+"px",h.top=c.y+"px"},r._placementCoords=function(a){var c,d,e=this,f=a.positionTo,g=a.x,h=a.y,i=e.element;switch(f){case q.ORIGIN:if(d=a.link,d?"string"==typeof d?c=b.getElementById(d):"object"==typeof d&&(c=d):"number"==typeof g&&"number"==typeof h&&(c=e._findClickedElement(g,h)),c)return void e._placementCoordsOrigin(c,a);break;case q.WINDOW:return void e._placementCoordsWindow(i);case q.ABSOLUTE:if("number"==typeof g&&"number"==typeof h)return void e._placementCoordsAbsolute(i,g,h);break;default:if("string"==typeof f)try{c=b.querySelector(a.positionTo)}catch(j){}else"object"==typeof f&&(c=f);if(c)return void e._placementCoordsElement(c,a)}e._placementCoordsWindow(i)},r._setContentHeight=function(b){var c,d,e,f=this,g=f.element,h=f._ui.content;h&&(c=h.style,(c.height||c.minHeight)&&(c.height="",c.minHeight=""),b=b||a.innerHeight,d=h.offsetHeight,e=g.offsetHeight,e>b&&(d-=e-b,c.height=d+"px",c.minHeight=d+"px"))},r._onHide=function(){var a=this,b=a._ui,c=a.element,d=c.classList,e=(b.content,b.arrow);d.remove(o.context),["l","r","b","t"].forEach(function(a){d.remove(o.arrowDir+a)}),c.removeAttribute("style"),e.removeAttribute("style"),h._onHide.call(a)},r._destroy=function(){var a=this,b=(a.element,a._ui),c=b.arrow;h._destroy.call(a),c&&c.parentNode&&c.parentNode.removeChild(c),b.arrow=null},r.reposition=function(a){this._isActive()&&this._reposition(a)},r._refresh=function(){this._isActive()&&(h._refresh.call(this),this.reposition(this.options))},m.prototype=r,c.widget.core.ContextPopup=m,i.defineWidget("Popup","[data-role='popup'], .ui-popup",["open","close","reposition"],m,"core",!0),c.widget.popup=c.widget.Popup}(a,a.document,d),function(a,b,c){"use strict";var d=c.widget.core.ContextPopup,e=d.prototype,f=c.engine,g=c.util.object,h=(c.util.DOM,{fullSize:!1,enablePopupScroll:!1}),i=g.merge({},d.classes,{popupScroll:"ui-scroll-on",fixed:"ui-fixed",sideButton:"ui-side-button",hasSideButtons:"ui-has-side-buttons",toast:"ui-popup-toast",ctx:"ui-ctxpopup"}),j=function(){var a=this;d.call(a),a.options=g.merge(a.options,{fullSize:c.getConfig("popupFullSize",h.fullSize),enablePopupScroll:c.getConfig("enablePopupScroll",h.enablePopupScroll)})},k=new d;k._layout=function(b){var c=this,d=b.classList,f=c._ui,g=f.wrapper,h=f.header,j=f.footer,k=f.content,l=0,m=0;c._blockPageScroll(),e._layout.call(c,b),c.options.enablePopupScroll===!0?b.classList.add(i.popupScroll):b.classList.remove(i.popupScroll),d.contains(i.popupScroll)&&(d.add(i.build),h&&(l=h.offsetHeight,h.classList.contains(i.fixed)&&(k.style.marginTop=l+"px")),j&&(m=j.offsetHeight,j.classList.contains(i.fixed)&&(k.style.marginBottom=m+"px"),j.classList.contains(i.sideButton)&&d.add(i.hasSideButtons)),g.style.height=Math.min(k.offsetHeight+l+m,b.offsetHeight)+"px",d.remove(i.build)),!c.options.fullSize||d.contains(i.toast)||d.contains(i.ctx)||(g.style.height=a.innerHeight+"px")},k._onHide=function(){var a=this,b=a._ui,c=b.wrapper;c.removeAttribute("style"),a._unblockPageScroll(),e._onHide.call(a)},k._blockPageScroll=function(){var a=c.widget.Page(this._ui.page);a.getScroller&&(a.getScroller().style.overflow="hidden")},k._unblockPageScroll=function(){var a=c.widget.Page(this._ui.page);a.getScroller&&(a.getScroller().style.overflow="")},j.prototype=k,c.widget.wearable.Popup=j,f.defineWidget("Popup","[data-role='popup'], .ui-popup",["open","close","reposition"],j,"wearable",!0)}(a,a.document,d),function(a,b){"use strict";function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a,!1),d.send(),200===d.status||0===d.status?"function"==typeof b&&b(d,d.status):"function"==typeof c&&c(d,d.status,new Error(d.statusText))}function d(b,c,d){var e=a.createElement("script");e.type="text/javascript",e.text=c.responseText,a.body.appendChild(e),"function"==typeof b&&b(c,d)}function e(a,b,e){c(a,d.bind(null,b),e)}function f(b,c,d){var e=a.createElement("style");e.type="text/css",e.textContent=d.responseText.replace(r,"url("+b.replace(s,"images")),"function"==typeof c&&c(e)}function g(a,b,d){c(a,f.bind(null,a,b),d)}function h(a,b){var c;if(l){if(b&&(c=l.firstElementChild))return void l.insertBefore(a,c);l.appendChild(a)}}function i(b){var c=a.createElement("link");return c.setAttribute("rel","stylesheet"),c.setAttribute("href",b),c.setAttribute("name","tizen-theme"),c}function j(a,b,c){p(a,"name","tizen-theme"),p(a,"theme-name",b),c?c.parentNode.replaceChild(a,c):h(a,!0)}function k(a,c,d){var e,f,h,k=m.length,l=null;for(e=0;k>e;e++)if(f=m[e].ownerNode,"tizen-theme"===o(f,"name")||f.getAttribute("href")===a){if(o(f,"theme-name")===c)return;l=f;break}d?g(a,function(a){j(a,c,l)},function(a,d,e){b.warn("There was a problem when loading '"+c+"', status: "+d)}):(h=i(a),j(h,c,l))}var l=a.head,m=a.styleSheets,n=b.util.DOM,o=n.getNSData,p=n.setNSData,q=b.util.load||{},r=/url\((\.\/)?images/gm,s=/[^\/]+\.css$/;q.cacheBust=a.location.href.match(/debug=true/)?"?cacheBust="+(new Date).getTime():"",q.scriptSync=e,q.addElementToHead=h,q.makeLink=i,q.themeCSS=k,b.util.load=q}(a.document,d),function(a,b,c){"use strict";var d=b.head,e=b.documentElement,f=c.frameworkData,g=c.util,h=g.DOM,i=g.load,j=c.support,k=function(a){var b=a.target,c=b.tagName.toLowerCase(),d=b.type;("input"!==c||"text"!==d&&"email"!==d&&"url"!==d&&"search"!==d&&"tel"!==d)&&"textarea"!==c&&(a.stopPropagation(),a.preventDefault())},l="theme.js",m="tau",n=/ui-(bar|body|overlay)-([a-z])\b/,o=/.*width=(device-width|\d+)\s*,?.*$/gi;c.theme={theme:"s",_activeTheme:null,init:function(a){var b=this,c=a.classList;f&&f.getParams(),j&&j.gradeA()&&(e.classList.add("ui-mobile"),c.add("ui-mobile-viewport")),f&&b.loadTheme(f.theme)},scaleBaseFontSize:function(a,c){var d=Math.max(a*c|0,4);e.style.fontSize=d+"px",b.body.style.fontSize=d+"px"},getInheritedTheme:function(a,b){var c,d,e,f=a.parentNode;if(c=h.getNSData(a,"theme"),!c)for(;f;){if(d=f.className||"",e=n.exec(d),d&&e&&e.length>2){c=e[2];break}f=f.parentNode}return c||b},enableSelection:function(a,c){var d,e;switch(c){case"text":case"auto":case"none":d=c;break;default:d="auto"}return a===b&&(a=b.body),e=a.style,e.MozUserSelect=e.webkitUserSelect=e.userSelect=d,a},disableContextMenu:function(a){a.addEventListener("contextmenu",k,!0)},enableContextMenu:function(a){a.removeEventListener("contextmenu",k,!0)},loadTheme:function(a){var b,c,d=this,e=f.themePath,g=m,h=f.minified;f.themeLoaded||("tau"!==f.frameworkName&&(g="tizen-web-ui-fw-theme"),b=h?e+"/"+g+".min.css":e+"/"+g+".css",i.themeCSS(b,a),c=e+"/"+l,i.scriptSync(c),j.gradeA()&&d.setScaling(),f.themeLoaded=!0)},setViewport:function(a){var c,e=b.querySelector("meta[name=viewport]");return e?(c=e.getAttribute("content"),a=c.replace(o,"$1")):(e=b.createElement("meta"),e.name="viewport",c="width="+a+", user-scalable=no",e.content=c,d.insertBefore(e,d.firstChild)),a},isMobileBrowser:function(){return a.navigator.appVersion.indexOf("Mobile")>-1},setScaling:function(){var d=this,e=f.viewportWidth,g=f.defaultFontSize,h=1;b.body.setAttribute("data-tizen-theme-default-font-size",g),c.theme.isMobileBrowser()&&(f.viewportScale===!0&&(e="screen-width"),"screen-width"===e&&(e=a.self===a.top?a.outerWidth:b.documentElement.clientWidth),e=d.setViewport(e),"device-width"!==e&&(h=parseFloat(e/c.frameworkData.defaultViewportWidth),d.scaleBaseFontSize(g,h)))}},b.addEventListener("themeinit",function(a){var b=a.detail;b&&c.getConfig("autoInitializePage",!0)&&c.theme.init(b.getContainer().element)},!1)}(a,a.document,d),function(a){"use strict";a.router=a.router||{}}(d),function(a,b){"use strict";var c,d=b.util.object,e=0,f=0,g=a.history,h={activeState:null,replace:function(a,b,i){var j=d.merge({},a,{uid:c?f:++e,stateUrl:i,stateTitle:b});g[c?"replaceState":"pushState"](j,b,i),h.setActive(j)},back:function(){g.back()},setActive:function(a){return a&&(h.activeState=a,f=a.uid,a.volatileRecord)?void h.enableVolatileRecord():void h.disableVolatileMode()},getDirection:function(a){return a?a.uid<f?"back":"forward":"back"},enableVolatileRecord:function(){c=!0},disableVolatileMode:function(){c=!1}};b.router.history=h}(a,d),function(b,d){"use strict";function e(a,b){var c=a._state,d=a._ui.containerElement,e=a.options,f=e.dragEdge,g=e.position;return c===n.OPENED?!0:c===n.CLOSED?r[g].check(b,d,f):!1}function f(b,c){for(var d,e,f,g=c.detail.srcEvent.target,h=b._state,i=b._ui,j=b.options,k=j.position,l=g;l&&l!==i.containerElement;){if(d=a.getComputedStyle(l),e=d.overflow,f=d["overflow-"+r[k].xy],("scroll|auto".indexOf(e)>-1||"scroll|auto".indexOf(f)>-1)&&l.scrollHeight>l.clientHeight&&r[k][h===n.CLOSED?"scroll":"rscroll"](l))return!0;l=l.parentNode}return!1}function g(a){[t.open,t.close].forEach(function(b){a.classList.remove(b)})}var h=d.widget.BaseWidget,i=d.engine,j=d.util.selectors,k=d.util.DOM,l=d.event,m=d.event.gesture,n={CLOSED:"closed",OPENED:"opened",SLIDING:"sliding",SETTLING:"settling"},o={OPEN:"assistpanelopen",CLOSE:"assistpanelclose"},p={HORIZONTAL:"horizontal",VERTICAL:"vertical"},q={TOP:"top",BOTTOM:"bottom",LEFT:"left",RIGHT:"right"},r={},s=function(){var a=this;a.options={position:q.BOTTOM,duration:300,handle:".ui-assist-arrow",handleTranslate:.15,dragEdge:.2,overlay:!0,target:".ui-page",checkScroll:!0,enable:!0},a._ui={},a._pos={cur:0,start:0},a._orientation=p.HORIZONTAL,a._state=n.CLOSED},t={page:"ui-page",name:"ui-assist-panel",left:"ui-assist-panel-left",right:"ui-assist-panel-right",top:"ui-assist-panel-top",bottom:"ui-assist-panel-bottom",overlay:"ui-assist-panel-overlay",open:"ui-assist-panel-open",close:"ui-assist-panel-close"},u=new h;s.prototype=u,s.classes=t,function(){var a=r,b=a[q.TOP]={xy:"y",dir:"Top",size:"Height",gravit:-1,openDir:"down",closeDir:"up"},c=a[q.BOTTOM]={xy:"y",dir:"Top",size:"Height",gravit:1,openDir:"up",closeDir:"down"},d=a[q.LEFT]={xy:"x",dir:"Left",size:"Width",gravit:-1,openDir:"right",closeDir:"left"},e=a[q.RIGHT]={xy:"x",dir:"Left",size:"Width",gravit:1,openDir:"left",closeDir:"right"};b.check=d.check=function(a,b,c){var d=a.detail["estimated"+this.xy.toUpperCase()],e=b["offset"+this.dir],f=b["offset"+this.size];return d>e&&e+f*c>d},c.check=e.check=function(a,b,c){var d=a.detail["estimated"+this.xy.toUpperCase()],e=b["offset"+this.dir],f=b["offset"+this.size];return d>e+f-f*c&&e+f>d},b.scroll=d.scroll=function(a){return 0!==a["scroll"+this.dir]},c.scroll=e.scroll=function(a){return a["scroll"+this.size]-a["scroll"+this.dir]!==a["client"+this.size]},a[q.TOP].rscroll=a[q.LEFT].rscroll=c.scroll,a[q.BOTTOM].rscroll=a[q.RIGHT].rscroll=b.scroll}(),u._init=function(a){var c=this,d=c._ui,e=c.options,f=e.position,g=e.handle;return"top|bottom".indexOf(f)>-1?c._orientation=p.VERTICAL:c._orientation=p.HORIZONTAL,a.classList.add(t.name,t[e.position]),d.containerElement=j.getClosestBySelector(a,e.target)||b.body,d.containerElement.style.overflow="hidden",g&&(d.handle=b.querySelector(g)),e.overlay&&(d.overlay=c._createOverlay(a)),a},u._createOverlay=function(a){var c=b.createElement("div");return c.style.display="none",c.classList.add(t.overlay),a.parentNode.insertBefore(c,a),c},u._bindEvents=function(){var b=this,c=b.element,d=b._ui,e=d.containerElement;l.enableGesture(e,new m.Drag({blockHorizontal:b._orientation===p.VERTICAL,blockVertical:b._orientation===p.HORIZONTAL}),new m.Swipe({orientation:b._orientation})),l.on(e,"drag dragstart dragend dragcancel dragprepare dragrelease swipe",b,!1),l.prefixedFastOn(c,"transitionEnd",b,!1),l.on(a,"resize",b,!1)},u._unbindEvents=function(){var b=this,c=b.element,d=b._ui.containerElement;l.disableGesture(d),l.off(d,"drag dragstart dragend dragcancel dragprepare dragrelease swipe",b,!1),l.prefixedFastOff(c,"transitionEnd",b,!1),l.off(a,"resize",b,!1)},u.handleEvent=function(a){var b=this;switch(a.type){case"dragprepare":b._onStart(a);break;case"dragrelease":b._onEnd(a);break;case"drag":b._onDrag(a);break;case"dragstart":b._onDragStart(a);break;case"dragend":b._onDragEnd(a);break;case"dragcancel":b._onDragCancel(a);break;case"swipe":b._onSwipe(a);break;case"resize":b._onResize(a)}},u._onStart=function(a){var b=this,c=b._ui,d=b.element,g=c.handle,h=b.options,i=h.position,j=b._state,k=b._pos,l=a.detail.srcEvent.target,m=d["offset"+r[i].size];return k.state=null,!h.enable||j!==n.CLOSED&&j!==n.OPENED||g&&j===n.CLOSED&&l!==g||!g&&!e(b,a)||f(b,a)?void a.preventDefault():(b._translate(j===n.OPENED?0:d["offset"+r[i].size],0),k.state=j,k.start=k.cur,void(g&&l===g&&j===n.CLOSED&&(b._state=n.SLIDING,b._translate(m-m*h.handleTranslate,0),k.start=k.cur)))},u._onEnd=function(){var a=this,b=a._state;b===n.SLIDING&&a.close()},u._onSwipe=function(a){var b=this,c=b._pos,d=c.state,e=b.options,f=e.position,g=r[f],h=a.detail.direction;d===n.OPENED&&g.closeDir===h?this.close():d===n.CLOSED&&g.openDir===h&&this.open()},u._onResize=function(){var a=this;a._refresh()},u._onDragStart=function(a){var b=this,c=b._state,d=b.options,e=b._pos,f=d.position,g=a.detail.direction,h=r[f];return h[(c===n.OPENED?"close":"open")+"Dir"]!==g?(a.preventDefault(),void(e.state===n.OPENED?this.open():this.close())):void 0},u._onDrag=function(a){var b=this,c=a.detail,d=b.options,e=d.position,f=b._pos,g="top|left".indexOf(e)>-1?-1:1,h=f.start+c["estimatedDelta"+r[e].xy.toUpperCase()]*g;b._state=n.SLIDING,b._translate(h,0)},u._onDragEnd=function(){var a=this,b=a._state,c=a.element,d=a.options,e=d.position,f=c["offset"+r[e].size],g=a._pos,h=event.detail["delta"+r[e].xy.toUpperCase()],i=event.detail.velocityDirection;b===n.SLIDING&&(g.state===n.OPENED&&i===r[e].openDir||g.state===n.CLOSED&&i===r[e].closeDir||Math.abs(h)<f/3?a._onDragCancel():a[g.state===n.OPENED?"close":"open"]())},u._onDragCancel=function(){var a=this,b=a._pos,c=a.options.duration;this[b.state===n.CLOSED?"_close":"_open"](c,!1)},u._translate=function(a,b,c){var d,e,f=this,g=f.element,h=f._ui,i=h.overlay,j=f.options,m=j.position,n=f._pos.cur,o="top|left".indexOf(m)>-1?-1:1,q=g["offset"+r[m].size],s=function(){c&&c(),i&&a>=q&&(i.style.display="none")};return a=Math.max(Math.min(a,q),0),a===n?void s():(i&&n>=q&&(i.style.display=""),f._pos.cur=a,d=f._orientation===p.HORIZONTAL?"translate3d("+a*o+"px, 0px, 0px)":"translate3d(0px, "+a*o+"px, 0px)",k.setPrefixedStyle(g,"transition",k.getPrefixedValue("transform "+b/1e3+"s ease-out")),k.setPrefixedStyle(g,"transform",d),i&&(e=1-(a/q*(.7-.3)+.3),k.setPrefixedStyle(i,"transition","opacity "+b/1e3+"s ease-out"),i.style.opacity=e),void(b?l.prefixedFastOn(g,"transitionEnd",function t(){l.prefixedFastOff(g,"transitionEnd",t,!1),s()},!1):s()))},u._setOverlay=function(a){var b=this,c=b.options,d=b._ui.assistPanelOverlay,e=d.style,f=Math.abs(a),g=b._orientation===p.HORIZONTAL?f/c.width:f/c.height;1>g?e.visibility="visible":e.visibility="hidden",e.opacity=1-g},u._setActive=function(a){var b=this,c=i.getRouter().getRoute("assistPanel");a?c.setActive(b):c.setActive(null)},u._refresh=function(){var a=this;a._state!==n.CLOSED&&a.close(0),a._init(a.element)},u._enable=function(){this._oneOption("enable",!0)},u._disable=function(){this._oneOption("enable",!1)},u.open=function(a){this._open(a,!0)},u._open=function(a,b){var d=this,e=d.options,f=d.element;d._state!==n.OPENED&&(a=a!==c?a:e.duration,g(f),d._state=n.SETTLING,d._translate(0,a,function(){f.classList.add(t.open),b===!0&&d._setActive(!0),d._state=n.OPENED,d.trigger(o.OPEN)}))},u.close=function(a){this._close(a,!0)},u._close=function(a,b){var d=this,e=d.options,f=d.element,h=e.position;d._state!==n.CLOSED&&(a=a!==c?a:e.duration,g(f),d._state=n.SETTLING,d._translate(f["offset"+r[h].size],a,function(){f.classList.add(t.close),b===!0&&d._setActive(null),d._state=n.CLOSED,d.trigger(o.CLOSE)}))},u.transition=function(a,b){var c=this,d=c.options;c._state=n.SLIDING,c._translate(a,b||d.duration)},u.getState=function(){return this._state},u.isOpen=function(){return this._state===n.OPENED},u._destroy=function(){var a=this,b=a.options,c=a.element,d=a._ui,e=d.containerElement,f=d.overlay;c.classList.remove(t[b.position]),
  e.style.overflow="",a._unbindEvents(),f&&f.parentNode.removeChild(f),d=null},d.widget.wearable.AssistPanel=s,i.defineWidget("AssistPanel",".ui-assist-panel",["transition","open","close","isOpen","getState"],s,"wearable")}(a.document,d),function(a,b,d){"use strict";var e,f=d.engine,g=d.util.object,h=d.util.selectors,i=d.util.DOM,j={},k={uiStateKey:"&ui-state",urlParseRE:/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)((#[^\?]*)(\?.*)?)?/,getLocation:function(b){var c=this.parseUrl(b||a.location.href),d=c.hash,e=c.hashSearch;return d="#"!==d||e?d:"",j=c,c.protocol+"//"+c.host+c.pathname+c.search+d+e},getDocumentUrl:function(a){return a?g.copy(k.documentUrl):k.documentUrl.href},parseLocation:function(){return this.parseUrl(this.getLocation())},parseUrl:function(a){var b;return"object"==typeof a?a:(b=k.urlParseRE.exec(a||"")||[],{href:b[0]||"",hrefNoHash:b[1]||"",hrefNoSearch:b[2]||"",domain:b[3]||"",protocol:b[4]||"",doubleSlash:b[5]||"",authority:b[6]||"",username:b[8]||"",password:b[9]||"",host:b[10]||"",hostname:b[11]||"",port:b[12]||"",pathname:b[13]||"",directory:b[14]||"",filename:b[15]||"",search:b[16]||"",hash:b[18]||"",hashSearch:b[19]||""})},makePathAbsolute:function(a,b){var c,d,e,f;if(a&&"/"===a.charAt(0))return a;for(a=a||"",b=b?b.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"",c=b?b.split("/"):[],d=a.split("/"),f=0;f<d.length;f++)switch(e=d[f]){case".":break;case"..":c.length&&c.pop();break;default:c.push(e)}return"/"+c.join("/")},isSameDomain:function(a,b){return k.parseUrl(a).domain===k.parseUrl(b).domain},isRelativeUrl:function(a){return""===k.parseUrl(a).protocol},isAbsoluteUrl:function(a){return""!==k.parseUrl(a).protocol},makeUrlAbsolute:function(a,b){if(!k.isRelativeUrl(a))return a;var c=k.parseUrl(a),d=k.parseUrl(b),e=c.protocol||d.protocol,f=c.protocol?c.doubleSlash:c.doubleSlash||d.doubleSlash,g=c.authority||d.authority,h=""!==c.pathname,i=k.makePathAbsolute(c.pathname||d.filename,d.pathname),j=c.search||!h&&d.search||"",l=c.hash;return e+f+g+i+j+l},addSearchParams:function(a,b){var c=k.parseUrl(a),d="object"==typeof b?this.getAsURIParameters(b):b,e="",f=c.hash;return k.isEmbedded(a)&&d.length>0?(e=c.hashSearch||"?",c.hrefNoHash+(f||"")+e+("?"===e.charAt(e.length-1)?"":"&")+d):(e=c.search||"?",c.hrefNoSearch+e+("?"===e.charAt(e.length-1)?"":"&")+d+(f||""))},addHashSearchParams:function(a,b){var c=k.parseUrl(a),d="object"==typeof b?k.getAsURIParameters(b):b,e=c.hash,f=e?e.indexOf("?")<0?e+"?":e+"&":"#?";return c.hrefNoHash+f+("?"===f.charAt(f.length-1)?"":"&")+d},convertUrlToDataUrl:function(b,c,d){var e=k.parseUrl(b);return k.isEmbeddedPage(e,!!c)?k.getFilePath(e.hash+e.hashSearch,c):(d=d||k.documentBase,k.isSameDomain(e,d)?e.hrefNoHash.replace(d.domain,""):a.decodeURIComponent(b))},get:function(a){return a===c&&(a=this.parseLocation().hash),this.stripHash(a).replace(/[^\/]*\.[^\/*]+$/,"")},isPath:function(a){return/\//.test(a)},clean:function(a,b){return a.replace(b.domain,"")},stripHash:function(a){return a.replace(/^#/,"")},stripQueryParams:function(a){return a.replace(/\?.*$/,"")},isHashValid:function(a){return/^#[^#]+$/.test(a)},isExternal:function(a,b){var c=k.parseUrl(a);return c.protocol&&c.domain!==b.domain?!0:!1},hasProtocol:function(a){return/^(:?\w+:)/.test(a)},isEmbedded:function(a){var b=k.parseUrl(a);return""!==b.protocol?!k.isPath(b.hash)&&!!b.hash&&b.hrefNoHash===k.parseLocation().hrefNoHash:/\?.*#|^#/.test(b.href)},squash:function(a,b){var c,d,e,f,g=this.isPath(a),h=this.parseUrl(a),i=h.hash,j="";return b=b||(k.isPath(a)?k.getLocation():k.getDocumentUrl()),d=g?k.stripHash(a):a,d=k.isPath(h.hash)?k.stripHash(h.hash):d,f=d.indexOf(this.uiStateKey),f>-1&&(j=d.slice(f),d=d.slice(0,f)),c=k.makeUrlAbsolute(d,b),e=this.parseUrl(c).search,g?((k.isPath(i)||0===i.replace("#","").indexOf(this.uiStateKey))&&(i=""),j&&-1===i.indexOf(this.uiStateKey)&&(i+=j),-1===i.indexOf("#")&&""!==i&&(i="#"+i),c=k.parseUrl(c),c=c.protocol+"//"+c.host+c.pathname+e+i):c+=c.indexOf("#")>-1?j:"#"+j,c},isPreservableHash:function(a){return 0===a.replace("#","").indexOf(this.uiStateKey)},hashToSelector:function(a){var b="#"===a.substring(0,1);return b&&(a=a.substring(1)),(b?"#":"")+a.replace(new RegExp("([!\"#$%&'()*+,./:;<=>?@[\\]^`{|}~])","g"),"\\$1")},isFirstPageUrl:function(a,b,d,e){var g,h,i,j,l;return b=b===c?k.documentBase:b,d=d===c?k.documentBaseDiffers:d,e=e===c?k.documentUrl:e,g=k.parseUrl(k.makeUrlAbsolute(a,b)),h=g.hrefNoHash===e.hrefNoHash||d&&g.hrefNoHash===b.hrefNoHash,i=f.getRouter().firstPage,j=i?i.id:c,l=g.hash,h&&(!l||"#"===l||j&&l.replace(/^#/,"")===j)},isPermittedCrossDomainRequest:function(a,b){return d.getConfig("allowCrossDomainPages",!1)&&"file:"===a.protocol&&-1!==b.search(/^https?:/)},getAsURIParameters:function(a){var b,c="";for(b in a)a.hasOwnProperty(b)&&(c+=encodeURIComponent(b)+"="+encodeURIComponent(a[b])+"&");return c.substring(0,c.length-1)},documentUrl:null,documentBaseDiffers:!1,set:function(a){j.hash=a},getFilePath:function(a,b){var c="&"+d.getConfig("subPageUrlKey","");return a&&a.split(c)[0].split(b)[0]},cleanHash:function(a,b){return k.stripHash(a.replace(/\?.*$/,"").replace(b,""))},isEmbeddedPage:function(a,b){var c=k.parseUrl(a);return""!==c.protocol?c.hash&&(b?c.hrefNoHash===k.documentUrl.hrefNoHash:c.hrefNoHash===k.parseLocation().hrefNoHash):/^#/.test(c.href)}};k.documentUrl=k.parseLocation(),e=b.querySelector("base"),k.documentBase=e?k.parseUrl(k.makeUrlAbsolute(e.getAttribute("href"),k.documentUrl.href)):k.documentUrl,k.documentBaseDiffers=k.documentUrl.hrefNoHash!==k.documentBase.hrefNoHash,k.getDocumentBase=function(a){return a?g.copy(k.documentBase):k.documentBase.href},k.getClosestBaseUrl=function(a,b){var c=i.getNSData(h.getClosestBySelector(a,b),"url"),e=k.documentBase.hrefNoHash;return d.getConfig("dynamicBaseEnabled",!0)&&c&&k.isPath(c)||(c=e),k.makeUrlAbsolute(c,e)},d.util.path=k}(a,a.document,d),function(a){"use strict";a.router.route=a.router.route||{}}(d),function(a,b,d){"use strict";function e(a){for(;a&&(a.nodeType!==Node.ELEMENT_NODE||!a.nodeName||"A"!==a.nodeName);)a=a.parentNode;return a}function f(a,b){var c,d,f,g=e(b.target);g&&1===b.which&&(c=g.getAttribute("href"),d="external"===g.getAttribute("rel")||g.hasAttribute("target"),d||(f=k.getData(g),a.open(c,f,b),j.preventDefault(b)))}function g(a,b){var c,d,e,f,g,h=b.state,i=q.activeState,j=p.route,k=0,m=[],o=a.getContainer().inTransition,r=!0,s=h&&"back"===q.getDirection(h);if(u||o&&s)return q.disableVolatileMode(),void q.replace(i,i.stateTitle,i.stateUrl);if(h){e=h.url,g=s?i&&i.transition||"none":h.transition,d=n.merge({},h,{reverse:s,transition:g,fromHashChange:!0}),f=l.getLocation();for(c in j)j.hasOwnProperty(c)&&j[c].active&&m.push(j[c].orderNumber);if(k=Math.max.apply(null,m),j[v[k]]&&j[v[k]].onHashChange(f,d,i)){if(10===k)return;r=!1}q.setActive(h),r&&a.open(e,d)}else f=l.getLocation(),i&&i.absUrl!==f&&i.stateUrl!==f&&(q.enableVolatileRecord(),a.open(f))}function h(a){var c,d;return"string"==typeof a&&(c="#"===a[0]?a.substr(1):a,d=b.getElementById(c),d&&(a=d)),a}var i=d.util,j=d.event,k=i.DOM,l=i.path,m=i.selectors,n=i.object,o=d.engine,p=d.router,q=p.history,r=p.route,s=b.body,t=[].slice,u=!1,v={1:"page",10:"panel",100:"popup",1e3:"drawer",1001:"assistPanel",2e3:"circularindexscrollbar"},w=d.widget.core.Page,x=function(){var a=this;a.firstPage=null,a.container=null,a.settings={}};x.prototype.defaults={fromHashChange:!1,reverse:!1,showLoadMsg:!0,loadMsgDelay:0,volatileRecord:!1},x.prototype.detectRel=function(a){var b,c;for(c in r)if(b=r[c],m.matchesSelector(a,b.filter))return c},x.prototype.open=function(a,b,c){var d,e,f,g={},i=this;if(a=h(a),d=b&&b.rel||a instanceof HTMLElement&&this.detectRel(a)||"page",e=r[d],!u){if("back"===d)return void q.back();if(!e)throw new Error("Not defined router rule ["+d+"]");b=n.merge({rel:d},this.defaults,e.option(),b),f=e.filter,g.resolve=function(a,b){e.open(b,a,c)},g.reject=function(a){j.trigger(i.container.element,"changefailed",a)},"string"==typeof a?a.replace(/[#|\s]/g,"")&&this._loadUrl(a,b,e,g):a&&m.matchesSelector(a,f)?g.resolve(b,a):g.reject(b)}},x.prototype.init=function(c){var e,f,g,h,i,j,k,l=p.route,n=a.location,q=w.classes,r=q.uiPageActive,u=d.engine.getWidgetDefinition("Page"),v=u.selector,x=this;if(s=b.body,f=d.getConfig("pageContainer")||s,i=t.call(f.querySelectorAll(v)),d.getConfig("pageContainerBody",!1)||(f=i.length?i[0].parentNode:f),x.justBuild=c,d.getConfig("autoInitializePage",!0)){if(h=f.querySelector("."+r),h||(h=i[0]),h&&(j=f.querySelectorAll("."+r),t.call(j).forEach(function(a){a.classList.remove("."+r)})),n.hash&&(e=b.getElementById(n.hash.replace("#","")),e&&m.matchesSelector(e,v)&&(h=e)),!h&&d.getConfig("addPageIfNotExist",!0)){for(h=w.createEmptyElement();f.firstChild;)h.appendChild(f.firstChild);f.appendChild(h)}if(c)return g=o.instanceWidget(f,"pagecontainer"),void(h&&x.register(g,h))}for(k in l)l.hasOwnProperty(k)&&l[k].init&&l[k].init();g=o.instanceWidget(f,"pagecontainer"),x.register(g,h)},x.prototype.destroy=function(){var b=this;a.removeEventListener("popstate",b.popStateHandler,!1),s&&(s.removeEventListener("pagebeforechange",b.pagebeforechangeHandler,!1),s.removeEventListener("vclick",b.linkClickHandler,!1))},x.prototype.setContainer=function(a){this.container=a},x.prototype.getContainer=function(){return this.container},x.prototype.getFirstPage=function(){return this.firstPage},x.prototype.register=function(c,e){var h=this;h.container=c,h.firstPage=e,h.linkClickHandler=f.bind(null,h),h.popStateHandler=g.bind(null,h),b.addEventListener("vclick",h.linkClickHandler,!1),a.addEventListener("popstate",h.popStateHandler,!1),j.trigger(b,"themeinit",h),d.getConfig("loader",!1)&&c.element.appendChild(h.getLoader().element),q.enableVolatileRecord(),e&&h.open(e,{transition:"none"}),this.getRoute("popup").setActive(null)},x.prototype.close=function(a,b){var c=b&&b.rel||"back",d=r[c];if("back"===c)q.back();else{if(!d)throw new Error("Not defined router rule ["+c+"]");d.close(h(a),b)}},x.prototype.openPopup=function(a,b){this.open(a,n.fastMerge({rel:"popup"},b))},x.prototype.closePopup=function(a){var b=this.getRoute("popup");b&&b.close(null,a)},x.prototype.lock=function(){u=!0},x.prototype.unlock=function(){u=!1},x.prototype._loadUrl=function(a,b,d,e){var f,g,h=l.makeUrlAbsolute(a,l.getLocation()),i={},k=this;return b.data&&(h=l.addSearchParams(h,b.data),b.data=c),f=d.find(h),!f&&l.isEmbedded(h)?void e.reject(i):f?(i=n.fastMerge({absUrl:h},b),void e.resolve(i,f)):(b.showLoadMsg&&k._showLoading(b.loadMsgDelay),j.trigger(k.getContainer().element,b.rel+"beforeload"),g=new XMLHttpRequest,g.responseType="document",g.overrideMimeType("text/html"),g.open("GET",h),g.addEventListener("error",k._loadError.bind(k,h,b,e)),g.addEventListener("load",function(a){var c=a.target;4===c.readyState&&(200===c.status||0===c.status&&c.responseXML?(k._loadSuccess(h,b,d,e,c.responseXML),j.trigger(k.getContainer().element,b.rel+"load")):k._loadError(h,b,e))}),void g.send())},x.prototype._loadError=function(a,b,c){var d=n.fastMerge({url:a},b),e=this;b.showLoadMsg&&e._showError(a),j.trigger(e.container.element,"loadfailed",d),c.reject(d)},x.prototype._loadSuccess=function(a,b,c,d,e){var f=n.fastMerge({url:a},b),g=c.parse(e,a);b.showLoadMsg&&this._hideLoading(),g?d.resolve(f,g):d.reject(f)},x.prototype._getInitialContent=function(){return this.firstPage},x.prototype._showLoading=function(a){this.container.showLoading(a)},x.prototype._showError=function(a){d.error("load error, file: ",a)},x.prototype._hideLoading=function(){this.container.hideLoading()},x.prototype.hasActivePopup=function(){var a=this.getRoute("popup");return a&&a.hasActive()},x.prototype.getRoute=function(a){return r[a]},x.prototype.getLoader=function(){var a=b.querySelector("[data-role=loader],.ui-loader");return a||(a=b.createElement("div"),k.setNSData(a,"role","loader")),o.instanceWidget(a,"Loader")},p.Router=x,o.initRouter(x)}(a,a.document,d),function(a,b){"use strict";function c(b,c){var d=g.stripQueryParams(b).replace("#",""),e=a.getElementById(d);return e&&j.matchesSelector(e,c)?b===d?h.setNSData(e,"url","#"+d):h.setNSData(e,"url",b):e=null,e}var d,e,f=b.util,g=f.path,h=f.DOM,i=f.object,j=f.selectors,k=b.router.history,l=b.engine,m=(b.widget.core.Page,{});m.orderNumber=1,m.defaults={transition:"none"},m.filter=l.getWidgetDefinition("Page").selector.replace(/(\s*)/g,""),m.option=function(){var a=i.merge({},m.defaults);return a.transition=b.getConfig("pageTransition",a.transition),a},m.init=function(){var b=[].slice.call(a.querySelectorAll(this.filter));b.forEach(function(a){h.getNSData(a,"url")||h.setNSData(a,"url",a.id&&"#"+a.id||location.pathname+location.search)})},m.open=function(b,c){var d,e=a.title,f={},m=l.getRouter();d=b!==m.getFirstPage()||c.dataUrl?h.getNSData(b,"url"):g.documentUrl.hrefNoHash,e=h.getNSData(b,"title")||j.getChildrenBySelector(b,".ui-header > .ui-title").textContent||e,h.getNSData(b,"title")||h.setNSData(b,"title",e),d&&!c.fromHashChange&&(!g.isPath(d)&&d.indexOf("#")<0&&(d=g.makeUrlAbsolute("#"+d,g.documentUrl.hrefNoHash)),f=i.merge({},c,{url:d}),k.replace(f,e,d)),this._setBase(d),a.title=e,this.active=!0,this.getContainer().change(b,c)},m.find=function(a){var b,d=this,e=l.getRouter(),f=d._createDataUrl(a),h=e.getFirstPage(),i=e.getContainer(),j="[data-url='"+f+"']",k=/,/gm;return/#/.test(a)&&g.isPath(f)?null:(j+=d.filter.replace(k,",[data-url='"+f+"']"),b=i.element.querySelector(j),b||!f||g.isPath(f)||(b=c(f,d.filter)),!b&&g.isFirstPageUrl(f)&&h&&(b=h),b)},m.parse=function(a,b){var c,d=this,e=d._createDataUrl(b);return d._setBase(b),c=a.querySelector(d.filter),c&&(h.setNSData(c,"url",e),h.setNSData(c,"external",!0)),c},m.onHashChange=function(){return null},m._createDataUrl=function(a){return g.convertUrlToDataUrl(a,!0)},m.onOpenFailed=function(){this._setBase(g.parseLocation().hrefNoSearch)},m._getBaseElement=function(){return e||(e=a.querySelector("head")),d||(d=a.querySelector("base"),d||(d=a.createElement("base"),d.href=g.documentBase.hrefNoHash,e.appendChild(d))),d},m._setBase=function(a){var b=this._getBaseElement(),c=b.href;g.isPath(a)&&(a=g.makeUrlAbsolute(a,g.documentBase),g.parseUrl(c).hrefNoSearch!==g.parseUrl(a).hrefNoSearch&&(b.href=a,g.documentBase=g.parseUrl(g.makeUrlAbsolute(a,g.documentUrl.href))))},m.getContainer=function(){return l.getRouter().getContainer()},m.getActive=function(){return this.getContainer().getActivePage()},m.getActiveElement=function(){return this.getActive().element},b.router.route.page=m}(a.document,d),function(a,b,c){"use strict";function d(a,c){var d,e=/^#/;return a=a.replace(e,""),d=b.getElementById(a),d&&j.matchesSelector(d,c)?l.setNSData(d,"url","#"+a):d=null,d}var e=c.widget.core.Popup,f=c.util,g={defaults:{transition:"none",container:null,volatileRecord:!0},filter:"."+e.classes.popup,activePopup:null,events:{POPUP_HIDE:"popuphide"}},h=c.engine,i=c.util.path,j=c.util.selectors,k=c.router.history,l=c.util.DOM,m=c.util.object,n="popup=true",o=/([&|\?]popup=true)/;g.orderNumber=100,g.option=function(){var a=m.merge({},g.defaults);return a.transition=c.getConfig("popupTransition",a.transition),a},g.setActive=function(a,b){var c,d=i.getLocation(),e=d.replace(o,"");this.activePopup=a,a?(b&&!b.fromHashChange&&b.history&&(c=i.addHashSearchParams(e,n),k.replace(b,"",c)),this.active=!0):d!==e&&(this.active=!1,k.back())},g.open=function(a,c,d){var e,i,j=this,k=h.getRouter(),m=j.events,n=function(){b.removeEventListener(m.POPUP_HIDE,n,!1),a.parentNode.removeChild(a),j.activePopup=null},o=function(){var f=c["position-to"];f&&(c.positionTo=f),d&&d.touches?(c.x=d.touches[0].clientX,c.y=d.touches[0].clientY):d&&(c.x=d.clientX,c.y=d.clientY),b.removeEventListener(m.POPUP_HIDE,o,!1),e=h.instanceWidget(a,"Popup",c),e.open(c),j.activePopup=e},p=k.container.getActivePage();l.getNSData(a,"external")===!0&&(i=c.container?p.element.querySelector(c.container):p.element,a.parentNode!==i&&(a=f.importEvaluateAndAppendElement(a,i)),b.addEventListener(g.events.POPUP_HIDE,n,!1)),j.hasActive()?(b.addEventListener(m.POPUP_HIDE,o,!1),j.close()):o(),this.active=!0},g.close=function(a,b){var c,d=i.getLocation(),f=d.replace(o,"");return b=b||{},!a||a instanceof e||(a=h.instanceWidget(a,"Popup",b)),a=a||this.activePopup,a?(c=a.options,c.history&&d!==f?(c.transition=b.transition||c.transition,c.ext=b.ext||c.ext,c.dismissible||h.getRouter().unlock(),k.back()):a.close(b||{}),!0):!1},g.onHashChange=function(a,b){var c=this.activePopup;return c?(c.close(b),this.active=!1,!0):!1},g.onOpenFailed=function(){return null},g.find=function(a){var b,c=this,e=c._createDataUrl(a),f=h.getRouter().getContainer().getActivePage();return b=f.element.querySelector("[data-url='"+e+"']"+c.filter),b||!e||i.isPath(e)||(b=d(e,c.filter)),b},g.parse=function(a,b){var c,d=this,e=d._createDataUrl(b);return c=a.querySelector(d.filter),c&&(l.setNSData(c,"url",e),l.setNSData(c,"external",!0)),c},g._createDataUrl=function(a){return i.convertUrlToDataUrl(a)},g.hasActive=function(){return!!this.activePopup},g.getActive=function(){return this.activePopup},g.getActiveElement=function(){var a=this.getActive();return a&&a.element},c.router.route.popup=g}(a,a.document,d),function(a,b){"use strict";var c=b.widget.wearable.AssistPanel,d=b.util.path,e=b.router.history,f=b.engine,g={},h="assistPanel=true",i=/([&|\?]assistPanel=true)/;g.orderNumber=1001,g.defaults={transition:"none"},g.filter="."+c.classes.assistPanel,g.option=function(){return null},g.open=function(a){},g.find=function(a){var b,c=d.convertUrlToDataUrl(a),e=f.getRouter().getContainer().getActivePage();return b=e.element.querySelector("#"+c)},g.parse=function(a,b){return null},g.setActive=function(a){var b,c=d.getLocation(),f=c.replace(i,"");this._activeAssistPanel=a,a?(b=d.addHashSearchParams(f,h),e.replace({},"",b),this.active=!0):c!==f&&e.back()},g.onHashChange=function(a,b,c){var d=this,e=d._activeAssistPanel,f=c.stateUrl;return e&&f.search(h)>0&&a.search(h)<0?(e.close(b),this.active=!1,!0):null},b.router.route.assistPanel=g}(a.document,d),function(a,b){"use strict";a.addEventListener("beforerouterinit",function(){b.setConfig("autoInitializePage",b.autoInitializePage)},!1),a.addEventListener("routerinit",function(d){var e=d.detail,f=e.getRoute("page"),g=b.router.history,h=g.back.bind(e),i=b.widget.core.Page.classes,j=i.uiPageActive;b.changePage=e.open.bind(e),a.addEventListener("pageshow",function(){b.activePage=a.querySelector("."+j)}),b.firstPage=e.getFirstPage(),b.getActivePage=f.getActiveElement.bind(f),b.back=h,b.initializePage=e.init.bind(e),b.pageContainer=e.container,b.openPopup=function(a,b){var d;d=a&&a.length!==c&&"object"==typeof a?a[0]:a,e.openPopup(d,b)},b.closePopup=e.closePopup.bind(e)},!1)}(a.document,d),function(a){"use strict";a.getConfig("autorun",!0)===!0&&a.engine.run()}(d),d.info.profile="fit2"}(window,window.document);