' +
+ '
' +
+ '
';
+
+ parent = getParent( treeNotInDocument.querySelector('.a1'), '.not-found' );
+
+ assert.ok(
+ parent === undefined,
+ 'Parent should be `undefined` even when the given tree is not in the document'
+ );
+
+});
diff --git a/node_modules/fizzy-ui-utils/test/unit/html-init.js b/node_modules/fizzy-ui-utils/test/unit/html-init.js
new file mode 100644
index 00000000..7dca69b3
--- /dev/null
+++ b/node_modules/fizzy-ui-utils/test/unit/html-init.js
@@ -0,0 +1,23 @@
+QUnit.test( 'htmlInit', function( assert ) {
+
+ fizzyUIUtils.htmlInit( NiceGreeter, 'niceGreeter' );
+
+ var done = assert.async();
+ fizzyUIUtils.docReady( function() {
+ var greeterElems = document.querySelectorAll('[data-greeter-expected]');
+ for ( var i=0; i < greeterElems.length; i++ ) {
+ var greeterElem = greeterElems[i];
+ var attr = greeterElem.getAttribute('data-greeter-expected');
+ assert.equal( greeterElem.textContent, attr, 'textContent matches options' );
+ }
+ done();
+ });
+
+});
+
+function NiceGreeter( elem, options ) {
+ this.element = elem;
+ var greeting = options && options.greeting || 'hello';
+ var recipient = options && options.recipient || 'world';
+ this.element.textContent = greeting + ' ' + recipient;
+}
diff --git a/node_modules/fizzy-ui-utils/test/unit/make-array.js b/node_modules/fizzy-ui-utils/test/unit/make-array.js
new file mode 100644
index 00000000..a87cbefd
--- /dev/null
+++ b/node_modules/fizzy-ui-utils/test/unit/make-array.js
@@ -0,0 +1,34 @@
+QUnit.test( 'makeArray', function( assert ) {
+
+ var makeArray = fizzyUIUtils.makeArray;
+
+ var aryA = [ 0, 1, 2 ];
+ var aryB = makeArray( aryA );
+ assert.deepEqual( aryA, aryB, 'makeArray on array returns same array' );
+
+ var itemElems = document.querySelectorAll('.grid-a .item');
+ var items = makeArray( itemElems );
+ assert.ok( Array.isArray( items ), 'makeArray on querySelectorAll NodeList' );
+ assert.equal( items.length, itemElems.length, 'length matches' );
+
+ var grids = makeArray( document.querySelector('.grid-a') );
+ assert.ok( Array.isArray( grids ), 'makeArray on single element is array' );
+ assert.equal( grids.length, 1, 'length = 1' );
+
+ var empty = makeArray();
+ assert.deepEqual( empty, [], 'makeArray on undefined is empty array' );
+ assert.equal( empty.length, 0, 'length = 0' );
+ assert.ok( empty[0] === undefined, '[0] is undefined' );
+
+ // isotope#1235
+ var aryC = makeArray('foo');
+ assert.deepEqual( aryC, [ 'foo' ], 'string turns to single array item' );
+
+ var nullAry = makeArray( null );
+ assert.deepEqual( nullAry, [], 'makeArray(null) returns empty array' );
+
+ var falseAry = makeArray( false );
+ assert.deepEqual( falseAry, [ false ], 'makeArray(false) returns array with false' );
+ assert.equal( falseAry.length, 1, 'falseyAry has 1 item' );
+
+});
diff --git a/node_modules/fizzy-ui-utils/test/unit/remove-from.js b/node_modules/fizzy-ui-utils/test/unit/remove-from.js
new file mode 100644
index 00000000..61306a4b
--- /dev/null
+++ b/node_modules/fizzy-ui-utils/test/unit/remove-from.js
@@ -0,0 +1,14 @@
+QUnit.test( 'removeFrom', function( assert ) {
+
+ var removeFrom = fizzyUIUtils.removeFrom;
+
+ var ary = [ 0, 1, 2, 3, 4, 5, 6 ];
+ var len = ary.length;
+
+ removeFrom( ary, 2 );
+ var ary2 = [ 0, 1, 3, 4, 5, 6 ];
+ assert.deepEqual( ary, ary2, '2 removed' );
+ removeFrom( ary, 8 );
+ assert.deepEqual( ary, ary2, '8 not removed' );
+
+});
diff --git a/node_modules/fizzy-ui-utils/utils.js b/node_modules/fizzy-ui-utils/utils.js
new file mode 100644
index 00000000..7f2a09cc
--- /dev/null
+++ b/node_modules/fizzy-ui-utils/utils.js
@@ -0,0 +1,241 @@
+/**
+ * Fizzy UI utils v2.0.7
+ * MIT license
+ */
+
+/*jshint browser: true, undef: true, unused: true, strict: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /*jshint strict: false */ /*globals define, module, require */
+
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'desandro-matches-selector/matches-selector'
+ ], function( matchesSelector ) {
+ return factory( window, matchesSelector );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('desandro-matches-selector')
+ );
+ } else {
+ // browser global
+ window.fizzyUIUtils = factory(
+ window,
+ window.matchesSelector
+ );
+ }
+
+}( window, function factory( window, matchesSelector ) {
+
+'use strict';
+
+var utils = {};
+
+// ----- extend ----- //
+
+// extends objects
+utils.extend = function( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+};
+
+// ----- modulo ----- //
+
+utils.modulo = function( num, div ) {
+ return ( ( num % div ) + div ) % div;
+};
+
+// ----- makeArray ----- //
+
+var arraySlice = Array.prototype.slice;
+
+// turn element or nodeList into an array
+utils.makeArray = function( obj ) {
+ if ( Array.isArray( obj ) ) {
+ // use object if already an array
+ return obj;
+ }
+ // return empty array if undefined or null. #6
+ if ( obj === null || obj === undefined ) {
+ return [];
+ }
+
+ var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
+ if ( isArrayLike ) {
+ // convert nodeList to array
+ return arraySlice.call( obj );
+ }
+
+ // array of single index
+ return [ obj ];
+};
+
+// ----- removeFrom ----- //
+
+utils.removeFrom = function( ary, obj ) {
+ var index = ary.indexOf( obj );
+ if ( index != -1 ) {
+ ary.splice( index, 1 );
+ }
+};
+
+// ----- getParent ----- //
+
+utils.getParent = function( elem, selector ) {
+ while ( elem.parentNode && elem != document.body ) {
+ elem = elem.parentNode;
+ if ( matchesSelector( elem, selector ) ) {
+ return elem;
+ }
+ }
+};
+
+// ----- getQueryElement ----- //
+
+// use element as selector string
+utils.getQueryElement = function( elem ) {
+ if ( typeof elem == 'string' ) {
+ return document.querySelector( elem );
+ }
+ return elem;
+};
+
+// ----- handleEvent ----- //
+
+// enable .ontype to trigger from .addEventListener( elem, 'type' )
+utils.handleEvent = function( event ) {
+ var method = 'on' + event.type;
+ if ( this[ method ] ) {
+ this[ method ]( event );
+ }
+};
+
+// ----- filterFindElements ----- //
+
+utils.filterFindElements = function( elems, selector ) {
+ // make array of elems
+ elems = utils.makeArray( elems );
+ var ffElems = [];
+
+ elems.forEach( function( elem ) {
+ // check that elem is an actual element
+ if ( !( elem instanceof HTMLElement ) ) {
+ return;
+ }
+ // add elem if no selector
+ if ( !selector ) {
+ ffElems.push( elem );
+ return;
+ }
+ // filter & find items if we have a selector
+ // filter
+ if ( matchesSelector( elem, selector ) ) {
+ ffElems.push( elem );
+ }
+ // find children
+ var childElems = elem.querySelectorAll( selector );
+ // concat childElems to filterFound array
+ for ( var i=0; i < childElems.length; i++ ) {
+ ffElems.push( childElems[i] );
+ }
+ });
+
+ return ffElems;
+};
+
+// ----- debounceMethod ----- //
+
+utils.debounceMethod = function( _class, methodName, threshold ) {
+ threshold = threshold || 100;
+ // original method
+ var method = _class.prototype[ methodName ];
+ var timeoutName = methodName + 'Timeout';
+
+ _class.prototype[ methodName ] = function() {
+ var timeout = this[ timeoutName ];
+ clearTimeout( timeout );
+
+ var args = arguments;
+ var _this = this;
+ this[ timeoutName ] = setTimeout( function() {
+ method.apply( _this, args );
+ delete _this[ timeoutName ];
+ }, threshold );
+ };
+};
+
+// ----- docReady ----- //
+
+utils.docReady = function( callback ) {
+ var readyState = document.readyState;
+ if ( readyState == 'complete' || readyState == 'interactive' ) {
+ // do async to allow for other scripts to run. metafizzy/flickity#441
+ setTimeout( callback );
+ } else {
+ document.addEventListener( 'DOMContentLoaded', callback );
+ }
+};
+
+// ----- htmlInit ----- //
+
+// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
+utils.toDashed = function( str ) {
+ return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
+ return $1 + '-' + $2;
+ }).toLowerCase();
+};
+
+var console = window.console;
+/**
+ * allow user to initialize classes via [data-namespace] or .js-namespace class
+ * htmlInit( Widget, 'widgetName' )
+ * options are parsed from data-namespace-options
+ */
+utils.htmlInit = function( WidgetClass, namespace ) {
+ utils.docReady( function() {
+ var dashedNamespace = utils.toDashed( namespace );
+ var dataAttr = 'data-' + dashedNamespace;
+ var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
+ var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
+ var elems = utils.makeArray( dataAttrElems )
+ .concat( utils.makeArray( jsDashElems ) );
+ var dataOptionsAttr = dataAttr + '-options';
+ var jQuery = window.jQuery;
+
+ elems.forEach( function( elem ) {
+ var attr = elem.getAttribute( dataAttr ) ||
+ elem.getAttribute( dataOptionsAttr );
+ var options;
+ try {
+ options = attr && JSON.parse( attr );
+ } catch ( error ) {
+ // log error, do not initialize
+ if ( console ) {
+ console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
+ ': ' + error );
+ }
+ return;
+ }
+ // initialize
+ var instance = new WidgetClass( elem, options );
+ // make available via $().data('namespace')
+ if ( jQuery ) {
+ jQuery.data( elem, namespace, instance );
+ }
+ });
+
+ });
+};
+
+// ----- ----- //
+
+return utils;
+
+}));
diff --git a/node_modules/flickity/.DS_Store b/node_modules/flickity/.DS_Store
new file mode 100644
index 00000000..8fc80ec3
Binary files /dev/null and b/node_modules/flickity/.DS_Store differ
diff --git a/node_modules/flickity/.github/contributing.md b/node_modules/flickity/.github/contributing.md
new file mode 100644
index 00000000..cf3cf25b
--- /dev/null
+++ b/node_modules/flickity/.github/contributing.md
@@ -0,0 +1,32 @@
+## Submitting issues
+
+### Reduced test case required
+
+All bug reports and problem issues require a [**reduced test case**](https://css-tricks.com/reduced-test-cases/). Create one by forking any one of the [CodePen demos](https://codepen.io/desandro/pens/tags/?grid_type=list&selected_tag=flickity-docs&sort_order=asc) from [the docs](https://flickity.metafizzy.co).
+
+**CodePens**
+
++ [Basic](https://codepen.io/desandro/pen/azqbop)
++ [imagesLoaded](https://codepen.io/desandro/pen/MYQWEe)
++ [lazyLoad](https://codepen.io/desandro/pen/vOeGzL)
++ [autoPlay](https://codepen.io/desandro/pen/RNQwaB)
+
+**Test cases**
+
++ A reduced test case clearly demonstrates the bug or issue.
++ It contains the bare minimum HTML, CSS, and JavaScript required to demonstrate the bug.
++ A link to your production site is **not** a reduced test case.
+
+Providing a reduced test case is the best way to get your issue addressed. They help you point out the problem. They help me verify and debug the problem. They help others understand the problem. Without a reduced test case, your issue may be closed.
+
+## Pull requests
+
+Contributions are welcome!
+
++ **For typos and one-line fixes,** send those right in.
++ **For larger features,** open an issue before starting any significant work. Let's discuss to see how your feature fits within Flickity's vision.
++ **Follow the code style.** Spaces in brackets, semicolons, trailing commas.
++ **Do not edit `dist/` files.** Make your edits to source files in `js/` and `css/`.
++ **Do not run `gulp` to update `dist/` files.** I'll take care of this when I create a new release.
+
+Your code will be used as part of a commercial product if merged. By submitting a Pull Request, you are giving your consent for your code to be integrated into Flickity as part of a commercial product.
diff --git a/node_modules/flickity/.github/issue_template.md b/node_modules/flickity/.github/issue_template.md
new file mode 100644
index 00000000..83055320
--- /dev/null
+++ b/node_modules/flickity/.github/issue_template.md
@@ -0,0 +1,3 @@
+
+
+**Test case:** https://codepen.io/desandro/pen/azqbop
diff --git a/node_modules/flickity/.jshintrc b/node_modules/flickity/.jshintrc
new file mode 100644
index 00000000..a0d09a5d
--- /dev/null
+++ b/node_modules/flickity/.jshintrc
@@ -0,0 +1,12 @@
+{
+ "browser": true,
+ "devel": false,
+ "strict": true,
+ "undef": true,
+ "unused": true,
+ "predef": {
+ "define": false,
+ "module": false,
+ "require": false
+ }
+}
diff --git a/node_modules/flickity/README.md b/node_modules/flickity/README.md
new file mode 100644
index 00000000..76de7cac
--- /dev/null
+++ b/node_modules/flickity/README.md
@@ -0,0 +1,150 @@
+# Flickity
+
+_Touch, responsive, flickable carousels_
+
+See [flickity.metafizzy.co](https://flickity.metafizzy.co) for complete docs and demos.
+
+## Install
+
+### Download
+
++ CSS:
+ - [flickity.min.css](https://unpkg.com/flickity@2/dist/flickity.min.css) minified, or
+ - [flickity.css](https://unpkg.com/flickity@2/dist/flickity.css) un-minified
++ JavaScript:
+ - [flickity.pkgd.min.js](https://unpkg.com/flickity@2/dist/flickity.pkgd.min.js) minified, or
+ - [flickity.pkgd.js](https://unpkg.com/flickity@2/dist/flickity.pkgd.js) un-minified
+
+### CDN
+
+Link directly to Flickity files on [unpkg](https://unpkg.com).
+
+``` html
+
+```
+
+``` html
+
+```
+
+### Package managers
+
+Bower: `bower install flickity --save`
+
+npm: `npm install flickity --save`
+
+## License
+
+### Commercial license
+
+If you want to use Flickity to develop commercial sites, themes, projects, and applications, the Commercial license is the appropriate license. With this option, your source code is kept proprietary. Purchase a Flickity Commercial License at [flickity.metafizzy.co](https://flickity.metafizzy.co/#commercial-license)
+
+### Open source license
+
+If you are creating an open source application under a license compatible with the [GNU GPL license v3](https://www.gnu.org/licenses/gpl-3.0.html), you may use Flickity under the terms of the GPLv3.
+
+[Read more about Flickity's license](https://flickity.metafizzy.co/license.html).
+
+## Usage
+
+Flickity works with a container element and a set of child cell elements
+
+``` html
+
+
...
+
...
+
...
+ ...
+
+```
+
+### Options
+
+``` js
+var flky = new Flickity( '.gallery', {
+ // options, defaults listed
+
+ accessibility: true,
+ // enable keyboard navigation, pressing left & right keys
+
+ adaptiveHeight: false,
+ // set carousel height to the selected slide
+
+ autoPlay: false,
+ // advances to the next cell
+ // if true, default is 3 seconds
+ // or set time between advances in milliseconds
+ // i.e. `autoPlay: 1000` will advance every 1 second
+
+ cellAlign: 'center',
+ // alignment of cells, 'center', 'left', or 'right'
+ // or a decimal 0-1, 0 is beginning (left) of container, 1 is end (right)
+
+ cellSelector: undefined,
+ // specify selector for cell elements
+
+ contain: false,
+ // will contain cells to container
+ // so no excess scroll at beginning or end
+ // has no effect if wrapAround is enabled
+
+ draggable: '>1',
+ // enables dragging & flicking
+ // if at least 2 cells
+
+ dragThreshold: 3,
+ // number of pixels a user must scroll horizontally to start dragging
+ // increase to allow more room for vertical scroll for touch devices
+
+ freeScroll: false,
+ // enables content to be freely scrolled and flicked
+ // without aligning cells
+
+ friction: 0.2,
+ // smaller number = easier to flick farther
+
+ groupCells: false,
+ // group cells together in slides
+
+ initialIndex: 0,
+ // zero-based index of the initial selected cell
+
+ lazyLoad: true,
+ // enable lazy-loading images
+ // set img data-flickity-lazyload="src.jpg"
+ // set to number to load images adjacent cells
+
+ percentPosition: true,
+ // sets positioning in percent values, rather than pixels
+ // Enable if items have percent widths
+ // Disable if items have pixel widths, like images
+
+ prevNextButtons: true,
+ // creates and enables buttons to click to previous & next cells
+
+ pageDots: true,
+ // create and enable page dots
+
+ resize: true,
+ // listens to window resize events to adjust size & positions
+
+ rightToLeft: false,
+ // enables right-to-left layout
+
+ setGallerySize: true,
+ // sets the height of gallery
+ // disable if gallery already has height set with CSS
+
+ watchCSS: false,
+ // watches the content of :after of the element
+ // activates if #element:after { content: 'flickity' }
+
+ wrapAround: false
+ // at end of cells, wraps-around to first for infinite scrolling
+
+});
+```
+
+---
+
+By [Metafizzy 🌈🐻](https://metafizzy.co)
diff --git a/node_modules/flickity/bower.json b/node_modules/flickity/bower.json
new file mode 100644
index 00000000..16f3da75
--- /dev/null
+++ b/node_modules/flickity/bower.json
@@ -0,0 +1,43 @@
+{
+ "name": "flickity",
+ "description": "Touch, responsive, flickable carousels",
+ "main": [
+ "js/index.js",
+ "css/flickity.css"
+ ],
+ "dependencies": {
+ "desandro-matches-selector": "^2.0.0",
+ "ev-emitter": "^1.0.2",
+ "fizzy-ui-utils": "^2.0.0",
+ "get-size": "^2.0.0",
+ "unidragger": "^2.3.0",
+ "unipointer": "^2.3.0"
+ },
+ "devDependencies": {
+ "flickity-imagesloaded": "^2.0.0",
+ "flickity-as-nav-for": "^2.0.0",
+ "jquery-bridget": "^2.0.0",
+ "qunit": "^2.0.0"
+ },
+ "keywords": [
+ "gallery",
+ "carousel",
+ "touch"
+ ],
+ "homepage": "https://flickity.metafizzy.co",
+ "authors": [
+ "Metafizzy"
+ ],
+ "license": "GPL-3.0",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests",
+ "sandbox",
+ "package.json",
+ "gulpfile.js",
+ "notes.md"
+ ]
+}
diff --git a/node_modules/flickity/css/flickity.css b/node_modules/flickity/css/flickity.css
new file mode 100644
index 00000000..7a947f83
--- /dev/null
+++ b/node_modules/flickity/css/flickity.css
@@ -0,0 +1,137 @@
+/*! Flickity v2.2.1
+https://flickity.metafizzy.co
+---------------------------------------------- */
+
+.flickity-enabled {
+ position: relative;
+}
+
+.flickity-enabled:focus { outline: none; }
+
+.flickity-viewport {
+ overflow: hidden;
+ position: relative;
+ height: 100%;
+}
+
+.flickity-slider {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+/* draggable */
+
+.flickity-enabled.is-draggable {
+ -webkit-tap-highlight-color: transparent;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.flickity-enabled.is-draggable .flickity-viewport {
+ cursor: move;
+ cursor: -webkit-grab;
+ cursor: grab;
+}
+
+.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {
+ cursor: -webkit-grabbing;
+ cursor: grabbing;
+}
+
+/* ---- flickity-button ---- */
+
+.flickity-button {
+ position: absolute;
+ background: hsla(0, 0%, 100%, 0.75);
+ border: none;
+ color: #333;
+}
+
+.flickity-button:hover {
+ background: white;
+ cursor: pointer;
+}
+
+.flickity-button:focus {
+ outline: none;
+ box-shadow: 0 0 0 5px #19F;
+}
+
+.flickity-button:active {
+ opacity: 0.6;
+}
+
+.flickity-button:disabled {
+ opacity: 0.3;
+ cursor: auto;
+ /* prevent disabled button from capturing pointer up event. #716 */
+ pointer-events: none;
+}
+
+.flickity-button-icon {
+ fill: currentColor;
+}
+
+/* ---- previous/next buttons ---- */
+
+.flickity-prev-next-button {
+ top: 50%;
+ width: 44px;
+ height: 44px;
+ border-radius: 50%;
+ /* vertically center */
+ transform: translateY(-50%);
+}
+
+.flickity-prev-next-button.previous { left: 10px; }
+.flickity-prev-next-button.next { right: 10px; }
+/* right to left */
+.flickity-rtl .flickity-prev-next-button.previous {
+ left: auto;
+ right: 10px;
+}
+.flickity-rtl .flickity-prev-next-button.next {
+ right: auto;
+ left: 10px;
+}
+
+.flickity-prev-next-button .flickity-button-icon {
+ position: absolute;
+ left: 20%;
+ top: 20%;
+ width: 60%;
+ height: 60%;
+}
+
+/* ---- page dots ---- */
+
+.flickity-page-dots {
+ position: absolute;
+ width: 100%;
+ bottom: -25px;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ text-align: center;
+ line-height: 1;
+}
+
+.flickity-rtl .flickity-page-dots { direction: rtl; }
+
+.flickity-page-dots .dot {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 0 8px;
+ background: #333;
+ border-radius: 50%;
+ opacity: 0.25;
+ cursor: pointer;
+}
+
+.flickity-page-dots .dot.is-selected {
+ opacity: 1;
+}
diff --git a/node_modules/flickity/dist/flickity.css b/node_modules/flickity/dist/flickity.css
new file mode 100644
index 00000000..7a947f83
--- /dev/null
+++ b/node_modules/flickity/dist/flickity.css
@@ -0,0 +1,137 @@
+/*! Flickity v2.2.1
+https://flickity.metafizzy.co
+---------------------------------------------- */
+
+.flickity-enabled {
+ position: relative;
+}
+
+.flickity-enabled:focus { outline: none; }
+
+.flickity-viewport {
+ overflow: hidden;
+ position: relative;
+ height: 100%;
+}
+
+.flickity-slider {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+/* draggable */
+
+.flickity-enabled.is-draggable {
+ -webkit-tap-highlight-color: transparent;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.flickity-enabled.is-draggable .flickity-viewport {
+ cursor: move;
+ cursor: -webkit-grab;
+ cursor: grab;
+}
+
+.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {
+ cursor: -webkit-grabbing;
+ cursor: grabbing;
+}
+
+/* ---- flickity-button ---- */
+
+.flickity-button {
+ position: absolute;
+ background: hsla(0, 0%, 100%, 0.75);
+ border: none;
+ color: #333;
+}
+
+.flickity-button:hover {
+ background: white;
+ cursor: pointer;
+}
+
+.flickity-button:focus {
+ outline: none;
+ box-shadow: 0 0 0 5px #19F;
+}
+
+.flickity-button:active {
+ opacity: 0.6;
+}
+
+.flickity-button:disabled {
+ opacity: 0.3;
+ cursor: auto;
+ /* prevent disabled button from capturing pointer up event. #716 */
+ pointer-events: none;
+}
+
+.flickity-button-icon {
+ fill: currentColor;
+}
+
+/* ---- previous/next buttons ---- */
+
+.flickity-prev-next-button {
+ top: 50%;
+ width: 44px;
+ height: 44px;
+ border-radius: 50%;
+ /* vertically center */
+ transform: translateY(-50%);
+}
+
+.flickity-prev-next-button.previous { left: 10px; }
+.flickity-prev-next-button.next { right: 10px; }
+/* right to left */
+.flickity-rtl .flickity-prev-next-button.previous {
+ left: auto;
+ right: 10px;
+}
+.flickity-rtl .flickity-prev-next-button.next {
+ right: auto;
+ left: 10px;
+}
+
+.flickity-prev-next-button .flickity-button-icon {
+ position: absolute;
+ left: 20%;
+ top: 20%;
+ width: 60%;
+ height: 60%;
+}
+
+/* ---- page dots ---- */
+
+.flickity-page-dots {
+ position: absolute;
+ width: 100%;
+ bottom: -25px;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ text-align: center;
+ line-height: 1;
+}
+
+.flickity-rtl .flickity-page-dots { direction: rtl; }
+
+.flickity-page-dots .dot {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 0 8px;
+ background: #333;
+ border-radius: 50%;
+ opacity: 0.25;
+ cursor: pointer;
+}
+
+.flickity-page-dots .dot.is-selected {
+ opacity: 1;
+}
diff --git a/node_modules/flickity/dist/flickity.min.css b/node_modules/flickity/dist/flickity.min.css
new file mode 100644
index 00000000..ee124d64
--- /dev/null
+++ b/node_modules/flickity/dist/flickity.min.css
@@ -0,0 +1,4 @@
+/*! Flickity v2.2.1
+https://flickity.metafizzy.co
+---------------------------------------------- */
+.flickity-enabled{position:relative}.flickity-enabled:focus{outline:0}.flickity-viewport{overflow:hidden;position:relative;height:100%}.flickity-slider{position:absolute;width:100%;height:100%}.flickity-enabled.is-draggable{-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.flickity-enabled.is-draggable .flickity-viewport{cursor:move;cursor:-webkit-grab;cursor:grab}.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down{cursor:-webkit-grabbing;cursor:grabbing}.flickity-button{position:absolute;background:hsla(0,0%,100%,.75);border:none;color:#333}.flickity-button:hover{background:#fff;cursor:pointer}.flickity-button:focus{outline:0;box-shadow:0 0 0 5px #19f}.flickity-button:active{opacity:.6}.flickity-button:disabled{opacity:.3;cursor:auto;pointer-events:none}.flickity-button-icon{fill:currentColor}.flickity-prev-next-button{top:50%;width:44px;height:44px;border-radius:50%;transform:translateY(-50%)}.flickity-prev-next-button.previous{left:10px}.flickity-prev-next-button.next{right:10px}.flickity-rtl .flickity-prev-next-button.previous{left:auto;right:10px}.flickity-rtl .flickity-prev-next-button.next{right:auto;left:10px}.flickity-prev-next-button .flickity-button-icon{position:absolute;left:20%;top:20%;width:60%;height:60%}.flickity-page-dots{position:absolute;width:100%;bottom:-25px;padding:0;margin:0;list-style:none;text-align:center;line-height:1}.flickity-rtl .flickity-page-dots{direction:rtl}.flickity-page-dots .dot{display:inline-block;width:10px;height:10px;margin:0 8px;background:#333;border-radius:50%;opacity:.25;cursor:pointer}.flickity-page-dots .dot.is-selected{opacity:1}
\ No newline at end of file
diff --git a/node_modules/flickity/dist/flickity.pkgd.js b/node_modules/flickity/dist/flickity.pkgd.js
new file mode 100644
index 00000000..446f8239
--- /dev/null
+++ b/node_modules/flickity/dist/flickity.pkgd.js
@@ -0,0 +1,4586 @@
+/*!
+ * Flickity PACKAGED v2.2.1
+ * Touch, responsive, flickable carousels
+ *
+ * Licensed GPLv3 for open source use
+ * or Flickity Commercial License for commercial use
+ *
+ * https://flickity.metafizzy.co
+ * Copyright 2015-2019 Metafizzy
+ */
+
+/**
+ * Bridget makes jQuery widgets
+ * v2.0.1
+ * MIT license
+ */
+
+/* jshint browser: true, strict: true, undef: true, unused: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /*jshint strict: false */ /* globals define, module, require */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'jquery-bridget/jquery-bridget',[ 'jquery' ], function( jQuery ) {
+ return factory( window, jQuery );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('jquery')
+ );
+ } else {
+ // browser global
+ window.jQueryBridget = factory(
+ window,
+ window.jQuery
+ );
+ }
+
+}( window, function factory( window, jQuery ) {
+'use strict';
+
+// ----- utils ----- //
+
+var arraySlice = Array.prototype.slice;
+
+// helper function for logging errors
+// $.error breaks jQuery chaining
+var console = window.console;
+var logError = typeof console == 'undefined' ? function() {} :
+ function( message ) {
+ console.error( message );
+ };
+
+// ----- jQueryBridget ----- //
+
+function jQueryBridget( namespace, PluginClass, $ ) {
+ $ = $ || jQuery || window.jQuery;
+ if ( !$ ) {
+ return;
+ }
+
+ // add option method -> $().plugin('option', {...})
+ if ( !PluginClass.prototype.option ) {
+ // option setter
+ PluginClass.prototype.option = function( opts ) {
+ // bail out if not an object
+ if ( !$.isPlainObject( opts ) ){
+ return;
+ }
+ this.options = $.extend( true, this.options, opts );
+ };
+ }
+
+ // make jQuery plugin
+ $.fn[ namespace ] = function( arg0 /*, arg1 */ ) {
+ if ( typeof arg0 == 'string' ) {
+ // method call $().plugin( 'methodName', { options } )
+ // shift arguments by 1
+ var args = arraySlice.call( arguments, 1 );
+ return methodCall( this, arg0, args );
+ }
+ // just $().plugin({ options })
+ plainCall( this, arg0 );
+ return this;
+ };
+
+ // $().plugin('methodName')
+ function methodCall( $elems, methodName, args ) {
+ var returnValue;
+ var pluginMethodStr = '$().' + namespace + '("' + methodName + '")';
+
+ $elems.each( function( i, elem ) {
+ // get instance
+ var instance = $.data( elem, namespace );
+ if ( !instance ) {
+ logError( namespace + ' not initialized. Cannot call methods, i.e. ' +
+ pluginMethodStr );
+ return;
+ }
+
+ var method = instance[ methodName ];
+ if ( !method || methodName.charAt(0) == '_' ) {
+ logError( pluginMethodStr + ' is not a valid method' );
+ return;
+ }
+
+ // apply method, get return value
+ var value = method.apply( instance, args );
+ // set return value if value is returned, use only first value
+ returnValue = returnValue === undefined ? value : returnValue;
+ });
+
+ return returnValue !== undefined ? returnValue : $elems;
+ }
+
+ function plainCall( $elems, options ) {
+ $elems.each( function( i, elem ) {
+ var instance = $.data( elem, namespace );
+ if ( instance ) {
+ // set options & init
+ instance.option( options );
+ instance._init();
+ } else {
+ // initialize new instance
+ instance = new PluginClass( elem, options );
+ $.data( elem, namespace, instance );
+ }
+ });
+ }
+
+ updateJQuery( $ );
+
+}
+
+// ----- updateJQuery ----- //
+
+// set $.bridget for v1 backwards compatibility
+function updateJQuery( $ ) {
+ if ( !$ || ( $ && $.bridget ) ) {
+ return;
+ }
+ $.bridget = jQueryBridget;
+}
+
+updateJQuery( jQuery || window.jQuery );
+
+// ----- ----- //
+
+return jQueryBridget;
+
+}));
+
+/**
+ * EvEmitter v1.1.0
+ * Lil' event emitter
+ * MIT License
+ */
+
+/* jshint unused: true, undef: true, strict: true */
+
+( function( global, factory ) {
+ // universal module definition
+ /* jshint strict: false */ /* globals define, module, window */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD - RequireJS
+ define( 'ev-emitter/ev-emitter',factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS - Browserify, Webpack
+ module.exports = factory();
+ } else {
+ // Browser globals
+ global.EvEmitter = factory();
+ }
+
+}( typeof window != 'undefined' ? window : this, function() {
+
+
+
+function EvEmitter() {}
+
+var proto = EvEmitter.prototype;
+
+proto.on = function( eventName, listener ) {
+ if ( !eventName || !listener ) {
+ return;
+ }
+ // set events hash
+ var events = this._events = this._events || {};
+ // set listeners array
+ var listeners = events[ eventName ] = events[ eventName ] || [];
+ // only add once
+ if ( listeners.indexOf( listener ) == -1 ) {
+ listeners.push( listener );
+ }
+
+ return this;
+};
+
+proto.once = function( eventName, listener ) {
+ if ( !eventName || !listener ) {
+ return;
+ }
+ // add event
+ this.on( eventName, listener );
+ // set once flag
+ // set onceEvents hash
+ var onceEvents = this._onceEvents = this._onceEvents || {};
+ // set onceListeners object
+ var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};
+ // set flag
+ onceListeners[ listener ] = true;
+
+ return this;
+};
+
+proto.off = function( eventName, listener ) {
+ var listeners = this._events && this._events[ eventName ];
+ if ( !listeners || !listeners.length ) {
+ return;
+ }
+ var index = listeners.indexOf( listener );
+ if ( index != -1 ) {
+ listeners.splice( index, 1 );
+ }
+
+ return this;
+};
+
+proto.emitEvent = function( eventName, args ) {
+ var listeners = this._events && this._events[ eventName ];
+ if ( !listeners || !listeners.length ) {
+ return;
+ }
+ // copy over to avoid interference if .off() in listener
+ listeners = listeners.slice(0);
+ args = args || [];
+ // once stuff
+ var onceListeners = this._onceEvents && this._onceEvents[ eventName ];
+
+ for ( var i=0; i < listeners.length; i++ ) {
+ var listener = listeners[i]
+ var isOnce = onceListeners && onceListeners[ listener ];
+ if ( isOnce ) {
+ // remove listener
+ // remove before trigger to prevent recursion
+ this.off( eventName, listener );
+ // unset once flag
+ delete onceListeners[ listener ];
+ }
+ // trigger listener
+ listener.apply( this, args );
+ }
+
+ return this;
+};
+
+proto.allOff = function() {
+ delete this._events;
+ delete this._onceEvents;
+};
+
+return EvEmitter;
+
+}));
+
+/*!
+ * getSize v2.0.3
+ * measure size of elements
+ * MIT license
+ */
+
+/* jshint browser: true, strict: true, undef: true, unused: true */
+/* globals console: false */
+
+( function( window, factory ) {
+ /* jshint strict: false */ /* globals define, module */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'get-size/get-size',factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory();
+ } else {
+ // browser global
+ window.getSize = factory();
+ }
+
+})( window, function factory() {
+'use strict';
+
+// -------------------------- helpers -------------------------- //
+
+// get a number from a string, not a percentage
+function getStyleSize( value ) {
+ var num = parseFloat( value );
+ // not a percent like '100%', and a number
+ var isValid = value.indexOf('%') == -1 && !isNaN( num );
+ return isValid && num;
+}
+
+function noop() {}
+
+var logError = typeof console == 'undefined' ? noop :
+ function( message ) {
+ console.error( message );
+ };
+
+// -------------------------- measurements -------------------------- //
+
+var measurements = [
+ 'paddingLeft',
+ 'paddingRight',
+ 'paddingTop',
+ 'paddingBottom',
+ 'marginLeft',
+ 'marginRight',
+ 'marginTop',
+ 'marginBottom',
+ 'borderLeftWidth',
+ 'borderRightWidth',
+ 'borderTopWidth',
+ 'borderBottomWidth'
+];
+
+var measurementsLength = measurements.length;
+
+function getZeroSize() {
+ var size = {
+ width: 0,
+ height: 0,
+ innerWidth: 0,
+ innerHeight: 0,
+ outerWidth: 0,
+ outerHeight: 0
+ };
+ for ( var i=0; i < measurementsLength; i++ ) {
+ var measurement = measurements[i];
+ size[ measurement ] = 0;
+ }
+ return size;
+}
+
+// -------------------------- getStyle -------------------------- //
+
+/**
+ * getStyle, get style of element, check for Firefox bug
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
+ */
+function getStyle( elem ) {
+ var style = getComputedStyle( elem );
+ if ( !style ) {
+ logError( 'Style returned ' + style +
+ '. Are you running this code in a hidden iframe on Firefox? ' +
+ 'See https://bit.ly/getsizebug1' );
+ }
+ return style;
+}
+
+// -------------------------- setup -------------------------- //
+
+var isSetup = false;
+
+var isBoxSizeOuter;
+
+/**
+ * setup
+ * check isBoxSizerOuter
+ * do on first getSize() rather than on page load for Firefox bug
+ */
+function setup() {
+ // setup once
+ if ( isSetup ) {
+ return;
+ }
+ isSetup = true;
+
+ // -------------------------- box sizing -------------------------- //
+
+ /**
+ * Chrome & Safari measure the outer-width on style.width on border-box elems
+ * IE11 & Firefox<29 measures the inner-width
+ */
+ var div = document.createElement('div');
+ div.style.width = '200px';
+ div.style.padding = '1px 2px 3px 4px';
+ div.style.borderStyle = 'solid';
+ div.style.borderWidth = '1px 2px 3px 4px';
+ div.style.boxSizing = 'border-box';
+
+ var body = document.body || document.documentElement;
+ body.appendChild( div );
+ var style = getStyle( div );
+ // round value for browser zoom. desandro/masonry#928
+ isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
+ getSize.isBoxSizeOuter = isBoxSizeOuter;
+
+ body.removeChild( div );
+}
+
+// -------------------------- getSize -------------------------- //
+
+function getSize( elem ) {
+ setup();
+
+ // use querySeletor if elem is string
+ if ( typeof elem == 'string' ) {
+ elem = document.querySelector( elem );
+ }
+
+ // do not proceed on non-objects
+ if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
+ return;
+ }
+
+ var style = getStyle( elem );
+
+ // if hidden, everything is 0
+ if ( style.display == 'none' ) {
+ return getZeroSize();
+ }
+
+ var size = {};
+ size.width = elem.offsetWidth;
+ size.height = elem.offsetHeight;
+
+ var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
+
+ // get all measurements
+ for ( var i=0; i < measurementsLength; i++ ) {
+ var measurement = measurements[i];
+ var value = style[ measurement ];
+ var num = parseFloat( value );
+ // any 'auto', 'medium' value will be 0
+ size[ measurement ] = !isNaN( num ) ? num : 0;
+ }
+
+ var paddingWidth = size.paddingLeft + size.paddingRight;
+ var paddingHeight = size.paddingTop + size.paddingBottom;
+ var marginWidth = size.marginLeft + size.marginRight;
+ var marginHeight = size.marginTop + size.marginBottom;
+ var borderWidth = size.borderLeftWidth + size.borderRightWidth;
+ var borderHeight = size.borderTopWidth + size.borderBottomWidth;
+
+ var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
+
+ // overwrite width and height if we can get it from style
+ var styleWidth = getStyleSize( style.width );
+ if ( styleWidth !== false ) {
+ size.width = styleWidth +
+ // add padding and border unless it's already including it
+ ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
+ }
+
+ var styleHeight = getStyleSize( style.height );
+ if ( styleHeight !== false ) {
+ size.height = styleHeight +
+ // add padding and border unless it's already including it
+ ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
+ }
+
+ size.innerWidth = size.width - ( paddingWidth + borderWidth );
+ size.innerHeight = size.height - ( paddingHeight + borderHeight );
+
+ size.outerWidth = size.width + marginWidth;
+ size.outerHeight = size.height + marginHeight;
+
+ return size;
+}
+
+return getSize;
+
+});
+
+/**
+ * matchesSelector v2.0.2
+ * matchesSelector( element, '.selector' )
+ * MIT license
+ */
+
+/*jshint browser: true, strict: true, undef: true, unused: true */
+
+( function( window, factory ) {
+ /*global define: false, module: false */
+ 'use strict';
+ // universal module definition
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'desandro-matches-selector/matches-selector',factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory();
+ } else {
+ // browser global
+ window.matchesSelector = factory();
+ }
+
+}( window, function factory() {
+ 'use strict';
+
+ var matchesMethod = ( function() {
+ var ElemProto = window.Element.prototype;
+ // check for the standard method name first
+ if ( ElemProto.matches ) {
+ return 'matches';
+ }
+ // check un-prefixed
+ if ( ElemProto.matchesSelector ) {
+ return 'matchesSelector';
+ }
+ // check vendor prefixes
+ var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];
+
+ for ( var i=0; i < prefixes.length; i++ ) {
+ var prefix = prefixes[i];
+ var method = prefix + 'MatchesSelector';
+ if ( ElemProto[ method ] ) {
+ return method;
+ }
+ }
+ })();
+
+ return function matchesSelector( elem, selector ) {
+ return elem[ matchesMethod ]( selector );
+ };
+
+}));
+
+/**
+ * Fizzy UI utils v2.0.7
+ * MIT license
+ */
+
+/*jshint browser: true, undef: true, unused: true, strict: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /*jshint strict: false */ /*globals define, module, require */
+
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'fizzy-ui-utils/utils',[
+ 'desandro-matches-selector/matches-selector'
+ ], function( matchesSelector ) {
+ return factory( window, matchesSelector );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('desandro-matches-selector')
+ );
+ } else {
+ // browser global
+ window.fizzyUIUtils = factory(
+ window,
+ window.matchesSelector
+ );
+ }
+
+}( window, function factory( window, matchesSelector ) {
+
+
+
+var utils = {};
+
+// ----- extend ----- //
+
+// extends objects
+utils.extend = function( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+};
+
+// ----- modulo ----- //
+
+utils.modulo = function( num, div ) {
+ return ( ( num % div ) + div ) % div;
+};
+
+// ----- makeArray ----- //
+
+var arraySlice = Array.prototype.slice;
+
+// turn element or nodeList into an array
+utils.makeArray = function( obj ) {
+ if ( Array.isArray( obj ) ) {
+ // use object if already an array
+ return obj;
+ }
+ // return empty array if undefined or null. #6
+ if ( obj === null || obj === undefined ) {
+ return [];
+ }
+
+ var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
+ if ( isArrayLike ) {
+ // convert nodeList to array
+ return arraySlice.call( obj );
+ }
+
+ // array of single index
+ return [ obj ];
+};
+
+// ----- removeFrom ----- //
+
+utils.removeFrom = function( ary, obj ) {
+ var index = ary.indexOf( obj );
+ if ( index != -1 ) {
+ ary.splice( index, 1 );
+ }
+};
+
+// ----- getParent ----- //
+
+utils.getParent = function( elem, selector ) {
+ while ( elem.parentNode && elem != document.body ) {
+ elem = elem.parentNode;
+ if ( matchesSelector( elem, selector ) ) {
+ return elem;
+ }
+ }
+};
+
+// ----- getQueryElement ----- //
+
+// use element as selector string
+utils.getQueryElement = function( elem ) {
+ if ( typeof elem == 'string' ) {
+ return document.querySelector( elem );
+ }
+ return elem;
+};
+
+// ----- handleEvent ----- //
+
+// enable .ontype to trigger from .addEventListener( elem, 'type' )
+utils.handleEvent = function( event ) {
+ var method = 'on' + event.type;
+ if ( this[ method ] ) {
+ this[ method ]( event );
+ }
+};
+
+// ----- filterFindElements ----- //
+
+utils.filterFindElements = function( elems, selector ) {
+ // make array of elems
+ elems = utils.makeArray( elems );
+ var ffElems = [];
+
+ elems.forEach( function( elem ) {
+ // check that elem is an actual element
+ if ( !( elem instanceof HTMLElement ) ) {
+ return;
+ }
+ // add elem if no selector
+ if ( !selector ) {
+ ffElems.push( elem );
+ return;
+ }
+ // filter & find items if we have a selector
+ // filter
+ if ( matchesSelector( elem, selector ) ) {
+ ffElems.push( elem );
+ }
+ // find children
+ var childElems = elem.querySelectorAll( selector );
+ // concat childElems to filterFound array
+ for ( var i=0; i < childElems.length; i++ ) {
+ ffElems.push( childElems[i] );
+ }
+ });
+
+ return ffElems;
+};
+
+// ----- debounceMethod ----- //
+
+utils.debounceMethod = function( _class, methodName, threshold ) {
+ threshold = threshold || 100;
+ // original method
+ var method = _class.prototype[ methodName ];
+ var timeoutName = methodName + 'Timeout';
+
+ _class.prototype[ methodName ] = function() {
+ var timeout = this[ timeoutName ];
+ clearTimeout( timeout );
+
+ var args = arguments;
+ var _this = this;
+ this[ timeoutName ] = setTimeout( function() {
+ method.apply( _this, args );
+ delete _this[ timeoutName ];
+ }, threshold );
+ };
+};
+
+// ----- docReady ----- //
+
+utils.docReady = function( callback ) {
+ var readyState = document.readyState;
+ if ( readyState == 'complete' || readyState == 'interactive' ) {
+ // do async to allow for other scripts to run. metafizzy/flickity#441
+ setTimeout( callback );
+ } else {
+ document.addEventListener( 'DOMContentLoaded', callback );
+ }
+};
+
+// ----- htmlInit ----- //
+
+// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/
+utils.toDashed = function( str ) {
+ return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {
+ return $1 + '-' + $2;
+ }).toLowerCase();
+};
+
+var console = window.console;
+/**
+ * allow user to initialize classes via [data-namespace] or .js-namespace class
+ * htmlInit( Widget, 'widgetName' )
+ * options are parsed from data-namespace-options
+ */
+utils.htmlInit = function( WidgetClass, namespace ) {
+ utils.docReady( function() {
+ var dashedNamespace = utils.toDashed( namespace );
+ var dataAttr = 'data-' + dashedNamespace;
+ var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );
+ var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );
+ var elems = utils.makeArray( dataAttrElems )
+ .concat( utils.makeArray( jsDashElems ) );
+ var dataOptionsAttr = dataAttr + '-options';
+ var jQuery = window.jQuery;
+
+ elems.forEach( function( elem ) {
+ var attr = elem.getAttribute( dataAttr ) ||
+ elem.getAttribute( dataOptionsAttr );
+ var options;
+ try {
+ options = attr && JSON.parse( attr );
+ } catch ( error ) {
+ // log error, do not initialize
+ if ( console ) {
+ console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +
+ ': ' + error );
+ }
+ return;
+ }
+ // initialize
+ var instance = new WidgetClass( elem, options );
+ // make available via $().data('namespace')
+ if ( jQuery ) {
+ jQuery.data( elem, namespace, instance );
+ }
+ });
+
+ });
+};
+
+// ----- ----- //
+
+return utils;
+
+}));
+
+// Flickity.Cell
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/cell',[
+ 'get-size/get-size'
+ ], function( getSize ) {
+ return factory( window, getSize );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('get-size')
+ );
+ } else {
+ // browser global
+ window.Flickity = window.Flickity || {};
+ window.Flickity.Cell = factory(
+ window,
+ window.getSize
+ );
+ }
+
+}( window, function factory( window, getSize ) {
+
+
+
+function Cell( elem, parent ) {
+ this.element = elem;
+ this.parent = parent;
+
+ this.create();
+}
+
+var proto = Cell.prototype;
+
+proto.create = function() {
+ this.element.style.position = 'absolute';
+ this.element.setAttribute( 'aria-hidden', 'true' );
+ this.x = 0;
+ this.shift = 0;
+};
+
+proto.destroy = function() {
+ // reset style
+ this.unselect();
+ this.element.style.position = '';
+ var side = this.parent.originSide;
+ this.element.style[ side ] = '';
+};
+
+proto.getSize = function() {
+ this.size = getSize( this.element );
+};
+
+proto.setPosition = function( x ) {
+ this.x = x;
+ this.updateTarget();
+ this.renderPosition( x );
+};
+
+// setDefaultTarget v1 method, backwards compatibility, remove in v3
+proto.updateTarget = proto.setDefaultTarget = function() {
+ var marginProperty = this.parent.originSide == 'left' ? 'marginLeft' : 'marginRight';
+ this.target = this.x + this.size[ marginProperty ] +
+ this.size.width * this.parent.cellAlign;
+};
+
+proto.renderPosition = function( x ) {
+ // render position of cell with in slider
+ var side = this.parent.originSide;
+ this.element.style[ side ] = this.parent.getPositionValue( x );
+};
+
+proto.select = function() {
+ this.element.classList.add('is-selected');
+ this.element.removeAttribute('aria-hidden');
+};
+
+proto.unselect = function() {
+ this.element.classList.remove('is-selected');
+ this.element.setAttribute( 'aria-hidden', 'true' );
+};
+
+/**
+ * @param {Integer} factor - 0, 1, or -1
+**/
+proto.wrapShift = function( shift ) {
+ this.shift = shift;
+ this.renderPosition( this.x + this.parent.slideableWidth * shift );
+};
+
+proto.remove = function() {
+ this.element.parentNode.removeChild( this.element );
+};
+
+return Cell;
+
+}));
+
+// slide
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/slide',factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory();
+ } else {
+ // browser global
+ window.Flickity = window.Flickity || {};
+ window.Flickity.Slide = factory();
+ }
+
+}( window, function factory() {
+'use strict';
+
+function Slide( parent ) {
+ this.parent = parent;
+ this.isOriginLeft = parent.originSide == 'left';
+ this.cells = [];
+ this.outerWidth = 0;
+ this.height = 0;
+}
+
+var proto = Slide.prototype;
+
+proto.addCell = function( cell ) {
+ this.cells.push( cell );
+ this.outerWidth += cell.size.outerWidth;
+ this.height = Math.max( cell.size.outerHeight, this.height );
+ // first cell stuff
+ if ( this.cells.length == 1 ) {
+ this.x = cell.x; // x comes from first cell
+ var beginMargin = this.isOriginLeft ? 'marginLeft' : 'marginRight';
+ this.firstMargin = cell.size[ beginMargin ];
+ }
+};
+
+proto.updateTarget = function() {
+ var endMargin = this.isOriginLeft ? 'marginRight' : 'marginLeft';
+ var lastCell = this.getLastCell();
+ var lastMargin = lastCell ? lastCell.size[ endMargin ] : 0;
+ var slideWidth = this.outerWidth - ( this.firstMargin + lastMargin );
+ this.target = this.x + this.firstMargin + slideWidth * this.parent.cellAlign;
+};
+
+proto.getLastCell = function() {
+ return this.cells[ this.cells.length - 1 ];
+};
+
+proto.select = function() {
+ this.cells.forEach( function( cell ) {
+ cell.select();
+ });
+};
+
+proto.unselect = function() {
+ this.cells.forEach( function( cell ) {
+ cell.unselect();
+ });
+};
+
+proto.getCellElements = function() {
+ return this.cells.map( function( cell ) {
+ return cell.element;
+ });
+};
+
+return Slide;
+
+}));
+
+// animate
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/animate',[
+ 'fizzy-ui-utils/utils'
+ ], function( utils ) {
+ return factory( window, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ window.Flickity = window.Flickity || {};
+ window.Flickity.animatePrototype = factory(
+ window,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, utils ) {
+
+
+
+// -------------------------- animate -------------------------- //
+
+var proto = {};
+
+proto.startAnimation = function() {
+ if ( this.isAnimating ) {
+ return;
+ }
+
+ this.isAnimating = true;
+ this.restingFrames = 0;
+ this.animate();
+};
+
+proto.animate = function() {
+ this.applyDragForce();
+ this.applySelectedAttraction();
+
+ var previousX = this.x;
+
+ this.integratePhysics();
+ this.positionSlider();
+ this.settle( previousX );
+ // animate next frame
+ if ( this.isAnimating ) {
+ var _this = this;
+ requestAnimationFrame( function animateFrame() {
+ _this.animate();
+ });
+ }
+};
+
+proto.positionSlider = function() {
+ var x = this.x;
+ // wrap position around
+ if ( this.options.wrapAround && this.cells.length > 1 ) {
+ x = utils.modulo( x, this.slideableWidth );
+ x = x - this.slideableWidth;
+ this.shiftWrapCells( x );
+ }
+
+ this.setTranslateX( x, this.isAnimating );
+ this.dispatchScrollEvent();
+};
+
+proto.setTranslateX = function( x, is3d ) {
+ x += this.cursorPosition;
+ // reverse if right-to-left and using transform
+ x = this.options.rightToLeft ? -x : x;
+ var translateX = this.getPositionValue( x );
+ // use 3D tranforms for hardware acceleration on iOS
+ // but use 2D when settled, for better font-rendering
+ this.slider.style.transform = is3d ?
+ 'translate3d(' + translateX + ',0,0)' : 'translateX(' + translateX + ')';
+};
+
+proto.dispatchScrollEvent = function() {
+ var firstSlide = this.slides[0];
+ if ( !firstSlide ) {
+ return;
+ }
+ var positionX = -this.x - firstSlide.target;
+ var progress = positionX / this.slidesWidth;
+ this.dispatchEvent( 'scroll', null, [ progress, positionX ] );
+};
+
+proto.positionSliderAtSelected = function() {
+ if ( !this.cells.length ) {
+ return;
+ }
+ this.x = -this.selectedSlide.target;
+ this.velocity = 0; // stop wobble
+ this.positionSlider();
+};
+
+proto.getPositionValue = function( position ) {
+ if ( this.options.percentPosition ) {
+ // percent position, round to 2 digits, like 12.34%
+ return ( Math.round( ( position / this.size.innerWidth ) * 10000 ) * 0.01 )+ '%';
+ } else {
+ // pixel positioning
+ return Math.round( position ) + 'px';
+ }
+};
+
+proto.settle = function( previousX ) {
+ // keep track of frames where x hasn't moved
+ if ( !this.isPointerDown && Math.round( this.x * 100 ) == Math.round( previousX * 100 ) ) {
+ this.restingFrames++;
+ }
+ // stop animating if resting for 3 or more frames
+ if ( this.restingFrames > 2 ) {
+ this.isAnimating = false;
+ delete this.isFreeScrolling;
+ // render position with translateX when settled
+ this.positionSlider();
+ this.dispatchEvent( 'settle', null, [ this.selectedIndex ] );
+ }
+};
+
+proto.shiftWrapCells = function( x ) {
+ // shift before cells
+ var beforeGap = this.cursorPosition + x;
+ this._shiftCells( this.beforeShiftCells, beforeGap, -1 );
+ // shift after cells
+ var afterGap = this.size.innerWidth - ( x + this.slideableWidth + this.cursorPosition );
+ this._shiftCells( this.afterShiftCells, afterGap, 1 );
+};
+
+proto._shiftCells = function( cells, gap, shift ) {
+ for ( var i=0; i < cells.length; i++ ) {
+ var cell = cells[i];
+ var cellShift = gap > 0 ? shift : 0;
+ cell.wrapShift( cellShift );
+ gap -= cell.size.outerWidth;
+ }
+};
+
+proto._unshiftCells = function( cells ) {
+ if ( !cells || !cells.length ) {
+ return;
+ }
+ for ( var i=0; i < cells.length; i++ ) {
+ cells[i].wrapShift( 0 );
+ }
+};
+
+// -------------------------- physics -------------------------- //
+
+proto.integratePhysics = function() {
+ this.x += this.velocity;
+ this.velocity *= this.getFrictionFactor();
+};
+
+proto.applyForce = function( force ) {
+ this.velocity += force;
+};
+
+proto.getFrictionFactor = function() {
+ return 1 - this.options[ this.isFreeScrolling ? 'freeScrollFriction' : 'friction' ];
+};
+
+proto.getRestingPosition = function() {
+ // my thanks to Steven Wittens, who simplified this math greatly
+ return this.x + this.velocity / ( 1 - this.getFrictionFactor() );
+};
+
+proto.applyDragForce = function() {
+ if ( !this.isDraggable || !this.isPointerDown ) {
+ return;
+ }
+ // change the position to drag position by applying force
+ var dragVelocity = this.dragX - this.x;
+ var dragForce = dragVelocity - this.velocity;
+ this.applyForce( dragForce );
+};
+
+proto.applySelectedAttraction = function() {
+ // do not attract if pointer down or no slides
+ var dragDown = this.isDraggable && this.isPointerDown;
+ if ( dragDown || this.isFreeScrolling || !this.slides.length ) {
+ return;
+ }
+ var distance = this.selectedSlide.target * -1 - this.x;
+ var force = distance * this.options.selectedAttraction;
+ this.applyForce( force );
+};
+
+return proto;
+
+}));
+
+// Flickity main
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/flickity',[
+ 'ev-emitter/ev-emitter',
+ 'get-size/get-size',
+ 'fizzy-ui-utils/utils',
+ './cell',
+ './slide',
+ './animate'
+ ], function( EvEmitter, getSize, utils, Cell, Slide, animatePrototype ) {
+ return factory( window, EvEmitter, getSize, utils, Cell, Slide, animatePrototype );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('ev-emitter'),
+ require('get-size'),
+ require('fizzy-ui-utils'),
+ require('./cell'),
+ require('./slide'),
+ require('./animate')
+ );
+ } else {
+ // browser global
+ var _Flickity = window.Flickity;
+
+ window.Flickity = factory(
+ window,
+ window.EvEmitter,
+ window.getSize,
+ window.fizzyUIUtils,
+ _Flickity.Cell,
+ _Flickity.Slide,
+ _Flickity.animatePrototype
+ );
+ }
+
+}( window, function factory( window, EvEmitter, getSize,
+ utils, Cell, Slide, animatePrototype ) {
+
+
+
+// vars
+var jQuery = window.jQuery;
+var getComputedStyle = window.getComputedStyle;
+var console = window.console;
+
+function moveElements( elems, toElem ) {
+ elems = utils.makeArray( elems );
+ while ( elems.length ) {
+ toElem.appendChild( elems.shift() );
+ }
+}
+
+// -------------------------- Flickity -------------------------- //
+
+// globally unique identifiers
+var GUID = 0;
+// internal store of all Flickity intances
+var instances = {};
+
+function Flickity( element, options ) {
+ var queryElement = utils.getQueryElement( element );
+ if ( !queryElement ) {
+ if ( console ) {
+ console.error( 'Bad element for Flickity: ' + ( queryElement || element ) );
+ }
+ return;
+ }
+ this.element = queryElement;
+ // do not initialize twice on same element
+ if ( this.element.flickityGUID ) {
+ var instance = instances[ this.element.flickityGUID ];
+ instance.option( options );
+ return instance;
+ }
+
+ // add jQuery
+ if ( jQuery ) {
+ this.$element = jQuery( this.element );
+ }
+ // options
+ this.options = utils.extend( {}, this.constructor.defaults );
+ this.option( options );
+
+ // kick things off
+ this._create();
+}
+
+Flickity.defaults = {
+ accessibility: true,
+ // adaptiveHeight: false,
+ cellAlign: 'center',
+ // cellSelector: undefined,
+ // contain: false,
+ freeScrollFriction: 0.075, // friction when free-scrolling
+ friction: 0.28, // friction when selecting
+ namespaceJQueryEvents: true,
+ // initialIndex: 0,
+ percentPosition: true,
+ resize: true,
+ selectedAttraction: 0.025,
+ setGallerySize: true
+ // watchCSS: false,
+ // wrapAround: false
+};
+
+// hash of methods triggered on _create()
+Flickity.createMethods = [];
+
+var proto = Flickity.prototype;
+// inherit EventEmitter
+utils.extend( proto, EvEmitter.prototype );
+
+proto._create = function() {
+ // add id for Flickity.data
+ var id = this.guid = ++GUID;
+ this.element.flickityGUID = id; // expando
+ instances[ id ] = this; // associate via id
+ // initial properties
+ this.selectedIndex = 0;
+ // how many frames slider has been in same position
+ this.restingFrames = 0;
+ // initial physics properties
+ this.x = 0;
+ this.velocity = 0;
+ this.originSide = this.options.rightToLeft ? 'right' : 'left';
+ // create viewport & slider
+ this.viewport = document.createElement('div');
+ this.viewport.className = 'flickity-viewport';
+ this._createSlider();
+
+ if ( this.options.resize || this.options.watchCSS ) {
+ window.addEventListener( 'resize', this );
+ }
+
+ // add listeners from on option
+ for ( var eventName in this.options.on ) {
+ var listener = this.options.on[ eventName ];
+ this.on( eventName, listener );
+ }
+
+ Flickity.createMethods.forEach( function( method ) {
+ this[ method ]();
+ }, this );
+
+ if ( this.options.watchCSS ) {
+ this.watchCSS();
+ } else {
+ this.activate();
+ }
+
+};
+
+/**
+ * set options
+ * @param {Object} opts
+ */
+proto.option = function( opts ) {
+ utils.extend( this.options, opts );
+};
+
+proto.activate = function() {
+ if ( this.isActive ) {
+ return;
+ }
+ this.isActive = true;
+ this.element.classList.add('flickity-enabled');
+ if ( this.options.rightToLeft ) {
+ this.element.classList.add('flickity-rtl');
+ }
+
+ this.getSize();
+ // move initial cell elements so they can be loaded as cells
+ var cellElems = this._filterFindCellElements( this.element.children );
+ moveElements( cellElems, this.slider );
+ this.viewport.appendChild( this.slider );
+ this.element.appendChild( this.viewport );
+ // get cells from children
+ this.reloadCells();
+
+ if ( this.options.accessibility ) {
+ // allow element to focusable
+ this.element.tabIndex = 0;
+ // listen for key presses
+ this.element.addEventListener( 'keydown', this );
+ }
+
+ this.emitEvent('activate');
+ this.selectInitialIndex();
+ // flag for initial activation, for using initialIndex
+ this.isInitActivated = true;
+ // ready event. #493
+ this.dispatchEvent('ready');
+};
+
+// slider positions the cells
+proto._createSlider = function() {
+ // slider element does all the positioning
+ var slider = document.createElement('div');
+ slider.className = 'flickity-slider';
+ slider.style[ this.originSide ] = 0;
+ this.slider = slider;
+};
+
+proto._filterFindCellElements = function( elems ) {
+ return utils.filterFindElements( elems, this.options.cellSelector );
+};
+
+// goes through all children
+proto.reloadCells = function() {
+ // collection of item elements
+ this.cells = this._makeCells( this.slider.children );
+ this.positionCells();
+ this._getWrapShiftCells();
+ this.setGallerySize();
+};
+
+/**
+ * turn elements into Flickity.Cells
+ * @param {Array or NodeList or HTMLElement} elems
+ * @returns {Array} items - collection of new Flickity Cells
+ */
+proto._makeCells = function( elems ) {
+ var cellElems = this._filterFindCellElements( elems );
+
+ // create new Flickity for collection
+ var cells = cellElems.map( function( cellElem ) {
+ return new Cell( cellElem, this );
+ }, this );
+
+ return cells;
+};
+
+proto.getLastCell = function() {
+ return this.cells[ this.cells.length - 1 ];
+};
+
+proto.getLastSlide = function() {
+ return this.slides[ this.slides.length - 1 ];
+};
+
+// positions all cells
+proto.positionCells = function() {
+ // size all cells
+ this._sizeCells( this.cells );
+ // position all cells
+ this._positionCells( 0 );
+};
+
+/**
+ * position certain cells
+ * @param {Integer} index - which cell to start with
+ */
+proto._positionCells = function( index ) {
+ index = index || 0;
+ // also measure maxCellHeight
+ // start 0 if positioning all cells
+ this.maxCellHeight = index ? this.maxCellHeight || 0 : 0;
+ var cellX = 0;
+ // get cellX
+ if ( index > 0 ) {
+ var startCell = this.cells[ index - 1 ];
+ cellX = startCell.x + startCell.size.outerWidth;
+ }
+ var len = this.cells.length;
+ for ( var i=index; i < len; i++ ) {
+ var cell = this.cells[i];
+ cell.setPosition( cellX );
+ cellX += cell.size.outerWidth;
+ this.maxCellHeight = Math.max( cell.size.outerHeight, this.maxCellHeight );
+ }
+ // keep track of cellX for wrap-around
+ this.slideableWidth = cellX;
+ // slides
+ this.updateSlides();
+ // contain slides target
+ this._containSlides();
+ // update slidesWidth
+ this.slidesWidth = len ? this.getLastSlide().target - this.slides[0].target : 0;
+};
+
+/**
+ * cell.getSize() on multiple cells
+ * @param {Array} cells
+ */
+proto._sizeCells = function( cells ) {
+ cells.forEach( function( cell ) {
+ cell.getSize();
+ });
+};
+
+// -------------------------- -------------------------- //
+
+proto.updateSlides = function() {
+ this.slides = [];
+ if ( !this.cells.length ) {
+ return;
+ }
+
+ var slide = new Slide( this );
+ this.slides.push( slide );
+ var isOriginLeft = this.originSide == 'left';
+ var nextMargin = isOriginLeft ? 'marginRight' : 'marginLeft';
+
+ var canCellFit = this._getCanCellFit();
+
+ this.cells.forEach( function( cell, i ) {
+ // just add cell if first cell in slide
+ if ( !slide.cells.length ) {
+ slide.addCell( cell );
+ return;
+ }
+
+ var slideWidth = ( slide.outerWidth - slide.firstMargin ) +
+ ( cell.size.outerWidth - cell.size[ nextMargin ] );
+
+ if ( canCellFit.call( this, i, slideWidth ) ) {
+ slide.addCell( cell );
+ } else {
+ // doesn't fit, new slide
+ slide.updateTarget();
+
+ slide = new Slide( this );
+ this.slides.push( slide );
+ slide.addCell( cell );
+ }
+ }, this );
+ // last slide
+ slide.updateTarget();
+ // update .selectedSlide
+ this.updateSelectedSlide();
+};
+
+proto._getCanCellFit = function() {
+ var groupCells = this.options.groupCells;
+ if ( !groupCells ) {
+ return function() {
+ return false;
+ };
+ } else if ( typeof groupCells == 'number' ) {
+ // group by number. 3 -> [0,1,2], [3,4,5], ...
+ var number = parseInt( groupCells, 10 );
+ return function( i ) {
+ return ( i % number ) !== 0;
+ };
+ }
+ // default, group by width of slide
+ // parse '75%
+ var percentMatch = typeof groupCells == 'string' &&
+ groupCells.match(/^(\d+)%$/);
+ var percent = percentMatch ? parseInt( percentMatch[1], 10 ) / 100 : 1;
+ return function( i, slideWidth ) {
+ return slideWidth <= ( this.size.innerWidth + 1 ) * percent;
+ };
+};
+
+// alias _init for jQuery plugin .flickity()
+proto._init =
+proto.reposition = function() {
+ this.positionCells();
+ this.positionSliderAtSelected();
+};
+
+proto.getSize = function() {
+ this.size = getSize( this.element );
+ this.setCellAlign();
+ this.cursorPosition = this.size.innerWidth * this.cellAlign;
+};
+
+var cellAlignShorthands = {
+ // cell align, then based on origin side
+ center: {
+ left: 0.5,
+ right: 0.5
+ },
+ left: {
+ left: 0,
+ right: 1
+ },
+ right: {
+ right: 0,
+ left: 1
+ }
+};
+
+proto.setCellAlign = function() {
+ var shorthand = cellAlignShorthands[ this.options.cellAlign ];
+ this.cellAlign = shorthand ? shorthand[ this.originSide ] : this.options.cellAlign;
+};
+
+proto.setGallerySize = function() {
+ if ( this.options.setGallerySize ) {
+ var height = this.options.adaptiveHeight && this.selectedSlide ?
+ this.selectedSlide.height : this.maxCellHeight;
+ this.viewport.style.height = height + 'px';
+ }
+};
+
+proto._getWrapShiftCells = function() {
+ // only for wrap-around
+ if ( !this.options.wrapAround ) {
+ return;
+ }
+ // unshift previous cells
+ this._unshiftCells( this.beforeShiftCells );
+ this._unshiftCells( this.afterShiftCells );
+ // get before cells
+ // initial gap
+ var gapX = this.cursorPosition;
+ var cellIndex = this.cells.length - 1;
+ this.beforeShiftCells = this._getGapCells( gapX, cellIndex, -1 );
+ // get after cells
+ // ending gap between last cell and end of gallery viewport
+ gapX = this.size.innerWidth - this.cursorPosition;
+ // start cloning at first cell, working forwards
+ this.afterShiftCells = this._getGapCells( gapX, 0, 1 );
+};
+
+proto._getGapCells = function( gapX, cellIndex, increment ) {
+ // keep adding cells until the cover the initial gap
+ var cells = [];
+ while ( gapX > 0 ) {
+ var cell = this.cells[ cellIndex ];
+ if ( !cell ) {
+ break;
+ }
+ cells.push( cell );
+ cellIndex += increment;
+ gapX -= cell.size.outerWidth;
+ }
+ return cells;
+};
+
+// ----- contain ----- //
+
+// contain cell targets so no excess sliding
+proto._containSlides = function() {
+ if ( !this.options.contain || this.options.wrapAround || !this.cells.length ) {
+ return;
+ }
+ var isRightToLeft = this.options.rightToLeft;
+ var beginMargin = isRightToLeft ? 'marginRight' : 'marginLeft';
+ var endMargin = isRightToLeft ? 'marginLeft' : 'marginRight';
+ var contentWidth = this.slideableWidth - this.getLastCell().size[ endMargin ];
+ // content is less than gallery size
+ var isContentSmaller = contentWidth < this.size.innerWidth;
+ // bounds
+ var beginBound = this.cursorPosition + this.cells[0].size[ beginMargin ];
+ var endBound = contentWidth - this.size.innerWidth * ( 1 - this.cellAlign );
+ // contain each cell target
+ this.slides.forEach( function( slide ) {
+ if ( isContentSmaller ) {
+ // all cells fit inside gallery
+ slide.target = contentWidth * this.cellAlign;
+ } else {
+ // contain to bounds
+ slide.target = Math.max( slide.target, beginBound );
+ slide.target = Math.min( slide.target, endBound );
+ }
+ }, this );
+};
+
+// ----- ----- //
+
+/**
+ * emits events via eventEmitter and jQuery events
+ * @param {String} type - name of event
+ * @param {Event} event - original event
+ * @param {Array} args - extra arguments
+ */
+proto.dispatchEvent = function( type, event, args ) {
+ var emitArgs = event ? [ event ].concat( args ) : args;
+ this.emitEvent( type, emitArgs );
+
+ if ( jQuery && this.$element ) {
+ // default trigger with type if no event
+ type += this.options.namespaceJQueryEvents ? '.flickity' : '';
+ var $event = type;
+ if ( event ) {
+ // create jQuery event
+ var jQEvent = jQuery.Event( event );
+ jQEvent.type = type;
+ $event = jQEvent;
+ }
+ this.$element.trigger( $event, args );
+ }
+};
+
+// -------------------------- select -------------------------- //
+
+/**
+ * @param {Integer} index - index of the slide
+ * @param {Boolean} isWrap - will wrap-around to last/first if at the end
+ * @param {Boolean} isInstant - will immediately set position at selected cell
+ */
+proto.select = function( index, isWrap, isInstant ) {
+ if ( !this.isActive ) {
+ return;
+ }
+ index = parseInt( index, 10 );
+ this._wrapSelect( index );
+
+ if ( this.options.wrapAround || isWrap ) {
+ index = utils.modulo( index, this.slides.length );
+ }
+ // bail if invalid index
+ if ( !this.slides[ index ] ) {
+ return;
+ }
+ var prevIndex = this.selectedIndex;
+ this.selectedIndex = index;
+ this.updateSelectedSlide();
+ if ( isInstant ) {
+ this.positionSliderAtSelected();
+ } else {
+ this.startAnimation();
+ }
+ if ( this.options.adaptiveHeight ) {
+ this.setGallerySize();
+ }
+ // events
+ this.dispatchEvent( 'select', null, [ index ] );
+ // change event if new index
+ if ( index != prevIndex ) {
+ this.dispatchEvent( 'change', null, [ index ] );
+ }
+ // old v1 event name, remove in v3
+ this.dispatchEvent('cellSelect');
+};
+
+// wraps position for wrapAround, to move to closest slide. #113
+proto._wrapSelect = function( index ) {
+ var len = this.slides.length;
+ var isWrapping = this.options.wrapAround && len > 1;
+ if ( !isWrapping ) {
+ return index;
+ }
+ var wrapIndex = utils.modulo( index, len );
+ // go to shortest
+ var delta = Math.abs( wrapIndex - this.selectedIndex );
+ var backWrapDelta = Math.abs( ( wrapIndex + len ) - this.selectedIndex );
+ var forewardWrapDelta = Math.abs( ( wrapIndex - len ) - this.selectedIndex );
+ if ( !this.isDragSelect && backWrapDelta < delta ) {
+ index += len;
+ } else if ( !this.isDragSelect && forewardWrapDelta < delta ) {
+ index -= len;
+ }
+ // wrap position so slider is within normal area
+ if ( index < 0 ) {
+ this.x -= this.slideableWidth;
+ } else if ( index >= len ) {
+ this.x += this.slideableWidth;
+ }
+};
+
+proto.previous = function( isWrap, isInstant ) {
+ this.select( this.selectedIndex - 1, isWrap, isInstant );
+};
+
+proto.next = function( isWrap, isInstant ) {
+ this.select( this.selectedIndex + 1, isWrap, isInstant );
+};
+
+proto.updateSelectedSlide = function() {
+ var slide = this.slides[ this.selectedIndex ];
+ // selectedIndex could be outside of slides, if triggered before resize()
+ if ( !slide ) {
+ return;
+ }
+ // unselect previous selected slide
+ this.unselectSelectedSlide();
+ // update new selected slide
+ this.selectedSlide = slide;
+ slide.select();
+ this.selectedCells = slide.cells;
+ this.selectedElements = slide.getCellElements();
+ // HACK: selectedCell & selectedElement is first cell in slide, backwards compatibility
+ // Remove in v3?
+ this.selectedCell = slide.cells[0];
+ this.selectedElement = this.selectedElements[0];
+};
+
+proto.unselectSelectedSlide = function() {
+ if ( this.selectedSlide ) {
+ this.selectedSlide.unselect();
+ }
+};
+
+proto.selectInitialIndex = function() {
+ var initialIndex = this.options.initialIndex;
+ // already activated, select previous selectedIndex
+ if ( this.isInitActivated ) {
+ this.select( this.selectedIndex, false, true );
+ return;
+ }
+ // select with selector string
+ if ( initialIndex && typeof initialIndex == 'string' ) {
+ var cell = this.queryCell( initialIndex );
+ if ( cell ) {
+ this.selectCell( initialIndex, false, true );
+ return;
+ }
+ }
+
+ var index = 0;
+ // select with number
+ if ( initialIndex && this.slides[ initialIndex ] ) {
+ index = initialIndex;
+ }
+ // select instantly
+ this.select( index, false, true );
+};
+
+/**
+ * select slide from number or cell element
+ * @param {Element or Number} elem
+ */
+proto.selectCell = function( value, isWrap, isInstant ) {
+ // get cell
+ var cell = this.queryCell( value );
+ if ( !cell ) {
+ return;
+ }
+
+ var index = this.getCellSlideIndex( cell );
+ this.select( index, isWrap, isInstant );
+};
+
+proto.getCellSlideIndex = function( cell ) {
+ // get index of slides that has cell
+ for ( var i=0; i < this.slides.length; i++ ) {
+ var slide = this.slides[i];
+ var index = slide.cells.indexOf( cell );
+ if ( index != -1 ) {
+ return i;
+ }
+ }
+};
+
+// -------------------------- get cells -------------------------- //
+
+/**
+ * get Flickity.Cell, given an Element
+ * @param {Element} elem
+ * @returns {Flickity.Cell} item
+ */
+proto.getCell = function( elem ) {
+ // loop through cells to get the one that matches
+ for ( var i=0; i < this.cells.length; i++ ) {
+ var cell = this.cells[i];
+ if ( cell.element == elem ) {
+ return cell;
+ }
+ }
+};
+
+/**
+ * get collection of Flickity.Cells, given Elements
+ * @param {Element, Array, NodeList} elems
+ * @returns {Array} cells - Flickity.Cells
+ */
+proto.getCells = function( elems ) {
+ elems = utils.makeArray( elems );
+ var cells = [];
+ elems.forEach( function( elem ) {
+ var cell = this.getCell( elem );
+ if ( cell ) {
+ cells.push( cell );
+ }
+ }, this );
+ return cells;
+};
+
+/**
+ * get cell elements
+ * @returns {Array} cellElems
+ */
+proto.getCellElements = function() {
+ return this.cells.map( function( cell ) {
+ return cell.element;
+ });
+};
+
+/**
+ * get parent cell from an element
+ * @param {Element} elem
+ * @returns {Flickit.Cell} cell
+ */
+proto.getParentCell = function( elem ) {
+ // first check if elem is cell
+ var cell = this.getCell( elem );
+ if ( cell ) {
+ return cell;
+ }
+ // try to get parent cell elem
+ elem = utils.getParent( elem, '.flickity-slider > *' );
+ return this.getCell( elem );
+};
+
+/**
+ * get cells adjacent to a slide
+ * @param {Integer} adjCount - number of adjacent slides
+ * @param {Integer} index - index of slide to start
+ * @returns {Array} cells - array of Flickity.Cells
+ */
+proto.getAdjacentCellElements = function( adjCount, index ) {
+ if ( !adjCount ) {
+ return this.selectedSlide.getCellElements();
+ }
+ index = index === undefined ? this.selectedIndex : index;
+
+ var len = this.slides.length;
+ if ( 1 + ( adjCount * 2 ) >= len ) {
+ return this.getCellElements();
+ }
+
+ var cellElems = [];
+ for ( var i = index - adjCount; i <= index + adjCount ; i++ ) {
+ var slideIndex = this.options.wrapAround ? utils.modulo( i, len ) : i;
+ var slide = this.slides[ slideIndex ];
+ if ( slide ) {
+ cellElems = cellElems.concat( slide.getCellElements() );
+ }
+ }
+ return cellElems;
+};
+
+/**
+ * select slide from number or cell element
+ * @param {Element, Selector String, or Number} selector
+ */
+proto.queryCell = function( selector ) {
+ if ( typeof selector == 'number' ) {
+ // use number as index
+ return this.cells[ selector ];
+ }
+ if ( typeof selector == 'string' ) {
+ // do not select invalid selectors from hash: #123, #/. #791
+ if ( selector.match(/^[#\.]?[\d\/]/) ) {
+ return;
+ }
+ // use string as selector, get element
+ selector = this.element.querySelector( selector );
+ }
+ // get cell from element
+ return this.getCell( selector );
+};
+
+// -------------------------- events -------------------------- //
+
+proto.uiChange = function() {
+ this.emitEvent('uiChange');
+};
+
+// keep focus on element when child UI elements are clicked
+proto.childUIPointerDown = function( event ) {
+ // HACK iOS does not allow touch events to bubble up?!
+ if ( event.type != 'touchstart' ) {
+ event.preventDefault();
+ }
+ this.focus();
+};
+
+// ----- resize ----- //
+
+proto.onresize = function() {
+ this.watchCSS();
+ this.resize();
+};
+
+utils.debounceMethod( Flickity, 'onresize', 150 );
+
+proto.resize = function() {
+ if ( !this.isActive ) {
+ return;
+ }
+ this.getSize();
+ // wrap values
+ if ( this.options.wrapAround ) {
+ this.x = utils.modulo( this.x, this.slideableWidth );
+ }
+ this.positionCells();
+ this._getWrapShiftCells();
+ this.setGallerySize();
+ this.emitEvent('resize');
+ // update selected index for group slides, instant
+ // TODO: position can be lost between groups of various numbers
+ var selectedElement = this.selectedElements && this.selectedElements[0];
+ this.selectCell( selectedElement, false, true );
+};
+
+// watches the :after property, activates/deactivates
+proto.watchCSS = function() {
+ var watchOption = this.options.watchCSS;
+ if ( !watchOption ) {
+ return;
+ }
+
+ var afterContent = getComputedStyle( this.element, ':after' ).content;
+ // activate if :after { content: 'flickity' }
+ if ( afterContent.indexOf('flickity') != -1 ) {
+ this.activate();
+ } else {
+ this.deactivate();
+ }
+};
+
+// ----- keydown ----- //
+
+// go previous/next if left/right keys pressed
+proto.onkeydown = function( event ) {
+ // only work if element is in focus
+ var isNotFocused = document.activeElement && document.activeElement != this.element;
+ if ( !this.options.accessibility ||isNotFocused ) {
+ return;
+ }
+
+ var handler = Flickity.keyboardHandlers[ event.keyCode ];
+ if ( handler ) {
+ handler.call( this );
+ }
+};
+
+Flickity.keyboardHandlers = {
+ // left arrow
+ 37: function() {
+ var leftMethod = this.options.rightToLeft ? 'next' : 'previous';
+ this.uiChange();
+ this[ leftMethod ]();
+ },
+ // right arrow
+ 39: function() {
+ var rightMethod = this.options.rightToLeft ? 'previous' : 'next';
+ this.uiChange();
+ this[ rightMethod ]();
+ },
+};
+
+// ----- focus ----- //
+
+proto.focus = function() {
+ // TODO remove scrollTo once focus options gets more support
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Browser_compatibility
+ var prevScrollY = window.pageYOffset;
+ this.element.focus({ preventScroll: true });
+ // hack to fix scroll jump after focus, #76
+ if ( window.pageYOffset != prevScrollY ) {
+ window.scrollTo( window.pageXOffset, prevScrollY );
+ }
+};
+
+// -------------------------- destroy -------------------------- //
+
+// deactivate all Flickity functionality, but keep stuff available
+proto.deactivate = function() {
+ if ( !this.isActive ) {
+ return;
+ }
+ this.element.classList.remove('flickity-enabled');
+ this.element.classList.remove('flickity-rtl');
+ this.unselectSelectedSlide();
+ // destroy cells
+ this.cells.forEach( function( cell ) {
+ cell.destroy();
+ });
+ this.element.removeChild( this.viewport );
+ // move child elements back into element
+ moveElements( this.slider.children, this.element );
+ if ( this.options.accessibility ) {
+ this.element.removeAttribute('tabIndex');
+ this.element.removeEventListener( 'keydown', this );
+ }
+ // set flags
+ this.isActive = false;
+ this.emitEvent('deactivate');
+};
+
+proto.destroy = function() {
+ this.deactivate();
+ window.removeEventListener( 'resize', this );
+ this.allOff();
+ this.emitEvent('destroy');
+ if ( jQuery && this.$element ) {
+ jQuery.removeData( this.element, 'flickity' );
+ }
+ delete this.element.flickityGUID;
+ delete instances[ this.guid ];
+};
+
+// -------------------------- prototype -------------------------- //
+
+utils.extend( proto, animatePrototype );
+
+// -------------------------- extras -------------------------- //
+
+/**
+ * get Flickity instance from element
+ * @param {Element} elem
+ * @returns {Flickity}
+ */
+Flickity.data = function( elem ) {
+ elem = utils.getQueryElement( elem );
+ var id = elem && elem.flickityGUID;
+ return id && instances[ id ];
+};
+
+utils.htmlInit( Flickity, 'flickity' );
+
+if ( jQuery && jQuery.bridget ) {
+ jQuery.bridget( 'flickity', Flickity );
+}
+
+// set internal jQuery, for Webpack + jQuery v3, #478
+Flickity.setJQuery = function( jq ) {
+ jQuery = jq;
+};
+
+Flickity.Cell = Cell;
+Flickity.Slide = Slide;
+
+return Flickity;
+
+}));
+
+/*!
+ * Unipointer v2.3.0
+ * base class for doing one thing with pointer event
+ * MIT license
+ */
+
+/*jshint browser: true, undef: true, unused: true, strict: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */ /*global define, module, require */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'unipointer/unipointer',[
+ 'ev-emitter/ev-emitter'
+ ], function( EvEmitter ) {
+ return factory( window, EvEmitter );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('ev-emitter')
+ );
+ } else {
+ // browser global
+ window.Unipointer = factory(
+ window,
+ window.EvEmitter
+ );
+ }
+
+}( window, function factory( window, EvEmitter ) {
+
+
+
+function noop() {}
+
+function Unipointer() {}
+
+// inherit EvEmitter
+var proto = Unipointer.prototype = Object.create( EvEmitter.prototype );
+
+proto.bindStartEvent = function( elem ) {
+ this._bindStartEvent( elem, true );
+};
+
+proto.unbindStartEvent = function( elem ) {
+ this._bindStartEvent( elem, false );
+};
+
+/**
+ * Add or remove start event
+ * @param {Boolean} isAdd - remove if falsey
+ */
+proto._bindStartEvent = function( elem, isAdd ) {
+ // munge isAdd, default to true
+ isAdd = isAdd === undefined ? true : isAdd;
+ var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
+
+ // default to mouse events
+ var startEvent = 'mousedown';
+ if ( window.PointerEvent ) {
+ // Pointer Events
+ startEvent = 'pointerdown';
+ } else if ( 'ontouchstart' in window ) {
+ // Touch Events. iOS Safari
+ startEvent = 'touchstart';
+ }
+ elem[ bindMethod ]( startEvent, this );
+};
+
+// trigger handler methods for events
+proto.handleEvent = function( event ) {
+ var method = 'on' + event.type;
+ if ( this[ method ] ) {
+ this[ method ]( event );
+ }
+};
+
+// returns the touch that we're keeping track of
+proto.getTouch = function( touches ) {
+ for ( var i=0; i < touches.length; i++ ) {
+ var touch = touches[i];
+ if ( touch.identifier == this.pointerIdentifier ) {
+ return touch;
+ }
+ }
+};
+
+// ----- start event ----- //
+
+proto.onmousedown = function( event ) {
+ // dismiss clicks from right or middle buttons
+ var button = event.button;
+ if ( button && ( button !== 0 && button !== 1 ) ) {
+ return;
+ }
+ this._pointerDown( event, event );
+};
+
+proto.ontouchstart = function( event ) {
+ this._pointerDown( event, event.changedTouches[0] );
+};
+
+proto.onpointerdown = function( event ) {
+ this._pointerDown( event, event );
+};
+
+/**
+ * pointer start
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto._pointerDown = function( event, pointer ) {
+ // dismiss right click and other pointers
+ // button = 0 is okay, 1-4 not
+ if ( event.button || this.isPointerDown ) {
+ return;
+ }
+
+ this.isPointerDown = true;
+ // save pointer identifier to match up touch events
+ this.pointerIdentifier = pointer.pointerId !== undefined ?
+ // pointerId for pointer events, touch.indentifier for touch events
+ pointer.pointerId : pointer.identifier;
+
+ this.pointerDown( event, pointer );
+};
+
+proto.pointerDown = function( event, pointer ) {
+ this._bindPostStartEvents( event );
+ this.emitEvent( 'pointerDown', [ event, pointer ] );
+};
+
+// hash of events to be bound after start event
+var postStartEvents = {
+ mousedown: [ 'mousemove', 'mouseup' ],
+ touchstart: [ 'touchmove', 'touchend', 'touchcancel' ],
+ pointerdown: [ 'pointermove', 'pointerup', 'pointercancel' ],
+};
+
+proto._bindPostStartEvents = function( event ) {
+ if ( !event ) {
+ return;
+ }
+ // get proper events to match start event
+ var events = postStartEvents[ event.type ];
+ // bind events to node
+ events.forEach( function( eventName ) {
+ window.addEventListener( eventName, this );
+ }, this );
+ // save these arguments
+ this._boundPointerEvents = events;
+};
+
+proto._unbindPostStartEvents = function() {
+ // check for _boundEvents, in case dragEnd triggered twice (old IE8 bug)
+ if ( !this._boundPointerEvents ) {
+ return;
+ }
+ this._boundPointerEvents.forEach( function( eventName ) {
+ window.removeEventListener( eventName, this );
+ }, this );
+
+ delete this._boundPointerEvents;
+};
+
+// ----- move event ----- //
+
+proto.onmousemove = function( event ) {
+ this._pointerMove( event, event );
+};
+
+proto.onpointermove = function( event ) {
+ if ( event.pointerId == this.pointerIdentifier ) {
+ this._pointerMove( event, event );
+ }
+};
+
+proto.ontouchmove = function( event ) {
+ var touch = this.getTouch( event.changedTouches );
+ if ( touch ) {
+ this._pointerMove( event, touch );
+ }
+};
+
+/**
+ * pointer move
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ * @private
+ */
+proto._pointerMove = function( event, pointer ) {
+ this.pointerMove( event, pointer );
+};
+
+// public
+proto.pointerMove = function( event, pointer ) {
+ this.emitEvent( 'pointerMove', [ event, pointer ] );
+};
+
+// ----- end event ----- //
+
+
+proto.onmouseup = function( event ) {
+ this._pointerUp( event, event );
+};
+
+proto.onpointerup = function( event ) {
+ if ( event.pointerId == this.pointerIdentifier ) {
+ this._pointerUp( event, event );
+ }
+};
+
+proto.ontouchend = function( event ) {
+ var touch = this.getTouch( event.changedTouches );
+ if ( touch ) {
+ this._pointerUp( event, touch );
+ }
+};
+
+/**
+ * pointer up
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ * @private
+ */
+proto._pointerUp = function( event, pointer ) {
+ this._pointerDone();
+ this.pointerUp( event, pointer );
+};
+
+// public
+proto.pointerUp = function( event, pointer ) {
+ this.emitEvent( 'pointerUp', [ event, pointer ] );
+};
+
+// ----- pointer done ----- //
+
+// triggered on pointer up & pointer cancel
+proto._pointerDone = function() {
+ this._pointerReset();
+ this._unbindPostStartEvents();
+ this.pointerDone();
+};
+
+proto._pointerReset = function() {
+ // reset properties
+ this.isPointerDown = false;
+ delete this.pointerIdentifier;
+};
+
+proto.pointerDone = noop;
+
+// ----- pointer cancel ----- //
+
+proto.onpointercancel = function( event ) {
+ if ( event.pointerId == this.pointerIdentifier ) {
+ this._pointerCancel( event, event );
+ }
+};
+
+proto.ontouchcancel = function( event ) {
+ var touch = this.getTouch( event.changedTouches );
+ if ( touch ) {
+ this._pointerCancel( event, touch );
+ }
+};
+
+/**
+ * pointer cancel
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ * @private
+ */
+proto._pointerCancel = function( event, pointer ) {
+ this._pointerDone();
+ this.pointerCancel( event, pointer );
+};
+
+// public
+proto.pointerCancel = function( event, pointer ) {
+ this.emitEvent( 'pointerCancel', [ event, pointer ] );
+};
+
+// ----- ----- //
+
+// utility function for getting x/y coords from event
+Unipointer.getPointerPoint = function( pointer ) {
+ return {
+ x: pointer.pageX,
+ y: pointer.pageY
+ };
+};
+
+// ----- ----- //
+
+return Unipointer;
+
+}));
+
+/*!
+ * Unidragger v2.3.0
+ * Draggable base class
+ * MIT license
+ */
+
+/*jshint browser: true, unused: true, undef: true, strict: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /*jshint strict: false */ /*globals define, module, require */
+
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'unidragger/unidragger',[
+ 'unipointer/unipointer'
+ ], function( Unipointer ) {
+ return factory( window, Unipointer );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('unipointer')
+ );
+ } else {
+ // browser global
+ window.Unidragger = factory(
+ window,
+ window.Unipointer
+ );
+ }
+
+}( window, function factory( window, Unipointer ) {
+
+
+
+// -------------------------- Unidragger -------------------------- //
+
+function Unidragger() {}
+
+// inherit Unipointer & EvEmitter
+var proto = Unidragger.prototype = Object.create( Unipointer.prototype );
+
+// ----- bind start ----- //
+
+proto.bindHandles = function() {
+ this._bindHandles( true );
+};
+
+proto.unbindHandles = function() {
+ this._bindHandles( false );
+};
+
+/**
+ * Add or remove start event
+ * @param {Boolean} isAdd
+ */
+proto._bindHandles = function( isAdd ) {
+ // munge isAdd, default to true
+ isAdd = isAdd === undefined ? true : isAdd;
+ // bind each handle
+ var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
+ var touchAction = isAdd ? this._touchActionValue : '';
+ for ( var i=0; i < this.handles.length; i++ ) {
+ var handle = this.handles[i];
+ this._bindStartEvent( handle, isAdd );
+ handle[ bindMethod ]( 'click', this );
+ // touch-action: none to override browser touch gestures. metafizzy/flickity#540
+ if ( window.PointerEvent ) {
+ handle.style.touchAction = touchAction;
+ }
+ }
+};
+
+// prototype so it can be overwriteable by Flickity
+proto._touchActionValue = 'none';
+
+// ----- start event ----- //
+
+/**
+ * pointer start
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto.pointerDown = function( event, pointer ) {
+ var isOkay = this.okayPointerDown( event );
+ if ( !isOkay ) {
+ return;
+ }
+ // track start event position
+ this.pointerDownPointer = pointer;
+
+ event.preventDefault();
+ this.pointerDownBlur();
+ // bind move and end events
+ this._bindPostStartEvents( event );
+ this.emitEvent( 'pointerDown', [ event, pointer ] );
+};
+
+// nodes that have text fields
+var cursorNodes = {
+ TEXTAREA: true,
+ INPUT: true,
+ SELECT: true,
+ OPTION: true,
+};
+
+// input types that do not have text fields
+var clickTypes = {
+ radio: true,
+ checkbox: true,
+ button: true,
+ submit: true,
+ image: true,
+ file: true,
+};
+
+// dismiss inputs with text fields. flickity#403, flickity#404
+proto.okayPointerDown = function( event ) {
+ var isCursorNode = cursorNodes[ event.target.nodeName ];
+ var isClickType = clickTypes[ event.target.type ];
+ var isOkay = !isCursorNode || isClickType;
+ if ( !isOkay ) {
+ this._pointerReset();
+ }
+ return isOkay;
+};
+
+// kludge to blur previously focused input
+proto.pointerDownBlur = function() {
+ var focused = document.activeElement;
+ // do not blur body for IE10, metafizzy/flickity#117
+ var canBlur = focused && focused.blur && focused != document.body;
+ if ( canBlur ) {
+ focused.blur();
+ }
+};
+
+// ----- move event ----- //
+
+/**
+ * drag move
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto.pointerMove = function( event, pointer ) {
+ var moveVector = this._dragPointerMove( event, pointer );
+ this.emitEvent( 'pointerMove', [ event, pointer, moveVector ] );
+ this._dragMove( event, pointer, moveVector );
+};
+
+// base pointer move logic
+proto._dragPointerMove = function( event, pointer ) {
+ var moveVector = {
+ x: pointer.pageX - this.pointerDownPointer.pageX,
+ y: pointer.pageY - this.pointerDownPointer.pageY
+ };
+ // start drag if pointer has moved far enough to start drag
+ if ( !this.isDragging && this.hasDragStarted( moveVector ) ) {
+ this._dragStart( event, pointer );
+ }
+ return moveVector;
+};
+
+// condition if pointer has moved far enough to start drag
+proto.hasDragStarted = function( moveVector ) {
+ return Math.abs( moveVector.x ) > 3 || Math.abs( moveVector.y ) > 3;
+};
+
+// ----- end event ----- //
+
+/**
+ * pointer up
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto.pointerUp = function( event, pointer ) {
+ this.emitEvent( 'pointerUp', [ event, pointer ] );
+ this._dragPointerUp( event, pointer );
+};
+
+proto._dragPointerUp = function( event, pointer ) {
+ if ( this.isDragging ) {
+ this._dragEnd( event, pointer );
+ } else {
+ // pointer didn't move enough for drag to start
+ this._staticClick( event, pointer );
+ }
+};
+
+// -------------------------- drag -------------------------- //
+
+// dragStart
+proto._dragStart = function( event, pointer ) {
+ this.isDragging = true;
+ // prevent clicks
+ this.isPreventingClicks = true;
+ this.dragStart( event, pointer );
+};
+
+proto.dragStart = function( event, pointer ) {
+ this.emitEvent( 'dragStart', [ event, pointer ] );
+};
+
+// dragMove
+proto._dragMove = function( event, pointer, moveVector ) {
+ // do not drag if not dragging yet
+ if ( !this.isDragging ) {
+ return;
+ }
+
+ this.dragMove( event, pointer, moveVector );
+};
+
+proto.dragMove = function( event, pointer, moveVector ) {
+ event.preventDefault();
+ this.emitEvent( 'dragMove', [ event, pointer, moveVector ] );
+};
+
+// dragEnd
+proto._dragEnd = function( event, pointer ) {
+ // set flags
+ this.isDragging = false;
+ // re-enable clicking async
+ setTimeout( function() {
+ delete this.isPreventingClicks;
+ }.bind( this ) );
+
+ this.dragEnd( event, pointer );
+};
+
+proto.dragEnd = function( event, pointer ) {
+ this.emitEvent( 'dragEnd', [ event, pointer ] );
+};
+
+// ----- onclick ----- //
+
+// handle all clicks and prevent clicks when dragging
+proto.onclick = function( event ) {
+ if ( this.isPreventingClicks ) {
+ event.preventDefault();
+ }
+};
+
+// ----- staticClick ----- //
+
+// triggered after pointer down & up with no/tiny movement
+proto._staticClick = function( event, pointer ) {
+ // ignore emulated mouse up clicks
+ if ( this.isIgnoringMouseUp && event.type == 'mouseup' ) {
+ return;
+ }
+
+ this.staticClick( event, pointer );
+
+ // set flag for emulated clicks 300ms after touchend
+ if ( event.type != 'mouseup' ) {
+ this.isIgnoringMouseUp = true;
+ // reset flag after 300ms
+ setTimeout( function() {
+ delete this.isIgnoringMouseUp;
+ }.bind( this ), 400 );
+ }
+};
+
+proto.staticClick = function( event, pointer ) {
+ this.emitEvent( 'staticClick', [ event, pointer ] );
+};
+
+// ----- utils ----- //
+
+Unidragger.getPointerPoint = Unipointer.getPointerPoint;
+
+// ----- ----- //
+
+return Unidragger;
+
+}));
+
+// drag
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/drag',[
+ './flickity',
+ 'unidragger/unidragger',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, Unidragger, utils ) {
+ return factory( window, Flickity, Unidragger, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('unidragger'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ window.Flickity = factory(
+ window,
+ window.Flickity,
+ window.Unidragger,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, Unidragger, utils ) {
+
+
+
+// ----- defaults ----- //
+
+utils.extend( Flickity.defaults, {
+ draggable: '>1',
+ dragThreshold: 3,
+});
+
+// ----- create ----- //
+
+Flickity.createMethods.push('_createDrag');
+
+// -------------------------- drag prototype -------------------------- //
+
+var proto = Flickity.prototype;
+utils.extend( proto, Unidragger.prototype );
+proto._touchActionValue = 'pan-y';
+
+// -------------------------- -------------------------- //
+
+var isTouch = 'createTouch' in document;
+var isTouchmoveScrollCanceled = false;
+
+proto._createDrag = function() {
+ this.on( 'activate', this.onActivateDrag );
+ this.on( 'uiChange', this._uiChangeDrag );
+ this.on( 'deactivate', this.onDeactivateDrag );
+ this.on( 'cellChange', this.updateDraggable );
+ // TODO updateDraggable on resize? if groupCells & slides change
+ // HACK - add seemingly innocuous handler to fix iOS 10 scroll behavior
+ // #457, RubaXa/Sortable#973
+ if ( isTouch && !isTouchmoveScrollCanceled ) {
+ window.addEventListener( 'touchmove', function() {});
+ isTouchmoveScrollCanceled = true;
+ }
+};
+
+proto.onActivateDrag = function() {
+ this.handles = [ this.viewport ];
+ this.bindHandles();
+ this.updateDraggable();
+};
+
+proto.onDeactivateDrag = function() {
+ this.unbindHandles();
+ this.element.classList.remove('is-draggable');
+};
+
+proto.updateDraggable = function() {
+ // disable dragging if less than 2 slides. #278
+ if ( this.options.draggable == '>1' ) {
+ this.isDraggable = this.slides.length > 1;
+ } else {
+ this.isDraggable = this.options.draggable;
+ }
+ if ( this.isDraggable ) {
+ this.element.classList.add('is-draggable');
+ } else {
+ this.element.classList.remove('is-draggable');
+ }
+};
+
+// backwards compatibility
+proto.bindDrag = function() {
+ this.options.draggable = true;
+ this.updateDraggable();
+};
+
+proto.unbindDrag = function() {
+ this.options.draggable = false;
+ this.updateDraggable();
+};
+
+proto._uiChangeDrag = function() {
+ delete this.isFreeScrolling;
+};
+
+// -------------------------- pointer events -------------------------- //
+
+proto.pointerDown = function( event, pointer ) {
+ if ( !this.isDraggable ) {
+ this._pointerDownDefault( event, pointer );
+ return;
+ }
+ var isOkay = this.okayPointerDown( event );
+ if ( !isOkay ) {
+ return;
+ }
+
+ this._pointerDownPreventDefault( event );
+ this.pointerDownFocus( event );
+ // blur
+ if ( document.activeElement != this.element ) {
+ // do not blur if already focused
+ this.pointerDownBlur();
+ }
+
+ // stop if it was moving
+ this.dragX = this.x;
+ this.viewport.classList.add('is-pointer-down');
+ // track scrolling
+ this.pointerDownScroll = getScrollPosition();
+ window.addEventListener( 'scroll', this );
+
+ this._pointerDownDefault( event, pointer );
+};
+
+// default pointerDown logic, used for staticClick
+proto._pointerDownDefault = function( event, pointer ) {
+ // track start event position
+ // Safari 9 overrides pageX and pageY. These values needs to be copied. #779
+ this.pointerDownPointer = {
+ pageX: pointer.pageX,
+ pageY: pointer.pageY,
+ };
+ // bind move and end events
+ this._bindPostStartEvents( event );
+ this.dispatchEvent( 'pointerDown', event, [ pointer ] );
+};
+
+var focusNodes = {
+ INPUT: true,
+ TEXTAREA: true,
+ SELECT: true,
+};
+
+proto.pointerDownFocus = function( event ) {
+ var isFocusNode = focusNodes[ event.target.nodeName ];
+ if ( !isFocusNode ) {
+ this.focus();
+ }
+};
+
+proto._pointerDownPreventDefault = function( event ) {
+ var isTouchStart = event.type == 'touchstart';
+ var isTouchPointer = event.pointerType == 'touch';
+ var isFocusNode = focusNodes[ event.target.nodeName ];
+ if ( !isTouchStart && !isTouchPointer && !isFocusNode ) {
+ event.preventDefault();
+ }
+};
+
+// ----- move ----- //
+
+proto.hasDragStarted = function( moveVector ) {
+ return Math.abs( moveVector.x ) > this.options.dragThreshold;
+};
+
+// ----- up ----- //
+
+proto.pointerUp = function( event, pointer ) {
+ delete this.isTouchScrolling;
+ this.viewport.classList.remove('is-pointer-down');
+ this.dispatchEvent( 'pointerUp', event, [ pointer ] );
+ this._dragPointerUp( event, pointer );
+};
+
+proto.pointerDone = function() {
+ window.removeEventListener( 'scroll', this );
+ delete this.pointerDownScroll;
+};
+
+// -------------------------- dragging -------------------------- //
+
+proto.dragStart = function( event, pointer ) {
+ if ( !this.isDraggable ) {
+ return;
+ }
+ this.dragStartPosition = this.x;
+ this.startAnimation();
+ window.removeEventListener( 'scroll', this );
+ this.dispatchEvent( 'dragStart', event, [ pointer ] );
+};
+
+proto.pointerMove = function( event, pointer ) {
+ var moveVector = this._dragPointerMove( event, pointer );
+ this.dispatchEvent( 'pointerMove', event, [ pointer, moveVector ] );
+ this._dragMove( event, pointer, moveVector );
+};
+
+proto.dragMove = function( event, pointer, moveVector ) {
+ if ( !this.isDraggable ) {
+ return;
+ }
+ event.preventDefault();
+
+ this.previousDragX = this.dragX;
+ // reverse if right-to-left
+ var direction = this.options.rightToLeft ? -1 : 1;
+ if ( this.options.wrapAround ) {
+ // wrap around move. #589
+ moveVector.x = moveVector.x % this.slideableWidth;
+ }
+ var dragX = this.dragStartPosition + moveVector.x * direction;
+
+ if ( !this.options.wrapAround && this.slides.length ) {
+ // slow drag
+ var originBound = Math.max( -this.slides[0].target, this.dragStartPosition );
+ dragX = dragX > originBound ? ( dragX + originBound ) * 0.5 : dragX;
+ var endBound = Math.min( -this.getLastSlide().target, this.dragStartPosition );
+ dragX = dragX < endBound ? ( dragX + endBound ) * 0.5 : dragX;
+ }
+
+ this.dragX = dragX;
+
+ this.dragMoveTime = new Date();
+ this.dispatchEvent( 'dragMove', event, [ pointer, moveVector ] );
+};
+
+proto.dragEnd = function( event, pointer ) {
+ if ( !this.isDraggable ) {
+ return;
+ }
+ if ( this.options.freeScroll ) {
+ this.isFreeScrolling = true;
+ }
+ // set selectedIndex based on where flick will end up
+ var index = this.dragEndRestingSelect();
+
+ if ( this.options.freeScroll && !this.options.wrapAround ) {
+ // if free-scroll & not wrap around
+ // do not free-scroll if going outside of bounding slides
+ // so bounding slides can attract slider, and keep it in bounds
+ var restingX = this.getRestingPosition();
+ this.isFreeScrolling = -restingX > this.slides[0].target &&
+ -restingX < this.getLastSlide().target;
+ } else if ( !this.options.freeScroll && index == this.selectedIndex ) {
+ // boost selection if selected index has not changed
+ index += this.dragEndBoostSelect();
+ }
+ delete this.previousDragX;
+ // apply selection
+ // TODO refactor this, selecting here feels weird
+ // HACK, set flag so dragging stays in correct direction
+ this.isDragSelect = this.options.wrapAround;
+ this.select( index );
+ delete this.isDragSelect;
+ this.dispatchEvent( 'dragEnd', event, [ pointer ] );
+};
+
+proto.dragEndRestingSelect = function() {
+ var restingX = this.getRestingPosition();
+ // how far away from selected slide
+ var distance = Math.abs( this.getSlideDistance( -restingX, this.selectedIndex ) );
+ // get closet resting going up and going down
+ var positiveResting = this._getClosestResting( restingX, distance, 1 );
+ var negativeResting = this._getClosestResting( restingX, distance, -1 );
+ // use closer resting for wrap-around
+ var index = positiveResting.distance < negativeResting.distance ?
+ positiveResting.index : negativeResting.index;
+ return index;
+};
+
+/**
+ * given resting X and distance to selected cell
+ * get the distance and index of the closest cell
+ * @param {Number} restingX - estimated post-flick resting position
+ * @param {Number} distance - distance to selected cell
+ * @param {Integer} increment - +1 or -1, going up or down
+ * @returns {Object} - { distance: {Number}, index: {Integer} }
+ */
+proto._getClosestResting = function( restingX, distance, increment ) {
+ var index = this.selectedIndex;
+ var minDistance = Infinity;
+ var condition = this.options.contain && !this.options.wrapAround ?
+ // if contain, keep going if distance is equal to minDistance
+ function( d, md ) { return d <= md; } : function( d, md ) { return d < md; };
+ while ( condition( distance, minDistance ) ) {
+ // measure distance to next cell
+ index += increment;
+ minDistance = distance;
+ distance = this.getSlideDistance( -restingX, index );
+ if ( distance === null ) {
+ break;
+ }
+ distance = Math.abs( distance );
+ }
+ return {
+ distance: minDistance,
+ // selected was previous index
+ index: index - increment
+ };
+};
+
+/**
+ * measure distance between x and a slide target
+ * @param {Number} x
+ * @param {Integer} index - slide index
+ */
+proto.getSlideDistance = function( x, index ) {
+ var len = this.slides.length;
+ // wrap around if at least 2 slides
+ var isWrapAround = this.options.wrapAround && len > 1;
+ var slideIndex = isWrapAround ? utils.modulo( index, len ) : index;
+ var slide = this.slides[ slideIndex ];
+ if ( !slide ) {
+ return null;
+ }
+ // add distance for wrap-around slides
+ var wrap = isWrapAround ? this.slideableWidth * Math.floor( index / len ) : 0;
+ return x - ( slide.target + wrap );
+};
+
+proto.dragEndBoostSelect = function() {
+ // do not boost if no previousDragX or dragMoveTime
+ if ( this.previousDragX === undefined || !this.dragMoveTime ||
+ // or if drag was held for 100 ms
+ new Date() - this.dragMoveTime > 100 ) {
+ return 0;
+ }
+
+ var distance = this.getSlideDistance( -this.dragX, this.selectedIndex );
+ var delta = this.previousDragX - this.dragX;
+ if ( distance > 0 && delta > 0 ) {
+ // boost to next if moving towards the right, and positive velocity
+ return 1;
+ } else if ( distance < 0 && delta < 0 ) {
+ // boost to previous if moving towards the left, and negative velocity
+ return -1;
+ }
+ return 0;
+};
+
+// ----- staticClick ----- //
+
+proto.staticClick = function( event, pointer ) {
+ // get clickedCell, if cell was clicked
+ var clickedCell = this.getParentCell( event.target );
+ var cellElem = clickedCell && clickedCell.element;
+ var cellIndex = clickedCell && this.cells.indexOf( clickedCell );
+ this.dispatchEvent( 'staticClick', event, [ pointer, cellElem, cellIndex ] );
+};
+
+// ----- scroll ----- //
+
+proto.onscroll = function() {
+ var scroll = getScrollPosition();
+ var scrollMoveX = this.pointerDownScroll.x - scroll.x;
+ var scrollMoveY = this.pointerDownScroll.y - scroll.y;
+ // cancel click/tap if scroll is too much
+ if ( Math.abs( scrollMoveX ) > 3 || Math.abs( scrollMoveY ) > 3 ) {
+ this._pointerDone();
+ }
+};
+
+// ----- utils ----- //
+
+function getScrollPosition() {
+ return {
+ x: window.pageXOffset,
+ y: window.pageYOffset
+ };
+}
+
+// ----- ----- //
+
+return Flickity;
+
+}));
+
+// prev/next buttons
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/prev-next-button',[
+ './flickity',
+ 'unipointer/unipointer',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, Unipointer, utils ) {
+ return factory( window, Flickity, Unipointer, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('unipointer'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ factory(
+ window,
+ window.Flickity,
+ window.Unipointer,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, Unipointer, utils ) {
+'use strict';
+
+var svgURI = 'http://www.w3.org/2000/svg';
+
+// -------------------------- PrevNextButton -------------------------- //
+
+function PrevNextButton( direction, parent ) {
+ this.direction = direction;
+ this.parent = parent;
+ this._create();
+}
+
+PrevNextButton.prototype = Object.create( Unipointer.prototype );
+
+PrevNextButton.prototype._create = function() {
+ // properties
+ this.isEnabled = true;
+ this.isPrevious = this.direction == -1;
+ var leftDirection = this.parent.options.rightToLeft ? 1 : -1;
+ this.isLeft = this.direction == leftDirection;
+
+ var element = this.element = document.createElement('button');
+ element.className = 'flickity-button flickity-prev-next-button';
+ element.className += this.isPrevious ? ' previous' : ' next';
+ // prevent button from submitting form http://stackoverflow.com/a/10836076/182183
+ element.setAttribute( 'type', 'button' );
+ // init as disabled
+ this.disable();
+
+ element.setAttribute( 'aria-label', this.isPrevious ? 'Previous' : 'Next' );
+
+ // create arrow
+ var svg = this.createSVG();
+ element.appendChild( svg );
+ // events
+ this.parent.on( 'select', this.update.bind( this ) );
+ this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) );
+};
+
+PrevNextButton.prototype.activate = function() {
+ this.bindStartEvent( this.element );
+ this.element.addEventListener( 'click', this );
+ // add to DOM
+ this.parent.element.appendChild( this.element );
+};
+
+PrevNextButton.prototype.deactivate = function() {
+ // remove from DOM
+ this.parent.element.removeChild( this.element );
+ // click events
+ this.unbindStartEvent( this.element );
+ this.element.removeEventListener( 'click', this );
+};
+
+PrevNextButton.prototype.createSVG = function() {
+ var svg = document.createElementNS( svgURI, 'svg');
+ svg.setAttribute( 'class', 'flickity-button-icon' );
+ svg.setAttribute( 'viewBox', '0 0 100 100' );
+ var path = document.createElementNS( svgURI, 'path');
+ var pathMovements = getArrowMovements( this.parent.options.arrowShape );
+ path.setAttribute( 'd', pathMovements );
+ path.setAttribute( 'class', 'arrow' );
+ // rotate arrow
+ if ( !this.isLeft ) {
+ path.setAttribute( 'transform', 'translate(100, 100) rotate(180) ' );
+ }
+ svg.appendChild( path );
+ return svg;
+};
+
+// get SVG path movmement
+function getArrowMovements( shape ) {
+ // use shape as movement if string
+ if ( typeof shape == 'string' ) {
+ return shape;
+ }
+ // create movement string
+ return 'M ' + shape.x0 + ',50' +
+ ' L ' + shape.x1 + ',' + ( shape.y1 + 50 ) +
+ ' L ' + shape.x2 + ',' + ( shape.y2 + 50 ) +
+ ' L ' + shape.x3 + ',50 ' +
+ ' L ' + shape.x2 + ',' + ( 50 - shape.y2 ) +
+ ' L ' + shape.x1 + ',' + ( 50 - shape.y1 ) +
+ ' Z';
+}
+
+PrevNextButton.prototype.handleEvent = utils.handleEvent;
+
+PrevNextButton.prototype.onclick = function() {
+ if ( !this.isEnabled ) {
+ return;
+ }
+ this.parent.uiChange();
+ var method = this.isPrevious ? 'previous' : 'next';
+ this.parent[ method ]();
+};
+
+// ----- ----- //
+
+PrevNextButton.prototype.enable = function() {
+ if ( this.isEnabled ) {
+ return;
+ }
+ this.element.disabled = false;
+ this.isEnabled = true;
+};
+
+PrevNextButton.prototype.disable = function() {
+ if ( !this.isEnabled ) {
+ return;
+ }
+ this.element.disabled = true;
+ this.isEnabled = false;
+};
+
+PrevNextButton.prototype.update = function() {
+ // index of first or last slide, if previous or next
+ var slides = this.parent.slides;
+ // enable is wrapAround and at least 2 slides
+ if ( this.parent.options.wrapAround && slides.length > 1 ) {
+ this.enable();
+ return;
+ }
+ var lastIndex = slides.length ? slides.length - 1 : 0;
+ var boundIndex = this.isPrevious ? 0 : lastIndex;
+ var method = this.parent.selectedIndex == boundIndex ? 'disable' : 'enable';
+ this[ method ]();
+};
+
+PrevNextButton.prototype.destroy = function() {
+ this.deactivate();
+ this.allOff();
+};
+
+// -------------------------- Flickity prototype -------------------------- //
+
+utils.extend( Flickity.defaults, {
+ prevNextButtons: true,
+ arrowShape: {
+ x0: 10,
+ x1: 60, y1: 50,
+ x2: 70, y2: 40,
+ x3: 30
+ }
+});
+
+Flickity.createMethods.push('_createPrevNextButtons');
+var proto = Flickity.prototype;
+
+proto._createPrevNextButtons = function() {
+ if ( !this.options.prevNextButtons ) {
+ return;
+ }
+
+ this.prevButton = new PrevNextButton( -1, this );
+ this.nextButton = new PrevNextButton( 1, this );
+
+ this.on( 'activate', this.activatePrevNextButtons );
+};
+
+proto.activatePrevNextButtons = function() {
+ this.prevButton.activate();
+ this.nextButton.activate();
+ this.on( 'deactivate', this.deactivatePrevNextButtons );
+};
+
+proto.deactivatePrevNextButtons = function() {
+ this.prevButton.deactivate();
+ this.nextButton.deactivate();
+ this.off( 'deactivate', this.deactivatePrevNextButtons );
+};
+
+// -------------------------- -------------------------- //
+
+Flickity.PrevNextButton = PrevNextButton;
+
+return Flickity;
+
+}));
+
+// page dots
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/page-dots',[
+ './flickity',
+ 'unipointer/unipointer',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, Unipointer, utils ) {
+ return factory( window, Flickity, Unipointer, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('unipointer'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ factory(
+ window,
+ window.Flickity,
+ window.Unipointer,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, Unipointer, utils ) {
+
+// -------------------------- PageDots -------------------------- //
+
+
+
+function PageDots( parent ) {
+ this.parent = parent;
+ this._create();
+}
+
+PageDots.prototype = Object.create( Unipointer.prototype );
+
+PageDots.prototype._create = function() {
+ // create holder element
+ this.holder = document.createElement('ol');
+ this.holder.className = 'flickity-page-dots';
+ // create dots, array of elements
+ this.dots = [];
+ // events
+ this.handleClick = this.onClick.bind( this );
+ this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) );
+};
+
+PageDots.prototype.activate = function() {
+ this.setDots();
+ this.holder.addEventListener( 'click', this.handleClick );
+ this.bindStartEvent( this.holder );
+ // add to DOM
+ this.parent.element.appendChild( this.holder );
+};
+
+PageDots.prototype.deactivate = function() {
+ this.holder.removeEventListener( 'click', this.handleClick );
+ this.unbindStartEvent( this.holder );
+ // remove from DOM
+ this.parent.element.removeChild( this.holder );
+};
+
+PageDots.prototype.setDots = function() {
+ // get difference between number of slides and number of dots
+ var delta = this.parent.slides.length - this.dots.length;
+ if ( delta > 0 ) {
+ this.addDots( delta );
+ } else if ( delta < 0 ) {
+ this.removeDots( -delta );
+ }
+};
+
+PageDots.prototype.addDots = function( count ) {
+ var fragment = document.createDocumentFragment();
+ var newDots = [];
+ var length = this.dots.length;
+ var max = length + count;
+
+ for ( var i = length; i < max; i++ ) {
+ var dot = document.createElement('li');
+ dot.className = 'dot';
+ dot.setAttribute( 'aria-label', 'Page dot ' + ( i + 1 ) );
+ fragment.appendChild( dot );
+ newDots.push( dot );
+ }
+
+ this.holder.appendChild( fragment );
+ this.dots = this.dots.concat( newDots );
+};
+
+PageDots.prototype.removeDots = function( count ) {
+ // remove from this.dots collection
+ var removeDots = this.dots.splice( this.dots.length - count, count );
+ // remove from DOM
+ removeDots.forEach( function( dot ) {
+ this.holder.removeChild( dot );
+ }, this );
+};
+
+PageDots.prototype.updateSelected = function() {
+ // remove selected class on previous
+ if ( this.selectedDot ) {
+ this.selectedDot.className = 'dot';
+ this.selectedDot.removeAttribute('aria-current');
+ }
+ // don't proceed if no dots
+ if ( !this.dots.length ) {
+ return;
+ }
+ this.selectedDot = this.dots[ this.parent.selectedIndex ];
+ this.selectedDot.className = 'dot is-selected';
+ this.selectedDot.setAttribute( 'aria-current', 'step' );
+};
+
+PageDots.prototype.onTap = // old method name, backwards-compatible
+PageDots.prototype.onClick = function( event ) {
+ var target = event.target;
+ // only care about dot clicks
+ if ( target.nodeName != 'LI' ) {
+ return;
+ }
+
+ this.parent.uiChange();
+ var index = this.dots.indexOf( target );
+ this.parent.select( index );
+};
+
+PageDots.prototype.destroy = function() {
+ this.deactivate();
+ this.allOff();
+};
+
+Flickity.PageDots = PageDots;
+
+// -------------------------- Flickity -------------------------- //
+
+utils.extend( Flickity.defaults, {
+ pageDots: true
+});
+
+Flickity.createMethods.push('_createPageDots');
+
+var proto = Flickity.prototype;
+
+proto._createPageDots = function() {
+ if ( !this.options.pageDots ) {
+ return;
+ }
+ this.pageDots = new PageDots( this );
+ // events
+ this.on( 'activate', this.activatePageDots );
+ this.on( 'select', this.updateSelectedPageDots );
+ this.on( 'cellChange', this.updatePageDots );
+ this.on( 'resize', this.updatePageDots );
+ this.on( 'deactivate', this.deactivatePageDots );
+};
+
+proto.activatePageDots = function() {
+ this.pageDots.activate();
+};
+
+proto.updateSelectedPageDots = function() {
+ this.pageDots.updateSelected();
+};
+
+proto.updatePageDots = function() {
+ this.pageDots.setDots();
+};
+
+proto.deactivatePageDots = function() {
+ this.pageDots.deactivate();
+};
+
+// ----- ----- //
+
+Flickity.PageDots = PageDots;
+
+return Flickity;
+
+}));
+
+// player & autoPlay
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/player',[
+ 'ev-emitter/ev-emitter',
+ 'fizzy-ui-utils/utils',
+ './flickity'
+ ], function( EvEmitter, utils, Flickity ) {
+ return factory( EvEmitter, utils, Flickity );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ require('ev-emitter'),
+ require('fizzy-ui-utils'),
+ require('./flickity')
+ );
+ } else {
+ // browser global
+ factory(
+ window.EvEmitter,
+ window.fizzyUIUtils,
+ window.Flickity
+ );
+ }
+
+}( window, function factory( EvEmitter, utils, Flickity ) {
+
+
+
+// -------------------------- Player -------------------------- //
+
+function Player( parent ) {
+ this.parent = parent;
+ this.state = 'stopped';
+ // visibility change event handler
+ this.onVisibilityChange = this.visibilityChange.bind( this );
+ this.onVisibilityPlay = this.visibilityPlay.bind( this );
+}
+
+Player.prototype = Object.create( EvEmitter.prototype );
+
+// start play
+Player.prototype.play = function() {
+ if ( this.state == 'playing' ) {
+ return;
+ }
+ // do not play if page is hidden, start playing when page is visible
+ var isPageHidden = document.hidden;
+ if ( isPageHidden ) {
+ document.addEventListener( 'visibilitychange', this.onVisibilityPlay );
+ return;
+ }
+
+ this.state = 'playing';
+ // listen to visibility change
+ document.addEventListener( 'visibilitychange', this.onVisibilityChange );
+ // start ticking
+ this.tick();
+};
+
+Player.prototype.tick = function() {
+ // do not tick if not playing
+ if ( this.state != 'playing' ) {
+ return;
+ }
+
+ var time = this.parent.options.autoPlay;
+ // default to 3 seconds
+ time = typeof time == 'number' ? time : 3000;
+ var _this = this;
+ // HACK: reset ticks if stopped and started within interval
+ this.clear();
+ this.timeout = setTimeout( function() {
+ _this.parent.next( true );
+ _this.tick();
+ }, time );
+};
+
+Player.prototype.stop = function() {
+ this.state = 'stopped';
+ this.clear();
+ // remove visibility change event
+ document.removeEventListener( 'visibilitychange', this.onVisibilityChange );
+};
+
+Player.prototype.clear = function() {
+ clearTimeout( this.timeout );
+};
+
+Player.prototype.pause = function() {
+ if ( this.state == 'playing' ) {
+ this.state = 'paused';
+ this.clear();
+ }
+};
+
+Player.prototype.unpause = function() {
+ // re-start play if paused
+ if ( this.state == 'paused' ) {
+ this.play();
+ }
+};
+
+// pause if page visibility is hidden, unpause if visible
+Player.prototype.visibilityChange = function() {
+ var isPageHidden = document.hidden;
+ this[ isPageHidden ? 'pause' : 'unpause' ]();
+};
+
+Player.prototype.visibilityPlay = function() {
+ this.play();
+ document.removeEventListener( 'visibilitychange', this.onVisibilityPlay );
+};
+
+// -------------------------- Flickity -------------------------- //
+
+utils.extend( Flickity.defaults, {
+ pauseAutoPlayOnHover: true
+});
+
+Flickity.createMethods.push('_createPlayer');
+var proto = Flickity.prototype;
+
+proto._createPlayer = function() {
+ this.player = new Player( this );
+
+ this.on( 'activate', this.activatePlayer );
+ this.on( 'uiChange', this.stopPlayer );
+ this.on( 'pointerDown', this.stopPlayer );
+ this.on( 'deactivate', this.deactivatePlayer );
+};
+
+proto.activatePlayer = function() {
+ if ( !this.options.autoPlay ) {
+ return;
+ }
+ this.player.play();
+ this.element.addEventListener( 'mouseenter', this );
+};
+
+// Player API, don't hate the ... thanks I know where the door is
+
+proto.playPlayer = function() {
+ this.player.play();
+};
+
+proto.stopPlayer = function() {
+ this.player.stop();
+};
+
+proto.pausePlayer = function() {
+ this.player.pause();
+};
+
+proto.unpausePlayer = function() {
+ this.player.unpause();
+};
+
+proto.deactivatePlayer = function() {
+ this.player.stop();
+ this.element.removeEventListener( 'mouseenter', this );
+};
+
+// ----- mouseenter/leave ----- //
+
+// pause auto-play on hover
+proto.onmouseenter = function() {
+ if ( !this.options.pauseAutoPlayOnHover ) {
+ return;
+ }
+ this.player.pause();
+ this.element.addEventListener( 'mouseleave', this );
+};
+
+// resume auto-play on hover off
+proto.onmouseleave = function() {
+ this.player.unpause();
+ this.element.removeEventListener( 'mouseleave', this );
+};
+
+// ----- ----- //
+
+Flickity.Player = Player;
+
+return Flickity;
+
+}));
+
+// add, remove cell
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/add-remove-cell',[
+ './flickity',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, utils ) {
+ return factory( window, Flickity, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ factory(
+ window,
+ window.Flickity,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, utils ) {
+
+
+
+// append cells to a document fragment
+function getCellsFragment( cells ) {
+ var fragment = document.createDocumentFragment();
+ cells.forEach( function( cell ) {
+ fragment.appendChild( cell.element );
+ });
+ return fragment;
+}
+
+// -------------------------- add/remove cell prototype -------------------------- //
+
+var proto = Flickity.prototype;
+
+/**
+ * Insert, prepend, or append cells
+ * @param {Element, Array, NodeList} elems
+ * @param {Integer} index
+ */
+proto.insert = function( elems, index ) {
+ var cells = this._makeCells( elems );
+ if ( !cells || !cells.length ) {
+ return;
+ }
+ var len = this.cells.length;
+ // default to append
+ index = index === undefined ? len : index;
+ // add cells with document fragment
+ var fragment = getCellsFragment( cells );
+ // append to slider
+ var isAppend = index == len;
+ if ( isAppend ) {
+ this.slider.appendChild( fragment );
+ } else {
+ var insertCellElement = this.cells[ index ].element;
+ this.slider.insertBefore( fragment, insertCellElement );
+ }
+ // add to this.cells
+ if ( index === 0 ) {
+ // prepend, add to start
+ this.cells = cells.concat( this.cells );
+ } else if ( isAppend ) {
+ // append, add to end
+ this.cells = this.cells.concat( cells );
+ } else {
+ // insert in this.cells
+ var endCells = this.cells.splice( index, len - index );
+ this.cells = this.cells.concat( cells ).concat( endCells );
+ }
+
+ this._sizeCells( cells );
+ this.cellChange( index, true );
+};
+
+proto.append = function( elems ) {
+ this.insert( elems, this.cells.length );
+};
+
+proto.prepend = function( elems ) {
+ this.insert( elems, 0 );
+};
+
+/**
+ * Remove cells
+ * @param {Element, Array, NodeList} elems
+ */
+proto.remove = function( elems ) {
+ var cells = this.getCells( elems );
+ if ( !cells || !cells.length ) {
+ return;
+ }
+
+ var minCellIndex = this.cells.length - 1;
+ // remove cells from collection & DOM
+ cells.forEach( function( cell ) {
+ cell.remove();
+ var index = this.cells.indexOf( cell );
+ minCellIndex = Math.min( index, minCellIndex );
+ utils.removeFrom( this.cells, cell );
+ }, this );
+
+ this.cellChange( minCellIndex, true );
+};
+
+/**
+ * logic to be run after a cell's size changes
+ * @param {Element} elem - cell's element
+ */
+proto.cellSizeChange = function( elem ) {
+ var cell = this.getCell( elem );
+ if ( !cell ) {
+ return;
+ }
+ cell.getSize();
+
+ var index = this.cells.indexOf( cell );
+ this.cellChange( index );
+};
+
+/**
+ * logic any time a cell is changed: added, removed, or size changed
+ * @param {Integer} changedCellIndex - index of the changed cell, optional
+ */
+proto.cellChange = function( changedCellIndex, isPositioningSlider ) {
+ var prevSelectedElem = this.selectedElement;
+ this._positionCells( changedCellIndex );
+ this._getWrapShiftCells();
+ this.setGallerySize();
+ // update selectedIndex
+ // try to maintain position & select previous selected element
+ var cell = this.getCell( prevSelectedElem );
+ if ( cell ) {
+ this.selectedIndex = this.getCellSlideIndex( cell );
+ }
+ this.selectedIndex = Math.min( this.slides.length - 1, this.selectedIndex );
+
+ this.emitEvent( 'cellChange', [ changedCellIndex ] );
+ // position slider
+ this.select( this.selectedIndex );
+ // do not position slider after lazy load
+ if ( isPositioningSlider ) {
+ this.positionSliderAtSelected();
+ }
+};
+
+// ----- ----- //
+
+return Flickity;
+
+}));
+
+// lazyload
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/lazyload',[
+ './flickity',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, utils ) {
+ return factory( window, Flickity, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ factory(
+ window,
+ window.Flickity,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, utils ) {
+'use strict';
+
+Flickity.createMethods.push('_createLazyload');
+var proto = Flickity.prototype;
+
+proto._createLazyload = function() {
+ this.on( 'select', this.lazyLoad );
+};
+
+proto.lazyLoad = function() {
+ var lazyLoad = this.options.lazyLoad;
+ if ( !lazyLoad ) {
+ return;
+ }
+ // get adjacent cells, use lazyLoad option for adjacent count
+ var adjCount = typeof lazyLoad == 'number' ? lazyLoad : 0;
+ var cellElems = this.getAdjacentCellElements( adjCount );
+ // get lazy images in those cells
+ var lazyImages = [];
+ cellElems.forEach( function( cellElem ) {
+ var lazyCellImages = getCellLazyImages( cellElem );
+ lazyImages = lazyImages.concat( lazyCellImages );
+ });
+ // load lazy images
+ lazyImages.forEach( function( img ) {
+ new LazyLoader( img, this );
+ }, this );
+};
+
+function getCellLazyImages( cellElem ) {
+ // check if cell element is lazy image
+ if ( cellElem.nodeName == 'IMG' ) {
+ var lazyloadAttr = cellElem.getAttribute('data-flickity-lazyload');
+ var srcAttr = cellElem.getAttribute('data-flickity-lazyload-src');
+ var srcsetAttr = cellElem.getAttribute('data-flickity-lazyload-srcset');
+ if ( lazyloadAttr || srcAttr || srcsetAttr ) {
+ return [ cellElem ];
+ }
+ }
+ // select lazy images in cell
+ var lazySelector = 'img[data-flickity-lazyload], ' +
+ 'img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]';
+ var imgs = cellElem.querySelectorAll( lazySelector );
+ return utils.makeArray( imgs );
+}
+
+// -------------------------- LazyLoader -------------------------- //
+
+/**
+ * class to handle loading images
+ */
+function LazyLoader( img, flickity ) {
+ this.img = img;
+ this.flickity = flickity;
+ this.load();
+}
+
+LazyLoader.prototype.handleEvent = utils.handleEvent;
+
+LazyLoader.prototype.load = function() {
+ this.img.addEventListener( 'load', this );
+ this.img.addEventListener( 'error', this );
+ // get src & srcset
+ var src = this.img.getAttribute('data-flickity-lazyload') ||
+ this.img.getAttribute('data-flickity-lazyload-src');
+ var srcset = this.img.getAttribute('data-flickity-lazyload-srcset');
+ // set src & serset
+ this.img.src = src;
+ if ( srcset ) {
+ this.img.setAttribute( 'srcset', srcset );
+ }
+ // remove attr
+ this.img.removeAttribute('data-flickity-lazyload');
+ this.img.removeAttribute('data-flickity-lazyload-src');
+ this.img.removeAttribute('data-flickity-lazyload-srcset');
+};
+
+LazyLoader.prototype.onload = function( event ) {
+ this.complete( event, 'flickity-lazyloaded' );
+};
+
+LazyLoader.prototype.onerror = function( event ) {
+ this.complete( event, 'flickity-lazyerror' );
+};
+
+LazyLoader.prototype.complete = function( event, className ) {
+ // unbind events
+ this.img.removeEventListener( 'load', this );
+ this.img.removeEventListener( 'error', this );
+
+ var cell = this.flickity.getParentCell( this.img );
+ var cellElem = cell && cell.element;
+ this.flickity.cellSizeChange( cellElem );
+
+ this.img.classList.add( className );
+ this.flickity.dispatchEvent( 'lazyLoad', event, cellElem );
+};
+
+// ----- ----- //
+
+Flickity.LazyLoader = LazyLoader;
+
+return Flickity;
+
+}));
+
+/*!
+ * Flickity v2.2.1
+ * Touch, responsive, flickable carousels
+ *
+ * Licensed GPLv3 for open source use
+ * or Flickity Commercial License for commercial use
+ *
+ * https://flickity.metafizzy.co
+ * Copyright 2015-2019 Metafizzy
+ */
+
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity/js/index',[
+ './flickity',
+ './drag',
+ './prev-next-button',
+ './page-dots',
+ './player',
+ './add-remove-cell',
+ './lazyload'
+ ], factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ require('./flickity'),
+ require('./drag'),
+ require('./prev-next-button'),
+ require('./page-dots'),
+ require('./player'),
+ require('./add-remove-cell'),
+ require('./lazyload')
+ );
+ }
+
+})( window, function factory( Flickity ) {
+ /*jshint strict: false*/
+ return Flickity;
+});
+
+/*!
+ * Flickity asNavFor v2.0.2
+ * enable asNavFor for Flickity
+ */
+
+/*jshint browser: true, undef: true, unused: true, strict: true*/
+
+( function( window, factory ) {
+ // universal module definition
+ /*jshint strict: false */ /*globals define, module, require */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'flickity-as-nav-for/as-nav-for',[
+ 'flickity/js/index',
+ 'fizzy-ui-utils/utils'
+ ], factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ require('flickity'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ window.Flickity = factory(
+ window.Flickity,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( Flickity, utils ) {
+
+
+
+// -------------------------- asNavFor prototype -------------------------- //
+
+// Flickity.defaults.asNavFor = null;
+
+Flickity.createMethods.push('_createAsNavFor');
+
+var proto = Flickity.prototype;
+
+proto._createAsNavFor = function() {
+ this.on( 'activate', this.activateAsNavFor );
+ this.on( 'deactivate', this.deactivateAsNavFor );
+ this.on( 'destroy', this.destroyAsNavFor );
+
+ var asNavForOption = this.options.asNavFor;
+ if ( !asNavForOption ) {
+ return;
+ }
+ // HACK do async, give time for other flickity to be initalized
+ var _this = this;
+ setTimeout( function initNavCompanion() {
+ _this.setNavCompanion( asNavForOption );
+ });
+};
+
+proto.setNavCompanion = function( elem ) {
+ elem = utils.getQueryElement( elem );
+ var companion = Flickity.data( elem );
+ // stop if no companion or companion is self
+ if ( !companion || companion == this ) {
+ return;
+ }
+
+ this.navCompanion = companion;
+ // companion select
+ var _this = this;
+ this.onNavCompanionSelect = function() {
+ _this.navCompanionSelect();
+ };
+ companion.on( 'select', this.onNavCompanionSelect );
+ // click
+ this.on( 'staticClick', this.onNavStaticClick );
+
+ this.navCompanionSelect( true );
+};
+
+proto.navCompanionSelect = function( isInstant ) {
+ // wait for companion & selectedCells first. #8
+ var companionCells = this.navCompanion && this.navCompanion.selectedCells;
+ if ( !companionCells ) {
+ return;
+ }
+ // select slide that matches first cell of slide
+ var selectedCell = companionCells[0];
+ var firstIndex = this.navCompanion.cells.indexOf( selectedCell );
+ var lastIndex = firstIndex + companionCells.length - 1;
+ var selectIndex = Math.floor( lerp( firstIndex, lastIndex,
+ this.navCompanion.cellAlign ) );
+ this.selectCell( selectIndex, false, isInstant );
+ // set nav selected class
+ this.removeNavSelectedElements();
+ // stop if companion has more cells than this one
+ if ( selectIndex >= this.cells.length ) {
+ return;
+ }
+
+ var selectedCells = this.cells.slice( firstIndex, lastIndex + 1 );
+ this.navSelectedElements = selectedCells.map( function( cell ) {
+ return cell.element;
+ });
+ this.changeNavSelectedClass('add');
+};
+
+function lerp( a, b, t ) {
+ return ( b - a ) * t + a;
+}
+
+proto.changeNavSelectedClass = function( method ) {
+ this.navSelectedElements.forEach( function( navElem ) {
+ navElem.classList[ method ]('is-nav-selected');
+ });
+};
+
+proto.activateAsNavFor = function() {
+ this.navCompanionSelect( true );
+};
+
+proto.removeNavSelectedElements = function() {
+ if ( !this.navSelectedElements ) {
+ return;
+ }
+ this.changeNavSelectedClass('remove');
+ delete this.navSelectedElements;
+};
+
+proto.onNavStaticClick = function( event, pointer, cellElement, cellIndex ) {
+ if ( typeof cellIndex == 'number' ) {
+ this.navCompanion.selectCell( cellIndex );
+ }
+};
+
+proto.deactivateAsNavFor = function() {
+ this.removeNavSelectedElements();
+};
+
+proto.destroyAsNavFor = function() {
+ if ( !this.navCompanion ) {
+ return;
+ }
+ this.navCompanion.off( 'select', this.onNavCompanionSelect );
+ this.off( 'staticClick', this.onNavStaticClick );
+ delete this.navCompanion;
+};
+
+// ----- ----- //
+
+return Flickity;
+
+}));
+
+/*!
+ * imagesLoaded v4.1.4
+ * JavaScript is all like "You images are done yet or what?"
+ * MIT License
+ */
+
+( function( window, factory ) { 'use strict';
+ // universal module definition
+
+ /*global define: false, module: false, require: false */
+
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( 'imagesloaded/imagesloaded',[
+ 'ev-emitter/ev-emitter'
+ ], function( EvEmitter ) {
+ return factory( window, EvEmitter );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('ev-emitter')
+ );
+ } else {
+ // browser global
+ window.imagesLoaded = factory(
+ window,
+ window.EvEmitter
+ );
+ }
+
+})( typeof window !== 'undefined' ? window : this,
+
+// -------------------------- factory -------------------------- //
+
+function factory( window, EvEmitter ) {
+
+
+
+var $ = window.jQuery;
+var console = window.console;
+
+// -------------------------- helpers -------------------------- //
+
+// extend objects
+function extend( a, b ) {
+ for ( var prop in b ) {
+ a[ prop ] = b[ prop ];
+ }
+ return a;
+}
+
+var arraySlice = Array.prototype.slice;
+
+// turn element or nodeList into an array
+function makeArray( obj ) {
+ if ( Array.isArray( obj ) ) {
+ // use object if already an array
+ return obj;
+ }
+
+ var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';
+ if ( isArrayLike ) {
+ // convert nodeList to array
+ return arraySlice.call( obj );
+ }
+
+ // array of single index
+ return [ obj ];
+}
+
+// -------------------------- imagesLoaded -------------------------- //
+
+/**
+ * @param {Array, Element, NodeList, String} elem
+ * @param {Object or Function} options - if function, use as callback
+ * @param {Function} onAlways - callback function
+ */
+function ImagesLoaded( elem, options, onAlways ) {
+ // coerce ImagesLoaded() without new, to be new ImagesLoaded()
+ if ( !( this instanceof ImagesLoaded ) ) {
+ return new ImagesLoaded( elem, options, onAlways );
+ }
+ // use elem as selector string
+ var queryElem = elem;
+ if ( typeof elem == 'string' ) {
+ queryElem = document.querySelectorAll( elem );
+ }
+ // bail if bad element
+ if ( !queryElem ) {
+ console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );
+ return;
+ }
+
+ this.elements = makeArray( queryElem );
+ this.options = extend( {}, this.options );
+ // shift arguments if no options set
+ if ( typeof options == 'function' ) {
+ onAlways = options;
+ } else {
+ extend( this.options, options );
+ }
+
+ if ( onAlways ) {
+ this.on( 'always', onAlways );
+ }
+
+ this.getImages();
+
+ if ( $ ) {
+ // add jQuery Deferred object
+ this.jqDeferred = new $.Deferred();
+ }
+
+ // HACK check async to allow time to bind listeners
+ setTimeout( this.check.bind( this ) );
+}
+
+ImagesLoaded.prototype = Object.create( EvEmitter.prototype );
+
+ImagesLoaded.prototype.options = {};
+
+ImagesLoaded.prototype.getImages = function() {
+ this.images = [];
+
+ // filter & find items if we have an item selector
+ this.elements.forEach( this.addElementImages, this );
+};
+
+/**
+ * @param {Node} element
+ */
+ImagesLoaded.prototype.addElementImages = function( elem ) {
+ // filter siblings
+ if ( elem.nodeName == 'IMG' ) {
+ this.addImage( elem );
+ }
+ // get background image on element
+ if ( this.options.background === true ) {
+ this.addElementBackgroundImages( elem );
+ }
+
+ // find children
+ // no non-element nodes, #143
+ var nodeType = elem.nodeType;
+ if ( !nodeType || !elementNodeTypes[ nodeType ] ) {
+ return;
+ }
+ var childImgs = elem.querySelectorAll('img');
+ // concat childElems to filterFound array
+ for ( var i=0; i < childImgs.length; i++ ) {
+ var img = childImgs[i];
+ this.addImage( img );
+ }
+
+ // get child background images
+ if ( typeof this.options.background == 'string' ) {
+ var children = elem.querySelectorAll( this.options.background );
+ for ( i=0; i < children.length; i++ ) {
+ var child = children[i];
+ this.addElementBackgroundImages( child );
+ }
+ }
+};
+
+var elementNodeTypes = {
+ 1: true,
+ 9: true,
+ 11: true
+};
+
+ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {
+ var style = getComputedStyle( elem );
+ if ( !style ) {
+ // Firefox returns null if in a hidden iframe https://bugzil.la/548397
+ return;
+ }
+ // get url inside url("...")
+ var reURL = /url\((['"])?(.*?)\1\)/gi;
+ var matches = reURL.exec( style.backgroundImage );
+ while ( matches !== null ) {
+ var url = matches && matches[2];
+ if ( url ) {
+ this.addBackground( url, elem );
+ }
+ matches = reURL.exec( style.backgroundImage );
+ }
+};
+
+/**
+ * @param {Image} img
+ */
+ImagesLoaded.prototype.addImage = function( img ) {
+ var loadingImage = new LoadingImage( img );
+ this.images.push( loadingImage );
+};
+
+ImagesLoaded.prototype.addBackground = function( url, elem ) {
+ var background = new Background( url, elem );
+ this.images.push( background );
+};
+
+ImagesLoaded.prototype.check = function() {
+ var _this = this;
+ this.progressedCount = 0;
+ this.hasAnyBroken = false;
+ // complete if no images
+ if ( !this.images.length ) {
+ this.complete();
+ return;
+ }
+
+ function onProgress( image, elem, message ) {
+ // HACK - Chrome triggers event before object properties have changed. #83
+ setTimeout( function() {
+ _this.progress( image, elem, message );
+ });
+ }
+
+ this.images.forEach( function( loadingImage ) {
+ loadingImage.once( 'progress', onProgress );
+ loadingImage.check();
+ });
+};
+
+ImagesLoaded.prototype.progress = function( image, elem, message ) {
+ this.progressedCount++;
+ this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;
+ // progress event
+ this.emitEvent( 'progress', [ this, image, elem ] );
+ if ( this.jqDeferred && this.jqDeferred.notify ) {
+ this.jqDeferred.notify( this, image );
+ }
+ // check if completed
+ if ( this.progressedCount == this.images.length ) {
+ this.complete();
+ }
+
+ if ( this.options.debug && console ) {
+ console.log( 'progress: ' + message, image, elem );
+ }
+};
+
+ImagesLoaded.prototype.complete = function() {
+ var eventName = this.hasAnyBroken ? 'fail' : 'done';
+ this.isComplete = true;
+ this.emitEvent( eventName, [ this ] );
+ this.emitEvent( 'always', [ this ] );
+ if ( this.jqDeferred ) {
+ var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';
+ this.jqDeferred[ jqMethod ]( this );
+ }
+};
+
+// -------------------------- -------------------------- //
+
+function LoadingImage( img ) {
+ this.img = img;
+}
+
+LoadingImage.prototype = Object.create( EvEmitter.prototype );
+
+LoadingImage.prototype.check = function() {
+ // If complete is true and browser supports natural sizes,
+ // try to check for image status manually.
+ var isComplete = this.getIsImageComplete();
+ if ( isComplete ) {
+ // report based on naturalWidth
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
+ return;
+ }
+
+ // If none of the checks above matched, simulate loading on detached element.
+ this.proxyImage = new Image();
+ this.proxyImage.addEventListener( 'load', this );
+ this.proxyImage.addEventListener( 'error', this );
+ // bind to image as well for Firefox. #191
+ this.img.addEventListener( 'load', this );
+ this.img.addEventListener( 'error', this );
+ this.proxyImage.src = this.img.src;
+};
+
+LoadingImage.prototype.getIsImageComplete = function() {
+ // check for non-zero, non-undefined naturalWidth
+ // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671
+ return this.img.complete && this.img.naturalWidth;
+};
+
+LoadingImage.prototype.confirm = function( isLoaded, message ) {
+ this.isLoaded = isLoaded;
+ this.emitEvent( 'progress', [ this, this.img, message ] );
+};
+
+// ----- events ----- //
+
+// trigger specified handler for event type
+LoadingImage.prototype.handleEvent = function( event ) {
+ var method = 'on' + event.type;
+ if ( this[ method ] ) {
+ this[ method ]( event );
+ }
+};
+
+LoadingImage.prototype.onload = function() {
+ this.confirm( true, 'onload' );
+ this.unbindEvents();
+};
+
+LoadingImage.prototype.onerror = function() {
+ this.confirm( false, 'onerror' );
+ this.unbindEvents();
+};
+
+LoadingImage.prototype.unbindEvents = function() {
+ this.proxyImage.removeEventListener( 'load', this );
+ this.proxyImage.removeEventListener( 'error', this );
+ this.img.removeEventListener( 'load', this );
+ this.img.removeEventListener( 'error', this );
+};
+
+// -------------------------- Background -------------------------- //
+
+function Background( url, element ) {
+ this.url = url;
+ this.element = element;
+ this.img = new Image();
+}
+
+// inherit LoadingImage prototype
+Background.prototype = Object.create( LoadingImage.prototype );
+
+Background.prototype.check = function() {
+ this.img.addEventListener( 'load', this );
+ this.img.addEventListener( 'error', this );
+ this.img.src = this.url;
+ // check if image is already complete
+ var isComplete = this.getIsImageComplete();
+ if ( isComplete ) {
+ this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );
+ this.unbindEvents();
+ }
+};
+
+Background.prototype.unbindEvents = function() {
+ this.img.removeEventListener( 'load', this );
+ this.img.removeEventListener( 'error', this );
+};
+
+Background.prototype.confirm = function( isLoaded, message ) {
+ this.isLoaded = isLoaded;
+ this.emitEvent( 'progress', [ this, this.element, message ] );
+};
+
+// -------------------------- jQuery -------------------------- //
+
+ImagesLoaded.makeJQueryPlugin = function( jQuery ) {
+ jQuery = jQuery || window.jQuery;
+ if ( !jQuery ) {
+ return;
+ }
+ // set local variable
+ $ = jQuery;
+ // $().imagesLoaded()
+ $.fn.imagesLoaded = function( options, callback ) {
+ var instance = new ImagesLoaded( this, options, callback );
+ return instance.jqDeferred.promise( $(this) );
+ };
+};
+// try making plugin
+ImagesLoaded.makeJQueryPlugin();
+
+// -------------------------- -------------------------- //
+
+return ImagesLoaded;
+
+});
+
+/*!
+ * Flickity imagesLoaded v2.0.0
+ * enables imagesLoaded option for Flickity
+ */
+
+/*jshint browser: true, strict: true, undef: true, unused: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /*jshint strict: false */ /*globals define, module, require */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'flickity/js/index',
+ 'imagesloaded/imagesloaded'
+ ], function( Flickity, imagesLoaded ) {
+ return factory( window, Flickity, imagesLoaded );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('flickity'),
+ require('imagesloaded')
+ );
+ } else {
+ // browser global
+ window.Flickity = factory(
+ window,
+ window.Flickity,
+ window.imagesLoaded
+ );
+ }
+
+}( window, function factory( window, Flickity, imagesLoaded ) {
+'use strict';
+
+Flickity.createMethods.push('_createImagesLoaded');
+
+var proto = Flickity.prototype;
+
+proto._createImagesLoaded = function() {
+ this.on( 'activate', this.imagesLoaded );
+};
+
+proto.imagesLoaded = function() {
+ if ( !this.options.imagesLoaded ) {
+ return;
+ }
+ var _this = this;
+ function onImagesLoadedProgress( instance, image ) {
+ var cell = _this.getParentCell( image.img );
+ _this.cellSizeChange( cell && cell.element );
+ if ( !_this.options.freeScroll ) {
+ _this.positionSliderAtSelected();
+ }
+ }
+ imagesLoaded( this.slider ).on( 'progress', onImagesLoadedProgress );
+};
+
+return Flickity;
+
+}));
+
diff --git a/node_modules/flickity/dist/flickity.pkgd.min.js b/node_modules/flickity/dist/flickity.pkgd.min.js
new file mode 100644
index 00000000..4a42c10f
--- /dev/null
+++ b/node_modules/flickity/dist/flickity.pkgd.min.js
@@ -0,0 +1,12 @@
+/*!
+ * Flickity PACKAGED v2.2.1
+ * Touch, responsive, flickable carousels
+ *
+ * Licensed GPLv3 for open source use
+ * or Flickity Commercial License for commercial use
+ *
+ * https://flickity.metafizzy.co
+ * Copyright 2015-2019 Metafizzy
+ */
+
+!function(e,i){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("jquery")):e.jQueryBridget=i(e,e.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function s(h,s,c){(c=c||e||t.jQuery)&&(s.prototype.option||(s.prototype.option=function(t){c.isPlainObject(t)&&(this.options=c.extend(!0,this.options,t))}),c.fn[h]=function(t){return"string"==typeof t?function(t,o,r){var a,l="$()."+h+'("'+o+'")';return t.each(function(t,e){var i=c.data(e,h);if(i){var n=i[o];if(n&&"_"!=o.charAt(0)){var s=n.apply(i,r);a=void 0===a?s:a}else d(l+" is not a valid method")}else d(h+" not initialized. Cannot call methods, i.e. "+l)}),void 0!==a?a:t}(this,t,i.call(arguments,1)):(function(t,n){t.each(function(t,e){var i=c.data(e,h);i?(i.option(n),i._init()):(i=new s(e,n),c.data(e,h,i))})}(this,t),this)},o(c))}function o(t){!t||t&&t.bridget||(t.bridget=s)}return o(e||t.jQuery),s}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s
*"),this.getCell(t))},p.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(i<=1+2*t)return this.getCellElements();for(var n=[],s=e-t;s<=e+t;s++){var o=this.options.wrapAround?a.modulo(s,i):s,r=this.slides[o];r&&(n=n.concat(r.getCellElements()))}return n},p.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#\.]?[\d\/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},p.uiChange=function(){this.emitEvent("uiChange")},p.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},p.onresize=function(){this.watchCSS(),this.resize()},a.debounceMethod(f,"onresize",150),p.resize=function(){if(this.isActive){this.getSize(),this.options.wrapAround&&(this.x=a.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},p.watchCSS=function(){this.options.watchCSS&&(-1!=o(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},p.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=f.keyboardHandlers[t.keyCode];i&&i.call(this)}},f.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},p.focus=function(){var t=n.pageYOffset;this.element.focus({preventScroll:!0}),n.pageYOffset!=t&&n.scrollTo(n.pageXOffset,t)},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),c(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),n.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),l&&this.$element&&l.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete u[this.guid]},a.extend(p,s),f.data=function(t){var e=(t=a.getQueryElement(t))&&t.flickityGUID;return e&&u[e]},a.htmlInit(f,"flickity"),l&&l.bridget&&l.bridget("flickity",f),f.setJQuery=function(t){l=t},f.Cell=i,f.Slide=r,f}),function(e,i){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter")):e.Unipointer=i(e,e.EvEmitter)}(window,function(s,t){function e(){}var i=e.prototype=Object.create(t.prototype);i.bindStartEvent=function(t){this._bindStartEvent(t,!0)},i.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},i._bindStartEvent=function(t,e){var i=(e=void 0===e||e)?"addEventListener":"removeEventListener",n="mousedown";s.PointerEvent?n="pointerdown":"ontouchstart"in s&&(n="touchstart"),t[i](n,this)},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.getTouch=function(t){for(var e=0;e1",dragThreshold:3}),t.createMethods.push("_createDrag");var n=t.prototype;a.extend(n,e.prototype),n._touchActionValue="pan-y";var s="createTouch"in document,o=!1;n._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),s&&!o&&(i.addEventListener("touchmove",function(){}),o=!0)},n.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},n.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},n.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=1this.options.dragThreshold},n.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},n.pointerDone=function(){i.removeEventListener("scroll",this),delete this.pointerDownScroll},n.dragStart=function(t,e){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),i.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[e]))},n.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},n.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x=i.x%this.slideableWidth);var s=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.slides.length){var o=Math.max(-this.slides[0].target,this.dragStartPosition);s=othis.slides[0].target&&-n=this.cells.length)){var r=this.cells.slice(n,1+s);this.navSelectedElements=r.map(function(t){return t.element}),this.changeNavSelectedClass("add")}}},t.changeNavSelectedClass=function(e){this.navSelectedElements.forEach(function(t){t.classList[e]("is-nav-selected")})},t.activateAsNavFor=function(){this.navCompanionSelect(!0)},t.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)},t.onNavStaticClick=function(t,e,i,n){"number"==typeof n&&this.navCompanion.selectCell(n)},t.deactivateAsNavFor=function(){this.removeNavSelectedElements()},t.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},n}),function(e,i){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter")):e.imagesLoaded=i(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){var s=e.jQuery,o=e.console;function r(t,e){for(var i in e)t[i]=e[i];return t}var a=Array.prototype.slice;function l(t,e,i){if(!(this instanceof l))return new l(t,e,i);var n=t;"string"==typeof t&&(n=document.querySelectorAll(t)),n?(this.elements=function(t){return Array.isArray(t)?t:"object"==typeof t&&"number"==typeof t.length?a.call(t):[t]}(n),this.options=r({},this.options),"function"==typeof e?i=e:r(this.options,e),i&&this.on("always",i),this.getImages(),s&&(this.jqDeferred=new s.Deferred),setTimeout(this.check.bind(this))):o.error("Bad element for imagesLoaded "+(n||t))}(l.prototype=Object.create(t.prototype)).options={},l.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},l.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&h[e]){for(var i=t.querySelectorAll("img"),n=0;n 1 ) {
+ x = utils.modulo( x, this.slideableWidth );
+ x = x - this.slideableWidth;
+ this.shiftWrapCells( x );
+ }
+
+ this.setTranslateX( x, this.isAnimating );
+ this.dispatchScrollEvent();
+};
+
+proto.setTranslateX = function( x, is3d ) {
+ x += this.cursorPosition;
+ // reverse if right-to-left and using transform
+ x = this.options.rightToLeft ? -x : x;
+ var translateX = this.getPositionValue( x );
+ // use 3D tranforms for hardware acceleration on iOS
+ // but use 2D when settled, for better font-rendering
+ this.slider.style.transform = is3d ?
+ 'translate3d(' + translateX + ',0,0)' : 'translateX(' + translateX + ')';
+};
+
+proto.dispatchScrollEvent = function() {
+ var firstSlide = this.slides[0];
+ if ( !firstSlide ) {
+ return;
+ }
+ var positionX = -this.x - firstSlide.target;
+ var progress = positionX / this.slidesWidth;
+ this.dispatchEvent( 'scroll', null, [ progress, positionX ] );
+};
+
+proto.positionSliderAtSelected = function() {
+ if ( !this.cells.length ) {
+ return;
+ }
+ this.x = -this.selectedSlide.target;
+ this.velocity = 0; // stop wobble
+ this.positionSlider();
+};
+
+proto.getPositionValue = function( position ) {
+ if ( this.options.percentPosition ) {
+ // percent position, round to 2 digits, like 12.34%
+ return ( Math.round( ( position / this.size.innerWidth ) * 10000 ) * 0.01 )+ '%';
+ } else {
+ // pixel positioning
+ return Math.round( position ) + 'px';
+ }
+};
+
+proto.settle = function( previousX ) {
+ // keep track of frames where x hasn't moved
+ if ( !this.isPointerDown && Math.round( this.x * 100 ) == Math.round( previousX * 100 ) ) {
+ this.restingFrames++;
+ }
+ // stop animating if resting for 3 or more frames
+ if ( this.restingFrames > 2 ) {
+ this.isAnimating = false;
+ delete this.isFreeScrolling;
+ // render position with translateX when settled
+ this.positionSlider();
+ this.dispatchEvent( 'settle', null, [ this.selectedIndex ] );
+ }
+};
+
+proto.shiftWrapCells = function( x ) {
+ // shift before cells
+ var beforeGap = this.cursorPosition + x;
+ this._shiftCells( this.beforeShiftCells, beforeGap, -1 );
+ // shift after cells
+ var afterGap = this.size.innerWidth - ( x + this.slideableWidth + this.cursorPosition );
+ this._shiftCells( this.afterShiftCells, afterGap, 1 );
+};
+
+proto._shiftCells = function( cells, gap, shift ) {
+ for ( var i=0; i < cells.length; i++ ) {
+ var cell = cells[i];
+ var cellShift = gap > 0 ? shift : 0;
+ cell.wrapShift( cellShift );
+ gap -= cell.size.outerWidth;
+ }
+};
+
+proto._unshiftCells = function( cells ) {
+ if ( !cells || !cells.length ) {
+ return;
+ }
+ for ( var i=0; i < cells.length; i++ ) {
+ cells[i].wrapShift( 0 );
+ }
+};
+
+// -------------------------- physics -------------------------- //
+
+proto.integratePhysics = function() {
+ this.x += this.velocity;
+ this.velocity *= this.getFrictionFactor();
+};
+
+proto.applyForce = function( force ) {
+ this.velocity += force;
+};
+
+proto.getFrictionFactor = function() {
+ return 1 - this.options[ this.isFreeScrolling ? 'freeScrollFriction' : 'friction' ];
+};
+
+proto.getRestingPosition = function() {
+ // my thanks to Steven Wittens, who simplified this math greatly
+ return this.x + this.velocity / ( 1 - this.getFrictionFactor() );
+};
+
+proto.applyDragForce = function() {
+ if ( !this.isDraggable || !this.isPointerDown ) {
+ return;
+ }
+ // change the position to drag position by applying force
+ var dragVelocity = this.dragX - this.x;
+ var dragForce = dragVelocity - this.velocity;
+ this.applyForce( dragForce );
+};
+
+proto.applySelectedAttraction = function() {
+ // do not attract if pointer down or no slides
+ var dragDown = this.isDraggable && this.isPointerDown;
+ if ( dragDown || this.isFreeScrolling || !this.slides.length ) {
+ return;
+ }
+ var distance = this.selectedSlide.target * -1 - this.x;
+ var force = distance * this.options.selectedAttraction;
+ this.applyForce( force );
+};
+
+return proto;
+
+}));
diff --git a/node_modules/flickity/js/cell.js b/node_modules/flickity/js/cell.js
new file mode 100644
index 00000000..4d7f7611
--- /dev/null
+++ b/node_modules/flickity/js/cell.js
@@ -0,0 +1,102 @@
+// Flickity.Cell
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'get-size/get-size'
+ ], function( getSize ) {
+ return factory( window, getSize );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('get-size')
+ );
+ } else {
+ // browser global
+ window.Flickity = window.Flickity || {};
+ window.Flickity.Cell = factory(
+ window,
+ window.getSize
+ );
+ }
+
+}( window, function factory( window, getSize ) {
+
+'use strict';
+
+function Cell( elem, parent ) {
+ this.element = elem;
+ this.parent = parent;
+
+ this.create();
+}
+
+var proto = Cell.prototype;
+
+proto.create = function() {
+ this.element.style.position = 'absolute';
+ this.element.setAttribute( 'aria-hidden', 'true' );
+ this.x = 0;
+ this.shift = 0;
+};
+
+proto.destroy = function() {
+ // reset style
+ this.unselect();
+ this.element.style.position = '';
+ var side = this.parent.originSide;
+ this.element.style[ side ] = '';
+};
+
+proto.getSize = function() {
+ this.size = getSize( this.element );
+};
+
+proto.setPosition = function( x ) {
+ this.x = x;
+ this.updateTarget();
+ this.renderPosition( x );
+};
+
+// setDefaultTarget v1 method, backwards compatibility, remove in v3
+proto.updateTarget = proto.setDefaultTarget = function() {
+ var marginProperty = this.parent.originSide == 'left' ? 'marginLeft' : 'marginRight';
+ this.target = this.x + this.size[ marginProperty ] +
+ this.size.width * this.parent.cellAlign;
+};
+
+proto.renderPosition = function( x ) {
+ // render position of cell with in slider
+ var side = this.parent.originSide;
+ this.element.style[ side ] = this.parent.getPositionValue( x );
+};
+
+proto.select = function() {
+ this.element.classList.add('is-selected');
+ this.element.removeAttribute('aria-hidden');
+};
+
+proto.unselect = function() {
+ this.element.classList.remove('is-selected');
+ this.element.setAttribute( 'aria-hidden', 'true' );
+};
+
+/**
+ * @param {Integer} factor - 0, 1, or -1
+**/
+proto.wrapShift = function( shift ) {
+ this.shift = shift;
+ this.renderPosition( this.x + this.parent.slideableWidth * shift );
+};
+
+proto.remove = function() {
+ this.element.parentNode.removeChild( this.element );
+};
+
+return Cell;
+
+}));
diff --git a/node_modules/flickity/js/drag.js b/node_modules/flickity/js/drag.js
new file mode 100644
index 00000000..ad199001
--- /dev/null
+++ b/node_modules/flickity/js/drag.js
@@ -0,0 +1,393 @@
+// drag
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ './flickity',
+ 'unidragger/unidragger',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, Unidragger, utils ) {
+ return factory( window, Flickity, Unidragger, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('unidragger'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ window.Flickity = factory(
+ window,
+ window.Flickity,
+ window.Unidragger,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, Unidragger, utils ) {
+
+'use strict';
+
+// ----- defaults ----- //
+
+utils.extend( Flickity.defaults, {
+ draggable: '>1',
+ dragThreshold: 3,
+});
+
+// ----- create ----- //
+
+Flickity.createMethods.push('_createDrag');
+
+// -------------------------- drag prototype -------------------------- //
+
+var proto = Flickity.prototype;
+utils.extend( proto, Unidragger.prototype );
+proto._touchActionValue = 'pan-y';
+
+// -------------------------- -------------------------- //
+
+var isTouch = 'createTouch' in document;
+var isTouchmoveScrollCanceled = false;
+
+proto._createDrag = function() {
+ this.on( 'activate', this.onActivateDrag );
+ this.on( 'uiChange', this._uiChangeDrag );
+ this.on( 'deactivate', this.onDeactivateDrag );
+ this.on( 'cellChange', this.updateDraggable );
+ // TODO updateDraggable on resize? if groupCells & slides change
+ // HACK - add seemingly innocuous handler to fix iOS 10 scroll behavior
+ // #457, RubaXa/Sortable#973
+ if ( isTouch && !isTouchmoveScrollCanceled ) {
+ window.addEventListener( 'touchmove', function() {});
+ isTouchmoveScrollCanceled = true;
+ }
+};
+
+proto.onActivateDrag = function() {
+ this.handles = [ this.viewport ];
+ this.bindHandles();
+ this.updateDraggable();
+};
+
+proto.onDeactivateDrag = function() {
+ this.unbindHandles();
+ this.element.classList.remove('is-draggable');
+};
+
+proto.updateDraggable = function() {
+ // disable dragging if less than 2 slides. #278
+ if ( this.options.draggable == '>1' ) {
+ this.isDraggable = this.slides.length > 1;
+ } else {
+ this.isDraggable = this.options.draggable;
+ }
+ if ( this.isDraggable ) {
+ this.element.classList.add('is-draggable');
+ } else {
+ this.element.classList.remove('is-draggable');
+ }
+};
+
+// backwards compatibility
+proto.bindDrag = function() {
+ this.options.draggable = true;
+ this.updateDraggable();
+};
+
+proto.unbindDrag = function() {
+ this.options.draggable = false;
+ this.updateDraggable();
+};
+
+proto._uiChangeDrag = function() {
+ delete this.isFreeScrolling;
+};
+
+// -------------------------- pointer events -------------------------- //
+
+proto.pointerDown = function( event, pointer ) {
+ if ( !this.isDraggable ) {
+ this._pointerDownDefault( event, pointer );
+ return;
+ }
+ var isOkay = this.okayPointerDown( event );
+ if ( !isOkay ) {
+ return;
+ }
+
+ this._pointerDownPreventDefault( event );
+ this.pointerDownFocus( event );
+ // blur
+ if ( document.activeElement != this.element ) {
+ // do not blur if already focused
+ this.pointerDownBlur();
+ }
+
+ // stop if it was moving
+ this.dragX = this.x;
+ this.viewport.classList.add('is-pointer-down');
+ // track scrolling
+ this.pointerDownScroll = getScrollPosition();
+ window.addEventListener( 'scroll', this );
+
+ this._pointerDownDefault( event, pointer );
+};
+
+// default pointerDown logic, used for staticClick
+proto._pointerDownDefault = function( event, pointer ) {
+ // track start event position
+ // Safari 9 overrides pageX and pageY. These values needs to be copied. #779
+ this.pointerDownPointer = {
+ pageX: pointer.pageX,
+ pageY: pointer.pageY,
+ };
+ // bind move and end events
+ this._bindPostStartEvents( event );
+ this.dispatchEvent( 'pointerDown', event, [ pointer ] );
+};
+
+var focusNodes = {
+ INPUT: true,
+ TEXTAREA: true,
+ SELECT: true,
+};
+
+proto.pointerDownFocus = function( event ) {
+ var isFocusNode = focusNodes[ event.target.nodeName ];
+ if ( !isFocusNode ) {
+ this.focus();
+ }
+};
+
+proto._pointerDownPreventDefault = function( event ) {
+ var isTouchStart = event.type == 'touchstart';
+ var isTouchPointer = event.pointerType == 'touch';
+ var isFocusNode = focusNodes[ event.target.nodeName ];
+ if ( !isTouchStart && !isTouchPointer && !isFocusNode ) {
+ event.preventDefault();
+ }
+};
+
+// ----- move ----- //
+
+proto.hasDragStarted = function( moveVector ) {
+ return Math.abs( moveVector.x ) > this.options.dragThreshold;
+};
+
+// ----- up ----- //
+
+proto.pointerUp = function( event, pointer ) {
+ delete this.isTouchScrolling;
+ this.viewport.classList.remove('is-pointer-down');
+ this.dispatchEvent( 'pointerUp', event, [ pointer ] );
+ this._dragPointerUp( event, pointer );
+};
+
+proto.pointerDone = function() {
+ window.removeEventListener( 'scroll', this );
+ delete this.pointerDownScroll;
+};
+
+// -------------------------- dragging -------------------------- //
+
+proto.dragStart = function( event, pointer ) {
+ if ( !this.isDraggable ) {
+ return;
+ }
+ this.dragStartPosition = this.x;
+ this.startAnimation();
+ window.removeEventListener( 'scroll', this );
+ this.dispatchEvent( 'dragStart', event, [ pointer ] );
+};
+
+proto.pointerMove = function( event, pointer ) {
+ var moveVector = this._dragPointerMove( event, pointer );
+ this.dispatchEvent( 'pointerMove', event, [ pointer, moveVector ] );
+ this._dragMove( event, pointer, moveVector );
+};
+
+proto.dragMove = function( event, pointer, moveVector ) {
+ if ( !this.isDraggable ) {
+ return;
+ }
+ event.preventDefault();
+
+ this.previousDragX = this.dragX;
+ // reverse if right-to-left
+ var direction = this.options.rightToLeft ? -1 : 1;
+ if ( this.options.wrapAround ) {
+ // wrap around move. #589
+ moveVector.x = moveVector.x % this.slideableWidth;
+ }
+ var dragX = this.dragStartPosition + moveVector.x * direction;
+
+ if ( !this.options.wrapAround && this.slides.length ) {
+ // slow drag
+ var originBound = Math.max( -this.slides[0].target, this.dragStartPosition );
+ dragX = dragX > originBound ? ( dragX + originBound ) * 0.5 : dragX;
+ var endBound = Math.min( -this.getLastSlide().target, this.dragStartPosition );
+ dragX = dragX < endBound ? ( dragX + endBound ) * 0.5 : dragX;
+ }
+
+ this.dragX = dragX;
+
+ this.dragMoveTime = new Date();
+ this.dispatchEvent( 'dragMove', event, [ pointer, moveVector ] );
+};
+
+proto.dragEnd = function( event, pointer ) {
+ if ( !this.isDraggable ) {
+ return;
+ }
+ if ( this.options.freeScroll ) {
+ this.isFreeScrolling = true;
+ }
+ // set selectedIndex based on where flick will end up
+ var index = this.dragEndRestingSelect();
+
+ if ( this.options.freeScroll && !this.options.wrapAround ) {
+ // if free-scroll & not wrap around
+ // do not free-scroll if going outside of bounding slides
+ // so bounding slides can attract slider, and keep it in bounds
+ var restingX = this.getRestingPosition();
+ this.isFreeScrolling = -restingX > this.slides[0].target &&
+ -restingX < this.getLastSlide().target;
+ } else if ( !this.options.freeScroll && index == this.selectedIndex ) {
+ // boost selection if selected index has not changed
+ index += this.dragEndBoostSelect();
+ }
+ delete this.previousDragX;
+ // apply selection
+ // TODO refactor this, selecting here feels weird
+ // HACK, set flag so dragging stays in correct direction
+ this.isDragSelect = this.options.wrapAround;
+ this.select( index );
+ delete this.isDragSelect;
+ this.dispatchEvent( 'dragEnd', event, [ pointer ] );
+};
+
+proto.dragEndRestingSelect = function() {
+ var restingX = this.getRestingPosition();
+ // how far away from selected slide
+ var distance = Math.abs( this.getSlideDistance( -restingX, this.selectedIndex ) );
+ // get closet resting going up and going down
+ var positiveResting = this._getClosestResting( restingX, distance, 1 );
+ var negativeResting = this._getClosestResting( restingX, distance, -1 );
+ // use closer resting for wrap-around
+ var index = positiveResting.distance < negativeResting.distance ?
+ positiveResting.index : negativeResting.index;
+ return index;
+};
+
+/**
+ * given resting X and distance to selected cell
+ * get the distance and index of the closest cell
+ * @param {Number} restingX - estimated post-flick resting position
+ * @param {Number} distance - distance to selected cell
+ * @param {Integer} increment - +1 or -1, going up or down
+ * @returns {Object} - { distance: {Number}, index: {Integer} }
+ */
+proto._getClosestResting = function( restingX, distance, increment ) {
+ var index = this.selectedIndex;
+ var minDistance = Infinity;
+ var condition = this.options.contain && !this.options.wrapAround ?
+ // if contain, keep going if distance is equal to minDistance
+ function( d, md ) { return d <= md; } : function( d, md ) { return d < md; };
+ while ( condition( distance, minDistance ) ) {
+ // measure distance to next cell
+ index += increment;
+ minDistance = distance;
+ distance = this.getSlideDistance( -restingX, index );
+ if ( distance === null ) {
+ break;
+ }
+ distance = Math.abs( distance );
+ }
+ return {
+ distance: minDistance,
+ // selected was previous index
+ index: index - increment
+ };
+};
+
+/**
+ * measure distance between x and a slide target
+ * @param {Number} x
+ * @param {Integer} index - slide index
+ */
+proto.getSlideDistance = function( x, index ) {
+ var len = this.slides.length;
+ // wrap around if at least 2 slides
+ var isWrapAround = this.options.wrapAround && len > 1;
+ var slideIndex = isWrapAround ? utils.modulo( index, len ) : index;
+ var slide = this.slides[ slideIndex ];
+ if ( !slide ) {
+ return null;
+ }
+ // add distance for wrap-around slides
+ var wrap = isWrapAround ? this.slideableWidth * Math.floor( index / len ) : 0;
+ return x - ( slide.target + wrap );
+};
+
+proto.dragEndBoostSelect = function() {
+ // do not boost if no previousDragX or dragMoveTime
+ if ( this.previousDragX === undefined || !this.dragMoveTime ||
+ // or if drag was held for 100 ms
+ new Date() - this.dragMoveTime > 100 ) {
+ return 0;
+ }
+
+ var distance = this.getSlideDistance( -this.dragX, this.selectedIndex );
+ var delta = this.previousDragX - this.dragX;
+ if ( distance > 0 && delta > 0 ) {
+ // boost to next if moving towards the right, and positive velocity
+ return 1;
+ } else if ( distance < 0 && delta < 0 ) {
+ // boost to previous if moving towards the left, and negative velocity
+ return -1;
+ }
+ return 0;
+};
+
+// ----- staticClick ----- //
+
+proto.staticClick = function( event, pointer ) {
+ // get clickedCell, if cell was clicked
+ var clickedCell = this.getParentCell( event.target );
+ var cellElem = clickedCell && clickedCell.element;
+ var cellIndex = clickedCell && this.cells.indexOf( clickedCell );
+ this.dispatchEvent( 'staticClick', event, [ pointer, cellElem, cellIndex ] );
+};
+
+// ----- scroll ----- //
+
+proto.onscroll = function() {
+ var scroll = getScrollPosition();
+ var scrollMoveX = this.pointerDownScroll.x - scroll.x;
+ var scrollMoveY = this.pointerDownScroll.y - scroll.y;
+ // cancel click/tap if scroll is too much
+ if ( Math.abs( scrollMoveX ) > 3 || Math.abs( scrollMoveY ) > 3 ) {
+ this._pointerDone();
+ }
+};
+
+// ----- utils ----- //
+
+function getScrollPosition() {
+ return {
+ x: window.pageXOffset,
+ y: window.pageYOffset
+ };
+}
+
+// ----- ----- //
+
+return Flickity;
+
+}));
diff --git a/node_modules/flickity/js/flickity.js b/node_modules/flickity/js/flickity.js
new file mode 100644
index 00000000..d06387be
--- /dev/null
+++ b/node_modules/flickity/js/flickity.js
@@ -0,0 +1,929 @@
+// Flickity main
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'ev-emitter/ev-emitter',
+ 'get-size/get-size',
+ 'fizzy-ui-utils/utils',
+ './cell',
+ './slide',
+ './animate'
+ ], function( EvEmitter, getSize, utils, Cell, Slide, animatePrototype ) {
+ return factory( window, EvEmitter, getSize, utils, Cell, Slide, animatePrototype );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('ev-emitter'),
+ require('get-size'),
+ require('fizzy-ui-utils'),
+ require('./cell'),
+ require('./slide'),
+ require('./animate')
+ );
+ } else {
+ // browser global
+ var _Flickity = window.Flickity;
+
+ window.Flickity = factory(
+ window,
+ window.EvEmitter,
+ window.getSize,
+ window.fizzyUIUtils,
+ _Flickity.Cell,
+ _Flickity.Slide,
+ _Flickity.animatePrototype
+ );
+ }
+
+}( window, function factory( window, EvEmitter, getSize,
+ utils, Cell, Slide, animatePrototype ) {
+
+'use strict';
+
+// vars
+var jQuery = window.jQuery;
+var getComputedStyle = window.getComputedStyle;
+var console = window.console;
+
+function moveElements( elems, toElem ) {
+ elems = utils.makeArray( elems );
+ while ( elems.length ) {
+ toElem.appendChild( elems.shift() );
+ }
+}
+
+// -------------------------- Flickity -------------------------- //
+
+// globally unique identifiers
+var GUID = 0;
+// internal store of all Flickity intances
+var instances = {};
+
+function Flickity( element, options ) {
+ var queryElement = utils.getQueryElement( element );
+ if ( !queryElement ) {
+ if ( console ) {
+ console.error( 'Bad element for Flickity: ' + ( queryElement || element ) );
+ }
+ return;
+ }
+ this.element = queryElement;
+ // do not initialize twice on same element
+ if ( this.element.flickityGUID ) {
+ var instance = instances[ this.element.flickityGUID ];
+ instance.option( options );
+ return instance;
+ }
+
+ // add jQuery
+ if ( jQuery ) {
+ this.$element = jQuery( this.element );
+ }
+ // options
+ this.options = utils.extend( {}, this.constructor.defaults );
+ this.option( options );
+
+ // kick things off
+ this._create();
+}
+
+Flickity.defaults = {
+ accessibility: true,
+ // adaptiveHeight: false,
+ cellAlign: 'center',
+ // cellSelector: undefined,
+ // contain: false,
+ freeScrollFriction: 0.075, // friction when free-scrolling
+ friction: 0.28, // friction when selecting
+ namespaceJQueryEvents: true,
+ // initialIndex: 0,
+ percentPosition: true,
+ resize: true,
+ selectedAttraction: 0.025,
+ setGallerySize: true
+ // watchCSS: false,
+ // wrapAround: false
+};
+
+// hash of methods triggered on _create()
+Flickity.createMethods = [];
+
+var proto = Flickity.prototype;
+// inherit EventEmitter
+utils.extend( proto, EvEmitter.prototype );
+
+proto._create = function() {
+ // add id for Flickity.data
+ var id = this.guid = ++GUID;
+ this.element.flickityGUID = id; // expando
+ instances[ id ] = this; // associate via id
+ // initial properties
+ this.selectedIndex = 0;
+ // how many frames slider has been in same position
+ this.restingFrames = 0;
+ // initial physics properties
+ this.x = 0;
+ this.velocity = 0;
+ this.originSide = this.options.rightToLeft ? 'right' : 'left';
+ // create viewport & slider
+ this.viewport = document.createElement('div');
+ this.viewport.className = 'flickity-viewport';
+ this._createSlider();
+
+ if ( this.options.resize || this.options.watchCSS ) {
+ window.addEventListener( 'resize', this );
+ }
+
+ // add listeners from on option
+ for ( var eventName in this.options.on ) {
+ var listener = this.options.on[ eventName ];
+ this.on( eventName, listener );
+ }
+
+ Flickity.createMethods.forEach( function( method ) {
+ this[ method ]();
+ }, this );
+
+ if ( this.options.watchCSS ) {
+ this.watchCSS();
+ } else {
+ this.activate();
+ }
+
+};
+
+/**
+ * set options
+ * @param {Object} opts
+ */
+proto.option = function( opts ) {
+ utils.extend( this.options, opts );
+};
+
+proto.activate = function() {
+ if ( this.isActive ) {
+ return;
+ }
+ this.isActive = true;
+ this.element.classList.add('flickity-enabled');
+ if ( this.options.rightToLeft ) {
+ this.element.classList.add('flickity-rtl');
+ }
+
+ this.getSize();
+ // move initial cell elements so they can be loaded as cells
+ var cellElems = this._filterFindCellElements( this.element.children );
+ moveElements( cellElems, this.slider );
+ this.viewport.appendChild( this.slider );
+ this.element.appendChild( this.viewport );
+ // get cells from children
+ this.reloadCells();
+
+ if ( this.options.accessibility ) {
+ // allow element to focusable
+ this.element.tabIndex = 0;
+ // listen for key presses
+ this.element.addEventListener( 'keydown', this );
+ }
+
+ this.emitEvent('activate');
+ this.selectInitialIndex();
+ // flag for initial activation, for using initialIndex
+ this.isInitActivated = true;
+ // ready event. #493
+ this.dispatchEvent('ready');
+};
+
+// slider positions the cells
+proto._createSlider = function() {
+ // slider element does all the positioning
+ var slider = document.createElement('div');
+ slider.className = 'flickity-slider';
+ slider.style[ this.originSide ] = 0;
+ this.slider = slider;
+};
+
+proto._filterFindCellElements = function( elems ) {
+ return utils.filterFindElements( elems, this.options.cellSelector );
+};
+
+// goes through all children
+proto.reloadCells = function() {
+ // collection of item elements
+ this.cells = this._makeCells( this.slider.children );
+ this.positionCells();
+ this._getWrapShiftCells();
+ this.setGallerySize();
+};
+
+/**
+ * turn elements into Flickity.Cells
+ * @param {Array or NodeList or HTMLElement} elems
+ * @returns {Array} items - collection of new Flickity Cells
+ */
+proto._makeCells = function( elems ) {
+ var cellElems = this._filterFindCellElements( elems );
+
+ // create new Flickity for collection
+ var cells = cellElems.map( function( cellElem ) {
+ return new Cell( cellElem, this );
+ }, this );
+
+ return cells;
+};
+
+proto.getLastCell = function() {
+ return this.cells[ this.cells.length - 1 ];
+};
+
+proto.getLastSlide = function() {
+ return this.slides[ this.slides.length - 1 ];
+};
+
+// positions all cells
+proto.positionCells = function() {
+ // size all cells
+ this._sizeCells( this.cells );
+ // position all cells
+ this._positionCells( 0 );
+};
+
+/**
+ * position certain cells
+ * @param {Integer} index - which cell to start with
+ */
+proto._positionCells = function( index ) {
+ index = index || 0;
+ // also measure maxCellHeight
+ // start 0 if positioning all cells
+ this.maxCellHeight = index ? this.maxCellHeight || 0 : 0;
+ var cellX = 0;
+ // get cellX
+ if ( index > 0 ) {
+ var startCell = this.cells[ index - 1 ];
+ cellX = startCell.x + startCell.size.outerWidth;
+ }
+ var len = this.cells.length;
+ for ( var i=index; i < len; i++ ) {
+ var cell = this.cells[i];
+ cell.setPosition( cellX );
+ cellX += cell.size.outerWidth;
+ this.maxCellHeight = Math.max( cell.size.outerHeight, this.maxCellHeight );
+ }
+ // keep track of cellX for wrap-around
+ this.slideableWidth = cellX;
+ // slides
+ this.updateSlides();
+ // contain slides target
+ this._containSlides();
+ // update slidesWidth
+ this.slidesWidth = len ? this.getLastSlide().target - this.slides[0].target : 0;
+};
+
+/**
+ * cell.getSize() on multiple cells
+ * @param {Array} cells
+ */
+proto._sizeCells = function( cells ) {
+ cells.forEach( function( cell ) {
+ cell.getSize();
+ });
+};
+
+// -------------------------- -------------------------- //
+
+proto.updateSlides = function() {
+ this.slides = [];
+ if ( !this.cells.length ) {
+ return;
+ }
+
+ var slide = new Slide( this );
+ this.slides.push( slide );
+ var isOriginLeft = this.originSide == 'left';
+ var nextMargin = isOriginLeft ? 'marginRight' : 'marginLeft';
+
+ var canCellFit = this._getCanCellFit();
+
+ this.cells.forEach( function( cell, i ) {
+ // just add cell if first cell in slide
+ if ( !slide.cells.length ) {
+ slide.addCell( cell );
+ return;
+ }
+
+ var slideWidth = ( slide.outerWidth - slide.firstMargin ) +
+ ( cell.size.outerWidth - cell.size[ nextMargin ] );
+
+ if ( canCellFit.call( this, i, slideWidth ) ) {
+ slide.addCell( cell );
+ } else {
+ // doesn't fit, new slide
+ slide.updateTarget();
+
+ slide = new Slide( this );
+ this.slides.push( slide );
+ slide.addCell( cell );
+ }
+ }, this );
+ // last slide
+ slide.updateTarget();
+ // update .selectedSlide
+ this.updateSelectedSlide();
+};
+
+proto._getCanCellFit = function() {
+ var groupCells = this.options.groupCells;
+ if ( !groupCells ) {
+ return function() {
+ return false;
+ };
+ } else if ( typeof groupCells == 'number' ) {
+ // group by number. 3 -> [0,1,2], [3,4,5], ...
+ var number = parseInt( groupCells, 10 );
+ return function( i ) {
+ return ( i % number ) !== 0;
+ };
+ }
+ // default, group by width of slide
+ // parse '75%
+ var percentMatch = typeof groupCells == 'string' &&
+ groupCells.match(/^(\d+)%$/);
+ var percent = percentMatch ? parseInt( percentMatch[1], 10 ) / 100 : 1;
+ return function( i, slideWidth ) {
+ return slideWidth <= ( this.size.innerWidth + 1 ) * percent;
+ };
+};
+
+// alias _init for jQuery plugin .flickity()
+proto._init =
+proto.reposition = function() {
+ this.positionCells();
+ this.positionSliderAtSelected();
+};
+
+proto.getSize = function() {
+ this.size = getSize( this.element );
+ this.setCellAlign();
+ this.cursorPosition = this.size.innerWidth * this.cellAlign;
+};
+
+var cellAlignShorthands = {
+ // cell align, then based on origin side
+ center: {
+ left: 0.5,
+ right: 0.5
+ },
+ left: {
+ left: 0,
+ right: 1
+ },
+ right: {
+ right: 0,
+ left: 1
+ }
+};
+
+proto.setCellAlign = function() {
+ var shorthand = cellAlignShorthands[ this.options.cellAlign ];
+ this.cellAlign = shorthand ? shorthand[ this.originSide ] : this.options.cellAlign;
+};
+
+proto.setGallerySize = function() {
+ if ( this.options.setGallerySize ) {
+ var height = this.options.adaptiveHeight && this.selectedSlide ?
+ this.selectedSlide.height : this.maxCellHeight;
+ this.viewport.style.height = height + 'px';
+ }
+};
+
+proto._getWrapShiftCells = function() {
+ // only for wrap-around
+ if ( !this.options.wrapAround ) {
+ return;
+ }
+ // unshift previous cells
+ this._unshiftCells( this.beforeShiftCells );
+ this._unshiftCells( this.afterShiftCells );
+ // get before cells
+ // initial gap
+ var gapX = this.cursorPosition;
+ var cellIndex = this.cells.length - 1;
+ this.beforeShiftCells = this._getGapCells( gapX, cellIndex, -1 );
+ // get after cells
+ // ending gap between last cell and end of gallery viewport
+ gapX = this.size.innerWidth - this.cursorPosition;
+ // start cloning at first cell, working forwards
+ this.afterShiftCells = this._getGapCells( gapX, 0, 1 );
+};
+
+proto._getGapCells = function( gapX, cellIndex, increment ) {
+ // keep adding cells until the cover the initial gap
+ var cells = [];
+ while ( gapX > 0 ) {
+ var cell = this.cells[ cellIndex ];
+ if ( !cell ) {
+ break;
+ }
+ cells.push( cell );
+ cellIndex += increment;
+ gapX -= cell.size.outerWidth;
+ }
+ return cells;
+};
+
+// ----- contain ----- //
+
+// contain cell targets so no excess sliding
+proto._containSlides = function() {
+ if ( !this.options.contain || this.options.wrapAround || !this.cells.length ) {
+ return;
+ }
+ var isRightToLeft = this.options.rightToLeft;
+ var beginMargin = isRightToLeft ? 'marginRight' : 'marginLeft';
+ var endMargin = isRightToLeft ? 'marginLeft' : 'marginRight';
+ var contentWidth = this.slideableWidth - this.getLastCell().size[ endMargin ];
+ // content is less than gallery size
+ var isContentSmaller = contentWidth < this.size.innerWidth;
+ // bounds
+ var beginBound = this.cursorPosition + this.cells[0].size[ beginMargin ];
+ var endBound = contentWidth - this.size.innerWidth * ( 1 - this.cellAlign );
+ // contain each cell target
+ this.slides.forEach( function( slide ) {
+ if ( isContentSmaller ) {
+ // all cells fit inside gallery
+ slide.target = contentWidth * this.cellAlign;
+ } else {
+ // contain to bounds
+ slide.target = Math.max( slide.target, beginBound );
+ slide.target = Math.min( slide.target, endBound );
+ }
+ }, this );
+};
+
+// ----- ----- //
+
+/**
+ * emits events via eventEmitter and jQuery events
+ * @param {String} type - name of event
+ * @param {Event} event - original event
+ * @param {Array} args - extra arguments
+ */
+proto.dispatchEvent = function( type, event, args ) {
+ var emitArgs = event ? [ event ].concat( args ) : args;
+ this.emitEvent( type, emitArgs );
+
+ if ( jQuery && this.$element ) {
+ // default trigger with type if no event
+ type += this.options.namespaceJQueryEvents ? '.flickity' : '';
+ var $event = type;
+ if ( event ) {
+ // create jQuery event
+ var jQEvent = jQuery.Event( event );
+ jQEvent.type = type;
+ $event = jQEvent;
+ }
+ this.$element.trigger( $event, args );
+ }
+};
+
+// -------------------------- select -------------------------- //
+
+/**
+ * @param {Integer} index - index of the slide
+ * @param {Boolean} isWrap - will wrap-around to last/first if at the end
+ * @param {Boolean} isInstant - will immediately set position at selected cell
+ */
+proto.select = function( index, isWrap, isInstant ) {
+ if ( !this.isActive ) {
+ return;
+ }
+ index = parseInt( index, 10 );
+ this._wrapSelect( index );
+
+ if ( this.options.wrapAround || isWrap ) {
+ index = utils.modulo( index, this.slides.length );
+ }
+ // bail if invalid index
+ if ( !this.slides[ index ] ) {
+ return;
+ }
+ var prevIndex = this.selectedIndex;
+ this.selectedIndex = index;
+ this.updateSelectedSlide();
+ if ( isInstant ) {
+ this.positionSliderAtSelected();
+ } else {
+ this.startAnimation();
+ }
+ if ( this.options.adaptiveHeight ) {
+ this.setGallerySize();
+ }
+ // events
+ this.dispatchEvent( 'select', null, [ index ] );
+ // change event if new index
+ if ( index != prevIndex ) {
+ this.dispatchEvent( 'change', null, [ index ] );
+ }
+ // old v1 event name, remove in v3
+ this.dispatchEvent('cellSelect');
+};
+
+// wraps position for wrapAround, to move to closest slide. #113
+proto._wrapSelect = function( index ) {
+ var len = this.slides.length;
+ var isWrapping = this.options.wrapAround && len > 1;
+ if ( !isWrapping ) {
+ return index;
+ }
+ var wrapIndex = utils.modulo( index, len );
+ // go to shortest
+ var delta = Math.abs( wrapIndex - this.selectedIndex );
+ var backWrapDelta = Math.abs( ( wrapIndex + len ) - this.selectedIndex );
+ var forewardWrapDelta = Math.abs( ( wrapIndex - len ) - this.selectedIndex );
+ if ( !this.isDragSelect && backWrapDelta < delta ) {
+ index += len;
+ } else if ( !this.isDragSelect && forewardWrapDelta < delta ) {
+ index -= len;
+ }
+ // wrap position so slider is within normal area
+ if ( index < 0 ) {
+ this.x -= this.slideableWidth;
+ } else if ( index >= len ) {
+ this.x += this.slideableWidth;
+ }
+};
+
+proto.previous = function( isWrap, isInstant ) {
+ this.select( this.selectedIndex - 1, isWrap, isInstant );
+};
+
+proto.next = function( isWrap, isInstant ) {
+ this.select( this.selectedIndex + 1, isWrap, isInstant );
+};
+
+proto.updateSelectedSlide = function() {
+ var slide = this.slides[ this.selectedIndex ];
+ // selectedIndex could be outside of slides, if triggered before resize()
+ if ( !slide ) {
+ return;
+ }
+ // unselect previous selected slide
+ this.unselectSelectedSlide();
+ // update new selected slide
+ this.selectedSlide = slide;
+ slide.select();
+ this.selectedCells = slide.cells;
+ this.selectedElements = slide.getCellElements();
+ // HACK: selectedCell & selectedElement is first cell in slide, backwards compatibility
+ // Remove in v3?
+ this.selectedCell = slide.cells[0];
+ this.selectedElement = this.selectedElements[0];
+};
+
+proto.unselectSelectedSlide = function() {
+ if ( this.selectedSlide ) {
+ this.selectedSlide.unselect();
+ }
+};
+
+proto.selectInitialIndex = function() {
+ var initialIndex = this.options.initialIndex;
+ // already activated, select previous selectedIndex
+ if ( this.isInitActivated ) {
+ this.select( this.selectedIndex, false, true );
+ return;
+ }
+ // select with selector string
+ if ( initialIndex && typeof initialIndex == 'string' ) {
+ var cell = this.queryCell( initialIndex );
+ if ( cell ) {
+ this.selectCell( initialIndex, false, true );
+ return;
+ }
+ }
+
+ var index = 0;
+ // select with number
+ if ( initialIndex && this.slides[ initialIndex ] ) {
+ index = initialIndex;
+ }
+ // select instantly
+ this.select( index, false, true );
+};
+
+/**
+ * select slide from number or cell element
+ * @param {Element or Number} elem
+ */
+proto.selectCell = function( value, isWrap, isInstant ) {
+ // get cell
+ var cell = this.queryCell( value );
+ if ( !cell ) {
+ return;
+ }
+
+ var index = this.getCellSlideIndex( cell );
+ this.select( index, isWrap, isInstant );
+};
+
+proto.getCellSlideIndex = function( cell ) {
+ // get index of slides that has cell
+ for ( var i=0; i < this.slides.length; i++ ) {
+ var slide = this.slides[i];
+ var index = slide.cells.indexOf( cell );
+ if ( index != -1 ) {
+ return i;
+ }
+ }
+};
+
+// -------------------------- get cells -------------------------- //
+
+/**
+ * get Flickity.Cell, given an Element
+ * @param {Element} elem
+ * @returns {Flickity.Cell} item
+ */
+proto.getCell = function( elem ) {
+ // loop through cells to get the one that matches
+ for ( var i=0; i < this.cells.length; i++ ) {
+ var cell = this.cells[i];
+ if ( cell.element == elem ) {
+ return cell;
+ }
+ }
+};
+
+/**
+ * get collection of Flickity.Cells, given Elements
+ * @param {Element, Array, NodeList} elems
+ * @returns {Array} cells - Flickity.Cells
+ */
+proto.getCells = function( elems ) {
+ elems = utils.makeArray( elems );
+ var cells = [];
+ elems.forEach( function( elem ) {
+ var cell = this.getCell( elem );
+ if ( cell ) {
+ cells.push( cell );
+ }
+ }, this );
+ return cells;
+};
+
+/**
+ * get cell elements
+ * @returns {Array} cellElems
+ */
+proto.getCellElements = function() {
+ return this.cells.map( function( cell ) {
+ return cell.element;
+ });
+};
+
+/**
+ * get parent cell from an element
+ * @param {Element} elem
+ * @returns {Flickit.Cell} cell
+ */
+proto.getParentCell = function( elem ) {
+ // first check if elem is cell
+ var cell = this.getCell( elem );
+ if ( cell ) {
+ return cell;
+ }
+ // try to get parent cell elem
+ elem = utils.getParent( elem, '.flickity-slider > *' );
+ return this.getCell( elem );
+};
+
+/**
+ * get cells adjacent to a slide
+ * @param {Integer} adjCount - number of adjacent slides
+ * @param {Integer} index - index of slide to start
+ * @returns {Array} cells - array of Flickity.Cells
+ */
+proto.getAdjacentCellElements = function( adjCount, index ) {
+ if ( !adjCount ) {
+ return this.selectedSlide.getCellElements();
+ }
+ index = index === undefined ? this.selectedIndex : index;
+
+ var len = this.slides.length;
+ if ( 1 + ( adjCount * 2 ) >= len ) {
+ return this.getCellElements();
+ }
+
+ var cellElems = [];
+ for ( var i = index - adjCount; i <= index + adjCount ; i++ ) {
+ var slideIndex = this.options.wrapAround ? utils.modulo( i, len ) : i;
+ var slide = this.slides[ slideIndex ];
+ if ( slide ) {
+ cellElems = cellElems.concat( slide.getCellElements() );
+ }
+ }
+ return cellElems;
+};
+
+/**
+ * select slide from number or cell element
+ * @param {Element, Selector String, or Number} selector
+ */
+proto.queryCell = function( selector ) {
+ if ( typeof selector == 'number' ) {
+ // use number as index
+ return this.cells[ selector ];
+ }
+ if ( typeof selector == 'string' ) {
+ // do not select invalid selectors from hash: #123, #/. #791
+ if ( selector.match(/^[#\.]?[\d\/]/) ) {
+ return;
+ }
+ // use string as selector, get element
+ selector = this.element.querySelector( selector );
+ }
+ // get cell from element
+ return this.getCell( selector );
+};
+
+// -------------------------- events -------------------------- //
+
+proto.uiChange = function() {
+ this.emitEvent('uiChange');
+};
+
+// keep focus on element when child UI elements are clicked
+proto.childUIPointerDown = function( event ) {
+ // HACK iOS does not allow touch events to bubble up?!
+ if ( event.type != 'touchstart' ) {
+ event.preventDefault();
+ }
+ this.focus();
+};
+
+// ----- resize ----- //
+
+proto.onresize = function() {
+ this.watchCSS();
+ this.resize();
+};
+
+utils.debounceMethod( Flickity, 'onresize', 150 );
+
+proto.resize = function() {
+ if ( !this.isActive ) {
+ return;
+ }
+ this.getSize();
+ // wrap values
+ if ( this.options.wrapAround ) {
+ this.x = utils.modulo( this.x, this.slideableWidth );
+ }
+ this.positionCells();
+ this._getWrapShiftCells();
+ this.setGallerySize();
+ this.emitEvent('resize');
+ // update selected index for group slides, instant
+ // TODO: position can be lost between groups of various numbers
+ var selectedElement = this.selectedElements && this.selectedElements[0];
+ this.selectCell( selectedElement, false, true );
+};
+
+// watches the :after property, activates/deactivates
+proto.watchCSS = function() {
+ var watchOption = this.options.watchCSS;
+ if ( !watchOption ) {
+ return;
+ }
+
+ var afterContent = getComputedStyle( this.element, ':after' ).content;
+ // activate if :after { content: 'flickity' }
+ if ( afterContent.indexOf('flickity') != -1 ) {
+ this.activate();
+ } else {
+ this.deactivate();
+ }
+};
+
+// ----- keydown ----- //
+
+// go previous/next if left/right keys pressed
+proto.onkeydown = function( event ) {
+ // only work if element is in focus
+ var isNotFocused = document.activeElement && document.activeElement != this.element;
+ if ( !this.options.accessibility ||isNotFocused ) {
+ return;
+ }
+
+ var handler = Flickity.keyboardHandlers[ event.keyCode ];
+ if ( handler ) {
+ handler.call( this );
+ }
+};
+
+Flickity.keyboardHandlers = {
+ // left arrow
+ 37: function() {
+ var leftMethod = this.options.rightToLeft ? 'next' : 'previous';
+ this.uiChange();
+ this[ leftMethod ]();
+ },
+ // right arrow
+ 39: function() {
+ var rightMethod = this.options.rightToLeft ? 'previous' : 'next';
+ this.uiChange();
+ this[ rightMethod ]();
+ },
+};
+
+// ----- focus ----- //
+
+proto.focus = function() {
+ // TODO remove scrollTo once focus options gets more support
+ // https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Browser_compatibility
+ var prevScrollY = window.pageYOffset;
+ this.element.focus({ preventScroll: true });
+ // hack to fix scroll jump after focus, #76
+ if ( window.pageYOffset != prevScrollY ) {
+ window.scrollTo( window.pageXOffset, prevScrollY );
+ }
+};
+
+// -------------------------- destroy -------------------------- //
+
+// deactivate all Flickity functionality, but keep stuff available
+proto.deactivate = function() {
+ if ( !this.isActive ) {
+ return;
+ }
+ this.element.classList.remove('flickity-enabled');
+ this.element.classList.remove('flickity-rtl');
+ this.unselectSelectedSlide();
+ // destroy cells
+ this.cells.forEach( function( cell ) {
+ cell.destroy();
+ });
+ this.element.removeChild( this.viewport );
+ // move child elements back into element
+ moveElements( this.slider.children, this.element );
+ if ( this.options.accessibility ) {
+ this.element.removeAttribute('tabIndex');
+ this.element.removeEventListener( 'keydown', this );
+ }
+ // set flags
+ this.isActive = false;
+ this.emitEvent('deactivate');
+};
+
+proto.destroy = function() {
+ this.deactivate();
+ window.removeEventListener( 'resize', this );
+ this.allOff();
+ this.emitEvent('destroy');
+ if ( jQuery && this.$element ) {
+ jQuery.removeData( this.element, 'flickity' );
+ }
+ delete this.element.flickityGUID;
+ delete instances[ this.guid ];
+};
+
+// -------------------------- prototype -------------------------- //
+
+utils.extend( proto, animatePrototype );
+
+// -------------------------- extras -------------------------- //
+
+/**
+ * get Flickity instance from element
+ * @param {Element} elem
+ * @returns {Flickity}
+ */
+Flickity.data = function( elem ) {
+ elem = utils.getQueryElement( elem );
+ var id = elem && elem.flickityGUID;
+ return id && instances[ id ];
+};
+
+utils.htmlInit( Flickity, 'flickity' );
+
+if ( jQuery && jQuery.bridget ) {
+ jQuery.bridget( 'flickity', Flickity );
+}
+
+// set internal jQuery, for Webpack + jQuery v3, #478
+Flickity.setJQuery = function( jq ) {
+ jQuery = jq;
+};
+
+Flickity.Cell = Cell;
+Flickity.Slide = Slide;
+
+return Flickity;
+
+}));
diff --git a/node_modules/flickity/js/index.js b/node_modules/flickity/js/index.js
new file mode 100644
index 00000000..888c9775
--- /dev/null
+++ b/node_modules/flickity/js/index.js
@@ -0,0 +1,42 @@
+/*!
+ * Flickity v2.2.1
+ * Touch, responsive, flickable carousels
+ *
+ * Licensed GPLv3 for open source use
+ * or Flickity Commercial License for commercial use
+ *
+ * https://flickity.metafizzy.co
+ * Copyright 2015-2019 Metafizzy
+ */
+
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ './flickity',
+ './drag',
+ './prev-next-button',
+ './page-dots',
+ './player',
+ './add-remove-cell',
+ './lazyload'
+ ], factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ require('./flickity'),
+ require('./drag'),
+ require('./prev-next-button'),
+ require('./page-dots'),
+ require('./player'),
+ require('./add-remove-cell'),
+ require('./lazyload')
+ );
+ }
+
+})( window, function factory( Flickity ) {
+ /*jshint strict: false*/
+ return Flickity;
+});
diff --git a/node_modules/flickity/js/lazyload.js b/node_modules/flickity/js/lazyload.js
new file mode 100644
index 00000000..c30dc7d3
--- /dev/null
+++ b/node_modules/flickity/js/lazyload.js
@@ -0,0 +1,134 @@
+// lazyload
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ './flickity',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, utils ) {
+ return factory( window, Flickity, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ factory(
+ window,
+ window.Flickity,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, utils ) {
+'use strict';
+
+Flickity.createMethods.push('_createLazyload');
+var proto = Flickity.prototype;
+
+proto._createLazyload = function() {
+ this.on( 'select', this.lazyLoad );
+};
+
+proto.lazyLoad = function() {
+ var lazyLoad = this.options.lazyLoad;
+ if ( !lazyLoad ) {
+ return;
+ }
+ // get adjacent cells, use lazyLoad option for adjacent count
+ var adjCount = typeof lazyLoad == 'number' ? lazyLoad : 0;
+ var cellElems = this.getAdjacentCellElements( adjCount );
+ // get lazy images in those cells
+ var lazyImages = [];
+ cellElems.forEach( function( cellElem ) {
+ var lazyCellImages = getCellLazyImages( cellElem );
+ lazyImages = lazyImages.concat( lazyCellImages );
+ });
+ // load lazy images
+ lazyImages.forEach( function( img ) {
+ new LazyLoader( img, this );
+ }, this );
+};
+
+function getCellLazyImages( cellElem ) {
+ // check if cell element is lazy image
+ if ( cellElem.nodeName == 'IMG' ) {
+ var lazyloadAttr = cellElem.getAttribute('data-flickity-lazyload');
+ var srcAttr = cellElem.getAttribute('data-flickity-lazyload-src');
+ var srcsetAttr = cellElem.getAttribute('data-flickity-lazyload-srcset');
+ if ( lazyloadAttr || srcAttr || srcsetAttr ) {
+ return [ cellElem ];
+ }
+ }
+ // select lazy images in cell
+ var lazySelector = 'img[data-flickity-lazyload], ' +
+ 'img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]';
+ var imgs = cellElem.querySelectorAll( lazySelector );
+ return utils.makeArray( imgs );
+}
+
+// -------------------------- LazyLoader -------------------------- //
+
+/**
+ * class to handle loading images
+ */
+function LazyLoader( img, flickity ) {
+ this.img = img;
+ this.flickity = flickity;
+ this.load();
+}
+
+LazyLoader.prototype.handleEvent = utils.handleEvent;
+
+LazyLoader.prototype.load = function() {
+ this.img.addEventListener( 'load', this );
+ this.img.addEventListener( 'error', this );
+ // get src & srcset
+ var src = this.img.getAttribute('data-flickity-lazyload') ||
+ this.img.getAttribute('data-flickity-lazyload-src');
+ var srcset = this.img.getAttribute('data-flickity-lazyload-srcset');
+ // set src & serset
+ this.img.src = src;
+ if ( srcset ) {
+ this.img.setAttribute( 'srcset', srcset );
+ }
+ // remove attr
+ this.img.removeAttribute('data-flickity-lazyload');
+ this.img.removeAttribute('data-flickity-lazyload-src');
+ this.img.removeAttribute('data-flickity-lazyload-srcset');
+};
+
+LazyLoader.prototype.onload = function( event ) {
+ this.complete( event, 'flickity-lazyloaded' );
+};
+
+LazyLoader.prototype.onerror = function( event ) {
+ this.complete( event, 'flickity-lazyerror' );
+};
+
+LazyLoader.prototype.complete = function( event, className ) {
+ // unbind events
+ this.img.removeEventListener( 'load', this );
+ this.img.removeEventListener( 'error', this );
+
+ var cell = this.flickity.getParentCell( this.img );
+ var cellElem = cell && cell.element;
+ this.flickity.cellSizeChange( cellElem );
+
+ this.img.classList.add( className );
+ this.flickity.dispatchEvent( 'lazyLoad', event, cellElem );
+};
+
+// ----- ----- //
+
+Flickity.LazyLoader = LazyLoader;
+
+return Flickity;
+
+}));
diff --git a/node_modules/flickity/js/page-dots.js b/node_modules/flickity/js/page-dots.js
new file mode 100644
index 00000000..f1417d07
--- /dev/null
+++ b/node_modules/flickity/js/page-dots.js
@@ -0,0 +1,188 @@
+// page dots
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ './flickity',
+ 'unipointer/unipointer',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, Unipointer, utils ) {
+ return factory( window, Flickity, Unipointer, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('unipointer'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ factory(
+ window,
+ window.Flickity,
+ window.Unipointer,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, Unipointer, utils ) {
+
+// -------------------------- PageDots -------------------------- //
+
+'use strict';
+
+function PageDots( parent ) {
+ this.parent = parent;
+ this._create();
+}
+
+PageDots.prototype = Object.create( Unipointer.prototype );
+
+PageDots.prototype._create = function() {
+ // create holder element
+ this.holder = document.createElement('ol');
+ this.holder.className = 'flickity-page-dots';
+ // create dots, array of elements
+ this.dots = [];
+ // events
+ this.handleClick = this.onClick.bind( this );
+ this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) );
+};
+
+PageDots.prototype.activate = function() {
+ this.setDots();
+ this.holder.addEventListener( 'click', this.handleClick );
+ this.bindStartEvent( this.holder );
+ // add to DOM
+ this.parent.element.appendChild( this.holder );
+};
+
+PageDots.prototype.deactivate = function() {
+ this.holder.removeEventListener( 'click', this.handleClick );
+ this.unbindStartEvent( this.holder );
+ // remove from DOM
+ this.parent.element.removeChild( this.holder );
+};
+
+PageDots.prototype.setDots = function() {
+ // get difference between number of slides and number of dots
+ var delta = this.parent.slides.length - this.dots.length;
+ if ( delta > 0 ) {
+ this.addDots( delta );
+ } else if ( delta < 0 ) {
+ this.removeDots( -delta );
+ }
+};
+
+PageDots.prototype.addDots = function( count ) {
+ var fragment = document.createDocumentFragment();
+ var newDots = [];
+ var length = this.dots.length;
+ var max = length + count;
+
+ for ( var i = length; i < max; i++ ) {
+ var dot = document.createElement('li');
+ dot.className = 'dot';
+ dot.setAttribute( 'aria-label', 'Page dot ' + ( i + 1 ) );
+ fragment.appendChild( dot );
+ newDots.push( dot );
+ }
+
+ this.holder.appendChild( fragment );
+ this.dots = this.dots.concat( newDots );
+};
+
+PageDots.prototype.removeDots = function( count ) {
+ // remove from this.dots collection
+ var removeDots = this.dots.splice( this.dots.length - count, count );
+ // remove from DOM
+ removeDots.forEach( function( dot ) {
+ this.holder.removeChild( dot );
+ }, this );
+};
+
+PageDots.prototype.updateSelected = function() {
+ // remove selected class on previous
+ if ( this.selectedDot ) {
+ this.selectedDot.className = 'dot';
+ this.selectedDot.removeAttribute('aria-current');
+ }
+ // don't proceed if no dots
+ if ( !this.dots.length ) {
+ return;
+ }
+ this.selectedDot = this.dots[ this.parent.selectedIndex ];
+ this.selectedDot.className = 'dot is-selected';
+ this.selectedDot.setAttribute( 'aria-current', 'step' );
+};
+
+PageDots.prototype.onTap = // old method name, backwards-compatible
+PageDots.prototype.onClick = function( event ) {
+ var target = event.target;
+ // only care about dot clicks
+ if ( target.nodeName != 'LI' ) {
+ return;
+ }
+
+ this.parent.uiChange();
+ var index = this.dots.indexOf( target );
+ this.parent.select( index );
+};
+
+PageDots.prototype.destroy = function() {
+ this.deactivate();
+ this.allOff();
+};
+
+Flickity.PageDots = PageDots;
+
+// -------------------------- Flickity -------------------------- //
+
+utils.extend( Flickity.defaults, {
+ pageDots: true
+});
+
+Flickity.createMethods.push('_createPageDots');
+
+var proto = Flickity.prototype;
+
+proto._createPageDots = function() {
+ if ( !this.options.pageDots ) {
+ return;
+ }
+ this.pageDots = new PageDots( this );
+ // events
+ this.on( 'activate', this.activatePageDots );
+ this.on( 'select', this.updateSelectedPageDots );
+ this.on( 'cellChange', this.updatePageDots );
+ this.on( 'resize', this.updatePageDots );
+ this.on( 'deactivate', this.deactivatePageDots );
+};
+
+proto.activatePageDots = function() {
+ this.pageDots.activate();
+};
+
+proto.updateSelectedPageDots = function() {
+ this.pageDots.updateSelected();
+};
+
+proto.updatePageDots = function() {
+ this.pageDots.setDots();
+};
+
+proto.deactivatePageDots = function() {
+ this.pageDots.deactivate();
+};
+
+// ----- ----- //
+
+Flickity.PageDots = PageDots;
+
+return Flickity;
+
+}));
diff --git a/node_modules/flickity/js/player.js b/node_modules/flickity/js/player.js
new file mode 100644
index 00000000..1867497a
--- /dev/null
+++ b/node_modules/flickity/js/player.js
@@ -0,0 +1,191 @@
+// player & autoPlay
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'ev-emitter/ev-emitter',
+ 'fizzy-ui-utils/utils',
+ './flickity'
+ ], function( EvEmitter, utils, Flickity ) {
+ return factory( EvEmitter, utils, Flickity );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ require('ev-emitter'),
+ require('fizzy-ui-utils'),
+ require('./flickity')
+ );
+ } else {
+ // browser global
+ factory(
+ window.EvEmitter,
+ window.fizzyUIUtils,
+ window.Flickity
+ );
+ }
+
+}( window, function factory( EvEmitter, utils, Flickity ) {
+
+'use strict';
+
+// -------------------------- Player -------------------------- //
+
+function Player( parent ) {
+ this.parent = parent;
+ this.state = 'stopped';
+ // visibility change event handler
+ this.onVisibilityChange = this.visibilityChange.bind( this );
+ this.onVisibilityPlay = this.visibilityPlay.bind( this );
+}
+
+Player.prototype = Object.create( EvEmitter.prototype );
+
+// start play
+Player.prototype.play = function() {
+ if ( this.state == 'playing' ) {
+ return;
+ }
+ // do not play if page is hidden, start playing when page is visible
+ var isPageHidden = document.hidden;
+ if ( isPageHidden ) {
+ document.addEventListener( 'visibilitychange', this.onVisibilityPlay );
+ return;
+ }
+
+ this.state = 'playing';
+ // listen to visibility change
+ document.addEventListener( 'visibilitychange', this.onVisibilityChange );
+ // start ticking
+ this.tick();
+};
+
+Player.prototype.tick = function() {
+ // do not tick if not playing
+ if ( this.state != 'playing' ) {
+ return;
+ }
+
+ var time = this.parent.options.autoPlay;
+ // default to 3 seconds
+ time = typeof time == 'number' ? time : 3000;
+ var _this = this;
+ // HACK: reset ticks if stopped and started within interval
+ this.clear();
+ this.timeout = setTimeout( function() {
+ _this.parent.next( true );
+ _this.tick();
+ }, time );
+};
+
+Player.prototype.stop = function() {
+ this.state = 'stopped';
+ this.clear();
+ // remove visibility change event
+ document.removeEventListener( 'visibilitychange', this.onVisibilityChange );
+};
+
+Player.prototype.clear = function() {
+ clearTimeout( this.timeout );
+};
+
+Player.prototype.pause = function() {
+ if ( this.state == 'playing' ) {
+ this.state = 'paused';
+ this.clear();
+ }
+};
+
+Player.prototype.unpause = function() {
+ // re-start play if paused
+ if ( this.state == 'paused' ) {
+ this.play();
+ }
+};
+
+// pause if page visibility is hidden, unpause if visible
+Player.prototype.visibilityChange = function() {
+ var isPageHidden = document.hidden;
+ this[ isPageHidden ? 'pause' : 'unpause' ]();
+};
+
+Player.prototype.visibilityPlay = function() {
+ this.play();
+ document.removeEventListener( 'visibilitychange', this.onVisibilityPlay );
+};
+
+// -------------------------- Flickity -------------------------- //
+
+utils.extend( Flickity.defaults, {
+ pauseAutoPlayOnHover: true
+});
+
+Flickity.createMethods.push('_createPlayer');
+var proto = Flickity.prototype;
+
+proto._createPlayer = function() {
+ this.player = new Player( this );
+
+ this.on( 'activate', this.activatePlayer );
+ this.on( 'uiChange', this.stopPlayer );
+ this.on( 'pointerDown', this.stopPlayer );
+ this.on( 'deactivate', this.deactivatePlayer );
+};
+
+proto.activatePlayer = function() {
+ if ( !this.options.autoPlay ) {
+ return;
+ }
+ this.player.play();
+ this.element.addEventListener( 'mouseenter', this );
+};
+
+// Player API, don't hate the ... thanks I know where the door is
+
+proto.playPlayer = function() {
+ this.player.play();
+};
+
+proto.stopPlayer = function() {
+ this.player.stop();
+};
+
+proto.pausePlayer = function() {
+ this.player.pause();
+};
+
+proto.unpausePlayer = function() {
+ this.player.unpause();
+};
+
+proto.deactivatePlayer = function() {
+ this.player.stop();
+ this.element.removeEventListener( 'mouseenter', this );
+};
+
+// ----- mouseenter/leave ----- //
+
+// pause auto-play on hover
+proto.onmouseenter = function() {
+ if ( !this.options.pauseAutoPlayOnHover ) {
+ return;
+ }
+ this.player.pause();
+ this.element.addEventListener( 'mouseleave', this );
+};
+
+// resume auto-play on hover off
+proto.onmouseleave = function() {
+ this.player.unpause();
+ this.element.removeEventListener( 'mouseleave', this );
+};
+
+// ----- ----- //
+
+Flickity.Player = Player;
+
+return Flickity;
+
+}));
diff --git a/node_modules/flickity/js/prev-next-button.js b/node_modules/flickity/js/prev-next-button.js
new file mode 100644
index 00000000..058eef1d
--- /dev/null
+++ b/node_modules/flickity/js/prev-next-button.js
@@ -0,0 +1,211 @@
+// prev/next buttons
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ './flickity',
+ 'unipointer/unipointer',
+ 'fizzy-ui-utils/utils'
+ ], function( Flickity, Unipointer, utils ) {
+ return factory( window, Flickity, Unipointer, utils );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('./flickity'),
+ require('unipointer'),
+ require('fizzy-ui-utils')
+ );
+ } else {
+ // browser global
+ factory(
+ window,
+ window.Flickity,
+ window.Unipointer,
+ window.fizzyUIUtils
+ );
+ }
+
+}( window, function factory( window, Flickity, Unipointer, utils ) {
+'use strict';
+
+var svgURI = 'http://www.w3.org/2000/svg';
+
+// -------------------------- PrevNextButton -------------------------- //
+
+function PrevNextButton( direction, parent ) {
+ this.direction = direction;
+ this.parent = parent;
+ this._create();
+}
+
+PrevNextButton.prototype = Object.create( Unipointer.prototype );
+
+PrevNextButton.prototype._create = function() {
+ // properties
+ this.isEnabled = true;
+ this.isPrevious = this.direction == -1;
+ var leftDirection = this.parent.options.rightToLeft ? 1 : -1;
+ this.isLeft = this.direction == leftDirection;
+
+ var element = this.element = document.createElement('button');
+ element.className = 'flickity-button flickity-prev-next-button';
+ element.className += this.isPrevious ? ' previous' : ' next';
+ // prevent button from submitting form http://stackoverflow.com/a/10836076/182183
+ element.setAttribute( 'type', 'button' );
+ // init as disabled
+ this.disable();
+
+ element.setAttribute( 'aria-label', this.isPrevious ? 'Previous' : 'Next' );
+
+ // create arrow
+ var svg = this.createSVG();
+ element.appendChild( svg );
+ // events
+ this.parent.on( 'select', this.update.bind( this ) );
+ this.on( 'pointerDown', this.parent.childUIPointerDown.bind( this.parent ) );
+};
+
+PrevNextButton.prototype.activate = function() {
+ this.bindStartEvent( this.element );
+ this.element.addEventListener( 'click', this );
+ // add to DOM
+ this.parent.element.appendChild( this.element );
+};
+
+PrevNextButton.prototype.deactivate = function() {
+ // remove from DOM
+ this.parent.element.removeChild( this.element );
+ // click events
+ this.unbindStartEvent( this.element );
+ this.element.removeEventListener( 'click', this );
+};
+
+PrevNextButton.prototype.createSVG = function() {
+ var svg = document.createElementNS( svgURI, 'svg');
+ svg.setAttribute( 'class', 'flickity-button-icon' );
+ svg.setAttribute( 'viewBox', '0 0 100 100' );
+ var path = document.createElementNS( svgURI, 'path');
+ var pathMovements = getArrowMovements( this.parent.options.arrowShape );
+ path.setAttribute( 'd', pathMovements );
+ path.setAttribute( 'class', 'arrow' );
+ // rotate arrow
+ if ( !this.isLeft ) {
+ path.setAttribute( 'transform', 'translate(100, 100) rotate(180) ' );
+ }
+ svg.appendChild( path );
+ return svg;
+};
+
+// get SVG path movmement
+function getArrowMovements( shape ) {
+ // use shape as movement if string
+ if ( typeof shape == 'string' ) {
+ return shape;
+ }
+ // create movement string
+ return 'M ' + shape.x0 + ',50' +
+ ' L ' + shape.x1 + ',' + ( shape.y1 + 50 ) +
+ ' L ' + shape.x2 + ',' + ( shape.y2 + 50 ) +
+ ' L ' + shape.x3 + ',50 ' +
+ ' L ' + shape.x2 + ',' + ( 50 - shape.y2 ) +
+ ' L ' + shape.x1 + ',' + ( 50 - shape.y1 ) +
+ ' Z';
+}
+
+PrevNextButton.prototype.handleEvent = utils.handleEvent;
+
+PrevNextButton.prototype.onclick = function() {
+ if ( !this.isEnabled ) {
+ return;
+ }
+ this.parent.uiChange();
+ var method = this.isPrevious ? 'previous' : 'next';
+ this.parent[ method ]();
+};
+
+// ----- ----- //
+
+PrevNextButton.prototype.enable = function() {
+ if ( this.isEnabled ) {
+ return;
+ }
+ this.element.disabled = false;
+ this.isEnabled = true;
+};
+
+PrevNextButton.prototype.disable = function() {
+ if ( !this.isEnabled ) {
+ return;
+ }
+ this.element.disabled = true;
+ this.isEnabled = false;
+};
+
+PrevNextButton.prototype.update = function() {
+ // index of first or last slide, if previous or next
+ var slides = this.parent.slides;
+ // enable is wrapAround and at least 2 slides
+ if ( this.parent.options.wrapAround && slides.length > 1 ) {
+ this.enable();
+ return;
+ }
+ var lastIndex = slides.length ? slides.length - 1 : 0;
+ var boundIndex = this.isPrevious ? 0 : lastIndex;
+ var method = this.parent.selectedIndex == boundIndex ? 'disable' : 'enable';
+ this[ method ]();
+};
+
+PrevNextButton.prototype.destroy = function() {
+ this.deactivate();
+ this.allOff();
+};
+
+// -------------------------- Flickity prototype -------------------------- //
+
+utils.extend( Flickity.defaults, {
+ prevNextButtons: true,
+ arrowShape: {
+ x0: 10,
+ x1: 60, y1: 50,
+ x2: 70, y2: 40,
+ x3: 30
+ }
+});
+
+Flickity.createMethods.push('_createPrevNextButtons');
+var proto = Flickity.prototype;
+
+proto._createPrevNextButtons = function() {
+ if ( !this.options.prevNextButtons ) {
+ return;
+ }
+
+ this.prevButton = new PrevNextButton( -1, this );
+ this.nextButton = new PrevNextButton( 1, this );
+
+ this.on( 'activate', this.activatePrevNextButtons );
+};
+
+proto.activatePrevNextButtons = function() {
+ this.prevButton.activate();
+ this.nextButton.activate();
+ this.on( 'deactivate', this.deactivatePrevNextButtons );
+};
+
+proto.deactivatePrevNextButtons = function() {
+ this.prevButton.deactivate();
+ this.nextButton.deactivate();
+ this.off( 'deactivate', this.deactivatePrevNextButtons );
+};
+
+// -------------------------- -------------------------- //
+
+Flickity.PrevNextButton = PrevNextButton;
+
+return Flickity;
+
+}));
diff --git a/node_modules/flickity/js/slide.js b/node_modules/flickity/js/slide.js
new file mode 100644
index 00000000..eb6fb954
--- /dev/null
+++ b/node_modules/flickity/js/slide.js
@@ -0,0 +1,74 @@
+// slide
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory();
+ } else {
+ // browser global
+ window.Flickity = window.Flickity || {};
+ window.Flickity.Slide = factory();
+ }
+
+}( window, function factory() {
+'use strict';
+
+function Slide( parent ) {
+ this.parent = parent;
+ this.isOriginLeft = parent.originSide == 'left';
+ this.cells = [];
+ this.outerWidth = 0;
+ this.height = 0;
+}
+
+var proto = Slide.prototype;
+
+proto.addCell = function( cell ) {
+ this.cells.push( cell );
+ this.outerWidth += cell.size.outerWidth;
+ this.height = Math.max( cell.size.outerHeight, this.height );
+ // first cell stuff
+ if ( this.cells.length == 1 ) {
+ this.x = cell.x; // x comes from first cell
+ var beginMargin = this.isOriginLeft ? 'marginLeft' : 'marginRight';
+ this.firstMargin = cell.size[ beginMargin ];
+ }
+};
+
+proto.updateTarget = function() {
+ var endMargin = this.isOriginLeft ? 'marginRight' : 'marginLeft';
+ var lastCell = this.getLastCell();
+ var lastMargin = lastCell ? lastCell.size[ endMargin ] : 0;
+ var slideWidth = this.outerWidth - ( this.firstMargin + lastMargin );
+ this.target = this.x + this.firstMargin + slideWidth * this.parent.cellAlign;
+};
+
+proto.getLastCell = function() {
+ return this.cells[ this.cells.length - 1 ];
+};
+
+proto.select = function() {
+ this.cells.forEach( function( cell ) {
+ cell.select();
+ });
+};
+
+proto.unselect = function() {
+ this.cells.forEach( function( cell ) {
+ cell.unselect();
+ });
+};
+
+proto.getCellElements = function() {
+ return this.cells.map( function( cell ) {
+ return cell.element;
+ });
+};
+
+return Slide;
+
+}));
diff --git a/node_modules/flickity/package.json b/node_modules/flickity/package.json
new file mode 100644
index 00000000..a3da4128
--- /dev/null
+++ b/node_modules/flickity/package.json
@@ -0,0 +1,87 @@
+{
+ "_from": "flickity",
+ "_id": "flickity@2.2.1",
+ "_inBundle": false,
+ "_integrity": "sha512-fCZJGNqabgDrIhaUBqt2ydE8c5V6iiB3KQAf6dH3Z45MoDUm7g6+uZmteN0aLV9pzVItNqCbfOJQjsJM/rHuSA==",
+ "_location": "/flickity",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "flickity",
+ "name": "flickity",
+ "escapedName": "flickity",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/flickity/-/flickity-2.2.1.tgz",
+ "_shasum": "81126e3d656cb54577358a5f959ffdbda088e670",
+ "_spec": "flickity",
+ "_where": "/var/www/html",
+ "author": {
+ "name": "Metafizzy"
+ },
+ "bugs": {
+ "url": "https://github.com/metafizzy/flickity/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "desandro-matches-selector": "^2.0.0",
+ "ev-emitter": "^1.1.1",
+ "fizzy-ui-utils": "^2.0.7",
+ "get-size": "^2.0.3",
+ "unidragger": "^2.3.0",
+ "unipointer": "^2.3.0"
+ },
+ "deprecated": false,
+ "description": "Touch, responsive, flickable carousels",
+ "devDependencies": {
+ "chalk": "^2.4.2",
+ "flickity-as-nav-for": "^2.0.0",
+ "flickity-imagesloaded": "^2.0.0",
+ "gulp": "^4.0.2",
+ "gulp-clean-css": "^4.2.0",
+ "gulp-jshint": "^2.1.0",
+ "gulp-json-lint": "^0.1.0",
+ "gulp-rename": "^1.4.0",
+ "gulp-replace": "^1.0.0",
+ "gulp-requirejs-optimize": "github:metafizzy/gulp-requirejs-optimize",
+ "gulp-uglify": "^3.0.2",
+ "gulp-util": "^3.0.8",
+ "jquery-bridget": "^2.0.0",
+ "jshint": "^2.10.2",
+ "merge2": "^1.2.3",
+ "minimist": "^1.2.0"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "homepage": "https://flickity.metafizzy.co",
+ "keywords": [
+ "touch",
+ "responsive",
+ "flick",
+ "slider",
+ "carousel",
+ "gallery",
+ "DOM",
+ "browser"
+ ],
+ "license": "GPL-3.0",
+ "main": "js/index.js",
+ "name": "flickity",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/metafizzy/flickity.git"
+ },
+ "scripts": {
+ "test": "echo \"View test/ in browser\" && exit 1"
+ },
+ "style": "css/flickity.css",
+ "version": "2.2.1"
+}
diff --git a/node_modules/flickity/sandbox/adaptive-height.html b/node_modules/flickity/sandbox/adaptive-height.html
new file mode 100644
index 00000000..a7ad1f2b
--- /dev/null
+++ b/node_modules/flickity/sandbox/adaptive-height.html
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+ slides
+
+
+
+
+
+
+
+
+ slides
+
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/add-remove.html b/node_modules/flickity/sandbox/add-remove.html
new file mode 100644
index 00000000..f24e6149
--- /dev/null
+++ b/node_modules/flickity/sandbox/add-remove.html
@@ -0,0 +1,274 @@
+
+
+
+
+
+
+ add/remove cells
+
+
+
+
+
+
+
+
+
+ add/remove cells
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
+
+
+
+
+ freeScroll
+
+
+
+
1
+
2
+
3
+
4
+
5
+
+
+
+
+
+
+
+
+ wrapAround
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
+
+
+
+
+ wrapAround, freeScroll
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
+
+
+
+
+ contain
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
+
+
+
+
+
+ reposition
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+
+ prepend with single #492
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/ajax.html b/node_modules/flickity/sandbox/ajax.html
new file mode 100644
index 00000000..5ed6f94a
--- /dev/null
+++ b/node_modules/flickity/sandbox/ajax.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+ ajax
+
+
+
+
+
+
+
+ ajax
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/basic.html b/node_modules/flickity/sandbox/basic.html
new file mode 100644
index 00000000..c520ca59
--- /dev/null
+++ b/node_modules/flickity/sandbox/basic.html
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+ basic1
+
+
+
+
+
+
+
+
+
+ basic1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ contain
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ contain, freeScroll
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+ contain, few
+
+
+
+ watch, activate >900px
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/browserify/index.html b/node_modules/flickity/sandbox/browserify/index.html
new file mode 100644
index 00000000..094a82d7
--- /dev/null
+++ b/node_modules/flickity/sandbox/browserify/index.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ Browserify
+
+
+
+
+
+
+
+ Browserify
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/browserify/main.js b/node_modules/flickity/sandbox/browserify/main.js
new file mode 100644
index 00000000..8e931989
--- /dev/null
+++ b/node_modules/flickity/sandbox/browserify/main.js
@@ -0,0 +1,3 @@
+var Flickity = require('../../js/index');
+
+new Flickity('#gallery');
diff --git a/node_modules/flickity/sandbox/button.html b/node_modules/flickity/sandbox/button.html
new file mode 100644
index 00000000..ca48df42
--- /dev/null
+++ b/node_modules/flickity/sandbox/button.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+ button
+
+
+
+
+ button
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/freescroll.html b/node_modules/flickity/sandbox/freescroll.html
new file mode 100644
index 00000000..052ec474
--- /dev/null
+++ b/node_modules/flickity/sandbox/freescroll.html
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+ freescroll
+
+
+
+
+
+
+
+ freescroll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/group-cells.html b/node_modules/flickity/sandbox/group-cells.html
new file mode 100644
index 00000000..8ae87d96
--- /dev/null
+++ b/node_modules/flickity/sandbox/group-cells.html
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+ group cells
+
+
+
+
+
+
+
+
+ group cells
+
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/jquery.html b/node_modules/flickity/sandbox/jquery.html
new file mode 100644
index 00000000..a564de51
--- /dev/null
+++ b/node_modules/flickity/sandbox/jquery.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+ jquery
+
+
+
+
+
+
+
+ jquery
+
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/lazyload.html b/node_modules/flickity/sandbox/lazyload.html
new file mode 100644
index 00000000..95b3ffb0
--- /dev/null
+++ b/node_modules/flickity/sandbox/lazyload.html
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+ lazyload
+
+
+
+
+
+
+
+
+lazyload
+
+
+
+
+
+
+
+
![]()
+
+
![]()
+
+
![]()
+
+
![]()
+
+
![]()
+
+
![]()
+
+
![]()
+
+
![]()
+
+
![]()
+
+
+
+
+srcset
+
+
+
+
+
+
![]()
+
+
+
![]()
+
+
+
![]()
+
+
+
![]()
+
+
+
![]()
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/media.html b/node_modules/flickity/sandbox/media.html
new file mode 100644
index 00000000..06f20a66
--- /dev/null
+++ b/node_modules/flickity/sandbox/media.html
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+ media
+
+
+
+
+
+
+
+
+
+ media
+
+
+
+
+
+
+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/requirejs/index.html b/node_modules/flickity/sandbox/requirejs/index.html
new file mode 100644
index 00000000..77aaf63f
--- /dev/null
+++ b/node_modules/flickity/sandbox/requirejs/index.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ RequireJS
+
+
+
+
+
+
+
+
+
+ single
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/requirejs/main.js b/node_modules/flickity/sandbox/requirejs/main.js
new file mode 100644
index 00000000..f3649286
--- /dev/null
+++ b/node_modules/flickity/sandbox/requirejs/main.js
@@ -0,0 +1,22 @@
+/*jshint strict: false */
+/*global requirejs: false*/
+
+/*
+// bower components
+requirejs.config({
+ baseUrl: '../../bower_components'
+});
+
+requirejs( [ '../js/index' ], function( Flickity ) {
+ new Flickity('#gallery');
+});
+// */
+
+// /*
+// pkgd
+requirejs( [
+ '../../dist/flickity.pkgd.js'
+], function( Flickity ) {
+ new Flickity('#gallery');
+});
+// */
diff --git a/node_modules/flickity/sandbox/right-to-left.html b/node_modules/flickity/sandbox/right-to-left.html
new file mode 100644
index 00000000..da702868
--- /dev/null
+++ b/node_modules/flickity/sandbox/right-to-left.html
@@ -0,0 +1,71 @@
+
+
+
+
+
+ right to left
+
+
+
+
+
+
+
+
+
+ right to left
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/sandbox.css b/node_modules/flickity/sandbox/sandbox.css
new file mode 100644
index 00000000..60fd2d8e
--- /dev/null
+++ b/node_modules/flickity/sandbox/sandbox.css
@@ -0,0 +1,91 @@
+* { box-sizing: border-box; }
+
+body {
+ font-family: sans-serif;
+ color: #333;
+}
+
+.container {
+ border: 1px solid;
+ margin-bottom: 50px;
+}
+
+.container:after {
+ content: '';
+ display: block;
+ clear: both;
+}
+
+.container:focus { border: 1px blue dotted; }
+
+.cell {
+ width: 100%;
+ height: 200px;
+ border: 0px solid white;
+ background: #CCC;
+}
+
+.cell.is-selected {
+ outline: 4px solid hsla(0, 0%, 0%, 0.25);
+ outline-offset: -4px;
+}
+
+.cell:nth-child(6n) { background: hsl(0, 80%, 70%); }
+.cell:nth-child(6n+1) { background: hsl(60, 80%, 70%); }
+.cell:nth-child(6n+2) { background: hsl(120, 80%, 70%); }
+.cell:nth-child(6n+3) { background: hsl(180, 80%, 70%); }
+.cell:nth-child(6n+4) { background: hsl(240, 80%, 70%); }
+.cell:nth-child(6n+5) { background: hsl(300, 80%, 70%); }
+
+.cell.n1 { background: #D22; background: hsl(0, 80%, 70%); }
+.cell.n2 { background: #DD2; background: hsl(60, 80%, 70%); }
+.cell.n3 { background: #2D2; background: hsl(120, 80%, 70%); }
+.cell.n4 { background: #2DD; background: hsl(180, 80%, 70%); }
+.cell.n5 { background: #22D; background: hsl(240, 80%, 70%); }
+.cell.n6 { background: #D2D; background: hsl(300, 80%, 70%); }
+
+#half-width .cell {
+ width: 48%;
+ margin-right: 4%;
+}
+
+.variable-width .cell {
+ width: 20%;
+ margin-right: 3%;
+}
+
+.variable-width .cell.w2 { width: 30%; }
+.variable-width .cell.w3 { width: 40%; }
+
+.fixed-width .cell {
+ width: 200px;
+ margin-right: 20px;
+}
+
+/* big number */
+.cell b {
+ display: block;
+ font-size: 100px;
+ color: white;
+ font-weight: bold;
+ position: absolute;
+ left: 10px;
+ top: 10px;
+}
+
+/* ---- couning ---- */
+.counting {
+ counter-reset: cell;
+}
+
+.counting .cell:before {
+ counter-increment: cell;
+ content: counter(cell);
+ display: block;
+ font-size: 100px;
+ color: white;
+ font-weight: bold;
+ position: absolute;
+ left: 10px;
+ top: 10px;
+}
diff --git a/node_modules/flickity/sandbox/scroll-event.html b/node_modules/flickity/sandbox/scroll-event.html
new file mode 100644
index 00000000..1b0f7950
--- /dev/null
+++ b/node_modules/flickity/sandbox/scroll-event.html
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+ scroll event
+
+
+
+
+
+
+
+
+ scroll event
+
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/single.html b/node_modules/flickity/sandbox/single.html
new file mode 100644
index 00000000..d45eba1b
--- /dev/null
+++ b/node_modules/flickity/sandbox/single.html
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ single
+
+
+
+
+
+
+
+ single
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/styles.html b/node_modules/flickity/sandbox/styles.html
new file mode 100644
index 00000000..5cc93150
--- /dev/null
+++ b/node_modules/flickity/sandbox/styles.html
@@ -0,0 +1,80 @@
+
+
+
+
+
+
+ styles
+
+
+
+
+
+
+
+ styles
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/tricky-drag.html b/node_modules/flickity/sandbox/tricky-drag.html
new file mode 100644
index 00000000..66281264
--- /dev/null
+++ b/node_modules/flickity/sandbox/tricky-drag.html
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+ tricky drag
+
+
+
+
+
+
+
+
+tricky drag
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/v2-sizzle.html b/node_modules/flickity/sandbox/v2-sizzle.html
new file mode 100644
index 00000000..a7542fb9
--- /dev/null
+++ b/node_modules/flickity/sandbox/v2-sizzle.html
@@ -0,0 +1,211 @@
+
+
+
+
+
+
+ v2 sizzle
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Group
+
+
+ cells
+
+
+
+
+
+ Adaptive height
+
+
+
+
+
+
+
+
+
+
Parallax
+
whoa
+
Flickity v2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/sandbox/wrap-around.html b/node_modules/flickity/sandbox/wrap-around.html
new file mode 100644
index 00000000..7575a2a8
--- /dev/null
+++ b/node_modules/flickity/sandbox/wrap-around.html
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+ wrap around
+
+
+
+
+
+
+
+
+
+ wrap around
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ Left aligned
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ Fixed-width cells, pixel-positioning HTML init
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
+
+ HTML init
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ freeScroll
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ no margin for error
+
+
+ tight wrap #589
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/flickity/test/.jshintrc b/node_modules/flickity/test/.jshintrc
new file mode 100644
index 00000000..677c29f5
--- /dev/null
+++ b/node_modules/flickity/test/.jshintrc
@@ -0,0 +1,12 @@
+{
+ "browser": true,
+ "devel": true,
+ "strict": true,
+ "undef": true,
+ "unused": true,
+ "predef": {
+ "Flickity": false,
+ "matchesSelector": false,
+ "QUnit": false
+ }
+}
diff --git a/node_modules/flickity/test/drag.html b/node_modules/flickity/test/drag.html
new file mode 100644
index 00000000..958dc496
--- /dev/null
+++ b/node_modules/flickity/test/drag.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+ Drag tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
drag and drag with wrapAround tests can be buggy. Try running them again.
+
+
drag
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
drag wrapAround
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+
+
+
diff --git a/node_modules/flickity/test/index.html b/node_modules/flickity/test/index.html
new file mode 100644
index 00000000..8e6a9160
--- /dev/null
+++ b/node_modules/flickity/test/index.html
@@ -0,0 +1,316 @@
+
+
+
+
+
+
+ Flickity tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Init
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ cellSelector
+
+
+
not cell 1
+
1
+
2
+
3
+
4
+
not cell 2
+
5
+
6
+
+
+ empty
+
+
+
+ getParentCell
+
+
+
+
+ position cells
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ contain
+
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ auto-play
+
+
+ prev/next buttons
+
+
+ page dots
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ getWrapCells
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ watch
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ resize
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ add/remove-cells
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ destroy
+
+
1
+
2
+
3
+
4
+
5
+
6
+
+
+ lazyload
+
+
+
![]()
+
+
+
+
+
+
![]()
+
+
+
+ lazyload srcset
+
+
+
![]()
+
+
![]()
+
+
+
+
+
+
+ groupCells
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ adaptiveHeight
+
+
+ selectCell
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
+
+ change
+
+
+ initialIndex
+
+
0
+
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
+
+
+
diff --git a/node_modules/flickity/test/test.css b/node_modules/flickity/test/test.css
new file mode 100644
index 00000000..f8ef806f
--- /dev/null
+++ b/node_modules/flickity/test/test.css
@@ -0,0 +1,70 @@
+/** { box-sizing: border-box; }*/
+
+body {
+ font-family: sans-serif;
+ color: #333;
+}
+
+.gallery {
+ border: 1px solid;
+ width: 400px;
+ margin-bottom: 40px;
+}
+
+.gallery .cell {
+ width: 100%;
+ height: 100px;
+ background: #F09;
+ font-size: 40px;
+ color: white;
+}
+
+.variable-width .cell { width: 25%; } /* 100px */
+.variable-width .cell.width2 { width: 40%; background: #F90; } /* 160px */
+.variable-width .cell.width3 { width: 60%; background: #09F; } /* 240px */
+
+#position-cells.percent-margin .cell { margin: 0 2%; }
+#position-cells.pixel-margin .cell { margin: 0 10px; }
+
+/*#drag-wrap-around { position: fixed; top: 0;}*/
+
+.drag .cell { margin-right: 5%; }
+
+#watch.has-after:after {
+ content: 'flickity';
+ display: none;
+}
+
+#lazyload img {
+ display: block;
+ max-height: 100px;
+}
+
+/* ---- group-cells ---- */
+
+#group-cells .cell {
+ width: 100px;
+/* border: 1px solid;*/
+}
+
+#group-cells .cell--width2 { width: 200px; }
+#group-cells .cell--width3 { width: 300px; }
+#group-cells .cell--width4 { width: 400px; }
+
+#group-cells.is-expanded { width: 600px; }
+
+#group-cells .cell:nth-child(2n) { background: #09F; }
+
+/* ---- adaptive-height ---- */
+
+#adaptive-height .cell { width: 33.33%; }
+
+#adaptive-height .cell--height2 { height: 200px; }
+#adaptive-height .cell--height3 { height: 300px; }
+#adaptive-height .cell--height4 { height: 400px; }
+
+#adaptive-height .cell:nth-child(2n) { background: #09F; }
+
+/* ---- select-cell ---- */
+
+#select-cell .cell { width: 33.33%; }
diff --git a/node_modules/flickity/test/unit/adaptive-height.js b/node_modules/flickity/test/unit/adaptive-height.js
new file mode 100644
index 00000000..655ac4a0
--- /dev/null
+++ b/node_modules/flickity/test/unit/adaptive-height.js
@@ -0,0 +1,29 @@
+QUnit.test( 'adaptiveHeight', function( assert ) {
+ 'use strict';
+
+ var flkty = new Flickity( '#adaptive-height', {
+ adaptiveHeight: true
+ });
+
+ // 2,1,3, 1,4,2, 1,2,1
+
+ function checkSelectHeight( index, height ) {
+ flkty.select( index, false, true );
+ assert.equal( flkty.viewport.style.height, height + 'px', 'slide ' + index );
+ }
+
+ checkSelectHeight( 0, 200 );
+ checkSelectHeight( 1, 100 );
+ checkSelectHeight( 2, 300 );
+ checkSelectHeight( 3, 100 );
+ checkSelectHeight( 4, 400 );
+ checkSelectHeight( 5, 200 );
+
+ flkty.options.groupCells = true;
+ flkty.resize();
+
+ checkSelectHeight( 0, 300 );
+ checkSelectHeight( 1, 400 );
+ checkSelectHeight( 2, 200 );
+
+});
diff --git a/node_modules/flickity/test/unit/add-remove-cells.js b/node_modules/flickity/test/unit/add-remove-cells.js
new file mode 100644
index 00000000..eab1fda2
--- /dev/null
+++ b/node_modules/flickity/test/unit/add-remove-cells.js
@@ -0,0 +1,88 @@
+QUnit.test( 'add/remove cells', function( assert ) {
+ 'use strict';
+
+ function makeCellElem() {
+ var cellElem = document.createElement('div');
+ cellElem.className = 'cell';
+ return cellElem;
+ }
+
+ // position values can be off by 0.1% or 1px
+ function isPositionApprox( value, expected ) {
+ var isPercent = value.indexOf('%') != -1;
+ value = parseFloat( value );
+ var diff = Math.abs( expected - value );
+ return isPercent ? diff < 0.1 : diff <= 1;
+ }
+
+ var elem = document.querySelector('#add-remove-cells');
+ var flkty = new Flickity( elem );
+ var sliderElem = elem.querySelector('.flickity-slider');
+
+ function checkCellElem( cellElem, index, message ) {
+ assert.equal( sliderElem.children[ index ], cellElem, message + ' cell element in DOM correct' );
+ assert.equal( flkty.cells[ index ].element, cellElem, message + ' element added as cell' );
+ assert.ok( isPositionApprox( cellElem.style.left, index * 25 ), ' element positioned' );
+ }
+
+ // prepend cell element
+ var cellElem = makeCellElem();
+ flkty.prepend( cellElem );
+ checkCellElem( cellElem, 0, 'prepended' );
+ assert.equal( flkty.selectedIndex, 1, 'selectedIndex +1 after prepend' );
+ // append cell element
+ cellElem = makeCellElem();
+ flkty.append( cellElem );
+ var lastIndex = flkty.cells.length - 1;
+ checkCellElem( cellElem, lastIndex, 'appended' );
+ assert.equal( flkty.selectedIndex, 1, 'selectedIndex same after prepend' );
+ // insert single cell element
+ cellElem = makeCellElem(); // this one gets removed first
+ flkty.select( 2 );
+ flkty.insert( cellElem, 2 );
+ checkCellElem( cellElem, 2, 'single inserted' );
+ assert.equal( flkty.selectedIndex, 3, 'selectedIndex +1 after insert before' );
+ flkty.insert( makeCellElem(), 4 );
+ assert.equal( flkty.selectedIndex, 3, 'selectedIndex same after insert before' );
+ // insert multiple cell elements
+ var cellElems = [ makeCellElem(), makeCellElem(), makeCellElem() ];
+ flkty.insert( cellElems, 3 );
+ checkCellElem( cellElems[0], 3, 'first multiple inserted' );
+ checkCellElem( cellElems[1], 4, 'second multiple inserted' );
+ checkCellElem( cellElems[2], 5, 'third multiple inserted' );
+ assert.equal( flkty.selectedIndex, 6, 'selectedIndex +6 after 3 insert before' );
+
+ function checkCellPositions() {
+ var isGap = false;
+ for ( var i=0, len = flkty.cells.length; i < len; i++ ) {
+ var cell = flkty.cells[i];
+ if ( !isPositionApprox( cell.element.style.left, i * 25 ) ) {
+ assert.ok( false, 'gap in cell position ' + i + ' after removal' );
+ isGap = true;
+ }
+ }
+ assert.ok( !isGap, 'no gaps in cell positions' );
+ }
+
+ // remove single cell element that was inserted
+ var len = flkty.cells.length;
+ flkty.remove( cellElem );
+ assert.equal( len - sliderElem.children.length, 1, 'element removed from DOM' );
+ assert.equal( len - flkty.cells.length, 1, 'cell removed' );
+ assert.equal( flkty.selectedIndex, 5, 'selectedIndex -1 after remove before' );
+ checkCellPositions();
+ // remove multiple
+ len = flkty.cells.length;
+ flkty.select( 4 );
+ flkty.remove([ cellElems[2], cellElems[0], cellElems[1] ]);
+ assert.equal( len - sliderElem.children.length, 3, 'elements removed from DOM' );
+ assert.equal( len - flkty.cells.length, 3, 'cells removed' );
+ checkCellPositions();
+
+ // remove all cells
+ flkty.remove( flkty.getCellElements() );
+ assert.equal( flkty.cells.length, 0, 'all cells removed' );
+ flkty.resize();
+ assert.ok( true, 'resize with zero items didnt freak out' );
+
+});
diff --git a/node_modules/flickity/test/unit/auto-play.js b/node_modules/flickity/test/unit/auto-play.js
new file mode 100644
index 00000000..ad1803a4
--- /dev/null
+++ b/node_modules/flickity/test/unit/auto-play.js
@@ -0,0 +1,91 @@
+QUnit.test( 'auto play', function( assert ) {
+ 'use strict';
+
+ var done = assert.async();
+
+ var flkty = new Flickity( '#auto-play', {
+ autoPlay: 200
+ });
+
+ var selectCount = 0;
+ var testDelay = flkty.options.autoPlay + 100;
+
+ var tests;
+
+ function nextTest() {
+ if ( tests.length ) {
+ var next = tests.shift();
+ next();
+ } else {
+ flkty.stopPlayer();
+ done();
+ }
+ }
+
+ tests = [
+ // check that player runs
+ function() {
+ var onSelect = function() {
+ selectCount++;
+ if ( selectCount < 5 ) {
+ assert.equal( flkty.selectedIndex, selectCount % flkty.cells.length,
+ 'auto-played to ' + flkty.selectedIndex );
+ } else if ( selectCount == 5 ) {
+ // HACK do async, should be able to stop after a tick
+ flkty.off( 'select', onSelect );
+ nextTest();
+ }
+ };
+ flkty.on( 'select', onSelect );
+ },
+ // pause & unpause
+ function() {
+ function onPauseSelect() {
+ assert.ok( false, 'player ticked during pause' );
+ }
+ flkty.on( 'select', onPauseSelect );
+ flkty.pausePlayer();
+ setTimeout( function() {
+ assert.ok( true, 'player did not tick during pause' );
+ flkty.off( 'select', onPauseSelect );
+ flkty.once( 'select', function() {
+ assert.ok( true, 'player resumed after unpausing' );
+ nextTest();
+ });
+ flkty.unpausePlayer();
+ }, testDelay );
+ },
+ // stopPlayer
+ function() {
+ var ticks = 0;
+ function onSelect() {
+ ticks++;
+ }
+ flkty.stopPlayer();
+ setTimeout( function() {
+ flkty.off( 'select', onSelect );
+ assert.equal( ticks, 0, 'no ticks after stopped' );
+ nextTest();
+ }, testDelay * 2 );
+ },
+ // double playPlayer()
+ function() {
+ var ticks = 0;
+ function onSelect() {
+ ticks++;
+ }
+ flkty.stopPlayer();
+ flkty.on( 'select', onSelect );
+ flkty.playPlayer();
+ flkty.playPlayer();
+ setTimeout( function() {
+ flkty.off( 'select', onSelect );
+ assert.equal( ticks, 1, 'only one tick after double playPlayer' );
+ nextTest();
+ }, testDelay );
+ },
+ ];
+
+ nextTest();
+
+});
diff --git a/node_modules/flickity/test/unit/cell-selector.js b/node_modules/flickity/test/unit/cell-selector.js
new file mode 100644
index 00000000..80c12826
--- /dev/null
+++ b/node_modules/flickity/test/unit/cell-selector.js
@@ -0,0 +1,32 @@
+QUnit.test( 'cellSelector', function( assert ) {
+ 'use strict';
+
+ var elem = document.querySelector('#cell-selector');
+ var notCell1 = elem.querySelector('.not-cell1');
+ var notCell2 = elem.querySelector('.not-cell2');
+
+ var flkty = new Flickity( elem, {
+ cellSelector: '.cell'
+ });
+
+ var cellsMatchSelector = true;
+ for ( var i=0, len = flkty.cells.length; i < len; i++ ) {
+ var cell = flkty.cells[i];
+ var isMatch = matchesSelector( cell.element, flkty.options.cellSelector );
+ cellsMatchSelector = cellsMatchSelector && isMatch;
+ }
+
+ // getCellElements()
+ var cellElems = flkty.getCellElements();
+ var queriedCellElems = elem.querySelectorAll( flkty.options.cellSelector );
+ assert.equal( cellElems.length, flkty.cells.length, 'getCellElements returns corrent number of elements' );
+ for( i=0, len = cellElems.length; i < len; i++ ) {
+ assert.equal( cellElems[i], queriedCellElems[i], 'cell element same as queried cell element' );
+ }
+
+ assert.ok( cellsMatchSelector, 'all cell elements match cellSelector' );
+
+ assert.equal( notCell1.parentNode, elem, 'notCell1 parent node is still gallery' );
+ assert.equal( notCell2.parentNode, elem, 'notCell2 parent node is still gallery' );
+
+});
diff --git a/node_modules/flickity/test/unit/change.js b/node_modules/flickity/test/unit/change.js
new file mode 100644
index 00000000..86973254
--- /dev/null
+++ b/node_modules/flickity/test/unit/change.js
@@ -0,0 +1,47 @@
+QUnit.test( 'change', function( assert ) {
+ 'use strict';
+
+ var done = assert.async();
+
+ function onInitChange() {
+ assert.ok( false, 'change should not trigger on init' );
+ }
+
+ new Flickity( '#change', {
+ on: {
+ change: onInitChange,
+ ready: function() {
+ // define events last to first for strict
+ var onChangeC = function( index ) {
+ assert.equal( index, 0, 'change triggered on select back to 0' );
+ done();
+ };
+
+ var onChangeB = function() {
+ assert.ok( false, 'change should not trigger on same select' );
+ };
+
+ var onSelectB = function( index ) {
+ assert.equal( index, 1, 'select triggered on same select 1' );
+ this.off( 'change', onChangeB );
+ this.once( 'change', onChangeC );
+ this.select( 0, false, true );
+ };
+
+ var onChangeA = function( index ) {
+ assert.equal( index, 1, 'change triggered, selected 1');
+ this.once( 'change', onChangeB );
+ this.once( 'select', onSelectB );
+ // select 1 again
+ this.select( 1, false, true );
+ };
+
+ // kick off
+ this.off( 'change', onInitChange );
+ this.once( 'change', onChangeA );
+ this.select( 1, false, true );
+ }
+ },
+ });
+
+});
diff --git a/node_modules/flickity/test/unit/contain.js b/node_modules/flickity/test/unit/contain.js
new file mode 100644
index 00000000..1c266501
--- /dev/null
+++ b/node_modules/flickity/test/unit/contain.js
@@ -0,0 +1,21 @@
+QUnit.test( 'contain', function( assert ) {
+
+ 'use strict';
+
+ var flkty = new Flickity( '#contain', {
+ contain: true
+ });
+
+ assert.equal( Math.round( flkty.x + flkty.cursorPosition ), 0, 'selected at 0, position left edge' );
+ flkty.select( 1 );
+ flkty.positionSliderAtSelected();
+ assert.equal( Math.round( flkty.x + flkty.cursorPosition ), 0, 'selected at 1, position left edge' );
+ flkty.select( 4 );
+ flkty.positionSliderAtSelected();
+ var endLimit = flkty.slideableWidth - flkty.size.innerWidth * ( 1 - flkty.cellAlign );
+ assert.equal( Math.round( -endLimit ), Math.round( flkty.x ), 'selected at 4, position right edge' );
+ flkty.select( 5 );
+ flkty.positionSliderAtSelected();
+ assert.equal( Math.round( -endLimit ), Math.round( flkty.x ), 'selected at 5, position right edge' );
+
+});
diff --git a/node_modules/flickity/test/unit/destroy.js b/node_modules/flickity/test/unit/destroy.js
new file mode 100644
index 00000000..df94b7ae
--- /dev/null
+++ b/node_modules/flickity/test/unit/destroy.js
@@ -0,0 +1,25 @@
+QUnit.test( 'destroy', function( assert ) {
+
+ 'use strict';
+
+ var elem = document.querySelector('#destroy');
+ var flkty = new Flickity( elem );
+
+ var done = assert.async();
+ // do it async
+ setTimeout( function() {
+ flkty.destroy();
+ assert.strictEqual( elem.flickityGUID, undefined, 'flickityGUID removed' );
+ assert.ok( !flkty.isActive, 'not active' );
+ assert.ok( !Flickity.data( elem ), '.data() returns falsey' );
+ assert.ok( elem.children[0], '.cell', 'cell is back as first child' );
+ assert.ok( !matchesSelector( elem, '.flickity-enabled'), 'flickity-enabled class removed' );
+ assert.ok( !elem.querySelector('.flickity-prev-next-button'), 'no buttons' );
+ assert.ok( !elem.querySelector('.flickity-page-dots'), 'no page dots' );
+ assert.ok( !elem.style.height, 'no height set' );
+ assert.ok( !elem.children[0].style.left, 'first cell has no left position' );
+
+ done();
+ }, 20 );
+
+});
diff --git a/node_modules/flickity/test/unit/drag.js b/node_modules/flickity/test/unit/drag.js
new file mode 100644
index 00000000..88592154
--- /dev/null
+++ b/node_modules/flickity/test/unit/drag.js
@@ -0,0 +1,188 @@
+( function() {
+
+'use strict';
+
+var utils = window.fizzyUIUtils;
+
+function noop() {}
+
+var fakeDrag = window.fakeDrag = function( flkty, positions ) {
+
+ function fakeEvent( type, pageX ) {
+ return {
+ type: type,
+ pageX: pageX,
+ pageY: 0,
+ preventDefault: noop,
+ target: flkty.viewport
+ };
+ }
+
+ var hasBeenDown = false;
+
+ function triggerEvent() {
+ var position = positions.shift();
+ // down or move event
+ if ( !hasBeenDown ) {
+ var downEvent = fakeEvent( 'mousedown', position );
+ flkty._pointerDown( downEvent, downEvent );
+ hasBeenDown = true;
+ } else {
+ var moveEvent = fakeEvent( 'mousemove', position );
+ flkty._pointerMove( moveEvent, moveEvent );
+ }
+
+ if ( positions.length ) {
+ // loop next
+ setTimeout( triggerEvent, 40 );
+ } else {
+ // up event
+ var upEvent = fakeEvent( 'mouseup', position );
+ flkty._pointerUp( upEvent, upEvent );
+ }
+ }
+
+ triggerEvent();
+};
+
+var dragTests;
+// do each drag test one after another
+function getDoNextDragTest( done ) {
+ return function doNextDragTest() {
+ if ( dragTests.length ) {
+ var dragTest = dragTests.shift();
+ dragTest();
+ } else {
+ done();
+ }
+ };
+}
+
+// flickity, dragPositions, index, callback, message
+function getFakeDragTest( args ) {
+ var assert = args.assert;
+ var flkty = args.flickity;
+ var msgCell = 'slide[' + args.index + ']';
+
+ return function fakeDragTest() {
+ var selectMsg = ( args.message ? args.message + '. ' : '' ) + 'selected ' + msgCell;
+ flkty.once( 'select', function() {
+ assert.equal( flkty.selectedIndex, args.index, selectMsg );
+ });
+
+ var settleMsg = ( args.message ? args.message + '. ' : '' ) + 'settled ' + msgCell;
+ var target = flkty.slides[ args.index ].target;
+ flkty.once( 'settle', function() {
+ assert.equal( Math.round( -flkty.x ), Math.round( target ), settleMsg );
+ setTimeout( args.callback );
+ });
+
+ fakeDrag( args.flickity, args.dragPositions );
+ };
+}
+
+
+
+QUnit.test( 'drag', function( assert ) {
+ // async test
+ var done = assert.async();
+
+ var flkty = new Flickity('#drag');
+
+ var doNextDragTest = getDoNextDragTest( done );
+
+ function getDragTest( args ) {
+ args = utils.extend( args, {
+ assert: assert,
+ flickity: flkty,
+ callback: doNextDragTest
+ });
+ return getFakeDragTest( args );
+ }
+
+ dragTests = [
+ getDragTest({
+ message: 'drag to 2nd cell',
+ index: 1,
+ dragPositions: [ 0, -10, -20 ]
+ }),
+ getDragTest({
+ message: 'drag back to 1st cell',
+ index: 0,
+ dragPositions: [ 0, 10, 20 ]
+ }),
+ getDragTest({
+ message: 'big flick to 3rd cell',
+ index: 2,
+ dragPositions: [ 0, -10, -80 ]
+ }),
+ // minimal movement to trigger static click
+ function() {
+ flkty.once( 'staticClick', function() {
+ assert.ok( true, 'staticClick fired on non-drag');
+ assert.equal( flkty.selectedIndex, 2, 'selected index still at 2 after click' );
+ setTimeout( doNextDragTest );
+ });
+ fakeDrag( flkty, [ 0, 1, 0, -2, -1 ] );
+ },
+ // move out then back to where it started
+ function() {
+ flkty.once( 'settle', function() {
+ assert.equal( flkty.selectedIndex, 2, 'move out then back. same cell' );
+ setTimeout( doNextDragTest );
+ });
+ fakeDrag( flkty, [ 0, 10, 20, 30, 20 ] );
+ },
+ getDragTest({
+ message: 'drag and try to flick past 6th cell',
+ index: 5,
+ dragPositions: [ 0, -10, -50, -77, -100, -125, -150, -175, -250, -350 ]
+ })
+ ];
+
+ doNextDragTest();
+
+});
+
+QUnit.test( 'drag with wrapAround', function( assert ) {
+ // async test
+ var done = assert.async();
+
+ var flkty = new Flickity('#drag-wrap-around', {
+ wrapAround: true
+ });
+
+ var doNextDragTest = getDoNextDragTest( done );
+
+ function getDragTest( args ) {
+ args = utils.extend( args, {
+ assert: assert,
+ flickity: flkty,
+ callback: doNextDragTest
+ });
+ return getFakeDragTest( args );
+ }
+
+ dragTests = [
+ getDragTest({
+ message: 'drag to last cell via wrap-around',
+ index: 5,
+ dragPositions: [ 0, 10, 20 ]
+ }),
+ getDragTest({
+ message: 'drag to first cell via wrap-around',
+ index: 0,
+ dragPositions: [ 0, -10, -20 ]
+ }),
+ getDragTest({
+ message: 'big flick to 5th cell via wrap-around',
+ index: 4,
+ dragPositions: [ 0, 10, 80 ]
+ })
+ ];
+
+ doNextDragTest();
+
+});
+
+})();
diff --git a/node_modules/flickity/test/unit/empty.js b/node_modules/flickity/test/unit/empty.js
new file mode 100644
index 00000000..b12fa0cd
--- /dev/null
+++ b/node_modules/flickity/test/unit/empty.js
@@ -0,0 +1,39 @@
+QUnit.test( 'empty', function( assert ) {
+ 'use strict';
+
+ var gallery = document.querySelector('#empty');
+
+ var flkty = new Flickity( gallery );
+
+ assert.ok( true, 'empty gallery ok' );
+ assert.ok( flkty.prevButton.element.disabled, 'previous button disabled' );
+ assert.ok( flkty.nextButton.element.disabled, 'next button disabled' );
+ assert.equal( flkty.pageDots.dots.length, 0, '0 page dots');
+
+ flkty.resize();
+ assert.ok( true, 'resize with empty gallery ok');
+
+ function makeCellElem() {
+ var cellElem = document.createElement('div');
+ cellElem.className = 'cell';
+ return cellElem;
+ }
+
+ flkty.append( makeCellElem() );
+ assert.equal( flkty.cells.length, 1, 'added cell to empty gallery' );
+
+
+ assert.ok( flkty.prevButton.element.disabled, 'previous button disabled' );
+ assert.ok( flkty.nextButton.element.disabled, 'next button disabled' );
+ assert.equal( flkty.pageDots.dots.length, 1, '1 page dots');
+
+ // destroy and re-init with higher initialIndex
+ flkty.destroy();
+ flkty = new Flickity( gallery, {
+ initialIndex: 2
+ });
+
+ // #291
+ assert.ok( true, 'initializing with initialIndex > cells doesnt throw error' );
+
+});
diff --git a/node_modules/flickity/test/unit/get-parent-cell.js b/node_modules/flickity/test/unit/get-parent-cell.js
new file mode 100644
index 00000000..ef8d3fce
--- /dev/null
+++ b/node_modules/flickity/test/unit/get-parent-cell.js
@@ -0,0 +1,37 @@
+QUnit.test( 'getParentCell', function( assert ) {
+ 'use strict';
+
+ var gallery = document.querySelector('#get-parent-cell');
+ var flkty = new Flickity( gallery );
+
+ // cell1
+ var cell = flkty.getParentCell( gallery.querySelector('.cell1') );
+ assert.ok( cell, 'getParentCell( cell ) ok' );
+ assert.ok( cell instanceof Flickity.Cell, 'cell is Flickity.Cell' );
+ var index = flkty.cells.indexOf( cell );
+ assert.equal( index, 0, 'cell is index 0' );
+ // cell3
+ cell = flkty.getParentCell( gallery.querySelector('.cell3') );
+ assert.ok( cell, 'getParentCell( cell ) ok' );
+ assert.ok( cell instanceof Flickity.Cell, 'cell is Flickity.Cell' );
+ index = flkty.cells.indexOf( cell );
+ assert.equal( index, 2, 'cell is index 2' );
+ // child1
+ cell = flkty.getParentCell( gallery.querySelector('.child1') );
+ assert.ok( cell, 'getParentCell( cell ) ok' );
+ assert.ok( cell instanceof Flickity.Cell, 'cell is Flickity.Cell' );
+ index = flkty.cells.indexOf( cell );
+ assert.equal( index, 0, 'cell is index 0' );
+ // child2
+ cell = flkty.getParentCell( gallery.querySelector('.child2') );
+ assert.ok( cell, 'getParentCell( cell ) ok' );
+ assert.ok( cell instanceof Flickity.Cell, 'cell is Flickity.Cell' );
+ index = flkty.cells.indexOf( cell );
+ assert.equal( index, 1, 'cell is index 1' );
+ // outside
+ cell = flkty.getParentCell( document.querySelector('.outside') );
+ assert.ok( !cell, 'getParentCell( notCell ) not ok' );
+ index = flkty.cells.indexOf( cell );
+ assert.equal( index, -1, 'not cell is index -1' );
+
+});
diff --git a/node_modules/flickity/test/unit/get-wrap-cells.js b/node_modules/flickity/test/unit/get-wrap-cells.js
new file mode 100644
index 00000000..adda7078
--- /dev/null
+++ b/node_modules/flickity/test/unit/get-wrap-cells.js
@@ -0,0 +1,24 @@
+QUnit.test( 'getWrapCells', function( assert ) {
+ 'use strict';
+
+ var flkty = new Flickity( '#get-wrap-cells', {
+ wrapAround: true
+ });
+ // cells are 25% width
+ // center align, 2 cells on each side
+ assert.equal( flkty.beforeShiftCells.length, 2, 'center align, 2 before shift cells' );
+ assert.equal( flkty.afterShiftCells.length, 2, 'center align, 2 after shift cells' );
+
+ flkty.options.cellAlign = 'left';
+ flkty.resize();
+ // left align, 0, 4
+ assert.equal( flkty.beforeShiftCells.length, 0, 'left align, 1 before shift cells' );
+ assert.equal( flkty.afterShiftCells.length, 4, 'left align, 4 after shift cells' );
+
+ flkty.options.cellAlign = 'right';
+ flkty.resize();
+ // right align, 4, 0
+ assert.equal( flkty.beforeShiftCells.length, 4, 'right align, 4 before shift cells' );
+ assert.equal( flkty.afterShiftCells.length, 0, 'right align, 0 after shift cells' );
+
+});
diff --git a/node_modules/flickity/test/unit/group-cells.js b/node_modules/flickity/test/unit/group-cells.js
new file mode 100644
index 00000000..84dbb0ee
--- /dev/null
+++ b/node_modules/flickity/test/unit/group-cells.js
@@ -0,0 +1,39 @@
+QUnit.test( 'groupCells', function( assert ) {
+ 'use strict';
+
+ var flkty = new Flickity( '#group-cells', {
+ groupCells: true
+ });
+
+ function getSlideCellsCount() {
+ var counts = flkty.slides.map( function( slide ) {
+ return slide.cells.length;
+ });
+ return counts.join(',');
+ }
+
+ assert.equal( getSlideCellsCount(), '3,2,2,1,1,3,2', 'groupCells: true' );
+ var targets = flkty.slides.map( function( slide ) {
+ return slide.target;
+ });
+ assert.deepEqual( targets, [200, 600, 1000, 1300, 1600, 2000, 2300], 'targets' );
+
+ flkty.selectCell( 6 );
+ assert.equal( flkty.selectedIndex, 2, 'selectCell(6) selects 3rd slide' );
+ flkty.selectCell( flkty.cells[2].element );
+ assert.equal( flkty.selectedIndex, 0, 'selectCell(3rd elem) selects 1st slide' );
+
+ flkty.options.groupCells = 2;
+ flkty.reposition();
+ assert.equal( getSlideCellsCount(), '2,2,2,2,2,2,2', 'groupCells: 2' );
+
+ flkty.options.groupCells = '75%';
+ flkty.reposition();
+ assert.equal( getSlideCellsCount(), '2,1,1,2,1,1,1,2,2,1', 'groupCells: 75%' );
+
+ flkty.element.classList.add('is-expanded'); // 600px wide
+ flkty.options.groupCells = true;
+ flkty.resize();
+ assert.equal( getSlideCellsCount(), '3,3,2,3,3', 'groupCells: true, container @ 600px' );
+
+});
diff --git a/node_modules/flickity/test/unit/init.js b/node_modules/flickity/test/unit/init.js
new file mode 100644
index 00000000..34b84d1d
--- /dev/null
+++ b/node_modules/flickity/test/unit/init.js
@@ -0,0 +1,37 @@
+( function() {
+
+'use strict';
+
+QUnit.module('Flickity');
+
+var utils = window.fizzyUIUtils;
+
+QUnit.test( 'init', function( assert ) {
+
+ var elem = document.querySelector('#init');
+ var flkty = new Flickity( elem );
+
+ for ( var prop in Flickity.defaults ) {
+ assert.equal( flkty.options[ prop ], Flickity.defaults[ prop ], prop + ' option matches default' );
+ }
+
+ assert.equal( flkty.element, elem, '.element is proper element' );
+ var children = utils.makeArray( flkty.element.children );
+ assert.notEqual( children.indexOf( flkty.viewport ), -1, 'viewport element is a child element' );
+ assert.equal( flkty.viewport.children[0], flkty.slider, 'slider is in viewport' );
+ assert.equal( flkty.viewport.style.height, '100px', 'viewport height set' );
+
+ assert.ok( flkty.isActive, 'isActive' );
+ assert.ok( matchesSelector( elem, '.flickity-enabled' ), 'flickity-enabled class added' );
+
+ assert.equal( flkty.cells.length, 6, 'has 6 cells' );
+ assert.equal( flkty.cells[0].element.style.left, '0%', 'first cell left: 0%' );
+ assert.equal( flkty.cells[5].element.style.left, '500%', '6th cell left: 500%' );
+
+ assert.equal( flkty.selectedIndex, 0, 'selectedIndex = 0' );
+ assert.equal( flkty.cursorPosition, 200, 'cursorPosition = 200' );
+ assert.equal( flkty.x + flkty.cursorPosition, 0, 'x + cursorPosition = 0' );
+
+});
+
+})();
diff --git a/node_modules/flickity/test/unit/initial-index.js b/node_modules/flickity/test/unit/initial-index.js
new file mode 100644
index 00000000..7f479823
--- /dev/null
+++ b/node_modules/flickity/test/unit/initial-index.js
@@ -0,0 +1,26 @@
+QUnit.test( 'initialIndex', function( assert ) {
+ 'use strict';
+ // initialIndex number
+ var flkty = new Flickity( '#initial-index', {
+ initialIndex: 3,
+ });
+ assert.equal( flkty.selectedIndex, 3, 'initialIndex number' );
+ // selectedIndex remains same after reactivation
+ flkty.deactivate();
+ flkty.activate();
+ assert.equal( flkty.selectedIndex, 3, 'reactivated selectedIndex stays the same' );
+ flkty.destroy();
+ // initialIndex selector string
+ flkty = new Flickity( '#initial-index', {
+ initialIndex: '.cell--initial',
+ });
+ assert.equal( flkty.selectedIndex, 4, 'initialIndex selector string' );
+ flkty.destroy();
+ // initialIndex selector string with groupCells #881
+ flkty = new Flickity( '#initial-index', {
+ groupCells: 3,
+ initialIndex: '.cell--initial',
+ });
+ assert.equal( flkty.selectedIndex, 1, 'initialIndex selector string with groupCells' );
+
+});
diff --git a/node_modules/flickity/test/unit/lazyload-srcset.js b/node_modules/flickity/test/unit/lazyload-srcset.js
new file mode 100644
index 00000000..57a0590c
--- /dev/null
+++ b/node_modules/flickity/test/unit/lazyload-srcset.js
@@ -0,0 +1,29 @@
+QUnit.test( 'lazyload srcset', function( assert ) {
+ 'use strict';
+
+ var done = assert.async();
+
+ var gallery = document.querySelector('#lazyload-srcset');
+ var flkty = new Flickity( gallery, {
+ lazyLoad: 1
+ });
+
+ var loadCount = 0;
+ flkty.on( 'lazyLoad', function( event, cellElem ) {
+ loadCount++;
+
+ assert.equal( event.type, 'load', 'event.type == load' );
+ assert.ok( event.target.complete, 'img ' + loadCount + ' is complete' );
+ assert.ok( cellElem, 'cellElement argument there' );
+ var srcset = event.target.getAttribute('srcset');
+ assert.ok( srcset, 'srcset attribute set');
+ var lazyAttr = event.target.getAttribute('data-flickity-lazyload-srcset');
+ assert.ok( !lazyAttr, 'data-flickity-lazyload attribute removed' );
+
+ // after first 2 have loaded, select 7th cell
+ if ( loadCount == 2 ) {
+ done();
+ }
+ });
+
+});
diff --git a/node_modules/flickity/test/unit/lazyload.js b/node_modules/flickity/test/unit/lazyload.js
new file mode 100644
index 00000000..269eebe1
--- /dev/null
+++ b/node_modules/flickity/test/unit/lazyload.js
@@ -0,0 +1,32 @@
+QUnit.test( 'lazyload', function( assert ) {
+ 'use strict';
+
+ var done = assert.async();
+
+ var gallery = document.querySelector('#lazyload');
+ var flkty = new Flickity( gallery, {
+ lazyLoad: 1
+ });
+
+ var loadCount = 0;
+ flkty.on( 'lazyLoad', function( event, cellElem ) {
+ loadCount++;
+
+ assert.equal( event.type, 'load', 'event.type == load' );
+ assert.ok( event.target.complete, 'img ' + loadCount + ' is complete' );
+ assert.ok( cellElem, 'cellElement argument there' );
+ var lazyAttr = event.target.getAttribute('data-flickity-lazyload');
+ assert.ok( !lazyAttr, 'data-flickity-lazyload attribute removed' );
+
+ // after first 2 have loaded, select 7th cell
+ if ( loadCount == 2 ) {
+ flkty.select( 6 );
+ }
+ if ( loadCount == 5 ) {
+ var loadedImgs = gallery.querySelectorAll('.flickity-lazyloaded');
+ assert.equal( loadedImgs.length, '5', 'only 5 images loaded' );
+ done();
+ }
+ });
+
+});
diff --git a/node_modules/flickity/test/unit/page-dots.js b/node_modules/flickity/test/unit/page-dots.js
new file mode 100644
index 00000000..53e6faec
--- /dev/null
+++ b/node_modules/flickity/test/unit/page-dots.js
@@ -0,0 +1,33 @@
+QUnit.test( 'pageDots', function( assert ) {
+ 'use strict';
+
+ var elem = document.querySelector('#page-dots');
+ var flkty = new Flickity( elem );
+
+ var dotsHolder = elem.querySelector('.flickity-page-dots');
+ var dotsElems = dotsHolder.querySelectorAll('.dot');
+
+ assert.ok( dotsHolder, 'dots holder in DOM' );
+ assert.equal( flkty.pageDots.holder, dotsHolder, 'dots holder element matches flkty.pageDots.holder' );
+ assert.equal( dotsElems.length, flkty.cells.length, 'number of dots matches number of cells' );
+
+ function getSelectedDotIndex() {
+ var selectedDot = dotsHolder.querySelector('.is-selected');
+ for ( var i=0, len = dotsElems.length; i < len; i++ ) {
+ var dotElem = dotsElems[i];
+ if ( dotElem == selectedDot ) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ assert.equal( getSelectedDotIndex(), 0, 'first dot is selected' );
+ flkty.select( 2 );
+ assert.equal( getSelectedDotIndex(), 2, '3rd dot is selected' );
+
+ // fake tap
+ flkty.pageDots.onTap( { target: dotsElems[4] } );
+ assert.equal( flkty.selectedIndex, 4, 'tap dot selects cell' );
+
+});
diff --git a/node_modules/flickity/test/unit/position-cells.js b/node_modules/flickity/test/unit/position-cells.js
new file mode 100644
index 00000000..63aed0f3
--- /dev/null
+++ b/node_modules/flickity/test/unit/position-cells.js
@@ -0,0 +1,51 @@
+( function() {
+
+'use strict';
+
+// position values can be off by 0.1% or 1px
+function isPositionApprox( value, expected ) {
+ var isPercent = value.indexOf('%') != -1;
+ value = parseFloat( value );
+ var diff = Math.abs( expected - value );
+ return isPercent ? diff < 0.1 : diff <= 1;
+}
+
+// loop through cells and check position values against expecteds
+function checkCellPositions( flkty, expecteds ) {
+ var isOK;
+ for ( var i=0, len = expecteds.length; i < len; i++ ) {
+ var expected = expecteds[i];
+ var cell = flkty.cells[i];
+ var position = cell.element.style.left;
+ isOK = isPositionApprox( position, expected );
+ if ( !isOK ) {
+ console.error( 'wrong cell position, index: ' + i + '. ' +
+ 'expected: ' + expected + '. position: ' + position );
+ break;
+ }
+ }
+ return isOK;
+}
+
+QUnit.test( 'position cells', function( assert ) {
+
+ var flkty = new Flickity('#position-cells');
+
+ assert.ok( checkCellPositions( flkty, [ 0, 40, 65, 125, 165, 225 ] ), 'percent cell position' );
+ // .cell { margin: 0 2%; }
+ flkty.element.classList.add('percent-margin');
+ flkty.positionCells();
+ assert.ok( checkCellPositions( flkty, [ 0, 44, 73, 137, 181, 245 ] ), 'percent cell position with margin' );
+ flkty.element.classList.remove('percent-margin');
+ // pixel-based position
+ flkty.options.percentPosition = false;
+ flkty.positionCells();
+ assert.ok( checkCellPositions( flkty, [ 0, 160, 260, 500, 660, 900 ] ), 'pixel cell position' );
+ // pixel margin, { margin: 0 10px; }
+ flkty.element.classList.add('pixel-margin');
+ flkty.positionCells();
+ assert.ok( checkCellPositions( flkty, [ 0, 180, 300, 560, 740, 1000 ] ), 'pixel cell position with margin' );
+
+});
+
+})();
diff --git a/node_modules/flickity/test/unit/prev-next-buttons.js b/node_modules/flickity/test/unit/prev-next-buttons.js
new file mode 100644
index 00000000..261df2f1
--- /dev/null
+++ b/node_modules/flickity/test/unit/prev-next-buttons.js
@@ -0,0 +1,27 @@
+QUnit.test( 'prev-next-buttons', function( assert ) {
+ 'use strict';
+
+ var elem = document.querySelector('#prev-next-buttons');
+ var flkty = new Flickity( elem );
+
+ var prevElem = elem.querySelector('.flickity-prev-next-button.previous');
+ var nextElem = elem.querySelector('.flickity-prev-next-button.next');
+ assert.ok( prevElem, 'previous button in DOM' );
+ assert.ok( nextElem, 'next button in DOM' );
+ assert.equal( flkty.prevButton.element, prevElem, 'previous button element matches prevButton.element' );
+ assert.equal( flkty.nextButton.element, nextElem, 'next button element matches nextButton.element' );
+ assert.ok( prevElem.disabled, 'previous button is disabled at first index' );
+
+ prevElem.focus();
+ prevElem.click();
+ assert.equal( flkty.selectedIndex, 0, 'selectedIndex still at 0' );
+ nextElem.focus();
+ nextElem.click();
+ assert.equal( flkty.selectedIndex, 1, 'next button clicked, selectedIndex at 1' );
+ prevElem.focus();
+ prevElem.click();
+ assert.equal( flkty.selectedIndex, 0, 'previous button clicked, selectedIndex back at 0' );
+ flkty.select( 5 );
+ assert.ok( nextElem.disabled, 'next button disabled when at last cell' );
+
+});
diff --git a/node_modules/flickity/test/unit/resize.js b/node_modules/flickity/test/unit/resize.js
new file mode 100644
index 00000000..2f4dd7ae
--- /dev/null
+++ b/node_modules/flickity/test/unit/resize.js
@@ -0,0 +1,16 @@
+QUnit.test( 'resize', function( assert ) {
+
+ 'use strict';
+
+ var elem = document.querySelector('#resize');
+ var flkty = new Flickity( elem, {
+ initialIndex: 2
+ });
+ elem.style.width = '500px';
+ flkty.resize();
+
+ assert.equal( flkty.selectedIndex, 2, 'selectedIndex = 2' );
+ assert.equal( flkty.cursorPosition, 250, 'cursorPosition = 250' );
+ assert.equal( flkty.x + flkty.cursorPosition, -1000, 'x + cursorPosition = -1000' );
+
+});
diff --git a/node_modules/flickity/test/unit/select-cell.js b/node_modules/flickity/test/unit/select-cell.js
new file mode 100644
index 00000000..28ae4b53
--- /dev/null
+++ b/node_modules/flickity/test/unit/select-cell.js
@@ -0,0 +1,18 @@
+QUnit.test( 'selectCell', function( assert ) {
+ 'use strict';
+
+ var gallery = document.querySelector('#select-cell');
+ var cellElems = gallery.querySelectorAll('.cell');
+ var flkty = new Flickity( gallery, {
+ groupCells: true, // groups of 3
+ });
+
+ flkty.selectCell( 3 );
+ assert.equal( flkty.selectedIndex, 1, 'selectCell number' );
+ flkty.selectCell( cellElems[1] );
+ assert.equal( flkty.selectedIndex, 0, 'selectCell element' );
+ flkty.selectCell('.select-cell__6');
+ assert.equal( flkty.selectedIndex, 2, 'selectCell selector string' );
+ flkty.selectCell('none');
+ assert.equal( flkty.selectedIndex, 2, 'selectCell bad string is okay' );
+});
diff --git a/node_modules/flickity/test/unit/watch.js b/node_modules/flickity/test/unit/watch.js
new file mode 100644
index 00000000..14cd8fd8
--- /dev/null
+++ b/node_modules/flickity/test/unit/watch.js
@@ -0,0 +1,10 @@
+QUnit.test( 'watch fallback', function( assert ) {
+ 'use strict';
+
+ var elem = document.querySelector('#watch');
+ var flkty = new Flickity( elem, {
+ watchCSS: true
+ });
+
+ assert.ok( !flkty.isActive, 'fallback not active, watchCSS: true' );
+});
diff --git a/node_modules/get-size/README.md b/node_modules/get-size/README.md
new file mode 100644
index 00000000..dfd8d4ae
--- /dev/null
+++ b/node_modules/get-size/README.md
@@ -0,0 +1,45 @@
+# getSize
+
+Get the size of elements. Used in [Masonry](https://masonry.desandro.com), [Isotope](https://isotope.metafizzy.co), & [Flickity](https://flickity.metafizzy.co).
+
+``` js
+var size = getSize( elem );
+// elem can be an element
+var size = getSize( document.querySelector('.selector') )
+// elem can be a selector string
+var size = getSize('.selector')
+```
+
+Returns an object with:
+
++ width, height
++ innerWidth, innerHeight
++ outerWidth, outerHeight
++ paddingLeft, paddingTop, paddingRight, paddingBottom
++ marginLeft, marginTop, marginRight, marginBottom
++ borderLeftWidth, borderTopWidth, borderRightWidth, borderBottomWidth
++ isBorderBox
+
+Browser support: IE10+, Android 4.0+, iOS 5+, and modern browsers
+
+## Install
+
+Install with npm: `npm install get-size`
+
+Install with [Bower](https://bower.io): `bower install get-size`
+
+## Firefox hidden iframe bug
+
+[Firefox has an old bug](https://bugzilla.mozilla.org/show_bug.cgi?id=548397) that occurs within iframes that are hidden with `display: none`. To resolve this, you can use alternate CSS to hide the iframe off-screen, with out `display: none`.
+
+``` css
+.hide-iframe {
+ visibility: hidden;
+ position: absolute;
+ left: -999em;
+}
+```
+
+## MIT License
+
+getSize is released under the [MIT License](https://desandro.mit-license.org/).
diff --git a/node_modules/get-size/bower.json b/node_modules/get-size/bower.json
new file mode 100644
index 00000000..d2388752
--- /dev/null
+++ b/node_modules/get-size/bower.json
@@ -0,0 +1,23 @@
+{
+ "name": "get-size",
+ "description": "measures element size",
+ "main": "get-size.js",
+ "authors": [
+ "David DeSandro"
+ ],
+ "license": "MIT",
+ "keywords": [
+ "size",
+ "DOM"
+ ],
+ "homepage": "https://github.com/desandro/get-size",
+ "ignore": [
+ "**/.*",
+ "package.json",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests",
+ "sandbox.html"
+ ]
+}
diff --git a/node_modules/get-size/get-size.js b/node_modules/get-size/get-size.js
new file mode 100644
index 00000000..0f013fc5
--- /dev/null
+++ b/node_modules/get-size/get-size.js
@@ -0,0 +1,207 @@
+/*!
+ * getSize v2.0.3
+ * measure size of elements
+ * MIT license
+ */
+
+/* jshint browser: true, strict: true, undef: true, unused: true */
+/* globals console: false */
+
+( function( window, factory ) {
+ /* jshint strict: false */ /* globals define, module */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( factory );
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory();
+ } else {
+ // browser global
+ window.getSize = factory();
+ }
+
+})( window, function factory() {
+'use strict';
+
+// -------------------------- helpers -------------------------- //
+
+// get a number from a string, not a percentage
+function getStyleSize( value ) {
+ var num = parseFloat( value );
+ // not a percent like '100%', and a number
+ var isValid = value.indexOf('%') == -1 && !isNaN( num );
+ return isValid && num;
+}
+
+function noop() {}
+
+var logError = typeof console == 'undefined' ? noop :
+ function( message ) {
+ console.error( message );
+ };
+
+// -------------------------- measurements -------------------------- //
+
+var measurements = [
+ 'paddingLeft',
+ 'paddingRight',
+ 'paddingTop',
+ 'paddingBottom',
+ 'marginLeft',
+ 'marginRight',
+ 'marginTop',
+ 'marginBottom',
+ 'borderLeftWidth',
+ 'borderRightWidth',
+ 'borderTopWidth',
+ 'borderBottomWidth'
+];
+
+var measurementsLength = measurements.length;
+
+function getZeroSize() {
+ var size = {
+ width: 0,
+ height: 0,
+ innerWidth: 0,
+ innerHeight: 0,
+ outerWidth: 0,
+ outerHeight: 0
+ };
+ for ( var i=0; i < measurementsLength; i++ ) {
+ var measurement = measurements[i];
+ size[ measurement ] = 0;
+ }
+ return size;
+}
+
+// -------------------------- getStyle -------------------------- //
+
+/**
+ * getStyle, get style of element, check for Firefox bug
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=548397
+ */
+function getStyle( elem ) {
+ var style = getComputedStyle( elem );
+ if ( !style ) {
+ logError( 'Style returned ' + style +
+ '. Are you running this code in a hidden iframe on Firefox? ' +
+ 'See https://bit.ly/getsizebug1' );
+ }
+ return style;
+}
+
+// -------------------------- setup -------------------------- //
+
+var isSetup = false;
+
+var isBoxSizeOuter;
+
+/**
+ * setup
+ * check isBoxSizerOuter
+ * do on first getSize() rather than on page load for Firefox bug
+ */
+function setup() {
+ // setup once
+ if ( isSetup ) {
+ return;
+ }
+ isSetup = true;
+
+ // -------------------------- box sizing -------------------------- //
+
+ /**
+ * Chrome & Safari measure the outer-width on style.width on border-box elems
+ * IE11 & Firefox<29 measures the inner-width
+ */
+ var div = document.createElement('div');
+ div.style.width = '200px';
+ div.style.padding = '1px 2px 3px 4px';
+ div.style.borderStyle = 'solid';
+ div.style.borderWidth = '1px 2px 3px 4px';
+ div.style.boxSizing = 'border-box';
+
+ var body = document.body || document.documentElement;
+ body.appendChild( div );
+ var style = getStyle( div );
+ // round value for browser zoom. desandro/masonry#928
+ isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;
+ getSize.isBoxSizeOuter = isBoxSizeOuter;
+
+ body.removeChild( div );
+}
+
+// -------------------------- getSize -------------------------- //
+
+function getSize( elem ) {
+ setup();
+
+ // use querySeletor if elem is string
+ if ( typeof elem == 'string' ) {
+ elem = document.querySelector( elem );
+ }
+
+ // do not proceed on non-objects
+ if ( !elem || typeof elem != 'object' || !elem.nodeType ) {
+ return;
+ }
+
+ var style = getStyle( elem );
+
+ // if hidden, everything is 0
+ if ( style.display == 'none' ) {
+ return getZeroSize();
+ }
+
+ var size = {};
+ size.width = elem.offsetWidth;
+ size.height = elem.offsetHeight;
+
+ var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';
+
+ // get all measurements
+ for ( var i=0; i < measurementsLength; i++ ) {
+ var measurement = measurements[i];
+ var value = style[ measurement ];
+ var num = parseFloat( value );
+ // any 'auto', 'medium' value will be 0
+ size[ measurement ] = !isNaN( num ) ? num : 0;
+ }
+
+ var paddingWidth = size.paddingLeft + size.paddingRight;
+ var paddingHeight = size.paddingTop + size.paddingBottom;
+ var marginWidth = size.marginLeft + size.marginRight;
+ var marginHeight = size.marginTop + size.marginBottom;
+ var borderWidth = size.borderLeftWidth + size.borderRightWidth;
+ var borderHeight = size.borderTopWidth + size.borderBottomWidth;
+
+ var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;
+
+ // overwrite width and height if we can get it from style
+ var styleWidth = getStyleSize( style.width );
+ if ( styleWidth !== false ) {
+ size.width = styleWidth +
+ // add padding and border unless it's already including it
+ ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );
+ }
+
+ var styleHeight = getStyleSize( style.height );
+ if ( styleHeight !== false ) {
+ size.height = styleHeight +
+ // add padding and border unless it's already including it
+ ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );
+ }
+
+ size.innerWidth = size.width - ( paddingWidth + borderWidth );
+ size.innerHeight = size.height - ( paddingHeight + borderHeight );
+
+ size.outerWidth = size.width + marginWidth;
+ size.outerHeight = size.height + marginHeight;
+
+ return size;
+}
+
+return getSize;
+
+});
diff --git a/node_modules/get-size/package.json b/node_modules/get-size/package.json
new file mode 100644
index 00000000..9067e197
--- /dev/null
+++ b/node_modules/get-size/package.json
@@ -0,0 +1,54 @@
+{
+ "_from": "get-size@^2.0.3",
+ "_id": "get-size@2.0.3",
+ "_inBundle": false,
+ "_integrity": "sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q==",
+ "_location": "/get-size",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "get-size@^2.0.3",
+ "name": "get-size",
+ "escapedName": "get-size",
+ "rawSpec": "^2.0.3",
+ "saveSpec": null,
+ "fetchSpec": "^2.0.3"
+ },
+ "_requiredBy": [
+ "/flickity"
+ ],
+ "_resolved": "https://registry.npmjs.org/get-size/-/get-size-2.0.3.tgz",
+ "_shasum": "54a1d0256b20ea7ac646516756202769941ad2ef",
+ "_spec": "get-size@^2.0.3",
+ "_where": "/var/www/html/node_modules/flickity",
+ "author": {
+ "name": "David DeSandro"
+ },
+ "bugs": {
+ "url": "https://github.com/desandro/get-size/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {},
+ "deprecated": false,
+ "description": "measures element size",
+ "directories": {
+ "test": "test"
+ },
+ "homepage": "https://github.com/desandro/get-size",
+ "keywords": [
+ "size",
+ "DOM"
+ ],
+ "license": "MIT",
+ "main": "get-size.js",
+ "name": "get-size",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/desandro/get-size.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "2.0.3"
+}
diff --git a/node_modules/get-size/sandbox.html b/node_modules/get-size/sandbox.html
new file mode 100644
index 00000000..19811d0f
--- /dev/null
+++ b/node_modules/get-size/sandbox.html
@@ -0,0 +1,85 @@
+
+
+
+
+
+ getSize
+
+
+
+
+
+
+ getSize
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/get-size/test/iframe.html b/node_modules/get-size/test/iframe.html
new file mode 100644
index 00000000..7ff0d575
--- /dev/null
+++ b/node_modules/get-size/test/iframe.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+ iframe
+
+
+
+
+ iframe
+
+
+
+
+
diff --git a/node_modules/get-size/test/iframe3.html b/node_modules/get-size/test/iframe3.html
new file mode 100644
index 00000000..71351f15
--- /dev/null
+++ b/node_modules/get-size/test/iframe3.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+ iframe3
+
+
+
+
+
+ iframe3
+
+
+
+
+
+
diff --git a/node_modules/get-size/test/iframe4.html b/node_modules/get-size/test/iframe4.html
new file mode 100644
index 00000000..5e7d1aa7
--- /dev/null
+++ b/node_modules/get-size/test/iframe4.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+ iframe4
+
+
+
+
+
+ iframe4
+
+
+
+
+
diff --git a/node_modules/get-size/test/index.html b/node_modules/get-size/test/index.html
new file mode 100644
index 00000000..61166190
--- /dev/null
+++ b/node_modules/get-size/test/index.html
@@ -0,0 +1,69 @@
+
+
+
+
+
+ Get Size Tests
+
+
+
+
+
+
+
+
+
+
+
+
+Get Size Tests
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/node_modules/get-size/test/tests.css b/node_modules/get-size/test/tests.css
new file mode 100644
index 00000000..200e2dde
--- /dev/null
+++ b/node_modules/get-size/test/tests.css
@@ -0,0 +1,95 @@
+body {
+ font-family: sans-serif;
+ width: 400px;
+ padding: 20px;
+}
+
+.container {
+ width: 400px;
+ height: 200px;
+ background: #333;
+ margin-bottom: 20px;
+}
+
+.box {
+ background: #0AE;
+ color: #F90;
+ border-color: #F90;
+}
+
+/* align to right side */
+#qunit {
+ position: absolute;
+ left: 0;
+ top: 20px;
+ margin-left: 440px;
+ margin-right: 10px;
+}
+
+
+/* Boxes
+------------------------- */
+
+#ex2 .box {
+ height: 100%;
+}
+
+#ex3 .box {
+ width: 50%;
+ height: 50%;
+}
+
+#ex4 .box,
+#ex5 .box {
+ width: 200px;
+ height: 100px;
+ border: 10px solid;
+}
+
+
+#ex5 .box {
+ margin: 10px 20px 30px 40px;
+}
+
+#ex6 .box {
+ width: 200px;
+ height: 100px;
+ padding: 10px 20px 30px 40px;
+}
+
+#ex7 .box {
+ height: 100px;
+ padding: 10px 20px 30px 40px;
+}
+
+#ex8 .box {
+ position: relative;
+ width: 66.6666%;
+ height: 66.666%;
+}
+
+/* border box */
+#ex9 .box {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ height: 100%;
+ border-style: solid;
+ border-width: 10px 20px 30px 40px;
+ padding: 10px 20px 30px 40px;
+}
+
+#hidden .box {
+ display: none;
+ width: 200px;
+ height: 100px;
+ padding: 10px 20px 30px 40px;
+ margin: 10px 20px 30px 40px;
+}
+
+#percent .box {
+ width: 200px;
+ height: 100px;
+ margin-top: 20%;
+ margin-left: 10%;
+}
diff --git a/node_modules/get-size/test/tests.js b/node_modules/get-size/test/tests.js
new file mode 100644
index 00000000..34a3d1f8
--- /dev/null
+++ b/node_modules/get-size/test/tests.js
@@ -0,0 +1,156 @@
+/**
+ * getSize tests
+ * with QUnit
+**/
+
+/*jshint browser: true, devel: true, strict: true, undef: true */
+/*global equal: false, getSize: false, ok: false, test: false, strictEqual: false */
+
+( function( window ) {
+
+'use strict';
+
+function getBoxSize( num ) {
+ var box = document.querySelector( '#ex' + num + ' .box' );
+ return getSize( box );
+}
+
+test( 'arguments', function() {
+ ok( !getSize( 0 ), 'Number returns falsey' );
+ ok( !getSize( document.querySelector('#foobabbles') ), 'bad querySelector returns falsey' );
+ ok( getSize('#ex1'), 'query selector string works' );
+});
+
+test( 'ex1: no styling', function() {
+ var size = getBoxSize(1);
+ equal( size.width, 400, 'Inherit container width' );
+ equal( size.height, 0, 'No height' );
+ equal( size.isBorderBox, false, 'isBorderBox' );
+});
+
+test( 'ex2: height: 100%', function() {
+ var size = getBoxSize(2);
+ equal( size.height, 200, 'Inherit height' );
+});
+
+test( 'ex3: width: 50%; height: 50%', function() {
+ var size = getBoxSize(3);
+ equal( size.width, 200, 'half width' );
+ equal( size.height, 100, 'half height' );
+});
+
+test( 'ex4: border: 10px solid', function() {
+ var size = getBoxSize(4);
+ // console.log( size );
+ equal( size.width, 220, 'width = 220 width' );
+ equal( size.height, 120, 'height = 120 height' );
+ equal( size.innerWidth, 200, 'innerWidth = 200 width' );
+ equal( size.innerHeight, 100, 'innerHeight = 200 width' );
+ equal( size.outerWidth, 220, 'outerWidth = 200 width + 10 border + 10 border' );
+ equal( size.outerHeight, 120, 'outerHeight = 100 height + 10 border + 10 border' );
+});
+
+test( 'ex5: border: 10px solid; margin: 15px', function() {
+ // margin: 10px 20px 30px 40px;
+ var size = getBoxSize(5);
+ // console.log( size );
+ equal( size.width, 220, 'width = 220 width' );
+ equal( size.height, 120, 'height = 120 height' );
+ equal( size.marginTop, 10, 'marginTop' );
+ equal( size.marginRight, 20, 'marginRight' );
+ equal( size.marginBottom, 30, 'marginBottom' );
+ equal( size.marginLeft, 40, 'marginLeft ' );
+ equal( size.innerWidth, 200, 'innerWidth = 200 width' );
+ equal( size.innerHeight, 100, 'innerHeight = 200 width' );
+ equal( size.outerWidth, 280, 'outerWidth = 200 width + 20 border + 60 margin' );
+ equal( size.outerHeight, 160, 'outerHeight = 100 height + 20 border + 40 margin' );
+});
+
+test( 'ex6: padding, set width/height', function() {
+ var size = getBoxSize(6);
+ // console.log( size );
+ equal( size.width, 260, 'width' );
+ equal( size.height, 140, 'height' );
+ equal( size.innerWidth, 200, 'innerWidth = 200 width - 20 padding - 40 padding' );
+ equal( size.innerHeight, 100, 'innerHeight = 200 height - 10 padding - 30 padding' );
+ equal( size.outerWidth, 260, 'outerWidth' );
+ equal( size.outerHeight, 140, 'outerHeight' );
+
+});
+
+test( 'ex7: padding, inherit width', function() {
+ // padding: 10px 20px 30px 40px;
+ var size = getBoxSize(7);
+ // console.log( size );
+ equal( size.width, 400, 'width' );
+ equal( size.height, 140, 'height' );
+ equal( size.paddingTop, 10, 'paddingTop' );
+ equal( size.paddingRight, 20, 'paddingRight' );
+ equal( size.paddingBottom, 30, 'paddingBottom' );
+ equal( size.paddingLeft, 40, 'paddingLeft ' );
+ equal( size.innerWidth, 340, 'innerWidth = 400 width - 20 padding - 40 padding' );
+ equal( size.innerHeight, 100, 'innerHeight = 200 height - 10 padding - 30 padding' );
+ equal( size.outerWidth, 400, 'outerWidth' );
+ equal( size.outerHeight, 140, 'outerHeight' );
+
+});
+
+test( 'ex8: 66.666% values', function() {
+ var size = getBoxSize(8);
+
+ if ( size.width % 1 ) {
+ ok( size.width > 266.6 && size.width < 266.7, 'width is between 266.6 and 266.7' );
+ } else {
+ // IE8 and Safari
+ equal( size.width, 267, 'width is 267' );
+ }
+
+ if ( size.height % 1 ) {
+ ok( size.height > 133.3 && size.height < 133.4, 'height is between 133.3 and 133.4' );
+ } else {
+ // IE8
+ equal( size.height, 133, 'width is 133' );
+ }
+});
+
+test( 'ex9: border-box', function() {
+ var size = getBoxSize(9);
+ equal( size.isBorderBox, true, 'isBorderBox' );
+ equal( size.width, 400, 'width' );
+ equal( size.height, 200, 'height' );
+ equal( size.innerWidth, 280, 'innerWidth' );
+ equal( size.innerHeight, 120, 'innerHeight' );
+ equal( size.outerWidth, 400, 'outerWidth' );
+ equal( size.outerHeight, 200, 'outerHeight' );
+});
+
+test( 'display: none', function() {
+ var size = getSize( document.querySelector('#hidden .box1') );
+ strictEqual( size.width, 0, 'width' );
+ strictEqual( size.height, 0, 'height' );
+ strictEqual( size.innerWidth, 0, 'innerWidth' );
+ strictEqual( size.innerHeight, 0, 'innerHeight' );
+ strictEqual( size.outerWidth, 0, 'outerWidth' );
+ strictEqual( size.outerHeight, 0, 'outerHeight' );
+
+ size.width = 300;
+
+ size = getSize( document.querySelector('#hidden .box2') );
+ strictEqual( size.width, 0, 'cannot over write zeroSize' );
+
+});
+
+test( 'percent values', function() {
+ var size = getSize( document.querySelector('#percent .box') );
+ strictEqual( size.marginLeft, 40, 'marginLeft' );
+ strictEqual( size.marginTop, 80, 'marginTop' );
+ strictEqual( size.width, 200, 'width' );
+ strictEqual( size.height, 100, 'height' );
+ strictEqual( size.innerWidth, 200, 'innerWidth' );
+ strictEqual( size.innerHeight, 100, 'innerHeight' );
+ strictEqual( size.outerWidth, 240, 'outerWidth' );
+ strictEqual( size.outerHeight, 180, 'outerHeight' );
+});
+
+
+})( window );
diff --git a/node_modules/normalize.css/CHANGELOG.md b/node_modules/normalize.css/CHANGELOG.md
new file mode 100644
index 00000000..922f6e38
--- /dev/null
+++ b/node_modules/normalize.css/CHANGELOG.md
@@ -0,0 +1,175 @@
+# Changes to normalize.css
+
+### 8.0.1 (November 4, 2018)
+
+* Fix regression in IE rendering of `main` element.
+
+### 8.0.0 (February 2, 2018)
+
+* Remove support for older browsers Android 4, lte IE 9, lte Safari 7.
+* Don't remove search input cancel button in Chrome/Safari.
+* Form inputs inherit `font-family`.
+* Fix text decoration in Safari 8+.
+
+### 7.0.0 (May 2, 2017)
+
+* Revert changes in `body` and form elements styles introduced by v6
+
+### 6.0.0 (March 26, 2017)
+
+* Remove all opinionated rules
+* Correct document heading comment
+* Update `abbr[title]` support
+
+### 5.0.0 (October 3, 2016)
+
+* Add normalized sections not already present from
+ https://html.spec.whatwg.org/multipage/.
+* Move unsorted rules into their respective sections.
+* Update the `summary` style in all browsers.
+* Remove `::placeholder` styles due to a bug in Edge.
+* More explicitly define font resets on form controls.
+* Remove the `optgroup` normalization needed by the previous font reset.
+* Update text-size-adjust documentation
for IE on Windows Phone
+* Update OS X reference to macOS
+* Update the semver strategy.
+
+### 4.2.0 (June 30, 2016)
+
+* Correct the `line-height` in all browsers.
+* Restore `optgroup` font inheritance.
+* Update normalize.css heading.
+
+### 4.1.1 (April 12, 2016)
+
+* Update normalize.css heading.
+
+### 4.1.0 (April 11, 2016)
+
+* Normalize placeholders in Chrome, Edge, and Safari.
+* Normalize `text-decoration-skip` property in Safari.
+* Normalize file select buttons.
+* Normalize search input outlines in Safari.
+* Limit Firefox focus normalizations to buttons.
+* Restore `main` to package.json.
+* Restore proper overflow to certain `select` elements.
+* Remove opinionated cursor styles on buttons.
+* Update stylelint configuration.
+* Update tests.
+
+### 4.0.0 (March 19, 2016)
+
+* Add the correct font weight for `b` and `strong` in Chrome, Edge, and Safari.
+* Correct inconsistent `overflow` for `hr` in Edge and IE.
+* Correct inconsistent `box-sizing` for `hr` in Firefox.
+* Correct inconsistent `text-decoration` and `border-bottom` for `abbr[title]`
+ in Chrome, Edge, Firefox IE, Opera, and Safari.
+* Correct inheritance and scaling of `font-size` for preformatted text.
+* Correct `legend` text wrapping not present in Edge and IE.
+* Remove unnecessary normalization of `line-height` for `input`.
+* Remove unnecessary normalization of `color` for form controls.
+* Remove unnecessary `box-sizing` for `input[type="search"]` in Chrome, Edge,
+ Firefox, IE, and Safari.
+* Remove opinionated table resets.
+* Remove opinionated `pre` overflow.
+* Remove selector weight from some input selectors.
+* Update normalization of `border-style` for `img`.
+* Update normalization of `color` inheritance for `legend`.
+* Update normalization of `background-color` for `mark`.
+* Update normalization of `outline` for `:-moz-focusring` removed by a previous
+ normalization in Firefox.
+* Update opinionated style of `outline-width` for `a:active` and `a:hover`.
+* Update comments to identify opinionated styles.
+* Update comments to specify browser/versions affected by all changes.
+* Update comments to use one voice.
+
+---
+
+### 3.0.3 (March 30, 2015)
+
+* Remove unnecessary vendor prefixes.
+* Add `main` property.
+
+### 3.0.2 (October 4, 2014)
+
+* Only alter `background-color` of links in IE 10.
+* Add `menu` element to HTML5 display definitions.
+
+### 3.0.1 (March 27, 2014)
+
+* Add package.json for npm support.
+
+### 3.0.0 (January 28, 2014)
+
+### 3.0.0-rc.1 (January 26, 2014)
+
+* Explicit tests for each normalization.
+* Fix i18n for `q` element.
+* Fix `pre` text formatting and overflow.
+* Fix vertical alignment of `progress`.
+* Address `button` overflow in IE 8/9/10.
+* Revert `textarea` alignment modification.
+* Fix number input button cursor in Chrome on OS X.
+* Remove `a:focus` outline normalization.
+* Fix `figure` margin normalization.
+* Normalize `optgroup`.
+* Remove default table cell padding.
+* Set correct display for `progress` in IE 8/9.
+* Fix `font` and `color` inheritance for forms.
+
+---
+
+### 2.1.3 (August 26, 2013)
+
+* Fix component.json.
+* Remove the gray background color from active links in IE 10.
+
+### 2.1.2 (May 11, 2013)
+
+* Revert root `color` and `background` normalizations.
+
+### 2.1.1 (April 8, 2013)
+
+* Normalize root `color` and `background` to counter the effects of system
+ color schemes.
+
+### 2.1.0 (January 21, 2013)
+
+* Normalize `text-transform` for `button` and `select`.
+* Normalize `h1` margin when within HTML5 sectioning elements.
+* Normalize `hr` element.
+* Remove unnecessary `pre` styles.
+* Add `main` element to HTML5 display definitions.
+* Fix cursor style for disabled button `input`.
+
+### 2.0.1 (August 20, 2012)
+
+* Remove stray IE 6/7 `inline-block` hack from HTML5 display settings.
+
+### 2.0.0 (August 19, 2012)
+
+* Remove legacy browser form normalizations.
+* Remove all list normalizations.
+* Add `quotes` normalizations.
+* Remove all heading normalizations except `h1` font size.
+* Form elements automatically inherit `font-family` from ancestor.
+* Drop support for IE 6/7, Firefox < 4, and Safari < 5.
+
+---
+
+### 1.0.1 (August 19, 2012)
+
+* Adjust `small` font size normalization.
+
+### 1.0.0 (August 14, 2012)
+
+(Only the notable changes since public release)
+
+* Add MIT License.
+* Hide `audio` elements without controls in iOS 5.
+* Normalize heading margins and font size.
+* Move font-family normalization from `body` to `html`.
+* Remove scrollbar normalization.
+* Remove excess padding from checkbox and radio inputs in IE 7.
+* Add IE9 correction for SVG overflow.
+* Add fix for legend not inheriting color in IE 6/7/8/9.
diff --git a/node_modules/normalize.css/LICENSE.md b/node_modules/normalize.css/LICENSE.md
new file mode 100644
index 00000000..43b5ddcc
--- /dev/null
+++ b/node_modules/normalize.css/LICENSE.md
@@ -0,0 +1,21 @@
+# The MIT License (MIT)
+
+Copyright © Nicolas Gallagher and Jonathan Neal
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/normalize.css/README.md b/node_modules/normalize.css/README.md
new file mode 100644
index 00000000..71954f23
--- /dev/null
+++ b/node_modules/normalize.css/README.md
@@ -0,0 +1,102 @@
+# normalize.css
+
+
+
+> A modern alternative to CSS resets
+
+[![npm][npm-image]][npm-url] [![license][license-image]][license-url]
+[![changelog][changelog-image]][changelog-url]
+[![gitter][gitter-image]][gitter-url]
+
+
+**NPM**
+
+```sh
+npm install --save normalize.css
+```
+
+**CDN**
+
+See https://yarnpkg.com/en/package/normalize.css
+
+**Download**
+
+See https://necolas.github.io/normalize.css/latest/normalize.css
+
+
+## What does it do?
+
+* Preserves useful defaults, unlike many CSS resets.
+* Normalizes styles for a wide range of elements.
+* Corrects bugs and common browser inconsistencies.
+* Improves usability with subtle modifications.
+* Explains what code does using detailed comments.
+
+
+## Browser support
+
+* Chrome
+* Edge
+* Firefox ESR+
+* Internet Explorer 10+
+* Safari 8+
+* Opera
+
+
+## Extended details and known issues
+
+Additional detail and explanation of the esoteric parts of normalize.css.
+
+#### `pre, code, kbd, samp`
+
+The `font-family: monospace, monospace` hack fixes the inheritance and scaling
+of font-size for preformatted text. The duplication of `monospace` is
+intentional. [Source](https://en.wikipedia.org/wiki/User:Davidgothberg/Test59).
+
+#### `sub, sup`
+
+Normally, using `sub` or `sup` affects the line-box height of text in all
+browsers. [Source](https://gist.github.com/413930).
+
+#### `select`
+
+By default, Chrome on OS X and Safari on OS X allow very limited styling of
+`select`, unless a border property is set. The default font weight on `optgroup`
+elements cannot safely be changed in Chrome on OSX and Safari on OS X.
+
+#### `[type="checkbox"]`
+
+It is recommended that you do not style checkbox and radio inputs as Firefox's
+implementation does not respect box-sizing, padding, or width.
+
+#### `[type="number"]`
+
+Certain font size values applied to number inputs cause the cursor style of the
+decrement button to change from `default` to `text`.
+
+#### `[type="search"]`
+
+The search input is not fully stylable by default. In Chrome and Safari on
+OSX/iOS you can't control `font`, `padding`, `border`, or `background`. In
+Chrome and Safari on Windows you can't control `border` properly. It will apply
+`border-width` but will only show a border color (which cannot be controlled)
+for the outer 1px of that border. Applying `-webkit-appearance: textfield`
+addresses these issues without removing the benefits of search inputs (e.g.
+showing past searches).
+
+## Contributing
+
+Please read the [contribution guidelines](CONTRIBUTING.md) in order to make the
+contribution process easy and effective for everyone involved.
+
+
+[changelog-image]: https://img.shields.io/badge/changelog-md-blue.svg?style=flat-square
+[changelog-url]: CHANGELOG.md
+[license-image]: https://img.shields.io/npm/l/normalize.css.svg?style=flat-square
+[license-url]: LICENSE.md
+[npm-image]: https://img.shields.io/npm/v/normalize.css.svg?style=flat-square
+[npm-url]: https://www.npmjs.com/package/normalize.css
+[gitter-image]: https://img.shields.io/badge/chat-gitter-blue.svg?style=flat-square
+[gitter-url]: https://gitter.im/necolas/normalize.css
diff --git a/node_modules/normalize.css/normalize.css b/node_modules/normalize.css/normalize.css
new file mode 100644
index 00000000..192eb9ce
--- /dev/null
+++ b/node_modules/normalize.css/normalize.css
@@ -0,0 +1,349 @@
+/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
+
+/* Document
+ ========================================================================== */
+
+/**
+ * 1. Correct the line height in all browsers.
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
+ */
+
+html {
+ line-height: 1.15; /* 1 */
+ -webkit-text-size-adjust: 100%; /* 2 */
+}
+
+/* Sections
+ ========================================================================== */
+
+/**
+ * Remove the margin in all browsers.
+ */
+
+body {
+ margin: 0;
+}
+
+/**
+ * Render the `main` element consistently in IE.
+ */
+
+main {
+ display: block;
+}
+
+/**
+ * Correct the font size and margin on `h1` elements within `section` and
+ * `article` contexts in Chrome, Firefox, and Safari.
+ */
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+/* Grouping content
+ ========================================================================== */
+
+/**
+ * 1. Add the correct box sizing in Firefox.
+ * 2. Show the overflow in Edge and IE.
+ */
+
+hr {
+ box-sizing: content-box; /* 1 */
+ height: 0; /* 1 */
+ overflow: visible; /* 2 */
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+pre {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/* Text-level semantics
+ ========================================================================== */
+
+/**
+ * Remove the gray background on active links in IE 10.
+ */
+
+a {
+ background-color: transparent;
+}
+
+/**
+ * 1. Remove the bottom border in Chrome 57-
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
+ */
+
+abbr[title] {
+ border-bottom: none; /* 1 */
+ text-decoration: underline; /* 2 */
+ text-decoration: underline dotted; /* 2 */
+}
+
+/**
+ * Add the correct font weight in Chrome, Edge, and Safari.
+ */
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+/**
+ * 1. Correct the inheritance and scaling of font size in all browsers.
+ * 2. Correct the odd `em` font sizing in all browsers.
+ */
+
+code,
+kbd,
+samp {
+ font-family: monospace, monospace; /* 1 */
+ font-size: 1em; /* 2 */
+}
+
+/**
+ * Add the correct font size in all browsers.
+ */
+
+small {
+ font-size: 80%;
+}
+
+/**
+ * Prevent `sub` and `sup` elements from affecting the line height in
+ * all browsers.
+ */
+
+sub,
+sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -0.25em;
+}
+
+sup {
+ top: -0.5em;
+}
+
+/* Embedded content
+ ========================================================================== */
+
+/**
+ * Remove the border on images inside links in IE 10.
+ */
+
+img {
+ border-style: none;
+}
+
+/* Forms
+ ========================================================================== */
+
+/**
+ * 1. Change the font styles in all browsers.
+ * 2. Remove the margin in Firefox and Safari.
+ */
+
+button,
+input,
+optgroup,
+select,
+textarea {
+ font-family: inherit; /* 1 */
+ font-size: 100%; /* 1 */
+ line-height: 1.15; /* 1 */
+ margin: 0; /* 2 */
+}
+
+/**
+ * Show the overflow in IE.
+ * 1. Show the overflow in Edge.
+ */
+
+button,
+input { /* 1 */
+ overflow: visible;
+}
+
+/**
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
+ * 1. Remove the inheritance of text transform in Firefox.
+ */
+
+button,
+select { /* 1 */
+ text-transform: none;
+}
+
+/**
+ * Correct the inability to style clickable types in iOS and Safari.
+ */
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+
+/**
+ * Remove the inner border and padding in Firefox.
+ */
+
+button::-moz-focus-inner,
+[type="button"]::-moz-focus-inner,
+[type="reset"]::-moz-focus-inner,
+[type="submit"]::-moz-focus-inner {
+ border-style: none;
+ padding: 0;
+}
+
+/**
+ * Restore the focus styles unset by the previous rule.
+ */
+
+button:-moz-focusring,
+[type="button"]:-moz-focusring,
+[type="reset"]:-moz-focusring,
+[type="submit"]:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+/**
+ * Correct the padding in Firefox.
+ */
+
+fieldset {
+ padding: 0.35em 0.75em 0.625em;
+}
+
+/**
+ * 1. Correct the text wrapping in Edge and IE.
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
+ * 3. Remove the padding so developers are not caught out when they zero out
+ * `fieldset` elements in all browsers.
+ */
+
+legend {
+ box-sizing: border-box; /* 1 */
+ color: inherit; /* 2 */
+ display: table; /* 1 */
+ max-width: 100%; /* 1 */
+ padding: 0; /* 3 */
+ white-space: normal; /* 1 */
+}
+
+/**
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
+ */
+
+progress {
+ vertical-align: baseline;
+}
+
+/**
+ * Remove the default vertical scrollbar in IE 10+.
+ */
+
+textarea {
+ overflow: auto;
+}
+
+/**
+ * 1. Add the correct box sizing in IE 10.
+ * 2. Remove the padding in IE 10.
+ */
+
+[type="checkbox"],
+[type="radio"] {
+ box-sizing: border-box; /* 1 */
+ padding: 0; /* 2 */
+}
+
+/**
+ * Correct the cursor style of increment and decrement buttons in Chrome.
+ */
+
+[type="number"]::-webkit-inner-spin-button,
+[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+
+/**
+ * 1. Correct the odd appearance in Chrome and Safari.
+ * 2. Correct the outline style in Safari.
+ */
+
+[type="search"] {
+ -webkit-appearance: textfield; /* 1 */
+ outline-offset: -2px; /* 2 */
+}
+
+/**
+ * Remove the inner padding in Chrome and Safari on macOS.
+ */
+
+[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+/**
+ * 1. Correct the inability to style clickable types in iOS and Safari.
+ * 2. Change font properties to `inherit` in Safari.
+ */
+
+::-webkit-file-upload-button {
+ -webkit-appearance: button; /* 1 */
+ font: inherit; /* 2 */
+}
+
+/* Interactive
+ ========================================================================== */
+
+/*
+ * Add the correct display in Edge, IE 10+, and Firefox.
+ */
+
+details {
+ display: block;
+}
+
+/*
+ * Add the correct display in all browsers.
+ */
+
+summary {
+ display: list-item;
+}
+
+/* Misc
+ ========================================================================== */
+
+/**
+ * Add the correct display in IE 10+.
+ */
+
+template {
+ display: none;
+}
+
+/**
+ * Add the correct display in IE 10.
+ */
+
+[hidden] {
+ display: none;
+}
diff --git a/node_modules/normalize.css/package.json b/node_modules/normalize.css/package.json
new file mode 100644
index 00000000..894c8fea
--- /dev/null
+++ b/node_modules/normalize.css/package.json
@@ -0,0 +1,46 @@
+{
+ "_from": "normalize.css",
+ "_id": "normalize.css@8.0.1",
+ "_inBundle": false,
+ "_integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==",
+ "_location": "/normalize.css",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "tag",
+ "registry": true,
+ "raw": "normalize.css",
+ "name": "normalize.css",
+ "escapedName": "normalize.css",
+ "rawSpec": "",
+ "saveSpec": null,
+ "fetchSpec": "latest"
+ },
+ "_requiredBy": [
+ "#USER",
+ "/"
+ ],
+ "_resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz",
+ "_shasum": "9b98a208738b9cc2634caacbc42d131c97487bf3",
+ "_spec": "normalize.css",
+ "_where": "/var/www/html",
+ "bugs": {
+ "url": "https://github.com/necolas/normalize.css/issues"
+ },
+ "bundleDependencies": false,
+ "deprecated": false,
+ "description": "A modern alternative to CSS resets",
+ "files": [
+ "LICENSE.md",
+ "normalize.css"
+ ],
+ "homepage": "https://necolas.github.io/normalize.css",
+ "license": "MIT",
+ "main": "normalize.css",
+ "name": "normalize.css",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/necolas/normalize.css.git"
+ },
+ "style": "normalize.css",
+ "version": "8.0.1"
+}
diff --git a/node_modules/unidragger/README.md b/node_modules/unidragger/README.md
new file mode 100644
index 00000000..42dd6446
--- /dev/null
+++ b/node_modules/unidragger/README.md
@@ -0,0 +1,57 @@
+# Unidragger
+
+_Base draggable class_
+
+Used in [Flickity](http://flickity.metafizzy.co) and [Draggabilly](http://draggabilly.desandro.com).
+
+Unidragger handles all the event binding and handling to support a draggable library.
+
+## Features
+
++ Touch device support: iOS, Android, Microsoft Surface
++ Handles click events in `input` elements
+
+## Install
+
+Bower: `bower install unidragger --save`
+
+npm: `npm install unidragger --save`
+
+## Demo code
+
+``` js
+// your draggable class
+function Dragger( elem ) {
+ this.element = elem;
+}
+
+// use Unidragger as a mixin
+extend( Dragger.prototype, Unidragger.prototype );
+
+Dragger.prototype.create = function() {
+ // set drag handles
+ this.handles = [ this.element ];
+ this.bindHandles();
+};
+
+Dragger.prototype.dragStart = function( event, pointer ) {
+ console.log('drag start');
+};
+
+Dragger.prototype.dragMove = function( event, pointer, moveVector ) {
+ var dragX = this.dragStartPoint.x + moveVector.x;
+ var dragY = this.dragStartPoint.y + moveVector.y;
+ this.element.style.left = dragX + 'px';
+ this.element.style.top = dragY + 'px';
+};
+
+Dragger.prototype.dragEnd = function( event, pointer ) {
+ console.log('drag end');
+};
+```
+
+---
+
+MIT license
+
+By [Metafizzy 🌈🐻](https://metafizzy.co)
diff --git a/node_modules/unidragger/bower.json b/node_modules/unidragger/bower.json
new file mode 100644
index 00000000..3cb27e0c
--- /dev/null
+++ b/node_modules/unidragger/bower.json
@@ -0,0 +1,30 @@
+{
+ "name": "unidragger",
+ "main": "unidragger.js",
+ "dependencies": {
+ "unipointer": "^2.3.0"
+ },
+ "authors": [
+ "David DeSandro "
+ ],
+ "description": "Draggable base class",
+ "moduleType": [
+ "amd",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "draggable",
+ "flickity",
+ "draggabilly"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests",
+ "package.json"
+ ]
+}
diff --git a/node_modules/unidragger/package.json b/node_modules/unidragger/package.json
new file mode 100644
index 00000000..39533ca6
--- /dev/null
+++ b/node_modules/unidragger/package.json
@@ -0,0 +1,57 @@
+{
+ "_from": "unidragger@^2.3.0",
+ "_id": "unidragger@2.3.1",
+ "_inBundle": false,
+ "_integrity": "sha512-u+IgG7AG0MXJTKcdzAIYxCm+W5FcnA9M28203Awl6jIcE3/+9OtEyUX4Wv64y7XNKEVRKPot52IV4V6x7FlF5Q==",
+ "_location": "/unidragger",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unidragger@^2.3.0",
+ "name": "unidragger",
+ "escapedName": "unidragger",
+ "rawSpec": "^2.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.3.0"
+ },
+ "_requiredBy": [
+ "/flickity"
+ ],
+ "_resolved": "https://registry.npmjs.org/unidragger/-/unidragger-2.3.1.tgz",
+ "_shasum": "2e8c34feff61affa96dc895234ddfc1ea4ec7515",
+ "_spec": "unidragger@^2.3.0",
+ "_where": "/var/www/html/node_modules/flickity",
+ "author": {
+ "name": "David DeSandro"
+ },
+ "bugs": {
+ "url": "https://github.com/metafizzy/unidragger/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "unipointer": "^2.3.0"
+ },
+ "deprecated": false,
+ "description": "Base draggable class",
+ "devDependencies": {},
+ "homepage": "https://github.com/metafizzy/unidragger",
+ "keywords": [
+ "draggable",
+ "flickity",
+ "draggabilly",
+ "browser",
+ "dom"
+ ],
+ "license": "MIT",
+ "main": "unidragger.js",
+ "name": "unidragger",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/metafizzy/unidragger.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "2.3.1"
+}
diff --git a/node_modules/unidragger/unidragger.js b/node_modules/unidragger/unidragger.js
new file mode 100644
index 00000000..f2f56664
--- /dev/null
+++ b/node_modules/unidragger/unidragger.js
@@ -0,0 +1,283 @@
+/*!
+ * Unidragger v2.3.1
+ * Draggable base class
+ * MIT license
+ */
+
+/*jshint browser: true, unused: true, undef: true, strict: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /*jshint strict: false */ /*globals define, module, require */
+
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'unipointer/unipointer'
+ ], function( Unipointer ) {
+ return factory( window, Unipointer );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('unipointer')
+ );
+ } else {
+ // browser global
+ window.Unidragger = factory(
+ window,
+ window.Unipointer
+ );
+ }
+
+}( window, function factory( window, Unipointer ) {
+
+'use strict';
+
+// -------------------------- Unidragger -------------------------- //
+
+function Unidragger() {}
+
+// inherit Unipointer & EvEmitter
+var proto = Unidragger.prototype = Object.create( Unipointer.prototype );
+
+// ----- bind start ----- //
+
+proto.bindHandles = function() {
+ this._bindHandles( true );
+};
+
+proto.unbindHandles = function() {
+ this._bindHandles( false );
+};
+
+/**
+ * Add or remove start event
+ * @param {Boolean} isAdd
+ */
+proto._bindHandles = function( isAdd ) {
+ // munge isAdd, default to true
+ isAdd = isAdd === undefined ? true : isAdd;
+ // bind each handle
+ var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
+ var touchAction = isAdd ? this._touchActionValue : '';
+ for ( var i=0; i < this.handles.length; i++ ) {
+ var handle = this.handles[i];
+ this._bindStartEvent( handle, isAdd );
+ handle[ bindMethod ]( 'click', this );
+ // touch-action: none to override browser touch gestures. metafizzy/flickity#540
+ if ( window.PointerEvent ) {
+ handle.style.touchAction = touchAction;
+ }
+ }
+};
+
+// prototype so it can be overwriteable by Flickity
+proto._touchActionValue = 'none';
+
+// ----- start event ----- //
+
+/**
+ * pointer start
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto.pointerDown = function( event, pointer ) {
+ var isOkay = this.okayPointerDown( event );
+ if ( !isOkay ) {
+ return;
+ }
+ // track start event position
+ // Safari 9 overrides pageX and pageY. These values needs to be copied. flickity#842
+ this.pointerDownPointer = {
+ pageX: pointer.pageX,
+ pageY: pointer.pageY,
+ };
+
+ event.preventDefault();
+ this.pointerDownBlur();
+ // bind move and end events
+ this._bindPostStartEvents( event );
+ this.emitEvent( 'pointerDown', [ event, pointer ] );
+};
+
+// nodes that have text fields
+var cursorNodes = {
+ TEXTAREA: true,
+ INPUT: true,
+ SELECT: true,
+ OPTION: true,
+};
+
+// input types that do not have text fields
+var clickTypes = {
+ radio: true,
+ checkbox: true,
+ button: true,
+ submit: true,
+ image: true,
+ file: true,
+};
+
+// dismiss inputs with text fields. flickity#403, flickity#404
+proto.okayPointerDown = function( event ) {
+ var isCursorNode = cursorNodes[ event.target.nodeName ];
+ var isClickType = clickTypes[ event.target.type ];
+ var isOkay = !isCursorNode || isClickType;
+ if ( !isOkay ) {
+ this._pointerReset();
+ }
+ return isOkay;
+};
+
+// kludge to blur previously focused input
+proto.pointerDownBlur = function() {
+ var focused = document.activeElement;
+ // do not blur body for IE10, metafizzy/flickity#117
+ var canBlur = focused && focused.blur && focused != document.body;
+ if ( canBlur ) {
+ focused.blur();
+ }
+};
+
+// ----- move event ----- //
+
+/**
+ * drag move
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto.pointerMove = function( event, pointer ) {
+ var moveVector = this._dragPointerMove( event, pointer );
+ this.emitEvent( 'pointerMove', [ event, pointer, moveVector ] );
+ this._dragMove( event, pointer, moveVector );
+};
+
+// base pointer move logic
+proto._dragPointerMove = function( event, pointer ) {
+ var moveVector = {
+ x: pointer.pageX - this.pointerDownPointer.pageX,
+ y: pointer.pageY - this.pointerDownPointer.pageY
+ };
+ // start drag if pointer has moved far enough to start drag
+ if ( !this.isDragging && this.hasDragStarted( moveVector ) ) {
+ this._dragStart( event, pointer );
+ }
+ return moveVector;
+};
+
+// condition if pointer has moved far enough to start drag
+proto.hasDragStarted = function( moveVector ) {
+ return Math.abs( moveVector.x ) > 3 || Math.abs( moveVector.y ) > 3;
+};
+
+// ----- end event ----- //
+
+/**
+ * pointer up
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto.pointerUp = function( event, pointer ) {
+ this.emitEvent( 'pointerUp', [ event, pointer ] );
+ this._dragPointerUp( event, pointer );
+};
+
+proto._dragPointerUp = function( event, pointer ) {
+ if ( this.isDragging ) {
+ this._dragEnd( event, pointer );
+ } else {
+ // pointer didn't move enough for drag to start
+ this._staticClick( event, pointer );
+ }
+};
+
+// -------------------------- drag -------------------------- //
+
+// dragStart
+proto._dragStart = function( event, pointer ) {
+ this.isDragging = true;
+ // prevent clicks
+ this.isPreventingClicks = true;
+ this.dragStart( event, pointer );
+};
+
+proto.dragStart = function( event, pointer ) {
+ this.emitEvent( 'dragStart', [ event, pointer ] );
+};
+
+// dragMove
+proto._dragMove = function( event, pointer, moveVector ) {
+ // do not drag if not dragging yet
+ if ( !this.isDragging ) {
+ return;
+ }
+
+ this.dragMove( event, pointer, moveVector );
+};
+
+proto.dragMove = function( event, pointer, moveVector ) {
+ event.preventDefault();
+ this.emitEvent( 'dragMove', [ event, pointer, moveVector ] );
+};
+
+// dragEnd
+proto._dragEnd = function( event, pointer ) {
+ // set flags
+ this.isDragging = false;
+ // re-enable clicking async
+ setTimeout( function() {
+ delete this.isPreventingClicks;
+ }.bind( this ) );
+
+ this.dragEnd( event, pointer );
+};
+
+proto.dragEnd = function( event, pointer ) {
+ this.emitEvent( 'dragEnd', [ event, pointer ] );
+};
+
+// ----- onclick ----- //
+
+// handle all clicks and prevent clicks when dragging
+proto.onclick = function( event ) {
+ if ( this.isPreventingClicks ) {
+ event.preventDefault();
+ }
+};
+
+// ----- staticClick ----- //
+
+// triggered after pointer down & up with no/tiny movement
+proto._staticClick = function( event, pointer ) {
+ // ignore emulated mouse up clicks
+ if ( this.isIgnoringMouseUp && event.type == 'mouseup' ) {
+ return;
+ }
+
+ this.staticClick( event, pointer );
+
+ // set flag for emulated clicks 300ms after touchend
+ if ( event.type != 'mouseup' ) {
+ this.isIgnoringMouseUp = true;
+ // reset flag after 300ms
+ setTimeout( function() {
+ delete this.isIgnoringMouseUp;
+ }.bind( this ), 400 );
+ }
+};
+
+proto.staticClick = function( event, pointer ) {
+ this.emitEvent( 'staticClick', [ event, pointer ] );
+};
+
+// ----- utils ----- //
+
+Unidragger.getPointerPoint = Unipointer.getPointerPoint;
+
+// ----- ----- //
+
+return Unidragger;
+
+}));
diff --git a/node_modules/unipointer/README.md b/node_modules/unipointer/README.md
new file mode 100644
index 00000000..764638d9
--- /dev/null
+++ b/node_modules/unipointer/README.md
@@ -0,0 +1,52 @@
+# Unipointer
+
+Base class for doing one thing with pointer event
+
+Used with [Unidragger](https://github.com/metafizzy/unidragger) and [TapListener](https://github.com/metafizzy/tap-listener)
+
+## Install
+
+Bower: `bower install unipointer`
+
+npm: `npm install unipointer`
+
+## Usage
+
+``` js
+// create new class
+function PointerFun( elem ) {
+ this.element = elem;
+ // binds mousedown/touchstart/pointerdown event
+ this._bindStartEvent( this.element, true );
+}
+// inherit Unipointer
+PointerFun.prototype = new Unipointer();
+
+// overwrite public pointer methods
+PointerFun.prototype.pointerDown = function( event, pointer ) {
+ console.log('pointer down');
+};
+
+PointerFun.prototype.pointerMove = function( event, pointer ) {
+ console.log('pointer move');
+};
+
+PointerFun.prototype.pointerUp = function( event, pointer ) {
+ console.log('pointer up');
+};
+
+PointerFun.prototype.pointerCancel = function( event, pointer ) {
+ console.log('pointer cancel');
+};
+
+// triggered on pointerUp and pointerCancel
+PointerFun.prototype.pointerDone = function( event, pointer ) {
+ console.log('pointer done');
+};
+```
+
+---
+
+MIT license
+
+By [Metafizzy](https://metafizzy.co)
diff --git a/node_modules/unipointer/bower.json b/node_modules/unipointer/bower.json
new file mode 100644
index 00000000..8912a0d1
--- /dev/null
+++ b/node_modules/unipointer/bower.json
@@ -0,0 +1,31 @@
+{
+ "name": "unipointer",
+ "main": "unipointer.js",
+ "dependencies": {
+ "ev-emitter": "^1.0.1"
+ },
+ "homepage": "https://github.com/metafizzy/unipointer",
+ "authors": [
+ "David DeSandro "
+ ],
+ "description": "Do one thing with one pointer",
+ "moduleType": [
+ "amd",
+ "globals",
+ "node"
+ ],
+ "keywords": [
+ "pointer",
+ "touch",
+ "mouse"
+ ],
+ "license": "MIT",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "test",
+ "tests",
+ "package.json"
+ ]
+}
diff --git a/node_modules/unipointer/package.json b/node_modules/unipointer/package.json
new file mode 100644
index 00000000..440bffe6
--- /dev/null
+++ b/node_modules/unipointer/package.json
@@ -0,0 +1,57 @@
+{
+ "_from": "unipointer@^2.3.0",
+ "_id": "unipointer@2.3.0",
+ "_inBundle": false,
+ "_integrity": "sha512-m85sAoELCZhogI1owtJV3Dva7GxkHk2lI7A0otw3o0OwCuC/Q9gi7ehddigEYIAYbhkqNdri+dU1QQkrcBvirQ==",
+ "_location": "/unipointer",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "range",
+ "registry": true,
+ "raw": "unipointer@^2.3.0",
+ "name": "unipointer",
+ "escapedName": "unipointer",
+ "rawSpec": "^2.3.0",
+ "saveSpec": null,
+ "fetchSpec": "^2.3.0"
+ },
+ "_requiredBy": [
+ "/flickity",
+ "/unidragger"
+ ],
+ "_resolved": "https://registry.npmjs.org/unipointer/-/unipointer-2.3.0.tgz",
+ "_shasum": "ba0dc462ce31c2a88e80810e19c3bae0ce47ed9f",
+ "_spec": "unipointer@^2.3.0",
+ "_where": "/var/www/html/node_modules/flickity",
+ "author": {
+ "name": "David DeSandro"
+ },
+ "bugs": {
+ "url": "https://github.com/metafizzy/unipointer/issues"
+ },
+ "bundleDependencies": false,
+ "dependencies": {
+ "ev-emitter": "^1.0.1"
+ },
+ "deprecated": false,
+ "description": "Do one thing with one pointer",
+ "homepage": "https://github.com/metafizzy/unipointer",
+ "keywords": [
+ "pointer",
+ "touch",
+ "mouse",
+ "browser",
+ "DOM"
+ ],
+ "license": "MIT",
+ "main": "unipointer.js",
+ "name": "unipointer",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/metafizzy/unipointer.git"
+ },
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "version": "2.3.0"
+}
diff --git a/node_modules/unipointer/unipointer.js b/node_modules/unipointer/unipointer.js
new file mode 100644
index 00000000..84026588
--- /dev/null
+++ b/node_modules/unipointer/unipointer.js
@@ -0,0 +1,301 @@
+/*!
+ * Unipointer v2.3.0
+ * base class for doing one thing with pointer event
+ * MIT license
+ */
+
+/*jshint browser: true, undef: true, unused: true, strict: true */
+
+( function( window, factory ) {
+ // universal module definition
+ /* jshint strict: false */ /*global define, module, require */
+ if ( typeof define == 'function' && define.amd ) {
+ // AMD
+ define( [
+ 'ev-emitter/ev-emitter'
+ ], function( EvEmitter ) {
+ return factory( window, EvEmitter );
+ });
+ } else if ( typeof module == 'object' && module.exports ) {
+ // CommonJS
+ module.exports = factory(
+ window,
+ require('ev-emitter')
+ );
+ } else {
+ // browser global
+ window.Unipointer = factory(
+ window,
+ window.EvEmitter
+ );
+ }
+
+}( window, function factory( window, EvEmitter ) {
+
+'use strict';
+
+function noop() {}
+
+function Unipointer() {}
+
+// inherit EvEmitter
+var proto = Unipointer.prototype = Object.create( EvEmitter.prototype );
+
+proto.bindStartEvent = function( elem ) {
+ this._bindStartEvent( elem, true );
+};
+
+proto.unbindStartEvent = function( elem ) {
+ this._bindStartEvent( elem, false );
+};
+
+/**
+ * Add or remove start event
+ * @param {Boolean} isAdd - remove if falsey
+ */
+proto._bindStartEvent = function( elem, isAdd ) {
+ // munge isAdd, default to true
+ isAdd = isAdd === undefined ? true : isAdd;
+ var bindMethod = isAdd ? 'addEventListener' : 'removeEventListener';
+
+ // default to mouse events
+ var startEvent = 'mousedown';
+ if ( window.PointerEvent ) {
+ // Pointer Events
+ startEvent = 'pointerdown';
+ } else if ( 'ontouchstart' in window ) {
+ // Touch Events. iOS Safari
+ startEvent = 'touchstart';
+ }
+ elem[ bindMethod ]( startEvent, this );
+};
+
+// trigger handler methods for events
+proto.handleEvent = function( event ) {
+ var method = 'on' + event.type;
+ if ( this[ method ] ) {
+ this[ method ]( event );
+ }
+};
+
+// returns the touch that we're keeping track of
+proto.getTouch = function( touches ) {
+ for ( var i=0; i < touches.length; i++ ) {
+ var touch = touches[i];
+ if ( touch.identifier == this.pointerIdentifier ) {
+ return touch;
+ }
+ }
+};
+
+// ----- start event ----- //
+
+proto.onmousedown = function( event ) {
+ // dismiss clicks from right or middle buttons
+ var button = event.button;
+ if ( button && ( button !== 0 && button !== 1 ) ) {
+ return;
+ }
+ this._pointerDown( event, event );
+};
+
+proto.ontouchstart = function( event ) {
+ this._pointerDown( event, event.changedTouches[0] );
+};
+
+proto.onpointerdown = function( event ) {
+ this._pointerDown( event, event );
+};
+
+/**
+ * pointer start
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ */
+proto._pointerDown = function( event, pointer ) {
+ // dismiss right click and other pointers
+ // button = 0 is okay, 1-4 not
+ if ( event.button || this.isPointerDown ) {
+ return;
+ }
+
+ this.isPointerDown = true;
+ // save pointer identifier to match up touch events
+ this.pointerIdentifier = pointer.pointerId !== undefined ?
+ // pointerId for pointer events, touch.indentifier for touch events
+ pointer.pointerId : pointer.identifier;
+
+ this.pointerDown( event, pointer );
+};
+
+proto.pointerDown = function( event, pointer ) {
+ this._bindPostStartEvents( event );
+ this.emitEvent( 'pointerDown', [ event, pointer ] );
+};
+
+// hash of events to be bound after start event
+var postStartEvents = {
+ mousedown: [ 'mousemove', 'mouseup' ],
+ touchstart: [ 'touchmove', 'touchend', 'touchcancel' ],
+ pointerdown: [ 'pointermove', 'pointerup', 'pointercancel' ],
+};
+
+proto._bindPostStartEvents = function( event ) {
+ if ( !event ) {
+ return;
+ }
+ // get proper events to match start event
+ var events = postStartEvents[ event.type ];
+ // bind events to node
+ events.forEach( function( eventName ) {
+ window.addEventListener( eventName, this );
+ }, this );
+ // save these arguments
+ this._boundPointerEvents = events;
+};
+
+proto._unbindPostStartEvents = function() {
+ // check for _boundEvents, in case dragEnd triggered twice (old IE8 bug)
+ if ( !this._boundPointerEvents ) {
+ return;
+ }
+ this._boundPointerEvents.forEach( function( eventName ) {
+ window.removeEventListener( eventName, this );
+ }, this );
+
+ delete this._boundPointerEvents;
+};
+
+// ----- move event ----- //
+
+proto.onmousemove = function( event ) {
+ this._pointerMove( event, event );
+};
+
+proto.onpointermove = function( event ) {
+ if ( event.pointerId == this.pointerIdentifier ) {
+ this._pointerMove( event, event );
+ }
+};
+
+proto.ontouchmove = function( event ) {
+ var touch = this.getTouch( event.changedTouches );
+ if ( touch ) {
+ this._pointerMove( event, touch );
+ }
+};
+
+/**
+ * pointer move
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ * @private
+ */
+proto._pointerMove = function( event, pointer ) {
+ this.pointerMove( event, pointer );
+};
+
+// public
+proto.pointerMove = function( event, pointer ) {
+ this.emitEvent( 'pointerMove', [ event, pointer ] );
+};
+
+// ----- end event ----- //
+
+
+proto.onmouseup = function( event ) {
+ this._pointerUp( event, event );
+};
+
+proto.onpointerup = function( event ) {
+ if ( event.pointerId == this.pointerIdentifier ) {
+ this._pointerUp( event, event );
+ }
+};
+
+proto.ontouchend = function( event ) {
+ var touch = this.getTouch( event.changedTouches );
+ if ( touch ) {
+ this._pointerUp( event, touch );
+ }
+};
+
+/**
+ * pointer up
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ * @private
+ */
+proto._pointerUp = function( event, pointer ) {
+ this._pointerDone();
+ this.pointerUp( event, pointer );
+};
+
+// public
+proto.pointerUp = function( event, pointer ) {
+ this.emitEvent( 'pointerUp', [ event, pointer ] );
+};
+
+// ----- pointer done ----- //
+
+// triggered on pointer up & pointer cancel
+proto._pointerDone = function() {
+ this._pointerReset();
+ this._unbindPostStartEvents();
+ this.pointerDone();
+};
+
+proto._pointerReset = function() {
+ // reset properties
+ this.isPointerDown = false;
+ delete this.pointerIdentifier;
+};
+
+proto.pointerDone = noop;
+
+// ----- pointer cancel ----- //
+
+proto.onpointercancel = function( event ) {
+ if ( event.pointerId == this.pointerIdentifier ) {
+ this._pointerCancel( event, event );
+ }
+};
+
+proto.ontouchcancel = function( event ) {
+ var touch = this.getTouch( event.changedTouches );
+ if ( touch ) {
+ this._pointerCancel( event, touch );
+ }
+};
+
+/**
+ * pointer cancel
+ * @param {Event} event
+ * @param {Event or Touch} pointer
+ * @private
+ */
+proto._pointerCancel = function( event, pointer ) {
+ this._pointerDone();
+ this.pointerCancel( event, pointer );
+};
+
+// public
+proto.pointerCancel = function( event, pointer ) {
+ this.emitEvent( 'pointerCancel', [ event, pointer ] );
+};
+
+// ----- ----- //
+
+// utility function for getting x/y coords from event
+Unipointer.getPointerPoint = function( pointer ) {
+ return {
+ x: pointer.pageX,
+ y: pointer.pageY
+ };
+};
+
+// ----- ----- //
+
+return Unipointer;
+
+}));
diff --git a/package-lock.json b/package-lock.json
old mode 100644
new mode 100755
index 61196527..4eae5e53
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,11 +1,65 @@
{
- "requires": true,
+ "name": "la_mine",
+ "version": "1.0.0",
"lockfileVersion": 1,
+ "requires": true,
"dependencies": {
- "bootstrap": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.0.tgz",
- "integrity": "sha512-Z93QoXvodoVslA+PWNdk23Hze4RBYIkpb5h8I2HY2Tu2h7A0LpAgLcyrhrSUyo2/Oxm2l1fRZPs1e5hnxnliXA=="
+ "desandro-matches-selector": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/desandro-matches-selector/-/desandro-matches-selector-2.0.2.tgz",
+ "integrity": "sha1-cXvu1NwT59jzdi9wem1YpndCGOE="
+ },
+ "ev-emitter": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ev-emitter/-/ev-emitter-1.1.1.tgz",
+ "integrity": "sha512-ipiDYhdQSCZ4hSbX4rMW+XzNKMD1prg/sTvoVmSLkuQ1MVlwjJQQA+sW8tMYR3BLUr9KjodFV4pvzunvRhd33Q=="
+ },
+ "fizzy-ui-utils": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/fizzy-ui-utils/-/fizzy-ui-utils-2.0.7.tgz",
+ "integrity": "sha512-CZXDVXQ1If3/r8s0T+v+qVeMshhfcuq0rqIFgJnrtd+Bu8GmDmqMjntjUePypVtjHXKJ6V4sw9zeyox34n9aCg==",
+ "requires": {
+ "desandro-matches-selector": "^2.0.0"
+ }
+ },
+ "flickity": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/flickity/-/flickity-2.2.1.tgz",
+ "integrity": "sha512-fCZJGNqabgDrIhaUBqt2ydE8c5V6iiB3KQAf6dH3Z45MoDUm7g6+uZmteN0aLV9pzVItNqCbfOJQjsJM/rHuSA==",
+ "requires": {
+ "desandro-matches-selector": "^2.0.0",
+ "ev-emitter": "^1.1.1",
+ "fizzy-ui-utils": "^2.0.7",
+ "get-size": "^2.0.3",
+ "unidragger": "^2.3.0",
+ "unipointer": "^2.3.0"
+ }
+ },
+ "get-size": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/get-size/-/get-size-2.0.3.tgz",
+ "integrity": "sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q=="
+ },
+ "normalize.css": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/normalize.css/-/normalize.css-8.0.1.tgz",
+ "integrity": "sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg=="
+ },
+ "unidragger": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/unidragger/-/unidragger-2.3.1.tgz",
+ "integrity": "sha512-u+IgG7AG0MXJTKcdzAIYxCm+W5FcnA9M28203Awl6jIcE3/+9OtEyUX4Wv64y7XNKEVRKPot52IV4V6x7FlF5Q==",
+ "requires": {
+ "unipointer": "^2.3.0"
+ }
+ },
+ "unipointer": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/unipointer/-/unipointer-2.3.0.tgz",
+ "integrity": "sha512-m85sAoELCZhogI1owtJV3Dva7GxkHk2lI7A0otw3o0OwCuC/Q9gi7ehddigEYIAYbhkqNdri+dU1QQkrcBvirQ==",
+ "requires": {
+ "ev-emitter": "^1.0.1"
+ }
}
}
}
diff --git a/package.json b/package.json
new file mode 100644
index 00000000..834ce9d7
--- /dev/null
+++ b/package.json
@@ -0,0 +1,20 @@
+{
+ "name": "la_mine",
+ "version": "1.0.0",
+ "description": "
",
+ "main": "index.js",
+ "dependencies": {
+ "flickity": "^2.2.1",
+ "normalize.css": "^8.0.1"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://figureslibres.io/gogs/kevin/lamine_wp.git"
+ },
+ "author": "",
+ "license": "ISC"
+}
diff --git a/web/app/themes/la_mine/accueil.php b/web/app/themes/la_mine/accueil.php
index 2c6d81a0..8ce648bd 100644
--- a/web/app/themes/la_mine/accueil.php
+++ b/web/app/themes/la_mine/accueil.php
@@ -11,6 +11,20 @@ $context['post'] = $post;
$args = 'post_type=post&numberposts=3&orderby=date';
+$projet = array(
+ 'post_type' => 'les-projets',
+ 'post_status'=>'publish',
+ 'numberposts' => 3
+);
+
+$tpsF = array(
+ 'post_type' => 'les-temps-forts',
+ 'post_status'=>'publish',
+ 'numberposts' => 3
+);
+
+$context['projet'] = Timber::get_posts( $projet );
$context['posts'] = Timber::get_posts( $args );
+$context['tpsF'] = Timber::get_posts( $tpsF );
Timber::render('accueil.twig', $context);
diff --git a/web/app/themes/la_mine/asset/dist/css/flickity.css b/web/app/themes/la_mine/asset/dist/css/flickity.css
new file mode 100644
index 00000000..7a947f83
--- /dev/null
+++ b/web/app/themes/la_mine/asset/dist/css/flickity.css
@@ -0,0 +1,137 @@
+/*! Flickity v2.2.1
+https://flickity.metafizzy.co
+---------------------------------------------- */
+
+.flickity-enabled {
+ position: relative;
+}
+
+.flickity-enabled:focus { outline: none; }
+
+.flickity-viewport {
+ overflow: hidden;
+ position: relative;
+ height: 100%;
+}
+
+.flickity-slider {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+/* draggable */
+
+.flickity-enabled.is-draggable {
+ -webkit-tap-highlight-color: transparent;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
+
+.flickity-enabled.is-draggable .flickity-viewport {
+ cursor: move;
+ cursor: -webkit-grab;
+ cursor: grab;
+}
+
+.flickity-enabled.is-draggable .flickity-viewport.is-pointer-down {
+ cursor: -webkit-grabbing;
+ cursor: grabbing;
+}
+
+/* ---- flickity-button ---- */
+
+.flickity-button {
+ position: absolute;
+ background: hsla(0, 0%, 100%, 0.75);
+ border: none;
+ color: #333;
+}
+
+.flickity-button:hover {
+ background: white;
+ cursor: pointer;
+}
+
+.flickity-button:focus {
+ outline: none;
+ box-shadow: 0 0 0 5px #19F;
+}
+
+.flickity-button:active {
+ opacity: 0.6;
+}
+
+.flickity-button:disabled {
+ opacity: 0.3;
+ cursor: auto;
+ /* prevent disabled button from capturing pointer up event. #716 */
+ pointer-events: none;
+}
+
+.flickity-button-icon {
+ fill: currentColor;
+}
+
+/* ---- previous/next buttons ---- */
+
+.flickity-prev-next-button {
+ top: 50%;
+ width: 44px;
+ height: 44px;
+ border-radius: 50%;
+ /* vertically center */
+ transform: translateY(-50%);
+}
+
+.flickity-prev-next-button.previous { left: 10px; }
+.flickity-prev-next-button.next { right: 10px; }
+/* right to left */
+.flickity-rtl .flickity-prev-next-button.previous {
+ left: auto;
+ right: 10px;
+}
+.flickity-rtl .flickity-prev-next-button.next {
+ right: auto;
+ left: 10px;
+}
+
+.flickity-prev-next-button .flickity-button-icon {
+ position: absolute;
+ left: 20%;
+ top: 20%;
+ width: 60%;
+ height: 60%;
+}
+
+/* ---- page dots ---- */
+
+.flickity-page-dots {
+ position: absolute;
+ width: 100%;
+ bottom: -25px;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ text-align: center;
+ line-height: 1;
+}
+
+.flickity-rtl .flickity-page-dots { direction: rtl; }
+
+.flickity-page-dots .dot {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 0 8px;
+ background: #333;
+ border-radius: 50%;
+ opacity: 0.25;
+ cursor: pointer;
+}
+
+.flickity-page-dots .dot.is-selected {
+ opacity: 1;
+}
diff --git a/web/app/themes/la_mine/asset/dist/index.js b/web/app/themes/la_mine/asset/dist/index.js
new file mode 100644
index 00000000..08a2fcfb
--- /dev/null
+++ b/web/app/themes/la_mine/asset/dist/index.js
@@ -0,0 +1,30 @@
+var Home = document.querySelector('.hero .slide');
+var flkty = new Flickity( Home, {
+ // options
+ cellAlign: 'left',
+ autoPlay: true,
+ prevNextButtons: false
+});
+
+var prive = document.querySelector('.prive .__slide');
+var flkty = new Flickity( prive, {
+ // options
+ cellAlign: 'left',
+ autoPlay: true,
+})
+
+var slide_tpsF = document.querySelectorAll('.tpsF .slide');
+for (var i = 0; i < slide_tpsF.length; i++) {
+ var flkty = new Flickity( slide_tpsF[i], {
+ // options
+ cellAlign: 'left',
+ autoPlay: true,
+ pageDots: false
+ });
+}
+
+var msnry = new Masonry( '.tableau_engagements.row', {
+ columnWidth: '.engagement',
+ itemSelector: '.engagement',
+ percentPosition: true
+});
diff --git a/web/app/themes/la_mine/asset/dist/js/flickity.pkgd.min.js b/web/app/themes/la_mine/asset/dist/js/flickity.pkgd.min.js
new file mode 100644
index 00000000..4a42c10f
--- /dev/null
+++ b/web/app/themes/la_mine/asset/dist/js/flickity.pkgd.min.js
@@ -0,0 +1,12 @@
+/*!
+ * Flickity PACKAGED v2.2.1
+ * Touch, responsive, flickable carousels
+ *
+ * Licensed GPLv3 for open source use
+ * or Flickity Commercial License for commercial use
+ *
+ * https://flickity.metafizzy.co
+ * Copyright 2015-2019 Metafizzy
+ */
+
+!function(e,i){"function"==typeof define&&define.amd?define("jquery-bridget/jquery-bridget",["jquery"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("jquery")):e.jQueryBridget=i(e,e.jQuery)}(window,function(t,e){"use strict";var i=Array.prototype.slice,n=t.console,d=void 0===n?function(){}:function(t){n.error(t)};function s(h,s,c){(c=c||e||t.jQuery)&&(s.prototype.option||(s.prototype.option=function(t){c.isPlainObject(t)&&(this.options=c.extend(!0,this.options,t))}),c.fn[h]=function(t){return"string"==typeof t?function(t,o,r){var a,l="$()."+h+'("'+o+'")';return t.each(function(t,e){var i=c.data(e,h);if(i){var n=i[o];if(n&&"_"!=o.charAt(0)){var s=n.apply(i,r);a=void 0===a?s:a}else d(l+" is not a valid method")}else d(h+" not initialized. Cannot call methods, i.e. "+l)}),void 0!==a?a:t}(this,t,i.call(arguments,1)):(function(t,n){t.each(function(t,e){var i=c.data(e,h);i?(i.option(n),i._init()):(i=new s(e,n),c.data(e,h,i))})}(this,t),this)},o(c))}function o(t){!t||t&&t.bridget||(t.bridget=s)}return o(e||t.jQuery),s}),function(t,e){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",e):"object"==typeof module&&module.exports?module.exports=e():t.EvEmitter=e()}("undefined"!=typeof window?window:this,function(){function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],s=0;s *"),this.getCell(t))},p.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(i<=1+2*t)return this.getCellElements();for(var n=[],s=e-t;s<=e+t;s++){var o=this.options.wrapAround?a.modulo(s,i):s,r=this.slides[o];r&&(n=n.concat(r.getCellElements()))}return n},p.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#\.]?[\d\/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},p.uiChange=function(){this.emitEvent("uiChange")},p.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},p.onresize=function(){this.watchCSS(),this.resize()},a.debounceMethod(f,"onresize",150),p.resize=function(){if(this.isActive){this.getSize(),this.options.wrapAround&&(this.x=a.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},p.watchCSS=function(){this.options.watchCSS&&(-1!=o(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},p.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=f.keyboardHandlers[t.keyCode];i&&i.call(this)}},f.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},p.focus=function(){var t=n.pageYOffset;this.element.focus({preventScroll:!0}),n.pageYOffset!=t&&n.scrollTo(n.pageXOffset,t)},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),c(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),n.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),l&&this.$element&&l.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete u[this.guid]},a.extend(p,s),f.data=function(t){var e=(t=a.getQueryElement(t))&&t.flickityGUID;return e&&u[e]},a.htmlInit(f,"flickity"),l&&l.bridget&&l.bridget("flickity",f),f.setJQuery=function(t){l=t},f.Cell=i,f.Slide=r,f}),function(e,i){"function"==typeof define&&define.amd?define("unipointer/unipointer",["ev-emitter/ev-emitter"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter")):e.Unipointer=i(e,e.EvEmitter)}(window,function(s,t){function e(){}var i=e.prototype=Object.create(t.prototype);i.bindStartEvent=function(t){this._bindStartEvent(t,!0)},i.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},i._bindStartEvent=function(t,e){var i=(e=void 0===e||e)?"addEventListener":"removeEventListener",n="mousedown";s.PointerEvent?n="pointerdown":"ontouchstart"in s&&(n="touchstart"),t[i](n,this)},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.getTouch=function(t){for(var e=0;e1",dragThreshold:3}),t.createMethods.push("_createDrag");var n=t.prototype;a.extend(n,e.prototype),n._touchActionValue="pan-y";var s="createTouch"in document,o=!1;n._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),s&&!o&&(i.addEventListener("touchmove",function(){}),o=!0)},n.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},n.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},n.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=1this.options.dragThreshold},n.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},n.pointerDone=function(){i.removeEventListener("scroll",this),delete this.pointerDownScroll},n.dragStart=function(t,e){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),i.removeEventListener("scroll",this),this.dispatchEvent("dragStart",t,[e]))},n.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},n.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x=i.x%this.slideableWidth);var s=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.slides.length){var o=Math.max(-this.slides[0].target,this.dragStartPosition);s=othis.slides[0].target&&-n=this.cells.length)){var r=this.cells.slice(n,1+s);this.navSelectedElements=r.map(function(t){return t.element}),this.changeNavSelectedClass("add")}}},t.changeNavSelectedClass=function(e){this.navSelectedElements.forEach(function(t){t.classList[e]("is-nav-selected")})},t.activateAsNavFor=function(){this.navCompanionSelect(!0)},t.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)},t.onNavStaticClick=function(t,e,i,n){"number"==typeof n&&this.navCompanion.selectCell(n)},t.deactivateAsNavFor=function(){this.removeNavSelectedElements()},t.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},n}),function(e,i){"use strict";"function"==typeof define&&define.amd?define("imagesloaded/imagesloaded",["ev-emitter/ev-emitter"],function(t){return i(e,t)}):"object"==typeof module&&module.exports?module.exports=i(e,require("ev-emitter")):e.imagesLoaded=i(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){var s=e.jQuery,o=e.console;function r(t,e){for(var i in e)t[i]=e[i];return t}var a=Array.prototype.slice;function l(t,e,i){if(!(this instanceof l))return new l(t,e,i);var n=t;"string"==typeof t&&(n=document.querySelectorAll(t)),n?(this.elements=function(t){return Array.isArray(t)?t:"object"==typeof t&&"number"==typeof t.length?a.call(t):[t]}(n),this.options=r({},this.options),"function"==typeof e?i=e:r(this.options,e),i&&this.on("always",i),this.getImages(),s&&(this.jqDeferred=new s.Deferred),setTimeout(this.check.bind(this))):o.error("Bad element for imagesLoaded "+(n||t))}(l.prototype=Object.create(t.prototype)).options={},l.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},l.prototype.addElementImages=function(t){"IMG"==t.nodeName&&this.addImage(t),!0===this.options.background&&this.addElementBackgroundImages(t);var e=t.nodeType;if(e&&h[e]){for(var i=t.querySelectorAll("img"),n=0;ne;e++){var i=h[e];t[i]=0}return t}function n(t){var e=getComputedStyle(t);return e||a("Style returned "+e+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),e}function o(){if(!d){d=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var o=n(e);s=200==Math.round(t(o.width)),r.isBoxSizeOuter=s,i.removeChild(e)}}function r(e){if(o(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var r=n(e);if("none"==r.display)return i();var a={};a.width=e.offsetWidth,a.height=e.offsetHeight;for(var d=a.isBorderBox="border-box"==r.boxSizing,l=0;u>l;l++){var c=h[l],f=r[c],m=parseFloat(f);a[c]=isNaN(m)?0:m}var p=a.paddingLeft+a.paddingRight,g=a.paddingTop+a.paddingBottom,y=a.marginLeft+a.marginRight,v=a.marginTop+a.marginBottom,_=a.borderLeftWidth+a.borderRightWidth,z=a.borderTopWidth+a.borderBottomWidth,E=d&&s,b=t(r.width);b!==!1&&(a.width=b+(E?0:p+_));var x=t(r.height);return x!==!1&&(a.height=x+(E?0:g+z)),a.innerWidth=a.width-(p+_),a.innerHeight=a.height-(g+z),a.outerWidth=a.width+y,a.outerHeight=a.height+v,a}}var s,a="undefined"==typeof console?e:function(t){console.error(t)},h=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],u=h.length,d=!1;return r}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("desandro-matches-selector/matches-selector",e):"object"==typeof module&&module.exports?module.exports=e():t.matchesSelector=e()}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;is?"round":"floor";r=Math[a](r),this.cols=Math.max(r,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth"),i=t?this.element.parentNode:this.element,n=e(i);this.containerWidth=n&&n.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=e&&1>e?"round":"ceil",n=Math[i](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var o=this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition",r=this[o](n,t),s={x:this.columnWidth*r.col,y:r.y},a=r.y+t.size.outerHeight,h=n+r.col,u=r.col;h>u;u++)this.colYs[u]=a;return s},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;i>n;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(2>e)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols,n=t>1&&i+t>this.cols;i=n?0:i;var o=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=o?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),o=this._getOption("originLeft"),r=o?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var h=Math.floor(s/this.columnWidth);h-=s%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var u=this._getOption("originTop"),d=(u?n.top:n.bottom)+i.outerHeight,l=a;h>=l;l++)this.colYs[l]=Math.max(d,this.colYs[l])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i});
\ No newline at end of file
diff --git a/web/app/themes/la_mine/asset/dist/style.css b/web/app/themes/la_mine/asset/dist/style.css
new file mode 100644
index 00000000..f2af4330
--- /dev/null
+++ b/web/app/themes/la_mine/asset/dist/style.css
@@ -0,0 +1,112 @@
+img{
+ width: 100%;
+ height: auto;
+}
+
+footer img{
+ width: 50px;
+ height: auto;
+}
+footer li {
+ list-style-type:none;
+}
+
+.sidebar_left {
+ background-color: pink;
+}
+.tableau_engagements {
+ background-color: green;
+}
+.tableau_engagements div{
+ background-color: red;
+}
+
+/* .tableau_engagements > div{
+ display: inline-block;
+} */
+.legendes{
+ background-color: pink;
+ position : absolute;
+ bottom: 100px;
+}
+
+
+/* START KEVIN */
+ header{
+ z-index: 9999;
+ position: absolute;
+ width: 100%;
+ top: 0;
+ left: 0;
+ }
+ .hero{
+ width: 100%;
+ height: 100vh;
+ position: relative;
+ }
+ .hero .slide{
+ width: 100%;
+ height: 100vh;
+ overflow: hidden;
+ }
+ .hero .slide .image{
+ width: 100%;
+ height: 100vh;
+ }
+ .hero .slide img{
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+ .hero .slide .flickity-page-dots{
+ bottom: 20px;
+ }
+ .hero .slide .flickity-page-dots li{
+ background: white;
+ }
+ .hero .__head{
+ width: 100%;
+ text-align: center;
+ position: absolute;
+ bottom: 60px;
+ color: white;
+ }
+
+ .wrapper section{
+ margin: 150px 0;
+ }
+
+ .tpsF .img{
+ width: 100%;
+ height: 400px;
+ }
+ .tpsF .img img{
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+ .projet .img{
+ height: 300px;
+ }
+ .projet .img img{
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+
+ .tableau_engagements .engagement{
+ width: 50%;
+ }
+
+ .prive .images{
+ width: 100%;
+ height: 600px;
+ }
+ .prive .img img{
+ width: 100%;
+ height: 100%;
+ object-fit: cover;
+ }
+
+
+/* END KEVIN */
diff --git a/web/app/themes/la_mine/asset/images/fb.svg b/web/app/themes/la_mine/asset/images/fb.svg
new file mode 100644
index 00000000..6938624a
--- /dev/null
+++ b/web/app/themes/la_mine/asset/images/fb.svg
@@ -0,0 +1,62 @@
+
+
diff --git a/web/app/themes/la_mine/asset/images/inst.svg b/web/app/themes/la_mine/asset/images/inst.svg
new file mode 100644
index 00000000..136c984d
--- /dev/null
+++ b/web/app/themes/la_mine/asset/images/inst.svg
@@ -0,0 +1,53 @@
+
+
diff --git a/web/app/themes/la_mine/asset/images/logo.svg b/web/app/themes/la_mine/asset/images/logo.svg
new file mode 100644
index 00000000..e69de29b
diff --git a/web/app/themes/la_mine/functions.php b/web/app/themes/la_mine/functions.php
index ddf3f022..20584632 100644
--- a/web/app/themes/la_mine/functions.php
+++ b/web/app/themes/la_mine/functions.php
@@ -1,8 +1,39 @@
addExtension(new IntlExtension());
+
// CUSTOM FUNCTION
+ function theme_js(){
+
+
+ wp_enqueue_script( 'bootstrap',
+ get_template_directory_uri() . '/asset/dist/js/bootstrap.js',
+ array() );
+
+ wp_enqueue_script( 'flickity',
+ get_template_directory_uri() . '/asset/dist/js/flickity.pkgd.min.js',
+ array() );
+
+ wp_enqueue_script( 'masonry',
+ get_template_directory_uri() . '/asset/dist/js/masonry.pkgd.min.js',
+ array() );
+
+ wp_enqueue_script( 'script',
+ get_template_directory_uri() . '/asset/dist/index.js',
+ array() );
+
+ }
+
+ add_action( 'wp_footer', 'theme_js' );
+
+
+
// ADD OPTION PAGES
if( function_exists('acf_add_options_page') ) {
@@ -29,4 +60,112 @@
return $context;
}
+ function post_temps_forts() {
+
+ $labels = array(
+ 'name' => _x('Les temps forts', 'Post Type General Name', 'la_mine'),
+ 'singular_name' => _x('Temps fort', 'Post Type Singular Name', 'la_mine'),
+ 'menu_name' => __('Les temps forts', 'la_mine'),
+ 'name_admin_bar' => __('Les temps forts', 'la_mine'),
+ 'parent_item_colon' => __('Parent Item:', 'la_mine'),
+ 'all_items' => __('All temps forts', 'la_mine'),
+ 'add_new_item' => __('Add New temps forts', 'la_mine'),
+ 'add_new' => __('Add temps fort', 'la_mine'),
+ 'new_item' => __('New temps fort', 'la_mine' ),
+ 'edit_item' => __('Edit temps fort', 'la_mine'),
+ 'update_item' => __('Update temps fort', 'la_mine'),
+ 'view_item' => __('View temps fort', 'la_mine'),
+ 'search_items' => __('Search temps fort', 'la_mine'),
+ 'not_found' => __('Not found', 'la_mine'),
+ 'not_found_in_trash' => __('Not found in Trash', 'la_mine'),
+ );
+ $rewrite = array(
+ 'slug' => _x('les-temps-forts', 'les-temps-forts', 'la_mine'),
+ 'with_front' => true,
+ 'pages' => true,
+ 'feeds' => false,
+ );
+ $args = array(
+ 'label' => __('les-temps-forts', 'la_mine'),
+ 'description' => __('Les temps forts', 'la_mine'),
+ 'labels' => $labels,
+ 'supports' => array('title', 'thumbnail', 'custom-fields'),
+ 'taxonomies' => array('temps_forts_type'),
+ 'hierarchical' => false,
+ 'public' => true,
+ 'show_ui' => true,
+ 'show_in_menu' => true,
+ 'menu_position' => 5,
+ 'menu_icon' => 'dashicons-megaphone',
+ 'show_in_admin_bar' => true,
+ 'show_in_nav_menus' => true,
+ 'can_export' => true,
+ 'has_archive' => false,
+ 'exclude_from_search' => false,
+ 'publicly_queryable' => true,
+ 'query_var' => 'temps_forts',
+ 'rewrite' => $rewrite,
+ 'capability_type' => 'page',
+ );
+ register_post_type('les-temps-forts', $args);
+ }
+
+ add_action('init', 'post_temps_forts', 10);
+
+
+ function post_projets() {
+
+ $labels = array(
+ 'name' => _x('Les projets', 'Post Type General Name', 'la_mine'),
+ 'singular_name' => _x('Projet', 'Post Type Singular Name', 'la_mine'),
+ 'menu_name' => __('Les projets', 'la_mine'),
+ 'name_admin_bar' => __('Les projets', 'la_mine'),
+ 'parent_item_colon' => __('Parent Item:', 'la_mine'),
+ 'all_items' => __('All projets', 'la_mine'),
+ 'add_new_item' => __('Add New projet', 'la_mine'),
+ 'add_new' => __('Add projet', 'la_mine'),
+ 'new_item' => __('New projet', 'la_mine' ),
+ 'edit_item' => __('Edit projet', 'la_mine'),
+ 'update_item' => __('Update projet', 'la_mine'),
+ 'view_item' => __('View projet', 'la_mine'),
+ 'search_items' => __('Search projet', 'la_mine'),
+ 'not_found' => __('Not found', 'la_mine'),
+ 'not_found_in_trash' => __('Not found in Trash', 'la_mine'),
+ );
+ $rewrite = array(
+ 'slug' => _x('les-projets', 'les-projets', 'la_mine'),
+ 'with_front' => true,
+ 'pages' => true,
+ 'feeds' => false,
+ );
+ $args = array(
+ 'label' => __('les-projets', 'la_mine'),
+ 'description' => __('Les projets', 'la_mine'),
+ 'labels' => $labels,
+ 'supports' => array('title', 'thumbnail', 'custom-fields'),
+ 'taxonomies' => array('les_projets_type'),
+ 'hierarchical' => false,
+ 'public' => true,
+ 'show_ui' => true,
+ 'show_in_menu' => true,
+ 'menu_position' => 6,
+ 'menu_icon' => 'dashicons-hammer',
+ 'show_in_admin_bar' => true,
+ 'show_in_nav_menus' => true,
+ 'can_export' => true,
+ 'has_archive' => false,
+ 'exclude_from_search' => false,
+ 'publicly_queryable' => true,
+ 'query_var' => 'les_projets',
+ 'rewrite' => $rewrite,
+ 'capability_type' => 'page',
+ );
+ register_post_type('les-projets', $args);
+ }
+
+ add_action('init', 'post_projets', 10);
+
+
+
+
?>
diff --git a/web/app/themes/la_mine/les_projets.php b/web/app/themes/la_mine/les_projets.php
index 3071d482..d1a1cf4d 100644
--- a/web/app/themes/la_mine/les_projets.php
+++ b/web/app/themes/la_mine/les_projets.php
@@ -4,9 +4,14 @@
*/
$context = Timber::context();
-
$timber_post = new Timber\Post();
-$context['post'] = $timber_post;
+$args = array(
+ 'post_type' => 'les-projets',
+ 'post_status'=>'publish',
+);
-Timber::render( 'les_projets.twig', $context );
+$context['posts'] = Timber::get_posts( $args );
+$context['post'] = Timber::get_post( );
+
+Timber::render('les_projets.twig', $context );
diff --git a/web/app/themes/la_mine/les_temps_forts.php b/web/app/themes/la_mine/les_temps_forts.php
old mode 100755
new mode 100644
index 97f86d2b..d9a6772c
--- a/web/app/themes/la_mine/les_temps_forts.php
+++ b/web/app/themes/la_mine/les_temps_forts.php
@@ -4,8 +4,14 @@
*/
$context = Timber::context();
-
$timber_post = new Timber\Post();
-$context['post'] = $timber_post;
-Timber::render( 'les_temps_forts.twig', $context );
+$args = array(
+ 'post_type' => 'les-temps-forts',
+ 'post_status'=>'publish',
+);
+
+$context['posts'] = Timber::get_posts( $args );
+$context['post'] = Timber::get_post( );
+
+Timber::render('les_temps_forts.twig', $context );
diff --git a/web/app/themes/la_mine/single-les-temps-forts.php b/web/app/themes/la_mine/single-les-temps-forts.php
new file mode 100644
index 00000000..2c5632fc
--- /dev/null
+++ b/web/app/themes/la_mine/single-les-temps-forts.php
@@ -0,0 +1,16 @@
+slug;
+}
+
+$current_id[] = get_the_ID();
+$args = get_posts(array(
+ 'post_type' => 'post',
+ 'post_status' => 'publish',
+ 'orderby' => 'date',
+ 'order' => 'DESC',
+ 'posts_per_page' => -1,
+ 'category_name' => $cat,
+ 'post__not_in' => $current_id,
+));
+
+$context['other'] = $args;
+
+Timber::render('single.twig', $context );
diff --git a/web/app/themes/la_mine/templates/accueil.twig b/web/app/themes/la_mine/templates/accueil.twig
index 33a655c5..58f7ffa7 100644
--- a/web/app/themes/la_mine/templates/accueil.twig
+++ b/web/app/themes/la_mine/templates/accueil.twig
@@ -1,87 +1,35 @@
{% extends "base.twig" %}
{% block content %}
-{% include 'components/title_page.twig' %}
-
-
-
-
{{ post.meta('titre') }}
-
-
{{ post.meta('sous_titre') }}
-
-
-
- {% for item in post.meta('slide_image') %}
-
-
.src }})
-
- {% endfor %}
-
-
-
-
+ Prochainement
- {% for item in posts %}
- {% include 'components/thumbnails/thumbnails.twig' %}
- {% endfor %}
+ {% for item in posts %}
+ {% include 'components/thumbnails/thumbnails.twig' %}
+ {% endfor %}
+
+
+ Tout voir
+
+
-
-
-
-
-
-
).src }})
-
-
-
- {{ post.meta('paragraphe_descriptif') }}
-
-
- {{ post.meta('paragraphe_descriptif_2') }}
-
- {% include 'components/buttons/bouton_ensavoir.html.twig' %}
-
-
-
-
-
+ {% include 'partial/section_asso.twig' %}
-
-
-
- {% for item in seq %}
-
-
-
-
-
-
- {% endfor %}
-
-
+ {% include 'partial/section_projets.twig' %}
-
-
+ {% include 'partial/section_tpsF.twig' %}
diff --git a/web/app/themes/la_mine/templates/association.twig b/web/app/themes/la_mine/templates/association.twig
index 77220c5d..3110df97 100644
--- a/web/app/themes/la_mine/templates/association.twig
+++ b/web/app/themes/la_mine/templates/association.twig
@@ -32,7 +32,7 @@
{% for item in post.meta('type_engagement') %}
-
+
{{item.titre_engagement}}
diff --git a/web/app/themes/la_mine/templates/base.twig b/web/app/themes/la_mine/templates/base.twig
index 704dca3a..51365fab 100644
--- a/web/app/themes/la_mine/templates/base.twig
+++ b/web/app/themes/la_mine/templates/base.twig
@@ -6,28 +6,33 @@
{% endblock %}
-
-
-
{{ _e( 'Skip to content') }}
-