forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathionic.min.js
18 lines (17 loc) · 108 KB
/
ionic.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*!
* Copyright 2014 Drifty Co.
* http://drifty.com/
*
* Ionic, v1.0.0-beta.4
* 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?z.addEventListener(t,B[t],n):z.removeEventListener(t,B[t])}function e(t){var e=E(t.target),i=w(e);if(ionic.tap.requiresNativeClick(i)||F)return!1;var r=T(t);n("click",i,r.x,r.y),f(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(Y)return e.stopPropagation(),ionic.tap.isTextInput(e.target)||e.preventDefault(),!1;F=!1,q=T(e),t("mousemove"),ionic.activator.start(e)}}function o(n){return Y?(n.stopPropagation(),n.preventDefault(),!1):d(n)||"SELECT"===n.target.tagName?!1:(v(n)||e(n),t("mousemove",!1),ionic.activator.end(),void(F=!1))}function a(e){return v(e)?(t("mousemove",!1),ionic.activator.end(),F=!0,!1):void 0}function s(e){if(!d(e)&&(F=!1,h(),q=T(e),t("touchmove"),ionic.activator.start(e),ionic.Platform.isIOS()&&ionic.tap.isLabelWithTextInput(e.target))){var n=w(E(e.target));n!==k&&e.preventDefault()}}function c(t){d(t)||(h(),v(t)||e(t),u())}function l(e){return v(e)?(F=!0,t("touchmove",!1),ionic.activator.end(),!1):void 0}function u(){t("touchmove",!1),ionic.activator.end(),F=!1}function h(){Y=!0,clearTimeout(H),H=setTimeout(function(){Y=!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 f(t){W=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,Y&&(W=t)):_(),e&&(m(t),ionic.trigger("ionic.focusin",{target:t},!0))}function _(){var t=m();t&&/input|textarea|select/i.test(t.tagName)&&t.blur(),m(null)}function p(t){Y&&ionic.tap.isTextInput(m())&&ionic.tap.isTextInput(W)&&W!==t.target&&(W.focus(),W=null),ionic.scroll.isScrolling=!1}function g(){m(null)}function m(t){return arguments.length&&(k=t),k||document.activeElement}function v(t){if(!t||!q||0===q.x&&0===q.y)return!1;var e=T(t);return Math.abs(q.x-e.x)>U||Math.abs(q.y-e.y)>U}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=t.parentElement}return e!==!1?t:void 0}function w(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 y(){C()?(window.addEventListener("native.showkeyboard",S),window.addEventListener("native.hidekeyboard",x)):document.body.addEventListener("focusout",x),document.body.addEventListener("ionic.focusin",b),document.body.addEventListener("focusin",b),document.body.addEventListener("orientationchange",G),document.removeEventListener("touchstart",y)}function S(t){clearTimeout(j),ionic.keyboard.height=t.keyboardHeight}function b(t){t.target&&ionic.tap.isTextInput(t.target)&&P(t.target)&&(document.addEventListener("keydown",O,!1),document.body.scrollTop=0,document.body.querySelector(".scroll-content").scrollTop=0,Z=t.target,M(t))}function M(t){clearTimeout(Q),clearTimeout(j),Q=setTimeout(function(){if(!(J+350>Date.now())){J=Date.now();var e,n=Z.getBoundingClientRect(),i=0,r=setInterval(function(){e=N(),i>10&&(clearInterval(r),e=275),e&&(D(t.target,n.top,n.bottom,K,e),clearInterval(r)),i++},100)}},32)}function D(t,e,n,i,r){var o={target:t,elementTop:Math.round(e),elementBottom:Math.round(n),keyboardHeight:r};return o.hasPlugin=C(),o.contentHeight=i-r,o.keyboardTopOffset=o.elementTop-o.contentHeight,o.isElementUnderKeyboard=o.elementBottom>o.contentHeight,ionic.keyboard.isOpen=!0,Z=t,ionic.trigger("scrollChildIntoView",o,!0),ionic.requestAnimationFrame(function(){document.body.classList.add($)}),document.addEventListener("touchmove",I,!1),o}function x(){clearTimeout(Q),clearTimeout(j),j=setTimeout(L,350)}function L(){ionic.keyboard.isOpen=!1,ionic.trigger("resetScrollView",{target:Z},!0),ionic.requestAnimationFrame(function(){document.body.classList.remove($)}),document.removeEventListener("touchmove",I),document.removeEventListener("keydown",O)}function A(){window.innerHeight>K&&(K=window.innerHeight)}function O(t){ionic.scroll.isScrolling&&I(t)}function I(t){t.preventDefault()}function G(){var t=window.innerHeight;if(t===K)var e=0,n=setInterval(function(){e>10&&clearInterval(n),t=window.innerHeight,t!==K&&(ionic.keyboard.landscape=K>t?!0:!1,K=t,clearInterval(n)),e++},50);else K=t}function N(){return ionic.keyboard.height?ionic.keyboard.height:ionic.Platform.isAndroid()?ionic.Platform.isFullScreen?275:window.innerHeight<K?K-window.innerHeight:0:ionic.Platform.isIOS()?ionic.keyboard.landscape?206:ionic.Platform.isWebView()?260:216:275}function P(t){for(;t;){if(t.classList.contains(te))return!0;t=t.parentElement}return!1}function C(){return!!(window.cordova&&cordova.plugins&&cordova.plugins.Keyboard)}function R(){var t;for(t=0;t<document.head.children.length;t++)if("viewport"==document.head.children[t].name){ee=document.head.children[t];break}if(ee){var e,n=ee.content.toLowerCase().replace(/\s+/g,"").split(",");for(t=0;t<n.length;t++)""!=n[t]&&(e=n[t].split("="),ne[e[0]]=e.length>1?e[1]:"_");V()}}function V(){var t=ne.width,e=ne.height,n=ionic.Platform,i=n.version(),r="device-width",o="device-height",a=ionic.viewport.orientation();delete ne.height,ne.width=r,n.isIPad()?i>7?delete ne.width:n.isWebView()?90==a?ne.height="0":7==i&&(ne.height=o):7>i&&(ne.height="0"):n.isIOS()&&(n.isWebView()&&i>7?delete ne.width:7>i&&e&&(ne.height="0")),(t!==ne.width||e!==ne.height)&&X()}function X(){var t,e=[];for(t in ne)ne[t]&&e.push(t+("_"==ne[t]?"":"="+ne[t]));ee.content=e.join(", ")}window.ionic={controllers:{},views:{},version:"1.0.0-beta.4"},function(t){function e(t){return t*t*t}function n(t){return 3*t*t*(1-t)}function i(t){return 3*t*(1-t)*(1-t)}function r(t){return(1-t)*(1-t)*(1-t)}var o=function(t,e){return t||(t=0),e||(e=0),{x:t,y:e}};t.Animator={getQuadraticBezier:function(t,a,s,c,l){var u=new o;return u.x=a.x*e(t)+s.x*n(t)+c.x*i(t)+l.x*r(t),u.y=a.y*e(t)+s.y*n(t)+c.y*i(t)+l.y*r(t),u},getCubicBezier:function(t,e,n,i,r){epsilon=1e3/60/r/4;var o=function(e){var i=1-e;return 3*i*i*e*t+3*i*e*e*n+e*e*e},a=function(t){var n=1-t;return 3*n*n*t*e+3*n*t*t*i+t*t*t},s=function(e){var i=1-e;return 3*(2*(e-1)*e+i*i)*t+3*(-e*e*e+2*i*e)*n};return function(t){var e,n,i,r,c,l,u=t;for(i=u,l=0;8>l;l++){if(r=o(i)-u,Math.abs(r)<epsilon)return a(i);if(c=s(i),Math.abs(c)<1e-6)break;i-=r/c}if(e=0,n=1,i=u,e>i)return a(e);if(i>n)return a(n);for(;n>e;){if(r=o(i),Math.abs(r-u)<epsilon)return a(i);u>r?e=i:n=i,i=.5*(n-e)+e}return a(i)}},animate:function(t){return{leave:function(){var e=function(){t.classList.remove("leave"),t.classList.remove("leave-active"),t.removeEventListener("webkitTransitionEnd",e),t.removeEventListener("transitionEnd",e)};return t.addEventListener("webkitTransitionEnd",e),t.addEventListener("transitionEnd",e),t.classList.add("leave"),t.classList.add("leave-active"),this},enter:function(){var e=function(){t.classList.remove("enter"),t.classList.remove("enter-active"),t.removeEventListener("webkitTransitionEnd",e),t.removeEventListener("transitionEnd",e)};return t.addEventListener("webkitTransitionEnd",e),t.addEventListener("transitionEnd",e),t.classList.add("enter"),t.classList.add("enter-active"),this}}}}}(ionic),function(t,e,n){function i(){o=!0;for(var t=0;t<r.length;t++)n.requestAnimationFrame(r[t]);r=[],e.removeEventListener("DOMContentLoaded",i)}var r=[],o=!1;e.addEventListener("DOMContentLoaded",i),t._rAF=function(){return t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(e){t.setTimeout(e,16)}}(),n.DomUtil={requestAnimationFrame:function(e){t._rAF(e)},animationFrameThrottle:function(t){var e,i,r;return function(){e=arguments,r=this,i||(i=!0,n.requestAnimationFrame(function(){t.apply(r,e),i=!1}))}},getPositionInParent:function(t){return{left:t.offsetLeft,top:t.offsetTop}},ready:function(t){o||"complete"===e.readyState?n.requestAnimationFrame(t):r.push(t)},getTextBounds:function(n){if(e.createRange){var i=e.createRange();if(i.selectNodeContents(n),i.getBoundingClientRect){var r=i.getBoundingClientRect();if(r){var o=t.scrollX,a=t.scrollY;return{top:r.top+a,left:r.left+o,right:r.left+o+r.width,bottom:r.top+a+r.height,width:r.width,height:r.height}}}}return null},getChildIndex:function(t,e){if(e)for(var n,i=t.parentNode.children,r=0,o=0,a=i.length;a>r;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),n.requestAnimationFrame(function(){n.DomUtil.centerElementByMargin(t)})})},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.animationFrameThrottle=n.DomUtil.animationFrameThrottle}(window,document,ionic),function(t){t.CustomEvent=window.CustomEvent||function(){var t;return 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},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,a=this.VIRTUALIZED_EVENTS.length;a>o;o++)if(e==this.VIRTUALIZED_EVENTS[o]){var s=new t.Gesture(i);return s.on(e,n),s}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;i<n.length;i++)this.element.addEventListener(n[i],e,!1);return this},off:function(t,e){for(var n=t.split(" "),i=0;i<n.length;i++)this.element.removeEventListener(n[i],e,!1);return this},trigger:function(e,n){var i=t.Gestures.DOCUMENT.createEvent("Event");i.initEvent(e,!0,!0),i.gesture=n;var r=this.element;return t.Gestures.utils.hasParent(n.target,r)&&(r=n.target),r.dispatchEvent(i),this},enable:function(t){return this.enabled=t,this}};var n=null,i=!1,r=!1;t.Gestures.event={bindDom:function(t,e,n){for(var i=e.split(" "),r=0;r<i.length;r++)t.addEventListener(i[r],n,!1)},onTouch:function(e,o,a){var s=this;this.bindDom(e,t.Gestures.EVENT_TYPES[o],function(c){var l=c.type.toLowerCase();if(!l.match(/mouse/)||!r){l.match(/touch/)||l.match(/pointerdown/)||l.match(/mouse/)&&1===c.which?i=!0:l.match(/mouse/)&&1!==c.which&&(i=!1),l.match(/touch|pointer/)&&(r=!0);var u=0;i&&(t.Gestures.HAS_POINTEREVENTS&&o!=t.Gestures.EVENT_END?u=t.Gestures.PointerEvent.updatePointer(o,c):l.match(/touch/)?u=c.touches.length:r||(u=l.match(/up/)?0:1),u>0&&o==t.Gestures.EVENT_END?o=t.Gestures.EVENT_MOVE:u||(o=t.Gestures.EVENT_END),(u||null===n)&&(n=c),a.call(t.Gestures.detection,s.collectEventData(e,o,s.getTouchList(n,o),c)),t.Gestures.HAS_POINTEREVENTS&&o==t.Gestures.EVENT_END&&(u=t.Gestures.PointerEvent.updatePointer(o,c))),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.indentifier=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,a=e.center.pageX-n.center.pageX,s=e.center.pageY-n.center.pageY,c=t.Gestures.utils.getVelocity(o,a,s);return t.Gestures.utils.extend(e,{deltaTime:o,deltaX:a,deltaY:s,velocityX:c.x,velocityY:c.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.index<e.index?-1:t.index>e.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&&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.timeStamp<n.options.doubletap_interval&&e.distance<n.options.doubletap_distance&&(n.trigger("doubletap",e),r=!0),(!r||n.options.tap_always)&&(t.Gestures.detection.current.name="tap",n.trigger(t.Gestures.detection.current.name,e))}}},t.Gestures.gestures.Swipe={name:"swipe",index:40,defaults:{swipe_max_touches:1,swipe_velocity:.7},handler:function(e,n){if(e.eventType==t.Gestures.EVENT_END){if(n.options.swipe_max_touches>0&&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.distance<n.options.drag_min_distance&&t.Gestures.detection.current.name!=this.name)return;if(t.Gestures.detection.current.name!=this.name&&(t.Gestures.detection.current.name=this.name,n.options.correct_for_drag_min_distance)){var i=Math.abs(n.options.drag_min_distance/e.distance);t.Gestures.detection.current.startEvent.center.pageX+=e.deltaX*i,t.Gestures.detection.current.startEvent.center.pageY+=e.deltaY*i,e=t.Gestures.detection.extendEventData(e)}(t.Gestures.detection.current.lastEvent.drag_locked_to_axis||n.options.drag_lock_to_axis&&n.options.drag_lock_min_distance<=e.distance)&&(e.drag_locked_to_axis=!0);var r=t.Gestures.detection.current.lastEvent.direction;e.drag_locked_to_axis&&r!==e.direction&&(e.direction=t.Gestures.utils.isVertical(r)?e.deltaY<0?t.Gestures.DIRECTION_UP:t.Gestures.DIRECTION_DOWN:e.deltaX<0?t.Gestures.DIRECTION_LEFT:t.Gestures.DIRECTION_RIGHT),this.triggered||(n.trigger(this.name+"start",e),this.triggered=!0),n.trigger(this.name,e),n.trigger(this.name+e.direction,e),(n.options.drag_block_vertical&&t.Gestures.utils.isVertical(e.direction)||n.options.drag_block_horizontal&&!t.Gestures.utils.isVertical(e.direction))&&e.preventDefault();break;case t.Gestures.EVENT_END:this.triggered&&n.trigger(this.name+"end",e),this.triggered=!1}}},t.Gestures.gestures.Transform={name:"transform",index:45,defaults:{transform_min_scale:.01,transform_min_rotation:1,transform_always_block:!1},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(!(e.touches.length<2))switch(n.options.transform_always_block&&e.preventDefault(),e.eventType){case t.Gestures.EVENT_START:this.triggered=!1;break;case t.Gestures.EVENT_MOVE:var i=Math.abs(1-e.scale),r=Math.abs(e.rotation);if(i<n.options.transform_min_scale&&r<n.options.transform_min_rotation)return;t.Gestures.detection.current.name=this.name,this.triggered||(n.trigger(this.name+"start",e),this.triggered=!0),n.trigger(this.name,e),r>n.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;t<s.length;t++)s[t]();s=[],n.trigger("platformready",{target:e}),n.requestAnimationFrame(function(){e.body.classList.add("platform-ready")})}n.Platform={isReady:!1,isFullScreen:!1,platforms:null,grade:null,ua:navigator.userAgent,ready:function(t){this.isReady?t():s.push(t)},detect:function(){n.Platform._checkPlatforms(),n.requestAnimationFrame(function(){for(var t=0;t<n.Platform.platforms.length;t++)e.body.classList.add("platform-"+n.Platform.platforms[t]);e.body.classList.add("grade-"+n.Platform.grade)})},device:function(){return t.device?t.device:(this.isWebView(),{})},_checkPlatforms:function(){this.platforms=[],this.grade="a",this.isWebView()?(this.platforms.push("webview"),this.platforms.push("cordova")):this.platforms.push("browser"),this.isIPad()&&this.platforms.push("ipad");var t=this.platform();if(t){this.platforms.push(t);var e=this.version();if(e){var n=e.toString();n.indexOf(".")>0?n=n.replace(".","_"):n+="_0",this.platforms.push(t+n.split("_")[0]),this.platforms.push(t+n),this.isAndroid()&&4.4>e&&(this.grade=4>e?"c":"b")}}},isWebView:function(){return!(!t.cordova&&!t.PhoneGap&&!t.phonegap)},isIPad:function(){return/iPad/i.test(t.navigator.platform)?!0:/iPad/i.test(this.ua)},isIOS:function(){return this.is("ios")},isAndroid:function(){return this.is("android")},platform:function(){return null===o&&this.setPlatform(this.device().platform),o},setPlatform:function(e){o="undefined"!=typeof e&&null!==e&&e.length?e.toLowerCase():this.ua.indexOf("Android")>0?"android":this.ua.indexOf("iPhone")>-1||this.ua.indexOf("iPad")>-1||this.ua.indexOf("iPod")>-1?"ios":t.navigator.platform&&t.navigator.platform.toLowerCase().split(" ")[0]||""},version:function(){return null===a&&this.setVersion(this.device().version),a},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(a=t);a=0;var e=this.platform(),n={android:/Android (\d+).(\d+)?/,ios:/OS (\d+)_(\d+)?/};n[e]&&(t=this.ua.match(n[e]),t.length>2&&(a=parseFloat(t[1]+"."+t[2])))},is:function(t){if(t=t.toLowerCase(),this.platforms)for(var e=0;e<this.platforms.length;e++)if(this.platforms[e]===t)return!0;var n=this.platform();return n?n===t.toLowerCase():this.ua.toLowerCase().indexOf(t)>=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 o=null,a=null,s=[];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"];for(n=0;n<i.length;n++)if(void 0!==t.documentElement.style[i[n]]){e.CSS.TRANSFORM=i[n];break}for(i=["webkitTransition","mozTransition","transition"],n=0;n<i.length;n++)if(void 0!==t.documentElement.style[i[n]]){e.CSS.TRANSITION=i[n];break}}(),"classList"in t.documentElement||!Object.defineProperty||"undefined"==typeof HTMLElement||Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){function t(t){return function(){var n,i=e.className.split(/\s+/);for(n=0;n<arguments.length;n++)t(i,i.indexOf(arguments[n]),arguments[n]);e.className=i.join(" ")}}var e=this;return{add:t(function(t,e,n){~e||t.push(n)}),remove:t(function(t,e){~e&&t.splice(e,1)}),toggle:t(function(t,e,n){~e?t.splice(e,1):t.push(n)}),contains:function(t){return!!~e.className.split(/\s+/).indexOf(t)},item:function(t){return e.className.split(/\s+/)[t]||null}}}})}(document,ionic);var z,k,Y,H,F,q,W,U=6,B={click:i,mousedown:r,mouseup:o,mousemove:a,touchstart:s,touchend:c,touchcancel:u,touchmove:l,focusin:p,focusout:g};ionic.tap={register:function(e){return z=e,t("click",!0,!0),t("mouseup"),t("mousedown"),t("touchstart"),t("touchend"),t("touchcancel"),t("focusin"),t("focusout"),function(){for(var e in B)t(e,!1);z=null,k=null,Y=!1,F=!1,q=null}},ignoreScrollStart:function(t){return t.defaultPrevented||t.target.isContentEditable||/file|range/i.test(t.target.type)||"true"==(t.target.dataset?t.target.dataset.preventScroll:t.target.getAttribute("data-prevent-default"))||!!/object|embed/i.test(t.target.tagName)},isTextInput:function(t){return!!t&&("TEXTAREA"==t.tagName||"true"===t.contentEditable||"INPUT"==t.tagName&&!/radio|checkbox|range|file|submit|reset/i.test(t.type))},isLabelWithTextInput:function(t){var e=E(t,!1);return!!e&&ionic.tap.isTextInput(w(e))},containsOrIsTextInput:function(t){return ionic.tap.isTextInput(t)||ionic.tap.isLabelWithTextInput(t)},cloneFocusedInput:function(t){ionic.tap.hasCheckedClone||(ionic.tap.hasCheckedClone=!0,ionic.requestAnimationFrame(function(){var e=t.querySelector(":focus");if(ionic.tap.isTextInput(e)){var n=e.parentElement.querySelector(".cloned-text-input");n||(n=document.createElement(e.tagName),n.type=e.type,n.value=e.value,n.className="cloned-text-input",n.readOnly=!0,e.parentElement.insertBefore(n,e),e.style.top=e.offsetTop,e.classList.add("previous-input-focus"))}}))},hasCheckedClone:!1,removeClonedInputs:function(t){ionic.tap.hasCheckedClone=!1,ionic.requestAnimationFrame(function(){var e,n=t.querySelectorAll(".cloned-text-input"),i=t.querySelectorAll(".previous-input-focus");for(e=0;e<n.length;e++)n[e].parentElement.removeChild(n[e]);for(e=0;e<i.length;e++)i[e].classList.remove("previous-input-focus"),i[e].style.top="",i[e].focus()})},requiresNativeClick:function(t){if(!t||t.disabled||/file|range/i.test(t.type)||/object|video/i.test(t.tagName))return!0;if(1===t.nodeType)for(var e=t;e;){if("true"==(e.dataset?e.dataset.tapDisabled:e.getAttribute("data-tap-disabled")))return!0;e=e.parentElement}return!1}},ionic.DomUtil.ready(function(){ionic.tap.register(document)}),function(t,e){"use strict";function n(){o={},e.requestAnimationFrame(r)}function i(){for(var t in o)o[t]&&(o[t].classList.add(c),a[t]=o[t]);o={}}function r(){for(var t in a)a[t]&&(a[t].classList.remove(c),delete a[t])}var o={},a={},s=0,c="activated";e.activator={start:function(t){var n=this;e.requestAnimationFrame(function(){if(!e.tap.requiresNativeClick(t.target)){for(var r,a=t.target,c=0;4>c&&(a&&1===a.nodeType);c++){if(r&&a.classList.contains("item")){r=a;break}if(("A"==a.tagName||"BUTTON"==a.tagName||a.hasAttribute("ng-click"))&&(r=a),a.classList.contains("button")){r=a;break}a=a.parentElement}r&&(o[s]=r,"touchstart"===t.type?n._activateTimeout=setTimeout(i,80):e.requestAnimationFrame(i),s=s>19?0:s+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,a,s;return function(){o=this,r=arguments,a=new Date;var c=function(){var l=new Date-a;e>l?i=setTimeout(c,e-l):(i=null,n||(s=t.apply(o,r)))},l=n&&!i;return i||(i=setTimeout(c,e)),l&&(s=t.apply(o,r)),s}},throttle:function(t,e,n){var i,r,o,a=null,s=0;n||(n={});var c=function(){s=n.leading===!1?0:Date.now(),a=null,o=t.apply(i,r)};return function(){var l=Date.now();s||n.leading!==!1||(s=l);var u=e-(l-s);return i=this,r=arguments,0>=u?(clearTimeout(a),a=null,s=l,o=t.apply(i,r)):a||n.trailing===!1||(a=setTimeout(c,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;n<e.length;n++){var i=e[n];if(i)for(var r in i)t[r]=i[r]}return t},nextUid:function(){for(var t,n=e.length;n;){if(n--,t=e[n].charCodeAt(0),57==t)return e[n]="A",e.join("");if(90!=t)return e[n]=String.fromCharCode(t+1),e.join("");e[n]="0"}return e.unshift("0"),e.join("")}},t.inherit=t.Utils.inherit,t.extend=t.Utils.extend,t.throttle=t.Utils.throttle,t.proxy=t.Utils.proxy,t.debounce=t.Utils.debounce}(window.ionic);var Z,j,Q,K=window.innerHeight,J=0,$="keyboard-open",te="scroll";ionic.keyboard={isOpen:!1,height:null,landscape:!1},ionic.Platform.ready(function(){A(),setTimeout(A,999),document.addEventListener("touchstart",y,!1)});var ee,ne={};ionic.viewport={orientation:function(){return window.innerWidth>window.innerHeight?90:0}},ionic.Platform.ready(function(){R(),window.addEventListener("orientationchange",function(){setTimeout(V,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 ie={effect:{}};!function(t){var e=Date.now||function(){return+new Date},n=60,i=1e3,r={},o=1;ie.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,a=1,s=null,c=+new Date;return function(t){var e=a++;return r[e]=t,o++,null===s&&(s=setInterval(function(){var t=+new Date,e=r;r={},o=0;for(var n in e)e.hasOwnProperty(n)&&(e[n](t),c=t);t-c>2500&&(clearInterval(s),s=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,a,s,c,l,u){var h=e(),d=h,f=0,_=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]||a&&!a(p))return r[p]=null,void(s&&s(n-_/((m-h)/i),p,!1));if(g)for(var T=Math.round((m-d)/(i/n))-1,E=0;E<Math.min(T,4);E++)v(!0),_++;c&&(f=(m-h)/c,f>1&&(f=1));var w=l?l(f):f;t(w,m,g)!==!1&&1!==f||!g?g&&(d=m,ie.effect.Animate.requestAnimationFrame(v,u)):(r[p]=null,s&&s(n-_/((m-h)/i),p,1===f||null==c))};return r[p]=!0,ie.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,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)}};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){n.hintResize(),o(),n.scrollBy(t.wheelDeltaX/n.options.wheelDampen,-t.wheelDeltaY/n.options.wheelDampen),a()}var n=this,i=this.__container;if(i.addEventListener("scrollChildIntoView",function(e){if(n.isScrolledIntoView||((t.Platform.isIOS()||t.Platform.isFullScreen)&&(i.style.height=i.clientHeight-e.detail.keyboardHeight+"px",i.style.overflow="visible",n.resize()),n.isScrolledIntoView=!0),e.detail.isElementUnderKeyboard){var r;r=!t.Platform.isFullScreen&&e.detail.hasPlugin?350:80,t.scroll.isScrolling=!0,setTimeout(function(){var r=.5*i.clientHeight,o=e.detail.keyboardTopOffset+r;t.tap.cloneFocusedInput(i,n),n.scrollBy(0,o,!0),n.onScroll()},r)}e.stopPropagation()}),i.addEventListener("resetScrollView",function(){n.isScrolledIntoView=!1,i.style.height="",i.style.overflow="",n.resize(),t.scroll.isScrolling=!1}),n.touchStart=function(e){if(n.startCoordinates=T(e),!t.tap.ignoreScrollStart(e)){if(t.tap.containsOrIsTextInput(e.target))return void(n.__hasStarted=!1);n.__isSelectable=!0,n.__enableScrollY=!0,n.__hasStarted=!0,n.doTouchStart(e.touches,e.timeStamp),e.preventDefault()}},n.touchMove=function(e){if(!e.defaultPrevented){if(!n.__hasStarted&&t.tap.containsOrIsTextInput(e.target))return n.__hasStarted=!0,n.doTouchStart(e.touches,e.timeStamp),void e.preventDefault();if(n.startCoordinates){var r=T(e);n.__isSelectable&&t.tap.isTextInput(e.target)&&Math.abs(n.startCoordinates.x-r.x)>20&&(n.__enableScrollY=!1,n.__isSelectable=!0),n.__enableScrollY&&Math.abs(n.startCoordinates.y-r.y)>10&&(n.__isSelectable=!1,t.tap.cloneFocusedInput(i,n))}n.doTouchMove(e.touches,e.timeStamp,e.scale)}},n.touchEnd=function(e){n.doTouchEnd(e.timeStamp),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{var r=!1;i.addEventListener("mousedown",function(e){t.tap.ignoreScrollStart(e)||"SELECT"===e.target.tagName||(n.doTouchStart([{pageX:e.pageX,pageY:e.pageY}],e.timeStamp),e.preventDefault(),r=!0)},!1),document.addEventListener("mousemove",function(t){r&&!t.defaultPrevented&&(n.doTouchMove([{pageX:t.pageX,pageY:t.pageY}],t.timeStamp),r=!0)},!1),document.addEventListener("mouseup",function(t){r&&(n.doTouchEnd(t.timeStamp),r=!1)},!1);var o=t.debounce(function(){n.__fadeScrollbars("in")},500,!0),a=t.debounce(function(){n.__fadeScrollbars("out")},100,!1);document.addEventListener("mousewheel",e)}},__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,a=0,s=0;o.__indicatorX&&(o.__indicatorY&&(a=10),i=Math.round(o.__indicatorX.sizeRatio*o.__scrollLeft)||0,e=o.__scrollLeft-(o.__maxScrollLeft-a),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-a,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&&(s=10),n=o.__scrollTop-(o.__maxScrollTop-s),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-s,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],a=document.createElement("div"),s=o+"Perspective",c=o+"Transform",l=o+"TransformOrigin";return e.__perspectiveProperty=c,e.__transformProperty=c,e.__transformOriginProperty=l,a.style[s]!==r?function(t,i,r,o){n.style[c]="translate3d("+-t+"px,"+-i+"px,0) scale("+r+")",e.__repositionScrollbars(),o||e.triggerScrollEvent()}:a.style[c]!==r?function(t,i,r,o){n.style[c]="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&&(ie.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 a=(n+r.__scrollLeft)*t/o-n,s=(i+r.__scrollTop)*t/o-i;a>r.__maxScrollLeft?a=r.__maxScrollLeft:0>a&&(a=0),s>r.__maxScrollTop?s=r.__maxScrollTop:0>s&&(s=0),r.__publish(a,s,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&&(ie.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){if(this.hintResize(),null==t.length)throw new Error("Invalid touch list: "+t);if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);var n=this;n.__interruptedAnimation=!0,n.__isDecelerating&&(ie.effect.Animate.stop(n.__isDecelerating),n.__isDecelerating=!1,n.__interruptedAnimation=!0),n.__isAnimating&&(ie.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.__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){if(null==t.length)throw new Error("Invalid touch list: "+t);if(e instanceof Date&&(e=e.valueOf()),"number"!=typeof e)throw new Error("Invalid timestamp value: "+e);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):(r=t[0].pageX,o=t[0].pageY);var a=i.__positions;if(i.__isDragging){var s=r-i.__lastTouchLeft,c=o-i.__lastTouchTop,l=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 f=r-i.__clientLeft,_=o-i.__clientTop;l=(f+l)*h/d-f,u=(_+u)*h/d-_,i.__computeScrollMax(h)}}if(i.__enableScrollX){l-=s*this.options.speedMultiplier;var p=i.__maxScrollLeft;(l>p||0>l)&&(i.options.bouncing?l+=s/2*this.options.speedMultiplier:l=l>p?p:0)}if(i.__enableScrollY){u-=c*this.options.speedMultiplier;var g=i.__maxScrollTop;(u>g||0>u)&&(i.options.bouncing||i.__refreshHeight&&0>u?(u+=c/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)}a.length>60&&a.splice(0,30),a.push(l,u,e),i.__publish(l,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,a.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){if(t instanceof Date&&(t=t.valueOf()),"number"!=typeof t)throw new Error("Invalid timestamp value: "+t);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 a=n[i]-n[r],s=e.__scrollLeft-n[r-2],c=e.__scrollTop-n[r-1];e.__decelerationVelocityX=s/a*(1e3/60),e.__decelerationVelocityY=c/a*(1e3/60);var l=e.options.paging||e.options.snapping?4:1;(Math.abs(e.__decelerationVelocityX)>l||Math.abs(e.__decelerationVelocityY)>l)&&(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,a){var s=this,c=s.__isAnimating;if(c&&(ie.effect.Animate.stop(c),s.__isAnimating=!1),o&&s.options.animating){s.__scheduledLeft=t,s.__scheduledTop=e,s.__scheduledZoom=r;var l=s.__scrollLeft,u=s.__scrollTop,h=s.__zoomLevel,d=t-l,f=e-u,_=r-h,p=function(t,e,n){n&&(s.__scrollLeft=l+d*t,s.__scrollTop=u+f*t,s.__zoomLevel=h+_*t,s.__callback&&s.__callback(s.__scrollLeft,s.__scrollTop,s.__zoomLevel,a))},g=function(t){return s.__isAnimating===t},m=function(t,e,n){e===s.__isAnimating&&(s.__isAnimating=!1),(s.__didDecelerationComplete||n)&&s.__scrollingComplete(),s.options.zooming&&s.__computeScrollMax()};s.__isAnimating=ie.effect.Animate.start(p,g,m,s.options.animationDuration,c?n:i)}else s.__scheduledLeft=s.__scrollLeft=t,s.__scheduledTop=s.__scrollTop=e,s.__scheduledZoom=s.__zoomLevel=r,s.__callback&&s.__callback(t,e,r,a),s.options.zooming&&s.__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||0!=e.__maxScrollLeft||0!=e.__maxScrollTop||(e.__didWaitForSize=!0,e.__waitForSize())},__waitForSize:function(){var t=this;clearTimeout(t.__sizerTimeout);var e=function(){t.resize(),t.options.scrollingX&&0==t.__maxScrollLeft||t.options.scrollingY&&0==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 a=function(){var e=Math.abs(t.__decelerationVelocityX)>=t.__minVelocityToKeepDecelerating||Math.abs(t.__decelerationVelocityY)>=t.__minVelocityToKeepDecelerating;return e||(t.__didDecelerationComplete=!0),e},s=function(){t.__isDecelerating=!1,t.__didDecelerationComplete&&t.__scrollingComplete(),t.options.paging&&t.scrollTo(t.__scrollLeft,t.__scrollTop,t.options.snapping)};t.__isDecelerating=ie.effect.Animate.start(o,a,s)},__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 a=.95;e.__decelerationVelocityX*=a,e.__decelerationVelocityY*=a}if(e.options.bouncing){var s=0,c=0,l=e.options.penetrationDeceleration,u=e.options.penetrationAcceleration;if(n<e.__minDecelerationScrollLeft?s=e.__minDecelerationScrollLeft-n:n>e.__maxDecelerationScrollLeft&&(s=e.__maxDecelerationScrollLeft-n),i<e.__minDecelerationScrollTop?c=e.__minDecelerationScrollTop-i:i>e.__maxDecelerationScrollTop&&(c=e.__maxDecelerationScrollTop-i),0!==s){var h=s*e.__decelerationVelocityX<=e.__minDecelerationScrollLeft;h&&(e.__decelerationVelocityX+=s*l);var d=Math.abs(e.__decelerationVelocityX)<=e.__minVelocityToKeepDecelerating;(!h||d)&&(e.__decelerationVelocityX=s*u)}if(0!==c){var f=c*e.__decelerationVelocityY<=e.__minDecelerationScrollTop;f&&(e.__decelerationVelocityY+=c*l);var _=Math.abs(e.__decelerationVelocityY)<=e.__minVelocityToKeepDecelerating;(!f||_)&&(e.__decelerationVelocityY=c*u)}}}}),t.scroll={isScrolling:!1,lastTop:0}}(ionic),function(t){"use strict";t.views.ActionSheet=t.views.View.inherit({initialize:function(t){this.el=t.el},show:function(){this.el.offsetWidth,this.el.classList.add("active")},hide:function(){this.el.offsetWidth,this.el.classList.remove("active")}})}(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,a,s=i.el.childNodes,c=0,l=0,u=!1;for(r=0;r<s.length;r++)o=s[r],o.tagName&&"h1"==o.tagName.toLowerCase()?u=!0:(a=null,3==o.nodeType?a=t.DomUtil.getTextBounds(o).width:1==o.nodeType&&(a=o.offsetWidth),a&&(u?l+=a:c+=a));var h=Math.max(c,l)+10;n.style.left=n.style.right="","center"==e?(h>10&&(n.style.left=h+"px",n.style.right=h+"px"),n.offsetWidth<n.scrollWidth&&l>0&&(n.style.right=l+5+"px")):"left"==e?(n.classList.add("title-left"),c>0&&(n.style.left=c+15+"px")):"right"==e&&(n.classList.add("title-right"),l>0&&(n.style.right=l+15+"px"))})}}})}(ionic),function(t){"use strict";var e="item",n="item-content",i="item-sliding",r="item-options",o="item-placeholder",a="item-reordering",s="item-reorder",c=function(){};c.prototype={start:function(){},drag:function(){},end:function(){},isSameItem:function(){return!1}};var l=function(t){this.dragThresholdX=t.dragThresholdX||10,this.el=t.el,this.canSwipe=t.canSwipe};l.prototype=new c,l.prototype.start=function(o){var a,s,c,l;this.canSwipe()&&(a=o.target.classList.contains(n)?o.target:o.target.classList.contains(e)?o.target.querySelector("."+n):t.DomUtil.getParentWithClass(o.target,n),a&&(a.classList.remove(i),c=parseFloat(a.style[t.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])||0,s=a.parentNode.querySelector("."+r),s&&(s.classList.remove("invisible"),l=s.offsetWidth,this._currentDrag={buttons:s,buttonsWidth:l,content:a,startOffsetX:c})))},l.prototype.isSameItem=function(t){return t._lastDrag&&this._currentDrag?this._currentDrag.content==t._lastDrag.content:!1},l.prototype.clean=function(){var e=this._lastDrag;e&&t.requestAnimationFrame(function(){e.content.style[t.CSS.TRANSITION]="",e.content.style[t.CSS.TRANSFORM]="",setTimeout(function(){e.buttons&&e.buttons.classList.add("invisible")},250)})},l.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"}}),l.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){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};u.prototype=new c,u.prototype._moveElement=function(e){var n=e.gesture.center.pageY-this._currentDrag.elementHeight+this.scrollView.getValues().top-this.listEl.offsetTop;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(a),this._currentDrag={elementHeight:i,startIndex:n,placeholder:r,scrollHeight:scroll,list:r.parentNode},this._moveElement(e)},u.prototype.drag=t.animationFrameThrottle(function(t){if(this._currentDrag){var e=0,n=t.gesture.center.pageY;if(this.scrollView){var i=this.scrollEl;e=this.scrollView.getValues().top;var r=i.offsetTop,o=r-n+this._currentDrag.elementHeight/2,a=n+this._currentDrag.elementHeight/2-r-i.offsetHeight;t.gesture.deltaY<0&&o>0&&e>0&&this.scrollView.scrollBy(null,-o),t.gesture.deltaY>0&&a>0&&e<this.scrollView.getScrollMax().top&&this.scrollView.scrollBy(null,a)}!this._isDragging&&Math.abs(t.gesture.deltaY)>this.dragThresholdY&&(this._isDragging=!0),this._isDragging&&(this._moveElement(t),this._currentDrag.currentY=e+n-this._currentDrag.placeholder.parentNode.offsetTop,this._reorderItems())}}),u.prototype._reorderItems=function(){var e=this,n=(this._currentDrag.placeholder,Array.prototype.slice.call(this._currentDrag.placeholder.parentNode.children).filter(function(t){return t!==e.el})),i=n.indexOf(this._currentDrag.placeholder),r=n[Math.max(0,i-1)],o=n[Math.min(n.length,i+1)],a=this._currentDrag.currentY;return r&&a<r.offsetTop+r.offsetHeight/2?(t.DomUtil.swapNodes(this._currentDrag.placeholder,r),i-1):o&&a>o.offsetTop+o.offsetHeight/2?(t.DomUtil.swapNodes(o,this._currentDrag.placeholder),i+1):void 0},u.prototype.end=function(e,n){if(!this._currentDrag)return void(n&&n());var i=this._currentDrag.placeholder,r=t.DomUtil.getChildIndex(i,i.nodeName.toLowerCase());this.el.classList.remove(a),this.el.style[t.CSS.TRANSFORM]="",i.parentNode.insertBefore(this.el,i),i.parentNode.removeChild(i),this.onReorder&&this.onReorder(this.el,this._currentDrag.startIndex,r),this._currentDrag=null,n&&n()},t.views.ListView=t.views.View.inherit({initialize:function(e){var n=this;e=t.extend({onReorder:function(){},virtualRemoveThreshold:-200,virtualAddThreshold:200,canSwipe:function(){return!0}},e),t.extend(this,e),!this.itemHeight&&this.listEl&&(this.itemHeight=this.listEl.children[0]&&parseInt(this.listEl.children[0].style.height,10)),this.onRefresh=e.onRefresh||function(){},this.onRefreshOpening=e.onRefreshOpening||function(){},this.onRefreshHolding=e.onRefreshHolding||function(){},window.ionic.onGesture("release",function(t){n._handleEndDrag(t)},this.el),window.ionic.onGesture("drag",function(t){n._handleDrag(t)},this.el),this._initDrag()},stopRefreshing:function(){var t=this.el.querySelector(".list-refresher");t.style.height="0px"},didScroll:function(t){if(this.isVirtual){var e=this.itemHeight,n=(this.listEl.children.length,t.target.scrollHeight),i=this.el.parentNode.offsetHeight,r=(t.scrollTop,Math.max(0,t.scrollTop+this.virtualRemoveThreshold)),o=Math.min(n,Math.abs(t.scrollTop)+i+this.virtualAddThreshold),a=Math.floor((o-r)/e),s=parseInt(Math.abs(r/e),10),c=parseInt(Math.abs(o/e),10);this._virtualItemsToRemove=Array.prototype.slice.call(this.listEl.children,0,s);{Array.prototype.slice.call(this.listEl.children,s,s+a)}this.renderViewport&&this.renderViewport(r,o,s,c)}},didStopScrolling:function(){if(this.isVirtual)for(var t=0;t<this._virtualItemsToRemove.length;t++){{this._virtualItemsToRemove[t]}this.didHideItem&&this.didHideItem(t)}},clearDragEffects:function(){this._lastDragOp&&(this._lastDragOp.clean&&this._lastDragOp.clean(),this._lastDragOp=null)},_initDrag:function(){this._lastDragOp=this._dragOp,this._dragOp=null},_getItem:function(t){for(;t;){if(t.classList&&t.classList.contains(e))return t;t=t.parentNode}return null},_startDrag:function(e){var n=this;this._isDragging=!1;
var i=this._lastDragOp;if(!t.DomUtil.getParentOrSelfWithClass(e.target,s)||"up"!=e.gesture.direction&&"down"!=e.gesture.direction){if(!this._didDragUpOrDown&&("left"==e.gesture.direction||"right"==e.gesture.direction)&&Math.abs(e.gesture.deltaX)>5){var r=this._getItem(e.target);r&&r.querySelector(".item-options")&&(this._dragOp=new l({el:this.el,canSwipe:this.canSwipe}),this._dragOp.start(e),e.preventDefault())}}else{var r=this._getItem(e.target);r&&(this._dragOp=new u({listEl:this.el,el:r,scrollEl:this.scrollEl,scrollView:this.scrollView,onReorder:function(t,e,i){n.onReorder&&n.onReorder(t,e,i)}}),this._dragOp.start(e),e.preventDefault())}i&&this._dragOp&&!this._dragOp.isSameItem(i)&&e.defaultPrevented&&i.clean&&i.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},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;e<t.length;e++)t[e].blur&&t[e].blur()})}}})}(ionic),function(t){"use strict";t.views.SideMenu=t.views.View.inherit({initialize:function(t){this.el=t.el,this.isEnabled="undefined"==typeof t.isEnabled?!0:t.isEnabled,this.setWidth(t.width)},getFullWidth:function(){return this.width},setWidth:function(t){this.width=t,this.el.style.width=t+"px"},setIsEnabled:function(t){this.isEnabled=t},bringUp:function(){"0"!==this.el.style.zIndex&&(this.el.style.zIndex="0")},pushDown:function(){"-1"!==this.el.style.zIndex&&(this.el.style.zIndex="-1")}}),t.views.SideMenuContent=t.views.View.inherit({initialize:function(e){t.extend(this,{animationClass:"menu-animated",onDrag:function(){},onEndDrag:function(){}},e),t.onGesture("drag",t.proxy(this._onDrag,this),this.el),t.onGesture("release",t.proxy(this._onEndDrag,this),this.el)},_onDrag:function(t){this.onDrag&&this.onDrag(t)},_onEndDrag:function(t){this.onEndDrag&&this.onEndDrag(t)},disableAnimation:function(){this.el.classList.remove(this.animationClass)},enableAnimation:function(){this.el.classList.add(this.animationClass)},getTranslateX:function(){return parseFloat(this.el.style[t.CSS.TRANSFORM].replace("translate3d(","").split(",")[0])},setTranslateX:t.animationFrameThrottle(function(e){this.el.style[t.CSS.TRANSFORM]="translate3d("+e+"px, 0, 0)"})})}(ionic),function(t){"use strict";t.views.Slider=t.views.View.inherit({initialize:function(t){function e(){g=E.children,T=g.length,g.length<2&&(t.continuous=!1),_.transitions&&t.continuous&&g.length<3&&(E.appendChild(g[0].cloneNode(!0)),E.appendChild(E.children[1].cloneNode(!0)),g=E.children),m=new Array(g.length),v=p.getBoundingClientRect().width||p.offsetWidth,E.style.width=g.length*v+"px";for(var e=g.length;e--;){var n=g[e];n.style.width=v+"px",n.setAttribute("data-index",e),_.transitions&&(n.style.left=e*-v+"px",a(e,w>e?-v:e>w?v:0,0))}t.continuous&&_.transitions&&(a(r(w-1),-v,0),a(r(w+1),v,0)),_.transitions||(E.style.left=w*-v+"px"),p.style.visibility="visible",t.slidesChanged&&t.slidesChanged()}function n(){t.continuous?o(w-1):w&&o(w-1)}function i(){t.continuous?o(w+1):w<g.length-1&&o(w+1)}function r(t){return(g.length+t%g.length)%g.length}function o(e,n){if(w!=e){if(_.transitions){var i=Math.abs(w-e)/(w-e);if(t.continuous){var o=i;i=-m[r(e)]/v,i!==o&&(e=-i*g.length+e)}for(var s=Math.abs(w-e)-1;s--;)a(r((e>w?e:w)-s-1),v*i,0);e=r(e),a(w,v*i,n||y),a(e,0,n||y),t.continuous&&a(r(e-i),-(v*i),0)}else e=r(e),c(w*-v,e*-v,n||y);w=e,f(t.callback&&t.callback(w,g[w]))}}function a(t,e,n){s(t,e,n),m[t]=e}function s(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 c(e,n,i){if(!i)return void(E.style.left=n+"px");var r=+new Date,o=setInterval(function(){var a=+new Date-r;return a>i?(E.style.left=n+"px",M&&l(),t.transitionEnd&&t.transitionEnd.call(event,w,g[w]),void clearInterval(o)):void(E.style.left=(n-e)*(Math.floor(a/i*100)/100)+e+"px")},4)}function l(){S=setTimeout(i,M)}function u(){M=t.auto||0,clearTimeout(S)}var h=this,d=function(){},f=function(t){setTimeout(t||d,0)},_={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 w=parseInt(t.startSlide,10)||0,y=t.speed||300;t.continuous=void 0!==t.continuous?t.continuous:!0;var S,b,M=t.auto||0,D={},x={},L={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":f(this.end(n));break;case"mouseup":f(this.end(n));break;case"webkitTransitionEnd":case"msTransitionEnd":case"oTransitionEnd":case"otransitionend":case"transitionend":f(this.transitionEnd(n));break;case"resize":f(e)}t.stopPropagation&&n.stopPropagation()},start:function(t){var e=t.touches[0];D={x:e.pageX,y:e.pageY,time:+new Date},b=void 0,x={},_.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-D.x,y:n.pageY-D.y},"undefined"==typeof b&&(b=!!(b||Math.abs(x.x)<Math.abs(x.y))),b||(e.preventDefault(),u(),t.continuous?(s(r(w-1),x.x+m[r(w-1)],0),s(w,x.x+m[w],0),s(r(w+1),x.x+m[r(w+1)],0)):(x.x=x.x/(!w&&x.x>0||w==g.length-1&&x.x<0?Math.abs(x.x)/v+1:1),s(w-1,x.x+m[w-1],0),s(w,x.x+m[w],0),s(w+1,x.x+m[w+1],0)))}},end:function(){var e=+new Date-D.time,n=Number(e)<250&&Math.abs(x.x)>20||Math.abs(x.x)>v/2,i=!w&&x.x>0||w==g.length-1&&x.x<0;t.continuous&&(i=!1);var o=x.x<0;b||(n&&!i?(o?(t.continuous?(a(r(w-1),-v,0),a(r(w+2),v,0)):a(w-1,-v,0),a(w,m[w]-v,y),a(r(w+1),m[r(w+1)]-v,y),w=r(w+1)):(t.continuous?(a(r(w+1),v,0),a(r(w-2),-v,0)):a(w+1,v,0),a(w,m[w]+v,y),a(r(w-1),m[r(w-1)]+v,y),w=r(w-1)),t.callback&&t.callback(w,g[w])):t.continuous?(a(r(w-1),-v,y),a(w,0,y),a(r(w+1),v,y)):(a(w-1,-v,y),a(w,0,y),a(w+1,v,y))),_.touch?(E.removeEventListener("touchmove",L,!1),E.removeEventListener("touchend",L,!1)):(E.removeEventListener("mousemove",L,!1),E.removeEventListener("mouseup",L,!1),document.removeEventListener("mouseup",L,!1))},transitionEnd:function(e){parseInt(e.target.getAttribute("data-index"),10)==w&&(M&&l(),t.transitionEnd&&t.transitionEnd.call(e,w,g[w]))}};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.currentIndex=function(){return w},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="",_.transitions&&s(t,0,0)}_.addEventListener?(E.removeEventListener("touchstart",L,!1),E.removeEventListener("webkitTransitionEnd",L,!1),E.removeEventListener("msTransitionEnd",L,!1),E.removeEventListener("oTransitionEnd",L,!1),E.removeEventListener("otransitionend",L,!1),E.removeEventListener("transitionend",L,!1),window.removeEventListener("resize",L,!1)):window.onresize=null},this.load=function(){e(),M&&l(),_.addEventListener?(_.touch?E.addEventListener("touchstart",L,!1):E.addEventListener("mousedown",L,!1),_.transitions&&(E.addEventListener("webkitTransitionEnd",L,!1),E.addEventListener("msTransitionEnd",L,!1),E.addEventListener("oTransitionEnd",L,!1),E.addEventListener("otransitionend",L,!1),E.addEventListener("transitionend",L,!1)),window.addEventListener("resize",L,!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(){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?t<n.triggerThreshold?n.setOpenPercent(0):t>n._dragInfo.triggerX&&n.setOpenPercent(100):t<n._dragInfo.triggerX?n.setOpenPercent(0):t>i&&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||e<this.openPercent-3||e>this.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)}},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),function(){var t=Date.now||function(){return+new Date},e=60,n=1e3,i={},r=1;ionic.Animation={},ionic.Animation={create:function(t){return new ionic.Animation.Animation(t)},animationStarted:function(t){var e=r++;if(e%20===0){var n={};for(var o in i)n[o]=!0;i=n}return i[e]=!0,t.isRunning=!0,t._animationId=e,e},animationStopped:function(t){t.isRunning=!1}},ionic.Animation.Animation=function(t){ionic.extend(this,t),t.useSlowAnimations&&(this.delay*=3,this.duration*=3)},ionic.Animation.Animation.prototype={el:null,curve:"linear",duration:500,delay:0,repeat:-1,reverse:!1,autoReverse:!1,step:function(){},stop:function(){this.isRunning=!1,this.shouldEnd=!0},play:function(){this.isPaused=!1,this.start()},pause:function(){this.isPaused=!0},_saveState:function(t,e,n){this._pauseState={percent:t,iteration:e,reverse:n}},restart:function(){},start:function(){var t,e=this;t="string"==typeof this.curve?ionic.Animation.TimingFn[this.curve]||ionic.Animation.TimingFn.linear:this.curve,t=t(this.duration);var n={startPercent:this.reverse===!0?1:0,endPercent:this.reverse===!0?0:1,duration:this.duration,easingMethod:t,delay:this.delay,reverse:this.reverse,repeat:this.repeat,autoReverse:this.autoReverse};return this._pauseState&&(ionic.extend(n,this._pauseState),this._pauseState=null),ionic.Animation.animationStarted(this),this._run(function(t,n,i){i&&e.step(t)},function(){ionic.Animation.animationStopped(e)},n)},_run:function(i,r,o){var a=this,s=t(),c=s,l=(s+o.delay,o.startPercent),u=o.startPercent,h=o.endPercent,d=o.autoReverse,f=o.delay,_=o.duration,p=o.easingMethod,g=o.repeat,m=o.reverse,v=0,T=0,E=function(){if(l===h&&d){var e=h;m=!m,h=u,u=e,0===g&&(d=!1)}else l=u;s=t(),ionic.requestAnimationFrame(w)},w=function(o){var u=o!==!0,y=t(),S=y-s;if(a.isPaused)return void a._saveState(l,T,m);if(!a.isRunning)return void(r&&r(e-v/((y-s)/n),a._animationId,!1));if(u)for(var b=Math.round((y-c)/(n/e))-1,M=0;M<Math.min(b,4);M++)w(!0),v++;S>f&&_&&(l=(S-f)/_,m===!0?(l=1-l,0>l&&(l=0)):l>1&&(l=1));var D=p?p(l):l;i(D,y,u)!==!1&&l!==h||!u?u&&(c=y,ionic.requestAnimationFrame(w)):-1===g?E():g>T?(T++,E()):0===g&&d?E():r&&r(e-v/((y-s)/n),a._animationId,l===h||null==_)};ionic.requestAnimationFrame(w)}}}(window),function(t){t.Animation=t.Animation||{},t.Animation.Bezier=function(){"use strict";var t=400,e=function(t){return 1/(200*t)},n=function(n,i,r,o){var a=3*n,s=3*(r-n)-a,c=1-a-s,l=3*i,u=3*(o-i)-l,h=1-l-u,d=function(t){return((c*t+s)*t+a)*t},f=function(t){return((h*t+u)*t+l)*t},_=function(t){return(3*c*t+2*s)*t+a},p=function(t,e){var n,i,r,o,a,s;for(r=t,s=0;8>s;s++){if(o=d(r)-t,Math.abs(o)<e)return r;if(a=_(r),Math.abs(a)<1e-6)break;r-=o/a}if(n=0,i=1,r=t,n>r)return n;if(r>i)return i;for(;i>n;){if(o=d(r),Math.abs(o-t)<e)return r;t>o?n=r:i=r,r=.5*(i-n)+n}return r},g=function(t,e){return f(p(t,e))};return function(n,i){return g(n,e(+i||t))}};return{linear:n(0,0,1,1),ease:n(.25,.1,.25,1),easeIn:n(.42,0,1,1),easeOut:n(0,0,.58,1),easeInOut:n(.42,0,.58,1),cubicBezier:function(t,e,i,r,o,a){return n(t,e,i,r)(o,a)}}}();!function(){"use strict";var t=.5*Math.pow(.5,1.925);return{linear:function(t){return t},easeInApprox:function(t){return Math.pow(t,1.685)},easeInQuadratic:function(t){return t*t},easeInCubic:function(t){return t*t*t},easeOutApprox:function(t){return 1-Math.pow(1-t,1.685)},easeOutQuadratic:function(t){return t-=1,1-t*t},easeOutCubic:function(t){return t-=1,1+t*t*t},easeInOutApprox:function(e){return.5>e?t*Math.pow(e,1.925):1-t*Math.pow(1-e,1.925)},easeInOutQuadratic:function(t){return.5>t?2*t*t:(t-=1,1-2*t*t)},easeInOutCubic:function(t){return.5>t?4*t*t*t:(t-=1,1+4*t*t*t)},easeInOutQuartic:function(t){return.5>t?8*t*t*t*t:(t-=1,1+8*t*t*t*t)},easeInOutQuintic:function(t){return.5>t?16*t*t*t*t*t:(t-=1,1+16*t*t*t*t*t)}}}()}(ionic),function(t){"use strict";var e={};"undefined"==typeof exports?"function"==typeof define&&"object"==typeof define.amd&&define.amd?(e.exports={},define(function(){return e.exports})):e.exports="undefined"!=typeof window?window:t:e.exports=exports,function(t){if(!e)var e=1e-6;if(!n)var n="undefined"!=typeof Float32Array?Float32Array:Array;if(!i)var i=Math.random;var r={};r.setMatrixArrayType=function(t){n=t},"undefined"!=typeof t&&(t.glMatrix=r);var o=Math.PI/180;r.toRadian=function(t){return t*o};var a={};a.create=function(){var t=new n(2);return t[0]=0,t[1]=0,t},a.clone=function(t){var e=new n(2);return e[0]=t[0],e[1]=t[1],e},a.fromValues=function(t,e){var i=new n(2);return i[0]=t,i[1]=e,i},a.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},a.set=function(t,e,n){return t[0]=e,t[1]=n,t},a.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},a.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},a.sub=a.subtract,a.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},a.mul=a.multiply,a.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},a.div=a.divide,a.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},a.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},a.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},a.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},a.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return Math.sqrt(n*n+i*i)},a.dist=a.distance,a.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1];return n*n+i*i},a.sqrDist=a.squaredDistance,a.length=function(t){var e=t[0],n=t[1];return Math.sqrt(e*e+n*n)},a.len=a.length,a.squaredLength=function(t){var e=t[0],n=t[1];return e*e+n*n},a.sqrLen=a.squaredLength,a.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},a.normalize=function(t,e){var n=e[0],i=e[1],r=n*n+i*i;return r>0&&(r=1/Math.sqrt(r),t[0]=e[0]*r,t[1]=e[1]*r),t},a.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},a.cross=function(t,e,n){var i=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=i,t},a.lerp=function(t,e,n,i){var r=e[0],o=e[1];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t},a.random=function(t,e){e=e||1;var n=2*i()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},a.transformMat2=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r,t[1]=n[1]*i+n[3]*r,t},a.transformMat2d=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},a.transformMat3=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[3]*r+n[6],t[1]=n[1]*i+n[4]*r+n[7],t},a.transformMat4=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[4]*r+n[12],t[1]=n[1]*i+n[5]*r+n[13],t},a.forEach=function(){var t=a.create();return function(e,n,i,r,o,a){var s,c;for(n||(n=2),i||(i=0),c=r?Math.min(r*n+i,e.length):e.length,s=i;c>s;s+=n)t[0]=e[s],t[1]=e[s+1],o(t,t,a),e[s]=t[0],e[s+1]=t[1];return e}}(),a.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},"undefined"!=typeof t&&(t.vec2=a);var s={};s.create=function(){var t=new n(3);return t[0]=0,t[1]=0,t[2]=0,t},s.clone=function(t){var e=new n(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},s.fromValues=function(t,e,i){var r=new n(3);return r[0]=t,r[1]=e,r[2]=i,r},s.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},s.set=function(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t},s.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},s.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},s.sub=s.subtract,s.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t},s.mul=s.multiply,s.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t},s.div=s.divide,s.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},s.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},s.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},s.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t},s.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)},s.dist=s.distance,s.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r},s.sqrDist=s.squaredDistance,s.length=function(t){var e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)},s.len=s.length,s.squaredLength=function(t){var e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i},s.sqrLen=s.squaredLength,s.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},s.normalize=function(t,e){var n=e[0],i=e[1],r=e[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t},s.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},s.cross=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],c=n[2];return t[0]=r*c-o*s,t[1]=o*a-i*c,t[2]=i*s-r*a,t},s.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t},s.random=function(t,e){e=e||1;var n=2*i()*Math.PI,r=2*i()-1,o=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*o,t[1]=Math.sin(n)*o,t[2]=r*e,t},s.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12],t[1]=n[1]*i+n[5]*r+n[9]*o+n[13],t[2]=n[2]*i+n[6]*r+n[10]*o+n[14],t},s.transformMat3=function(t,e,n){var i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t},s.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],c=n[2],l=n[3],u=l*i+s*o-c*r,h=l*r+c*i-a*o,d=l*o+a*r-s*i,f=-a*i-s*r-c*o;return t[0]=u*l+f*-a+h*-c-d*-s,t[1]=h*l+f*-s+d*-a-u*-c,t[2]=d*l+f*-c+u*-s-h*-a,t},s.rotateX=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},s.rotateY=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},s.rotateZ=function(t,e,n,i){var r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},s.forEach=function(){var t=s.create();return function(e,n,i,r,o,a){var s,c;for(n||(n=3),i||(i=0),c=r?Math.min(r*n+i,e.length):e.length,s=i;c>s;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2];return e}}(),s.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},"undefined"!=typeof t&&(t.vec3=s);var c={};c.create=function(){var t=new n(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t},c.clone=function(t){var e=new n(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},c.fromValues=function(t,e,i,r){var o=new n(4);return o[0]=t,o[1]=e,o[2]=i,o[3]=r,o},c.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},c.set=function(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t},c.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t},c.subtract=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t},c.sub=c.subtract,c.multiply=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t[3]=e[3]*n[3],t},c.mul=c.multiply,c.divide=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t[3]=e[3]/n[3],t},c.div=c.divide,c.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t[3]=Math.min(e[3],n[3]),t},c.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t[3]=Math.max(e[3],n[3]),t},c.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t},c.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t[3]=e[3]+n[3]*i,t},c.distance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return Math.sqrt(n*n+i*i+r*r+o*o)},c.dist=c.distance,c.squaredDistance=function(t,e){var n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2],o=e[3]-t[3];return n*n+i*i+r*r+o*o},c.sqrDist=c.squaredDistance,c.length=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return Math.sqrt(e*e+n*n+i*i+r*r)},c.len=c.length,c.squaredLength=function(t){var e=t[0],n=t[1],i=t[2],r=t[3];return e*e+n*n+i*i+r*r},c.sqrLen=c.squaredLength,c.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t},c.normalize=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o;return a>0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t[3]=e[3]*a),t},c.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},c.lerp=function(t,e,n,i){var r=e[0],o=e[1],a=e[2],s=e[3];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=a+i*(n[2]-a),t[3]=s+i*(n[3]-s),t},c.random=function(t,e){return e=e||1,t[0]=i(),t[1]=i(),t[2]=i(),t[3]=i(),c.normalize(t,t),c.scale(t,t,e),t},c.transformMat4=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12]*a,t[1]=n[1]*i+n[5]*r+n[9]*o+n[13]*a,t[2]=n[2]*i+n[6]*r+n[10]*o+n[14]*a,t[3]=n[3]*i+n[7]*r+n[11]*o+n[15]*a,t},c.transformQuat=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=n[0],s=n[1],c=n[2],l=n[3],u=l*i+s*o-c*r,h=l*r+c*i-a*o,d=l*o+a*r-s*i,f=-a*i-s*r-c*o;return t[0]=u*l+f*-a+h*-c-d*-s,t[1]=h*l+f*-s+d*-a-u*-c,t[2]=d*l+f*-c+u*-s-h*-a,t},c.forEach=function(){var t=c.create();return function(e,n,i,r,o,a){var s,c;for(n||(n=4),i||(i=0),c=r?Math.min(r*n+i,e.length):e.length,s=i;c>s;s+=n)t[0]=e[s],t[1]=e[s+1],t[2]=e[s+2],t[3]=e[s+3],o(t,t,a),e[s]=t[0],e[s+1]=t[1],e[s+2]=t[2],e[s+3]=t[3];return e}}(),c.str=function(t){return"vec4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},"undefined"!=typeof t&&(t.vec4=c);var l={};l.create=function(){var t=new n(4);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},l.clone=function(t){var e=new n(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e},l.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t},l.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t},l.transpose=function(t,e){if(t===e){var n=e[1];t[1]=e[2],t[2]=n}else t[0]=e[0],t[1]=e[2],t[2]=e[1],t[3]=e[3];return t},l.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*o-r*i;return a?(a=1/a,t[0]=o*a,t[1]=-i*a,t[2]=-r*a,t[3]=n*a,t):null},l.adjoint=function(t,e){var n=e[0];return t[0]=e[3],t[1]=-e[1],t[2]=-e[2],t[3]=n,t},l.determinant=function(t){return t[0]*t[3]-t[2]*t[1]},l.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],c=n[1],l=n[2],u=n[3];return t[0]=i*s+o*c,t[1]=r*s+a*c,t[2]=i*l+o*u,t[3]=r*l+a*u,t},l.mul=l.multiply,l.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=i*c+o*s,t[1]=r*c+a*s,t[2]=i*-s+o*c,t[3]=r*-s+a*c,t},l.scale=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],c=n[1];return t[0]=i*s,t[1]=r*s,t[2]=o*c,t[3]=a*c,t},l.str=function(t){return"mat2("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},l.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2))},l.LDU=function(t,e,n,i){return t[2]=i[2]/i[0],n[0]=i[0],n[1]=i[1],n[3]=i[3]-t[2]*n[1],[t,e,n]},"undefined"!=typeof t&&(t.mat2=l);var u={};u.create=function(){var t=new n(6);return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},u.clone=function(t){var e=new n(6);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e},u.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},u.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t},u.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=n*o-i*r;return c?(c=1/c,t[0]=o*c,t[1]=-i*c,t[2]=-r*c,t[3]=n*c,t[4]=(r*s-o*a)*c,t[5]=(i*a-n*s)*c,t):null},u.determinant=function(t){return t[0]*t[3]-t[1]*t[2]},u.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=n[0],u=n[1],h=n[2],d=n[3],f=n[4],_=n[5];return t[0]=i*l+o*u,t[1]=r*l+a*u,t[2]=i*h+o*d,t[3]=r*h+a*d,t[4]=i*f+o*_+s,t[5]=r*f+a*_+c,t},u.mul=u.multiply,u.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=Math.sin(n),u=Math.cos(n);return t[0]=i*u+o*l,t[1]=r*u+a*l,t[2]=i*-l+o*u,t[3]=r*-l+a*u,t[4]=s,t[5]=c,t},u.scale=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=n[0],u=n[1];return t[0]=i*l,t[1]=r*l,t[2]=o*u,t[3]=a*u,t[4]=s,t[5]=c,t},u.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=n[0],u=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=i*l+o*u+s,t[5]=r*l+a*u+c,t},u.str=function(t){return"mat2d("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+")"},u.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+1)},"undefined"!=typeof t&&(t.mat2d=u);var h={};h.create=function(){var t=new n(9);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},h.fromMat4=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t},h.clone=function(t){var e=new n(9);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e},h.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},h.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},h.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=i,t[7]=r
}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},h.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=u*a-s*l,d=-u*o+s*c,f=l*o-a*c,_=n*h+i*d+r*f;return _?(_=1/_,t[0]=h*_,t[1]=(-u*i+r*l)*_,t[2]=(s*i-r*a)*_,t[3]=d*_,t[4]=(u*n-r*c)*_,t[5]=(-s*n+r*o)*_,t[6]=f*_,t[7]=(-l*n+i*c)*_,t[8]=(a*n-i*o)*_,t):null},h.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8];return t[0]=a*u-s*l,t[1]=r*l-i*u,t[2]=i*s-r*a,t[3]=s*c-o*u,t[4]=n*u-r*c,t[5]=r*o-n*s,t[6]=o*l-a*c,t[7]=i*c-n*l,t[8]=n*a-i*o,t},h.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],c=t[7],l=t[8];return e*(l*o-a*c)+n*(-l*r+a*s)+i*(c*r-o*s)},h.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=e[8],d=n[0],f=n[1],_=n[2],p=n[3],g=n[4],m=n[5],v=n[6],T=n[7],E=n[8];return t[0]=d*i+f*a+_*l,t[1]=d*r+f*s+_*u,t[2]=d*o+f*c+_*h,t[3]=p*i+g*a+m*l,t[4]=p*r+g*s+m*u,t[5]=p*o+g*c+m*h,t[6]=v*i+T*a+E*l,t[7]=v*r+T*s+E*u,t[8]=v*o+T*c+E*h,t},h.mul=h.multiply,h.translate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=e[8],d=n[0],f=n[1];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=d*i+f*a+l,t[7]=d*r+f*s+u,t[8]=d*o+f*c+h,t},h.rotate=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=e[8],d=Math.sin(n),f=Math.cos(n);return t[0]=f*i+d*a,t[1]=f*r+d*s,t[2]=f*o+d*c,t[3]=f*a-d*i,t[4]=f*s-d*r,t[5]=f*c-d*o,t[6]=l,t[7]=u,t[8]=h,t},h.scale=function(t,e,n){var i=n[0],r=n[1];return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=r*e[3],t[4]=r*e[4],t[5]=r*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},h.fromMat2d=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},h.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,c=r+r,l=n*a,u=i*a,h=i*s,d=r*a,f=r*s,_=r*c,p=o*a,g=o*s,m=o*c;return t[0]=1-h-_,t[3]=u-m,t[6]=d+g,t[1]=u+m,t[4]=1-l-_,t[7]=f-p,t[2]=d-g,t[5]=f+p,t[8]=1-l-h,t},h.normalFromMat4=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=e[9],d=e[10],f=e[11],_=e[12],p=e[13],g=e[14],m=e[15],v=n*s-i*a,T=n*c-r*a,E=n*l-o*a,w=i*c-r*s,y=i*l-o*s,S=r*l-o*c,b=u*p-h*_,M=u*g-d*_,D=u*m-f*_,x=h*g-d*p,L=h*m-f*p,A=d*m-f*g,O=v*A-T*L+E*x+w*D-y*M+S*b;return O?(O=1/O,t[0]=(s*A-c*L+l*x)*O,t[1]=(c*D-a*A-l*M)*O,t[2]=(a*L-s*D+l*b)*O,t[3]=(r*L-i*A-o*x)*O,t[4]=(n*A-r*D+o*M)*O,t[5]=(i*D-n*L-o*b)*O,t[6]=(p*S-g*y+m*w)*O,t[7]=(g*E-_*S-m*T)*O,t[8]=(_*y-p*E+m*v)*O,t):null},h.str=function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},h.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2))},"undefined"!=typeof t&&(t.mat3=h);var d={};d.create=function(){var t=new n(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},d.clone=function(t){var e=new n(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},d.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},d.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},d.transpose=function(t,e){if(t===e){var n=e[1],i=e[2],r=e[3],o=e[6],a=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=o,t[11]=e[14],t[12]=r,t[13]=a,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},d.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=e[9],d=e[10],f=e[11],_=e[12],p=e[13],g=e[14],m=e[15],v=n*s-i*a,T=n*c-r*a,E=n*l-o*a,w=i*c-r*s,y=i*l-o*s,S=r*l-o*c,b=u*p-h*_,M=u*g-d*_,D=u*m-f*_,x=h*g-d*p,L=h*m-f*p,A=d*m-f*g,O=v*A-T*L+E*x+w*D-y*M+S*b;return O?(O=1/O,t[0]=(s*A-c*L+l*x)*O,t[1]=(r*L-i*A-o*x)*O,t[2]=(p*S-g*y+m*w)*O,t[3]=(d*y-h*S-f*w)*O,t[4]=(c*D-a*A-l*M)*O,t[5]=(n*A-r*D+o*M)*O,t[6]=(g*E-_*S-m*T)*O,t[7]=(u*S-d*E+f*T)*O,t[8]=(a*L-s*D+l*b)*O,t[9]=(i*D-n*L-o*b)*O,t[10]=(_*y-p*E+m*v)*O,t[11]=(h*E-u*y-f*v)*O,t[12]=(s*M-a*x-c*b)*O,t[13]=(n*x-i*M+r*b)*O,t[14]=(p*T-_*w-g*v)*O,t[15]=(u*w-h*T+d*v)*O,t):null},d.adjoint=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],c=e[6],l=e[7],u=e[8],h=e[9],d=e[10],f=e[11],_=e[12],p=e[13],g=e[14],m=e[15];return t[0]=s*(d*m-f*g)-h*(c*m-l*g)+p*(c*f-l*d),t[1]=-(i*(d*m-f*g)-h*(r*m-o*g)+p*(r*f-o*d)),t[2]=i*(c*m-l*g)-s*(r*m-o*g)+p*(r*l-o*c),t[3]=-(i*(c*f-l*d)-s*(r*f-o*d)+h*(r*l-o*c)),t[4]=-(a*(d*m-f*g)-u*(c*m-l*g)+_*(c*f-l*d)),t[5]=n*(d*m-f*g)-u*(r*m-o*g)+_*(r*f-o*d),t[6]=-(n*(c*m-l*g)-a*(r*m-o*g)+_*(r*l-o*c)),t[7]=n*(c*f-l*d)-a*(r*f-o*d)+u*(r*l-o*c),t[8]=a*(h*m-f*p)-u*(s*m-l*p)+_*(s*f-l*h),t[9]=-(n*(h*m-f*p)-u*(i*m-o*p)+_*(i*f-o*h)),t[10]=n*(s*m-l*p)-a*(i*m-o*p)+_*(i*l-o*s),t[11]=-(n*(s*f-l*h)-a*(i*f-o*h)+u*(i*l-o*s)),t[12]=-(a*(h*g-d*p)-u*(s*g-c*p)+_*(s*d-c*h)),t[13]=n*(h*g-d*p)-u*(i*g-r*p)+_*(i*d-r*h),t[14]=-(n*(s*g-c*p)-a*(i*g-r*p)+_*(i*c-r*s)),t[15]=n*(s*d-c*h)-a*(i*d-r*h)+u*(i*c-r*s),t},d.determinant=function(t){var e=t[0],n=t[1],i=t[2],r=t[3],o=t[4],a=t[5],s=t[6],c=t[7],l=t[8],u=t[9],h=t[10],d=t[11],f=t[12],_=t[13],p=t[14],g=t[15],m=e*a-n*o,v=e*s-i*o,T=e*c-r*o,E=n*s-i*a,w=n*c-r*a,y=i*c-r*s,S=l*_-u*f,b=l*p-h*f,M=l*g-d*f,D=u*p-h*_,x=u*g-d*_,L=h*g-d*p;return m*L-v*x+T*D+E*M-w*b+y*S},d.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=e[8],d=e[9],f=e[10],_=e[11],p=e[12],g=e[13],m=e[14],v=e[15],T=n[0],E=n[1],w=n[2],y=n[3];return t[0]=T*i+E*s+w*h+y*p,t[1]=T*r+E*c+w*d+y*g,t[2]=T*o+E*l+w*f+y*m,t[3]=T*a+E*u+w*_+y*v,T=n[4],E=n[5],w=n[6],y=n[7],t[4]=T*i+E*s+w*h+y*p,t[5]=T*r+E*c+w*d+y*g,t[6]=T*o+E*l+w*f+y*m,t[7]=T*a+E*u+w*_+y*v,T=n[8],E=n[9],w=n[10],y=n[11],t[8]=T*i+E*s+w*h+y*p,t[9]=T*r+E*c+w*d+y*g,t[10]=T*o+E*l+w*f+y*m,t[11]=T*a+E*u+w*_+y*v,T=n[12],E=n[13],w=n[14],y=n[15],t[12]=T*i+E*s+w*h+y*p,t[13]=T*r+E*c+w*d+y*g,t[14]=T*o+E*l+w*f+y*m,t[15]=T*a+E*u+w*_+y*v,t},d.mul=d.multiply,d.translate=function(t,e,n){var i,r,o,a,s,c,l,u,h,d,f,_,p=n[0],g=n[1],m=n[2];return e===t?(t[12]=e[0]*p+e[4]*g+e[8]*m+e[12],t[13]=e[1]*p+e[5]*g+e[9]*m+e[13],t[14]=e[2]*p+e[6]*g+e[10]*m+e[14],t[15]=e[3]*p+e[7]*g+e[11]*m+e[15]):(i=e[0],r=e[1],o=e[2],a=e[3],s=e[4],c=e[5],l=e[6],u=e[7],h=e[8],d=e[9],f=e[10],_=e[11],t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=c,t[6]=l,t[7]=u,t[8]=h,t[9]=d,t[10]=f,t[11]=_,t[12]=i*p+s*g+h*m+e[12],t[13]=r*p+c*g+d*m+e[13],t[14]=o*p+l*g+f*m+e[14],t[15]=a*p+u*g+_*m+e[15]),t},d.scale=function(t,e,n){var i=n[0],r=n[1],o=n[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},d.rotate=function(t,n,i,r){var o,a,s,c,l,u,h,d,f,_,p,g,m,v,T,E,w,y,S,b,M,D,x,L,A=r[0],O=r[1],I=r[2],G=Math.sqrt(A*A+O*O+I*I);return Math.abs(G)<e?null:(G=1/G,A*=G,O*=G,I*=G,o=Math.sin(i),a=Math.cos(i),s=1-a,c=n[0],l=n[1],u=n[2],h=n[3],d=n[4],f=n[5],_=n[6],p=n[7],g=n[8],m=n[9],v=n[10],T=n[11],E=A*A*s+a,w=O*A*s+I*o,y=I*A*s-O*o,S=A*O*s-I*o,b=O*O*s+a,M=I*O*s+A*o,D=A*I*s+O*o,x=O*I*s-A*o,L=I*I*s+a,t[0]=c*E+d*w+g*y,t[1]=l*E+f*w+m*y,t[2]=u*E+_*w+v*y,t[3]=h*E+p*w+T*y,t[4]=c*S+d*b+g*M,t[5]=l*S+f*b+m*M,t[6]=u*S+_*b+v*M,t[7]=h*S+p*b+T*M,t[8]=c*D+d*x+g*L,t[9]=l*D+f*x+m*L,t[10]=u*D+_*x+v*L,t[11]=h*D+p*x+T*L,n!==t&&(t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15]),t)},d.rotateX=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[4],a=e[5],s=e[6],c=e[7],l=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*r+l*i,t[5]=a*r+u*i,t[6]=s*r+h*i,t[7]=c*r+d*i,t[8]=l*r-o*i,t[9]=u*r-a*i,t[10]=h*r-s*i,t[11]=d*r-c*i,t},d.rotateY=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],l=e[8],u=e[9],h=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*r-l*i,t[1]=a*r-u*i,t[2]=s*r-h*i,t[3]=c*r-d*i,t[8]=o*i+l*r,t[9]=a*i+u*r,t[10]=s*i+h*r,t[11]=c*i+d*r,t},d.rotateZ=function(t,e,n){var i=Math.sin(n),r=Math.cos(n),o=e[0],a=e[1],s=e[2],c=e[3],l=e[4],u=e[5],h=e[6],d=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*r+l*i,t[1]=a*r+u*i,t[2]=s*r+h*i,t[3]=c*r+d*i,t[4]=l*r-o*i,t[5]=u*r-a*i,t[6]=h*r-s*i,t[7]=d*r-c*i,t},d.fromRotationTranslation=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=i+i,c=r+r,l=o+o,u=i*s,h=i*c,d=i*l,f=r*c,_=r*l,p=o*l,g=a*s,m=a*c,v=a*l;return t[0]=1-(f+p),t[1]=h+v,t[2]=d-m,t[3]=0,t[4]=h-v,t[5]=1-(u+p),t[6]=_+g,t[7]=0,t[8]=d+m,t[9]=_-g,t[10]=1-(u+f),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t},d.fromQuat=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n+n,s=i+i,c=r+r,l=n*a,u=i*a,h=i*s,d=r*a,f=r*s,_=r*c,p=o*a,g=o*s,m=o*c;return t[0]=1-h-_,t[1]=u+m,t[2]=d-g,t[3]=0,t[4]=u-m,t[5]=1-l-_,t[6]=f+p,t[7]=0,t[8]=d+g,t[9]=f-p,t[10]=1-l-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},d.frustum=function(t,e,n,i,r,o,a){var s=1/(n-e),c=1/(r-i),l=1/(o-a);return t[0]=2*o*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*c,t[6]=0,t[7]=0,t[8]=(n+e)*s,t[9]=(r+i)*c,t[10]=(a+o)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=a*o*2*l,t[15]=0,t},d.perspective=function(t,e,n,i,r){var o=1/Math.tan(e/2),a=1/(i-r);return t[0]=o/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=o,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(r+i)*a,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*r*i*a,t[15]=0,t},d.ortho=function(t,e,n,i,r,o,a){var s=1/(e-n),c=1/(i-r),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*c,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*s,t[13]=(r+i)*c,t[14]=(a+o)*l,t[15]=1,t},d.lookAt=function(t,n,i,r){var o,a,s,c,l,u,h,f,_,p,g=n[0],m=n[1],v=n[2],T=r[0],E=r[1],w=r[2],y=i[0],S=i[1],b=i[2];return Math.abs(g-y)<e&&Math.abs(m-S)<e&&Math.abs(v-b)<e?d.identity(t):(h=g-y,f=m-S,_=v-b,p=1/Math.sqrt(h*h+f*f+_*_),h*=p,f*=p,_*=p,o=E*_-w*f,a=w*h-T*_,s=T*f-E*h,p=Math.sqrt(o*o+a*a+s*s),p?(p=1/p,o*=p,a*=p,s*=p):(o=0,a=0,s=0),c=f*s-_*a,l=_*o-h*s,u=h*a-f*o,p=Math.sqrt(c*c+l*l+u*u),p?(p=1/p,c*=p,l*=p,u*=p):(c=0,l=0,u=0),t[0]=o,t[1]=c,t[2]=h,t[3]=0,t[4]=a,t[5]=l,t[6]=f,t[7]=0,t[8]=s,t[9]=u,t[10]=_,t[11]=0,t[12]=-(o*g+a*m+s*v),t[13]=-(c*g+l*m+u*v),t[14]=-(h*g+f*m+_*v),t[15]=1,t)},d.str=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},d.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},"undefined"!=typeof t&&(t.mat4=d);var f={};f.create=function(){var t=new n(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},f.rotationTo=function(){var t=s.create(),e=s.fromValues(1,0,0),n=s.fromValues(0,1,0);return function(i,r,o){var a=s.dot(r,o);return-.999999>a?(s.cross(t,e,r),s.length(t)<1e-6&&s.cross(t,n,r),s.normalize(t,t),f.setAxisAngle(i,t,Math.PI),i):a>.999999?(i[0]=0,i[1]=0,i[2]=0,i[3]=1,i):(s.cross(t,r,o),i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=1+a,f.normalize(i,i))}}(),f.setAxes=function(){var t=h.create();return function(e,n,i,r){return t[0]=i[0],t[3]=i[1],t[6]=i[2],t[1]=r[0],t[4]=r[1],t[7]=r[2],t[2]=-n[0],t[5]=-n[1],t[8]=-n[2],f.normalize(e,f.fromMat3(e,t))}}(),f.clone=c.clone,f.fromValues=c.fromValues,f.copy=c.copy,f.set=c.set,f.identity=function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},f.setAxisAngle=function(t,e,n){n=.5*n;var i=Math.sin(n);return t[0]=i*e[0],t[1]=i*e[1],t[2]=i*e[2],t[3]=Math.cos(n),t},f.add=c.add,f.multiply=function(t,e,n){var i=e[0],r=e[1],o=e[2],a=e[3],s=n[0],c=n[1],l=n[2],u=n[3];return t[0]=i*u+a*s+r*l-o*c,t[1]=r*u+a*c+o*s-i*l,t[2]=o*u+a*l+i*c-r*s,t[3]=a*u-i*s-r*c-o*l,t},f.mul=f.multiply,f.scale=c.scale,f.rotateX=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=i*c+a*s,t[1]=r*c+o*s,t[2]=o*c-r*s,t[3]=a*c-i*s,t},f.rotateY=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=i*c-o*s,t[1]=r*c+a*s,t[2]=o*c+i*s,t[3]=a*c-r*s,t},f.rotateZ=function(t,e,n){n*=.5;var i=e[0],r=e[1],o=e[2],a=e[3],s=Math.sin(n),c=Math.cos(n);return t[0]=i*c+r*s,t[1]=r*c-i*s,t[2]=o*c+a*s,t[3]=a*c-o*s,t},f.calculateW=function(t,e){var n=e[0],i=e[1],r=e[2];return t[0]=n,t[1]=i,t[2]=r,t[3]=-Math.sqrt(Math.abs(1-n*n-i*i-r*r)),t},f.dot=c.dot,f.lerp=c.lerp,f.slerp=function(t,e,n,i){var r,o,a,s,c,l=e[0],u=e[1],h=e[2],d=e[3],f=n[0],_=n[1],p=n[2],g=n[3];return o=l*f+u*_+h*p+d*g,0>o&&(o=-o,f=-f,_=-_,p=-p,g=-g),1-o>1e-6?(r=Math.acos(o),a=Math.sin(r),s=Math.sin((1-i)*r)/a,c=Math.sin(i*r)/a):(s=1-i,c=i),t[0]=s*l+c*f,t[1]=s*u+c*_,t[2]=s*h+c*p,t[3]=s*d+c*g,t},f.invert=function(t,e){var n=e[0],i=e[1],r=e[2],o=e[3],a=n*n+i*i+r*r+o*o,s=a?1/a:0;return t[0]=-n*s,t[1]=-i*s,t[2]=-r*s,t[3]=o*s,t},f.conjugate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},f.length=c.length,f.len=f.length,f.squaredLength=c.squaredLength,f.sqrLen=f.squaredLength,f.normalize=c.normalize,f.fromMat3=function(t,e){var n,i=e[0]+e[4]+e[8];if(i>0)n=Math.sqrt(i+1),t[3]=.5*n,n=.5/n,t[0]=(e[7]-e[5])*n,t[1]=(e[2]-e[6])*n,t[2]=(e[3]-e[1])*n;else{var r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);var o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*a+o]-e[3*o+a])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t},f.str=function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},"undefined"!=typeof t&&(t.quat=f)}(e.exports)}(this),function(){ionic.Animation=ionic.Animation||{},ionic.Animation.TimingFn={linear:function(t){return function(e){return ionic.Animation.Bezier.linear(e,t)}},ease:function(t){return function(e){return ionic.Animation.Bezier.ease(e,t)}},"ease-in":function(t){return function(e){return ionic.Animation.Bezier.easeIn(e,t)}},"ease-out":function(t){return function(e){return ionic.Animation.Bezier.easeOut(e,t)}},"ease-in-out":function(t){return function(e){return ionic.Animation.Bezier.easeInOut(e,t)}}}}(window)}();