/*! * Copyright 2014 Drifty Co. * http://drifty.com/ * * Ionic, v1.0.0-beta.11 * A powerful HTML5 mobile app framework. * http://ionicframework.com/ * * By @maxlynch, @benjsperry, @adamdbradley <3 * * Licensed under the MIT license. Please see LICENSE for more information. * */ !function(){function t(t,e,n){e!==!1?k.addEventListener(t,$[t],n):k.removeEventListener(t,$[t])}function e(t){var e=E(t.target),i=S(e);if(ionic.tap.requiresNativeClick(i)||F)return!1;var r=T(t);n("click",i,r.x,r.y),_(i)}function n(t,e,n,i){var r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,0,0,n,i,!1,!1,!1,!1,0,null),r.isIonicTap=!0,e.dispatchEvent(r)}function i(t){return("submit"!=t.target.type||0!==t.detail)&&(ionic.scroll.isScrolling&&ionic.tap.containsOrIsTextInput(t.target)||!t.isIonicTap&&!ionic.tap.requiresNativeClick(t.target))?(t.stopPropagation(),ionic.tap.isLabelWithTextInput(t.target)||t.preventDefault(),!1):void 0}function r(e){if(!e.isIonicTap&&!d(e)){if(z)return e.stopPropagation(),ionic.tap.isTextInput(e.target)&&q===e.target||/^(select|option)$/i.test(e.target.tagName)||e.preventDefault(),!1;F=!1,W=T(e),t("mousemove"),ionic.activator.start(e)}}function o(n){return z?(n.stopPropagation(),n.preventDefault(),!1):d(n)||/^(select|option)$/i.test(n.target.tagName)?!1:(v(n)||e(n),t("mousemove",!1),ionic.activator.end(),void(F=!1))}function s(e){return v(e)?(t("mousemove",!1),ionic.activator.end(),F=!0,!1):void 0}function a(e){if(!d(e)&&(F=!1,h(),W=T(e),t(B),ionic.activator.start(e),ionic.Platform.isIOS()&&ionic.tap.isLabelWithTextInput(e.target))){var n=S(E(e.target));n!==Y&&e.preventDefault()}}function l(t){d(t)||(h(),v(t)||(e(t),/^(select|option)$/i.test(t.target.tagName)&&t.preventDefault()),q=t.target,u())}function c(e){return v(e)?(F=!0,t(B,!1),ionic.activator.end(),!1):void 0}function u(){t(B,!1),ionic.activator.end(),F=!1}function h(){z=!0,clearTimeout(H),H=setTimeout(function(){z=!1},2e3)}function d(t){return t.isTapHandled?!0:(t.isTapHandled=!0,ionic.scroll.isScrolling&&ionic.tap.containsOrIsTextInput(t.target)?(t.preventDefault(),!0):void 0)}function _(t){U=null;var e=!1;"SELECT"==t.tagName?(n("mousedown",t,0,0),t.focus&&t.focus(),e=!0):m()===t?e=!0:/^(input|textarea)$/i.test(t.tagName)?(e=!0,t.focus&&t.focus(),t.value=t.value,z&&(U=t)):f(),e&&(m(t),ionic.trigger("ionic.focusin",{target:t},!0))}function f(){var t=m();t&&/^(input|textarea|select)$/i.test(t.tagName)&&t.blur(),m(null)}function p(t){z&&ionic.tap.isTextInput(m())&&ionic.tap.isTextInput(U)&&U!==t.target&&(U.focus(),U=null),ionic.scroll.isScrolling=!1}function g(){m(null)}function m(t){return arguments.length&&(Y=t),Y||document.activeElement}function v(t){if(!t||1!==t.target.nodeType||!W||0===W.x&&0===W.y)return!1;var e=T(t),n=!(!t.target.classList||!t.target.classList.contains),i=n&t.target.classList.contains("button")?j:Z;return Math.abs(W.x-e.x)>i||Math.abs(W.y-e.y)>i}function T(t){var e={x:0,y:0};if(t){var n=t.touches&&t.touches.length?t.touches:[t],i=t.changedTouches&&t.changedTouches[0]||n[0];i&&(e.x=i.clientX||i.pageX||0,e.y=i.clientY||i.pageY||0)}return e}function E(t,e){for(var n=t,i=0;6>i&&n;i++){if("LABEL"===n.tagName)return n;n=n.parentElement}return e!==!1?t:void 0}function S(t){if(t&&"LABEL"===t.tagName){if(t.control)return t.control;if(t.querySelector){var e=t.querySelector("input,textarea,select");if(e)return e}}return t}function w(){C()?(window.addEventListener("native.keyboardshow",b),window.addEventListener("native.keyboardhide",x),window.addEventListener("native.showkeyboard",b),window.addEventListener("native.hidekeyboard",x)):document.body.addEventListener("focusout",x),document.body.addEventListener("ionic.focusin",y),document.body.addEventListener("focusin",y),document.body.addEventListener("orientationchange",O),document.removeEventListener("touchstart",w)}function b(t){clearTimeout(J),ionic.keyboard.height=t.keyboardHeight}function y(t){t.target&&ionic.tap.isTextInput(t.target)&&!ionic.tap.isDateInput(t.target)&&I(t.target)&&(document.addEventListener("keydown",G,!1),document.body.scrollTop=0,document.body.querySelector(".scroll-content").scrollTop=0,K=t.target,D(t))}function D(t){clearTimeout(Q),clearTimeout(J),Q=setTimeout(function(){if(!(ee+350>Date.now())){ee=Date.now();var e,n=K.getBoundingClientRect(),i=0,r=setInterval(function(){e=P(),i>10&&(clearInterval(r),e=275),e&&(L(t.target,n.top,n.bottom,te,e),clearInterval(r)),i++},100)}},32)}function L(t,e,n,i,r){var o={target:t,elementTop:Math.round(e),elementBottom:Math.round(n),keyboardHeight:r,viewportHeight:i};return o.hasPlugin=C(),o.contentHeight=i-r,o.isElementUnderKeyboard=o.elementBottom>o.contentHeight,ionic.keyboard.isOpen=!0,K=t,ionic.trigger("scrollChildIntoView",o,!0),ionic.requestAnimationFrame(function(){document.body.classList.add(ne)}),document.addEventListener("touchmove",A,!1),o}function x(){clearTimeout(J),J=setTimeout(M,350)}function M(){ionic.keyboard.isOpen=!1,ionic.trigger("resetScrollView",{target:K},!0),ionic.requestAnimationFrame(function(){document.body.classList.remove(ne)}),document.removeEventListener("touchmove",A),document.removeEventListener("keydown",G)}function N(){window.innerHeight>te&&(te=window.innerHeight)}function G(t){ionic.scroll.isScrolling&&A(t)}function A(t){"TEXTAREA"!==t.target.tagName&&t.preventDefault()}function O(){var t=window.innerHeight;if(t===te)var e=0,n=setInterval(function(){e>10&&clearInterval(n),t=window.innerHeight,t!==te&&(ionic.keyboard.landscape=te>t?!0:!1,te=t,clearInterval(n)),e++},50);else te=t}function P(){return ionic.keyboard.height?ionic.keyboard.height:ionic.Platform.isAndroid()?ionic.Platform.isFullScreen?275:window.innerHeight1?e[1]:"_");X()}}function X(){var t=oe.width,e=oe.height,n=ionic.Platform,i=n.version(),r="device-width",o="device-height",s=ionic.viewport.orientation();delete oe.height,oe.width=r,n.isIPad()?i>7?delete oe.width:n.isWebView()?90==s?oe.height="0":7==i&&(oe.height=o):7>i&&(oe.height="0"):n.isIOS()&&(n.isWebView()?i>7?delete oe.width:7>i?e&&(oe.height="0"):7==i&&(oe.height=o):7>i&&e&&(oe.height="0")),(t!==oe.width||e!==oe.height)&&V()}function V(){var t,e=[];for(t in oe)oe[t]&&e.push(t+("_"==oe[t]?"":"="+oe[t]));re.content=e.join(", ")}window.ionic={controllers:{},views:{},version:"1.0.0-beta.11"},function(t,e,n){function i(){o=!0;for(var t=0;tr;r++)if(n=i[r],n.nodeName&&n.nodeName.toLowerCase()==e){if(n==t)return o;o++}return Array.prototype.slice.call(t.parentNode.children).indexOf(t)},swapNodes:function(t,e){e.parentNode.insertBefore(t,e)},centerElementByMargin:function(t){t.style.marginLeft=-t.offsetWidth/2+"px",t.style.marginTop=-t.offsetHeight/2+"px"},centerElementByMarginTwice:function(t){n.requestAnimationFrame(function(){n.DomUtil.centerElementByMargin(t),setTimeout(function(){n.DomUtil.centerElementByMargin(t),setTimeout(function(){n.DomUtil.centerElementByMargin(t)})})})},elementIsDescendant:function(t,e,n){var i=t;do{if(i===e)return!0;i=i.parentNode}while(i&&i!==n);return!1},getParentWithClass:function(t,e,n){for(n=n||10;t.parentNode&&n--;){if(t.parentNode.classList&&t.parentNode.classList.contains(e))return t.parentNode;t=t.parentNode}return null},getParentOrSelfWithClass:function(t,e,n){for(n=n||10;t&&n--;){if(t.classList&&t.classList.contains(e))return t;t=t.parentNode}return null},rectContains:function(t,e,n,i,r,o){return n>t||t>r?!1:i>e||e>o?!1:!0}},n.requestAnimationFrame=n.DomUtil.requestAnimationFrame,n.cancelAnimationFrame=n.DomUtil.cancelAnimationFrame,n.animationFrameThrottle=n.DomUtil.animationFrameThrottle}(window,document,ionic),function(t){t.CustomEvent=function(){if("function"==typeof window.CustomEvent)return CustomEvent;var t=function(t,e){var n;e=e||{bubbles:!1,cancelable:!1,detail:void 0};try{n=document.createEvent("CustomEvent"),n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail)}catch(i){n=document.createEvent("Event");for(var r in e)n[r]=e[r];n.initEvent(t,e.bubbles,e.cancelable)}return n};return t.prototype=window.Event.prototype,t}(),t.EventController={VIRTUALIZED_EVENTS:["tap","swipe","swiperight","swipeleft","drag","hold","release"],trigger:function(e,n,i,r){var o=new t.CustomEvent(e,{detail:n,bubbles:!!i,cancelable:!!r});n&&n.target&&n.target.dispatchEvent&&n.target.dispatchEvent(o)||window.dispatchEvent(o)},on:function(e,n,i){for(var r=i||window,o=0,s=this.VIRTUALIZED_EVENTS.length;s>o;o++)if(e==this.VIRTUALIZED_EVENTS[o]){var a=new t.Gesture(i);return a.on(e,n),a}r.addEventListener(e,n)},off:function(t,e,n){n.removeEventListener(t,e)},onGesture:function(e,n,i){var r=new t.Gesture(i);return r.on(e,n),r},offGesture:function(t,e,n){t.off(e,n)},handlePopState:function(){}},t.on=function(){t.EventController.on.apply(t.EventController,arguments)},t.off=function(){t.EventController.off.apply(t.EventController,arguments)},t.trigger=t.EventController.trigger,t.onGesture=function(){return t.EventController.onGesture.apply(t.EventController.onGesture,arguments)},t.offGesture=function(){return t.EventController.offGesture.apply(t.EventController.offGesture,arguments)}}(window.ionic),function(t){function e(){if(!t.Gestures.READY){t.Gestures.event.determineEventTypes();for(var e in t.Gestures.gestures)t.Gestures.gestures.hasOwnProperty(e)&&t.Gestures.detection.register(t.Gestures.gestures[e]);t.Gestures.event.onTouch(t.Gestures.DOCUMENT,t.Gestures.EVENT_MOVE,t.Gestures.detection.detect),t.Gestures.event.onTouch(t.Gestures.DOCUMENT,t.Gestures.EVENT_END,t.Gestures.detection.detect),t.Gestures.READY=!0}}t.Gesture=function(e,n){return new t.Gestures.Instance(e,n||{})},t.Gestures={},t.Gestures.defaults={stop_browser_behavior:"disable-user-behavior"},t.Gestures.HAS_POINTEREVENTS=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,t.Gestures.HAS_TOUCHEVENTS="ontouchstart"in window,t.Gestures.MOBILE_REGEX=/mobile|tablet|ip(ad|hone|od)|android|silk/i,t.Gestures.NO_MOUSEEVENTS=t.Gestures.HAS_TOUCHEVENTS&&window.navigator.userAgent.match(t.Gestures.MOBILE_REGEX),t.Gestures.EVENT_TYPES={},t.Gestures.DIRECTION_DOWN="down",t.Gestures.DIRECTION_LEFT="left",t.Gestures.DIRECTION_UP="up",t.Gestures.DIRECTION_RIGHT="right",t.Gestures.POINTER_MOUSE="mouse",t.Gestures.POINTER_TOUCH="touch",t.Gestures.POINTER_PEN="pen",t.Gestures.EVENT_START="start",t.Gestures.EVENT_MOVE="move",t.Gestures.EVENT_END="end",t.Gestures.DOCUMENT=window.document,t.Gestures.plugins={},t.Gestures.READY=!1,t.Gestures.Instance=function(n,i){var r=this;if(null!==n)return e(),this.element=n,this.enabled=!0,this.options=t.Gestures.utils.extend(t.Gestures.utils.extend({},t.Gestures.defaults),i||{}),this.options.stop_browser_behavior&&t.Gestures.utils.stopDefaultBrowserBehavior(this.element,this.options.stop_browser_behavior),t.Gestures.event.onTouch(n,t.Gestures.EVENT_START,function(e){r.enabled&&t.Gestures.detection.startDetect(r,e)}),this},t.Gestures.Instance.prototype={on:function(t,e){for(var n=t.split(" "),i=0;i0&&o==t.Gestures.EVENT_END?o=t.Gestures.EVENT_MOVE:u||(o=t.Gestures.EVENT_END),(u||null===n)&&(n=l),s.call(t.Gestures.detection,a.collectEventData(e,o,a.getTouchList(n,o),l)),t.Gestures.HAS_POINTEREVENTS&&o==t.Gestures.EVENT_END&&(u=t.Gestures.PointerEvent.updatePointer(o,l))),u||(n=null,i=!1,r=!1,t.Gestures.PointerEvent.reset())}})},determineEventTypes:function(){var e;e=t.Gestures.HAS_POINTEREVENTS?t.Gestures.PointerEvent.getEvents():t.Gestures.NO_MOUSEEVENTS?["touchstart","touchmove","touchend touchcancel"]:["touchstart mousedown","touchmove mousemove","touchend touchcancel mouseup"],t.Gestures.EVENT_TYPES[t.Gestures.EVENT_START]=e[0],t.Gestures.EVENT_TYPES[t.Gestures.EVENT_MOVE]=e[1],t.Gestures.EVENT_TYPES[t.Gestures.EVENT_END]=e[2]},getTouchList:function(e){return t.Gestures.HAS_POINTEREVENTS?t.Gestures.PointerEvent.getTouchList():e.touches?e.touches:(e.identifier=1,[e])},collectEventData:function(e,n,i,r){var o=t.Gestures.POINTER_TOUCH;return(r.type.match(/mouse/)||t.Gestures.PointerEvent.matchType(t.Gestures.POINTER_MOUSE,r))&&(o=t.Gestures.POINTER_MOUSE),{center:t.Gestures.utils.getCenter(i),timeStamp:(new Date).getTime(),target:r.target,touches:i,eventType:n,pointerType:o,srcEvent:r,preventDefault:function(){this.srcEvent.preventManipulation&&this.srcEvent.preventManipulation(),this.srcEvent.preventDefault},stopPropagation:function(){this.srcEvent.stopPropagation()},stopDetect:function(){return t.Gestures.detection.stopDetect()}}}},t.Gestures.PointerEvent={pointers:{},getTouchList:function(){var t=this,e=[];return Object.keys(t.pointers).sort().forEach(function(n){e.push(t.pointers[n])}),e},updatePointer:function(e,n){return e==t.Gestures.EVENT_END?this.pointers={}:(n.identifier=n.pointerId,this.pointers[n.pointerId]=n),Object.keys(this.pointers).length},matchType:function(e,n){if(!n.pointerType)return!1;var i={};return i[t.Gestures.POINTER_MOUSE]=n.pointerType==n.MSPOINTER_TYPE_MOUSE||n.pointerType==t.Gestures.POINTER_MOUSE,i[t.Gestures.POINTER_TOUCH]=n.pointerType==n.MSPOINTER_TYPE_TOUCH||n.pointerType==t.Gestures.POINTER_TOUCH,i[t.Gestures.POINTER_PEN]=n.pointerType==n.MSPOINTER_TYPE_PEN||n.pointerType==t.Gestures.POINTER_PEN,i[e]},getEvents:function(){return["pointerdown MSPointerDown","pointermove MSPointerMove","pointerup pointercancel MSPointerUp MSPointerCancel"]},reset:function(){this.pointers={}}},t.Gestures.utils={extend:function(t,e,n){for(var i in e)void 0!==t[i]&&n||(t[i]=e[i]);return t},hasParent:function(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1},getCenter:function(t){for(var e=[],n=[],i=0,r=t.length;r>i;i++)e.push(t[i].pageX),n.push(t[i].pageY);return{pageX:(Math.min.apply(Math,e)+Math.max.apply(Math,e))/2,pageY:(Math.min.apply(Math,n)+Math.max.apply(Math,n))/2}},getVelocity:function(t,e,n){return{x:Math.abs(e/t)||0,y:Math.abs(n/t)||0}},getAngle:function(t,e){var n=e.pageY-t.pageY,i=e.pageX-t.pageX;return 180*Math.atan2(n,i)/Math.PI},getDirection:function(e,n){var i=Math.abs(e.pageX-n.pageX),r=Math.abs(e.pageY-n.pageY);return i>=r?e.pageX-n.pageX>0?t.Gestures.DIRECTION_LEFT:t.Gestures.DIRECTION_RIGHT:e.pageY-n.pageY>0?t.Gestures.DIRECTION_UP:t.Gestures.DIRECTION_DOWN},getDistance:function(t,e){var n=e.pageX-t.pageX,i=e.pageY-t.pageY;return Math.sqrt(n*n+i*i)},getScale:function(t,e){return t.length>=2&&e.length>=2?this.getDistance(e[0],e[1])/this.getDistance(t[0],t[1]):1},getRotation:function(t,e){return t.length>=2&&e.length>=2?this.getAngle(e[1],e[0])-this.getAngle(t[1],t[0]):0},isVertical:function(e){return e==t.Gestures.DIRECTION_UP||e==t.Gestures.DIRECTION_DOWN},stopDefaultBrowserBehavior:function(t,e){t&&t.classList&&(t.classList.add(e),t.onselectstart=function(){return!1})}},t.Gestures.detection={gestures:[],current:null,previous:null,stopped:!1,startDetect:function(e,n){this.current||(this.stopped=!1,this.current={inst:e,startEvent:t.Gestures.utils.extend({},n),lastEvent:!1,name:""},this.detect(n))},detect:function(e){if(this.current&&!this.stopped){e=this.extendEventData(e);for(var n=this.current.inst.options,i=0,r=this.gestures.length;r>i;i++){var o=this.gestures[i];if(!this.stopped&&n[o.name]!==!1&&o.handler.call(o,e,this.current.inst)===!1){this.stopDetect();break}}return this.current&&(this.current.lastEvent=e),e.eventType==t.Gestures.EVENT_END&&!e.touches.length-1&&this.stopDetect(),e}},stopDetect:function(){this.previous=t.Gestures.utils.extend({},this.current),this.current=null,this.stopped=!0},extendEventData:function(e){var n=this.current.startEvent;if(n&&(e.touches.length!=n.touches.length||e.touches===n.touches)){n.touches=[];for(var i=0,r=e.touches.length;r>i;i++)n.touches.push(t.Gestures.utils.extend({},e.touches[i]))}var o=e.timeStamp-n.timeStamp,s=e.center.pageX-n.center.pageX,a=e.center.pageY-n.center.pageY,l=t.Gestures.utils.getVelocity(o,s,a);return t.Gestures.utils.extend(e,{deltaTime:o,deltaX:s,deltaY:a,velocityX:l.x,velocityY:l.y,distance:t.Gestures.utils.getDistance(n.center,e.center),angle:t.Gestures.utils.getAngle(n.center,e.center),direction:t.Gestures.utils.getDirection(n.center,e.center),scale:t.Gestures.utils.getScale(n.touches,e.touches),rotation:t.Gestures.utils.getRotation(n.touches,e.touches),startEvent:n}),e},register:function(e){var n=e.defaults||{};return void 0===n[e.name]&&(n[e.name]=!0),t.Gestures.utils.extend(t.Gestures.defaults,n,!0),e.index=e.index||1e3,this.gestures.push(e),this.gestures.sort(function(t,e){return t.indexe.index?1:0}),this.gestures}},t.Gestures.gestures=t.Gestures.gestures||{},t.Gestures.gestures.Hold={name:"hold",index:10,defaults:{hold_timeout:500,hold_threshold:1},timer:null,handler:function(e,n){switch(e.eventType){case t.Gestures.EVENT_START:clearTimeout(this.timer),t.Gestures.detection.current.name=this.name,this.timer=setTimeout(function(){"hold"==t.Gestures.detection.current.name&&(t.tap.cancelClick(),n.trigger("hold",e))},n.options.hold_timeout);break;case t.Gestures.EVENT_MOVE:e.distance>n.options.hold_threshold&&clearTimeout(this.timer);break;case t.Gestures.EVENT_END:clearTimeout(this.timer)}}},t.Gestures.gestures.Tap={name:"tap",index:100,defaults:{tap_max_touchtime:250,tap_max_distance:10,tap_always:!0,doubletap_distance:20,doubletap_interval:300},handler:function(e,n){if(e.eventType==t.Gestures.EVENT_END&&"touchcancel"!=e.srcEvent.type){var i=t.Gestures.detection.previous,r=!1;if(e.deltaTime>n.options.tap_max_touchtime||e.distance>n.options.tap_max_distance)return;i&&"tap"==i.name&&e.timeStamp-i.lastEvent.timeStamp0&&e.touches.length>n.options.swipe_max_touches)return;(e.velocityX>n.options.swipe_velocity||e.velocityY>n.options.swipe_velocity)&&(n.trigger(this.name,e),n.trigger(this.name+e.direction,e))}}},t.Gestures.gestures.Drag={name:"drag",index:50,defaults:{drag_min_distance:10,correct_for_drag_min_distance:!0,drag_max_touches:1,drag_block_horizontal:!0,drag_block_vertical:!0,drag_lock_to_axis:!1,drag_lock_min_distance:25},triggered:!1,handler:function(e,n){if(t.Gestures.detection.current.name!=this.name&&this.triggered)return n.trigger(this.name+"end",e),void(this.triggered=!1);if(!(n.options.drag_max_touches>0&&e.touches.length>n.options.drag_max_touches))switch(e.eventType){case t.Gestures.EVENT_START:this.triggered=!1;break;case t.Gestures.EVENT_MOVE:if(e.distancen.options.transform_min_rotation&&n.trigger("rotate",e),i>n.options.transform_min_scale&&(n.trigger("pinch",e),n.trigger("pinch"+(e.scale<1?"in":"out"),e));break;case t.Gestures.EVENT_END:this.triggered&&n.trigger(this.name+"end",e),this.triggered=!1}}},t.Gestures.gestures.Touch={name:"touch",index:-1/0,defaults:{prevent_default:!1,prevent_mouseevents:!1},handler:function(e,n){return n.options.prevent_mouseevents&&e.pointerType==t.Gestures.POINTER_MOUSE?void e.stopDetect():(n.options.prevent_default&&e.preventDefault(),void(e.eventType==t.Gestures.EVENT_START&&n.trigger(this.name,e)))}},t.Gestures.gestures.Release={name:"release",index:1/0,handler:function(e,n){e.eventType==t.Gestures.EVENT_END&&n.trigger(this.name,e)}}}(window.ionic),function(t,e,n){function i(){n.Platform.isWebView()?e.addEventListener("deviceready",r,!1):r(),t.removeEventListener("load",i,!1)}function r(){n.Platform.isReady=!0,n.Platform.detect();for(var t=0;t0?i=i.replace(".","_"):i+="_0",this.platforms.push(e+i.split("_")[0]),this.platforms.push(e+i),this.isAndroid()&&4.4>n?t=4>n?"c":"b":this.isWindowsPhone()&&(t="b")}}this.setGrade(t)},isWebView:function(){return!(!t.cordova&&!t.PhoneGap&&!t.phonegap)},isIPad:function(){return/iPad/i.test(n.Platform.navigator.platform)?!0:/iPad/i.test(this.ua)},isIOS:function(){return this.is(o)},isAndroid:function(){return this.is(s)},isWindowsPhone:function(){return this.is(a)},platform:function(){return null===l&&this.setPlatform(this.device().platform),l},setPlatform:function(t){l="undefined"!=typeof t&&null!==t&&t.length?t.toLowerCase():this.ua.indexOf("Android")>0?s:this.ua.indexOf("iPhone")>-1||this.ua.indexOf("iPad")>-1||this.ua.indexOf("iPod")>-1?o:this.ua.indexOf("Windows Phone")>-1?a:n.Platform.navigator.platform&&navigator.platform.toLowerCase().split(" ")[0]||""},version:function(){return null===c&&this.setVersion(this.device().version),c},setVersion:function(t){if("undefined"!=typeof t&&null!==t&&(t=t.split("."),t=parseFloat(t[0]+"."+(t.length>1?t[1]:0)),!isNaN(t)))return void(c=t);c=0;var e=this.platform(),n={android:/Android (\d+).(\d+)?/,ios:/OS (\d+)_(\d+)?/,windowsphone:/Windows Phone (\d+).(\d+)?/};n[e]&&(t=this.ua.match(n[e]),t&&t.length>2&&(c=parseFloat(t[1]+"."+t[2])))},is:function(t){if(t=t.toLowerCase(),this.platforms)for(var e=0;e=0},exitApp:function(){this.ready(function(){navigator.app&&navigator.app.exitApp&&navigator.app.exitApp()})},showStatusBar:function(i){this._showStatusBar=i,this.ready(function(){n.requestAnimationFrame(function(){n.Platform._showStatusBar?(t.StatusBar&&t.StatusBar.show(),e.body.classList.remove("status-bar-hide")):(t.StatusBar&&t.StatusBar.hide(),e.body.classList.add("status-bar-hide"))})})},fullScreen:function(t,i){this.isFullScreen=t!==!1,n.DomUtil.ready(function(){n.requestAnimationFrame(function(){n.Platform.isFullScreen?e.body.classList.add("fullscreen"):e.body.classList.remove("fullscreen")}),n.Platform.showStatusBar(i===!0)})}};var l=null,c=null,u=[];t.addEventListener("load",i,!1)}(this,document,ionic),function(t,e){"use strict";e.CSS={},function(){var n,i=["webkitTransform","transform","-webkit-transform","webkit-transform","-moz-transform","moz-transform","MozTransform","mozTransform","msTransform"];for(n=0;nl&&(s&&1===s.nodeType);l++){if(r&&s.classList.contains("item")){r=s; break}if("A"==s.tagName||"BUTTON"==s.tagName||s.hasAttribute("ng-click")){r=s;break}if(s.classList.contains("button")){r=s;break}s=s.parentElement}r&&(o[a]=r,"touchstart"===t.type?n._activateTimeout=setTimeout(i,80):e.requestAnimationFrame(i),a=a>19?0:a+1)}})},end:function(){clearTimeout(this._activateTimeout),setTimeout(n,200)}}}(document,ionic),function(t){var e=["0","0","0"];t.Utils={arrayMove:function(t,e,n){if(n>=t.length)for(var i=n-t.length;i--+1;)t.push(void 0);return t.splice(n,0,t.splice(e,1)[0]),t},proxy:function(t,e){var n=Array.prototype.slice.call(arguments,2);return function(){return t.apply(e,n.concat(Array.prototype.slice.call(arguments)))}},debounce:function(t,e,n){var i,r,o,s,a;return function(){o=this,r=arguments,s=new Date;var l=function(){var c=new Date-s;e>c?i=setTimeout(l,e-c):(i=null,n||(a=t.apply(o,r)))},c=n&&!i;return i||(i=setTimeout(l,e)),c&&(a=t.apply(o,r)),a}},throttle:function(t,e,n){var i,r,o,s=null,a=0;n||(n={});var l=function(){a=n.leading===!1?0:Date.now(),s=null,o=t.apply(i,r)};return function(){var c=Date.now();a||n.leading!==!1||(a=c);var u=e-(c-a);return i=this,r=arguments,0>=u?(clearTimeout(s),s=null,a=c,o=t.apply(i,r)):s||n.trailing===!1||(s=setTimeout(l,u)),o}},inherit:function(e,n){var i,r=this;i=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return r.apply(this,arguments)},t.extend(i,r,n);var o=function(){this.constructor=i};return o.prototype=r.prototype,i.prototype=new o,e&&t.extend(i.prototype,e),i.__super__=r.prototype,i},extend:function(t){for(var e=Array.prototype.slice.call(arguments,1),n=0;nwindow.innerHeight?90:0}},ionic.Platform.ready(function(){R(),window.addEventListener("orientationchange",function(){setTimeout(X,1e3)},!1)}),function(t){"use strict";t.views.View=function(){this.initialize.apply(this,arguments)},t.views.View.inherit=t.inherit,t.extend(t.views.View.prototype,{initialize:function(){}})}(window.ionic);var se={effect:{}};!function(t){var e=Date.now||function(){return+new Date},n=60,i=1e3,r={},o=1;se.effect.Animate={requestAnimationFrame:function(){var e=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame,n=!!e;if(e&&!/requestAnimationFrame\(\)\s*\{\s*\[native code\]\s*\}/i.test(e.toString())&&(n=!1),n)return function(t,n){e(t,n)};var i=60,r={},o=0,s=1,a=null,l=+new Date;return function(t){var e=s++;return r[e]=t,o++,null===a&&(a=setInterval(function(){var t=+new Date,e=r;r={},o=0;for(var n in e)e.hasOwnProperty(n)&&(e[n](t),l=t);t-l>2500&&(clearInterval(a),a=null)},1e3/i)),e}}(),stop:function(t){var e=null!=r[t];return e&&(r[t]=null),e},isRunning:function(t){return null!=r[t]},start:function(t,s,a,l,c,u){var h=e(),d=h,_=0,f=0,p=o++;if(u||(u=document.body),p%20===0){var g={};for(var m in r)g[m]=!0;r=g}var v=function(o){var g=o!==!0,m=e();if(!r[p]||s&&!s(p))return r[p]=null,void(a&&a(n-f/((m-h)/i),p,!1));if(g)for(var T=Math.round((m-d)/(i/n))-1,E=0;E1&&(_=1));var S=c?c(_):_;t(S,m,g)!==!1&&1!==_||!g?g&&(d=m,se.effect.Animate.requestAnimationFrame(v,u)):(r[p]=null,a&&a(n-f/((m-h)/i),p,1===_||null==l))};return r[p]=!0,se.effect.Animate.requestAnimationFrame(v,u),p}}}(this);!function(t){var e=function(){},n=function(t){return Math.pow(t-1,3)+1},i=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)};t.views.Scroll=t.views.View.inherit({initialize:function(n){var i=this;this.__container=n.el,this.__content=n.el.firstElementChild,setTimeout(function(){i.__container&&i.__content&&(i.__container.scrollTop=0,i.__content.scrollTop=0)}),this.options={scrollingX:!1,scrollbarX:!0,scrollingY:!0,scrollbarY:!0,startX:0,startY:0,wheelDampen:6,minScrollbarSizeX:5,minScrollbarSizeY:5,scrollbarsFade:!0,scrollbarFadeDelay:300,scrollbarResizeFadeDelay:1e3,animating:!0,animationDuration:250,bouncing:!0,locking:!0,paging:!1,snapping:!1,zooming:!1,minZoom:.5,maxZoom:3,speedMultiplier:1,deceleration:.97,scrollingComplete:e,penetrationDeceleration:.03,penetrationAcceleration:.08,scrollEventInterval:10,getContentWidth:function(){return Math.max(i.__content.scrollWidth,i.__content.offsetWidth)},getContentHeight:function(){return Math.max(i.__content.scrollHeight,i.__content.offsetHeight+i.__content.offsetTop)}};for(var r in n)this.options[r]=n[r];this.hintResize=t.debounce(function(){i.resize()},1e3,!0),this.onScroll=function(){t.scroll.isScrolling?(clearTimeout(i.scrollTimer),i.scrollTimer=setTimeout(i.setScrollStop,80)):setTimeout(i.setScrollStart,50)},this.setScrollStart=function(){t.scroll.isScrolling=Math.abs(t.scroll.lastTop-i.__scrollTop)>1,clearTimeout(i.scrollTimer),i.scrollTimer=setTimeout(i.setScrollStop,80)},this.setScrollStop=function(){t.scroll.isScrolling=!1,t.scroll.lastTop=i.__scrollTop},this.triggerScrollEvent=t.throttle(function(){i.onScroll(),t.trigger("scroll",{scrollTop:i.__scrollTop,scrollLeft:i.__scrollLeft,target:i.__container})},this.options.scrollEventInterval),this.triggerScrollEndEvent=function(){t.trigger("scrollend",{scrollTop:i.__scrollTop,scrollLeft:i.__scrollLeft,target:i.__container})},this.__scrollLeft=this.options.startX,this.__scrollTop=this.options.startY,this.__callback=this.getRenderFn(),this.__initEventHandlers(),this.__createScrollbars()},run:function(){this.resize(),this.__fadeScrollbars("out",this.options.scrollbarResizeFadeDelay)},__isSingleTouch:!1,__isTracking:!1,__didDecelerationComplete:!1,__isGesturing:!1,__isDragging:!1,__isDecelerating:!1,__isAnimating:!1,__clientLeft:0,__clientTop:0,__clientWidth:0,__clientHeight:0,__contentWidth:0,__contentHeight:0,__snapWidth:100,__snapHeight:100,__refreshHeight:null,__refreshActive:!1,__refreshActivate:null,__refreshDeactivate:null,__refreshStart:null,__zoomLevel:1,__scrollLeft:0,__scrollTop:0,__maxScrollLeft:0,__maxScrollTop:0,__scheduledLeft:0,__scheduledTop:0,__scheduledZoom:0,__lastTouchLeft:null,__lastTouchTop:null,__lastTouchMove:null,__positions:null,__minDecelerationScrollLeft:null,__minDecelerationScrollTop:null,__maxDecelerationScrollLeft:null,__maxDecelerationScrollTop:null,__decelerationVelocityX:null,__decelerationVelocityY:null,__transformProperty:null,__perspectiveProperty:null,__indicatorX:null,__indicatorY:null,__scrollbarFadeTimeout:null,__didWaitForSize:null,__sizerTimeout:null,__initEventHandlers:function(){function e(t){return t.touches&&t.touches.length?t.touches:[{pageX:t.pageX,pageY:t.pageY}]}var n=this,i=this.__container;if(i.addEventListener("scrollChildIntoView",function(e){var r;if(!n.isScrolledIntoView){if(t.Platform.isIOS()||t.Platform.isFullScreen){r=i.getBoundingClientRect().bottom;var o=e.detail.viewportHeight-r,s=Math.max(0,e.detail.keyboardHeight-o);i.style.height=i.clientHeight-s+"px",i.style.overflow="visible",n.resize()}n.isScrolledIntoView=!0}if(e.detail.isElementUnderKeyboard){var a;a=t.Platform.isAndroid()&&!t.Platform.isFullScreen?t.Platform.version()<4.4?500:350:80,t.scroll.isScrolling=!0,setTimeout(function(){var o=.5*i.clientHeight;r=i.getBoundingClientRect().bottom;var s=e.detail.elementTop-r,a=s+o;a>0&&(t.tap.cloneFocusedInput(i,n),n.scrollBy(0,a,!0),n.onScroll())},a)}e.stopPropagation()}),i.addEventListener("resetScrollView",function(){n.isScrolledIntoView=!1,i.style.height="",i.style.overflow="",n.resize(),t.scroll.isScrolling=!1}),n.touchStart=function(i){if(n.startCoordinates=T(i),!t.tap.ignoreScrollStart(i)){if(n.__isDown=!0,t.tap.containsOrIsTextInput(i.target)||"SELECT"===i.target.tagName)return void(n.__hasStarted=!1);n.__isSelectable=!0,n.__enableScrollY=!0,n.__hasStarted=!0,n.doTouchStart(e(i),i.timeStamp),i.preventDefault()}},n.touchMove=function(r){if(!(!n.__isDown||r.defaultPrevented||"TEXTAREA"===r.target.tagName&&r.target.parentElement.querySelector(":focus"))){if(!n.__hasStarted&&(t.tap.containsOrIsTextInput(r.target)||"SELECT"===r.target.tagName))return n.__hasStarted=!0,n.doTouchStart(e(r),r.timeStamp),void r.preventDefault();if(n.startCoordinates){var o=T(r);n.__isSelectable&&t.tap.isTextInput(r.target)&&Math.abs(n.startCoordinates.x-o.x)>20&&(n.__enableScrollY=!1,n.__isSelectable=!0),n.__enableScrollY&&Math.abs(n.startCoordinates.y-o.y)>10&&(n.__isSelectable=!1,t.tap.cloneFocusedInput(i,n))}n.doTouchMove(e(r),r.timeStamp,r.scale),n.__isDown=!0}},n.touchEnd=function(e){n.__isDown&&(n.doTouchEnd(e.timeStamp),n.__isDown=!1,n.__hasStarted=!1,n.__isSelectable=!0,n.__enableScrollY=!0,n.__isDragging||n.__isDecelerating||n.__isAnimating||t.tap.removeClonedInputs(i,n))},n.options.orgScrollingComplete=n.options.scrollingComplete,n.options.scrollingComplete=function(){t.tap.removeClonedInputs(i,n),n.options.orgScrollingComplete()},"ontouchstart"in window)i.addEventListener("touchstart",n.touchStart,!1),document.addEventListener("touchmove",n.touchMove,!1),document.addEventListener("touchend",n.touchEnd,!1),document.addEventListener("touchcancel",n.touchEnd,!1);else if(window.navigator.pointerEnabled)i.addEventListener("pointerdown",n.touchStart,!1),document.addEventListener("pointermove",n.touchMove,!1),document.addEventListener("pointerup",n.touchEnd,!1),document.addEventListener("pointercancel",n.touchEnd,!1);else if(window.navigator.msPointerEnabled)i.addEventListener("MSPointerDown",n.touchStart,!1),document.addEventListener("MSPointerMove",n.touchMove,!1),document.addEventListener("MSPointerUp",n.touchEnd,!1),document.addEventListener("MSPointerCancel",n.touchEnd,!1);else{var r=!1;n.mouseDown=function(i){t.tap.ignoreScrollStart(i)||"SELECT"===i.target.tagName||(n.doTouchStart(e(i),i.timeStamp),t.tap.isTextInput(i.target)||i.preventDefault(),r=!0)},n.mouseMove=function(t){r&&!t.defaultPrevented&&(n.doTouchMove(e(t),t.timeStamp),r=!0)},n.mouseUp=function(t){r&&(n.doTouchEnd(t.timeStamp),r=!1)},n.mouseWheel=t.animationFrameThrottle(function(e){var i=t.DomUtil.getParentOrSelfWithClass(e.target,"ionic-scroll");i===n.__container&&(n.hintResize(),n.scrollBy(e.wheelDeltaX/n.options.wheelDampen,-e.wheelDeltaY/n.options.wheelDampen),n.__fadeScrollbars("in"),clearTimeout(n.__wheelHideBarTimeout),n.__wheelHideBarTimeout=setTimeout(function(){n.__fadeScrollbars("out")},100))}),i.addEventListener("mousedown",n.mouseDown,!1),document.addEventListener("mousemove",n.mouseMove,!1),document.addEventListener("mouseup",n.mouseUp,!1),document.addEventListener("mousewheel",n.mouseWheel,!1)}},__removeEventHandlers:function(){var t=this.__container;t.removeEventListener("touchstart",self.touchStart),document.removeEventListener("touchmove",self.touchMove),document.removeEventListener("touchend",self.touchEnd),document.removeEventListener("touchcancel",self.touchCancel),t.removeEventListener("pointerdown",self.touchStart),document.removeEventListener("pointermove",self.touchMove),document.removeEventListener("pointerup",self.touchEnd),document.removeEventListener("pointercancel",self.touchEnd),t.removeEventListener("MSPointerDown",self.touchStart),document.removeEventListener("MSPointerMove",self.touchMove),document.removeEventListener("MSPointerUp",self.touchEnd),document.removeEventListener("MSPointerCancel",self.touchEnd),t.removeEventListener("mousedown",self.mouseDown),document.removeEventListener("mousemove",self.mouseMove),document.removeEventListener("mouseup",self.mouseUp),document.removeEventListener("mousewheel",self.mouseWheel)},__createScrollbar:function(t){var e=document.createElement("div"),n=document.createElement("div");return n.className="scroll-bar-indicator",e.className="h"==t?"scroll-bar scroll-bar-h":"scroll-bar scroll-bar-v",e.appendChild(n),e},__createScrollbars:function(){var t,e;this.options.scrollingX&&(t={el:this.__createScrollbar("h"),sizeRatio:1},t.indicator=t.el.children[0],this.options.scrollbarX&&this.__container.appendChild(t.el),this.__indicatorX=t),this.options.scrollingY&&(e={el:this.__createScrollbar("v"),sizeRatio:1},e.indicator=e.el.children[0],this.options.scrollbarY&&this.__container.appendChild(e.el),this.__indicatorY=e)},__resizeScrollbars:function(){var t=this;if(t.__indicatorX){var e=Math.max(Math.round(t.__clientWidth*t.__clientWidth/t.__contentWidth),20);e>t.__contentWidth&&(e=0),t.__indicatorX.size=e,t.__indicatorX.minScale=this.options.minScrollbarSizeX/e,t.__indicatorX.indicator.style.width=e+"px",t.__indicatorX.maxPos=t.__clientWidth-e,t.__indicatorX.sizeRatio=t.__maxScrollLeft?t.__indicatorX.maxPos/t.__maxScrollLeft:1}if(t.__indicatorY){var n=Math.max(Math.round(t.__clientHeight*t.__clientHeight/t.__contentHeight),20);n>t.__contentHeight&&(n=0),t.__indicatorY.size=n,t.__indicatorY.minScale=this.options.minScrollbarSizeY/n,t.__indicatorY.maxPos=t.__clientHeight-n,t.__indicatorY.indicator.style.height=n+"px",t.__indicatorY.sizeRatio=t.__maxScrollTop?t.__indicatorY.maxPos/t.__maxScrollTop:1}},__repositionScrollbars:function(){var t,e,n,i,r,o=this,s=0,a=0;o.__indicatorX&&(o.__indicatorY&&(s=10),i=Math.round(o.__indicatorX.sizeRatio*o.__scrollLeft)||0,e=o.__scrollLeft-(o.__maxScrollLeft-s),o.__scrollLeft<0?(widthScale=Math.max(o.__indicatorX.minScale,(o.__indicatorX.size-Math.abs(o.__scrollLeft))/o.__indicatorX.size),i=0,o.__indicatorX.indicator.style[o.__transformOriginProperty]="left center"):e>0?(widthScale=Math.max(o.__indicatorX.minScale,(o.__indicatorX.size-e)/o.__indicatorX.size),i=o.__indicatorX.maxPos-s,o.__indicatorX.indicator.style[o.__transformOriginProperty]="right center"):(i=Math.min(o.__maxScrollLeft,Math.max(0,i)),widthScale=1),o.__indicatorX.indicator.style[o.__transformProperty]="translate3d("+i+"px, 0, 0) scaleX("+widthScale+")"),o.__indicatorY&&(r=Math.round(o.__indicatorY.sizeRatio*o.__scrollTop)||0,o.__indicatorX&&(a=10),n=o.__scrollTop-(o.__maxScrollTop-a),o.__scrollTop<0?(t=Math.max(o.__indicatorY.minScale,(o.__indicatorY.size-Math.abs(o.__scrollTop))/o.__indicatorY.size),r=0,o.__indicatorY.indicator.style[o.__transformOriginProperty]="center top"):n>0?(t=Math.max(o.__indicatorY.minScale,(o.__indicatorY.size-n)/o.__indicatorY.size),r=o.__indicatorY.maxPos-a,o.__indicatorY.indicator.style[o.__transformOriginProperty]="center bottom"):(r=Math.min(o.__maxScrollTop,Math.max(0,r)),t=1),o.__indicatorY.indicator.style[o.__transformProperty]="translate3d(0,"+r+"px, 0) scaleY("+t+")")},__fadeScrollbars:function(t,e){var n=this;if(this.options.scrollbarsFade){var i="scroll-bar-fade-out";n.options.scrollbarsFade===!0&&(clearTimeout(n.__scrollbarFadeTimeout),"in"==t?(n.__indicatorX&&n.__indicatorX.indicator.classList.remove(i),n.__indicatorY&&n.__indicatorY.indicator.classList.remove(i)):n.__scrollbarFadeTimeout=setTimeout(function(){n.__indicatorX&&n.__indicatorX.indicator.classList.add(i),n.__indicatorY&&n.__indicatorY.indicator.classList.add(i)},e||n.options.scrollbarFadeDelay))}},__scrollingComplete:function(){var t=this;t.options.scrollingComplete(),t.__fadeScrollbars("out")},resize:function(){this.setDimensions(this.__container.clientWidth,this.__container.clientHeight,this.options.getContentWidth(),this.options.getContentHeight())},getRenderFn:function(){var t,e=this,n=this.__content,i=document.documentElement.style;"MozAppearance"in i?t="gecko":"WebkitAppearance"in i?t="webkit":"string"==typeof navigator.cpuClass&&(t="trident");var r,o={trident:"ms",gecko:"Moz",webkit:"Webkit",presto:"O"}[t],s=document.createElement("div"),a=o+"Perspective",l=o+"Transform",c=o+"TransformOrigin";return e.__perspectiveProperty=l,e.__transformProperty=l,e.__transformOriginProperty=c,s.style[a]!==r?function(t,i,r,o){n.style[l]="translate3d("+-t+"px,"+-i+"px,0) scale("+r+")",e.__repositionScrollbars(),o||e.triggerScrollEvent()}:s.style[l]!==r?function(t,i,r,o){n.style[l]="translate("+-t+"px,"+-i+"px) scale("+r+")",e.__repositionScrollbars(),o||e.triggerScrollEvent()}:function(t,i,r,o){n.style.marginLeft=t?-t/r+"px":"",n.style.marginTop=i?-i/r+"px":"",n.style.zoom=r||"",e.__repositionScrollbars(),o||e.triggerScrollEvent()}},setDimensions:function(t,e,n,i){var r=this;t===+t&&(r.__clientWidth=t),e===+e&&(r.__clientHeight=e),n===+n&&(r.__contentWidth=n),i===+i&&(r.__contentHeight=i),r.__computeScrollMax(),r.__resizeScrollbars(),r.scrollTo(r.__scrollLeft,r.__scrollTop,!0,null,!0)},setPosition:function(t,e){var n=this;n.__clientLeft=t||0,n.__clientTop=e||0},setSnapSize:function(t,e){var n=this;n.__snapWidth=t,n.__snapHeight=e},activatePullToRefresh:function(t,e,n,i){var r=this;r.__refreshHeight=t,r.__refreshActivate=e,r.__refreshDeactivate=n,r.__refreshStart=i},triggerPullToRefresh:function(){this.__publish(this.__scrollLeft,-this.__refreshHeight,this.__zoomLevel,!0),this.__refreshStart&&this.__refreshStart()},finishPullToRefresh:function(){var t=this;t.__refreshActive=!1,t.__refreshDeactivate&&t.__refreshDeactivate(),t.scrollTo(t.__scrollLeft,t.__scrollTop,!0)},getValues:function(){var t=this;return{left:t.__scrollLeft,top:t.__scrollTop,zoom:t.__zoomLevel}},getScrollMax:function(){var t=this;return{left:t.__maxScrollLeft,top:t.__maxScrollTop}},zoomTo:function(t,e,n,i){var r=this;if(!r.options.zooming)throw new Error("Zooming is not enabled!");r.__isDecelerating&&(se.effect.Animate.stop(r.__isDecelerating),r.__isDecelerating=!1);var o=r.__zoomLevel;null==n&&(n=r.__clientWidth/2),null==i&&(i=r.__clientHeight/2),t=Math.max(Math.min(t,r.options.maxZoom),r.options.minZoom),r.__computeScrollMax(t);var s=(n+r.__scrollLeft)*t/o-n,a=(i+r.__scrollTop)*t/o-i;s>r.__maxScrollLeft?s=r.__maxScrollLeft:0>s&&(s=0),a>r.__maxScrollTop?a=r.__maxScrollTop:0>a&&(a=0),r.__publish(s,a,t,e)},zoomBy:function(t,e,n,i){var r=this;r.zoomTo(r.__zoomLevel*t,e,n,i)},scrollTo:function(t,e,n,i,r){var o=this;if(o.__isDecelerating&&(se.effect.Animate.stop(o.__isDecelerating),o.__isDecelerating=!1),null!=i&&i!==o.__zoomLevel){if(!o.options.zooming)throw new Error("Zooming is not enabled!");t*=i,e*=i,o.__computeScrollMax(i)}else i=o.__zoomLevel;o.options.scrollingX?o.options.paging?t=Math.round(t/o.__clientWidth)*o.__clientWidth:o.options.snapping&&(t=Math.round(t/o.__snapWidth)*o.__snapWidth):t=o.__scrollLeft,o.options.scrollingY?o.options.paging?e=Math.round(e/o.__clientHeight)*o.__clientHeight:o.options.snapping&&(e=Math.round(e/o.__snapHeight)*o.__snapHeight):e=o.__scrollTop,t=Math.max(Math.min(o.__maxScrollLeft,t),0),e=Math.max(Math.min(o.__maxScrollTop,e),0),t===o.__scrollLeft&&e===o.__scrollTop&&(n=!1),o.__publish(t,e,i,n,r)},scrollBy:function(t,e,n){var i=this,r=i.__isAnimating?i.__scheduledLeft:i.__scrollLeft,o=i.__isAnimating?i.__scheduledTop:i.__scrollTop;i.scrollTo(r+(t||0),o+(e||0),n)},doMouseZoom:function(t,e,n,i){var r=this,o=t>0?.97:1.03;return r.zoomTo(r.__zoomLevel*o,!1,n-r.__clientLeft,i-r.__clientTop)},doTouchStart:function(t,e){this.hintResize(),e instanceof Date&&(e=e.valueOf()),"number"!=typeof e&&(e=Date.now());var n=this;n.__interruptedAnimation=!0,n.__isDecelerating&&(se.effect.Animate.stop(n.__isDecelerating),n.__isDecelerating=!1,n.__interruptedAnimation=!0),n.__isAnimating&&(se.effect.Animate.stop(n.__isAnimating),n.__isAnimating=!1,n.__interruptedAnimation=!0);var i,r,o=1===t.length;o?(i=t[0].pageX,r=t[0].pageY):(i=Math.abs(t[0].pageX+t[1].pageX)/2,r=Math.abs(t[0].pageY+t[1].pageY)/2),n.__initialTouchLeft=i,n.__initialTouchTop=r,n.__initialTouches=t,n.__zoomLevelStart=n.__zoomLevel,n.__lastTouchLeft=i,n.__lastTouchTop=r,n.__lastTouchMove=e,n.__lastScale=1,n.__enableScrollX=!o&&n.options.scrollingX,n.__enableScrollY=!o&&n.options.scrollingY,n.__isTracking=!0,n.__didDecelerationComplete=!1,n.__isDragging=!o,n.__isSingleTouch=o,n.__positions=[]},doTouchMove:function(t,e,n){e instanceof Date&&(e=e.valueOf()),"number"!=typeof e&&(e=Date.now());var i=this;if(i.__isTracking){var r,o;2===t.length?(r=Math.abs(t[0].pageX+t[1].pageX)/2,o=Math.abs(t[0].pageY+t[1].pageY)/2,!n&&i.options.zooming&&(n=i.__getScale(i.__initialTouches,t))):(r=t[0].pageX,o=t[0].pageY);var s=i.__positions;if(i.__isDragging){var a=r-i.__lastTouchLeft,l=o-i.__lastTouchTop,c=i.__scrollLeft,u=i.__scrollTop,h=i.__zoomLevel;if(null!=n&&i.options.zooming){var d=h;if(h=h/i.__lastScale*n,h=Math.max(Math.min(h,i.options.maxZoom),i.options.minZoom),d!==h){var _=r-i.__clientLeft,f=o-i.__clientTop;c=(_+c)*h/d-_,u=(f+u)*h/d-f,i.__computeScrollMax(h)}}if(i.__enableScrollX){c-=a*this.options.speedMultiplier;var p=i.__maxScrollLeft;(c>p||0>c)&&(i.options.bouncing?c+=a/2*this.options.speedMultiplier:c=c>p?p:0)}if(i.__enableScrollY){u-=l*this.options.speedMultiplier;var g=i.__maxScrollTop;(u>g||0>u)&&(i.options.bouncing||i.__refreshHeight&&0>u?(u+=l/2*this.options.speedMultiplier,i.__enableScrollX||null==i.__refreshHeight||(!i.__refreshActive&&u<=-i.__refreshHeight?(i.__refreshActive=!0,i.__refreshActivate&&i.__refreshActivate()):i.__refreshActive&&u>-i.__refreshHeight&&(i.__refreshActive=!1,i.__refreshDeactivate&&i.__refreshDeactivate()))):u=u>g?g:0)}s.length>60&&s.splice(0,30),s.push(c,u,e),i.__publish(c,u,h)}else{var m=i.options.locking?3:0,v=5,T=Math.abs(r-i.__initialTouchLeft),E=Math.abs(o-i.__initialTouchTop);i.__enableScrollX=i.options.scrollingX&&T>=m,i.__enableScrollY=i.options.scrollingY&&E>=m,s.push(i.__scrollLeft,i.__scrollTop,e),i.__isDragging=(i.__enableScrollX||i.__enableScrollY)&&(T>=v||E>=v),i.__isDragging&&(i.__interruptedAnimation=!1,i.__fadeScrollbars("in"))}i.__lastTouchLeft=r,i.__lastTouchTop=o,i.__lastTouchMove=e,i.__lastScale=n}},doTouchEnd:function(t){t instanceof Date&&(t=t.valueOf()),"number"!=typeof t&&(t=Date.now());var e=this;if(e.__isTracking){if(e.__isTracking=!1,e.__isDragging)if(e.__isDragging=!1,e.__isSingleTouch&&e.options.animating&&t-e.__lastTouchMove<=100){for(var n=e.__positions,i=n.length-1,r=i,o=i;o>0&&n[o]>e.__lastTouchMove-100;o-=3)r=o;if(r!==i){var s=n[i]-n[r],a=e.__scrollLeft-n[r-2],l=e.__scrollTop-n[r-1];e.__decelerationVelocityX=a/s*(1e3/60),e.__decelerationVelocityY=l/s*(1e3/60);var c=e.options.paging||e.options.snapping?4:1;(Math.abs(e.__decelerationVelocityX)>c||Math.abs(e.__decelerationVelocityY)>c)&&(e.__refreshActive||e.__startDeceleration(t))}else e.__scrollingComplete()}else t-e.__lastTouchMove>100&&e.__scrollingComplete();e.__isDecelerating||(e.__refreshActive&&e.__refreshStart?(e.__publish(e.__scrollLeft,-e.__refreshHeight,e.__zoomLevel,!0),e.__refreshStart&&e.__refreshStart()):((e.__interruptedAnimation||e.__isDragging)&&e.__scrollingComplete(),e.scrollTo(e.__scrollLeft,e.__scrollTop,!0,e.__zoomLevel),e.__refreshActive&&(e.__refreshActive=!1,e.__refreshDeactivate&&e.__refreshDeactivate()))),e.__positions.length=0}},__publish:function(t,e,r,o,s){var a=this,l=a.__isAnimating;if(l&&(se.effect.Animate.stop(l),a.__isAnimating=!1),o&&a.options.animating){a.__scheduledLeft=t,a.__scheduledTop=e,a.__scheduledZoom=r;var c=a.__scrollLeft,u=a.__scrollTop,h=a.__zoomLevel,d=t-c,_=e-u,f=r-h,p=function(t,e,n){n&&(a.__scrollLeft=c+d*t,a.__scrollTop=u+_*t,a.__zoomLevel=h+f*t,a.__callback&&a.__callback(a.__scrollLeft,a.__scrollTop,a.__zoomLevel,s))},g=function(t){return a.__isAnimating===t},m=function(t,e,n){e===a.__isAnimating&&(a.__isAnimating=!1),(a.__didDecelerationComplete||n)&&a.__scrollingComplete(),a.options.zooming&&a.__computeScrollMax()};a.__isAnimating=se.effect.Animate.start(p,g,m,a.options.animationDuration,l?n:i)}else a.__scheduledLeft=a.__scrollLeft=t,a.__scheduledTop=a.__scrollTop=e,a.__scheduledZoom=a.__zoomLevel=r,a.__callback&&a.__callback(t,e,r,s),a.options.zooming&&a.__computeScrollMax()},__computeScrollMax:function(t){var e=this;null==t&&(t=e.__zoomLevel),e.__maxScrollLeft=Math.max(e.__contentWidth*t-e.__clientWidth,0),e.__maxScrollTop=Math.max(e.__contentHeight*t-e.__clientHeight,0),e.__didWaitForSize||e.__maxScrollLeft||e.__maxScrollTop||(e.__didWaitForSize=!0,e.__waitForSize())},__waitForSize:function(){var t=this;clearTimeout(t.__sizerTimeout);var e=function(){t.resize(),t.options.scrollingX&&!t.__maxScrollLeft||t.options.scrollingY&&!t.__maxScrollTop};e(),t.__sizerTimeout=setTimeout(e,1e3)},__startDeceleration:function(){var t=this;if(t.options.paging){var e=Math.max(Math.min(t.__scrollLeft,t.__maxScrollLeft),0),n=Math.max(Math.min(t.__scrollTop,t.__maxScrollTop),0),i=t.__clientWidth,r=t.__clientHeight;t.__minDecelerationScrollLeft=Math.floor(e/i)*i,t.__minDecelerationScrollTop=Math.floor(n/r)*r,t.__maxDecelerationScrollLeft=Math.ceil(e/i)*i,t.__maxDecelerationScrollTop=Math.ceil(n/r)*r}else t.__minDecelerationScrollLeft=0,t.__minDecelerationScrollTop=0,t.__maxDecelerationScrollLeft=t.__maxScrollLeft,t.__maxDecelerationScrollTop=t.__maxScrollTop;var o=function(e,n,i){t.__stepThroughDeceleration(i)};t.__minVelocityToKeepDecelerating=t.options.snapping?4:.1;var s=function(){var e=Math.abs(t.__decelerationVelocityX)>=t.__minVelocityToKeepDecelerating||Math.abs(t.__decelerationVelocityY)>=t.__minVelocityToKeepDecelerating;return e||(t.__didDecelerationComplete=!0,t.options.bouncing&&t.scrollTo(Math.min(Math.max(t.__scrollLeft,0),t.__maxScrollLeft),Math.min(Math.max(t.__scrollTop,0),t.__maxScrollTop),!1)),e},a=function(){t.__isDecelerating=!1,t.__didDecelerationComplete&&t.__scrollingComplete(),t.options.paging&&t.scrollTo(t.__scrollLeft,t.__scrollTop,t.options.snapping)};t.__isDecelerating=se.effect.Animate.start(o,s,a)},__stepThroughDeceleration:function(t){var e=this,n=e.__scrollLeft+e.__decelerationVelocityX,i=e.__scrollTop+e.__decelerationVelocityY;if(!e.options.bouncing){var r=Math.max(Math.min(e.__maxDecelerationScrollLeft,n),e.__minDecelerationScrollLeft);r!==n&&(n=r,e.__decelerationVelocityX=0);var o=Math.max(Math.min(e.__maxDecelerationScrollTop,i),e.__minDecelerationScrollTop);o!==i&&(i=o,e.__decelerationVelocityY=0)}if(t?e.__publish(n,i,e.__zoomLevel):(e.__scrollLeft=n,e.__scrollTop=i),!e.options.paging){var s=e.options.deceleration;e.__decelerationVelocityX*=s,e.__decelerationVelocityY*=s}if(e.options.bouncing){var a=0,l=0,c=e.options.penetrationDeceleration,u=e.options.penetrationAcceleration;if(ne.__maxDecelerationScrollLeft&&(a=e.__maxDecelerationScrollLeft-n),ie.__maxDecelerationScrollTop&&(l=e.__maxDecelerationScrollTop-i),0!==a){var h=a*e.__decelerationVelocityX<=e.__minDecelerationScrollLeft;h&&(e.__decelerationVelocityX+=a*c);var d=Math.abs(e.__decelerationVelocityX)<=e.__minVelocityToKeepDecelerating;(!h||d)&&(e.__decelerationVelocityX=a*u)}if(0!==l){var _=l*e.__decelerationVelocityY<=e.__minDecelerationScrollTop;_&&(e.__decelerationVelocityY+=l*c);var f=Math.abs(e.__decelerationVelocityY)<=e.__minVelocityToKeepDecelerating;(!_||f)&&(e.__decelerationVelocityY=l*u)}}},__getDistance:function(t,e){var n=e.pageX-t.pageX,i=e.pageY-t.pageY;return Math.sqrt(n*n+i*i)},__getScale:function(t,e){var n=this;return t.length>=2&&e.length>=2?n.__getDistance(e[0],e[1])/n.__getDistance(t[0],t[1]):1}}),t.scroll={isScrolling:!1,lastTop:0}}(ionic),function(t){"use strict";t.views.HeaderBar=t.views.View.inherit({initialize:function(e){this.el=e.el,t.extend(this,{alignTitle:"center"},e),this.align()},align:function(e){e||(e=this.alignTitle);var n=this.el.querySelector(".title");if(n){var i=this;t.requestAnimationFrame(function(){var r,o,s,a=i.el.childNodes,l=0,c=0,u=!1;for(r=0;r10&&(n.style.left=d+"px",n.style.right=d+"px"),n.offsetWidth0&&(n.style.right=c+5+"px")):"left"==e?(n.classList.add("title-left"),l>0&&(n.style.left=l+15+"px")):"right"==e&&(n.classList.add("title-right"),c>0&&(n.style.right=c+15+"px"))})}}})}(ionic),function(t){"use strict";var e="item",n="item-content",i="item-sliding",r="item-options",o="item-placeholder",s="item-reordering",a="item-reorder",l=function(){};l.prototype={start:function(){},drag:function(){},end:function(){},isSameItem:function(){return!1}};var c=function(t){this.dragThresholdX=t.dragThresholdX||10,this.el=t.el,this.canSwipe=t.canSwipe};c.prototype=new l,c.prototype.start=function(o){var s,a,l,c;this.canSwipe()&&(s=o.target.classList.contains(n)?o.target:o.target.classList.contains(e)?o.target.querySelector("."+n):t.DomUtil.getParentWithClass(o.target,n),s&&(s.classList.remove(i),l=parseFloat(s.style[t.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])||0,a=s.parentNode.querySelector("."+r),a&&(a.classList.remove("invisible"),c=a.offsetWidth,this._currentDrag={buttons:a,buttonsWidth:c,content:s,startOffsetX:l})))},c.prototype.isSameItem=function(t){return t._lastDrag&&this._currentDrag?this._currentDrag.content==t._lastDrag.content:!1},c.prototype.clean=function(){var e=this._lastDrag;e&&(e.content.style[t.CSS.TRANSITION]="",e.content.style[t.CSS.TRANSFORM]="",t.requestAnimationFrame(function(){setTimeout(function(){e.buttons&&e.buttons.classList.add("invisible")},250)}))},c.prototype.drag=t.animationFrameThrottle(function(e){var n;if(this._currentDrag&&(!this._isDragging&&(Math.abs(e.gesture.deltaX)>this.dragThresholdX||Math.abs(this._currentDrag.startOffsetX)>0)&&(this._isDragging=!0),this._isDragging)){n=this._currentDrag.buttonsWidth;var i=Math.min(0,this._currentDrag.startOffsetX+e.gesture.deltaX);-n>i&&(i=Math.min(-n,-n+.4*(e.gesture.deltaX+n))),this._currentDrag.content.style[t.CSS.TRANSFORM]="translate3d("+i+"px, 0, 0)",this._currentDrag.content.style[t.CSS.TRANSITION]="none"}}),c.prototype.end=function(e,n){var i=this;if(!this._currentDrag)return void(n&&n());var r=-this._currentDrag.buttonsWidth;e.gesture.deltaX>-(this._currentDrag.buttonsWidth/2)&&("left"==e.gesture.direction&&Math.abs(e.gesture.velocityX)<.3?r=0:"right"==e.gesture.direction&&(r=0)),t.requestAnimationFrame(function(){if(0===r){i._currentDrag.content.style[t.CSS.TRANSFORM]="";var e=i._currentDrag.buttons;setTimeout(function(){e&&e.classList.add("invisible")},250)}else i._currentDrag.content.style[t.CSS.TRANSFORM]="translate3d("+r+"px, 0, 0)";i._currentDrag.content.style[t.CSS.TRANSITION]="",i._lastDrag=i._currentDrag,i._currentDrag=null,n&&n()})};var u=function(t){if(this.dragThresholdY=t.dragThresholdY||0,this.onReorder=t.onReorder,this.listEl=t.listEl,this.el=t.el,this.scrollEl=t.scrollEl,this.scrollView=t.scrollView,this.listElTrueTop=0,this.listEl.offsetParent){var e=this.listEl;do this.listElTrueTop+=e.offsetTop,e=e.offsetParent;while(e)}};u.prototype=new l,u.prototype._moveElement=function(e){var n=e.gesture.center.pageY+this.scrollView.getValues().top-this._currentDrag.elementHeight/2-this.listElTrueTop;this.el.style[t.CSS.TRANSFORM]="translate3d(0, "+n+"px, 0)"},u.prototype.start=function(e){var n=t.DomUtil.getChildIndex(this.el,this.el.nodeName.toLowerCase()),i=this.el.scrollHeight,r=this.el.cloneNode(!0);r.classList.add(o),this.el.parentNode.insertBefore(r,this.el),this.el.classList.add(s),this._currentDrag={elementHeight:i,startIndex:n,placeholder:r,scrollHeight:scroll,list:r.parentNode},this._moveElement(e)},u.prototype.drag=t.animationFrameThrottle(function(e){var n=this;if(this._currentDrag){var i=0,r=e.gesture.center.pageY,o=this.listElTrueTop;if(this.scrollView){var s=this.scrollView.__container;i=this.scrollView.getValues().top;var a=s.offsetTop,l=a-r+this._currentDrag.elementHeight/2,c=r+this._currentDrag.elementHeight/2-a-s.offsetHeight;e.gesture.deltaY<0&&l>0&&i>0&&(this.scrollView.scrollBy(null,-l),t.requestAnimationFrame(function(){n.drag(e)})),e.gesture.deltaY>0&&c>0&&ithis.dragThresholdY&&(this._isDragging=!0),this._isDragging&&(this._moveElement(e),this._currentDrag.currentY=i+r-o)}}),u.prototype._getReorderIndex=function(){for(var t,e=this,n=(this._currentDrag.placeholder,Array.prototype.slice.call(this._currentDrag.placeholder.parentNode.children).filter(function(t){return t.nodeName===e.el.nodeName&&t!==e.el})),i=this._currentDrag.currentY,r=0,o=n.length;o>r;r++)if(t=n[r],r===o-1){if(i>t.offsetTop)return r}else if(0===r){if(it.offsetTop-t.offsetHeight/2&&i5&&(i=this._getItem(e.target),i&&i.querySelector(".item-options")&&(this._dragOp=new c({el:this.el,canSwipe:this.canSwipe}),this._dragOp.start(e),e.preventDefault())):(i=this._getItem(e.target),i&&(this._dragOp=new u({listEl:this.el,el:i,scrollEl:this.scrollEl,scrollView:this.scrollView,onReorder:function(t,e,i){n.onReorder&&n.onReorder(t,e,i)}}),this._dragOp.start(e),e.preventDefault())),r&&this._dragOp&&!this._dragOp.isSameItem(r)&&e.defaultPrevented&&r.clean&&r.clean()},_handleEndDrag:function(t){var e=this;this._didDragUpOrDown=!1,this._dragOp&&this._dragOp.end(t,function(){e._initDrag()})},_handleDrag:function(t){Math.abs(t.gesture.deltaY)>5&&(this._didDragUpOrDown=!0),this.isDragging||this._dragOp||this._startDrag(t),this._dragOp&&(t.gesture.srcEvent.preventDefault(),this._dragOp.drag(t))}})}(ionic),function(t){"use strict";t.views.Modal=t.views.View.inherit({initialize:function(e){e=t.extend({focusFirstInput:!1,unfocusOnHide:!0,focusFirstDelay:600,backdropClickToClose:!0,hardwareBackButtonClose:!0},e),t.extend(this,e),this.el=e.el},show:function(){var t=this;t.focusFirstInput&&window.setTimeout(function(){var e=t.el.querySelector("input, textarea");e&&e.focus&&e.focus()},t.focusFirstDelay)},hide:function(){if(this.unfocusOnHide){var t=this.el.querySelectorAll("input, textarea");window.setTimeout(function(){for(var e=0;ee?-v:e>S?v:0,0))}t.continuous&&f.transitions&&(s(r(S-1),-v,0),s(r(S+1),v,0)),f.transitions||(E.style.left=S*-v+"px"),p.style.visibility="visible",t.slidesChanged&&t.slidesChanged()}function n(){t.continuous?o(S-1):S&&o(S-1)}function i(){t.continuous?o(S+1):SS?e:S)-a-1),v*i,0);e=r(e),s(S,v*i,n||w),s(e,0,n||w),t.continuous&&s(r(e-i),-(v*i),0)}else e=r(e),l(S*-v,e*-v,n||w);S=e,_(t.callback&&t.callback(S,g[S]))}}function s(t,e,n){a(t,e,n),m[t]=e}function a(t,e,n){var i=g[t],r=i&&i.style;r&&(r.webkitTransitionDuration=r.MozTransitionDuration=r.msTransitionDuration=r.OTransitionDuration=r.transitionDuration=n+"ms",r.webkitTransform="translate("+e+"px,0)translateZ(0)",r.msTransform=r.MozTransform=r.OTransform="translateX("+e+"px)")}function l(e,n,i){if(!i)return void(E.style.left=n+"px");var r=+new Date,o=setInterval(function(){var s=+new Date-r;return s>i?(E.style.left=n+"px",D&&c(),t.transitionEnd&&t.transitionEnd.call(event,S,g[S]),void clearInterval(o)):void(E.style.left=(n-e)*(Math.floor(s/i*100)/100)+e+"px")},4)}function c(){b=setTimeout(i,D)}function u(){D=t.auto||0,clearTimeout(b)}var h=this,d=function(){},_=function(t){setTimeout(t||d,0)},f={addEventListener:!!window.addEventListener,touch:"ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch,transitions:function(t){var e=["transitionProperty","WebkitTransition","MozTransition","OTransition","msTransition"];for(var n in e)if(void 0!==t.style[e[n]])return!0;return!1}(document.createElement("swipe"))},p=t.el;if(p){var g,m,v,T,E=p.children[0];t=t||{};var S=parseInt(t.startSlide,10)||0,w=t.speed||300;t.continuous=void 0!==t.continuous?t.continuous:!0;var b,y,D=t.auto||0,L={},x={},M={handleEvent:function(n){switch(("mousedown"==n.type||"mouseup"==n.type||"mousemove"==n.type)&&(n.touches=[{pageX:n.pageX,pageY:n.pageY}]),n.type){case"mousedown":this.start(n);break;case"touchstart":this.start(n);break;case"touchmove":this.touchmove(n);break;case"mousemove":this.touchmove(n);break;case"touchend":_(this.end(n));break;case"mouseup":_(this.end(n));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":_(this.transitionEnd(n));break;case"resize":_(e)}t.stopPropagation&&n.stopPropagation()},start:function(t){var e=t.touches[0];L={x:e.pageX,y:e.pageY,time:+new Date},y=void 0,x={},f.touch?(E.addEventListener("touchmove",this,!1),E.addEventListener("touchend",this,!1)):(E.addEventListener("mousemove",this,!1),E.addEventListener("mouseup",this,!1),document.addEventListener("mouseup",this,!1))},touchmove:function(e){if(!(e.touches.length>1||e.scale&&1!==e.scale||h.slideIsDisabled)){t.disableScroll&&e.preventDefault();var n=e.touches[0];x={x:n.pageX-L.x,y:n.pageY-L.y},"undefined"==typeof y&&(y=!!(y||Math.abs(x.x)0||S==g.length-1&&x.x<0?Math.abs(x.x)/v+1:1),a(S-1,x.x+m[S-1],0),a(S,x.x+m[S],0),a(S+1,x.x+m[S+1],0)))}},end:function(){var e=+new Date-L.time,n=Number(e)<250&&Math.abs(x.x)>20||Math.abs(x.x)>v/2,i=!S&&x.x>0||S==g.length-1&&x.x<0;t.continuous&&(i=!1);var o=x.x<0;y||(n&&!i?(o?(t.continuous?(s(r(S-1),-v,0),s(r(S+2),v,0)):s(S-1,-v,0),s(S,m[S]-v,w),s(r(S+1),m[r(S+1)]-v,w),S=r(S+1)):(t.continuous?(s(r(S+1),v,0),s(r(S-2),-v,0)):s(S+1,v,0),s(S,m[S]+v,w),s(r(S-1),m[r(S-1)]+v,w),S=r(S-1)),t.callback&&t.callback(S,g[S])):t.continuous?(s(r(S-1),-v,w),s(S,0,w),s(r(S+1),v,w)):(s(S-1,-v,w),s(S,0,w),s(S+1,v,w))),f.touch?(E.removeEventListener("touchmove",M,!1),E.removeEventListener("touchend",M,!1)):(E.removeEventListener("mousemove",M,!1),E.removeEventListener("mouseup",M,!1),document.removeEventListener("mouseup",M,!1))},transitionEnd:function(e){parseInt(e.target.getAttribute("data-index"),10)==S&&(D&&c(),t.transitionEnd&&t.transitionEnd.call(e,S,g[S]))}};this.update=function(){setTimeout(e)},this.setup=function(){e()},this.enableSlide=function(t){return arguments.length&&(this.slideIsDisabled=!t),!this.slideIsDisabled},this.slide=function(t,e){u(),o(t,e)},this.prev=this.previous=function(){u(),n()},this.next=function(){u(),i()},this.stop=function(){u()},this.start=function(){c()},this.currentIndex=function(){return S},this.slidesCount=function(){return T},this.kill=function(){u(),E.style.width="",E.style.left="";for(var t=g.length;t--;){var e=g[t];e.style.width="",e.style.left="",f.transitions&&a(t,0,0)}f.addEventListener?(E.removeEventListener("touchstart",M,!1),E.removeEventListener("webkitTransitionEnd",M,!1),E.removeEventListener("msTransitionEnd",M,!1),E.removeEventListener("oTransitionEnd",M,!1),E.removeEventListener("otransitionend",M,!1),E.removeEventListener("transitionend",M,!1),window.removeEventListener("resize",M,!1)):window.onresize=null},this.load=function(){e(),D&&c(),f.addEventListener?(f.touch?E.addEventListener("touchstart",M,!1):E.addEventListener("mousedown",M,!1),f.transitions&&(E.addEventListener("webkitTransitionEnd",M,!1),E.addEventListener("msTransitionEnd",M,!1),E.addEventListener("oTransitionEnd",M,!1),E.addEventListener("otransitionend",M,!1),E.addEventListener("transitionend",M,!1)),window.addEventListener("resize",M,!1)):window.onresize=function(){e()}}}}})}(ionic),function(t){"use strict";t.views.Toggle=t.views.View.inherit({initialize:function(e){var n=this;this.el=e.el,this.checkbox=e.checkbox,this.track=e.track,this.handle=e.handle,this.openPercent=-1,this.onChange=e.onChange||function(){},this.triggerThreshold=e.triggerThreshold||20,this.dragStartHandler=function(t){n.dragStart(t)},this.dragHandler=function(t){n.drag(t)},this.holdHandler=function(t){n.hold(t)},this.releaseHandler=function(t){n.release(t)},this.dragStartGesture=t.onGesture("dragstart",this.dragStartHandler,this.el),this.dragGesture=t.onGesture("drag",this.dragHandler,this.el),this.dragHoldGesture=t.onGesture("hold",this.holdHandler,this.el),this.dragReleaseGesture=t.onGesture("release",this.releaseHandler,this.el)},destroy:function(){t.offGesture(this.dragStartGesture,"dragstart",this.dragStartGesture),t.offGesture(this.dragGesture,"drag",this.dragGesture),t.offGesture(this.dragHoldGesture,"hold",this.holdHandler),t.offGesture(this.dragReleaseGesture,"release",this.releaseHandler)},tap:function(){"disabled"!==this.el.getAttribute("disabled")&&this.val(!this.checkbox.checked)},dragStart:function(t){this.checkbox.disabled||(this._dragInfo={width:this.el.offsetWidth,left:this.el.offsetLeft,right:this.el.offsetLeft+this.el.offsetWidth,triggerX:this.el.offsetWidth/2,initialState:this.checkbox.checked},t.gesture.srcEvent.preventDefault(),this.hold(t))},drag:function(e){var n=this;this._dragInfo&&(e.gesture.srcEvent.preventDefault(),t.requestAnimationFrame(function(){if(n._dragInfo){var t=(n.track.offsetLeft+n.handle.offsetWidth/2,n.track.offsetLeft+n.track.offsetWidth-n.handle.offsetWidth/2,e.gesture.deltaX,e.gesture.touches[0].pageX-n._dragInfo.left),i=n._dragInfo.width-n.triggerThreshold;n._dragInfo.initialState?tn._dragInfo.triggerX&&n.setOpenPercent(100):ti&&n.setOpenPercent(100)}}))},endDrag:function(){this._dragInfo=null},hold:function(){this.el.classList.add("dragging")},release:function(t){this.el.classList.remove("dragging"),this.endDrag(t)},setOpenPercent:function(e){if(this.openPercent<0||ethis.openPercent+3)if(this.openPercent=e,0===e)this.val(!1);else if(100===e)this.val(!0);else{var n=Math.round(e/100*this.track.offsetWidth-this.handle.offsetWidth);n=1>n?0:n,this.handle.style[t.CSS.TRANSFORM]="translate3d("+n+"px,0,0)"}},val:function(e){return(e===!0||e===!1)&&(""!==this.handle.style[t.CSS.TRANSFORM]&&(this.handle.style[t.CSS.TRANSFORM]=""),this.checkbox.checked=e,this.openPercent=e?100:0,this.onChange&&this.onChange()),this.checkbox.checked}})}(ionic),function(t){"use strict";t.controllers.ViewController=function(){this.initialize.apply(this,arguments)},t.controllers.ViewController.inherit=t.inherit,t.extend(t.controllers.ViewController.prototype,{initialize:function(){},destroy:function(){}})}(window.ionic),function(t){"use strict";t.controllers.SideMenuController=t.controllers.ViewController.inherit({initialize:function(t){var e=this;this.left=t.left,this.right=t.right,this.content=t.content,this.dragThresholdX=t.dragThresholdX||10,this._rightShowing=!1,this._leftShowing=!1,this._isDragging=!1,this.content&&(this.content.onDrag=function(t){e._handleDrag(t)},this.content.onEndDrag=function(t){e._endDrag(t)})},setContent:function(t){var e=this;this.content=t,this.content.onDrag=function(t){e._handleDrag(t)},this.content.endDrag=function(t){e._endDrag(t)}},isOpenLeft:function(){return this.getOpenAmount()>0},isOpenRight:function(){return this.getOpenAmount()<0},toggleLeft:function(t){var e=this.getOpenAmount();0===arguments.length&&(t=0>=e),this.content.enableAnimation(),this.openPercentage(t?100:0)},toggleRight:function(t){var e=this.getOpenAmount();0===arguments.length&&(t=e>=0),this.content.enableAnimation(),this.openPercentage(t?-100:0)},close:function(){this.openPercentage(0)},getOpenAmount:function(){return this.content&&this.content.getTranslateX()||0},getOpenRatio:function(){var t=this.getOpenAmount();return t>=0?t/this.left.width:t/this.right.width},isOpen:function(){return 0!==this.getOpenAmount()},getOpenPercentage:function(){return 100*this.getOpenRatio()},openPercentage:function(t){var e=t/100;if(this.left&&t>=0)this.openAmount(this.left.width*e);else if(this.right&&0>t){{this.right.width}this.openAmount(this.right.width*e)}0!==t?document.body.classList.add("menu-open"):document.body.classList.remove("menu-open")},openAmount:function(t){var e=this.left&&this.left.width||0,n=this.right&&this.right.width||0;return(this.left&&this.left.isEnabled||!(t>0))&&(this.right&&this.right.isEnabled||!(0>t))?this._leftShowing&&t>e?void this.content.setTranslateX(e):this._rightShowing&&-n>t?void this.content.setTranslateX(-n):(this.content.setTranslateX(t),void(t>=0?(this._leftShowing=!0,this._rightShowing=!1,t>0&&(this.right&&this.right.pushDown&&this.right.pushDown(),this.left&&this.left.bringUp&&this.left.bringUp())):(this._rightShowing=!0,this._leftShowing=!1,this.right&&this.right.bringUp&&this.right.bringUp(),this.left&&this.left.pushDown&&this.left.pushDown()))):void this.content.setTranslateX(0)},snapToRest:function(t){this.content.enableAnimation(),this._isDragging=!1;var e=this.getOpenRatio();if(0===e)return void this.openPercentage(0);var n=.3,i=t.gesture.velocityX,r=t.gesture.direction;this.openPercentage(e>0&&.5>e&&"right"==r&&n>i?0:e>.5&&"left"==r&&n>i?100:0>e&&e>-.5&&"left"==r&&n>i?0:.5>e&&"right"==r&&n>i?-100:"right"==r&&e>=0&&(e>=.5||i>n)?100:"left"==r&&0>=e&&(-.5>=e||i>n)?-100:0)},_endDrag:function(t){this._isDragging&&this.snapToRest(t),this._startX=null,this._lastX=null,this._offsetX=null},_handleDrag:function(t){this._startX?this._lastX=t.gesture.touches[0].pageX:(this._startX=t.gesture.touches[0].pageX,this._lastX=this._startX),!this._isDragging&&Math.abs(this._lastX-this._startX)>this.dragThresholdX&&(this._startX=this._lastX,this._isDragging=!0,this.content.disableAnimation(),this._offsetX=this.getOpenAmount()),this._isDragging&&this.openAmount(this._offsetX+(this._lastX-this._startX))}})}(ionic)}();