{"version":3,"sources":["../node_modules/browser-pack/_prelude.js","../modules/carousel/carousel.js","../scripts/src/main.js","../scripts/src/lib/page-modules.js","../node_modules/flickity/js/index.js","../node_modules/flickity/js/player.js","../node_modules/flickity/js/drag.js","../node_modules/flickity/js/page-dots.js","../node_modules/flickity/js/flickity.js","../node_modules/flickity/js/prev-next-button.js","../node_modules/flickity/js/add-remove-cell.js","../node_modules/flickity/js/lazyload.js","../node_modules/flickity/js/cell.js","../node_modules/flickity/js/animate.js","../node_modules/wolfy87-eventemitter/EventEmitter.js","../node_modules/eventie/eventie.js","../node_modules/fizzy-ui-utils/utils.js","../node_modules/unidragger/unidragger.js","../node_modules/tap-listener/tap-listener.js","../node_modules/get-size/get-size.js","../node_modules/desandro-classie/classie.js","../node_modules/desandro-get-style-property/get-style-property.js","../node_modules/doc-ready/doc-ready.js","../node_modules/desandro-matches-selector/matches-selector.js","../node_modules/unipointer/unipointer.js"],"names":["Carousel","element","this","el","flickity","Flickity","require","module","exports","PageModules","window","onload","modules","document","querySelectorAll","i","length","name","getAttribute","Module","e","factory","define","amd","EventEmitter","eventie","Player","parent","isPlaying","visibilityEvent","_this","onVisibilityChange","visibilityChange","hiddenProperty","prototype","play","isPaused","addEventListener","tick","tickTime","Date","time","options","autoPlay","timeout","setTimeout","next","stop","clear","removeEventListener","clearTimeout","pause","unpause","isHidden","createMethods","push","_createPlayer","player","on","activatePlayer","stopPlayer","deactivatePlayer","bind","isMouseenterBound","unbind","onmouseenter","onmouseleave","classie","Unidragger","utils","fizzyUIUtils","preventDefaultEvent","event","preventDefault","returnValue","getPointerWindowY","pointer","pointerPoint","getPointerPoint","y","pageYOffset","extend","defaults","draggable","touchVerticalScroll","_createDrag","bindDrag","_uiChangeDrag","_childUIPointerDownDrag","unbindDrag","isDragBound","add","handles","viewport","bindHandles","remove","unbindHandles","isFreeScrolling","pointerDownFocus","pointerDown","target","nodeName","type","isPointerDown","pointerIdentifier","_dragPointerDown","focused","activeElement","blur","body","dragX","x","_bindPostStartEvents","pointerDownScroll","getScrollPosition","dispatchEvent","touchStartEvents","touchstart","MSPointerDown","focusNodes","INPUT","SELECT","accessibility","focus","pointerMove","moveVector","_dragPointerMove","touchVerticalScrollMove","_dragMove","hasDragStarted","isTouchScrolling","Math","abs","pointerUp","_dragPointerUp","touchScrollEvents","touchmove","MSPointerMove","canNotScroll","isDragging","startScrollY","pointerWindowStartY","dragStart","dragStartPosition","startAnimation","dragMove","previousDragX","direction","rightToLeft","wrapAround","cells","originBound","max","endBound","min","getLastCell","dragMoveTime","dragEnd","freeScroll","index","dragEndRestingSelect","restingX","getRestingPosition","selectedIndex","dragEndBoostSelect","select","distance","getCellDistance","positiveResting","_getClosestResting","negativeResting","increment","minDistance","Infinity","condition","contain","d","md","len","isWrapAround","cellIndex","modulo","cell","wrap","slideableWidth","floor","undefined","delta","staticClick","clickedCell","getParentCell","cellElem","indexOf","TapListener","PageDots","_create","holder","createElement","className","setUnselectable","dots","onCellSelect","updateSelected","onTap","button","childUIPointerDown","activate","setDots","bindTap","appendChild","deactivate","removeChild","destroy","call","addDots","removeDots","count","fragment","createDocumentFragment","newDots","dot","concat","splice","selectedDot","uiChange","pageDots","_createPageDots","activatePageDots","onCellAddedRemovedPageDots","deactivatePageDots","getSize","Cell","animatePrototype","_Flickity","moveElements","elems","toElem","makeArray","shift","queryElement","getQueryElement","jQuery","$element","constructor","option","console","error","getComputedStyle","GUID","instances","cellAlign","freeScrollFriction","friction","percentPosition","resize","selectedAttraction","setGallerySize","id","guid","flickityGUID","initialIndex","restingFrames","velocity","accel","originSide","_createSlider","watchCSS","isResizeBound","method","opts","isActive","cellElems","_filterFindCellElements","children","slider","reloadCells","tabIndex","emit","positionSliderAtSelected","style","filterFindElements","cellSelector","_makeCells","positionCells","_getWrapShiftCells","elem","_sizeCells","_positionCells","maxCellHeight","cellX","startCell","size","outerWidth","setPosition","outerHeight","_containCells","_init","reposition","setCellAlign","cursorPosition","innerWidth","cellAlignShorthands","center","left","right","shorthand","height","_unshiftCells","beforeShiftCells","afterShiftCells","gapX","_getGapCells","startMargin","endMargin","firstCellStartMargin","lastCell","contentWidth","endLimit","isContentSmaller","setDefaultTarget","args","emitArgs","emitEvent","$event","Event","trigger","isWrap","setSelectedCell","previous","_removeSelectedCellClass","selectedCell","selectedElement","getCell","getCells","getCellElements","getParent","getAdjacentCellElements","adjCount","onresize","debounceMethod","supportsConditionalCSS","supports","cssText","createTextNode","head","afterContent","content","watchOption","onkeydown","keyCode","leftMethod","rightMethod","removeAttribute","removeData","isIE8","setAttribute","data","htmlInit","bridget","PrevNextButton","getArrowMovements","shape","x0","x1","y1","x2","y2","x3","svgURI","supportsInlineSVG","checkSupport","div","innerHTML","firstChild","namespaceURI","isEnabled","isPrevious","leftDirection","isLeft","svg","createSVG","setArrowText","update","createElementNS","path","pathMovements","arrowShape","parentOptions","arrowText","leftArrowText","rightArrowText","setText","handleEvent","onclick","enable","disabled","disable","lastIndex","boundIndex","prevNextButtons","_createPrevNextButtons","prevButton","nextButton","activatePrevNextButtons","deactivatePrevNextButtons","off","getCellsFragment","insert","isAppend","insertCellElement","insertBefore","endCells","selectedIndexDelta","_cellAddedRemoved","append","prepend","wasBefore","removeFrom","changedCellIndex","cellChange","cellSizeChange","isPositioningSlider","prevSlideableWidth","positionSlider","getCellLazyImages","imgs","LazyLoader","img","load","_createLazyload","lazyLoad","lazyImages","lazyCellImages","src","complete","onerror","create","position","side","renderPosition","marginProperty","width","getPositionValue","wrapShift","parentNode","getStyleProperty","prefix","lastTime","prefixes","split","requestAnimationFrame","cancelAnimationFrame","callback","currTime","getTime","timeToCall","proto","isAnimating","animate","applyDragForce","applySelectedAttraction","previousX","integratePhysics","settle","transformProperty","is3d","shiftWrapCells","value","round","beforeGap","_shiftCells","afterGap","gap","cellShift","getFrictionFactor","applyForce","force","dragVelocity","dragForce","indexOfListener","listeners","listener","alias","apply","arguments","originalGlobalValue","getListeners","evt","response","key","events","_getEvents","RegExp","hasOwnProperty","test","flattenListeners","flatListeners","getListenersAsObject","Array","addListener","listenerIsWrapped","once","addOnceListener","defineEvent","defineEvents","evts","removeListener","addListeners","manipulateListeners","removeListeners","single","multiple","removeEvent","_events","removeAllListeners","_getOnceReturnValue","slice","setOnceReturnValue","_onceReturnValue","noConflict","getIEEvent","obj","srcElement","docElem","documentElement","fn","attachEvent","detachEvent","err","docReady","matchesSelector","a","b","prop","num","objToString","Object","toString","isArray","ary","isElement","HTMLElement","nodeType","text","setTextProperty","textContent","selector","querySelector","ffElems","childElems","j","jLen","_class","methodName","threshold","timeoutName","toDashed","str","replace","match","$1","$2","toLowerCase","WidgetClass","namespace","dashedNamespace","dataAttr","attr","JSON","parse","instance","Unipointer","noop","noDragStart","_bindHandles","navigator","isBind","binderExtra","pointerEnabled","handle","touchAction","msPointerEnabled","msTouchAction","disableImgOndragstart","bindMethod","_bindStartEvent","ondragstart","images","pointerDownPoint","isTouchstart","targetNodeName","movePoint","_dragStart","_dragEnd","_staticClick","pointerDone","dragStartPoint","isPreventingClicks","isIgnoringMouseUp","onscroll","scroll","scrollMoveX","scrollMoveY","_pointerDone","pageX","clientX","pageY","clientY","isPageOffset","pageXOffset","scrollLeft","scrollTop","unbindTap","tapElement","boundingRect","getBoundingClientRect","scrollX","scrollY","isInside","top","bottom","getStyleSize","parseFloat","isValid","isNaN","getZeroSize","innerHeight","measurements","measurement","defineGetSize","setup","isSetup","getStyle","getStyleFn","currentStyle","logError","boxSizingProp","padding","borderStyle","borderWidth","isBoxSizeOuter","display","offsetWidth","offsetHeight","isBorderBox","mungeNonPixel","paddingWidth","paddingLeft","paddingRight","paddingHeight","paddingTop","paddingBottom","marginWidth","marginLeft","marginRight","marginHeight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderHeight","borderTopWidth","borderBottomWidth","isBorderBoxSizeOuter","styleWidth","styleHeight","rs","runtimeStyle","rsLeft","pixelLeft","message","classReg","toggleClass","c","hasClass","removeClass","addClass","classList","contains","has","toggle","propName","docElemStyle","charAt","toUpperCase","prefixed","isReady","queue","init","isIE8NotReady","readyState","defineDocReady","requirejs","ElemProto","matchesMethod","checkParent","query","matchChild","matches","supportsOrphans","Element","bindStartEvent","unbindStartEvent","getTouch","touches","touch","identifier","onmousedown","_pointerDown","ontouchstart","changedTouches","onMSPointerDown","onpointerdown","pointerId","postStartEvents","mousedown","pointerdown","node","evnt","_boundPointerEvents","_unbindPostStartEvents","onmousemove","_pointerMove","onMSPointerMove","onpointermove","ontouchmove","onmouseup","_pointerUp","onMSPointerUp","onpointerup","ontouchend","onMSPointerCancel","onpointercancel","_pointerCancel","ontouchcancel","pointerCancel"],"mappings":"AAAA;ACOA,QAASA,UAASC,GAChBC,KAAKC,GAAKF,EACVC,KAAKE,SAAW,GAAIC,UAASH,KAAKC,IATpC,GAAIE,UAAWC,QAAQ,WAYvBC,QAAOC,QAAUR;;CmBGjB,SAAYU,GAEZ,YAIA,SAASqpB,GAAUzd,GACjB,MAAO,IAAIsS,QAAO,WAAatS,EAAY,YAgC7C,QAAS0d,GAAanY,EAAMoY,GAC1B,GAAIpJ,GAAKqJ,EAAUrY,EAAMoY,GAAME,EAAcC,CAC7CvJ,GAAIhP,EAAMoY,GA7BZ,GAAIC,GAAUE,EAAUD,CAEnB,cAAetpB,UAAS+f,iBAC3BsJ,EAAW,SAAUrY,EAAMoY,GACzB,MAAOpY,GAAKwY,UAAUC,SAAUL,IAElCG,EAAW,SAAUvY,EAAMoY,GACzBpY,EAAKwY,UAAU1kB,IAAKskB,IAEtBE,EAAc,SAAUtY,EAAMoY,GAC5BpY,EAAKwY,UAAUtkB,OAAQkkB,MAIzBC,EAAW,SAAUrY,EAAMoY,GACzB,MAAOF,GAAUE,GAAInL,KAAMjN,EAAKvF,YAElC8d,EAAW,SAAUvY,EAAMoY,GACnBC,EAAUrY,EAAMoY,KACpBpY,EAAKvF,UAAYuF,EAAKvF,UAAY,IAAM2d,IAG5CE,EAAc,SAAUtY,EAAMoY,GAC5BpY,EAAKvF,UAAYuF,EAAKvF,UAAUwW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AAOhB,IAKjBI,OAAOC,QAAUC;;ADtBjB,GAAIA,aAAcH,QAAQ,qBAE1BI,QAAOC,OAAS,WACdF","file":"bundle.js","sourcesContent":["(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error(\"Cannot find module '\"+o+\"'\");throw f.code=\"MODULE_NOT_FOUND\",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o 3;\n};\n\n// ----- up ----- //\n\nFlickity.prototype.pointerUp = function( event, pointer ) {\n delete this.isTouchScrolling;\n classie.remove( this.viewport, 'is-pointer-down' );\n this.dispatchEvent( 'pointerUp', event, [ pointer ] );\n this._dragPointerUp( event, pointer );\n};\n\n// -------------------------- vertical scroll -------------------------- //\n\nvar touchScrollEvents = {\n // move events\n // mousemove: true,\n touchmove: true,\n MSPointerMove: true\n};\n\n// position of pointer, relative to window\nfunction getPointerWindowY( pointer ) {\n var pointerPoint = Unidragger.getPointerPoint( pointer );\n return pointerPoint.y - window.pageYOffset;\n}\n\nFlickity.prototype.touchVerticalScrollMove = function( event, pointer, moveVector ) {\n // do not scroll if already dragging, if disabled\n var touchVerticalScroll = this.options.touchVerticalScroll;\n // if touchVerticalScroll is 'withDrag', allow scrolling and dragging\n var canNotScroll = touchVerticalScroll == 'withDrag' ? !touchVerticalScroll :\n this.isDragging || !touchVerticalScroll;\n if ( canNotScroll || !touchScrollEvents[ event.type ] ) {\n return;\n }\n // don't start vertical scrolling until pointer has moved 10 pixels in a direction\n if ( !this.isTouchScrolling && Math.abs( moveVector.y ) > 10 ) {\n // start touch vertical scrolling\n // scroll & pointerY when started\n this.startScrollY = window.pageYOffset;\n this.pointerWindowStartY = getPointerWindowY( pointer );\n // start scroll animation\n this.isTouchScrolling = true;\n }\n};\n\n// -------------------------- dragging -------------------------- //\n\nFlickity.prototype.dragStart = function( event, pointer ) {\n this.dragStartPosition = this.x;\n this.startAnimation();\n this.dispatchEvent( 'dragStart', event, [ pointer ] );\n};\n\nFlickity.prototype.dragMove = function( event, pointer, moveVector ) {\n preventDefaultEvent( event );\n\n this.previousDragX = this.dragX;\n // reverse if right-to-left\n var direction = this.options.rightToLeft ? -1 : 1;\n var dragX = this.dragStartPosition + moveVector.x * direction;\n\n if ( !this.options.wrapAround && this.cells.length ) {\n // slow drag\n var originBound = Math.max( -this.cells[0].target, this.dragStartPosition );\n dragX = dragX > originBound ? ( dragX + originBound ) * 0.5 : dragX;\n var endBound = Math.min( -this.getLastCell().target, this.dragStartPosition );\n dragX = dragX < endBound ? ( dragX + endBound ) * 0.5 : dragX;\n }\n\n this.dragX = dragX;\n\n this.dragMoveTime = new Date();\n this.dispatchEvent( 'dragMove', event, [ pointer, moveVector ] );\n};\n\nFlickity.prototype.dragEnd = function( event, pointer ) {\n if ( this.options.freeScroll ) {\n this.isFreeScrolling = true;\n }\n // set selectedIndex based on where flick will end up\n var index = this.dragEndRestingSelect();\n\n if ( this.options.freeScroll && !this.options.wrapAround ) {\n // if free-scroll & not wrap around\n // do not free-scroll if going outside of bounding cells\n // so bounding cells can attract slider, and keep it in bounds\n var restingX = this.getRestingPosition();\n this.isFreeScrolling = -restingX > this.cells[0].target &&\n -restingX < this.getLastCell().target;\n } else if ( !this.options.freeScroll && index == this.selectedIndex ) {\n // boost selection if selected index has not changed\n index += this.dragEndBoostSelect();\n }\n delete this.previousDragX;\n // apply selection\n // TODO refactor this, selecting here feels weird\n this.select( index );\n this.dispatchEvent( 'dragEnd', event, [ pointer ] );\n};\n\nFlickity.prototype.dragEndRestingSelect = function() {\n var restingX = this.getRestingPosition();\n // how far away from selected cell\n var distance = Math.abs( this.getCellDistance( -restingX, this.selectedIndex ) );\n // get closet resting going up and going down\n var positiveResting = this._getClosestResting( restingX, distance, 1 );\n var negativeResting = this._getClosestResting( restingX, distance, -1 );\n // use closer resting for wrap-around\n var index = positiveResting.distance < negativeResting.distance ?\n positiveResting.index : negativeResting.index;\n return index;\n};\n\n/**\n * given resting X and distance to selected cell\n * get the distance and index of the closest cell\n * @param {Number} restingX - estimated post-flick resting position\n * @param {Number} distance - distance to selected cell\n * @param {Integer} increment - +1 or -1, going up or down\n * @returns {Object} - { distance: {Number}, index: {Integer} }\n */\nFlickity.prototype._getClosestResting = function( restingX, distance, increment ) {\n var index = this.selectedIndex;\n var minDistance = Infinity;\n var condition = this.options.contain && !this.options.wrapAround ?\n // if contain, keep going if distance is equal to minDistance\n function( d, md ) { return d <= md; } : function( d, md ) { return d < md; };\n while ( condition( distance, minDistance ) ) {\n // measure distance to next cell\n index += increment;\n minDistance = distance;\n distance = this.getCellDistance( -restingX, index );\n if ( distance === null ) {\n break;\n }\n distance = Math.abs( distance );\n }\n return {\n distance: minDistance,\n // selected was previous index\n index: index - increment\n };\n};\n\n/**\n * measure distance between x and a cell target\n * @param {Number} x\n * @param {Integer} index - cell index\n */\nFlickity.prototype.getCellDistance = function( x, index ) {\n var len = this.cells.length;\n // wrap around if at least 2 cells\n var isWrapAround = this.options.wrapAround && len > 1;\n var cellIndex = isWrapAround ? utils.modulo( index, len ) : index;\n var cell = this.cells[ cellIndex ];\n if ( !cell ) {\n return null;\n }\n // add distance for wrap-around cells\n var wrap = isWrapAround ? this.slideableWidth * Math.floor( index / len ) : 0;\n return x - ( cell.target + wrap );\n};\n\nFlickity.prototype.dragEndBoostSelect = function() {\n // do not boost if no previousDragX or dragMoveTime\n if ( this.previousDragX === undefined || !this.dragMoveTime ||\n // or if drag was held for 100 ms\n new Date() - this.dragMoveTime > 100 ) {\n return 0;\n }\n\n var distance = this.getCellDistance( -this.dragX, this.selectedIndex );\n var delta = this.previousDragX - this.dragX;\n if ( distance > 0 && delta > 0 ) {\n // boost to next if moving towards the right, and positive velocity\n return 1;\n } else if ( distance < 0 && delta < 0 ) {\n // boost to previous if moving towards the left, and negative velocity\n return -1;\n }\n return 0;\n};\n\n// ----- staticClick ----- //\n\nFlickity.prototype.staticClick = function( event, pointer ) {\n // get clickedCell, if cell was clicked\n var clickedCell = this.getParentCell( event.target );\n var cellElem = clickedCell && clickedCell.element;\n var cellIndex = clickedCell && utils.indexOf( this.cells, clickedCell );\n this.dispatchEvent( 'staticClick', event, [ pointer, cellElem, cellIndex ] );\n};\n\n// ----- ----- //\n\nreturn Flickity;\n\n}));\n","( function( window, factory ) {\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'eventie/eventie',\n './flickity',\n 'tap-listener/tap-listener',\n 'fizzy-ui-utils/utils'\n ], function( eventie, Flickity, TapListener, utils ) {\n return factory( window, eventie, Flickity, TapListener, utils );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('eventie'),\n require('./flickity'),\n require('tap-listener'),\n require('fizzy-ui-utils')\n );\n } else {\n // browser global\n factory(\n window,\n window.eventie,\n window.Flickity,\n window.TapListener,\n window.fizzyUIUtils\n );\n }\n\n}( window, function factory( window, eventie, Flickity, TapListener, utils ) {\n\n// -------------------------- PageDots -------------------------- //\n\n'use strict';\n\nfunction PageDots( parent ) {\n this.parent = parent;\n this._create();\n}\n\nPageDots.prototype = new TapListener();\n\nPageDots.prototype._create = function() {\n // create holder element\n this.holder = document.createElement('ol');\n this.holder.className = 'flickity-page-dots';\n Flickity.setUnselectable( this.holder );\n // create dots, array of elements\n this.dots = [];\n // update on select\n var _this = this;\n this.onCellSelect = function() {\n _this.updateSelected();\n };\n this.parent.on( 'cellSelect', this.onCellSelect );\n // tap\n this.on( 'tap', this.onTap );\n // pointerDown\n this.on( 'pointerDown', function onPointerDown( button, event ) {\n _this.parent.childUIPointerDown( event );\n });\n};\n\nPageDots.prototype.activate = function() {\n this.setDots();\n this.updateSelected();\n this.bindTap( this.holder );\n // add to DOM\n this.parent.element.appendChild( this.holder );\n};\n\nPageDots.prototype.deactivate = function() {\n // remove from DOM\n this.parent.element.removeChild( this.holder );\n TapListener.prototype.destroy.call( this );\n};\n\nPageDots.prototype.setDots = function() {\n // get difference between number of cells and number of dots\n var delta = this.parent.cells.length - this.dots.length;\n if ( delta > 0 ) {\n this.addDots( delta );\n } else if ( delta < 0 ) {\n this.removeDots( -delta );\n }\n};\n\nPageDots.prototype.addDots = function( count ) {\n var fragment = document.createDocumentFragment();\n var newDots = [];\n while ( count ) {\n var dot = document.createElement('li');\n dot.className = 'dot';\n fragment.appendChild( dot );\n newDots.push( dot );\n count--;\n }\n this.holder.appendChild( fragment );\n this.dots = this.dots.concat( newDots );\n};\n\nPageDots.prototype.removeDots = function( count ) {\n // remove from this.dots collection\n var removeDots = this.dots.splice( this.dots.length - count, count );\n // remove from DOM\n for ( var i=0, len = removeDots.length; i < len; i++ ) {\n var dot = removeDots[i];\n this.holder.removeChild( dot );\n }\n};\n\nPageDots.prototype.updateSelected = function() {\n // remove selected class on previous\n if ( this.selectedDot ) {\n this.selectedDot.className = 'dot';\n }\n // don't proceed if no dots\n if ( !this.dots.length ) {\n return;\n }\n this.selectedDot = this.dots[ this.parent.selectedIndex ];\n this.selectedDot.className = 'dot is-selected';\n};\n\nPageDots.prototype.onTap = function( event ) {\n var target = event.target;\n // only care about dot clicks\n if ( target.nodeName != 'LI' ) {\n return;\n }\n\n this.parent.uiChange();\n var index = utils.indexOf( this.dots, target );\n this.parent.select( index );\n};\n\nPageDots.prototype.destroy = function() {\n this.deactivate();\n};\n\nFlickity.PageDots = PageDots;\n\n// -------------------------- Flickity -------------------------- //\n\nutils.extend( Flickity.defaults, {\n pageDots: true\n});\n\nFlickity.createMethods.push('_createPageDots');\n\nFlickity.prototype._createPageDots = function() {\n if ( !this.options.pageDots ) {\n return;\n }\n this.pageDots = new PageDots( this );\n this.on( 'activate', this.activatePageDots );\n this.on( 'cellAddedRemoved', this.onCellAddedRemovedPageDots );\n this.on( 'deactivate', this.deactivatePageDots );\n};\n\nFlickity.prototype.activatePageDots = function() {\n this.pageDots.activate();\n};\n\nFlickity.prototype.onCellAddedRemovedPageDots = function() {\n this.pageDots.setDots();\n};\n\nFlickity.prototype.deactivatePageDots = function() {\n this.pageDots.deactivate();\n};\n\n// ----- ----- //\n\nFlickity.PageDots = PageDots;\n\nreturn Flickity;\n\n}));\n","/*!\n * Flickity v1.1.1\n * Touch, responsive, flickable galleries\n *\n * Licensed GPLv3 for open source use\n * or Flickity Commercial License for commercial use\n *\n * http://flickity.metafizzy.co\n * Copyright 2015 Metafizzy\n */\n\n( function( window, factory ) {\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'classie/classie',\n 'eventEmitter/EventEmitter',\n 'eventie/eventie',\n 'get-size/get-size',\n 'fizzy-ui-utils/utils',\n './cell',\n './animate'\n ], function( classie, EventEmitter, eventie, getSize, utils, Cell, animatePrototype ) {\n return factory( window, classie, EventEmitter, eventie, getSize, utils, Cell, animatePrototype );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('desandro-classie'),\n require('wolfy87-eventemitter'),\n require('eventie'),\n require('get-size'),\n require('fizzy-ui-utils'),\n require('./cell'),\n require('./animate')\n );\n } else {\n // browser global\n var _Flickity = window.Flickity;\n\n window.Flickity = factory(\n window,\n window.classie,\n window.EventEmitter,\n window.eventie,\n window.getSize,\n window.fizzyUIUtils,\n _Flickity.Cell,\n _Flickity.animatePrototype\n );\n }\n\n}( window, function factory( window, classie, EventEmitter, eventie, getSize,\n utils, Cell, animatePrototype ) {\n\n'use strict';\n\n// vars\nvar jQuery = window.jQuery;\nvar getComputedStyle = window.getComputedStyle;\nvar console = window.console;\n\nfunction moveElements( elems, toElem ) {\n elems = utils.makeArray( elems );\n while ( elems.length ) {\n toElem.appendChild( elems.shift() );\n }\n}\n\n// -------------------------- Flickity -------------------------- //\n\n// globally unique identifiers\nvar GUID = 0;\n// internal store of all Flickity intances\nvar instances = {};\n\nfunction Flickity( element, options ) {\n var queryElement = utils.getQueryElement( element );\n if ( !queryElement ) {\n if ( console ) {\n console.error( 'Bad element for Flickity: ' + ( queryElement || element ) );\n }\n return;\n }\n this.element = queryElement;\n // add jQuery\n if ( jQuery ) {\n this.$element = jQuery( this.element );\n }\n // options\n this.options = utils.extend( {}, this.constructor.defaults );\n this.option( options );\n\n // kick things off\n this._create();\n}\n\nFlickity.defaults = {\n accessibility: true,\n cellAlign: 'center',\n // cellSelector: undefined,\n // contain: false,\n freeScrollFriction: 0.075, // friction when free-scrolling\n friction: 0.28, // friction when selecting\n // initialIndex: 0,\n percentPosition: true,\n resize: true,\n selectedAttraction: 0.025,\n setGallerySize: true\n // watchCSS: false,\n // wrapAround: false\n};\n\n// hash of methods triggered on _create()\nFlickity.createMethods = [];\n\n// inherit EventEmitter\nutils.extend( Flickity.prototype, EventEmitter.prototype );\n\nFlickity.prototype._create = function() {\n // add id for Flickity.data\n var id = this.guid = ++GUID;\n this.element.flickityGUID = id; // expando\n instances[ id ] = this; // associate via id\n // initial properties\n this.selectedIndex = this.options.initialIndex || 0;\n // how many frames slider has been in same position\n this.restingFrames = 0;\n // initial physics properties\n this.x = 0;\n this.velocity = 0;\n this.accel = 0;\n this.originSide = this.options.rightToLeft ? 'right' : 'left';\n // create viewport & slider\n this.viewport = document.createElement('div');\n this.viewport.className = 'flickity-viewport';\n Flickity.setUnselectable( this.viewport );\n this._createSlider();\n\n if ( this.options.resize || this.options.watchCSS ) {\n eventie.bind( window, 'resize', this );\n this.isResizeBound = true;\n }\n\n for ( var i=0, len = Flickity.createMethods.length; i < len; i++ ) {\n var method = Flickity.createMethods[i];\n this[ method ]();\n }\n\n if ( this.options.watchCSS ) {\n this.watchCSS();\n } else {\n this.activate();\n }\n\n};\n\n/**\n * set options\n * @param {Object} opts\n */\nFlickity.prototype.option = function( opts ) {\n utils.extend( this.options, opts );\n};\n\nFlickity.prototype.activate = function() {\n if ( this.isActive ) {\n return;\n }\n this.isActive = true;\n classie.add( this.element, 'flickity-enabled' );\n if ( this.options.rightToLeft ) {\n classie.add( this.element, 'flickity-rtl' );\n }\n\n this.getSize();\n // move initial cell elements so they can be loaded as cells\n var cellElems = this._filterFindCellElements( this.element.children );\n moveElements( cellElems, this.slider );\n this.viewport.appendChild( this.slider );\n this.element.appendChild( this.viewport );\n // get cells from children\n this.reloadCells();\n\n if ( this.options.accessibility ) {\n // allow element to focusable\n this.element.tabIndex = 0;\n // listen for key presses\n eventie.bind( this.element, 'keydown', this );\n }\n\n this.emit('activate');\n\n this.positionSliderAtSelected();\n this.select( this.selectedIndex );\n};\n\n// slider positions the cells\nFlickity.prototype._createSlider = function() {\n // slider element does all the positioning\n var slider = document.createElement('div');\n slider.className = 'flickity-slider';\n slider.style[ this.originSide ] = 0;\n this.slider = slider;\n};\n\nFlickity.prototype._filterFindCellElements = function( elems ) {\n return utils.filterFindElements( elems, this.options.cellSelector );\n};\n\n// goes through all children\nFlickity.prototype.reloadCells = function() {\n // collection of item elements\n this.cells = this._makeCells( this.slider.children );\n this.positionCells();\n this._getWrapShiftCells();\n this.setGallerySize();\n};\n\n/**\n * turn elements into Flickity.Cells\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - collection of new Flickity Cells\n */\nFlickity.prototype._makeCells = function( elems ) {\n var cellElems = this._filterFindCellElements( elems );\n\n // create new Flickity for collection\n var cells = [];\n for ( var i=0, len = cellElems.length; i < len; i++ ) {\n var elem = cellElems[i];\n var cell = new Cell( elem, this );\n cells.push( cell );\n }\n\n return cells;\n};\n\nFlickity.prototype.getLastCell = function() {\n return this.cells[ this.cells.length - 1 ];\n};\n\n// positions all cells\nFlickity.prototype.positionCells = function() {\n // size all cells\n this._sizeCells( this.cells );\n // position all cells\n this._positionCells( 0 );\n};\n\n/**\n * position certain cells\n * @param {Integer} index - which cell to start with\n */\nFlickity.prototype._positionCells = function( index ) {\n index = index || 0;\n // also measure maxCellHeight\n // start 0 if positioning all cells\n this.maxCellHeight = index ? this.maxCellHeight || 0 : 0;\n var cellX = 0;\n // get cellX\n if ( index > 0 ) {\n var startCell = this.cells[ index - 1 ];\n cellX = startCell.x + startCell.size.outerWidth;\n }\n var cell;\n for ( var len = this.cells.length, i=index; i < len; i++ ) {\n cell = this.cells[i];\n cell.setPosition( cellX );\n cellX += cell.size.outerWidth;\n this.maxCellHeight = Math.max( cell.size.outerHeight, this.maxCellHeight );\n }\n // keep track of cellX for wrap-around\n this.slideableWidth = cellX;\n // contain cell target\n this._containCells();\n};\n\n/**\n * cell.getSize() on multiple cells\n * @param {Array} cells\n */\nFlickity.prototype._sizeCells = function( cells ) {\n for ( var i=0, len = cells.length; i < len; i++ ) {\n var cell = cells[i];\n cell.getSize();\n }\n};\n\n// alias _init for jQuery plugin .flickity()\nFlickity.prototype._init =\nFlickity.prototype.reposition = function() {\n this.positionCells();\n this.positionSliderAtSelected();\n};\n\nFlickity.prototype.getSize = function() {\n this.size = getSize( this.element );\n this.setCellAlign();\n this.cursorPosition = this.size.innerWidth * this.cellAlign;\n};\n\nvar cellAlignShorthands = {\n // cell align, then based on origin side\n center: {\n left: 0.5,\n right: 0.5\n },\n left: {\n left: 0,\n right: 1\n },\n right: {\n right: 0,\n left: 1\n }\n};\n\nFlickity.prototype.setCellAlign = function() {\n var shorthand = cellAlignShorthands[ this.options.cellAlign ];\n this.cellAlign = shorthand ? shorthand[ this.originSide ] : this.options.cellAlign;\n};\n\nFlickity.prototype.setGallerySize = function() {\n if ( this.options.setGallerySize ) {\n this.viewport.style.height = this.maxCellHeight + 'px';\n }\n};\n\nFlickity.prototype._getWrapShiftCells = function() {\n // only for wrap-around\n if ( !this.options.wrapAround ) {\n return;\n }\n // unshift previous cells\n this._unshiftCells( this.beforeShiftCells );\n this._unshiftCells( this.afterShiftCells );\n // get before cells\n // initial gap\n var gapX = this.cursorPosition;\n var cellIndex = this.cells.length - 1;\n this.beforeShiftCells = this._getGapCells( gapX, cellIndex, -1 );\n // get after cells\n // ending gap between last cell and end of gallery viewport\n gapX = this.size.innerWidth - this.cursorPosition;\n // start cloning at first cell, working forwards\n this.afterShiftCells = this._getGapCells( gapX, 0, 1 );\n};\n\nFlickity.prototype._getGapCells = function( gapX, cellIndex, increment ) {\n // keep adding cells until the cover the initial gap\n var cells = [];\n while ( gapX > 0 ) {\n var cell = this.cells[ cellIndex ];\n if ( !cell ) {\n break;\n }\n cells.push( cell );\n cellIndex += increment;\n gapX -= cell.size.outerWidth;\n }\n return cells;\n};\n\n// ----- contain ----- //\n\n// contain cell targets so no excess sliding\nFlickity.prototype._containCells = function() {\n if ( !this.options.contain || this.options.wrapAround || !this.cells.length ) {\n return;\n }\n var startMargin = this.options.rightToLeft ? 'marginRight' : 'marginLeft';\n var endMargin = this.options.rightToLeft ? 'marginLeft' : 'marginRight';\n var firstCellStartMargin = this.cells[0].size[ startMargin ];\n var lastCell = this.getLastCell();\n var contentWidth = this.slideableWidth - lastCell.size[ endMargin ];\n var endLimit = contentWidth - this.size.innerWidth * ( 1 - this.cellAlign );\n // content is less than gallery size\n var isContentSmaller = contentWidth < this.size.innerWidth;\n // contain each cell target\n for ( var i=0, len = this.cells.length; i < len; i++ ) {\n var cell = this.cells[i];\n // reset default target\n cell.setDefaultTarget();\n if ( isContentSmaller ) {\n // all cells fit inside gallery\n cell.target = contentWidth * this.cellAlign;\n } else {\n // contain to bounds\n cell.target = Math.max( cell.target, this.cursorPosition + firstCellStartMargin );\n cell.target = Math.min( cell.target, endLimit );\n }\n }\n};\n\n// ----- ----- //\n\n/**\n * emits events via eventEmitter and jQuery events\n * @param {String} type - name of event\n * @param {Event} event - original event\n * @param {Array} args - extra arguments\n */\nFlickity.prototype.dispatchEvent = function( type, event, args ) {\n var emitArgs = [ event ].concat( args );\n this.emitEvent( type, emitArgs );\n\n if ( jQuery && this.$element ) {\n if ( event ) {\n // create jQuery event\n var $event = jQuery.Event( event );\n $event.type = type;\n this.$element.trigger( $event, args );\n } else {\n // just trigger with type if no event available\n this.$element.trigger( type, args );\n }\n }\n};\n\n// -------------------------- select -------------------------- //\n\n/**\n * @param {Integer} index - index of the cell\n * @param {Boolean} isWrap - will wrap-around to last/first if at the end\n */\nFlickity.prototype.select = function( index, isWrap ) {\n if ( !this.isActive ) {\n return;\n }\n // wrap position so slider is within normal area\n var len = this.cells.length;\n if ( this.options.wrapAround && len > 1 ) {\n if ( index < 0 ) {\n this.x -= this.slideableWidth;\n } else if ( index >= len ) {\n this.x += this.slideableWidth;\n }\n }\n\n if ( this.options.wrapAround || isWrap ) {\n index = utils.modulo( index, len );\n }\n\n if ( this.cells[ index ] ) {\n this.selectedIndex = index;\n this.setSelectedCell();\n this.startAnimation();\n this.dispatchEvent('cellSelect');\n }\n};\n\nFlickity.prototype.previous = function( isWrap ) {\n this.select( this.selectedIndex - 1, isWrap );\n};\n\nFlickity.prototype.next = function( isWrap ) {\n this.select( this.selectedIndex + 1, isWrap );\n};\n\nFlickity.prototype.setSelectedCell = function() {\n this._removeSelectedCellClass();\n this.selectedCell = this.cells[ this.selectedIndex ];\n this.selectedElement = this.selectedCell.element;\n classie.add( this.selectedElement, 'is-selected' );\n};\n\nFlickity.prototype._removeSelectedCellClass = function() {\n if ( this.selectedCell ) {\n classie.remove( this.selectedCell.element, 'is-selected' );\n }\n};\n\n// -------------------------- get cells -------------------------- //\n\n/**\n * get Flickity.Cell, given an Element\n * @param {Element} elem\n * @returns {Flickity.Cell} item\n */\nFlickity.prototype.getCell = function( elem ) {\n // loop through cells to get the one that matches\n for ( var i=0, len = this.cells.length; i < len; i++ ) {\n var cell = this.cells[i];\n if ( cell.element == elem ) {\n return cell;\n }\n }\n};\n\n/**\n * get collection of Flickity.Cells, given Elements\n * @param {Element, Array, NodeList} elems\n * @returns {Array} cells - Flickity.Cells\n */\nFlickity.prototype.getCells = function( elems ) {\n elems = utils.makeArray( elems );\n var cells = [];\n for ( var i=0, len = elems.length; i < len; i++ ) {\n var elem = elems[i];\n var cell = this.getCell( elem );\n if ( cell ) {\n cells.push( cell );\n }\n }\n return cells;\n};\n\n/**\n * get cell elements\n * @returns {Array} cellElems\n */\nFlickity.prototype.getCellElements = function() {\n var cellElems = [];\n for ( var i=0, len = this.cells.length; i < len; i++ ) {\n cellElems.push( this.cells[i].element );\n }\n return cellElems;\n};\n\n/**\n * get parent cell from an element\n * @param {Element} elem\n * @returns {Flickit.Cell} cell\n */\nFlickity.prototype.getParentCell = function( elem ) {\n // first check if elem is cell\n var cell = this.getCell( elem );\n if ( cell ) {\n return cell;\n }\n // try to get parent cell elem\n elem = utils.getParent( elem, '.flickity-slider > *' );\n return this.getCell( elem );\n};\n\n/**\n * get cells adjacent to a cell\n * @param {Integer} adjCount - number of adjacent cells\n * @param {Integer} index - index of cell to start\n * @returns {Array} cells - array of Flickity.Cells\n */\nFlickity.prototype.getAdjacentCellElements = function( adjCount, index ) {\n if ( !adjCount ) {\n return [ this.selectedElement ];\n }\n index = index === undefined ? this.selectedIndex : index;\n\n var len = this.cells.length;\n if ( 1 + ( adjCount * 2 ) >= len ) {\n return this.getCellElements();\n }\n\n var cellElems = [];\n for ( var i = index - adjCount; i <= index + adjCount ; i++ ) {\n var cellIndex = this.options.wrapAround ? utils.modulo( i, len ) : i;\n var cell = this.cells[ cellIndex ];\n if ( cell ) {\n cellElems.push( cell.element );\n }\n }\n return cellElems;\n};\n\n// -------------------------- events -------------------------- //\n\nFlickity.prototype.uiChange = function() {\n this.emit('uiChange');\n};\n\nFlickity.prototype.childUIPointerDown = function( event ) {\n this.emitEvent( 'childUIPointerDown', [ event ] );\n};\n\n// ----- resize ----- //\n\nFlickity.prototype.onresize = function() {\n this.watchCSS();\n this.resize();\n};\n\nutils.debounceMethod( Flickity, 'onresize', 150 );\n\nFlickity.prototype.resize = function() {\n if ( !this.isActive ) {\n return;\n }\n this.getSize();\n // wrap values\n if ( this.options.wrapAround ) {\n this.x = utils.modulo( this.x, this.slideableWidth );\n }\n this.positionCells();\n this._getWrapShiftCells();\n this.setGallerySize();\n this.positionSliderAtSelected();\n};\n\nvar supportsConditionalCSS = Flickity.supportsConditionalCSS = ( function() {\n var supports;\n return function checkSupport() {\n if ( supports !== undefined ) {\n return supports;\n }\n if ( !getComputedStyle ) {\n supports = false;\n return;\n }\n // style body's :after and check that\n var style = document.createElement('style');\n var cssText = document.createTextNode('body:after { content: \"foo\"; display: none; }');\n style.appendChild( cssText );\n document.head.appendChild( style );\n var afterContent = getComputedStyle( document.body, ':after' ).content;\n // check if able to get :after content\n supports = afterContent.indexOf('foo') != -1;\n document.head.removeChild( style );\n return supports;\n };\n})();\n\n// watches the :after property, activates/deactivates\nFlickity.prototype.watchCSS = function() {\n var watchOption = this.options.watchCSS;\n if ( !watchOption ) {\n return;\n }\n var supports = supportsConditionalCSS();\n if ( !supports ) {\n // activate if watch option is fallbackOn\n var method = watchOption == 'fallbackOn' ? 'activate' : 'deactivate';\n this[ method ]();\n return;\n }\n\n var afterContent = getComputedStyle( this.element, ':after' ).content;\n // activate if :after { content: 'flickity' }\n if ( afterContent.indexOf('flickity') != -1 ) {\n this.activate();\n } else {\n this.deactivate();\n }\n};\n\n// ----- keydown ----- //\n\n// go previous/next if left/right keys pressed\nFlickity.prototype.onkeydown = function( event ) {\n // only work if element is in focus\n if ( !this.options.accessibility ||\n ( document.activeElement && document.activeElement != this.element ) ) {\n return;\n }\n\n if ( event.keyCode == 37 ) {\n // go left\n var leftMethod = this.options.rightToLeft ? 'next' : 'previous';\n this.uiChange();\n this[ leftMethod ]();\n } else if ( event.keyCode == 39 ) {\n // go right\n var rightMethod = this.options.rightToLeft ? 'previous' : 'next';\n this.uiChange();\n this[ rightMethod ]();\n }\n};\n\n// -------------------------- destroy -------------------------- //\n\n// deactivate all Flickity functionality, but keep stuff available\nFlickity.prototype.deactivate = function() {\n if ( !this.isActive ) {\n return;\n }\n classie.remove( this.element, 'flickity-enabled' );\n classie.remove( this.element, 'flickity-rtl' );\n // destroy cells\n for ( var i=0, len = this.cells.length; i < len; i++ ) {\n var cell = this.cells[i];\n cell.destroy();\n }\n this._removeSelectedCellClass();\n this.element.removeChild( this.viewport );\n // move child elements back into element\n moveElements( this.slider.children, this.element );\n if ( this.options.accessibility ) {\n this.element.removeAttribute('tabIndex');\n eventie.unbind( this.element, 'keydown', this );\n }\n // set flags\n this.isActive = false;\n this.emit('deactivate');\n};\n\nFlickity.prototype.destroy = function() {\n this.deactivate();\n if ( this.isResizeBound ) {\n eventie.unbind( window, 'resize', this );\n }\n this.emit('destroy');\n if ( jQuery && this.$element ) {\n jQuery.removeData( this.element, 'flickity' );\n }\n delete this.element.flickityGUID;\n delete instances[ this.guid ];\n};\n\n// -------------------------- prototype -------------------------- //\n\nutils.extend( Flickity.prototype, animatePrototype );\n\n// -------------------------- extras -------------------------- //\n\n// quick check for IE8\nvar isIE8 = 'attachEvent' in window;\n\nFlickity.setUnselectable = function( elem ) {\n if ( !isIE8 ) {\n return;\n }\n // IE8 prevent child from changing focus http://stackoverflow.com/a/17525223/182183\n elem.setAttribute( 'unselectable', 'on' );\n};\n\n/**\n * get Flickity instance from element\n * @param {Element} elem\n * @returns {Flickity}\n */\nFlickity.data = function( elem ) {\n elem = utils.getQueryElement( elem );\n var id = elem && elem.flickityGUID;\n return id && instances[ id ];\n};\n\nutils.htmlInit( Flickity, 'flickity' );\n\nif ( jQuery && jQuery.bridget ) {\n jQuery.bridget( 'flickity', Flickity );\n}\n\nFlickity.Cell = Cell;\n\nreturn Flickity;\n\n}));\n","// -------------------------- prev/next button -------------------------- //\n\n( function( window, factory ) {\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'eventie/eventie',\n './flickity',\n 'tap-listener/tap-listener',\n 'fizzy-ui-utils/utils'\n ], function( eventie, Flickity, TapListener, utils ) {\n return factory( window, eventie, Flickity, TapListener, utils );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('eventie'),\n require('./flickity'),\n require('tap-listener'),\n require('fizzy-ui-utils')\n );\n } else {\n // browser global\n factory(\n window,\n window.eventie,\n window.Flickity,\n window.TapListener,\n window.fizzyUIUtils\n );\n }\n\n}( window, function factory( window, eventie, Flickity, TapListener, utils ) {\n\n'use strict';\n\n// ----- inline SVG support ----- //\n\nvar svgURI = 'http://www.w3.org/2000/svg';\n\n// only check on demand, not on script load\nvar supportsInlineSVG = ( function() {\n var supports;\n function checkSupport() {\n if ( supports !== undefined ) {\n return supports;\n }\n var div = document.createElement('div');\n div.innerHTML = '';\n supports = ( div.firstChild && div.firstChild.namespaceURI ) == svgURI;\n return supports;\n }\n return checkSupport;\n})();\n\n// -------------------------- PrevNextButton -------------------------- //\n\nfunction PrevNextButton( direction, parent ) {\n this.direction = direction;\n this.parent = parent;\n this._create();\n}\n\nPrevNextButton.prototype = new TapListener();\n\nPrevNextButton.prototype._create = function() {\n // properties\n this.isEnabled = true;\n this.isPrevious = this.direction == -1;\n var leftDirection = this.parent.options.rightToLeft ? 1 : -1;\n this.isLeft = this.direction == leftDirection;\n\n var element = this.element = document.createElement('button');\n element.className = 'flickity-prev-next-button';\n element.className += this.isPrevious ? ' previous' : ' next';\n // prevent button from submitting form http://stackoverflow.com/a/10836076/182183\n element.setAttribute( 'type', 'button' );\n Flickity.setUnselectable( element );\n // create arrow\n if ( supportsInlineSVG() ) {\n var svg = this.createSVG();\n element.appendChild( svg );\n } else {\n // SVG not supported, set button text\n this.setArrowText();\n element.className += ' no-svg';\n }\n // update on select\n var _this = this;\n this.onCellSelect = function() {\n _this.update();\n };\n this.parent.on( 'cellSelect', this.onCellSelect );\n // tap\n this.on( 'tap', this.onTap );\n // pointerDown\n this.on( 'pointerDown', function onPointerDown( button, event ) {\n _this.parent.childUIPointerDown( event );\n });\n};\n\nPrevNextButton.prototype.activate = function() {\n this.update();\n this.bindTap( this.element );\n // click events from keyboard\n eventie.bind( this.element, 'click', this );\n // add to DOM\n this.parent.element.appendChild( this.element );\n};\n\nPrevNextButton.prototype.deactivate = function() {\n // remove from DOM\n this.parent.element.removeChild( this.element );\n // do regular TapListener destroy\n TapListener.prototype.destroy.call( this );\n // click events from keyboard\n eventie.unbind( this.element, 'click', this );\n};\n\nPrevNextButton.prototype.createSVG = function() {\n var svg = document.createElementNS( svgURI, 'svg');\n svg.setAttribute( 'viewBox', '0 0 100 100' );\n var path = document.createElementNS( svgURI, 'path');\n var pathMovements = getArrowMovements( this.parent.options.arrowShape );\n path.setAttribute( 'd', pathMovements );\n path.setAttribute( 'class', 'arrow' );\n // rotate arrow\n if ( !this.isLeft ) {\n path.setAttribute( 'transform', 'translate(100, 100) rotate(180) ' );\n }\n svg.appendChild( path );\n return svg;\n};\n\n// get SVG path movmement\nfunction getArrowMovements( shape ) {\n // use shape as movement if string\n if ( typeof shape == 'string' ) {\n return shape;\n }\n // create movement string\n return 'M ' + shape.x0 + ',50' +\n ' L ' + shape.x1 + ',' + ( shape.y1 + 50 ) +\n ' L ' + shape.x2 + ',' + ( shape.y2 + 50 ) +\n ' L ' + shape.x3 + ',50 ' +\n ' L ' + shape.x2 + ',' + ( 50 - shape.y2 ) +\n ' L ' + shape.x1 + ',' + ( 50 - shape.y1 ) +\n ' Z';\n}\n\nPrevNextButton.prototype.setArrowText = function() {\n var parentOptions = this.parent.options;\n var arrowText = this.isLeft ? parentOptions.leftArrowText : parentOptions.rightArrowText;\n utils.setText( this.element, arrowText );\n};\n\nPrevNextButton.prototype.onTap = function() {\n if ( !this.isEnabled ) {\n return;\n }\n this.parent.uiChange();\n var method = this.isPrevious ? 'previous' : 'next';\n this.parent[ method ]();\n};\n\nPrevNextButton.prototype.handleEvent = utils.handleEvent;\n\nPrevNextButton.prototype.onclick = function() {\n // only allow clicks from keyboard\n var focused = document.activeElement;\n if ( focused && focused == this.element ) {\n this.onTap();\n }\n};\n\n// ----- ----- //\n\nPrevNextButton.prototype.enable = function() {\n if ( this.isEnabled ) {\n return;\n }\n this.element.disabled = false;\n this.isEnabled = true;\n};\n\nPrevNextButton.prototype.disable = function() {\n if ( !this.isEnabled ) {\n return;\n }\n this.element.disabled = true;\n this.isEnabled = false;\n};\n\nPrevNextButton.prototype.update = function() {\n // index of first or last cell, if previous or next\n var cells = this.parent.cells;\n // enable is wrapAround and at least 2 cells\n if ( this.parent.options.wrapAround && cells.length > 1 ) {\n this.enable();\n return;\n }\n var lastIndex = cells.length ? cells.length - 1 : 0;\n var boundIndex = this.isPrevious ? 0 : lastIndex;\n var method = this.parent.selectedIndex == boundIndex ? 'disable' : 'enable';\n this[ method ]();\n};\n\nPrevNextButton.prototype.destroy = function() {\n this.deactivate();\n};\n\n// -------------------------- Flickity prototype -------------------------- //\n\nutils.extend( Flickity.defaults, {\n prevNextButtons: true,\n leftArrowText: '‹',\n rightArrowText: '›',\n arrowShape: {\n x0: 10,\n x1: 60, y1: 50,\n x2: 70, y2: 40,\n x3: 30\n }\n});\n\nFlickity.createMethods.push('_createPrevNextButtons');\n\nFlickity.prototype._createPrevNextButtons = function() {\n if ( !this.options.prevNextButtons ) {\n return;\n }\n\n this.prevButton = new PrevNextButton( -1, this );\n this.nextButton = new PrevNextButton( 1, this );\n\n this.on( 'activate', this.activatePrevNextButtons );\n};\n\nFlickity.prototype.activatePrevNextButtons = function() {\n this.prevButton.activate();\n this.nextButton.activate();\n this.on( 'deactivate', this.deactivatePrevNextButtons );\n};\n\nFlickity.prototype.deactivatePrevNextButtons = function() {\n this.prevButton.deactivate();\n this.nextButton.deactivate();\n this.off( 'deactivate', this.deactivatePrevNextButtons );\n};\n\n// -------------------------- -------------------------- //\n\nFlickity.PrevNextButton = PrevNextButton;\n\nreturn Flickity;\n\n}));\n","( function( window, factory ) {\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n './flickity',\n 'fizzy-ui-utils/utils'\n ], function( Flickity, utils ) {\n return factory( window, Flickity, utils );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('./flickity'),\n require('fizzy-ui-utils')\n );\n } else {\n // browser global\n factory(\n window,\n window.Flickity,\n window.fizzyUIUtils\n );\n }\n\n}( window, function factory( window, Flickity, utils ) {\n\n'use strict';\n\n// append cells to a document fragment\nfunction getCellsFragment( cells ) {\n var fragment = document.createDocumentFragment();\n for ( var i=0, len = cells.length; i < len; i++ ) {\n var cell = cells[i];\n fragment.appendChild( cell.element );\n }\n return fragment;\n}\n\n// -------------------------- add/remove cell prototype -------------------------- //\n\n/**\n * Insert, prepend, or append cells\n * @param {Element, Array, NodeList} elems\n * @param {Integer} index\n */\nFlickity.prototype.insert = function( elems, index ) {\n var cells = this._makeCells( elems );\n if ( !cells || !cells.length ) {\n return;\n }\n var len = this.cells.length;\n // default to append\n index = index === undefined ? len : index;\n // add cells with document fragment\n var fragment = getCellsFragment( cells );\n // append to slider\n var isAppend = index == len;\n if ( isAppend ) {\n this.slider.appendChild( fragment );\n } else {\n var insertCellElement = this.cells[ index ].element;\n this.slider.insertBefore( fragment, insertCellElement );\n }\n // add to this.cells\n if ( index === 0 ) {\n // prepend, add to start\n this.cells = cells.concat( this.cells );\n } else if ( isAppend ) {\n // append, add to end\n this.cells = this.cells.concat( cells );\n } else {\n // insert in this.cells\n var endCells = this.cells.splice( index, len - index );\n this.cells = this.cells.concat( cells ).concat( endCells );\n }\n\n this._sizeCells( cells );\n\n var selectedIndexDelta = index > this.selectedIndex ? 0 : cells.length;\n this._cellAddedRemoved( index, selectedIndexDelta );\n};\n\nFlickity.prototype.append = function( elems ) {\n this.insert( elems, this.cells.length );\n};\n\nFlickity.prototype.prepend = function( elems ) {\n this.insert( elems, 0 );\n};\n\n/**\n * Remove cells\n * @param {Element, Array, NodeList} elems\n */\nFlickity.prototype.remove = function( elems ) {\n var cells = this.getCells( elems );\n var selectedIndexDelta = 0;\n var i, len, cell;\n // calculate selectedIndexDelta, easier if done in seperate loop\n for ( i=0, len = cells.length; i < len; i++ ) {\n cell = cells[i];\n var wasBefore = utils.indexOf( this.cells, cell ) < this.selectedIndex;\n selectedIndexDelta -= wasBefore ? 1 : 0;\n }\n\n for ( i=0, len = cells.length; i < len; i++ ) {\n cell = cells[i];\n cell.remove();\n // remove item from collection\n utils.removeFrom( this.cells, cell );\n }\n\n if ( cells.length ) {\n // update stuff\n this._cellAddedRemoved( 0, selectedIndexDelta );\n }\n};\n\n// updates when cells are added or removed\nFlickity.prototype._cellAddedRemoved = function( changedCellIndex, selectedIndexDelta ) {\n selectedIndexDelta = selectedIndexDelta || 0;\n this.selectedIndex += selectedIndexDelta;\n this.selectedIndex = Math.max( 0, Math.min( this.cells.length - 1, this.selectedIndex ) );\n\n this.emitEvent( 'cellAddedRemoved', [ changedCellIndex, selectedIndexDelta ] );\n this.cellChange( changedCellIndex, true );\n};\n\n/**\n * logic to be run after a cell's size changes\n * @param {Element} elem - cell's element\n */\nFlickity.prototype.cellSizeChange = function( elem ) {\n var cell = this.getCell( elem );\n if ( !cell ) {\n return;\n }\n cell.getSize();\n\n var index = utils.indexOf( this.cells, cell );\n this.cellChange( index );\n};\n\n/**\n * logic any time a cell is changed: added, removed, or size changed\n * @param {Integer} changedCellIndex - index of the changed cell, optional\n */\nFlickity.prototype.cellChange = function( changedCellIndex, isPositioningSlider ) {\n var prevSlideableWidth = this.slideableWidth;\n this._positionCells( changedCellIndex );\n this._getWrapShiftCells();\n this.setGallerySize();\n // position slider\n if ( this.options.freeScroll ) {\n // shift x by change in slideableWidth\n // TODO fix position shifts when prepending w/ freeScroll\n this.x += prevSlideableWidth - this.slideableWidth;\n this.positionSlider();\n } else {\n // do not position slider after lazy load\n if ( isPositioningSlider ) {\n this.positionSliderAtSelected();\n }\n this.select( this.selectedIndex );\n }\n};\n\n// ----- ----- //\n\nreturn Flickity;\n\n}));\n","( function( window, factory ) {\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'classie/classie',\n 'eventie/eventie',\n './flickity',\n 'fizzy-ui-utils/utils'\n ], function( classie, eventie, Flickity, utils ) {\n return factory( window, classie, eventie, Flickity, utils );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('desandro-classie'),\n require('eventie'),\n require('./flickity'),\n require('fizzy-ui-utils')\n );\n } else {\n // browser global\n factory(\n window,\n window.classie,\n window.eventie,\n window.Flickity,\n window.fizzyUIUtils\n );\n }\n\n}( window, function factory( window, classie, eventie, Flickity, utils ) {\n'use strict';\n\nFlickity.createMethods.push('_createLazyload');\n\nFlickity.prototype._createLazyload = function() {\n this.on( 'cellSelect', this.lazyLoad );\n};\n\nFlickity.prototype.lazyLoad = function() {\n var lazyLoad = this.options.lazyLoad;\n if ( !lazyLoad ) {\n return;\n }\n // get adjacent cells, use lazyLoad option for adjacent count\n var adjCount = typeof lazyLoad == 'number' ? lazyLoad : 0;\n var cellElems = this.getAdjacentCellElements( adjCount );\n // get lazy images in those cells\n var lazyImages = [];\n for ( var i=0, len = cellElems.length; i < len; i++ ) {\n var cellElem = cellElems[i];\n var lazyCellImages = getCellLazyImages( cellElem );\n lazyImages = lazyImages.concat( lazyCellImages );\n }\n // load lazy images\n for ( i=0, len = lazyImages.length; i < len; i++ ) {\n var img = lazyImages[i];\n new LazyLoader( img, this );\n }\n};\n\nfunction getCellLazyImages( cellElem ) {\n // check if cell element is lazy image\n if ( cellElem.nodeName == 'IMG' &&\n cellElem.getAttribute('data-flickity-lazyload') ) {\n return [ cellElem ];\n }\n // select lazy images in cell\n var imgs = cellElem.querySelectorAll('img[data-flickity-lazyload]');\n return utils.makeArray( imgs );\n}\n\n// -------------------------- LazyLoader -------------------------- //\n\n/**\n * class to handle loading images\n */\nfunction LazyLoader( img, flickity ) {\n this.img = img;\n this.flickity = flickity;\n this.load();\n}\n\nLazyLoader.prototype.handleEvent = utils.handleEvent;\n\nLazyLoader.prototype.load = function() {\n eventie.bind( this.img, 'load', this );\n eventie.bind( this.img, 'error', this );\n // load image\n this.img.src = this.img.getAttribute('data-flickity-lazyload');\n // remove attr\n this.img.removeAttribute('data-flickity-lazyload');\n};\n\nLazyLoader.prototype.onload = function( event ) {\n this.complete( event, 'flickity-lazyloaded' );\n};\n\nLazyLoader.prototype.onerror = function() {\n this.complete( event, 'flickity-lazyerror' );\n};\n\nLazyLoader.prototype.complete = function( event, className ) {\n // unbind events\n eventie.unbind( this.img, 'load', this );\n eventie.unbind( this.img, 'error', this );\n\n var cell = this.flickity.getParentCell( this.img );\n var cellElem = cell && cell.element;\n this.flickity.cellSizeChange( cellElem );\n\n classie.add( this.img, className );\n this.flickity.dispatchEvent( 'lazyLoad', event, cellElem );\n};\n\n// ----- ----- //\n\nFlickity.LazyLoader = LazyLoader;\n\nreturn Flickity;\n\n}));\n","( function( window, factory ) {\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'get-size/get-size'\n ], function( getSize ) {\n return factory( window, getSize );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('get-size')\n );\n } else {\n // browser global\n window.Flickity = window.Flickity || {};\n window.Flickity.Cell = factory(\n window,\n window.getSize\n );\n }\n\n}( window, function factory( window, getSize ) {\n\n'use strict';\n\nfunction Cell( elem, parent ) {\n this.element = elem;\n this.parent = parent;\n\n this.create();\n}\n\nvar isIE8 = 'attachEvent' in window;\n\nCell.prototype.create = function() {\n this.element.style.position = 'absolute';\n // IE8 prevent child from changing focus http://stackoverflow.com/a/17525223/182183\n if ( isIE8 ) {\n this.element.setAttribute( 'unselectable', 'on' );\n }\n this.x = 0;\n this.shift = 0;\n};\n\nCell.prototype.destroy = function() {\n // reset style\n this.element.style.position = '';\n var side = this.parent.originSide;\n this.element.style[ side ] = '';\n};\n\nCell.prototype.getSize = function() {\n this.size = getSize( this.element );\n};\n\nCell.prototype.setPosition = function( x ) {\n this.x = x;\n this.setDefaultTarget();\n this.renderPosition( x );\n};\n\nCell.prototype.setDefaultTarget = function() {\n var marginProperty = this.parent.originSide == 'left' ? 'marginLeft' : 'marginRight';\n this.target = this.x + this.size[ marginProperty ] +\n this.size.width * this.parent.cellAlign;\n};\n\nCell.prototype.renderPosition = function( x ) {\n // render position of cell with in slider\n var side = this.parent.originSide;\n this.element.style[ side ] = this.parent.getPositionValue( x );\n};\n\n/**\n * @param {Integer} factor - 0, 1, or -1\n**/\nCell.prototype.wrapShift = function( shift ) {\n this.shift = shift;\n this.renderPosition( this.x + this.parent.slideableWidth * shift );\n};\n\nCell.prototype.remove = function() {\n this.element.parentNode.removeChild( this.element );\n};\n\nreturn Cell;\n\n}));\n","( function( window, factory ) {\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'get-style-property/get-style-property',\n 'fizzy-ui-utils/utils'\n ], function( getStyleProperty, utils ) {\n return factory( window, getStyleProperty, utils );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('desandro-get-style-property'),\n require('fizzy-ui-utils')\n );\n } else {\n // browser global\n window.Flickity = window.Flickity || {};\n window.Flickity.animatePrototype = factory(\n window,\n window.getStyleProperty,\n window.fizzyUIUtils\n );\n }\n\n}( window, function factory( window, getStyleProperty, utils ) {\n\n'use strict';\n\n// -------------------------- requestAnimationFrame -------------------------- //\n\n// https://gist.github.com/1866474\n\nvar lastTime = 0;\nvar prefixes = 'webkit moz ms o'.split(' ');\n// get unprefixed rAF and cAF, if present\nvar requestAnimationFrame = window.requestAnimationFrame;\nvar cancelAnimationFrame = window.cancelAnimationFrame;\n// loop through vendor prefixes and get prefixed rAF and cAF\nvar prefix;\nfor( var i = 0; i < prefixes.length; i++ ) {\n if ( requestAnimationFrame && cancelAnimationFrame ) {\n break;\n }\n prefix = prefixes[i];\n requestAnimationFrame = requestAnimationFrame || window[ prefix + 'RequestAnimationFrame' ];\n cancelAnimationFrame = cancelAnimationFrame || window[ prefix + 'CancelAnimationFrame' ] ||\n window[ prefix + 'CancelRequestAnimationFrame' ];\n}\n\n// fallback to setTimeout and clearTimeout if either request/cancel is not supported\nif ( !requestAnimationFrame || !cancelAnimationFrame ) {\n requestAnimationFrame = function( callback ) {\n var currTime = new Date().getTime();\n var timeToCall = Math.max( 0, 16 - ( currTime - lastTime ) );\n var id = window.setTimeout( function() {\n callback( currTime + timeToCall );\n }, timeToCall );\n lastTime = currTime + timeToCall;\n return id;\n };\n\n cancelAnimationFrame = function( id ) {\n window.clearTimeout( id );\n };\n}\n\n// -------------------------- animate -------------------------- //\n\nvar proto = {};\n\nproto.startAnimation = function() {\n if ( this.isAnimating ) {\n return;\n }\n\n this.isAnimating = true;\n this.restingFrames = 0;\n this.animate();\n};\n\nproto.animate = function() {\n this.applyDragForce();\n this.applySelectedAttraction();\n\n var previousX = this.x;\n\n this.integratePhysics();\n this.positionSlider();\n this.settle( previousX );\n // animate next frame\n if ( this.isAnimating ) {\n var _this = this;\n requestAnimationFrame( function animateFrame() {\n _this.animate();\n });\n }\n\n /** /\n // log animation frame rate\n var now = new Date();\n if ( this.then ) {\n console.log( ~~( 1000 / (now-this.then)) + 'fps' )\n }\n this.then = now;\n /**/\n};\n\n\nvar transformProperty = getStyleProperty('transform');\nvar is3d = !!getStyleProperty('perspective');\n\nproto.positionSlider = function() {\n var x = this.x;\n // wrap position around\n if ( this.options.wrapAround && this.cells.length > 1 ) {\n x = utils.modulo( x, this.slideableWidth );\n x = x - this.slideableWidth;\n this.shiftWrapCells( x );\n }\n\n x = x + this.cursorPosition;\n\n // reverse if right-to-left and using transform\n x = this.options.rightToLeft && transformProperty ? -x : x;\n\n var value = this.getPositionValue( x );\n\n if ( transformProperty ) {\n // use 3D tranforms for hardware acceleration on iOS\n // but use 2D when settled, for better font-rendering\n this.slider.style[ transformProperty ] = is3d && this.isAnimating ?\n 'translate3d(' + value + ',0,0)' : 'translateX(' + value + ')';\n } else {\n this.slider.style[ this.originSide ] = value;\n }\n};\n\nproto.positionSliderAtSelected = function() {\n if ( !this.cells.length ) {\n return;\n }\n var selectedCell = this.cells[ this.selectedIndex ];\n this.x = -selectedCell.target;\n this.positionSlider();\n};\n\nproto.getPositionValue = function( position ) {\n if ( this.options.percentPosition ) {\n // percent position, round to 2 digits, like 12.34%\n return ( Math.round( ( position / this.size.innerWidth ) * 10000 ) * 0.01 )+ '%';\n } else {\n // pixel positioning\n return Math.round( position ) + 'px';\n }\n};\n\nproto.settle = function( previousX ) {\n // keep track of frames where x hasn't moved\n if ( !this.isPointerDown && Math.round( this.x * 100 ) == Math.round( previousX * 100 ) ) {\n this.restingFrames++;\n }\n // stop animating if resting for 3 or more frames\n if ( this.restingFrames > 2 ) {\n this.isAnimating = false;\n delete this.isFreeScrolling;\n // render position with translateX when settled\n if ( is3d ) {\n this.positionSlider();\n }\n this.dispatchEvent('settle');\n }\n};\n\nproto.shiftWrapCells = function( x ) {\n // shift before cells\n var beforeGap = this.cursorPosition + x;\n this._shiftCells( this.beforeShiftCells, beforeGap, -1 );\n // shift after cells\n var afterGap = this.size.innerWidth - ( x + this.slideableWidth + this.cursorPosition );\n this._shiftCells( this.afterShiftCells, afterGap, 1 );\n};\n\nproto._shiftCells = function( cells, gap, shift ) {\n for ( var i=0, len = cells.length; i < len; i++ ) {\n var cell = cells[i];\n var cellShift = gap > 0 ? shift : 0;\n cell.wrapShift( cellShift );\n gap -= cell.size.outerWidth;\n }\n};\n\nproto._unshiftCells = function( cells ) {\n if ( !cells || !cells.length ) {\n return;\n }\n for ( var i=0, len = cells.length; i < len; i++ ) {\n cells[i].wrapShift( 0 );\n }\n};\n\n// -------------------------- physics -------------------------- //\n\nproto.integratePhysics = function() {\n this.velocity += this.accel;\n this.x += this.velocity;\n this.velocity *= this.getFrictionFactor();\n // reset acceleration\n this.accel = 0;\n};\n\nproto.applyForce = function( force ) {\n this.accel += force;\n};\n\nproto.getFrictionFactor = function() {\n return 1 - this.options[ this.isFreeScrolling ? 'freeScrollFriction' : 'friction' ];\n};\n\n\nproto.getRestingPosition = function() {\n // my thanks to Steven Wittens, who simplified this math greatly\n return this.x + this.velocity / ( 1 - this.getFrictionFactor() );\n};\n\nproto.applyDragForce = function() {\n if ( !this.isPointerDown ) {\n return;\n }\n // change the position to drag position by applying force\n var dragVelocity = this.dragX - this.x;\n var dragForce = dragVelocity - this.velocity;\n this.applyForce( dragForce );\n};\n\nproto.applySelectedAttraction = function() {\n // do not attract if pointer down or no cells\n var len = this.cells.length;\n if ( this.isPointerDown || this.isFreeScrolling || !len ) {\n return;\n }\n var cell = this.cells[ this.selectedIndex ];\n var wrap = this.options.wrapAround && len > 1 ?\n this.slideableWidth * Math.floor( this.selectedIndex / len ) : 0;\n var distance = ( cell.target + wrap ) * -1 - this.x;\n var force = distance * this.options.selectedAttraction;\n this.applyForce( force );\n};\n\nreturn proto;\n\n}));\n","/*!\n * EventEmitter v4.2.11 - git.io/ee\n * Unlicense - http://unlicense.org/\n * Oliver Caldwell - http://oli.me.uk/\n * @preserve\n */\n\n;(function () {\n 'use strict';\n\n /**\n * Class for managing events.\n * Can be extended to provide event functionality in other classes.\n *\n * @class EventEmitter Manages event registering and emitting.\n */\n function EventEmitter() {}\n\n // Shortcuts to improve speed and size\n var proto = EventEmitter.prototype;\n var exports = this;\n var originalGlobalValue = exports.EventEmitter;\n\n /**\n * Finds the index of the listener for the event in its storage array.\n *\n * @param {Function[]} listeners Array of listeners to search through.\n * @param {Function} listener Method to look for.\n * @return {Number} Index of the specified listener, -1 if not found\n * @api private\n */\n function indexOfListener(listeners, listener) {\n var i = listeners.length;\n while (i--) {\n if (listeners[i].listener === listener) {\n return i;\n }\n }\n\n return -1;\n }\n\n /**\n * Alias a method while keeping the context correct, to allow for overwriting of target method.\n *\n * @param {String} name The name of the target method.\n * @return {Function} The aliased method\n * @api private\n */\n function alias(name) {\n return function aliasClosure() {\n return this[name].apply(this, arguments);\n };\n }\n\n /**\n * Returns the listener array for the specified event.\n * Will initialise the event object and listener arrays if required.\n * Will return an object if you use a regex search. The object contains keys for each matched event. So /ba[rz]/ might return an object containing bar and baz. But only if you have either defined them with defineEvent or added some listeners to them.\n * Each property in the object response is an array of listener functions.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Function[]|Object} All listener functions for the event.\n */\n proto.getListeners = function getListeners(evt) {\n var events = this._getEvents();\n var response;\n var key;\n\n // Return a concatenated array of all matching events if\n // the selector is a regular expression.\n if (evt instanceof RegExp) {\n response = {};\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n response[key] = events[key];\n }\n }\n }\n else {\n response = events[evt] || (events[evt] = []);\n }\n\n return response;\n };\n\n /**\n * Takes a list of listener objects and flattens it into a list of listener functions.\n *\n * @param {Object[]} listeners Raw listener objects.\n * @return {Function[]} Just the listener functions.\n */\n proto.flattenListeners = function flattenListeners(listeners) {\n var flatListeners = [];\n var i;\n\n for (i = 0; i < listeners.length; i += 1) {\n flatListeners.push(listeners[i].listener);\n }\n\n return flatListeners;\n };\n\n /**\n * Fetches the requested listeners via getListeners but will always return the results inside an object. This is mainly for internal use but others may find it useful.\n *\n * @param {String|RegExp} evt Name of the event to return the listeners from.\n * @return {Object} All listener functions for an event in an object.\n */\n proto.getListenersAsObject = function getListenersAsObject(evt) {\n var listeners = this.getListeners(evt);\n var response;\n\n if (listeners instanceof Array) {\n response = {};\n response[evt] = listeners;\n }\n\n return response || listeners;\n };\n\n /**\n * Adds a listener function to the specified event.\n * The listener will not be added if it is a duplicate.\n * If the listener returns true then it will be removed after it is called.\n * If you pass a regular expression as the event name then the listener will be added to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListener = function addListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var listenerIsWrapped = typeof listener === 'object';\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key) && indexOfListener(listeners[key], listener) === -1) {\n listeners[key].push(listenerIsWrapped ? listener : {\n listener: listener,\n once: false\n });\n }\n }\n\n return this;\n };\n\n /**\n * Alias of addListener\n */\n proto.on = alias('addListener');\n\n /**\n * Semi-alias of addListener. It will add a listener that will be\n * automatically removed after its first execution.\n *\n * @param {String|RegExp} evt Name of the event to attach the listener to.\n * @param {Function} listener Method to be called when the event is emitted. If the function returns true then it will be removed after calling.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addOnceListener = function addOnceListener(evt, listener) {\n return this.addListener(evt, {\n listener: listener,\n once: true\n });\n };\n\n /**\n * Alias of addOnceListener.\n */\n proto.once = alias('addOnceListener');\n\n /**\n * Defines an event name. This is required if you want to use a regex to add a listener to multiple events at once. If you don't do this then how do you expect it to know what event to add to? Should it just add to every possible match for a regex? No. That is scary and bad.\n * You need to tell it what event names should be matched by a regex.\n *\n * @param {String} evt Name of the event to create.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvent = function defineEvent(evt) {\n this.getListeners(evt);\n return this;\n };\n\n /**\n * Uses defineEvent to define multiple events.\n *\n * @param {String[]} evts An array of event names to define.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.defineEvents = function defineEvents(evts) {\n for (var i = 0; i < evts.length; i += 1) {\n this.defineEvent(evts[i]);\n }\n return this;\n };\n\n /**\n * Removes a listener function from the specified event.\n * When passed a regular expression as the event name, it will remove the listener from all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to remove the listener from.\n * @param {Function} listener Method to remove from the event.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListener = function removeListener(evt, listener) {\n var listeners = this.getListenersAsObject(evt);\n var index;\n var key;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n index = indexOfListener(listeners[key], listener);\n\n if (index !== -1) {\n listeners[key].splice(index, 1);\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of removeListener\n */\n proto.off = alias('removeListener');\n\n /**\n * Adds listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can add to multiple events at once. The object should contain key value pairs of events and listeners or listener arrays. You can also pass it an event name and an array of listeners to be added.\n * You can also pass it a regular expression to add the array of listeners to all events that match it.\n * Yeah, this function does quite a bit. That's probably a bad thing.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add to multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.addListeners = function addListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(false, evt, listeners);\n };\n\n /**\n * Removes listeners in bulk using the manipulateListeners method.\n * If you pass an object as the second argument you can remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be removed.\n * You can also pass it a regular expression to remove the listeners from all events that match it.\n *\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeListeners = function removeListeners(evt, listeners) {\n // Pass through to manipulateListeners\n return this.manipulateListeners(true, evt, listeners);\n };\n\n /**\n * Edits listeners in bulk. The addListeners and removeListeners methods both use this to do their job. You should really use those instead, this is a little lower level.\n * The first argument will determine if the listeners are removed (true) or added (false).\n * If you pass an object as the second argument you can add/remove from multiple events at once. The object should contain key value pairs of events and listeners or listener arrays.\n * You can also pass it an event name and an array of listeners to be added/removed.\n * You can also pass it a regular expression to manipulate the listeners of all events that match it.\n *\n * @param {Boolean} remove True if you want to remove listeners, false if you want to add.\n * @param {String|Object|RegExp} evt An event name if you will pass an array of listeners next. An object if you wish to add/remove from multiple events at once.\n * @param {Function[]} [listeners] An optional array of listener functions to add/remove.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.manipulateListeners = function manipulateListeners(remove, evt, listeners) {\n var i;\n var value;\n var single = remove ? this.removeListener : this.addListener;\n var multiple = remove ? this.removeListeners : this.addListeners;\n\n // If evt is an object then pass each of its properties to this method\n if (typeof evt === 'object' && !(evt instanceof RegExp)) {\n for (i in evt) {\n if (evt.hasOwnProperty(i) && (value = evt[i])) {\n // Pass the single listener straight through to the singular method\n if (typeof value === 'function') {\n single.call(this, i, value);\n }\n else {\n // Otherwise pass back to the multiple function\n multiple.call(this, i, value);\n }\n }\n }\n }\n else {\n // So evt must be a string\n // And listeners must be an array of listeners\n // Loop over it and pass each one to the multiple method\n i = listeners.length;\n while (i--) {\n single.call(this, evt, listeners[i]);\n }\n }\n\n return this;\n };\n\n /**\n * Removes all listeners from a specified event.\n * If you do not specify an event then all listeners will be removed.\n * That means every event will be emptied.\n * You can also pass a regex to remove all events that match it.\n *\n * @param {String|RegExp} [evt] Optional name of the event to remove all listeners for. Will remove from every event if not passed.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.removeEvent = function removeEvent(evt) {\n var type = typeof evt;\n var events = this._getEvents();\n var key;\n\n // Remove different things depending on the state of evt\n if (type === 'string') {\n // Remove all listeners for the specified event\n delete events[evt];\n }\n else if (evt instanceof RegExp) {\n // Remove all events matching the regex.\n for (key in events) {\n if (events.hasOwnProperty(key) && evt.test(key)) {\n delete events[key];\n }\n }\n }\n else {\n // Remove all listeners in all events\n delete this._events;\n }\n\n return this;\n };\n\n /**\n * Alias of removeEvent.\n *\n * Added to mirror the node API.\n */\n proto.removeAllListeners = alias('removeEvent');\n\n /**\n * Emits an event of your choice.\n * When emitted, every listener attached to that event will be executed.\n * If you pass the optional argument array then those arguments will be passed to every listener upon execution.\n * Because it uses `apply`, your array of arguments will be passed as if you wrote them out separately.\n * So they will not arrive within the array on the other side, they will be separate.\n * You can also pass a regular expression to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {Array} [args] Optional array of arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emitEvent = function emitEvent(evt, args) {\n var listeners = this.getListenersAsObject(evt);\n var listener;\n var i;\n var key;\n var response;\n\n for (key in listeners) {\n if (listeners.hasOwnProperty(key)) {\n i = listeners[key].length;\n\n while (i--) {\n // If the listener returns true then it shall be removed from the event\n // The function is executed either with a basic call or an apply if there is an args array\n listener = listeners[key][i];\n\n if (listener.once === true) {\n this.removeListener(evt, listener.listener);\n }\n\n response = listener.listener.apply(this, args || []);\n\n if (response === this._getOnceReturnValue()) {\n this.removeListener(evt, listener.listener);\n }\n }\n }\n }\n\n return this;\n };\n\n /**\n * Alias of emitEvent\n */\n proto.trigger = alias('emitEvent');\n\n /**\n * Subtly different from emitEvent in that it will pass its arguments on to the listeners, as opposed to taking a single array of arguments to pass on.\n * As with emitEvent, you can pass a regex in place of the event name to emit to all events that match it.\n *\n * @param {String|RegExp} evt Name of the event to emit and execute listeners for.\n * @param {...*} Optional additional arguments to be passed to each listener.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.emit = function emit(evt) {\n var args = Array.prototype.slice.call(arguments, 1);\n return this.emitEvent(evt, args);\n };\n\n /**\n * Sets the current value to check against when executing listeners. If a\n * listeners return value matches the one set here then it will be removed\n * after execution. This value defaults to true.\n *\n * @param {*} value The new value to check for when executing listeners.\n * @return {Object} Current instance of EventEmitter for chaining.\n */\n proto.setOnceReturnValue = function setOnceReturnValue(value) {\n this._onceReturnValue = value;\n return this;\n };\n\n /**\n * Fetches the current value to check against when executing listeners. If\n * the listeners return value matches this one then it should be removed\n * automatically. It will return true by default.\n *\n * @return {*|Boolean} The current value to check for or the default, true.\n * @api private\n */\n proto._getOnceReturnValue = function _getOnceReturnValue() {\n if (this.hasOwnProperty('_onceReturnValue')) {\n return this._onceReturnValue;\n }\n else {\n return true;\n }\n };\n\n /**\n * Fetches the events object and creates one if required.\n *\n * @return {Object} The events storage object.\n * @api private\n */\n proto._getEvents = function _getEvents() {\n return this._events || (this._events = {});\n };\n\n /**\n * Reverts the global {@link EventEmitter} to its previous value and returns a reference to this version.\n *\n * @return {Function} Non conflicting EventEmitter class.\n */\n EventEmitter.noConflict = function noConflict() {\n exports.EventEmitter = originalGlobalValue;\n return EventEmitter;\n };\n\n // Expose the class either via AMD, CommonJS or the global object\n if (typeof define === 'function' && define.amd) {\n define(function () {\n return EventEmitter;\n });\n }\n else if (typeof module === 'object' && module.exports){\n module.exports = EventEmitter;\n }\n else {\n exports.EventEmitter = EventEmitter;\n }\n}.call(this));\n","/*!\n * eventie v1.0.6\n * event binding helper\n * eventie.bind( elem, 'click', myFn )\n * eventie.unbind( elem, 'click', myFn )\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true */\n/*global define: false, module: false */\n\n( function( window ) {\n\n'use strict';\n\nvar docElem = document.documentElement;\n\nvar bind = function() {};\n\nfunction getIEEvent( obj ) {\n var event = window.event;\n // add event.target\n event.target = event.target || event.srcElement || obj;\n return event;\n}\n\nif ( docElem.addEventListener ) {\n bind = function( obj, type, fn ) {\n obj.addEventListener( type, fn, false );\n };\n} else if ( docElem.attachEvent ) {\n bind = function( obj, type, fn ) {\n obj[ type + fn ] = fn.handleEvent ?\n function() {\n var event = getIEEvent( obj );\n fn.handleEvent.call( fn, event );\n } :\n function() {\n var event = getIEEvent( obj );\n fn.call( obj, event );\n };\n obj.attachEvent( \"on\" + type, obj[ type + fn ] );\n };\n}\n\nvar unbind = function() {};\n\nif ( docElem.removeEventListener ) {\n unbind = function( obj, type, fn ) {\n obj.removeEventListener( type, fn, false );\n };\n} else if ( docElem.detachEvent ) {\n unbind = function( obj, type, fn ) {\n obj.detachEvent( \"on\" + type, obj[ type + fn ] );\n try {\n delete obj[ type + fn ];\n } catch ( err ) {\n // can't delete window object properties\n obj[ type + fn ] = undefined;\n }\n };\n}\n\nvar eventie = {\n bind: bind,\n unbind: unbind\n};\n\n// ----- module definition ----- //\n\nif ( typeof define === 'function' && define.amd ) {\n // AMD\n define( eventie );\n} else if ( typeof exports === 'object' ) {\n // CommonJS\n module.exports = eventie;\n} else {\n // browser global\n window.eventie = eventie;\n}\n\n})( window );\n","/**\n * Fizzy UI utils v1.0.1\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true, strict: true */\n\n( function( window, factory ) {\n /*global define: false, module: false, require: false */\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'doc-ready/doc-ready',\n 'matches-selector/matches-selector'\n ], function( docReady, matchesSelector ) {\n return factory( window, docReady, matchesSelector );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('doc-ready'),\n require('desandro-matches-selector')\n );\n } else {\n // browser global\n window.fizzyUIUtils = factory(\n window,\n window.docReady,\n window.matchesSelector\n );\n }\n\n}( window, function factory( window, docReady, matchesSelector ) {\n\n'use strict';\n\nvar utils = {};\n\n// ----- extend ----- //\n\n// extends objects\nutils.extend = function( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n};\n\n// ----- modulo ----- //\n\nutils.modulo = function( num, div ) {\n return ( ( num % div ) + div ) % div;\n};\n\n// ----- isArray ----- //\n \nvar objToString = Object.prototype.toString;\nutils.isArray = function( obj ) {\n return objToString.call( obj ) == '[object Array]';\n};\n\n// ----- makeArray ----- //\n\n// turn element or nodeList into an array\nutils.makeArray = function( obj ) {\n var ary = [];\n if ( utils.isArray( obj ) ) {\n // use object if already an array\n ary = obj;\n } else if ( obj && typeof obj.length == 'number' ) {\n // convert nodeList to array\n for ( var i=0, len = obj.length; i < len; i++ ) {\n ary.push( obj[i] );\n }\n } else {\n // array of single index\n ary.push( obj );\n }\n return ary;\n};\n\n// ----- indexOf ----- //\n\n// index of helper cause IE8\nutils.indexOf = Array.prototype.indexOf ? function( ary, obj ) {\n return ary.indexOf( obj );\n } : function( ary, obj ) {\n for ( var i=0, len = ary.length; i < len; i++ ) {\n if ( ary[i] === obj ) {\n return i;\n }\n }\n return -1;\n };\n\n// ----- removeFrom ----- //\n\nutils.removeFrom = function( ary, obj ) {\n var index = utils.indexOf( ary, obj );\n if ( index != -1 ) {\n ary.splice( index, 1 );\n }\n};\n\n// ----- isElement ----- //\n\n// http://stackoverflow.com/a/384380/182183\nutils.isElement = ( typeof HTMLElement == 'function' || typeof HTMLElement == 'object' ) ?\n function isElementDOM2( obj ) {\n return obj instanceof HTMLElement;\n } :\n function isElementQuirky( obj ) {\n return obj && typeof obj == 'object' &&\n obj.nodeType == 1 && typeof obj.nodeName == 'string';\n };\n\n// ----- setText ----- //\n\nutils.setText = ( function() {\n var setTextProperty;\n function setText( elem, text ) {\n // only check setTextProperty once\n setTextProperty = setTextProperty || ( document.documentElement.textContent !== undefined ? 'textContent' : 'innerText' );\n elem[ setTextProperty ] = text;\n }\n return setText;\n})();\n\n// ----- getParent ----- //\n\nutils.getParent = function( elem, selector ) {\n while ( elem != document.body ) {\n elem = elem.parentNode;\n if ( matchesSelector( elem, selector ) ) {\n return elem;\n }\n }\n};\n\n// ----- getQueryElement ----- //\n\n// use element as selector string\nutils.getQueryElement = function( elem ) {\n if ( typeof elem == 'string' ) {\n return document.querySelector( elem );\n }\n return elem;\n};\n\n// ----- handleEvent ----- //\n\n// enable .ontype to trigger from .addEventListener( elem, 'type' )\nutils.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\n// ----- filterFindElements ----- //\n\nutils.filterFindElements = function( elems, selector ) {\n // make array of elems\n elems = utils.makeArray( elems );\n var ffElems = [];\n\n for ( var i=0, len = elems.length; i < len; i++ ) {\n var elem = elems[i];\n // check that elem is an actual element\n if ( !utils.isElement( elem ) ) {\n continue;\n }\n // filter & find items if we have a selector\n if ( selector ) {\n // filter siblings\n if ( matchesSelector( elem, selector ) ) {\n ffElems.push( elem );\n }\n // find children\n var childElems = elem.querySelectorAll( selector );\n // concat childElems to filterFound array\n for ( var j=0, jLen = childElems.length; j < jLen; j++ ) {\n ffElems.push( childElems[j] );\n }\n } else {\n ffElems.push( elem );\n }\n }\n\n return ffElems;\n};\n\n// ----- debounceMethod ----- //\n\nutils.debounceMethod = function( _class, methodName, threshold ) {\n // original method\n var method = _class.prototype[ methodName ];\n var timeoutName = methodName + 'Timeout';\n\n _class.prototype[ methodName ] = function() {\n var timeout = this[ timeoutName ];\n if ( timeout ) {\n clearTimeout( timeout );\n }\n var args = arguments;\n\n var _this = this;\n this[ timeoutName ] = setTimeout( function() {\n method.apply( _this, args );\n delete _this[ timeoutName ];\n }, threshold || 100 );\n };\n};\n\n// ----- htmlInit ----- //\n\n// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/\nutils.toDashed = function( str ) {\n return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {\n return $1 + '-' + $2;\n }).toLowerCase();\n};\n\nvar console = window.console;\n/**\n * allow user to initialize classes via .js-namespace class\n * htmlInit( Widget, 'widgetName' )\n * options are parsed from data-namespace-option attribute\n */\nutils.htmlInit = function( WidgetClass, namespace ) {\n docReady( function() {\n var dashedNamespace = utils.toDashed( namespace );\n var elems = document.querySelectorAll( '.js-' + dashedNamespace );\n var dataAttr = 'data-' + dashedNamespace + '-options';\n\n for ( var i=0, len = elems.length; i < len; i++ ) {\n var elem = elems[i];\n var attr = elem.getAttribute( dataAttr );\n var options;\n try {\n options = attr && JSON.parse( attr );\n } catch ( error ) {\n // log error, do not initialize\n if ( console ) {\n console.error( 'Error parsing ' + dataAttr + ' on ' +\n elem.nodeName.toLowerCase() + ( elem.id ? '#' + elem.id : '' ) + ': ' +\n error );\n }\n continue;\n }\n // initialize\n var instance = new WidgetClass( elem, options );\n // make available via $().data('layoutname')\n var jQuery = window.jQuery;\n if ( jQuery ) {\n jQuery.data( elem, namespace, instance );\n }\n }\n });\n};\n\n// ----- ----- //\n\nreturn utils;\n\n}));\n","/*!\n * Unidragger v1.1.5\n * Draggable base class\n * MIT license\n */\n\n/*jshint browser: true, unused: true, undef: true, strict: true */\n\n( function( window, factory ) {\n /*global define: false, module: false, require: false */\n 'use strict';\n // universal module definition\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'eventie/eventie',\n 'unipointer/unipointer'\n ], function( eventie, Unipointer ) {\n return factory( window, eventie, Unipointer );\n });\n } else if ( typeof exports == 'object' ) {\n // CommonJS\n module.exports = factory(\n window,\n require('eventie'),\n require('unipointer')\n );\n } else {\n // browser global\n window.Unidragger = factory(\n window,\n window.eventie,\n window.Unipointer\n );\n }\n\n}( window, function factory( window, eventie, Unipointer ) {\n\n'use strict';\n\n// ----- ----- //\n\nfunction noop() {}\n\n// handle IE8 prevent default\nfunction preventDefaultEvent( event ) {\n if ( event.preventDefault ) {\n event.preventDefault();\n } else {\n event.returnValue = false;\n }\n}\n\n// -------------------------- Unidragger -------------------------- //\n\nfunction Unidragger() {}\n\n// inherit Unipointer & EventEmitter\nUnidragger.prototype = new Unipointer();\n\n// ----- bind start ----- //\n\nUnidragger.prototype.bindHandles = function() {\n this._bindHandles( true );\n};\n\nUnidragger.prototype.unbindHandles = function() {\n this._bindHandles( false );\n};\n\nvar navigator = window.navigator;\n/**\n * works as unbinder, as you can .bindHandles( false ) to unbind\n * @param {Boolean} isBind - will unbind if falsey\n */\nUnidragger.prototype._bindHandles = function( isBind ) {\n // munge isBind, default to true\n isBind = isBind === undefined ? true : !!isBind;\n // extra bind logic\n var binderExtra;\n if ( navigator.pointerEnabled ) {\n binderExtra = function( handle ) {\n // disable scrolling on the element\n handle.style.touchAction = isBind ? 'none' : '';\n };\n } else if ( navigator.msPointerEnabled ) {\n binderExtra = function( handle ) {\n // disable scrolling on the element\n handle.style.msTouchAction = isBind ? 'none' : '';\n };\n } else {\n binderExtra = function() {\n // TODO re-enable img.ondragstart when unbinding\n if ( isBind ) {\n disableImgOndragstart( handle );\n }\n };\n }\n // bind each handle\n var bindMethod = isBind ? 'bind' : 'unbind';\n for ( var i=0, len = this.handles.length; i < len; i++ ) {\n var handle = this.handles[i];\n this._bindStartEvent( handle, isBind );\n binderExtra( handle );\n eventie[ bindMethod ]( handle, 'click', this );\n }\n};\n\n// remove default dragging interaction on all images in IE8\n// IE8 does its own drag thing on images, which messes stuff up\n\nfunction noDragStart() {\n return false;\n}\n\n// TODO replace this with a IE8 test\nvar isIE8 = 'attachEvent' in document.documentElement;\n\n// IE8 only\nvar disableImgOndragstart = !isIE8 ? noop : function( handle ) {\n\n if ( handle.nodeName == 'IMG' ) {\n handle.ondragstart = noDragStart;\n }\n\n var images = handle.querySelectorAll('img');\n for ( var i=0, len = images.length; i < len; i++ ) {\n var img = images[i];\n img.ondragstart = noDragStart;\n }\n};\n\n// ----- start event ----- //\n\n/**\n * pointer start\n * @param {Event} event\n * @param {Event or Touch} pointer\n */\nUnidragger.prototype.pointerDown = function( event, pointer ) {\n // dismiss range sliders\n if ( event.target.nodeName == 'INPUT' && event.target.type == 'range' ) {\n // reset pointerDown logic\n this.isPointerDown = false;\n delete this.pointerIdentifier;\n return;\n }\n\n this._dragPointerDown( event, pointer );\n // kludge to blur focused inputs in dragger\n var focused = document.activeElement;\n if ( focused && focused.blur ) {\n focused.blur();\n }\n // bind move and end events\n this._bindPostStartEvents( event );\n // track scrolling\n this.pointerDownScroll = Unidragger.getScrollPosition();\n eventie.bind( window, 'scroll', this );\n\n this.emitEvent( 'pointerDown', [ event, pointer ] );\n};\n\n// base pointer down logic\nUnidragger.prototype._dragPointerDown = function( event, pointer ) {\n // track to see when dragging starts\n this.pointerDownPoint = Unipointer.getPointerPoint( pointer );\n\n // prevent default, unless touchstart or s and