function FastClick(t,e){"use strict";var i;if(e=e||{},this.trackingClick=!1,this.trackingClickStart=0,this.targetElement=null,this.touchStartX=0,this.touchStartY=0,this.lastTouchIdentifier=0,this.touchBoundary=e.touchBoundary||10,this.layer=t,this.tapDelay=e.tapDelay||200,!FastClick.notNeeded(t)){for(var n=["onMouse","onClick","onTouchStart","onTouchMove","onTouchEnd","onTouchCancel"],o=0,s=n.length;o0,deviceIsIOS=/iP(ad|hone|od)/.test(navigator.userAgent),deviceIsIOS4=deviceIsIOS&&/OS 4_\d(_\d)?/.test(navigator.userAgent),deviceIsIOSWithBadTarget=deviceIsIOS&&/OS ([6-9]|\d{2})_\d/.test(navigator.userAgent);FastClick.prototype.needsClick=function(t){"use strict";switch(t.nodeName.toLowerCase()){case"button":case"select":case"textarea":if(t.disabled)return!0;break;case"input":if(deviceIsIOS&&"file"===t.type||t.disabled)return!0;break;case"label":case"video":return!0}return/\bneedsclick\b/.test(t.className)},FastClick.prototype.needsFocus=function(t){"use strict";switch(t.nodeName.toLowerCase()){case"textarea":return!0;case"select":return!deviceIsAndroid;case"input":switch(t.type){case"button":case"checkbox":case"file":case"image":case"radio":case"submit":return!1}return!t.disabled&&!t.readOnly;default:return/\bneedsfocus\b/.test(t.className)}},FastClick.prototype.sendClick=function(t,e){"use strict";var i,n;document.activeElement&&document.activeElement!==t&&document.activeElement.blur(),n=e.changedTouches[0],(i=document.createEvent("MouseEvents")).initMouseEvent(this.determineEventType(t),!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),i.forwardedTouchEvent=!0,t.dispatchEvent(i)},FastClick.prototype.determineEventType=function(t){"use strict";return deviceIsAndroid&&"select"===t.tagName.toLowerCase()?"mousedown":"click"},FastClick.prototype.focus=function(t){"use strict";var e;deviceIsIOS&&t.setSelectionRange&&0!==t.type.indexOf("date")&&"time"!==t.type?(e=t.value.length,t.setSelectionRange(e,e)):t.focus()},FastClick.prototype.updateScrollParent=function(t){"use strict";var e,i;if(!(e=t.fastClickScrollParent)||!e.contains(t)){i=t;do{if(i.scrollHeight>i.offsetHeight){e=i,t.fastClickScrollParent=i;break}i=i.parentElement}while(i)}e&&(e.fastClickLastScrollTop=e.scrollTop)},FastClick.prototype.getTargetElementFromEventTarget=function(t){"use strict";return t.nodeType===Node.TEXT_NODE?t.parentNode:t},FastClick.prototype.onTouchStart=function(t){"use strict";var e,i,n;if(t.targetTouches.length>1)return!0;if(e=this.getTargetElementFromEventTarget(t.target),i=t.targetTouches[0],deviceIsIOS){if((n=window.getSelection()).rangeCount&&!n.isCollapsed)return!0;if(!deviceIsIOS4){if(i.identifier===this.lastTouchIdentifier)return t.preventDefault(),!1;this.lastTouchIdentifier=i.identifier,this.updateScrollParent(e)}}return this.trackingClick=!0,this.trackingClickStart=t.timeStamp,this.targetElement=e,this.touchStartX=i.pageX,this.touchStartY=i.pageY,t.timeStamp-this.lastClickTimei||Math.abs(e.pageY-this.touchStartY)>i},FastClick.prototype.onTouchMove=function(t){"use strict";return!this.trackingClick||((this.targetElement!==this.getTargetElementFromEventTarget(t.target)||this.touchHasMoved(t))&&(this.trackingClick=!1,this.targetElement=null),!0)},FastClick.prototype.findControl=function(t){"use strict";return void 0!==t.control?t.control:t.htmlFor?document.getElementById(t.htmlFor):t.querySelector("button, input:not([type=hidden]), keygen, meter, output, progress, select, textarea")},FastClick.prototype.onTouchEnd=function(t){"use strict";var e,i,n,o,s,r=this.targetElement;if(!this.trackingClick)return!0;if(t.timeStamp-this.lastClickTime100||deviceIsIOS&&window.top!==window&&"input"===n?(this.targetElement=null,!1):(this.focus(r),this.sendClick(r,t),deviceIsIOS&&"select"===n||(this.targetElement=null,t.preventDefault()),!1);return!(!deviceIsIOS||deviceIsIOS4||!(o=r.fastClickScrollParent)||o.fastClickLastScrollTop===o.scrollTop)||(this.needsClick(r)||(t.preventDefault(),this.sendClick(r,t)),!1)},FastClick.prototype.onTouchCancel=function(){"use strict";this.trackingClick=!1,this.targetElement=null},FastClick.prototype.onMouse=function(t){"use strict";return!this.targetElement||(!!t.forwardedTouchEvent||(!t.cancelable||(!(!this.needsClick(this.targetElement)||this.cancelNextClick)||(t.stopImmediatePropagation?t.stopImmediatePropagation():t.propagationStopped=!0,t.stopPropagation(),t.preventDefault(),!1))))},FastClick.prototype.onClick=function(t){"use strict";var e;return this.trackingClick?(this.targetElement=null,this.trackingClick=!1,!0):"submit"===t.target.type&&0===t.detail||((e=this.onMouse(t))||(this.targetElement=null),e)},FastClick.prototype.destroy=function(){"use strict";var t=this.layer;deviceIsAndroid&&(t.removeEventListener("mouseover",this.onMouse,!0),t.removeEventListener("mousedown",this.onMouse,!0),t.removeEventListener("mouseup",this.onMouse,!0)),t.removeEventListener("click",this.onClick,!0),t.removeEventListener("touchstart",this.onTouchStart,!1),t.removeEventListener("touchmove",this.onTouchMove,!1),t.removeEventListener("touchend",this.onTouchEnd,!1),t.removeEventListener("touchcancel",this.onTouchCancel,!1)},FastClick.notNeeded=function(t){"use strict";var e,i;if(void 0===window.ontouchstart)return!0;if(i=+(/Chrome\/([0-9]+)/.exec(navigator.userAgent)||[,0])[1]){if(!deviceIsAndroid)return!0;if(e=document.querySelector("meta[name=viewport]")){if(-1!==e.content.indexOf("user-scalable=no"))return!0;if(i>31&&document.documentElement.scrollWidth<=window.outerWidth)return!0}}return"none"===t.style.msTouchAction},FastClick.attach=function(t,e){"use strict";return new FastClick(t,e)},"undefined"!=typeof define&&define.amd?define(function(){"use strict";return FastClick}):"undefined"!=typeof module&&module.exports?(module.exports=FastClick.attach,module.exports.FastClick=FastClick):window.FastClick=FastClick;var activeElement,framerate=150,animtime=600,stepsize=90,pulseAlgorithm=!0,pulseScale=8,pulseNormalize=1,acceleration=!0,accelDelta=10,accelMax=1,keyboardsupport=!0,disableKeyboard=!1,arrowscroll=50,exclude="",disabled=!1,frame=!1,direction={x:0,y:0},initdone=!1,fixedback=!0,root=document.documentElement,key={left:37,up:38,right:39,down:40,spacebar:32,pageup:33,pagedown:34,end:35,home:36};function init(){if(document.body){var e=document.body,t=document.documentElement,a=window.innerHeight,n=e.scrollHeight;if(root=document.compatMode.indexOf("CSS")>=0?t:e,activeElement=e,initdone=!0,top!=self)frame=!0;else if(n>a&&(e.offsetHeight<=a||t.offsetHeight<=a)){var o=!1,r=function(){o||t.scrollHeight==document.height||(o=!0,setTimeout(function(){t.style.height=document.height+"px",o=!1},500))};if(t.style.height="",setTimeout(r,10),addEvent("DOMNodeInserted",r),addEvent("DOMNodeRemoved",r),root.offsetHeight<=a){var i=document.createElement("div");i.style.clear="both",e.appendChild(i)}}if(document.URL.indexOf("mail.google.com")>-1){var l=document.createElement("style");l.innerHTML=".iu { visibility: hidden }",(document.getElementsByTagName("head")[0]||t).appendChild(l)}fixedback||disabled||(e.style.backgroundAttachment="scroll",t.style.backgroundAttachment="scroll")}}var que=[],pending=!1,lastScroll=+new Date;function scrollArray(e,t,a,n){if(n||(n=1e3),directionCheck(t,a),acceleration){var o=+new Date-lastScroll;if(o1&&(r=Math.min(r,accelMax),t*=r,a*=r)}lastScroll=+new Date}if(que.push({x:t,y:a,lastX:t<0?.99:-.99,lastY:a<0?.99:-.99,start:+new Date}),!pending){var i=e===document.body,l=function(){for(var o=+new Date,r=0,c=0,s=0;s=animtime,f=m?1:u/animtime;pulseAlgorithm&&(f=pulse(f));var h=d.x*f-d.lastX>>0,p=d.y*f-d.lastY>>0;r+=h,c+=p,d.lastX+=h,d.lastY+=p,m&&(que.splice(s,1),s--)}i?window.scrollBy(r,c):(r&&(e.scrollLeft+=r),c&&(e.scrollTop+=c)),t||a||(que=[]),que.length?requestFrame(l,e,n/framerate+1):pending=!1};requestFrame(l,e,0),pending=!0}}function wheel(e){initdone||init();var t=e.target,a=overflowingAncestor(t);if(!a||e.defaultPrevented||isNodeName(activeElement,"embed")||isNodeName(t,"embed")&&/\.pdf/i.test(t.src))return!0;var n=e.wheelDeltaX||0,o=e.wheelDeltaY||0;n||o||(o=e.wheelDelta||0),Math.abs(n)>1.2&&(n*=stepsize/120),Math.abs(o)>1.2&&(o*=stepsize/120),scrollArray(a,-n,-o),e.preventDefault()}function keydown(e){var t=e.target,a=e.ctrlKey||e.altKey||e.metaKey||e.shiftKey&&e.keyCode!==key.spacebar;if(/input|textarea|select|embed/i.test(t.nodeName)||t.isContentEditable||e.defaultPrevented||a)return!0;if(isNodeName(t,"button")&&e.keyCode===key.spacebar)return!0;var n=0,o=0,r=overflowingAncestor(activeElement),i=r.clientHeight;switch(r==document.body&&(i=window.innerHeight),e.keyCode){case key.up:o=-arrowscroll;break;case key.down:o=arrowscroll;break;case key.spacebar:o=-(e.shiftKey?1:-1)*i*.9;break;case key.pageup:o=.9*-i;break;case key.pagedown:o=.9*i;break;case key.home:o=-r.scrollTop;break;case key.end:var l=r.scrollHeight-r.scrollTop-i;o=l>0?l+10:0;break;case key.left:n=-arrowscroll;break;case key.right:n=arrowscroll;break;default:return!0}scrollArray(r,n,o),e.preventDefault()}function mousedown(e){activeElement=e.target}var cache={};setInterval(function(){cache={}},1e4);var uniqueID=function(){var e=0;return function(t){return t.uniqueID||(t.uniqueID=e++)}}();function setCache(e,t){for(var a=e.length;a--;)cache[uniqueID(e[a])]=t;return t}function overflowingAncestor(e){var t=[],a=root.scrollHeight;do{var n=cache[uniqueID(e)];if(n)return setCache(t,n);if(t.push(e),a===e.scrollHeight){if(!frame||root.clientHeight+100?1:-1,t=t>0?1:-1,direction.x===e&&direction.y===t||(direction.x=e,direction.y=t,que=[],lastScroll=0)}var requestFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e,t,a){window.setTimeout(e,a||1e3/60)};function pulse_(e){var t,a;return(e*=pulseScale)<1?t=e-(1-Math.exp(-e)):(e-=1,t=(a=Math.exp(-1))+(1-Math.exp(-e))*(1-a)),t*pulseNormalize}function pulse(e){return e>=1?1:e<=0?0:(1==pulseNormalize&&(pulseNormalize/=pulse_(1)),pulse_(e))}addEvent("mousedown",mousedown),addEvent("mousewheel",wheel),addEvent("load",init);