├── .gitignore
├── .babelrc
├── dist
├── index.js.map
└── index.js
├── webpack.config.js
├── LICENSE
├── package.json
├── README.md
└── src
└── index.js
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | npm-debug.log
--------------------------------------------------------------------------------
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [ "es2015" ]
3 | }
--------------------------------------------------------------------------------
/dist/index.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"index.js","sources":["webpack://vue-tiny-slider/webpack/universalModuleDefinition"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"vue-tiny-slider\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"vue-tiny-slider\"] = factory();\n\telse\n\t\troot[\"vue-tiny-slider\"] = factory();\n})(window, function() {\nreturn "],"mappings":"AAAA","sourceRoot":""}
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack');
2 | const path = require('path');
3 |
4 | module.exports = {
5 | devtool: 'cheap-module-source-map',
6 | entry: './src/index.js',
7 | output: {
8 | path: path.resolve(__dirname, './dist/'),
9 | filename: 'index.js',
10 | library: 'vue-tiny-slider',
11 | libraryTarget: 'umd',
12 | umdNamedDefine: true
13 | },
14 | resolve: {
15 | extensions: ['.js', '.vue']
16 | },
17 | module: {
18 | rules: [
19 | {
20 | test: /\.js$/,
21 | loader: 'babel-loader',
22 | include: __dirname,
23 | exclude: /node_modules/
24 | },
25 | {
26 | test: /\.vue$/,
27 | loader: 'vue-loader',
28 | include: __dirname,
29 | exclude: /node_modules/
30 | }
31 | ]
32 | }
33 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Viktor Sarström
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "vue-tiny-slider",
3 | "version": "0.1.38",
4 | "description": "Vanilla javascript slider for all purposes created by ganlanyuan in Vue.",
5 | "main": "./dist/index.js",
6 | "scripts": {
7 | "watch": "webpack --watch --colors --hide-modules --mode development",
8 | "build": "webpack --colors --hide-modules --mode production"
9 | },
10 | "repository": {
11 | "type": "git",
12 | "url": "git+https://github.com/viktorlarsson/vue-tiny-slider.git"
13 | },
14 | "keywords": [
15 | "javascript",
16 | "vue",
17 | "tiny-slider",
18 | "slider",
19 | "carousel"
20 | ],
21 | "author": "Viktor Sarström & Morgan Eklund",
22 | "license": "MIT",
23 | "bugs": {
24 | "url": "https://github.com/viktorlarsson/vue-tiny-slider/issues"
25 | },
26 | "homepage": "https://github.com/viktorlarsson/vue-tiny-slider#readme",
27 | "dependencies": {
28 | "lodash": "^4.17.11",
29 | "tiny-slider": "^2.9.2"
30 | },
31 | "devDependencies": {
32 | "babel-core": "^6.26.3",
33 | "babel-loader": "^7.1.4",
34 | "babel-preset-es2015": "^6.24.1",
35 | "webpack": "^4.8.3",
36 | "webpack-cli": "^2.1.3"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # tiny-slider 2.0 for Vue
2 |
3 | Wrapper for Tiny slider for all purposes by [ganlanyuan](https://github.com/ganlanyuan/tiny-slider) in Vue. [Try it out](https://codesandbox.io/s/7m9w30xjz6)!
4 |
5 | Firefox 12+, Chrome 15+, Safari 4+, Opera 12.1+, IE8+
6 |
7 | [](http://github.com/badges/stability-badges) [](https://github.com/badges/shields/) [](https://github.com/badges/shields/) [](https://github.com/badges/shields/)
8 |
9 | ## Table of Contents
10 | * [Install](#install)
11 | * [Use](#use)
12 | * [Styling](#styling)
13 | * [Options](#options)
14 | * [Methods](#methods)
15 | * [How to use the methods](#how-to-use-the-methods)
16 | * [NuxtJS SSR](#nuxtjs-ssr)
17 | * [Todos](#todo)
18 | * [Collaborators](#collaborators)
19 | * [License](#license)
20 | * [Cheerios <3](#cheerios-3)
21 |
22 | ## Install
23 |
24 | `npm install vue-tiny-slider`
25 |
26 | ## Use
27 |
28 | ````javascript
29 | import VueTinySlider from 'vue-tiny-slider';
30 |
31 | new Vue({
32 | components: {
33 | 'tiny-slider': VueTinySlider
34 | }
35 | })
36 | ````
37 |
38 | ````html
39 |
40 | Slider item #1
41 | Slider item #2
42 | Slider item #3
43 | Slider item #4
44 | Slider item #5
45 | Slider item #6
46 |
47 | ````
48 |
49 | ## Styling
50 |
51 | SCSS
52 | ````scss
53 | @import 'tiny-slider/src/tiny-slider';
54 | ````
55 |
56 | CDN
57 | ````html
58 |
59 | ````
60 |
61 | ## Options
62 |
63 | ````
64 | auto-init
65 | items
66 | mode
67 | gutter
68 | edge-padding
69 | fixed-width
70 | slide-by
71 | controls
72 | controls-text
73 | controls-container
74 | nav
75 | nav-container
76 | arrow-keys
77 | speed
78 | autoplay
79 | autoplay-timeout
80 | autoplay-direction
81 | autoplay-text
82 | autoplay-hover-pause
83 | autoplay-button
84 | autoplay-button-output
85 | autoplay-reset-on-visibility
86 | animate-in
87 | animate-out
88 | animate-normal
89 | animate-delay
90 | loop
91 | rewind
92 | auto-height
93 | responsive
94 | lazyload
95 | touch
96 | mouse-drag
97 | nested
98 | freezable
99 | disable
100 | on-init
101 | center
102 | lazy-load-selector
103 | prevent-action-when-running
104 | prevent-scroll-on-touch
105 | nav-options
106 | auto-width
107 | ````
108 |
109 | For more detailed information about the options, see the [Tiny-slider documentation (Options)](https://github.com/ganlanyuan/tiny-slider#options).
110 |
111 | ## Methods
112 |
113 | ````getInfo````
114 | ````goTo````
115 | ````destroy````
116 |
117 | ### How to use the methods
118 |
119 | To be able to use the methods, you need to use ref on the component. Ref is used to register a reference to an element or a child component.
120 |
121 | ```
122 |
123 | ```
124 |
125 | ```
126 | import VueTinySlider from 'vue-tiny-slider';
127 |
128 | export default {
129 | ...,
130 | methods: {
131 | getInfo: function(event) {
132 | this.$refs.tinySlider.slider.getInfo();
133 | }
134 | }
135 | }
136 | ```
137 |
138 | For more detailed information about the methods, see the [Tiny-slider documentation (Methods)](https://github.com/ganlanyuan/tiny-slider#methods).
139 |
140 | ## NuxtJS SSR
141 |
142 | 1. `yarn add vue-tiny-slider` or `npm install vue-tiny-slider`
143 |
144 | 2. In `nuxt.config.js` add
145 | ``` js
146 | plugins: [{ src: '~/plugins/vue-tiny-slider.js', mode: 'client' }],
147 | ```
148 |
149 | 3. Create the file `plugins/vue-tiny-slider.js` with this content
150 |
151 | ```js
152 | import Vue from 'vue'
153 | import vTinySlider from 'vue-tiny-slider'
154 | const VueTinySlider = {
155 | install(Vue, options) {
156 | Vue.component('VueTinySlider', vTinySlider)
157 | }
158 | }
159 | Vue.use(VueTinySlider)
160 | ```
161 |
162 | Now you should be able to use it in any component **without** any import, like this:
163 |
164 | ```js
165 |
166 |
167 | #1
168 | #2
169 | #3
170 | #4
171 | #5
172 | #6
173 |
174 |
175 | ```
176 |
177 | A demo is available here: [https://codesandbox.io/s/jvjp349449](https://codesandbox.io/s/jvjp349449).
178 |
179 |
180 | ## Todo
181 | * ~~Add demo link from a fiddle or something similar~~
182 | * Better handling of the responsive-settings
183 | * Add Custom Events
184 | * ~~Add Methods~~
185 |
186 | ## Collaborators
187 | * [Morgan Eklund](https://github.com/rymdkapten)
188 | * [Viktor Sarström](https://github.com/viktorlarsson)
189 |
190 | ## License
191 |
192 | This project is available under the MIT license.
193 |
194 | ## Cheerios <3
195 |
196 | * Fixed broken demo link, @VitorLuizC
197 | * Moved tiny-slider from devDependencies to dependencies, @TitanFighter
198 | * Added nav position to props, @Irsanarisandy
199 | * Got it to work with NuxtJS SSR, @ilbonte
200 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import { tns } from 'tiny-slider/src/tiny-slider';
2 |
3 | var VueTinySlider = {
4 | eventsList: [
5 | 'indexChanged',
6 | 'transitionStart',
7 | 'transitionEnd',
8 | 'newBreakpointStart',
9 | 'newBreakpointEnd',
10 | 'touchStart',
11 | 'touchMove',
12 | 'touchEnd',
13 | 'dragStart',
14 | 'dragMove',
15 | 'dragEnd'
16 | ],
17 | props: {
18 | mode: {
19 | type: [String],
20 | default: 'carousel'
21 | },
22 | autoInit: {
23 | type: [Boolean],
24 | default: true
25 | },
26 | axis: {
27 | type: [String],
28 | validator: value => {
29 | return value === 'horizontal' || value === 'vertical';
30 | }
31 | },
32 | items: {
33 | type: [String, Number],
34 | default: 1
35 | },
36 | gutter: {
37 | type: [String, Number],
38 | default: 0
39 | },
40 | edgePadding: {
41 | type: [String, Number],
42 | default: 0
43 | },
44 | fixedWidth: {
45 | type: [String, Boolean, Number],
46 | default: false
47 | },
48 | viewportMax: {
49 | type: [String, Boolean, Number],
50 | default: false
51 | },
52 | swipeAngle: {
53 | type: [Boolean, Number],
54 | default: 15
55 | },
56 | slideBy: {
57 | type: [String, Number],
58 | default: 1
59 | },
60 | controls: {
61 | type: [String, Boolean],
62 | default: true
63 | },
64 | controlsPosition: {
65 | type: [String],
66 | validator: value => {
67 | return value === 'top' || value === 'bottom';
68 | },
69 | default: 'top'
70 | },
71 | controlsText: {
72 | type: [Array],
73 | default: () => ['prev', 'next']
74 | },
75 | controlsContainer: {
76 | type: [Boolean, Node, String],
77 | default: false
78 | },
79 | prevButton: {
80 | type: [Node, String, Boolean],
81 | default: false
82 | },
83 | nextButton: {
84 | type: [Node, String, Boolean],
85 | default: false
86 | },
87 | nav: {
88 | type: [Boolean],
89 | default: true
90 | },
91 | navPosition: {
92 | type: [String],
93 | default: "top"
94 | },
95 | navContainer: {
96 | type: [Boolean, Node, String],
97 | default: false
98 | },
99 | navAsThumbnails: {
100 | type: [Boolean],
101 | default: false
102 | },
103 | arrowKeys: {
104 | type: [Boolean],
105 | default: false
106 | },
107 | speed: {
108 | type: [String, Number],
109 | default: 300
110 | },
111 | autoplay: {
112 | type: [Boolean],
113 | default: false
114 | },
115 | autoplayTimeout: {
116 | type: [Number],
117 | default: 5000
118 | },
119 | autoplayDirection: {
120 | type: [String],
121 | default: 'forward',
122 | validator: value => {
123 | return value === 'forward' || value === 'backward';
124 | }
125 | },
126 | autoplayText: {
127 | type: [Array],
128 | default: () => ['start', 'stop']
129 | },
130 | autoplayHoverPause: {
131 | type: [Boolean],
132 | default: false
133 | },
134 | autoplayButton: {
135 | type: [Boolean, Node, String],
136 | default: false,
137 | },
138 | autoplayButtonOutput: {
139 | type: [Boolean],
140 | default: true
141 | },
142 | autoplayResetOnVisibility: {
143 | type: [Boolean],
144 | default: true,
145 | },
146 | animateIn: {
147 | type: [String],
148 | default: 'tns-fadeIn'
149 | },
150 | animateOut: {
151 | type: [String],
152 | default: 'tns-fadeOut'
153 | },
154 | animateNormal: {
155 | type: [String],
156 | default: 'tns-normal'
157 | },
158 | animateDelay: {
159 | type: [String, Number, Boolean],
160 | default: false
161 | },
162 | loop: {
163 | type: [Boolean],
164 | default: true
165 | },
166 | rewind: {
167 | type: [Boolean],
168 | default: false
169 | },
170 | autoHeight: {
171 | type: [Boolean],
172 | default: false
173 | },
174 | responsive: {
175 | type: [Boolean, Object],
176 | default: false
177 | },
178 | lazyload: {
179 | type: [Boolean],
180 | default: false
181 | },
182 | touch: {
183 | type: [Boolean],
184 | default: true
185 | },
186 | mouseDrag: {
187 | type: [Boolean],
188 | default: false
189 | },
190 | nested: {
191 | type: [String, Boolean],
192 | default: false,
193 | validator: value => {
194 | return value === 'inner' || value === 'outer' || value === false;
195 | }
196 | },
197 | freezable: {
198 | type: [Boolean],
199 | default: true
200 | },
201 | disable: {
202 | type: [Boolean],
203 | default: false
204 | },
205 | startIndex: {
206 | type: [Number],
207 | default: 0
208 | },
209 | onInit: {
210 | type: [Function, Boolean],
211 | default: false
212 | },
213 | center: {
214 | type: Boolean,
215 | default: false
216 | },
217 | lazyLoadSelector: {
218 | type: String,
219 | default: '.tns-lazy-img'
220 | },
221 | preventActionWhenRunning: {
222 | type: Boolean,
223 | default: false
224 | },
225 | autoWidth: {
226 | type: Boolean,
227 | default: false
228 | },
229 | preventScrollOnTouch: {
230 | type: [String, Boolean],
231 | default: false,
232 | validator: value => {
233 | return value === 'auto' || value === 'force' || value === false;
234 | }
235 | },
236 | useLocalStorage: {
237 | type: [Boolean],
238 | default: true
239 | }
240 | },
241 | mounted: function () {
242 | if(this.autoInit) {
243 | this.init();
244 | }
245 | },
246 | beforeDestroy: function() {
247 | if(this.slider) {
248 | this.slider.destroy();
249 | }
250 | },
251 | methods: {
252 | $_vueTinySlider_subscribeTo (eventName) {
253 | this.slider.events.on(eventName, (info) => {
254 | this.$emit(eventName, info);
255 | });
256 | },
257 | $_vueTinySlider_subscribeToAll () {
258 | this.$options.eventsList.forEach(this.$_vueTinySlider_subscribeTo)
259 | },
260 | goTo: function(value) {
261 | this.slider.goTo(value);
262 | },
263 | rebuild: function() {
264 | this.slider = this.slider.rebuild();
265 | this.$emit('rebuild');
266 | },
267 | getInfo: function() {
268 | this.$emit('getInfo', this.slider.getInfo(), this.slider);
269 | },
270 | destroy: function() {
271 | this.slider.destroy();
272 | },
273 | init: function() {
274 | var settings = {
275 | container: this.$el,
276 | axis: this.axis,
277 | items: parseInt(this.items),
278 | mode: this.mode,
279 | gutter: this.gutter,
280 | edgePadding: this.edgePadding,
281 | fixedWidth: !this.fixedWidth ? this.fixedWidth : parseInt(this.fixedWidth, 10),
282 | viewportMax: this.viewportMax,
283 | slideBy: this.slideBy,
284 | controls: this.controls,
285 | controlsPosition: this.controlsPosition,
286 | controlsText: this.controlsText,
287 | controlsContainer: this.controlsContainer,
288 | prevButton: this.prevButton,
289 | nextButton: this.nextButton,
290 | nav: this.nav,
291 | navPosition: this.navPosition,
292 | navContainer: this.navContainer,
293 | navAsThumbnails: this.navAsThumbnails,
294 | arrowKeys: this.arrowKeys,
295 | speed: this.speed,
296 | autoplay: this.autoplay,
297 | autoplayTimeout: this.autoplayTimeout,
298 | autoplayDirection: this.autoplayDirection,
299 | autoplayText: this.autoplayText,
300 | autoplayHoverPause: this.autoplayHoverPause,
301 | autoplayButton: this.autoplayButton,
302 | autoplayButtonOutput: this.autoplayButtonOutput,
303 | autoplayResetOnVisibility: this.autoplayResetOnVisibility,
304 | animateIn: this.animateIn,
305 | animateOut: this.animateOut,
306 | animateNormal: this.animateNormal,
307 | animateDelay: this.animateDelay,
308 | loop: this.loop,
309 | rewind: this.rewind,
310 | autoHeight: this.autoHeight,
311 | responsive: this.responsive,
312 | lazyload: this.lazyload,
313 | touch: this.touch,
314 | mouseDrag: this.mouseDrag,
315 | nested: this.nested,
316 | freezable: this.freezable,
317 | disable: this.disable,
318 | onInit: this.onInit,
319 | swipeAngle: this.swipeAngle,
320 | startIndex: this.startIndex,
321 | center: this.center,
322 | lazyLoadSelector: this.lazyLoadSelector,
323 | preventActionWhenRunning: this.preventActionWhenRunning,
324 | preventScrollOnTouch: this.preventScrollOnTouch,
325 | autoWidth: this.autoWidth,
326 | useLocalStorage: this.useLocalStorage
327 | };
328 | removeUndefinedProps(settings);
329 |
330 | this.slider = tns(settings);
331 |
332 | // Emit init event
333 | this.$emit('init');
334 | // Subscribe to all kind of tiny-slider events
335 | this.$_vueTinySlider_subscribeToAll();
336 | },
337 | },
338 | render: function(h){
339 | return h('div', this.$slots.default);
340 | }
341 | };
342 |
343 | function removeUndefinedProps(obj) {
344 | for (var prop in obj) {
345 | if (obj.hasOwnProperty(prop) && obj[prop] === undefined) {
346 | delete obj[prop];
347 | }
348 | }
349 | }
350 |
351 | module.exports = VueTinySlider;
352 |
--------------------------------------------------------------------------------
/dist/index.js:
--------------------------------------------------------------------------------
1 | !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("vue-tiny-slider",[],e):"object"==typeof exports?exports["vue-tiny-slider"]=e():t["vue-tiny-slider"]=e()}(window,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e,n){"use strict";n.r(e);n(2),n(1);var i=window,o=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||function(t){return setTimeout(t,16)},a=window,r=a.cancelAnimationFrame||a.mozCancelAnimationFrame||function(t){clearTimeout(t)};function u(){for(var t,e,n,i=arguments[0]||{},o=1,a=arguments.length;o=0?JSON.parse(t):t}function s(t,e,n,i){if(i)try{t.setItem(e,n)}catch(t){}return n}function c(){var t=document,e=t.body;return e||((e=t.createElement("body")).fake=!0),e}var d=document.documentElement;function f(t){var e="";return t.fake&&(e=d.style.overflow,t.style.background="",t.style.overflow=d.style.overflow="hidden",d.appendChild(t)),e}function p(t,e){t.fake&&(t.remove(),d.style.overflow=e,d.offsetHeight)}function v(t,e,n,i){"insertRule"in t?t.insertRule(e+"{"+n+"}",i):t.addRule(e,n,i)}function h(t){return("insertRule"in t?t.cssRules:t.rules).length}function m(t,e,n){for(var i=0,o=t.length;i=0},x=y?function(t,e){g(t,e)||t.classList.add(e)}:function(t,e){g(t,e)||(t.className+=" "+e)},b=y?function(t,e){g(t,e)&&t.classList.remove(e)}:function(t,e){g(t,e)&&(t.className=t.className.replace(e,""))};function w(t,e){return t.hasAttribute(e)}function T(t,e){return t.getAttribute(e)}function B(t){return void 0!==t.item}function C(t,e){if(t=B(t)||t instanceof Array?t:[t],"[object Object]"===Object.prototype.toString.call(e))for(var n=t.length;n--;)for(var i in e)t[n].setAttribute(i,e[i])}function S(t,e){t=B(t)||t instanceof Array?t:[t];for(var n=(e=e instanceof Array?e:[e]).length,i=t.length;i--;)for(var o=n;o--;)t[i].removeAttribute(e[o])}function M(t){for(var e=[],n=0,i=t.length;n=0&&!n&&P;t.addEventListener(i,e[i],o)}}function R(t,e){for(var n in e){var i=["touchstart","touchmove"].indexOf(n)>=0&&P;t.removeEventListener(n,e[n],i)}}n.d(e,"tns",function(){return k});var k=function(t){t=u({container:".slider",mode:"carousel",axis:"horizontal",items:1,gutter:0,edgePadding:0,fixedWidth:!1,autoWidth:!1,viewportMax:!1,slideBy:1,center:!1,controls:!0,controlsPosition:"top",controlsText:["prev","next"],controlsContainer:!1,prevButton:!1,nextButton:!1,nav:!0,navPosition:"top",navContainer:!1,navAsThumbnails:!1,arrowKeys:!1,speed:300,autoplay:!1,autoplayPosition:"top",autoplayTimeout:5e3,autoplayDirection:"forward",autoplayText:["start","stop"],autoplayHoverPause:!1,autoplayButton:!1,autoplayButtonOutput:!0,autoplayResetOnVisibility:!0,animateIn:"tns-fadeIn",animateOut:"tns-fadeOut",animateNormal:"tns-normal",animateDelay:!1,loop:!0,rewind:!1,autoHeight:!1,responsive:!1,lazyload:!1,lazyloadSelector:".tns-lazy-img",touch:!0,mouseDrag:!1,swipeAngle:15,nested:!1,preventActionWhenRunning:!1,preventScrollOnTouch:!1,freezable:!0,onInit:!1,useLocalStorage:!0},t||{});var e=document,n=window,i={ENTER:13,SPACE:32,LEFT:37,RIGHT:39},a={},d=t.useLocalStorage;if(d){var y=navigator.userAgent,B=new Date;try{(a=n.localStorage)?(a.setItem(B,B),d=a.getItem(B)==B,a.removeItem(B)):d=!1,d||(a={})}catch(t){d=!1}d&&(a.tnsApp&&a.tnsApp!==y&&["tC","tPL","tMQ","tTf","t3D","tTDu","tTDe","tADu","tADe","tTE","tAE"].forEach(function(t){a.removeItem(t)}),localStorage.tnsApp=y)}var I=a.tC?l(a.tC):s(a,"tC",function(){var t=document,e=c(),n=f(e),i=t.createElement("div"),o=!1;e.appendChild(i);try{for(var a,r="(10px * 10)",u=["calc"+r,"-moz-calc"+r,"-webkit-calc"+r],l=0;l<3;l++)if(a=u[l],i.style.width=a,100===i.offsetWidth){o=a.replace(r,"");break}}catch(t){}return e.fake?p(e,n):i.remove(),o}(),d),D=a.tPL?l(a.tPL):s(a,"tPL",function(){var t,e=document,n=c(),i=f(n),o=e.createElement("div"),a=e.createElement("div"),r="";o.className="tns-t-subp2",a.className="tns-t-ct";for(var u=0;u<70;u++)r+="";return a.innerHTML=r,o.appendChild(a),n.appendChild(o),t=Math.abs(o.getBoundingClientRect().left-a.children[67].getBoundingClientRect().left)<2,n.fake?p(n,i):o.remove(),t}(),d),P=a.tMQ?l(a.tMQ):s(a,"tMQ",function(){var t,e=document,n=c(),i=f(n),o=e.createElement("div"),a=e.createElement("style"),r="@media all and (min-width:1px){.tns-mq-test{position:absolute}}";return a.type="text/css",o.className="tns-mq-test",n.appendChild(a),n.appendChild(o),a.styleSheet?a.styleSheet.cssText=r:a.appendChild(e.createTextNode(r)),t=window.getComputedStyle?window.getComputedStyle(o).position:o.currentStyle.position,n.fake?p(n,i):o.remove(),"absolute"===t}(),d),z=a.tTf?l(a.tTf):s(a,"tTf",O("transform"),d),W=a.t3D?l(a.t3D):s(a,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=c(),o=f(i),a=n.createElement("p"),r=t.length>9?"-"+t.slice(0,-9).toLowerCase()+"-":"";return r+="transform",i.insertBefore(a,null),a.style[t]="translate3d(1px,1px,1px)",e=window.getComputedStyle(a).getPropertyValue(r),i.fake?p(i,o):a.remove(),void 0!==e&&e.length>0&&"none"!==e}(z),d),j=a.tTDu?l(a.tTDu):s(a,"tTDu",O("transitionDuration"),d),F=a.tTDe?l(a.tTDe):s(a,"tTDe",O("transitionDelay"),d),q=a.tADu?l(a.tADu):s(a,"tADu",O("animationDuration"),d),_=a.tADe?l(a.tADe):s(a,"tADe",O("animationDelay"),d),$=a.tTE?l(a.tTE):s(a,"tTE",L(j,"Transition"),d),V=a.tAE?l(a.tAE):s(a,"tAE",L(q,"Animation"),d),K=n.console&&"function"==typeof n.console.warn,G=["container","controlsContainer","prevButton","nextButton","navContainer","autoplayButton"],Q={};if(G.forEach(function(n){if("string"==typeof t[n]){var i=t[n],o=e.querySelector(i);if(Q[n]=i,!o||!o.nodeName)return void(K&&console.warn("Can't find",t[n]));t[n]=o}}),!(t.container.children.length<1)){var X=t.responsive,Y=t.nested,J="carousel"===t.mode;if(X){0 in X&&(t=u(t,X[0]),delete X[0]);var U={};for(var Z in X){var tt=X[Z];tt="number"==typeof tt?{items:tt}:tt,U[Z]=tt}X=U,U=null}if(J||function t(e){for(var n in e)J||("slideBy"===n&&(e[n]="page"),"edgePadding"===n&&(e[n]=!1),"autoHeight"===n&&(e[n]=!1)),"responsive"===n&&t(e[n])}(t),!J){t.axis="horizontal",t.slideBy="page",t.edgePadding=!1;var et=t.animateIn,nt=t.animateOut,it=t.animateDelay,ot=t.animateNormal}var at,rt,ut="horizontal"===t.axis,lt=e.createElement("div"),st=e.createElement("div"),ct=t.container,dt=ct.parentNode,ft=ct.outerHTML,pt=ct.children,vt=pt.length,ht=An(),mt=!1;X&&Xn(),J&&(ct.className+=" tns-vpfix");var yt,gt,xt,bt,wt,Tt,Bt,Ct,St=t.autoWidth,Mt=Dn("fixedWidth"),Nt=Dn("edgePadding"),Et=Dn("gutter"),At=Ln(),Ot=Dn("center"),Lt=St?1:Math.floor(Dn("items")),It=Dn("slideBy"),Dt=t.viewportMax||t.fixedWidthViewportWidth,Pt=Dn("arrowKeys"),Ht=Dn("speed"),Rt=t.rewind,kt=!Rt&&t.loop,zt=Dn("autoHeight"),Wt=Dn("controls"),jt=Dn("controlsText"),Ft=Dn("nav"),qt=Dn("touch"),_t=Dn("mouseDrag"),$t=Dn("autoplay"),Vt=Dn("autoplayTimeout"),Kt=Dn("autoplayText"),Gt=Dn("autoplayHoverPause"),Qt=Dn("autoplayResetOnVisibility"),Xt=(Ct=document.createElement("style"),Bt&&Ct.setAttribute("media",Bt),document.querySelector("head").appendChild(Ct),Ct.sheet?Ct.sheet:Ct.styleSheet),Yt=t.lazyload,Jt=(t.lazyloadSelector,[]),Ut=kt?(wt=function(){if(St||Mt&&!Dt)return vt-1;var e=Mt?"fixedWidth":"items",n=[];if((Mt||t[e]=-ee)return t}:function(){return Ot&&J&&!kt?vt-1:kt||J?Math.max(0,Zt-Math.ceil(Lt)):Zt-1},ue=Mn(Dn("startIndex")),le=ue,se=(Sn(),0),ce=St?null:re(),de=t.preventActionWhenRunning,fe=t.swipeAngle,pe=!fe||"?",ve=!1,he=t.onInit,me=new function(){return{topics:{},on:function(t,e){this.topics[t]=this.topics[t]||[],this.topics[t].push(e)},off:function(t,e){if(this.topics[t])for(var n=0;n=0&&(0===e?Ve.disabled||Li(t,-1):Ke.disabled||Li(t,1))}},Se={click:function(t){if(ve){if(de)return;Ai()}var e=ji(t=Wi(t));for(;e!==Ye&&!w(e,"data-nav");)e=e.parentNode;if(w(e,"data-nav")){var n=tn=Number(T(e,"data-nav")),i=Mt||St?n*vt/Ue:n*Lt,o=De?n:Math.min(Math.ceil(i),vt-1);Oi(o,t),en===n&&(ln&&Ri(),tn=-1)}},keydown:function(t){t=Wi(t);var n=e.activeElement;if(!w(n,"data-nav"))return;var o=[i.LEFT,i.RIGHT,i.ENTER,i.SPACE].indexOf(t.keyCode),a=Number(T(n,"data-nav"));o>=0&&(0===o?a>0&&zi(Xe[a-1]):1===o?a=0&&Li(t,0===e?-1:1)}},Ae={touchstart:$i,touchmove:Vi,touchend:Ki,touchcancel:Ki},Oe={mousedown:$i,mousemove:Vi,mouseup:Ki,mouseleave:Ki},Le=In("controls"),Ie=In("nav"),De=!!St||t.navAsThumbnails,Pe=In("autoplay"),He=In("touch"),Re=In("mouseDrag"),ke="tns-slide-active",ze="tns-complete",We={load:function(t){oi(ji(t))},error:function(t){e=ji(t),x(e,"failed"),ai(e);var e}},je="force"===t.preventScrollOnTouch;if(Le)var Fe,qe,_e=t.controlsContainer,$e=t.controlsContainer?t.controlsContainer.outerHTML:"",Ve=t.prevButton,Ke=t.nextButton,Ge=t.prevButton?t.prevButton.outerHTML:"",Qe=t.nextButton?t.nextButton.outerHTML:"";if(Ie)var Xe,Ye=t.navContainer,Je=t.navContainer?t.navContainer.outerHTML:"",Ue=St?vt:Qi(),Ze=0,tn=-1,en=En(),nn=en,on="tns-nav-active",an="Carousel Page ",rn=" (Current Slide)";if(Pe)var un,ln,sn,cn,dn,fn="forward"===t.autoplayDirection?1:-1,pn=t.autoplayButton,vn=t.autoplayButton?t.autoplayButton.outerHTML:"",hn=[""," animation"];if(He||Re)var mn,yn,gn={},xn={},bn=!1,wn=ut?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};St||Cn(xe||Te),z&&(ie=z,oe="translate",W?(oe+=ut?"3d(":"3d(0px, ",ae=ut?", 0px, 0px)":", 0px)"):(oe+=ut?"X(":"Y(",ae=")")),J&&(ct.className=ct.className.replace("tns-vpfix","")),function(){In("gutter");lt.className="tns-outer",st.className="tns-inner",lt.id=ge+"-ow",st.id=ge+"-iw",""===ct.id&&(ct.id=ge);ye+=D||St?" tns-subpixel":" tns-no-subpixel",ye+=I?" tns-calc":" tns-no-calc",St&&(ye+=" tns-autowidth");ye+=" tns-"+t.axis,ct.className+=ye,J?((at=e.createElement("div")).id=ge+"-mw",at.className="tns-ovh",lt.appendChild(at),at.appendChild(st)):lt.appendChild(st);if(zt){var n=at||st;n.className+=" tns-ah"}if(dt.insertBefore(lt,ct),st.appendChild(ct),m(pt,function(t,e){x(t,"tns-item"),t.id||(t.id=ge+"-item"+e),!J&&ot&&x(t,ot),C(t,{"aria-hidden":"true",tabindex:"-1"})}),Ut){for(var i=e.createDocumentFragment(),o=e.createDocumentFragment(),a=Ut;a--;){var r=a%vt,u=pt[r].cloneNode(!0);if(S(u,"id"),o.insertBefore(u,o.firstChild),J){var l=pt[vt-1-r].cloneNode(!0);S(l,"id"),i.appendChild(l)}}ct.insertBefore(i,ct.firstChild),ct.appendChild(o),pt=ct.children}}(),function(){if(!J)for(var e=ue,i=ue+Math.min(vt,Lt);e .tns-item","font-size:"+n.getComputedStyle(pt[0]).fontSize+";",h(Xt)),v(Xt,"#"+ge,"font-size:0;",h(Xt))):J&&m(pt,function(t,e){t.style.marginLeft=function(t){return I?I+"("+100*t+"% / "+Zt+")":100*t/Zt+"%"}(e)}));if(P){if(j){var a=at&&t.autoHeight?Wn(t.speed):"";v(Xt,"#"+ge+"-mw",a,h(Xt))}a=Pn(t.edgePadding,t.gutter,t.fixedWidth,t.speed,t.autoHeight),v(Xt,"#"+ge+"-iw",a,h(Xt)),J&&(a=ut&&!St?"width:"+Hn(t.fixedWidth,t.gutter,t.items)+";":"",j&&(a+=Wn(Ht)),v(Xt,"#"+ge,a,h(Xt))),a=ut&&!St?Rn(t.fixedWidth,t.gutter,t.items):"",t.gutter&&(a+=kn(t.gutter)),J||(j&&(a+=Wn(Ht)),q&&(a+=jn(Ht))),a&&v(Xt,"#"+ge+" > .tns-item",a,h(Xt))}else{ci(),st.style.cssText=Pn(Nt,Et,Mt,zt),J&&ut&&!St&&(ct.style.width=Hn(Mt,Et,Lt));var a=ut&&!St?Rn(Mt,Et,Lt):"";Et&&(a+=kn(Et)),a&&v(Xt,"#"+ge+" > .tns-item",a,h(Xt))}if(X&&P)for(var r in X){r=parseInt(r);var u=X[r],a="",l="",s="",c="",d="",f=St?null:Dn("items",r),p=Dn("fixedWidth",r),y=Dn("speed",r),g=Dn("edgePadding",r),w=Dn("autoHeight",r),T=Dn("gutter",r);j&&at&&Dn("autoHeight",r)&&"speed"in u&&(l="#"+ge+"-mw{"+Wn(y)+"}"),("edgePadding"in u||"gutter"in u)&&(s="#"+ge+"-iw{"+Pn(g,T,p,y,w)+"}"),J&&ut&&!St&&("fixedWidth"in u||"items"in u||Mt&&"gutter"in u)&&(c="width:"+Hn(p,T,f)+";"),j&&"speed"in u&&(c+=Wn(y)),c&&(c="#"+ge+"{"+c+"}"),("fixedWidth"in u||Mt&&"gutter"in u||!J&&"items"in u)&&(d+=Rn(p,T,f)),"gutter"in u&&(d+=kn(T)),!J&&"speed"in u&&(j&&(d+=Wn(y)),q&&(d+=jn(y))),d&&(d="#"+ge+" > .tns-item{"+d+"}"),(a=l+s+c+d)&&Xt.insertRule("@media (min-width: "+r/16+"em) {"+a+"}",Xt.cssRules.length)}}(),Fn();var Tn=kt?J?function(){var t=se,e=ce;t+=It,e-=It,Nt?(t+=1,e-=1):Mt&&(At+Et)%(Mt+Et)&&(e-=1),Ut&&(ue>e?ue-=vt:uece)for(;ue>=se+vt;)ue-=vt;else if(ue=0?"%":"px",o=o.replace(l,""),s=Number(t.style[e].replace(n,"").replace(i,"").replace(l,"")),c=(o-s)/a*u,setTimeout(function o(){a-=u,s+=c,t.style[e]=n+s+l+i,a>0?setTimeout(o,u):r()},u)),ut||Gi()}:function(){Jt=[];var t={};t[$]=t[V]=Ai,R(pt[le],t),H(pt[ue],t),Mi(le,et,nt,!0),Mi(ue,ot,et),$&&V&&Ht&&A(ct)||Ai()};return{version:"2.9.2",getInfo:Yi,events:me,goTo:Oi,play:function(){$t&&!ln&&(Hi(),cn=!1)},pause:function(){ln&&(Ri(),cn=!0)},isOn:mt,updateSliderHeight:fi,refresh:Fn,destroy:function(){if(Xt.disabled=!0,Xt.ownerNode&&Xt.ownerNode.remove(),R(n,{resize:Kn}),Pt&&R(e,Ee),_e&&R(_e,Ce),Ye&&R(Ye,Se),R(ct,Me),R(ct,Ne),pn&&R(pn,{click:ki}),$t&&clearInterval(un),J&&$){var i={};i[$]=Ai,R(ct,i)}qt&&R(ct,Ae),_t&&R(ct,Oe);var o=[ft,$e,Ge,Qe,Je,vn];for(var a in G.forEach(function(e,n){var i="container"===e?lt:t[e];if("object"==typeof i){var a=!!i.previousElementSibling&&i.previousElementSibling,r=i.parentNode;i.outerHTML=o[n],t[e]=a?a.nextElementSibling:r.firstElementChild}}),G=et=nt=it=ot=ut=lt=st=ct=dt=ft=pt=vt=rt=ht=St=Mt=Nt=Et=At=Lt=It=Dt=Pt=Ht=Rt=kt=zt=Xt=Yt=yt=Jt=Ut=Zt=te=ee=ne=ie=oe=ae=re=ue=le=se=ce=fe=pe=ve=he=me=ye=ge=xe=be=we=Te=Be=Ce=Se=Me=Ne=Ee=Ae=Oe=Le=Ie=De=Pe=He=Re=ke=ze=We=gt=Wt=jt=_e=$e=Ve=Ke=Fe=qe=Ft=Ye=Je=Xe=Ue=Ze=tn=en=nn=on=an=rn=$t=Vt=fn=Kt=Gt=pn=vn=Qt=hn=un=ln=sn=cn=dn=gn=xn=mn=bn=yn=wn=qt=_t=null,this)"rebuild"!==a&&(this[a]=null);mt=!1},rebuild:function(){return k(u(t,Q))}}}function Cn(t){t&&(Wt=Ft=qt=_t=Pt=$t=Gt=Qt=!1)}function Sn(){for(var t=J?ue-Ut:ue;t<0;)t+=vt;return t%vt+1}function Mn(t){return t=t?Math.max(0,Math.min(kt?vt-1:vt-Lt,t)):0,J?t+Ut:t}function Nn(t){for(null==t&&(t=ue),J&&(t-=Ut);t<0;)t+=vt;return Math.floor(t%vt)}function En(){var t,e=Nn();return t=De?e:Mt||St?Math.ceil((e+1)*Ue/vt-1):Math.floor(e/Lt),!kt&&J&&ue===ce&&(t=Ue-1),t}function An(){return n.innerWidth||e.documentElement.clientWidth||e.body.clientWidth}function On(t){return"top"===t?"afterbegin":"beforeend"}function Ln(){var t=Nt?2*Nt-Et:0;return function t(n){var i,o,a=e.createElement("div");return n.appendChild(a),o=(i=a.getBoundingClientRect()).right-i.left,a.remove(),o||t(n.parentNode)}(dt)-t}function In(e){if(t[e])return!0;if(X)for(var n in X)if(X[n][e])return!0;return!1}function Dn(e,n){if(null==n&&(n=ht),"items"===e&&Mt)return Math.floor((At+Et)/(Mt+Et))||1;var i=t[e];if(X)for(var o in X)n>=parseInt(o)&&e in X[o]&&(i=X[o][e]);return"slideBy"===e&&"page"===i&&(i=Dn("items")),J||"slideBy"!==e&&"items"!==e||(i=Math.floor(i)),i}function Pn(t,e,n,i,o){var a="";if(void 0!==t){var r=t;e&&(r-=e),a=ut?"margin: 0 "+r+"px 0 "+t+"px;":"margin: "+t+"px 0 "+r+"px 0;"}else if(e&&!n){var u="-"+e+"px";a="margin: 0 "+(ut?u+" 0 0":"0 "+u+" 0")+";"}return!J&&o&&j&&i&&(a+=Wn(i)),a}function Hn(t,e,n){return t?(t+e)*Zt+"px":I?I+"("+100*Zt+"% / "+n+")":100*Zt/n+"%"}function Rn(t,e,n){var i;if(t)i=t+e+"px";else{J||(n=Math.floor(n));var o=J?Zt:n;i=I?I+"(100% / "+o+")":100/o+"%"}return i="width:"+i,"inner"!==Y?i+";":i+" !important;"}function kn(t){var e="";!1!==t&&(e=(ut?"padding-":"margin-")+(ut?"right":"bottom")+": "+t+"px;");return e}function zn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function Wn(t){return zn(j,18)+"transition-duration:"+t/1e3+"s;"}function jn(t){return zn(q,17)+"animation-duration:"+t/1e3+"s;"}function Fn(){if(In("autoHeight")||St||!ut){var t=ct.querySelectorAll("img");m(t,function(t){var e=t.src;e&&e.indexOf("data:image")<0?(H(t,We),t.src="",t.src=e,x(t,"loading")):Yt||oi(t)}),o(function(){li(M(t),function(){gt=!0})}),!St&&ut&&(t=ri(ue,Math.min(ue+Lt-1,Zt-1))),Yt?qn():o(function(){li(M(t),qn)})}else J&&Ci(),$n(),Vn()}function qn(){if(St){var t=kt?ue:vt-1;!function e(){pt[t-1].getBoundingClientRect().right.toFixed(2)===pt[t].getBoundingClientRect().left.toFixed(2)?_n():setTimeout(function(){e()},16)}()}else _n()}function _n(){ut&&!St||(pi(),St?(ee=Ti(),we&&(Te=Qn()),ce=re(),Cn(xe||Te)):Gi()),J&&Ci(),$n(),Vn()}function $n(){if(vi(),lt.insertAdjacentHTML("afterbegin",'slide '+ei()+" of "+vt+"
"),xt=lt.querySelector(".tns-liveregion .current"),Pe){var e=$t?"stop":"start";pn?C(pn,{"data-action":e}):t.autoplayButtonOutput&&(lt.insertAdjacentHTML(On(t.autoplayPosition),'"),pn=lt.querySelector("[data-action]")),pn&&H(pn,{click:ki}),$t&&(Hi(),Gt&&H(ct,Me),Qt&&H(ct,Ne))}if(Ie){if(Ye)C(Ye,{"aria-label":"Carousel Pagination"}),m(Xe=Ye.children,function(t,e){C(t,{"data-nav":e,tabindex:"-1","aria-label":an+(e+1),"aria-controls":ge})});else{for(var n="",i=De?"":'style="display:none"',o=0;o';n=''+n+"
",lt.insertAdjacentHTML(On(t.navPosition),n),Ye=lt.querySelector(".tns-nav"),Xe=Ye.children}if(Xi(),j){var a=j.substring(0,j.length-18).toLowerCase(),r="transition: all "+Ht/1e3+"s";a&&(r="-"+a+"-"+r),v(Xt,"[aria-controls^="+ge+"-item]",r,h(Xt))}C(Xe[en],{"aria-label":an+(en+1)+rn}),S(Xe[en],"tabindex"),x(Xe[en],on),H(Ye,Se)}Le&&(_e||Ve&&Ke||(lt.insertAdjacentHTML(On(t.controlsPosition),'"),_e=lt.querySelector(".tns-controls")),Ve&&Ke||(Ve=_e.children[0],Ke=_e.children[1]),t.controlsContainer&&C(_e,{"aria-label":"Carousel Navigation",tabindex:"0"}),(t.controlsContainer||t.prevButton&&t.nextButton)&&C([Ve,Ke],{"aria-controls":ge,tabindex:"-1"}),(t.controlsContainer||t.prevButton&&t.nextButton)&&(C(Ve,{"data-controls":"prev"}),C(Ke,{"data-controls":"next"})),Fe=mi(Ve),qe=mi(Ke),xi(),_e?H(_e,Ce):(H(Ve,Ce),H(Ke,Ce))),Yn()}function Vn(){if(J&&$){var i={};i[$]=Ai,H(ct,i)}qt&&H(ct,Ae,t.preventScrollOnTouch),_t&&H(ct,Oe),Pt&&H(e,Ee),"inner"===Y?me.on("outerResized",function(){Gn(),me.emit("innerLoaded",Yi())}):(X||Mt||St||zt||!ut)&&H(n,{resize:Kn}),zt&&("outer"===Y?me.on("innerLoaded",ui):xe||ui()),ii(),xe?Zn():Te&&Un(),me.on("indexChanged",si),"inner"===Y&&me.emit("innerLoaded",Yi()),"function"==typeof he&&he(Yi()),mt=!0}function Kn(t){o(function(){Gn(Wi(t))})}function Gn(n){if(mt){"outer"===Y&&me.emit("outerResized",Yi(n)),ht=An();var i,o=rt,a=!1;X&&(Xn(),(i=o!==rt)&&me.emit("newBreakpointStart",Yi(n)));var r,u,l=Lt,s=xe,c=Te,d=Pt,f=Wt,p=Ft,y=qt,g=_t,w=$t,T=Gt,B=Qt,C=ue;if(i){var S=Mt,M=zt,A=jt,O=Ot,L=Kt;if(!P)var I=Et,D=Nt}if(Pt=Dn("arrowKeys"),Wt=Dn("controls"),Ft=Dn("nav"),qt=Dn("touch"),Ot=Dn("center"),_t=Dn("mouseDrag"),$t=Dn("autoplay"),Gt=Dn("autoplayHoverPause"),Qt=Dn("autoplayResetOnVisibility"),i&&(xe=Dn("disable"),Mt=Dn("fixedWidth"),Ht=Dn("speed"),zt=Dn("autoHeight"),jt=Dn("controlsText"),Kt=Dn("autoplayText"),Vt=Dn("autoplayTimeout"),P||(Nt=Dn("edgePadding"),Et=Dn("gutter"))),Cn(xe),At=Ln(),ut&&!St||xe||(pi(),ut||(Gi(),a=!0)),(Mt||St)&&(ee=Ti(),ce=re()),(i||Mt)&&(Lt=Dn("items"),It=Dn("slideBy"),(u=Lt!==l)&&(Mt||St||(ce=re()),Tn())),i&&xe!==s&&(xe?Zn():function(){if(!be)return;if(Xt.disabled=!1,ct.className+=ye,Ci(),kt)for(var t=Ut;t--;)J&&E(pt[t]),E(pt[Zt-t-1]);if(!J)for(var e=ue,n=ue+vt;e=ue&&e .tns-item",j,h(Xt))}zt&&ui(),a&&(Ci(),le=ue)}i&&me.emit("newBreakpointEnd",Yi(n))}}function Qn(){if(!Mt&&!St)return vt<=(Ot?Lt-(Lt-1)/2:Lt);var t=Mt?(Mt+Et)*vt:yt[vt],e=Nt?At+2*Nt:At+Et;return Ot&&(e-=Mt?(At-Mt)/2:(At-(yt[ue+1]-yt[ue]-Et))/2),t<=e}function Xn(){for(var t in rt=0,X)t=parseInt(t),ht>=t&&(rt=t)}function Yn(){!$t&&pn&&N(pn),!Ft&&Ye&&N(Ye),Wt||(_e?N(_e):(Ve&&N(Ve),Ke&&N(Ke)))}function Jn(){$t&&pn&&E(pn),Ft&&Ye&&E(Ye),Wt&&(_e?E(_e):(Ve&&E(Ve),Ke&&E(Ke)))}function Un(){if(!Be){if(Nt&&(st.style.margin="0px"),Ut)for(var t="tns-transparent",e=Ut;e--;)J&&x(pt[e],t),x(pt[Zt-e-1],t);Yn(),Be=!0}}function Zn(){if(!be){if(Xt.disabled=!0,ct.className=ct.className.replace(ye.substring(1),""),S(ct,["style"]),kt)for(var t=Ut;t--;)J&&N(pt[t]),N(pt[Zt-t-1]);if(ut&&J||S(st,["style"]),!J)for(var e=ue,n=ue+vt;e=.5&&(e=a))});else{if(Mt){var a=Mt+Et;Ot||Nt?(o=Math.floor(n/a),e=Math.ceil(i/a-1)):e=o+Math.ceil(At/a)-1}else if(Ot||Nt){var r=Lt-1;if(Ot?(o-=r/2,e=ue+r/2):e=ue+r,Nt){var u=Nt*Lt/At;o-=u,e+=u}o=Math.floor(o),e=Math.ceil(e)}else e=o+Lt-1;o=Math.max(o,0),e=Math.min(e,Zt-1)}return[o,e]}function ii(){Yt&&!xe&&ri.apply(null,ni()).forEach(function(t){if(!g(t,ze)){var e={};e[$]=function(t){t.stopPropagation()},H(t,e),H(t,We),t.src=T(t,"data-src");var n=T(t,"data-srcset");n&&(t.srcset=n),x(t,"loading")}})}function oi(t){x(t,"loaded"),ai(t)}function ai(t){x(t,"tns-complete"),b(t,"loading"),R(t,We)}function ri(t,e){for(var n=[];t<=e;)m(pt[t].querySelectorAll("img"),function(t){n.push(t)}),t++;return n}function ui(){var t=ri.apply(null,ni());o(function(){li(t,fi)})}function li(t,e){return gt?e():(t.forEach(function(e,n){g(e,ze)&&t.splice(n,1)}),t.length?void o(function(){li(t,e)}):e())}function si(){ii(),vi(),ti(),xi(),function(){if(Ft&&(en=tn>=0?tn:En(),tn=-1,en!==nn)){var t=Xe[nn],e=Xe[en];C(t,{tabindex:"-1","aria-label":an+(nn+1)}),b(t,on),C(e,{"aria-label":an+(en+1)+rn}),S(e,"tabindex"),x(e,on),nn=en}}()}function ci(){J&&zt&&(at.style[j]=Ht/1e3+"s")}function di(t,e){for(var n=[],i=t,o=Math.min(t+e,Zt);i=e&&i<=n?w(t,"aria-hidden")&&(S(t,["aria-hidden","tabindex"]),x(t,ke)):w(t,"aria-hidden")||(C(t,{"aria-hidden":"true",tabindex:"-1"}),b(t,ke))})}function hi(t){return t.nodeName.toLowerCase()}function mi(t){return"button"===hi(t)}function yi(t){return"true"===t.getAttribute("aria-disabled")}function gi(t,e,n){t?e.disabled=n:e.setAttribute("aria-disabled",n.toString())}function xi(){if(Wt&&!Rt&&!kt){var t=Fe?Ve.disabled:yi(Ve),e=qe?Ke.disabled:yi(Ke),n=ue<=se,i=!Rt&&ue>=ce;n&&!t&&gi(Fe,Ve,!0),!n&&t&&gi(Fe,Ve,!1),i&&!e&&gi(qe,Ke,!0),!i&&e&&gi(qe,Ke,!1)}}function bi(t,e){j&&(t.style[j]=e)}function wi(t){return null==t&&(t=ue),St?(At-(Nt?Et:0)-(yt[t+1]-yt[t]-Et))/2:Mt?(At-Mt)/2:(Lt-1)/2}function Ti(){var t=At+(Nt?Et:0)-(Mt?(Mt+Et)*Zt:yt[Zt]);return Ot&&!kt&&(t=Mt?-(Mt+Et)*(Zt-1)-wi():wi(Zt-1)-yt[Zt-1]),t>0&&(t=0),t}function Bi(t){var e;if(null==t&&(t=ue),ut&&!St)if(Mt)e=-(Mt+Et)*t,Ot&&(e+=wi());else{var n=z?Zt:Lt;Ot&&(t-=wi()),e=100*-t/n}else e=-yt[t],Ot&&St&&(e+=wi());return te&&(e=Math.max(e,ee)),e+=!ut||St||Mt?"px":"%"}function Ci(t){bi(ct,"0s"),Si(t)}function Si(t){null==t&&(t=Bi()),ct.style[ie]=oe+t+ae}function Mi(t,e,n,i){var o=t+Lt;kt||(o=Math.min(o,Zt));for(var a=t;a=0&&Ri(),ve=!0,Bn())}function Ei(t){return t.toLowerCase().replace(/-/g,"")}function Ai(t){if(J||ve){if(me.emit("transitionEnd",Yi(t)),!J&&Jt.length>0)for(var e=0;e0?1:-1;i+=ue+i-vt>=se?vt*o:2*vt*o*-1}ue+=i,J&&kt&&(uece&&(ue-=vt)),Nn(ue)!==Nn(le)&&Ni(e)}}function Li(t,e){if(ve){if(de)return;Ai()}var n;if(!e){for(var i=ji(t=Wi(t));i!==_e&&[Ve,Ke].indexOf(i)<0;)i=i.parentNode;var o=[Ve,Ke].indexOf(i);o>=0&&(n=!0,e=0===o?-1:1)}if(Rt){if(ue===se&&-1===e)return void Oi("last",t);if(ue===ce&&1===e)return void Oi("first",t)}e&&(ue+=It*e,St&&(ue=Math.floor(ue)),Ni(n||t&&"keydown"===t.type?t:null))}function Ii(){un=setInterval(function(){Li(null,fn)},Vt),ln=!0}function Di(){clearInterval(un),ln=!1}function Pi(t,e){C(pn,{"data-action":t}),pn.innerHTML=hn[0]+t+hn[1]+e}function Hi(){Ii(),pn&&Pi("stop",Kt[1])}function Ri(){Di(),pn&&Pi("start",Kt[0])}function ki(){ln?(Ri(),cn=!0):(Hi(),cn=!1)}function zi(t){t.focus()}function Wi(t){return Fi(t=t||n.event)?t.changedTouches[0]:t}function ji(t){return t.target||n.event.srcElement}function Fi(t){return t.type.indexOf("touch")>=0}function qi(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function _i(){return a=xn.y-gn.y,r=xn.x-gn.x,e=Math.atan2(a,r)*(180/Math.PI),n=fe,i=!1,(o=Math.abs(90-Math.abs(e)))>=90-n?i="horizontal":o<=n&&(i="vertical"),i===t.axis;var e,n,i,o,a,r}function $i(t){if(ve){if(de)return;Ai()}$t&&ln&&Di(),bn=!0,yn&&(r(yn),yn=null);var e=Wi(t);me.emit(Fi(t)?"touchStart":"dragStart",Yi(t)),!Fi(t)&&["img","a"].indexOf(hi(ji(t)))>=0&&qi(t),xn.x=gn.x=e.clientX,xn.y=gn.y=e.clientY,J&&(mn=parseFloat(ct.style[ie].replace(oe,"")),bi(ct,"0s"))}function Vi(t){if(bn){var e=Wi(t);xn.x=e.clientX,xn.y=e.clientY,J?yn||(yn=o(function(){!function t(e){if(!pe)return void(bn=!1);r(yn);bn&&(yn=o(function(){t(e)}));"?"===pe&&(pe=_i());if(pe){!je&&Fi(e)&&(je=!0);try{e.type&&me.emit(Fi(e)?"touchMove":"dragMove",Yi(e))}catch(t){}var n=mn,i=wn(xn,gn);if(!ut||Mt||St)n+=i,n+="px";else{var a=z?i*Lt*100/((At+Et)*Zt):100*i/(At+Et);n+=a,n+="%"}ct.style[ie]=oe+n+ae}}(t)})):("?"===pe&&(pe=_i()),pe&&(je=!0)),je&&t.preventDefault()}}function Ki(e){if(bn){yn&&(r(yn),yn=null),J&&bi(ct,""),bn=!1;var n=Wi(e);xn.x=n.clientX,xn.y=n.clientY;var i=wn(xn,gn);if(Math.abs(i)){if(!Fi(e)){var a=ji(e);H(a,{click:function t(e){qi(e),R(a,{click:t})}})}J?yn=o(function(){if(ut&&!St){var t=-i*Lt/(At+Et);t=i>0?Math.floor(t):Math.ceil(t),ue+=t}else{var n=-(mn+i);if(n<=0)ue=se;else if(n>=yt[Zt-1])ue=ce;else for(var o=0;o=yt[o];)ue=o,n>yt[o]&&i<0&&(ue+=1),o++}Ni(e,i),me.emit(Fi(e)?"touchEnd":"dragEnd",Yi(e))}):pe&&Li(e,i>0?-1:1)}}"auto"===t.preventScrollOnTouch&&(je=!1),fe&&(pe="?"),$t&&!ln&&Ii()}function Gi(){(at||st).style.height=yt[ue+Lt]-yt[ue]+"px"}function Qi(){var t=Mt?(Mt+Et)*vt/At:vt/Lt;return Math.min(Math.ceil(t),vt)}function Xi(){if(Ft&&!De&&Ue!==Ze){var t=Ze,e=Ue,n=E;for(Ze>Ue&&(t=Ue,e=Ze,n=N);t