New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@pluginjs/thumbnails

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pluginjs/thumbnails - npm Package Compare versions

Comparing version 0.7.22 to 0.7.23

6

dist/thumbnails.common.js
/*!
* @pluginjs/thumbnails v0.7.22 (https://pluginjs.com)
* @pluginjs/thumbnails v0.7.23 (https://pluginjs.com)
* Copyright 2019 Creation Studio Limited

@@ -58,3 +58,3 @@ * Released under the GPL-3.0 License.

if (i % 2) {
ownKeys(source, true).forEach(function (key) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);

@@ -65,3 +65,3 @@ });

} else {
ownKeys(source).forEach(function (key) {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));

@@ -68,0 +68,0 @@ });

/*!
* @pluginjs/thumbnails v0.7.22 (https://pluginjs.com)
* @pluginjs/thumbnails v0.7.23 (https://pluginjs.com)
* Copyright 2019 Creation Studio Limited
* Released under the GPL-3.0 License.
*/
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var anime=_interopDefault(require("animejs")),Component=_interopDefault(require("@pluginjs/component")),templateEngine=_interopDefault(require("@pluginjs/template")),styled=require("@pluginjs/styled"),classes$1=require("@pluginjs/classes"),events$1=require("@pluginjs/events"),dom=require("@pluginjs/dom"),utils=require("@pluginjs/utils"),decorator=require("@pluginjs/decorator"),Swipeable=_interopDefault(require("@pluginjs/swipeable")),ImageLoader=_interopDefault(require("@pluginjs/image-loader")),Loader=_interopDefault(require("@pluginjs/loader")),Breakpoints=_interopDefault(require("@pluginjs/breakpoints"));function _defineProperty(e,s,t){return s in e?Object.defineProperty(e,s,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[s]=t,e}function ownKeys(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);s&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),t.push.apply(t,i)}return t}function _objectSpread2(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};s%2?ownKeys(t,!0).forEach(function(s){_defineProperty(e,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(t).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))})}return e}var _dec,_dec2,_dec3,_dec4,_dec5,_dec6,_class,namespace="thumbnails",events={READY:"ready",ENABLE:"enable",DISABLE:"disable",DESTROY:"destroy",CHANGE:"change",PREV:"prev",NEXT:"next"},classes={NAMESPACE:"pj-thumb",THEME:"{namespace}s--{theme}",THUMBS:"{namespace}s",INNER:"{namespace}s-inner",THUMB:"{namespace}",LOADER:"{namespace}-loader",LOADED:"{namespace}-loaded",VIDEO:"{namespace}-video",IMAGE:"{namespace}-img",VERTICAL:"{namespace}s-vertical",ACTIVE:"{namespace}-active",DISABLED:"{namespace}-disabled",RESPONSIVE:"{namespace}-responsive"},methods=["enable","disable","destroy","next","prev","go"],defaults={templates:{inner:()=>'<div class="{classes.INNER}"></div>',thumb:()=>'<div class="{classes.THUMB}"><div class="{classes.LOADER}"></div><img class="{classes.IMAGE}"></div>'},data:"html",delegate:"img",vertical:!1,current:0,mode:"full",loader:{theme:"ring",color:"#000",size:"lg"},breakpoint:null},dependencies=["anime"],Thumbnails=(_dec=decorator.themeable())(_class=(_dec2=decorator.styleable(classes))(_class=(_dec3=decorator.eventable(events))(_class=(_dec4=decorator.stateable())(_class=(_dec5=decorator.optionable(defaults,!0))(_class=(_dec6=decorator.register(namespace,{methods:methods,dependencies:dependencies}))(_class=class extends Component{constructor(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.setupOptions(s),this.distance=0,this.pos=0,this.current=null,this.dif=null,this.setupClasses(),this.setupStates(),this.initialize()}initialize(){!this.options.data||this.options.data.length<0||(this.options.breakpoint&&this.initBreakpoints(),this.data="html"===this.options.data?this.parseHtml():this.options.data,this.generate(),this.items=this.inner.querySelectorAll(".".concat(this.classes.THUMB)),this.setDistance(this.options.vertical),this.setItemDistance(this.options.vertical),this.go(this.options.current||0,!1,!1),this.initImageLoader(),this.initSwipeable(),this.bind(),this.enter("initialized"),this.trigger(events.READY))}initBreakpoints(){if(Breakpoints.init(),Breakpoints.all().includes(this.options.breakpoint)){var e=this.options.breakpoint,s=this;Breakpoints.is("".concat(e,"-"))&&classes$1.addClass(this.classes.RESPONSIVE,this.element),Breakpoints.to(e,{enter(){classes$1.addClass(s.classes.RESPONSIVE,s.element)},leave(){classes$1.removeClass(s.classes.RESPONSIVE,s.element)}})}}parseHtml(){var e=[],s=this.element.querySelectorAll(this.options.delegate),t=new RegExp(/\((.+?)\)/);return s.length>0&&s.forEach(s=>{var i=dom.closest(".".concat(this.classes.THUMB),s),a={src:s.getAttribute("src")||window.getComputedStyle(s)["background-image"].match(t)[1].replace(/'/g,"").replace(/"/g,"")};i&&(a.type=classes$1.hasClass(this.classes.VIDEO,i)?"video":"image");var n=Object.entries(s.dataset).reduce((e,s)=>{var[t,i]=s;try{return _objectSpread2({},e,{[t]:JSON.parse('{"data": '.concat(i.replace(/'/g,'"'),"}")).data})}catch(s){return _objectSpread2({},e,{[t]:i})}},{});a=utils.deepMerge(a,n),e.push(a)}),e}generate(){classes$1.addClass(this.classes.THUMBS,this.element),this.options.theme&&classes$1.addClass(this.getThemeClass(),this.element),this.options.vertical&&classes$1.addClass(this.classes.VERTICAL,this.element),this.inner=this.getElement("inner"),this.data.forEach((e,s)=>{var t=this.getElement("thumb");"video"===e.type&&classes$1.addClass(this.classes.VIDEO,t),dom.setData("index",s,t),t.querySelector(".".concat(this.classes.IMAGE)).setAttribute("src",e.src),dom.append(t,this.inner)}),this.element.innerHTML="",dom.append(this.inner,this.element)}initImageLoader(){this.items.forEach(e=>{var s="";this.options.loader&&(s=Loader.of(dom.query(".".concat(this.classes.LOADER),e),this.options.loader)).show(),ImageLoader.of(e.querySelector(".".concat(this.classes.IMAGE))).on("loaded",e=>{this.options.loader&&s.hide(),classes$1.addClass(this.classes.LOADED,dom.closest(".".concat(this.classes.THUMB),e))})})}initSwipeable(){var e=this,s=()=>{this.pos=this.swipeable.position[this.options.vertical?"y":"x"]};this.swipeable=Swipeable.of(this.inner,{rebound:!0,decay:!0,axis:this.options.vertical?"y":"x",reboundPos:"center"===this.options.mode?50:100,offset:"center"===this.options.mode?this.distance/2:0,onStart(){e.enter("dragged")},onDecayend(){s()},onReboundend(){s()},onEnd(){s()}})}getElement(e){var s,t=this.options.templates[e];return s=templateEngine.render(t.call(this),{classes:this.classes}),dom.parseHTML(s)}setDistance(e){this.wrapDistance=e?styled.outerHeight(this.element):styled.outerWidth(this.element),this.innerDistance=e?this.inner.scrollHeight:this.inner.scrollWidth}setItemDistance(e){this.length=this.items.length,this.distance=0,this.gutter=this.length>0?parseInt(window.getComputedStyle(this.items[1])[e?"margin-top":"margin-left"],10):0,this.length>0&&(this.distance=e?styled.outerHeight(this.items[0]):styled.outerWidth(this.items[0]))}bind(){events$1.bindEvent(this.eventName("click"),e=>{if(this.is("dragged"))return this.leave("dragged"),!1;if(this.is("disable")||this.swipeable.is("paning"))return!1;var s=dom.closest(".".concat(this.classes.THUMB),e.target);if(!s)return!1;var t=Number(dom.getData("index",s));return this.go(t)},this.element)}unbind(){events$1.removeEvent(this.eventName(),this.element)}getItemPos(e){return(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.distance/2:this.distance)-this.distance*(e+1)-this.gutter*e}setPos(e){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.options.mode,a=0;if("full"===i){if(this.innerDistance>this.wrapDistance){var n=this.wrapDistance-this.innerDistance;if(null===this.current){var r=this.getItemPos(e);a=n<r?r:n}else if(this.current===this.length-1&&0===e)a=0;else if(0===this.current&&e===this.length-1)a=n;else{var l=this.pos;if(e>this.current){var o=l-this.distance-this.gutter;a=n<o?o:n}else if(e<this.current){var h=l+this.distance+this.gutter;a=h>0?0:h}}}}else"center"===i&&(a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(e,!0));if(t){var c={targets:this.inner,easing:"linear",duration:300};c[s?"translateY":"translateX"]=a,anime(c)}else styled.setStyle({transform:"".concat(s?"translateY":"translateX","(").concat(a,"px)")},this.inner);this.pos=a}resetPos(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=this.wrapDistance;if(this.setDistance(this.options.vertical),this.wrapDistance!==s){this.setItemDistance(this.options.vertical);var t=this.pos,i=this.wrapDistance-this.innerDistance,a=0;i>0||(null===this.dif&&(this.dif=i),"center"===this.options.mode?a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(this.current,!0):((a=this.current===this.length-1?t+(i-this.dif):t)>0&&(a=0),a<i&&(a=i)),this.dif=i,styled.setStyle({transform:"".concat(e?"translateY":"translateX","(").concat(a,"px)")},this.inner),this.pos=a)}}go(e){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.is("disable")||e<0||e>this.length||e===this.current||(this.setPos(e,this.options.vertical,t),classes$1.removeClass(this.classes.ACTIVE,this.items[this.current]),classes$1.addClass(this.classes.ACTIVE,this.items[e]),this.current=e,s&&this.trigger(events.CHANGE))}next(){this.is("disable")||(this.go(this.current+1),this.trigger(events.NEXT))}prev(){this.is("disable")||(this.go(this.current-1),this.trigger(events.PREV))}resize(){this.resetPos(this.options.vertical)}enable(){this.is("disable")&&(classes$1.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1,this.leave("disable")),this.trigger(events.ENABLE)}disable(){this.is("disable")||(classes$1.addClass(this.classes.DISABLED,this.element),this.element.disable=!0,this.enter("disable")),this.trigger(events.DISABLE)}destroy(){this.is("initialized")&&(this.unbind(),!0===this.options.vertical&&classes$1.removeClass(this.classes.VERTICAL,this.element),this.options.theme&&classes$1.removeClass(this.getThemeClass(),this.element),this.is("disabled")&&(classes$1.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1),this.leave("initialized")),this.trigger(events.DESTROY),super.destroy()}})||_class)||_class)||_class)||_class)||_class)||_class;module.exports=Thumbnails;
"use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var anime=_interopDefault(require("animejs")),Component=_interopDefault(require("@pluginjs/component")),templateEngine=_interopDefault(require("@pluginjs/template")),styled=require("@pluginjs/styled"),classes$1=require("@pluginjs/classes"),events$1=require("@pluginjs/events"),dom=require("@pluginjs/dom"),utils=require("@pluginjs/utils"),decorator=require("@pluginjs/decorator"),Swipeable=_interopDefault(require("@pluginjs/swipeable")),ImageLoader=_interopDefault(require("@pluginjs/image-loader")),Loader=_interopDefault(require("@pluginjs/loader")),Breakpoints=_interopDefault(require("@pluginjs/breakpoints"));function _defineProperty(e,s,t){return s in e?Object.defineProperty(e,s,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[s]=t,e}function ownKeys(e,s){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);s&&(i=i.filter((function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable}))),t.push.apply(t,i)}return t}function _objectSpread2(e){for(var s=1;s<arguments.length;s++){var t=null!=arguments[s]?arguments[s]:{};s%2?ownKeys(Object(t),!0).forEach((function(s){_defineProperty(e,s,t[s])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(t,s))}))}return e}var _dec,_dec2,_dec3,_dec4,_dec5,_dec6,_class,namespace="thumbnails",events={READY:"ready",ENABLE:"enable",DISABLE:"disable",DESTROY:"destroy",CHANGE:"change",PREV:"prev",NEXT:"next"},classes={NAMESPACE:"pj-thumb",THEME:"{namespace}s--{theme}",THUMBS:"{namespace}s",INNER:"{namespace}s-inner",THUMB:"{namespace}",LOADER:"{namespace}-loader",LOADED:"{namespace}-loaded",VIDEO:"{namespace}-video",IMAGE:"{namespace}-img",VERTICAL:"{namespace}s-vertical",ACTIVE:"{namespace}-active",DISABLED:"{namespace}-disabled",RESPONSIVE:"{namespace}-responsive"},methods=["enable","disable","destroy","next","prev","go"],defaults={templates:{inner:()=>'<div class="{classes.INNER}"></div>',thumb:()=>'<div class="{classes.THUMB}"><div class="{classes.LOADER}"></div><img class="{classes.IMAGE}"></div>'},data:"html",delegate:"img",vertical:!1,current:0,mode:"full",loader:{theme:"ring",color:"#000",size:"lg"},breakpoint:null},dependencies=["anime"],Thumbnails=(_dec=decorator.themeable())(_class=(_dec2=decorator.styleable(classes))(_class=(_dec3=decorator.eventable(events))(_class=(_dec4=decorator.stateable())(_class=(_dec5=decorator.optionable(defaults,!0))(_class=(_dec6=decorator.register(namespace,{methods:methods,dependencies:dependencies}))(_class=class extends Component{constructor(e){var s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),this.setupOptions(s),this.distance=0,this.pos=0,this.current=null,this.dif=null,this.setupClasses(),this.setupStates(),this.initialize()}initialize(){!this.options.data||this.options.data.length<0||(this.options.breakpoint&&this.initBreakpoints(),this.data="html"===this.options.data?this.parseHtml():this.options.data,this.generate(),this.items=this.inner.querySelectorAll(".".concat(this.classes.THUMB)),this.setDistance(this.options.vertical),this.setItemDistance(this.options.vertical),this.go(this.options.current||0,!1,!1),this.initImageLoader(),this.initSwipeable(),this.bind(),this.enter("initialized"),this.trigger(events.READY))}initBreakpoints(){if(Breakpoints.init(),Breakpoints.all().includes(this.options.breakpoint)){var e=this.options.breakpoint,s=this;Breakpoints.is("".concat(e,"-"))&&classes$1.addClass(this.classes.RESPONSIVE,this.element),Breakpoints.to(e,{enter(){classes$1.addClass(s.classes.RESPONSIVE,s.element)},leave(){classes$1.removeClass(s.classes.RESPONSIVE,s.element)}})}}parseHtml(){var e=[],s=this.element.querySelectorAll(this.options.delegate),t=new RegExp(/\((.+?)\)/);return s.length>0&&s.forEach(s=>{var i=dom.closest(".".concat(this.classes.THUMB),s),a={src:s.getAttribute("src")||window.getComputedStyle(s)["background-image"].match(t)[1].replace(/'/g,"").replace(/"/g,"")};i&&(a.type=classes$1.hasClass(this.classes.VIDEO,i)?"video":"image");var n=Object.entries(s.dataset).reduce((e,s)=>{var[t,i]=s;try{return _objectSpread2({},e,{[t]:JSON.parse('{"data": '.concat(i.replace(/'/g,'"'),"}")).data})}catch(s){return _objectSpread2({},e,{[t]:i})}},{});a=utils.deepMerge(a,n),e.push(a)}),e}generate(){classes$1.addClass(this.classes.THUMBS,this.element),this.options.theme&&classes$1.addClass(this.getThemeClass(),this.element),this.options.vertical&&classes$1.addClass(this.classes.VERTICAL,this.element),this.inner=this.getElement("inner"),this.data.forEach((e,s)=>{var t=this.getElement("thumb");"video"===e.type&&classes$1.addClass(this.classes.VIDEO,t),dom.setData("index",s,t),t.querySelector(".".concat(this.classes.IMAGE)).setAttribute("src",e.src),dom.append(t,this.inner)}),this.element.innerHTML="",dom.append(this.inner,this.element)}initImageLoader(){this.items.forEach(e=>{var s="";this.options.loader&&(s=Loader.of(dom.query(".".concat(this.classes.LOADER),e),this.options.loader)).show(),ImageLoader.of(e.querySelector(".".concat(this.classes.IMAGE))).on("loaded",e=>{this.options.loader&&s.hide(),classes$1.addClass(this.classes.LOADED,dom.closest(".".concat(this.classes.THUMB),e))})})}initSwipeable(){var e=this,s=()=>{this.pos=this.swipeable.position[this.options.vertical?"y":"x"]};this.swipeable=Swipeable.of(this.inner,{rebound:!0,decay:!0,axis:this.options.vertical?"y":"x",reboundPos:"center"===this.options.mode?50:100,offset:"center"===this.options.mode?this.distance/2:0,onStart(){e.enter("dragged")},onDecayend(){s()},onReboundend(){s()},onEnd(){s()}})}getElement(e){var s,t=this.options.templates[e];return s=templateEngine.render(t.call(this),{classes:this.classes}),dom.parseHTML(s)}setDistance(e){this.wrapDistance=e?styled.outerHeight(this.element):styled.outerWidth(this.element),this.innerDistance=e?this.inner.scrollHeight:this.inner.scrollWidth}setItemDistance(e){this.length=this.items.length,this.distance=0,this.gutter=this.length>0?parseInt(window.getComputedStyle(this.items[1])[e?"margin-top":"margin-left"],10):0,this.length>0&&(this.distance=e?styled.outerHeight(this.items[0]):styled.outerWidth(this.items[0]))}bind(){events$1.bindEvent(this.eventName("click"),e=>{if(this.is("dragged"))return this.leave("dragged"),!1;if(this.is("disable")||this.swipeable.is("paning"))return!1;var s=dom.closest(".".concat(this.classes.THUMB),e.target);if(!s)return!1;var t=Number(dom.getData("index",s));return this.go(t)},this.element)}unbind(){events$1.removeEvent(this.eventName(),this.element)}getItemPos(e){return(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.distance/2:this.distance)-this.distance*(e+1)-this.gutter*e}setPos(e){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.options.mode,a=0;if("full"===i){if(this.innerDistance>this.wrapDistance){var n=this.wrapDistance-this.innerDistance;if(null===this.current){var r=this.getItemPos(e);a=n<r?r:n}else if(this.current===this.length-1&&0===e)a=0;else if(0===this.current&&e===this.length-1)a=n;else{var l=this.pos;if(e>this.current){var o=l-this.distance-this.gutter;a=n<o?o:n}else if(e<this.current){var h=l+this.distance+this.gutter;a=h>0?0:h}}}}else"center"===i&&(a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(e,!0));if(t){var c={targets:this.inner,easing:"linear",duration:300};c[s?"translateY":"translateX"]=a,anime(c)}else styled.setStyle({transform:"".concat(s?"translateY":"translateX","(").concat(a,"px)")},this.inner);this.pos=a}resetPos(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],s=this.wrapDistance;if(this.setDistance(this.options.vertical),this.wrapDistance!==s){this.setItemDistance(this.options.vertical);var t=this.pos,i=this.wrapDistance-this.innerDistance,a=0;i>0||(null===this.dif&&(this.dif=i),"center"===this.options.mode?a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(this.current,!0):((a=this.current===this.length-1?t+(i-this.dif):t)>0&&(a=0),a<i&&(a=i)),this.dif=i,styled.setStyle({transform:"".concat(e?"translateY":"translateX","(").concat(a,"px)")},this.inner),this.pos=a)}}go(e){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.is("disable")||e<0||e>this.length||e===this.current||(this.setPos(e,this.options.vertical,t),classes$1.removeClass(this.classes.ACTIVE,this.items[this.current]),classes$1.addClass(this.classes.ACTIVE,this.items[e]),this.current=e,s&&this.trigger(events.CHANGE))}next(){this.is("disable")||(this.go(this.current+1),this.trigger(events.NEXT))}prev(){this.is("disable")||(this.go(this.current-1),this.trigger(events.PREV))}resize(){this.resetPos(this.options.vertical)}enable(){this.is("disable")&&(classes$1.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1,this.leave("disable")),this.trigger(events.ENABLE)}disable(){this.is("disable")||(classes$1.addClass(this.classes.DISABLED,this.element),this.element.disable=!0,this.enter("disable")),this.trigger(events.DISABLE)}destroy(){this.is("initialized")&&(this.unbind(),!0===this.options.vertical&&classes$1.removeClass(this.classes.VERTICAL,this.element),this.options.theme&&classes$1.removeClass(this.getThemeClass(),this.element),this.is("disabled")&&(classes$1.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1),this.leave("initialized")),this.trigger(events.DESTROY),super.destroy()}})||_class)||_class)||_class)||_class)||_class)||_class;module.exports=Thumbnails;
/*!
* @pluginjs/thumbnails v0.7.22 (https://pluginjs.com)
* @pluginjs/thumbnails v0.7.23 (https://pluginjs.com)
* Copyright 2019 Creation Studio Limited

@@ -54,3 +54,3 @@ * Released under the GPL-3.0 License.

if (i % 2) {
ownKeys(source, true).forEach(function (key) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);

@@ -61,3 +61,3 @@ });

} else {
ownKeys(source).forEach(function (key) {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));

@@ -64,0 +64,0 @@ });

/*!
* @pluginjs/thumbnails v0.7.22 (https://pluginjs.com)
* @pluginjs/thumbnails v0.7.23 (https://pluginjs.com)
* Copyright 2019 Creation Studio Limited
* Released under the GPL-3.0 License.
*/
import t from"animejs";import e from"@pluginjs/component";import s from"@pluginjs/template";import{outerHeight as i,outerWidth as n,setStyle as r}from"@pluginjs/styled";import{addClass as a,removeClass as h,hasClass as o}from"@pluginjs/classes";import{bindEvent as l,removeEvent as c}from"@pluginjs/events";import{closest as p,setData as m,append as d,query as g,parseHTML as u,getData as v}from"@pluginjs/dom";import{deepMerge as b}from"@pluginjs/utils";import{themeable as E,styleable as f,eventable as D,stateable as I,optionable as A,register as O}from"@pluginjs/decorator";import S from"@pluginjs/swipeable";import y from"@pluginjs/image-loader";import w from"@pluginjs/loader";import j from"@pluginjs/breakpoints";function P(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function T(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),s.push.apply(s,i)}return s}function R(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?T(s,!0).forEach(function(e){P(t,e,s[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):T(s).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))})}return t}var L,N={READY:"ready",ENABLE:"enable",DISABLE:"disable",DESTROY:"destroy",CHANGE:"change",PREV:"prev",NEXT:"next"},B={templates:{inner:()=>'<div class="{classes.INNER}"></div>',thumb:()=>'<div class="{classes.THUMB}"><div class="{classes.LOADER}"></div><img class="{classes.IMAGE}"></div>'},data:"html",delegate:"img",vertical:!1,current:0,mode:"full",loader:{theme:"ring",color:"#000",size:"lg"},breakpoint:null};export default E()(L=f({NAMESPACE:"pj-thumb",THEME:"{namespace}s--{theme}",THUMBS:"{namespace}s",INNER:"{namespace}s-inner",THUMB:"{namespace}",LOADER:"{namespace}-loader",LOADED:"{namespace}-loaded",VIDEO:"{namespace}-video",IMAGE:"{namespace}-img",VERTICAL:"{namespace}s-vertical",ACTIVE:"{namespace}-active",DISABLED:"{namespace}-disabled",RESPONSIVE:"{namespace}-responsive"})(L=D(N)(L=I()(L=A(B,!0)(L=O("thumbnails",{methods:["enable","disable","destroy","next","prev","go"],dependencies:["anime"]})(L=class extends e{constructor(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t),this.setupOptions(e),this.distance=0,this.pos=0,this.current=null,this.dif=null,this.setupClasses(),this.setupStates(),this.initialize()}initialize(){!this.options.data||this.options.data.length<0||(this.options.breakpoint&&this.initBreakpoints(),this.data="html"===this.options.data?this.parseHtml():this.options.data,this.generate(),this.items=this.inner.querySelectorAll(".".concat(this.classes.THUMB)),this.setDistance(this.options.vertical),this.setItemDistance(this.options.vertical),this.go(this.options.current||0,!1,!1),this.initImageLoader(),this.initSwipeable(),this.bind(),this.enter("initialized"),this.trigger(N.READY))}initBreakpoints(){if(j.init(),j.all().includes(this.options.breakpoint)){var t=this.options.breakpoint,e=this;j.is("".concat(t,"-"))&&a(this.classes.RESPONSIVE,this.element),j.to(t,{enter(){a(e.classes.RESPONSIVE,e.element)},leave(){h(e.classes.RESPONSIVE,e.element)}})}}parseHtml(){var t=[],e=this.element.querySelectorAll(this.options.delegate),s=new RegExp(/\((.+?)\)/);return e.length>0&&e.forEach(e=>{var i=p(".".concat(this.classes.THUMB),e),n={src:e.getAttribute("src")||window.getComputedStyle(e)["background-image"].match(s)[1].replace(/'/g,"").replace(/"/g,"")};i&&(n.type=o(this.classes.VIDEO,i)?"video":"image");var r=Object.entries(e.dataset).reduce((t,e)=>{var[s,i]=e;try{return R({},t,{[s]:JSON.parse('{"data": '.concat(i.replace(/'/g,'"'),"}")).data})}catch(e){return R({},t,{[s]:i})}},{});n=b(n,r),t.push(n)}),t}generate(){a(this.classes.THUMBS,this.element),this.options.theme&&a(this.getThemeClass(),this.element),this.options.vertical&&a(this.classes.VERTICAL,this.element),this.inner=this.getElement("inner"),this.data.forEach((t,e)=>{var s=this.getElement("thumb");"video"===t.type&&a(this.classes.VIDEO,s),m("index",e,s),s.querySelector(".".concat(this.classes.IMAGE)).setAttribute("src",t.src),d(s,this.inner)}),this.element.innerHTML="",d(this.inner,this.element)}initImageLoader(){this.items.forEach(t=>{var e="";this.options.loader&&(e=w.of(g(".".concat(this.classes.LOADER),t),this.options.loader)).show(),y.of(t.querySelector(".".concat(this.classes.IMAGE))).on("loaded",t=>{this.options.loader&&e.hide(),a(this.classes.LOADED,p(".".concat(this.classes.THUMB),t))})})}initSwipeable(){var t=this,e=()=>{this.pos=this.swipeable.position[this.options.vertical?"y":"x"]};this.swipeable=S.of(this.inner,{rebound:!0,decay:!0,axis:this.options.vertical?"y":"x",reboundPos:"center"===this.options.mode?50:100,offset:"center"===this.options.mode?this.distance/2:0,onStart(){t.enter("dragged")},onDecayend(){e()},onReboundend(){e()},onEnd(){e()}})}getElement(t){var e,i=this.options.templates[t];return e=s.render(i.call(this),{classes:this.classes}),u(e)}setDistance(t){this.wrapDistance=t?i(this.element):n(this.element),this.innerDistance=t?this.inner.scrollHeight:this.inner.scrollWidth}setItemDistance(t){this.length=this.items.length,this.distance=0,this.gutter=this.length>0?parseInt(window.getComputedStyle(this.items[1])[t?"margin-top":"margin-left"],10):0,this.length>0&&(this.distance=t?i(this.items[0]):n(this.items[0]))}bind(){l(this.eventName("click"),t=>{if(this.is("dragged"))return this.leave("dragged"),!1;if(this.is("disable")||this.swipeable.is("paning"))return!1;var e=p(".".concat(this.classes.THUMB),t.target);if(!e)return!1;var s=Number(v("index",e));return this.go(s)},this.element)}unbind(){c(this.eventName(),this.element)}getItemPos(t){return(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.distance/2:this.distance)-this.distance*(t+1)-this.gutter*t}setPos(e){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.options.mode,a=0;if("full"===n){if(this.innerDistance>this.wrapDistance){var h=this.wrapDistance-this.innerDistance;if(null===this.current){var o=this.getItemPos(e);a=h<o?o:h}else if(this.current===this.length-1&&0===e)a=0;else if(0===this.current&&e===this.length-1)a=h;else{var l=this.pos;if(e>this.current){var c=l-this.distance-this.gutter;a=h<c?c:h}else if(e<this.current){var p=l+this.distance+this.gutter;a=p>0?0:p}}}}else"center"===n&&(a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(e,!0));if(i){var m={targets:this.inner,easing:"linear",duration:300};m[s?"translateY":"translateX"]=a,t(m)}else r({transform:"".concat(s?"translateY":"translateX","(").concat(a,"px)")},this.inner);this.pos=a}resetPos(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.wrapDistance;if(this.setDistance(this.options.vertical),this.wrapDistance!==e){this.setItemDistance(this.options.vertical);var s=this.pos,i=this.wrapDistance-this.innerDistance,n=0;i>0||(null===this.dif&&(this.dif=i),"center"===this.options.mode?n=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(this.current,!0):((n=this.current===this.length-1?s+(i-this.dif):s)>0&&(n=0),n<i&&(n=i)),this.dif=i,r({transform:"".concat(t?"translateY":"translateX","(").concat(n,"px)")},this.inner),this.pos=n)}}go(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.is("disable")||t<0||t>this.length||t===this.current||(this.setPos(t,this.options.vertical,s),h(this.classes.ACTIVE,this.items[this.current]),a(this.classes.ACTIVE,this.items[t]),this.current=t,e&&this.trigger(N.CHANGE))}next(){this.is("disable")||(this.go(this.current+1),this.trigger(N.NEXT))}prev(){this.is("disable")||(this.go(this.current-1),this.trigger(N.PREV))}resize(){this.resetPos(this.options.vertical)}enable(){this.is("disable")&&(h(this.classes.DISABLED,this.element),this.element.disable=!1,this.leave("disable")),this.trigger(N.ENABLE)}disable(){this.is("disable")||(a(this.classes.DISABLED,this.element),this.element.disable=!0,this.enter("disable")),this.trigger(N.DISABLE)}destroy(){this.is("initialized")&&(this.unbind(),!0===this.options.vertical&&h(this.classes.VERTICAL,this.element),this.options.theme&&h(this.getThemeClass(),this.element),this.is("disabled")&&(h(this.classes.DISABLED,this.element),this.element.disable=!1),this.leave("initialized")),this.trigger(N.DESTROY),super.destroy()}})||L)||L)||L)||L)||L)||L;
import t from"animejs";import e from"@pluginjs/component";import s from"@pluginjs/template";import{outerHeight as i,outerWidth as n,setStyle as r}from"@pluginjs/styled";import{addClass as a,removeClass as h,hasClass as o}from"@pluginjs/classes";import{bindEvent as l,removeEvent as c}from"@pluginjs/events";import{closest as p,setData as m,append as d,query as g,parseHTML as u,getData as v}from"@pluginjs/dom";import{deepMerge as b}from"@pluginjs/utils";import{themeable as E,styleable as f,eventable as D,stateable as I,optionable as O,register as A}from"@pluginjs/decorator";import S from"@pluginjs/swipeable";import y from"@pluginjs/image-loader";import j from"@pluginjs/loader";import w from"@pluginjs/breakpoints";function P(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function T(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function R(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?T(Object(s),!0).forEach((function(e){P(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):T(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var L,N={READY:"ready",ENABLE:"enable",DISABLE:"disable",DESTROY:"destroy",CHANGE:"change",PREV:"prev",NEXT:"next"},B={templates:{inner:()=>'<div class="{classes.INNER}"></div>',thumb:()=>'<div class="{classes.THUMB}"><div class="{classes.LOADER}"></div><img class="{classes.IMAGE}"></div>'},data:"html",delegate:"img",vertical:!1,current:0,mode:"full",loader:{theme:"ring",color:"#000",size:"lg"},breakpoint:null},M=E()(L=f({NAMESPACE:"pj-thumb",THEME:"{namespace}s--{theme}",THUMBS:"{namespace}s",INNER:"{namespace}s-inner",THUMB:"{namespace}",LOADER:"{namespace}-loader",LOADED:"{namespace}-loaded",VIDEO:"{namespace}-video",IMAGE:"{namespace}-img",VERTICAL:"{namespace}s-vertical",ACTIVE:"{namespace}-active",DISABLED:"{namespace}-disabled",RESPONSIVE:"{namespace}-responsive"})(L=D(N)(L=I()(L=O(B,!0)(L=A("thumbnails",{methods:["enable","disable","destroy","next","prev","go"],dependencies:["anime"]})(L=class extends e{constructor(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(t),this.setupOptions(e),this.distance=0,this.pos=0,this.current=null,this.dif=null,this.setupClasses(),this.setupStates(),this.initialize()}initialize(){!this.options.data||this.options.data.length<0||(this.options.breakpoint&&this.initBreakpoints(),this.data="html"===this.options.data?this.parseHtml():this.options.data,this.generate(),this.items=this.inner.querySelectorAll(".".concat(this.classes.THUMB)),this.setDistance(this.options.vertical),this.setItemDistance(this.options.vertical),this.go(this.options.current||0,!1,!1),this.initImageLoader(),this.initSwipeable(),this.bind(),this.enter("initialized"),this.trigger(N.READY))}initBreakpoints(){if(w.init(),w.all().includes(this.options.breakpoint)){var t=this.options.breakpoint,e=this;w.is("".concat(t,"-"))&&a(this.classes.RESPONSIVE,this.element),w.to(t,{enter(){a(e.classes.RESPONSIVE,e.element)},leave(){h(e.classes.RESPONSIVE,e.element)}})}}parseHtml(){var t=[],e=this.element.querySelectorAll(this.options.delegate),s=new RegExp(/\((.+?)\)/);return e.length>0&&e.forEach(e=>{var i=p(".".concat(this.classes.THUMB),e),n={src:e.getAttribute("src")||window.getComputedStyle(e)["background-image"].match(s)[1].replace(/'/g,"").replace(/"/g,"")};i&&(n.type=o(this.classes.VIDEO,i)?"video":"image");var r=Object.entries(e.dataset).reduce((t,e)=>{var[s,i]=e;try{return R({},t,{[s]:JSON.parse('{"data": '.concat(i.replace(/'/g,'"'),"}")).data})}catch(e){return R({},t,{[s]:i})}},{});n=b(n,r),t.push(n)}),t}generate(){a(this.classes.THUMBS,this.element),this.options.theme&&a(this.getThemeClass(),this.element),this.options.vertical&&a(this.classes.VERTICAL,this.element),this.inner=this.getElement("inner"),this.data.forEach((t,e)=>{var s=this.getElement("thumb");"video"===t.type&&a(this.classes.VIDEO,s),m("index",e,s),s.querySelector(".".concat(this.classes.IMAGE)).setAttribute("src",t.src),d(s,this.inner)}),this.element.innerHTML="",d(this.inner,this.element)}initImageLoader(){this.items.forEach(t=>{var e="";this.options.loader&&(e=j.of(g(".".concat(this.classes.LOADER),t),this.options.loader)).show(),y.of(t.querySelector(".".concat(this.classes.IMAGE))).on("loaded",t=>{this.options.loader&&e.hide(),a(this.classes.LOADED,p(".".concat(this.classes.THUMB),t))})})}initSwipeable(){var t=this,e=()=>{this.pos=this.swipeable.position[this.options.vertical?"y":"x"]};this.swipeable=S.of(this.inner,{rebound:!0,decay:!0,axis:this.options.vertical?"y":"x",reboundPos:"center"===this.options.mode?50:100,offset:"center"===this.options.mode?this.distance/2:0,onStart(){t.enter("dragged")},onDecayend(){e()},onReboundend(){e()},onEnd(){e()}})}getElement(t){var e,i=this.options.templates[t];return e=s.render(i.call(this),{classes:this.classes}),u(e)}setDistance(t){this.wrapDistance=t?i(this.element):n(this.element),this.innerDistance=t?this.inner.scrollHeight:this.inner.scrollWidth}setItemDistance(t){this.length=this.items.length,this.distance=0,this.gutter=this.length>0?parseInt(window.getComputedStyle(this.items[1])[t?"margin-top":"margin-left"],10):0,this.length>0&&(this.distance=t?i(this.items[0]):n(this.items[0]))}bind(){l(this.eventName("click"),t=>{if(this.is("dragged"))return this.leave("dragged"),!1;if(this.is("disable")||this.swipeable.is("paning"))return!1;var e=p(".".concat(this.classes.THUMB),t.target);if(!e)return!1;var s=Number(v("index",e));return this.go(s)},this.element)}unbind(){c(this.eventName(),this.element)}getItemPos(t){return(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.distance/2:this.distance)-this.distance*(t+1)-this.gutter*t}setPos(e){var s=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.options.mode,a=0;if("full"===n){if(this.innerDistance>this.wrapDistance){var h=this.wrapDistance-this.innerDistance;if(null===this.current){var o=this.getItemPos(e);a=h<o?o:h}else if(this.current===this.length-1&&0===e)a=0;else if(0===this.current&&e===this.length-1)a=h;else{var l=this.pos;if(e>this.current){var c=l-this.distance-this.gutter;a=h<c?c:h}else if(e<this.current){var p=l+this.distance+this.gutter;a=p>0?0:p}}}}else"center"===n&&(a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(e,!0));if(i){var m={targets:this.inner,easing:"linear",duration:300};m[s?"translateY":"translateX"]=a,t(m)}else r({transform:"".concat(s?"translateY":"translateX","(").concat(a,"px)")},this.inner);this.pos=a}resetPos(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.wrapDistance;if(this.setDistance(this.options.vertical),this.wrapDistance!==e){this.setItemDistance(this.options.vertical);var s=this.pos,i=this.wrapDistance-this.innerDistance,n=0;i>0||(null===this.dif&&(this.dif=i),"center"===this.options.mode?n=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(this.current,!0):((n=this.current===this.length-1?s+(i-this.dif):s)>0&&(n=0),n<i&&(n=i)),this.dif=i,r({transform:"".concat(t?"translateY":"translateX","(").concat(n,"px)")},this.inner),this.pos=n)}}go(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.is("disable")||t<0||t>this.length||t===this.current||(this.setPos(t,this.options.vertical,s),h(this.classes.ACTIVE,this.items[this.current]),a(this.classes.ACTIVE,this.items[t]),this.current=t,e&&this.trigger(N.CHANGE))}next(){this.is("disable")||(this.go(this.current+1),this.trigger(N.NEXT))}prev(){this.is("disable")||(this.go(this.current-1),this.trigger(N.PREV))}resize(){this.resetPos(this.options.vertical)}enable(){this.is("disable")&&(h(this.classes.DISABLED,this.element),this.element.disable=!1,this.leave("disable")),this.trigger(N.ENABLE)}disable(){this.is("disable")||(a(this.classes.DISABLED,this.element),this.element.disable=!0,this.enter("disable")),this.trigger(N.DISABLE)}destroy(){this.is("initialized")&&(this.unbind(),!0===this.options.vertical&&h(this.classes.VERTICAL,this.element),this.options.theme&&h(this.getThemeClass(),this.element),this.is("disabled")&&(h(this.classes.DISABLED,this.element),this.element.disable=!1),this.leave("initialized")),this.trigger(N.DESTROY),super.destroy()}})||L)||L)||L)||L)||L)||L;export default M;
/*!
* @pluginjs/thumbnails v0.7.22 (https://pluginjs.com)
* @pluginjs/thumbnails v0.7.23 (https://pluginjs.com)
* Copyright 2019 Creation Studio Limited

@@ -10,3 +10,3 @@ * Released under the GPL-3.0 License.

(global = global || self, global['@pluginjs/thumbnails'] = factory(global.anime, global['@pluginjs/component'], global['@pluginjs/template'], global['@pluginjs/styled'], global['@pluginjs/classes'], global['@pluginjs/events'], global['@pluginjs/dom'], global['@pluginjs/utils'], global['@pluginjs/decorator'], global['@pluginjs/swipeable'], global['@pluginjs/image-loader'], global['@pluginjs/loader'], global['@pluginjs/breakpoints']));
}(this, function (anime, Component, templateEngine, styled, classes$1, events$1, dom, utils, decorator, Swipeable, ImageLoader, Loader, Breakpoints) { 'use strict';
}(this, (function (anime, Component, templateEngine, styled, classes$1, events$1, dom, utils, decorator, Swipeable, ImageLoader, Loader, Breakpoints) { 'use strict';

@@ -77,3 +77,3 @@ anime = anime && anime.hasOwnProperty('default') ? anime['default'] : anime;

if (i % 2) {
ownKeys(source, true).forEach(function (key) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);

@@ -84,3 +84,3 @@ });

} else {
ownKeys(source).forEach(function (key) {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));

@@ -732,2 +732,2 @@ });

}));
})));
/*!
* @pluginjs/thumbnails v0.7.22 (https://pluginjs.com)
* @pluginjs/thumbnails v0.7.23 (https://pluginjs.com)
* Copyright 2019 Creation Studio Limited
* Released under the GPL-3.0 License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("animejs"),require("@pluginjs/component"),require("@pluginjs/template"),require("@pluginjs/styled"),require("@pluginjs/classes"),require("@pluginjs/events"),require("@pluginjs/dom"),require("@pluginjs/utils"),require("@pluginjs/decorator"),require("@pluginjs/swipeable"),require("@pluginjs/image-loader"),require("@pluginjs/loader"),require("@pluginjs/breakpoints")):"function"==typeof define&&define.amd?define(["animejs","@pluginjs/component","@pluginjs/template","@pluginjs/styled","@pluginjs/classes","@pluginjs/events","@pluginjs/dom","@pluginjs/utils","@pluginjs/decorator","@pluginjs/swipeable","@pluginjs/image-loader","@pluginjs/loader","@pluginjs/breakpoints"],t):(e=e||self)["@pluginjs/thumbnails"]=t(e.anime,e["@pluginjs/component"],e["@pluginjs/template"],e["@pluginjs/styled"],e["@pluginjs/classes"],e["@pluginjs/events"],e["@pluginjs/dom"],e["@pluginjs/utils"],e["@pluginjs/decorator"],e["@pluginjs/swipeable"],e["@pluginjs/image-loader"],e["@pluginjs/loader"],e["@pluginjs/breakpoints"])}(this,function(e,t,i,s,n,r,a,l,o,c,u,h,p){"use strict";function d(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function f(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,s)}return i}function m(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(i,!0).forEach(function(t){f(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(i).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t,i){return(E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var s=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(s){var n=Object.getOwnPropertyDescriptor(s,t);return n.get?n.get.call(i):n.value}})(e,t,i||e)}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var i=[],s=!0,n=!1,r=void 0;try{for(var a,l=e[Symbol.iterator]();!(s=(a=l.next()).done)&&(i.push(a.value),!t||i.length!==t);s=!0);}catch(e){n=!0,r=e}finally{try{s||null==l.return||l.return()}finally{if(n)throw r}}return i}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,i=i&&i.hasOwnProperty("default")?i.default:i,c=c&&c.hasOwnProperty("default")?c.default:c,u=u&&u.hasOwnProperty("default")?u.default:u,h=h&&h.hasOwnProperty("default")?h.default:h,p=p&&p.hasOwnProperty("default")?p.default:p;var O,D={READY:"ready",ENABLE:"enable",DISABLE:"disable",DESTROY:"destroy",CHANGE:"change",PREV:"prev",NEXT:"next"};return o.themeable()(O=o.styleable({NAMESPACE:"pj-thumb",THEME:"{namespace}s--{theme}",THUMBS:"{namespace}s",INNER:"{namespace}s-inner",THUMB:"{namespace}",LOADER:"{namespace}-loader",LOADED:"{namespace}-loaded",VIDEO:"{namespace}-video",IMAGE:"{namespace}-img",VERTICAL:"{namespace}s-vertical",ACTIVE:"{namespace}-active",DISABLED:"{namespace}-disabled",RESPONSIVE:"{namespace}-responsive"})(O=o.eventable(D)(O=o.stateable()(O=o.optionable({templates:{inner:function(){return'<div class="{classes.INNER}"></div>'},thumb:function(){return'<div class="{classes.THUMB}"><div class="{classes.LOADER}"></div><img class="{classes.IMAGE}"></div>'}},data:"html",delegate:"img",vertical:!1,current:0,mode:"full",loader:{theme:"ring",color:"#000",size:"lg"},breakpoint:null},!0)(O=o.register("thumbnails",{methods:["enable","disable","destroy","next","prev","go"],dependencies:["anime"]})(O=function(o){function g(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(t=y(this,v(g).call(this,e))).setupOptions(i),t.distance=0,t.pos=0,t.current=null,t.dif=null,t.setupClasses(),t.setupStates(),t.initialize(),t}var O,w,P;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(g,t),O=g,(w=[{key:"initialize",value:function(){!this.options.data||this.options.data.length<0||(this.options.breakpoint&&this.initBreakpoints(),this.data="html"===this.options.data?this.parseHtml():this.options.data,this.generate(),this.items=this.inner.querySelectorAll(".".concat(this.classes.THUMB)),this.setDistance(this.options.vertical),this.setItemDistance(this.options.vertical),this.go(this.options.current||0,!1,!1),this.initImageLoader(),this.initSwipeable(),this.bind(),this.enter("initialized"),this.trigger(D.READY))}},{key:"initBreakpoints",value:function(){if(p.init(),p.all().includes(this.options.breakpoint)){var e=this.options.breakpoint,t=this;p.is("".concat(e,"-"))&&n.addClass(this.classes.RESPONSIVE,this.element),p.to(e,{enter:function(){n.addClass(t.classes.RESPONSIVE,t.element)},leave:function(){n.removeClass(t.classes.RESPONSIVE,t.element)}})}}},{key:"parseHtml",value:function(){var e=this,t=[],i=this.element.querySelectorAll(this.options.delegate),s=new RegExp(/\((.+?)\)/);return i.length>0&&i.forEach(function(i){var r=a.closest(".".concat(e.classes.THUMB),i),o={src:i.getAttribute("src")||window.getComputedStyle(i)["background-image"].match(s)[1].replace(/'/g,"").replace(/"/g,"")};r&&(o.type=n.hasClass(e.classes.VIDEO,r)?"video":"image");var c=Object.entries(i.dataset).reduce(function(e,t){var i=j(t,2),s=i[0],n=i[1];try{return m({},e,f({},s,JSON.parse('{"data": '.concat(n.replace(/'/g,'"'),"}")).data))}catch(t){return m({},e,f({},s,n))}},{});o=l.deepMerge(o,c),t.push(o)}),t}},{key:"generate",value:function(){var e=this;n.addClass(this.classes.THUMBS,this.element),this.options.theme&&n.addClass(this.getThemeClass(),this.element),this.options.vertical&&n.addClass(this.classes.VERTICAL,this.element),this.inner=this.getElement("inner"),this.data.forEach(function(t,i){var s=e.getElement("thumb");"video"===t.type&&n.addClass(e.classes.VIDEO,s),a.setData("index",i,s),s.querySelector(".".concat(e.classes.IMAGE)).setAttribute("src",t.src),a.append(s,e.inner)}),this.element.innerHTML="",a.append(this.inner,this.element)}},{key:"initImageLoader",value:function(){var e=this;this.items.forEach(function(t){var i="";e.options.loader&&(i=h.of(a.query(".".concat(e.classes.LOADER),t),e.options.loader)).show(),u.of(t.querySelector(".".concat(e.classes.IMAGE))).on("loaded",function(t){e.options.loader&&i.hide(),n.addClass(e.classes.LOADED,a.closest(".".concat(e.classes.THUMB),t))})})}},{key:"initSwipeable",value:function(){var e=this,t=this,i=function(){e.pos=e.swipeable.position[e.options.vertical?"y":"x"]};this.swipeable=c.of(this.inner,{rebound:!0,decay:!0,axis:this.options.vertical?"y":"x",reboundPos:"center"===this.options.mode?50:100,offset:"center"===this.options.mode?this.distance/2:0,onStart:function(){t.enter("dragged")},onDecayend:function(){i()},onReboundend:function(){i()},onEnd:function(){i()}})}},{key:"getElement",value:function(e){var t,s=this.options.templates[e];return t=i.render(s.call(this),{classes:this.classes}),a.parseHTML(t)}},{key:"setDistance",value:function(e){this.wrapDistance=e?s.outerHeight(this.element):s.outerWidth(this.element),this.innerDistance=e?this.inner.scrollHeight:this.inner.scrollWidth}},{key:"setItemDistance",value:function(e){this.length=this.items.length,this.distance=0,this.gutter=this.length>0?parseInt(window.getComputedStyle(this.items[1])[e?"margin-top":"margin-left"],10):0,this.length>0&&(this.distance=e?s.outerHeight(this.items[0]):s.outerWidth(this.items[0]))}},{key:"bind",value:function(){var e=this;r.bindEvent(this.eventName("click"),function(t){if(e.is("dragged"))return e.leave("dragged"),!1;if(e.is("disable")||e.swipeable.is("paning"))return!1;var i=a.closest(".".concat(e.classes.THUMB),t.target);if(!i)return!1;var s=Number(a.getData("index",i));return e.go(s)},this.element)}},{key:"unbind",value:function(){r.removeEvent(this.eventName(),this.element)}},{key:"getItemPos",value:function(e){return(arguments.length>1&&void 0!==arguments[1]&&arguments[1]?this.distance/2:this.distance)-this.distance*(e+1)-this.gutter*e}},{key:"setPos",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.options.mode,a=0;if("full"===r){if(this.innerDistance>this.wrapDistance){var l=this.wrapDistance-this.innerDistance;if(null===this.current){var o=this.getItemPos(t);a=l<o?o:l}else if(this.current===this.length-1&&0===t)a=0;else if(0===this.current&&t===this.length-1)a=l;else{var c=this.pos;if(t>this.current){var u=c-this.distance-this.gutter;a=l<u?u:l}else if(t<this.current){var h=c+this.distance+this.gutter;a=h>0?0:h}}}}else"center"===r&&(a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(t,!0));if(n){var p={targets:this.inner,easing:"linear",duration:300};p[i?"translateY":"translateX"]=a,e(p)}else s.setStyle({transform:"".concat(i?"translateY":"translateX","(").concat(a,"px)")},this.inner);this.pos=a}},{key:"resetPos",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wrapDistance;if(this.setDistance(this.options.vertical),this.wrapDistance!==t){this.setItemDistance(this.options.vertical);var i=this.pos,n=this.wrapDistance-this.innerDistance,r=0;n>0||(null===this.dif&&(this.dif=n),"center"===this.options.mode?r=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(this.current,!0):((r=this.current===this.length-1?i+(n-this.dif):i)>0&&(r=0),r<n&&(r=n)),this.dif=n,s.setStyle({transform:"".concat(e?"translateY":"translateX","(").concat(r,"px)")},this.inner),this.pos=r)}}},{key:"go",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.is("disable")||e<0||e>this.length||e===this.current||(this.setPos(e,this.options.vertical,i),n.removeClass(this.classes.ACTIVE,this.items[this.current]),n.addClass(this.classes.ACTIVE,this.items[e]),this.current=e,t&&this.trigger(D.CHANGE))}},{key:"next",value:function(){this.is("disable")||(this.go(this.current+1),this.trigger(D.NEXT))}},{key:"prev",value:function(){this.is("disable")||(this.go(this.current-1),this.trigger(D.PREV))}},{key:"resize",value:function(){this.resetPos(this.options.vertical)}},{key:"enable",value:function(){this.is("disable")&&(n.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1,this.leave("disable")),this.trigger(D.ENABLE)}},{key:"disable",value:function(){this.is("disable")||(n.addClass(this.classes.DISABLED,this.element),this.element.disable=!0,this.enter("disable")),this.trigger(D.DISABLE)}},{key:"destroy",value:function(){this.is("initialized")&&(this.unbind(),!0===this.options.vertical&&n.removeClass(this.classes.VERTICAL,this.element),this.options.theme&&n.removeClass(this.getThemeClass(),this.element),this.is("disabled")&&(n.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1),this.leave("initialized")),this.trigger(D.DESTROY),E(v(g.prototype),"destroy",this).call(this)}}])&&d(O.prototype,w),P&&d(O,P),g}())||O)||O)||O)||O)||O)||O});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("animejs"),require("@pluginjs/component"),require("@pluginjs/template"),require("@pluginjs/styled"),require("@pluginjs/classes"),require("@pluginjs/events"),require("@pluginjs/dom"),require("@pluginjs/utils"),require("@pluginjs/decorator"),require("@pluginjs/swipeable"),require("@pluginjs/image-loader"),require("@pluginjs/loader"),require("@pluginjs/breakpoints")):"function"==typeof define&&define.amd?define(["animejs","@pluginjs/component","@pluginjs/template","@pluginjs/styled","@pluginjs/classes","@pluginjs/events","@pluginjs/dom","@pluginjs/utils","@pluginjs/decorator","@pluginjs/swipeable","@pluginjs/image-loader","@pluginjs/loader","@pluginjs/breakpoints"],t):(e=e||self)["@pluginjs/thumbnails"]=t(e.anime,e["@pluginjs/component"],e["@pluginjs/template"],e["@pluginjs/styled"],e["@pluginjs/classes"],e["@pluginjs/events"],e["@pluginjs/dom"],e["@pluginjs/utils"],e["@pluginjs/decorator"],e["@pluginjs/swipeable"],e["@pluginjs/image-loader"],e["@pluginjs/loader"],e["@pluginjs/breakpoints"])}(this,(function(e,t,i,s,n,r,a,l,o,c,u,h,p){"use strict";function d(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function f(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function m(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(Object(i),!0).forEach((function(t){f(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function b(e,t){return(b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function E(e,t,i){return(E="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var s=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=v(e)););return e}(e,t);if(s){var n=Object.getOwnPropertyDescriptor(s,t);return n.get?n.get.call(i):n.value}})(e,t,i||e)}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var i=[],s=!0,n=!1,r=void 0;try{for(var a,l=e[Symbol.iterator]();!(s=(a=l.next()).done)&&(i.push(a.value),!t||i.length!==t);s=!0);}catch(e){n=!0,r=e}finally{try{s||null==l.return||l.return()}finally{if(n)throw r}}return i}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}e=e&&e.hasOwnProperty("default")?e.default:e,t=t&&t.hasOwnProperty("default")?t.default:t,i=i&&i.hasOwnProperty("default")?i.default:i,c=c&&c.hasOwnProperty("default")?c.default:c,u=u&&u.hasOwnProperty("default")?u.default:u,h=h&&h.hasOwnProperty("default")?h.default:h,p=p&&p.hasOwnProperty("default")?p.default:p;var O,D={READY:"ready",ENABLE:"enable",DISABLE:"disable",DESTROY:"destroy",CHANGE:"change",PREV:"prev",NEXT:"next"};return o.themeable()(O=o.styleable({NAMESPACE:"pj-thumb",THEME:"{namespace}s--{theme}",THUMBS:"{namespace}s",INNER:"{namespace}s-inner",THUMB:"{namespace}",LOADER:"{namespace}-loader",LOADED:"{namespace}-loaded",VIDEO:"{namespace}-video",IMAGE:"{namespace}-img",VERTICAL:"{namespace}s-vertical",ACTIVE:"{namespace}-active",DISABLED:"{namespace}-disabled",RESPONSIVE:"{namespace}-responsive"})(O=o.eventable(D)(O=o.stateable()(O=o.optionable({templates:{inner:function(){return'<div class="{classes.INNER}"></div>'},thumb:function(){return'<div class="{classes.THUMB}"><div class="{classes.LOADER}"></div><img class="{classes.IMAGE}"></div>'}},data:"html",delegate:"img",vertical:!1,current:0,mode:"full",loader:{theme:"ring",color:"#000",size:"lg"},breakpoint:null},!0)(O=o.register("thumbnails",{methods:["enable","disable","destroy","next","prev","go"],dependencies:["anime"]})(O=function(t){function o(e){var t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(t=y(this,v(o).call(this,e))).setupOptions(i),t.distance=0,t.pos=0,t.current=null,t.dif=null,t.setupClasses(),t.setupStates(),t.initialize(),t}var g,O,w;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(o,t),g=o,(O=[{key:"initialize",value:function(){!this.options.data||this.options.data.length<0||(this.options.breakpoint&&this.initBreakpoints(),this.data="html"===this.options.data?this.parseHtml():this.options.data,this.generate(),this.items=this.inner.querySelectorAll(".".concat(this.classes.THUMB)),this.setDistance(this.options.vertical),this.setItemDistance(this.options.vertical),this.go(this.options.current||0,!1,!1),this.initImageLoader(),this.initSwipeable(),this.bind(),this.enter("initialized"),this.trigger(D.READY))}},{key:"initBreakpoints",value:function(){if(p.init(),p.all().includes(this.options.breakpoint)){var e=this.options.breakpoint,t=this;p.is("".concat(e,"-"))&&n.addClass(this.classes.RESPONSIVE,this.element),p.to(e,{enter:function(){n.addClass(t.classes.RESPONSIVE,t.element)},leave:function(){n.removeClass(t.classes.RESPONSIVE,t.element)}})}}},{key:"parseHtml",value:function(){var e=this,t=[],i=this.element.querySelectorAll(this.options.delegate),s=new RegExp(/\((.+?)\)/);return i.length>0&&i.forEach((function(i){var r=a.closest(".".concat(e.classes.THUMB),i),o={src:i.getAttribute("src")||window.getComputedStyle(i)["background-image"].match(s)[1].replace(/'/g,"").replace(/"/g,"")};r&&(o.type=n.hasClass(e.classes.VIDEO,r)?"video":"image");var c=Object.entries(i.dataset).reduce((function(e,t){var i=j(t,2),s=i[0],n=i[1];try{return m({},e,f({},s,JSON.parse('{"data": '.concat(n.replace(/'/g,'"'),"}")).data))}catch(t){return m({},e,f({},s,n))}}),{});o=l.deepMerge(o,c),t.push(o)})),t}},{key:"generate",value:function(){var e=this;n.addClass(this.classes.THUMBS,this.element),this.options.theme&&n.addClass(this.getThemeClass(),this.element),this.options.vertical&&n.addClass(this.classes.VERTICAL,this.element),this.inner=this.getElement("inner"),this.data.forEach((function(t,i){var s=e.getElement("thumb");"video"===t.type&&n.addClass(e.classes.VIDEO,s),a.setData("index",i,s),s.querySelector(".".concat(e.classes.IMAGE)).setAttribute("src",t.src),a.append(s,e.inner)})),this.element.innerHTML="",a.append(this.inner,this.element)}},{key:"initImageLoader",value:function(){var e=this;this.items.forEach((function(t){var i="";e.options.loader&&(i=h.of(a.query(".".concat(e.classes.LOADER),t),e.options.loader)).show(),u.of(t.querySelector(".".concat(e.classes.IMAGE))).on("loaded",(function(t){e.options.loader&&i.hide(),n.addClass(e.classes.LOADED,a.closest(".".concat(e.classes.THUMB),t))}))}))}},{key:"initSwipeable",value:function(){var e=this,t=this,i=function(){e.pos=e.swipeable.position[e.options.vertical?"y":"x"]};this.swipeable=c.of(this.inner,{rebound:!0,decay:!0,axis:this.options.vertical?"y":"x",reboundPos:"center"===this.options.mode?50:100,offset:"center"===this.options.mode?this.distance/2:0,onStart:function(){t.enter("dragged")},onDecayend:function(){i()},onReboundend:function(){i()},onEnd:function(){i()}})}},{key:"getElement",value:function(e){var t,s=this.options.templates[e];return t=i.render(s.call(this),{classes:this.classes}),a.parseHTML(t)}},{key:"setDistance",value:function(e){this.wrapDistance=e?s.outerHeight(this.element):s.outerWidth(this.element),this.innerDistance=e?this.inner.scrollHeight:this.inner.scrollWidth}},{key:"setItemDistance",value:function(e){this.length=this.items.length,this.distance=0,this.gutter=this.length>0?parseInt(window.getComputedStyle(this.items[1])[e?"margin-top":"margin-left"],10):0,this.length>0&&(this.distance=e?s.outerHeight(this.items[0]):s.outerWidth(this.items[0]))}},{key:"bind",value:function(){var e=this;r.bindEvent(this.eventName("click"),(function(t){if(e.is("dragged"))return e.leave("dragged"),!1;if(e.is("disable")||e.swipeable.is("paning"))return!1;var i=a.closest(".".concat(e.classes.THUMB),t.target);if(!i)return!1;var s=Number(a.getData("index",i));return e.go(s)}),this.element)}},{key:"unbind",value:function(){r.removeEvent(this.eventName(),this.element)}},{key:"getItemPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(t?this.distance/2:this.distance)-this.distance*(e+1)-this.gutter*e}},{key:"setPos",value:function(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.options.mode,a=0;if("full"===r){if(this.innerDistance>this.wrapDistance){var l=this.wrapDistance-this.innerDistance;if(null===this.current){var o=this.getItemPos(t);a=l<o?o:l}else if(this.current===this.length-1&&0===t)a=0;else if(0===this.current&&t===this.length-1)a=l;else{var c=this.pos;if(t>this.current){var u=c-this.distance-this.gutter;a=l<u?u:l}else if(t<this.current){var h=c+this.distance+this.gutter;a=h>0?0:h}}}}else"center"===r&&(a=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(t,!0));if(n){var p={targets:this.inner,easing:"linear",duration:300};p[i?"translateY":"translateX"]=a,e(p)}else s.setStyle({transform:"".concat(i?"translateY":"translateX","(").concat(a,"px)")},this.inner);this.pos=a}},{key:"resetPos",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.wrapDistance;if(this.setDistance(this.options.vertical),this.wrapDistance!==t){this.setItemDistance(this.options.vertical);var i=this.pos,n=this.wrapDistance-this.innerDistance,r=0;n>0||(null===this.dif&&(this.dif=n),"center"===this.options.mode?r=Math.min(this.wrapDistance,this.innerDistance)/2+this.getItemPos(this.current,!0):((r=this.current===this.length-1?i+(n-this.dif):i)>0&&(r=0),r<n&&(r=n)),this.dif=n,s.setStyle({transform:"".concat(e?"translateY":"translateX","(").concat(r,"px)")},this.inner),this.pos=r)}}},{key:"go",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.is("disable")||e<0||e>this.length||e===this.current||(this.setPos(e,this.options.vertical,i),n.removeClass(this.classes.ACTIVE,this.items[this.current]),n.addClass(this.classes.ACTIVE,this.items[e]),this.current=e,t&&this.trigger(D.CHANGE))}},{key:"next",value:function(){this.is("disable")||(this.go(this.current+1),this.trigger(D.NEXT))}},{key:"prev",value:function(){this.is("disable")||(this.go(this.current-1),this.trigger(D.PREV))}},{key:"resize",value:function(){this.resetPos(this.options.vertical)}},{key:"enable",value:function(){this.is("disable")&&(n.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1,this.leave("disable")),this.trigger(D.ENABLE)}},{key:"disable",value:function(){this.is("disable")||(n.addClass(this.classes.DISABLED,this.element),this.element.disable=!0,this.enter("disable")),this.trigger(D.DISABLE)}},{key:"destroy",value:function(){this.is("initialized")&&(this.unbind(),!0===this.options.vertical&&n.removeClass(this.classes.VERTICAL,this.element),this.options.theme&&n.removeClass(this.getThemeClass(),this.element),this.is("disabled")&&(n.removeClass(this.classes.DISABLED,this.element),this.element.disable=!1),this.leave("initialized")),this.trigger(D.DESTROY),E(v(o.prototype),"destroy",this).call(this)}}])&&d(g.prototype,O),w&&d(g,w),o}(t))||O)||O)||O)||O)||O)||O}));

@@ -14,3 +14,3 @@ {

},
"version": "0.7.22",
"version": "0.7.23",
"category": "ui",

@@ -41,17 +41,17 @@ "main": "dist/thumbnails.common.js",

"dependencies": {
"@pluginjs/breakpoints": "^0.7.16",
"@pluginjs/classes": "^0.7.16",
"@pluginjs/component": "^0.7.14",
"@pluginjs/decorator": "^0.7.18",
"@pluginjs/dom": "^0.7.17",
"@pluginjs/events": "^0.7.16",
"@pluginjs/factory": "^0.7.16",
"@pluginjs/image-loader": "^0.7.16",
"@pluginjs/is": "^0.7.15",
"@pluginjs/loader": "^0.7.18",
"@pluginjs/styled": "^0.7.17",
"@pluginjs/styles": "^0.7.10",
"@pluginjs/swipeable": "^0.7.21",
"@pluginjs/template": "^0.7.16",
"@pluginjs/utils": "^0.7.16",
"@pluginjs/breakpoints": "^0.7.17",
"@pluginjs/classes": "^0.7.17",
"@pluginjs/component": "^0.7.15",
"@pluginjs/decorator": "^0.7.19",
"@pluginjs/dom": "^0.7.18",
"@pluginjs/events": "^0.7.17",
"@pluginjs/factory": "^0.7.17",
"@pluginjs/image-loader": "^0.7.17",
"@pluginjs/is": "^0.7.16",
"@pluginjs/loader": "^0.7.19",
"@pluginjs/styled": "^0.7.18",
"@pluginjs/styles": "^0.7.11",
"@pluginjs/swipeable": "^0.7.22",
"@pluginjs/template": "^0.7.17",
"@pluginjs/utils": "^0.7.17",
"animejs": "*"

@@ -84,3 +84,3 @@ },

},
"gitHead": "9b6e750f9e101ac7708c45c949e1d514d1fc0524"
"gitHead": "472b4a8e7fa20f8f6a75a6d98c42eddd32067b3e"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc