Prime Slider – Addons For Elementor (Revolution of a slider, Hero Slider, Media Slider, Drag Drop Slider, Video Slider, Product Slider, Ecommerce Slider) - Version 2.4.0

Version Description

  • Added: Pacific Widget Added
Download this release

Release Info

Developer bdthemes
Plugin Icon 128x128 Prime Slider – Addons For Elementor (Revolution of a slider, Hero Slider, Media Slider, Drag Drop Slider, Video Slider, Product Slider, Ecommerce Slider)
Version 2.4.0
Comparing to
See all releases

Code changes from version 2.3.0 to 2.4.0

assets/css/ps-pacific.css ADDED
@@ -0,0 +1 @@
 
1
+ .bdt-pacific-slider{overflow:hidden;height:650px;position:relative}.bdt-pacific-slider .swiper-container{height:100%;width:100%}.bdt-pacific-slider .bdt-item{overflow:hidden}.bdt-pacific-slider .bdt-item .bdt-image-wrap{height:100%;width:100%;position:relative;transform:scale(2.3) !important}.bdt-pacific-slider .bdt-item .bdt-image-wrap:before{position:absolute;content:'';width:100%;height:100%;background:rgba(43,45,66,0.5);z-index:1}.bdt-pacific-slider .bdt-item .bdt-img{height:100%;width:100%;object-fit:cover;transition:transform .3s cubic-bezier(.39, .99, .58, 1) !important}.bdt-pacific-slider .bdt-content-wrap{z-index:11;width:100%;padding:30px}.bdt-pacific-slider .bdt-slider-style-2 .bdt-content-wrap{opacity:0}.bdt-pacific-slider .bdt-slider-style-2 .bdt-item.swiper-slide-active .bdt-content-wrap{opacity:1}.bdt-pacific-slider .bdt-item .bdt-category{display:inline-flex;margin-bottom:15px}.bdt-pacific-slider .bdt-item .bdt-category a{background:#ef233c;padding:3px 12px;text-decoration:none;color:#EDF2F4;text-transform:uppercase;font-size:10px;border-radius:2px;transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-category a+a{margin-left:5px}.bdt-pacific-slider .bdt-item .bdt-category a:hover{background:#D90429}.bdt-pacific-slider .bdt-item .bdt-title{margin:0;font-size:24px;font-weight:700;margin-bottom:15px;text-transform:capitalize}.bdt-pacific-slider .bdt-item .bdt-title a{color:#EDF2F4;text-decoration:none;transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-title a:hover{color:#D90429}.bdt-pacific-slider .bdt-meta-box{display:inline-flex;align-items:center;color:#d2d8da;font-size:12px;font-weight:500;text-transform:uppercase;margin-bottom:20px}.bdt-pacific-slider .bdt-meta-box i{padding-right:5px}.bdt-pacific-slider .bdt-meta-box .bdt-author-wrap a{color:#d2d8da;transition:all .3s ease}.bdt-pacific-slider .bdt-meta-box .bdt-author-wrap a:hover{color:#D90429}.bdt-pacific-slider .bdt-meta-box .bdt-meta-separator{margin:0 15px}.bdt-pacific-slider .bdt-meta-box .bdt-post-time{margin-left:15px}.bdt-pacific-slider .bdt-item .bdt-button{font-size:12px;color:#d2d8da;text-transform:uppercase;text-decoration:none;font-weight:500}.bdt-pacific-slider .bdt-item .bdt-btn-text{position:relative;padding-right:5px}.bdt-pacific-slider .bdt-item .bdt-btn-text::before{position:absolute;content:'';bottom:-15px;border:0;width:100%;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#d2d8da;opacity:0;transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-icon{width:18px;transform:rotate(0);transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-button:hover .bdt-icon{transform:rotate(45deg)}.bdt-pacific-slider .bdt-item .bdt-button:hover .bdt-btn-text::before{bottom:-8px;opacity:1}.bdt-pacific-slider .bdt-pagi-wrap{z-index:1;margin:30px}.bdt-pacific-slider .swiper-pagination{position:unset !important}.bdt-pacific-slider .swiper-pagination-bullet{margin:25px 0 !important;display:block;background:transparent;color:#fff;font-size:20px;font-weight:600;opacity:.5;position:relative;transform:scale(1);transition:transform .4s}.bdt-pacific-slider .swiper-pagination-bullet:hover{transform:scale(1.2);opacity:1}.bdt-pacific-slider .swiper-pagination-bullet:before{position:absolute;content:'';border:0;width:100%;width:20px;left:-4px;top:40px;border-top-width:2px;border-top-style:solid;border-top-color:#b6b0b2;opacity:0;transition:all .3s ease}.bdt-pacific-slider .swiper-pagination-bullet:hover:before{top:30px}.bdt-pacific-slider .swiper-pagination-bullet:hover:before{color:#fff;opacity:1}.bdt-pacific-slider .swiper-pagination-bullet-active{opacity:1;transform:scale(1.2);position:relative}.bdt-pacific-slider .swiper-pagination-bullet-active.swiper-pagination-bullet:before{opacity:1;top:30px}.bdt-pacific-slider .bdt-navigation-wrap{z-index:1;display:flex;align-items:center;font-size:12px;text-transform:uppercase;color:#edf2f4;margin:30px}.bdt-pacific-slider .bdt-navigation-next{margin-left:20px;cursor:pointer}.bdt-pacific-slider .bdt-navigation-prev{cursor:pointer}.bdt-pacific-slider .bdt-n-p-text{position:relative}.bdt-pacific-slider .bdt-n-p-text::before{position:absolute;content:'';bottom:-15px;border:0;width:100%;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:#EDF2F4;opacity:0;transition:all .3s ease}.bdt-pacific-slider .bdt-navigation-next:hover .bdt-n-p-text::before{bottom:-8px;opacity:1}.bdt-pacific-slider .bdt-navigation-prev:hover .bdt-n-p-text::before{bottom:-8px;opacity:1}.bdt-pacific-slider .bdt-n-p-icon{transition:all .3s ease;opacity:0}.bdt-pacific-slider .bdt-next-icon{margin-left:-10px}.bdt-pacific-slider .bdt-navigation-next:hover .bdt-next-icon{margin-left:2px;opacity:1}.bdt-pacific-slider .bdt-prev-icon{margin-right:-10px}.bdt-pacific-slider .bdt-navigation-prev:hover .bdt-prev-icon{margin-right:2px;opacity:1}.bdt-pacific-slider-modal .bdt-title{transform:unset;font-size:45px}.bdt-pacific-slider-modal .bdt-title a{color:#242020}@media (min-width:768px){.bdt-pacific-slider .bdt-item .bdt-category{margin-bottom:20px}.bdt-pacific-slider .bdt-item .bdt-category a{padding:4px 10px;font-size:10px}.bdt-pacific-slider .bdt-item .bdt-title{font-size:30px;margin-bottom:16px}.bdt-pacific-slider .bdt-item .bdt-button{font-size:14px}.bdt-pacific-slider .bdt-nav svg{width:10px}.bdt-pacific-slider .bdt-carousel-slider{height:700px}.bdt-pacific-slider .bdt-meta-box{font-size:14px}.bdt-pacific-slider .bdt-navigation-wrap{font-size:14px}}@media (min-width:1024px){.bdt-pacific-slider .bdt-item .bdt-category{margin-bottom:30px}.bdt-pacific-slider .bdt-item .bdt-category a{padding:6px 10px;font-size:12px}.bdt-pacific-slider .bdt-item .bdt-title{font-size:32px;margin-bottom:30px}.bdt-pacific-slider .bdt-nav{width:40px;height:40px;line-height:40px}.bdt-pacific-slider .bdt-nav svg{width:12px}.bdt-pacific-slider .bdt-next-btn{margin-left:80px}.bdt-pacific-slider .bdt-carousel-slider{height:800px}}@media (min-width:1440px){.bdt-pacific-slider .bdt-next-btn{margin-left:100px}}
assets/css/ps-pacific.rtl.css ADDED
@@ -0,0 +1 @@
 
1
+ .bdt-pacific-slider{overflow:hidden;height:650px;position:relative}.bdt-pacific-slider .swiper-container{height:100%;width:100%}.bdt-pacific-slider .bdt-item{overflow:hidden}.bdt-pacific-slider .bdt-item .bdt-image-wrap{height:100%;width:100%;position:relative;transform:scale(2.3) !important}.bdt-pacific-slider .bdt-item .bdt-image-wrap:before{position:absolute;content:'';width:100%;height:100%;background:rgba(43,45,66,0.5);z-index:1}.bdt-pacific-slider .bdt-item .bdt-img{height:100%;width:100%;object-fit:cover;transition:transform .3s cubic-bezier(.39, .99, .58, 1) !important}.bdt-pacific-slider .bdt-content-wrap{z-index:11;width:100%;padding:30px}.bdt-pacific-slider .bdt-slider-style-2 .bdt-content-wrap{opacity:0}.bdt-pacific-slider .bdt-slider-style-2 .bdt-item.swiper-slide-active .bdt-content-wrap{opacity:1}.bdt-pacific-slider .bdt-item .bdt-category{display:inline-flex;margin-bottom:15px}.bdt-pacific-slider .bdt-item .bdt-category a{background:#ef233c;padding:3px 12px;text-decoration:none;color:#EDF2F4;text-transform:uppercase;font-size:10px;border-radius:2px;transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-category a+a{margin-right:5px}.bdt-pacific-slider .bdt-item .bdt-category a:hover{background:#D90429}.bdt-pacific-slider .bdt-item .bdt-title{margin:0;font-size:24px;font-weight:700;margin-bottom:15px;text-transform:capitalize}.bdt-pacific-slider .bdt-item .bdt-title a{color:#EDF2F4;text-decoration:none;transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-title a:hover{color:#D90429}.bdt-pacific-slider .bdt-meta-box{display:inline-flex;align-items:center;color:#d2d8da;font-size:12px;font-weight:500;text-transform:uppercase;margin-bottom:20px}.bdt-pacific-slider .bdt-meta-box i{padding-left:5px}.bdt-pacific-slider .bdt-meta-box .bdt-author-wrap a{color:#d2d8da;transition:all .3s ease}.bdt-pacific-slider .bdt-meta-box .bdt-author-wrap a:hover{color:#D90429}.bdt-pacific-slider .bdt-meta-box .bdt-meta-separator{margin:0 15px}.bdt-pacific-slider .bdt-meta-box .bdt-post-time{margin-right:15px}.bdt-pacific-slider .bdt-item .bdt-button{font-size:12px;color:#d2d8da;text-transform:uppercase;text-decoration:none;font-weight:500}.bdt-pacific-slider .bdt-item .bdt-btn-text{position:relative;padding-left:5px}.bdt-pacific-slider .bdt-item .bdt-btn-text::before{position:absolute;content:'';bottom:-15px;border:0;width:100%;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:#d2d8da;opacity:0;transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-icon{width:18px;transform:rotate(0);transition:all .3s ease}.bdt-pacific-slider .bdt-item .bdt-button:hover .bdt-icon{transform:rotate(-45deg)}.bdt-pacific-slider .bdt-item .bdt-button:hover .bdt-btn-text::before{bottom:-8px;opacity:1}.bdt-pacific-slider .bdt-pagi-wrap{z-index:1;margin:30px}.bdt-pacific-slider .swiper-pagination{position:unset !important}.bdt-pacific-slider .swiper-pagination-bullet{margin:25px 0 !important;display:block;background:transparent;color:#fff;font-size:20px;font-weight:600;opacity:.5;position:relative;transform:scale(1);transition:transform .4s}.bdt-pacific-slider .swiper-pagination-bullet:hover{transform:scale(1.2);opacity:1}.bdt-pacific-slider .swiper-pagination-bullet:before{position:absolute;content:'';border:0;width:100%;width:20px;right:-4px;top:40px;border-top-width:2px;border-top-style:solid;border-top-color:#b6b0b2;opacity:0;transition:all .3s ease}.bdt-pacific-slider .swiper-pagination-bullet:hover:before{top:30px}.bdt-pacific-slider .swiper-pagination-bullet:hover:before{color:#fff;opacity:1}.bdt-pacific-slider .swiper-pagination-bullet-active{opacity:1;transform:scale(1.2);position:relative}.bdt-pacific-slider .swiper-pagination-bullet-active.swiper-pagination-bullet:before{opacity:1;top:30px}.bdt-pacific-slider .bdt-navigation-wrap{z-index:1;display:flex;align-items:center;font-size:12px;text-transform:uppercase;color:#edf2f4;margin:30px}.bdt-pacific-slider .bdt-navigation-next{margin-right:20px;cursor:pointer}.bdt-pacific-slider .bdt-navigation-prev{cursor:pointer}.bdt-pacific-slider .bdt-n-p-text{position:relative}.bdt-pacific-slider .bdt-n-p-text::before{position:absolute;content:'';bottom:-15px;border:0;width:100%;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:#EDF2F4;opacity:0;transition:all .3s ease}.bdt-pacific-slider .bdt-navigation-next:hover .bdt-n-p-text::before{bottom:-8px;opacity:1}.bdt-pacific-slider .bdt-navigation-prev:hover .bdt-n-p-text::before{bottom:-8px;opacity:1}.bdt-pacific-slider .bdt-n-p-icon{transition:all .3s ease;opacity:0}.bdt-pacific-slider .bdt-next-icon{margin-right:-10px}.bdt-pacific-slider .bdt-navigation-next:hover .bdt-next-icon{margin-right:2px;opacity:1}.bdt-pacific-slider .bdt-prev-icon{margin-left:-10px}.bdt-pacific-slider .bdt-navigation-prev:hover .bdt-prev-icon{margin-left:2px;opacity:1}.bdt-pacific-slider-modal .bdt-title{transform:unset;font-size:45px}.bdt-pacific-slider-modal .bdt-title a{color:#242020}@media (min-width:768px){.bdt-pacific-slider .bdt-item .bdt-category{margin-bottom:20px}.bdt-pacific-slider .bdt-item .bdt-category a{padding:4px 10px;font-size:10px}.bdt-pacific-slider .bdt-item .bdt-title{font-size:30px;margin-bottom:16px}.bdt-pacific-slider .bdt-item .bdt-button{font-size:14px}.bdt-pacific-slider .bdt-nav svg{width:10px}.bdt-pacific-slider .bdt-carousel-slider{height:700px}.bdt-pacific-slider .bdt-meta-box{font-size:14px}.bdt-pacific-slider .bdt-navigation-wrap{font-size:14px}}@media (min-width:1024px){.bdt-pacific-slider .bdt-item .bdt-category{margin-bottom:30px}.bdt-pacific-slider .bdt-item .bdt-category a{padding:6px 10px;font-size:12px}.bdt-pacific-slider .bdt-item .bdt-title{font-size:32px;margin-bottom:30px}.bdt-pacific-slider .bdt-nav{width:40px;height:40px;line-height:40px}.bdt-pacific-slider .bdt-nav svg{width:12px}.bdt-pacific-slider .bdt-next-btn{margin-right:80px}.bdt-pacific-slider .bdt-carousel-slider{height:800px}}@media (min-width:1440px){.bdt-pacific-slider .bdt-next-btn{margin-right:100px}}
assets/js/widgets/ps-pacific.js ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function ($, elementor) {
2
+
3
+ 'use strict';
4
+
5
+ var widgetPacific = function ($scope, $) {
6
+
7
+ var $pacific = $scope.find('.bdt-pacific-slider'),
8
+ $settings = $pacific.data('settings'),
9
+ $sliderSettings = $pacific.data('slider-settings'),
10
+ $pacificContainer = $pacific.find(".swiper-container");
11
+
12
+ if (!$pacific.length) {
13
+ return;
14
+ }
15
+
16
+
17
+ const Swiper = elementorFrontend.utils.swiper;
18
+ initSwiper();
19
+ async function initSwiper() {
20
+ var swiper = await new Swiper($pacificContainer, $settings);
21
+ if ($sliderSettings.showPagination !== false) {
22
+ $pacific.find(".swiper-pagination-bullets").children().each(function (i) {
23
+ $(this).text(i += 1);
24
+ });
25
+ }
26
+ };
27
+
28
+ };
29
+
30
+
31
+ jQuery(window).on('elementor/frontend/init', function () {
32
+ elementorFrontend.hooks.addAction('frontend/element_ready/prime-slider-pacific.default', widgetPacific);
33
+ });
34
+
35
+ }(jQuery, window.elementorFrontend));
assets/js/widgets/ps-pacific.min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(n,e){"use strict";var t=function(n,e){var t=n.find(".bdt-pacific-slider"),i=t.data("settings"),r=t.data("slider-settings"),o=t.find(".swiper-container");if(!t.length)return;const d=elementorFrontend.utils.swiper;!async function(){await new d(o,i);!1!==r.showPagination&&t.find(".swiper-pagination-bullets").children().each((function(n){e(this).text(n+=1)}))}()};jQuery(window).on("elementor/frontend/init",(function(){elementorFrontend.hooks.addAction("frontend/element_ready/prime-slider-pacific.default",t)}))}(jQuery,window.elementorFrontend);
assets/vendor/js/parallax.js ADDED
@@ -0,0 +1,1037 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Parallax = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
+ /*
3
+ object-assign
4
+ (c) Sindre Sorhus
5
+ @license MIT
6
+ */
7
+
8
+ 'use strict';
9
+ /* eslint-disable no-unused-vars */
10
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
11
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
12
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
13
+
14
+ function toObject(val) {
15
+ if (val === null || val === undefined) {
16
+ throw new TypeError('Object.assign cannot be called with null or undefined');
17
+ }
18
+
19
+ return Object(val);
20
+ }
21
+
22
+ function shouldUseNative() {
23
+ try {
24
+ if (!Object.assign) {
25
+ return false;
26
+ }
27
+
28
+ // Detect buggy property enumeration order in older V8 versions.
29
+
30
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
31
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
32
+ test1[5] = 'de';
33
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
34
+ return false;
35
+ }
36
+
37
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
38
+ var test2 = {};
39
+ for (var i = 0; i < 10; i++) {
40
+ test2['_' + String.fromCharCode(i)] = i;
41
+ }
42
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
43
+ return test2[n];
44
+ });
45
+ if (order2.join('') !== '0123456789') {
46
+ return false;
47
+ }
48
+
49
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
50
+ var test3 = {};
51
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
52
+ test3[letter] = letter;
53
+ });
54
+ if (Object.keys(Object.assign({}, test3)).join('') !==
55
+ 'abcdefghijklmnopqrst') {
56
+ return false;
57
+ }
58
+
59
+ return true;
60
+ } catch (err) {
61
+ // We don't expect any of the above to throw, but better to be safe.
62
+ return false;
63
+ }
64
+ }
65
+
66
+ module.exports = shouldUseNative() ? Object.assign : function (target, source) {
67
+ var from;
68
+ var to = toObject(target);
69
+ var symbols;
70
+
71
+ for (var s = 1; s < arguments.length; s++) {
72
+ from = Object(arguments[s]);
73
+
74
+ for (var key in from) {
75
+ if (hasOwnProperty.call(from, key)) {
76
+ to[key] = from[key];
77
+ }
78
+ }
79
+
80
+ if (getOwnPropertySymbols) {
81
+ symbols = getOwnPropertySymbols(from);
82
+ for (var i = 0; i < symbols.length; i++) {
83
+ if (propIsEnumerable.call(from, symbols[i])) {
84
+ to[symbols[i]] = from[symbols[i]];
85
+ }
86
+ }
87
+ }
88
+ }
89
+
90
+ return to;
91
+ };
92
+
93
+ },{}],2:[function(require,module,exports){
94
+ (function (process){
95
+ // Generated by CoffeeScript 1.12.2
96
+ (function() {
97
+ var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
98
+
99
+ if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
100
+ module.exports = function() {
101
+ return performance.now();
102
+ };
103
+ } else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
104
+ module.exports = function() {
105
+ return (getNanoSeconds() - nodeLoadTime) / 1e6;
106
+ };
107
+ hrtime = process.hrtime;
108
+ getNanoSeconds = function() {
109
+ var hr;
110
+ hr = hrtime();
111
+ return hr[0] * 1e9 + hr[1];
112
+ };
113
+ moduleLoadTime = getNanoSeconds();
114
+ upTime = process.uptime() * 1e9;
115
+ nodeLoadTime = moduleLoadTime - upTime;
116
+ } else if (Date.now) {
117
+ module.exports = function() {
118
+ return Date.now() - loadTime;
119
+ };
120
+ loadTime = Date.now();
121
+ } else {
122
+ module.exports = function() {
123
+ return new Date().getTime() - loadTime;
124
+ };
125
+ loadTime = new Date().getTime();
126
+ }
127
+
128
+ }).call(this);
129
+
130
+
131
+
132
+ }).call(this,require('_process'))
133
+
134
+ },{"_process":3}],3:[function(require,module,exports){
135
+ // shim for using process in browser
136
+ var process = module.exports = {};
137
+
138
+ // cached from whatever global is present so that test runners that stub it
139
+ // don't break things. But we need to wrap it in a try catch in case it is
140
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
141
+ // function because try/catches deoptimize in certain engines.
142
+
143
+ var cachedSetTimeout;
144
+ var cachedClearTimeout;
145
+
146
+ function defaultSetTimout() {
147
+ throw new Error('setTimeout has not been defined');
148
+ }
149
+ function defaultClearTimeout () {
150
+ throw new Error('clearTimeout has not been defined');
151
+ }
152
+ (function () {
153
+ try {
154
+ if (typeof setTimeout === 'function') {
155
+ cachedSetTimeout = setTimeout;
156
+ } else {
157
+ cachedSetTimeout = defaultSetTimout;
158
+ }
159
+ } catch (e) {
160
+ cachedSetTimeout = defaultSetTimout;
161
+ }
162
+ try {
163
+ if (typeof clearTimeout === 'function') {
164
+ cachedClearTimeout = clearTimeout;
165
+ } else {
166
+ cachedClearTimeout = defaultClearTimeout;
167
+ }
168
+ } catch (e) {
169
+ cachedClearTimeout = defaultClearTimeout;
170
+ }
171
+ } ())
172
+ function runTimeout(fun) {
173
+ if (cachedSetTimeout === setTimeout) {
174
+ //normal enviroments in sane situations
175
+ return setTimeout(fun, 0);
176
+ }
177
+ // if setTimeout wasn't available but was latter defined
178
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
179
+ cachedSetTimeout = setTimeout;
180
+ return setTimeout(fun, 0);
181
+ }
182
+ try {
183
+ // when when somebody has screwed with setTimeout but no I.E. maddness
184
+ return cachedSetTimeout(fun, 0);
185
+ } catch(e){
186
+ try {
187
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
188
+ return cachedSetTimeout.call(null, fun, 0);
189
+ } catch(e){
190
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
191
+ return cachedSetTimeout.call(this, fun, 0);
192
+ }
193
+ }
194
+
195
+
196
+ }
197
+ function runClearTimeout(marker) {
198
+ if (cachedClearTimeout === clearTimeout) {
199
+ //normal enviroments in sane situations
200
+ return clearTimeout(marker);
201
+ }
202
+ // if clearTimeout wasn't available but was latter defined
203
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
204
+ cachedClearTimeout = clearTimeout;
205
+ return clearTimeout(marker);
206
+ }
207
+ try {
208
+ // when when somebody has screwed with setTimeout but no I.E. maddness
209
+ return cachedClearTimeout(marker);
210
+ } catch (e){
211
+ try {
212
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
213
+ return cachedClearTimeout.call(null, marker);
214
+ } catch (e){
215
+ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
216
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
217
+ return cachedClearTimeout.call(this, marker);
218
+ }
219
+ }
220
+
221
+
222
+
223
+ }
224
+ var queue = [];
225
+ var draining = false;
226
+ var currentQueue;
227
+ var queueIndex = -1;
228
+
229
+ function cleanUpNextTick() {
230
+ if (!draining || !currentQueue) {
231
+ return;
232
+ }
233
+ draining = false;
234
+ if (currentQueue.length) {
235
+ queue = currentQueue.concat(queue);
236
+ } else {
237
+ queueIndex = -1;
238
+ }
239
+ if (queue.length) {
240
+ drainQueue();
241
+ }
242
+ }
243
+
244
+ function drainQueue() {
245
+ if (draining) {
246
+ return;
247
+ }
248
+ var timeout = runTimeout(cleanUpNextTick);
249
+ draining = true;
250
+
251
+ var len = queue.length;
252
+ while(len) {
253
+ currentQueue = queue;
254
+ queue = [];
255
+ while (++queueIndex < len) {
256
+ if (currentQueue) {
257
+ currentQueue[queueIndex].run();
258
+ }
259
+ }
260
+ queueIndex = -1;
261
+ len = queue.length;
262
+ }
263
+ currentQueue = null;
264
+ draining = false;
265
+ runClearTimeout(timeout);
266
+ }
267
+
268
+ process.nextTick = function (fun) {
269
+ var args = new Array(arguments.length - 1);
270
+ if (arguments.length > 1) {
271
+ for (var i = 1; i < arguments.length; i++) {
272
+ args[i - 1] = arguments[i];
273
+ }
274
+ }
275
+ queue.push(new Item(fun, args));
276
+ if (queue.length === 1 && !draining) {
277
+ runTimeout(drainQueue);
278
+ }
279
+ };
280
+
281
+ // v8 likes predictible objects
282
+ function Item(fun, array) {
283
+ this.fun = fun;
284
+ this.array = array;
285
+ }
286
+ Item.prototype.run = function () {
287
+ this.fun.apply(null, this.array);
288
+ };
289
+ process.title = 'browser';
290
+ process.browser = true;
291
+ process.env = {};
292
+ process.argv = [];
293
+ process.version = ''; // empty string to avoid regexp issues
294
+ process.versions = {};
295
+
296
+ function noop() {}
297
+
298
+ process.on = noop;
299
+ process.addListener = noop;
300
+ process.once = noop;
301
+ process.off = noop;
302
+ process.removeListener = noop;
303
+ process.removeAllListeners = noop;
304
+ process.emit = noop;
305
+ process.prependListener = noop;
306
+ process.prependOnceListener = noop;
307
+
308
+ process.listeners = function (name) { return [] }
309
+
310
+ process.binding = function (name) {
311
+ throw new Error('process.binding is not supported');
312
+ };
313
+
314
+ process.cwd = function () { return '/' };
315
+ process.chdir = function (dir) {
316
+ throw new Error('process.chdir is not supported');
317
+ };
318
+ process.umask = function() { return 0; };
319
+
320
+ },{}],4:[function(require,module,exports){
321
+ (function (global){
322
+ var now = require('performance-now')
323
+ , root = typeof window === 'undefined' ? global : window
324
+ , vendors = ['moz', 'webkit']
325
+ , suffix = 'AnimationFrame'
326
+ , raf = root['request' + suffix]
327
+ , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
328
+
329
+ for(var i = 0; !raf && i < vendors.length; i++) {
330
+ raf = root[vendors[i] + 'Request' + suffix]
331
+ caf = root[vendors[i] + 'Cancel' + suffix]
332
+ || root[vendors[i] + 'CancelRequest' + suffix]
333
+ }
334
+
335
+ // Some versions of FF have rAF but not cAF
336
+ if(!raf || !caf) {
337
+ var last = 0
338
+ , id = 0
339
+ , queue = []
340
+ , frameDuration = 1000 / 60
341
+
342
+ raf = function(callback) {
343
+ if(queue.length === 0) {
344
+ var _now = now()
345
+ , next = Math.max(0, frameDuration - (_now - last))
346
+ last = next + _now
347
+ setTimeout(function() {
348
+ var cp = queue.slice(0)
349
+ // Clear queue here to prevent
350
+ // callbacks from appending listeners
351
+ // to the current frame's queue
352
+ queue.length = 0
353
+ for(var i = 0; i < cp.length; i++) {
354
+ if(!cp[i].cancelled) {
355
+ try{
356
+ cp[i].callback(last)
357
+ } catch(e) {
358
+ setTimeout(function() { throw e }, 0)
359
+ }
360
+ }
361
+ }
362
+ }, Math.round(next))
363
+ }
364
+ queue.push({
365
+ handle: ++id,
366
+ callback: callback,
367
+ cancelled: false
368
+ })
369
+ return id
370
+ }
371
+
372
+ caf = function(handle) {
373
+ for(var i = 0; i < queue.length; i++) {
374
+ if(queue[i].handle === handle) {
375
+ queue[i].cancelled = true
376
+ }
377
+ }
378
+ }
379
+ }
380
+
381
+ module.exports = function(fn) {
382
+ // Wrap in a new function to prevent
383
+ // `cancel` potentially being assigned
384
+ // to the native rAF function
385
+ return raf.call(root, fn)
386
+ }
387
+ module.exports.cancel = function() {
388
+ caf.apply(root, arguments)
389
+ }
390
+ module.exports.polyfill = function() {
391
+ root.requestAnimationFrame = raf
392
+ root.cancelAnimationFrame = caf
393
+ }
394
+
395
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
396
+
397
+ },{"performance-now":2}],5:[function(require,module,exports){
398
+ 'use strict';
399
+
400
+ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
401
+
402
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
403
+
404
+ /**
405
+ * Parallax.js
406
+ * @author Matthew Wagerfield - @wagerfield, René Roth - mail@reneroth.org
407
+ * @description Creates a parallax effect between an array of layers,
408
+ * driving the motion from the gyroscope output of a smartdevice.
409
+ * If no gyroscope is available, the cursor position is used.
410
+ */
411
+
412
+ var rqAnFr = require('raf');
413
+ var objectAssign = require('object-assign');
414
+
415
+ var helpers = {
416
+ propertyCache: {},
417
+ vendors: [null, ['-webkit-', 'webkit'], ['-moz-', 'Moz'], ['-o-', 'O'], ['-ms-', 'ms']],
418
+
419
+ clamp: function clamp(value, min, max) {
420
+ return min < max ? value < min ? min : value > max ? max : value : value < max ? max : value > min ? min : value;
421
+ },
422
+ data: function data(element, name) {
423
+ return helpers.deserialize(element.getAttribute('data-' + name));
424
+ },
425
+ deserialize: function deserialize(value) {
426
+ if (value === 'true') {
427
+ return true;
428
+ } else if (value === 'false') {
429
+ return false;
430
+ } else if (value === 'null') {
431
+ return null;
432
+ } else if (!isNaN(parseFloat(value)) && isFinite(value)) {
433
+ return parseFloat(value);
434
+ } else {
435
+ return value;
436
+ }
437
+ },
438
+ camelCase: function camelCase(value) {
439
+ return value.replace(/-+(.)?/g, function (match, character) {
440
+ return character ? character.toUpperCase() : '';
441
+ });
442
+ },
443
+ accelerate: function accelerate(element) {
444
+ helpers.css(element, 'transform', 'translate3d(0,0,0) rotate(0.0001deg)');
445
+ helpers.css(element, 'transform-style', 'preserve-3d');
446
+ helpers.css(element, 'backface-visibility', 'hidden');
447
+ },
448
+ transformSupport: function transformSupport(value) {
449
+ var element = document.createElement('div'),
450
+ propertySupport = false,
451
+ propertyValue = null,
452
+ featureSupport = false,
453
+ cssProperty = null,
454
+ jsProperty = null;
455
+ for (var i = 0, l = helpers.vendors.length; i < l; i++) {
456
+ if (helpers.vendors[i] !== null) {
457
+ cssProperty = helpers.vendors[i][0] + 'transform';
458
+ jsProperty = helpers.vendors[i][1] + 'Transform';
459
+ } else {
460
+ cssProperty = 'transform';
461
+ jsProperty = 'transform';
462
+ }
463
+ if (element.style[jsProperty] !== undefined) {
464
+ propertySupport = true;
465
+ break;
466
+ }
467
+ }
468
+ switch (value) {
469
+ case '2D':
470
+ featureSupport = propertySupport;
471
+ break;
472
+ case '3D':
473
+ if (propertySupport) {
474
+ var body = document.body || document.createElement('body'),
475
+ documentElement = document.documentElement,
476
+ documentOverflow = documentElement.style.overflow,
477
+ isCreatedBody = false;
478
+
479
+ if (!document.body) {
480
+ isCreatedBody = true;
481
+ documentElement.style.overflow = 'hidden';
482
+ documentElement.appendChild(body);
483
+ body.style.overflow = 'hidden';
484
+ body.style.background = '';
485
+ }
486
+
487
+ body.appendChild(element);
488
+ element.style[jsProperty] = 'translate3d(1px,1px,1px)';
489
+ propertyValue = window.getComputedStyle(element).getPropertyValue(cssProperty);
490
+ featureSupport = propertyValue !== undefined && propertyValue.length > 0 && propertyValue !== 'none';
491
+ documentElement.style.overflow = documentOverflow;
492
+ body.removeChild(element);
493
+
494
+ if (isCreatedBody) {
495
+ body.removeAttribute('style');
496
+ body.parentNode.removeChild(body);
497
+ }
498
+ }
499
+ break;
500
+ }
501
+ return featureSupport;
502
+ },
503
+ css: function css(element, property, value) {
504
+ var jsProperty = helpers.propertyCache[property];
505
+ if (!jsProperty) {
506
+ for (var i = 0, l = helpers.vendors.length; i < l; i++) {
507
+ if (helpers.vendors[i] !== null) {
508
+ jsProperty = helpers.camelCase(helpers.vendors[i][1] + '-' + property);
509
+ } else {
510
+ jsProperty = property;
511
+ }
512
+ if (element.style[jsProperty] !== undefined) {
513
+ helpers.propertyCache[property] = jsProperty;
514
+ break;
515
+ }
516
+ }
517
+ }
518
+ element.style[jsProperty] = value;
519
+ }
520
+ };
521
+
522
+ var MAGIC_NUMBER = 30,
523
+ DEFAULTS = {
524
+ relativeInput: false,
525
+ clipRelativeInput: false,
526
+ inputElement: null,
527
+ hoverOnly: false,
528
+ calibrationThreshold: 100,
529
+ calibrationDelay: 500,
530
+ supportDelay: 500,
531
+ calibrateX: false,
532
+ calibrateY: true,
533
+ invertX: true,
534
+ invertY: true,
535
+ limitX: false,
536
+ limitY: false,
537
+ scalarX: 10.0,
538
+ scalarY: 10.0,
539
+ frictionX: 0.1,
540
+ frictionY: 0.1,
541
+ originX: 0.5,
542
+ originY: 0.5,
543
+ pointerEvents: false,
544
+ precision: 1,
545
+ onReady: null,
546
+ selector: null
547
+ };
548
+
549
+ var Parallax = function () {
550
+ function Parallax(element, options) {
551
+ _classCallCheck(this, Parallax);
552
+
553
+ this.element = element;
554
+
555
+ var data = {
556
+ calibrateX: helpers.data(this.element, 'calibrate-x'),
557
+ calibrateY: helpers.data(this.element, 'calibrate-y'),
558
+ invertX: helpers.data(this.element, 'invert-x'),
559
+ invertY: helpers.data(this.element, 'invert-y'),
560
+ limitX: helpers.data(this.element, 'limit-x'),
561
+ limitY: helpers.data(this.element, 'limit-y'),
562
+ scalarX: helpers.data(this.element, 'scalar-x'),
563
+ scalarY: helpers.data(this.element, 'scalar-y'),
564
+ frictionX: helpers.data(this.element, 'friction-x'),
565
+ frictionY: helpers.data(this.element, 'friction-y'),
566
+ originX: helpers.data(this.element, 'origin-x'),
567
+ originY: helpers.data(this.element, 'origin-y'),
568
+ pointerEvents: helpers.data(this.element, 'pointer-events'),
569
+ precision: helpers.data(this.element, 'precision'),
570
+ relativeInput: helpers.data(this.element, 'relative-input'),
571
+ clipRelativeInput: helpers.data(this.element, 'clip-relative-input'),
572
+ hoverOnly: helpers.data(this.element, 'hover-only'),
573
+ inputElement: document.querySelector(helpers.data(this.element, 'input-element')),
574
+ selector: helpers.data(this.element, 'selector')
575
+ };
576
+
577
+ for (var key in data) {
578
+ if (data[key] === null) {
579
+ delete data[key];
580
+ }
581
+ }
582
+
583
+ objectAssign(this, DEFAULTS, data, options);
584
+
585
+ if (!this.inputElement) {
586
+ this.inputElement = this.element;
587
+ }
588
+
589
+ this.calibrationTimer = null;
590
+ this.calibrationFlag = true;
591
+ this.enabled = false;
592
+ this.depthsX = [];
593
+ this.depthsY = [];
594
+ this.raf = null;
595
+
596
+ this.bounds = null;
597
+ this.elementPositionX = 0;
598
+ this.elementPositionY = 0;
599
+ this.elementWidth = 0;
600
+ this.elementHeight = 0;
601
+
602
+ this.elementCenterX = 0;
603
+ this.elementCenterY = 0;
604
+
605
+ this.elementRangeX = 0;
606
+ this.elementRangeY = 0;
607
+
608
+ this.calibrationX = 0;
609
+ this.calibrationY = 0;
610
+
611
+ this.inputX = 0;
612
+ this.inputY = 0;
613
+
614
+ this.motionX = 0;
615
+ this.motionY = 0;
616
+
617
+ this.velocityX = 0;
618
+ this.velocityY = 0;
619
+
620
+ this.onMouseMove = this.onMouseMove.bind(this);
621
+ this.onDeviceOrientation = this.onDeviceOrientation.bind(this);
622
+ this.onDeviceMotion = this.onDeviceMotion.bind(this);
623
+ this.onOrientationTimer = this.onOrientationTimer.bind(this);
624
+ this.onMotionTimer = this.onMotionTimer.bind(this);
625
+ this.onCalibrationTimer = this.onCalibrationTimer.bind(this);
626
+ this.onAnimationFrame = this.onAnimationFrame.bind(this);
627
+ this.onWindowResize = this.onWindowResize.bind(this);
628
+
629
+ this.windowWidth = null;
630
+ this.windowHeight = null;
631
+ this.windowCenterX = null;
632
+ this.windowCenterY = null;
633
+ this.windowRadiusX = null;
634
+ this.windowRadiusY = null;
635
+ this.portrait = false;
636
+ this.desktop = !navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i);
637
+ this.motionSupport = !!window.DeviceMotionEvent && !this.desktop;
638
+ this.orientationSupport = !!window.DeviceOrientationEvent && !this.desktop;
639
+ this.orientationStatus = 0;
640
+ this.motionStatus = 0;
641
+
642
+ this.initialise();
643
+ }
644
+
645
+ _createClass(Parallax, [{
646
+ key: 'initialise',
647
+ value: function initialise() {
648
+ if (this.transform2DSupport === undefined) {
649
+ this.transform2DSupport = helpers.transformSupport('2D');
650
+ this.transform3DSupport = helpers.transformSupport('3D');
651
+ }
652
+
653
+ // Configure Context Styles
654
+ if (this.transform3DSupport) {
655
+ helpers.accelerate(this.element);
656
+ }
657
+
658
+ var style = window.getComputedStyle(this.element);
659
+ if (style.getPropertyValue('position') === 'static') {
660
+ this.element.style.position = 'relative';
661
+ }
662
+
663
+ // Pointer events
664
+ if (!this.pointerEvents) {
665
+ this.element.style.pointerEvents = 'none';
666
+ }
667
+
668
+ // Setup
669
+ this.updateLayers();
670
+ this.updateDimensions();
671
+ this.enable();
672
+ this.queueCalibration(this.calibrationDelay);
673
+ }
674
+ }, {
675
+ key: 'doReadyCallback',
676
+ value: function doReadyCallback() {
677
+ if (this.onReady) {
678
+ this.onReady();
679
+ }
680
+ }
681
+ }, {
682
+ key: 'updateLayers',
683
+ value: function updateLayers() {
684
+ if (this.selector) {
685
+ this.layers = this.element.querySelectorAll(this.selector);
686
+ } else {
687
+ this.layers = this.element.children;
688
+ }
689
+
690
+ if (!this.layers.length) {
691
+ console.warn('ParallaxJS: Your scene does not have any layers.');
692
+ }
693
+
694
+ this.depthsX = [];
695
+ this.depthsY = [];
696
+
697
+ for (var index = 0; index < this.layers.length; index++) {
698
+ var layer = this.layers[index];
699
+
700
+ if (this.transform3DSupport) {
701
+ helpers.accelerate(layer);
702
+ }
703
+
704
+ layer.style.position = index ? 'absolute' : 'relative';
705
+ layer.style.display = 'block';
706
+ layer.style.left = 0;
707
+ layer.style.top = 0;
708
+
709
+ var depth = helpers.data(layer, 'depth') || 0;
710
+ this.depthsX.push(helpers.data(layer, 'depth-x') || depth);
711
+ this.depthsY.push(helpers.data(layer, 'depth-y') || depth);
712
+ }
713
+ }
714
+ }, {
715
+ key: 'updateDimensions',
716
+ value: function updateDimensions() {
717
+ this.windowWidth = window.innerWidth;
718
+ this.windowHeight = window.innerHeight;
719
+ this.windowCenterX = this.windowWidth * this.originX;
720
+ this.windowCenterY = this.windowHeight * this.originY;
721
+ this.windowRadiusX = Math.max(this.windowCenterX, this.windowWidth - this.windowCenterX);
722
+ this.windowRadiusY = Math.max(this.windowCenterY, this.windowHeight - this.windowCenterY);
723
+ }
724
+ }, {
725
+ key: 'updateBounds',
726
+ value: function updateBounds() {
727
+ this.bounds = this.inputElement.getBoundingClientRect();
728
+ this.elementPositionX = this.bounds.left;
729
+ this.elementPositionY = this.bounds.top;
730
+ this.elementWidth = this.bounds.width;
731
+ this.elementHeight = this.bounds.height;
732
+ this.elementCenterX = this.elementWidth * this.originX;
733
+ this.elementCenterY = this.elementHeight * this.originY;
734
+ this.elementRangeX = Math.max(this.elementCenterX, this.elementWidth - this.elementCenterX);
735
+ this.elementRangeY = Math.max(this.elementCenterY, this.elementHeight - this.elementCenterY);
736
+ }
737
+ }, {
738
+ key: 'queueCalibration',
739
+ value: function queueCalibration(delay) {
740
+ clearTimeout(this.calibrationTimer);
741
+ this.calibrationTimer = setTimeout(this.onCalibrationTimer, delay);
742
+ }
743
+ }, {
744
+ key: 'enable',
745
+ value: function enable() {
746
+ if (this.enabled) {
747
+ return;
748
+ }
749
+ this.enabled = true;
750
+
751
+ if (this.orientationSupport) {
752
+ this.portrait = false;
753
+ window.addEventListener('deviceorientation', this.onDeviceOrientation);
754
+ this.detectionTimer = setTimeout(this.onOrientationTimer, this.supportDelay);
755
+ } else if (this.motionSupport) {
756
+ this.portrait = false;
757
+ window.addEventListener('devicemotion', this.onDeviceMotion);
758
+ this.detectionTimer = setTimeout(this.onMotionTimer, this.supportDelay);
759
+ } else {
760
+ this.calibrationX = 0;
761
+ this.calibrationY = 0;
762
+ this.portrait = false;
763
+ window.addEventListener('mousemove', this.onMouseMove);
764
+ this.doReadyCallback();
765
+ }
766
+
767
+ window.addEventListener('resize', this.onWindowResize);
768
+ this.raf = rqAnFr(this.onAnimationFrame);
769
+ }
770
+ }, {
771
+ key: 'disable',
772
+ value: function disable() {
773
+ if (!this.enabled) {
774
+ return;
775
+ }
776
+ this.enabled = false;
777
+
778
+ if (this.orientationSupport) {
779
+ window.removeEventListener('deviceorientation', this.onDeviceOrientation);
780
+ } else if (this.motionSupport) {
781
+ window.removeEventListener('devicemotion', this.onDeviceMotion);
782
+ } else {
783
+ window.removeEventListener('mousemove', this.onMouseMove);
784
+ }
785
+
786
+ window.removeEventListener('resize', this.onWindowResize);
787
+ rqAnFr.cancel(this.raf);
788
+ }
789
+ }, {
790
+ key: 'calibrate',
791
+ value: function calibrate(x, y) {
792
+ this.calibrateX = x === undefined ? this.calibrateX : x;
793
+ this.calibrateY = y === undefined ? this.calibrateY : y;
794
+ }
795
+ }, {
796
+ key: 'invert',
797
+ value: function invert(x, y) {
798
+ this.invertX = x === undefined ? this.invertX : x;
799
+ this.invertY = y === undefined ? this.invertY : y;
800
+ }
801
+ }, {
802
+ key: 'friction',
803
+ value: function friction(x, y) {
804
+ this.frictionX = x === undefined ? this.frictionX : x;
805
+ this.frictionY = y === undefined ? this.frictionY : y;
806
+ }
807
+ }, {
808
+ key: 'scalar',
809
+ value: function scalar(x, y) {
810
+ this.scalarX = x === undefined ? this.scalarX : x;
811
+ this.scalarY = y === undefined ? this.scalarY : y;
812
+ }
813
+ }, {
814
+ key: 'limit',
815
+ value: function limit(x, y) {
816
+ this.limitX = x === undefined ? this.limitX : x;
817
+ this.limitY = y === undefined ? this.limitY : y;
818
+ }
819
+ }, {
820
+ key: 'origin',
821
+ value: function origin(x, y) {
822
+ this.originX = x === undefined ? this.originX : x;
823
+ this.originY = y === undefined ? this.originY : y;
824
+ }
825
+ }, {
826
+ key: 'setInputElement',
827
+ value: function setInputElement(element) {
828
+ this.inputElement = element;
829
+ this.updateDimensions();
830
+ }
831
+ }, {
832
+ key: 'setPosition',
833
+ value: function setPosition(element, x, y) {
834
+ x = x.toFixed(this.precision) + 'px';
835
+ y = y.toFixed(this.precision) + 'px';
836
+ if (this.transform3DSupport) {
837
+ helpers.css(element, 'transform', 'translate3d(' + x + ',' + y + ',0)');
838
+ } else if (this.transform2DSupport) {
839
+ helpers.css(element, 'transform', 'translate(' + x + ',' + y + ')');
840
+ } else {
841
+ element.style.left = x;
842
+ element.style.top = y;
843
+ }
844
+ }
845
+ }, {
846
+ key: 'onOrientationTimer',
847
+ value: function onOrientationTimer() {
848
+ if (this.orientationSupport && this.orientationStatus === 0) {
849
+ this.disable();
850
+ this.orientationSupport = false;
851
+ this.enable();
852
+ } else {
853
+ this.doReadyCallback();
854
+ }
855
+ }
856
+ }, {
857
+ key: 'onMotionTimer',
858
+ value: function onMotionTimer() {
859
+ if (this.motionSupport && this.motionStatus === 0) {
860
+ this.disable();
861
+ this.motionSupport = false;
862
+ this.enable();
863
+ } else {
864
+ this.doReadyCallback();
865
+ }
866
+ }
867
+ }, {
868
+ key: 'onCalibrationTimer',
869
+ value: function onCalibrationTimer() {
870
+ this.calibrationFlag = true;
871
+ }
872
+ }, {
873
+ key: 'onWindowResize',
874
+ value: function onWindowResize() {
875
+ this.updateDimensions();
876
+ }
877
+ }, {
878
+ key: 'onAnimationFrame',
879
+ value: function onAnimationFrame() {
880
+ this.updateBounds();
881
+ var calibratedInputX = this.inputX - this.calibrationX,
882
+ calibratedInputY = this.inputY - this.calibrationY;
883
+ if (Math.abs(calibratedInputX) > this.calibrationThreshold || Math.abs(calibratedInputY) > this.calibrationThreshold) {
884
+ this.queueCalibration(0);
885
+ }
886
+ if (this.portrait) {
887
+ this.motionX = this.calibrateX ? calibratedInputY : this.inputY;
888
+ this.motionY = this.calibrateY ? calibratedInputX : this.inputX;
889
+ } else {
890
+ this.motionX = this.calibrateX ? calibratedInputX : this.inputX;
891
+ this.motionY = this.calibrateY ? calibratedInputY : this.inputY;
892
+ }
893
+ this.motionX *= this.elementWidth * (this.scalarX / 100);
894
+ this.motionY *= this.elementHeight * (this.scalarY / 100);
895
+ if (!isNaN(parseFloat(this.limitX))) {
896
+ this.motionX = helpers.clamp(this.motionX, -this.limitX, this.limitX);
897
+ }
898
+ if (!isNaN(parseFloat(this.limitY))) {
899
+ this.motionY = helpers.clamp(this.motionY, -this.limitY, this.limitY);
900
+ }
901
+ this.velocityX += (this.motionX - this.velocityX) * this.frictionX;
902
+ this.velocityY += (this.motionY - this.velocityY) * this.frictionY;
903
+ for (var index = 0; index < this.layers.length; index++) {
904
+ var layer = this.layers[index],
905
+ depthX = this.depthsX[index],
906
+ depthY = this.depthsY[index],
907
+ xOffset = this.velocityX * (depthX * (this.invertX ? -1 : 1)),
908
+ yOffset = this.velocityY * (depthY * (this.invertY ? -1 : 1));
909
+ this.setPosition(layer, xOffset, yOffset);
910
+ }
911
+ this.raf = rqAnFr(this.onAnimationFrame);
912
+ }
913
+ }, {
914
+ key: 'rotate',
915
+ value: function rotate(beta, gamma) {
916
+ // Extract Rotation
917
+ var x = (beta || 0) / MAGIC_NUMBER,
918
+ // -90 :: 90
919
+ y = (gamma || 0) / MAGIC_NUMBER; // -180 :: 180
920
+
921
+ // Detect Orientation Change
922
+ var portrait = this.windowHeight > this.windowWidth;
923
+ if (this.portrait !== portrait) {
924
+ this.portrait = portrait;
925
+ this.calibrationFlag = true;
926
+ }
927
+
928
+ if (this.calibrationFlag) {
929
+ this.calibrationFlag = false;
930
+ this.calibrationX = x;
931
+ this.calibrationY = y;
932
+ }
933
+
934
+ this.inputX = x;
935
+ this.inputY = y;
936
+ }
937
+ }, {
938
+ key: 'onDeviceOrientation',
939
+ value: function onDeviceOrientation(event) {
940
+ var beta = event.beta;
941
+ var gamma = event.gamma;
942
+ if (beta !== null && gamma !== null) {
943
+ this.orientationStatus = 1;
944
+ this.rotate(beta, gamma);
945
+ }
946
+ }
947
+ }, {
948
+ key: 'onDeviceMotion',
949
+ value: function onDeviceMotion(event) {
950
+ var beta = event.rotationRate.beta;
951
+ var gamma = event.rotationRate.gamma;
952
+ if (beta !== null && gamma !== null) {
953
+ this.motionStatus = 1;
954
+ this.rotate(beta, gamma);
955
+ }
956
+ }
957
+ }, {
958
+ key: 'onMouseMove',
959
+ value: function onMouseMove(event) {
960
+ var clientX = event.clientX,
961
+ clientY = event.clientY;
962
+
963
+ // reset input to center if hoverOnly is set and we're not hovering the element
964
+ if (this.hoverOnly && (clientX < this.elementPositionX || clientX > this.elementPositionX + this.elementWidth || clientY < this.elementPositionY || clientY > this.elementPositionY + this.elementHeight)) {
965
+ this.inputX = 0;
966
+ this.inputY = 0;
967
+ return;
968
+ }
969
+
970
+ if (this.relativeInput) {
971
+ // Clip mouse coordinates inside element bounds.
972
+ if (this.clipRelativeInput) {
973
+ clientX = Math.max(clientX, this.elementPositionX);
974
+ clientX = Math.min(clientX, this.elementPositionX + this.elementWidth);
975
+ clientY = Math.max(clientY, this.elementPositionY);
976
+ clientY = Math.min(clientY, this.elementPositionY + this.elementHeight);
977
+ }
978
+ // Calculate input relative to the element.
979
+ if (this.elementRangeX && this.elementRangeY) {
980
+ this.inputX = (clientX - this.elementPositionX - this.elementCenterX) / this.elementRangeX;
981
+ this.inputY = (clientY - this.elementPositionY - this.elementCenterY) / this.elementRangeY;
982
+ }
983
+ } else {
984
+ // Calculate input relative to the window.
985
+ if (this.windowRadiusX && this.windowRadiusY) {
986
+ this.inputX = (clientX - this.windowCenterX) / this.windowRadiusX;
987
+ this.inputY = (clientY - this.windowCenterY) / this.windowRadiusY;
988
+ }
989
+ }
990
+ }
991
+ }, {
992
+ key: 'destroy',
993
+ value: function destroy() {
994
+ this.disable();
995
+
996
+ clearTimeout(this.calibrationTimer);
997
+ clearTimeout(this.detectionTimer);
998
+
999
+ this.element.removeAttribute('style');
1000
+ for (var index = 0; index < this.layers.length; index++) {
1001
+ this.layers[index].removeAttribute('style');
1002
+ }
1003
+
1004
+ delete this.element;
1005
+ delete this.layers;
1006
+ }
1007
+ }, {
1008
+ key: 'version',
1009
+ value: function version() {
1010
+ return '3.1.0';
1011
+ }
1012
+ }]);
1013
+
1014
+ return Parallax;
1015
+ }();
1016
+
1017
+ module.exports = Parallax;
1018
+
1019
+ },{"object-assign":1,"raf":4}]},{},[5])(5)
1020
+ });
1021
+
1022
+
1023
+ function setParallax(){
1024
+ "use strict";
1025
+ jQuery(".parallax-scene:not(.parallax-added)").each(function(){
1026
+ try{
1027
+ var elem=jQuery(this).next(".has-bdt-parallax")[0];
1028
+ jQuery(this).prependTo(elem);
1029
+ var parallax = new Parallax(this);
1030
+ }catch(e){
1031
+ //console.log(e.message);
1032
+ }
1033
+ jQuery(this).addClass('parallax-added');
1034
+ });
1035
+ }
1036
+
1037
+ jQuery(document).ready(function($) { setParallax(); });
assets/vendor/js/parallax.min.js ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ function setParallax(){"use strict";jQuery(".parallax-scene:not(.parallax-added)").each((function(){try{var t=jQuery(this).next(".has-bdt-parallax")[0];jQuery(this).prependTo(t);new Parallax(this)}catch(t){}jQuery(this).addClass("parallax-added")}))}!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Parallax=t()}}((function(){return function t(e,i,n){function o(r,a){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[r]={exports:{}};e[r][0].call(u.exports,(function(t){var i=e[r][1][t];return o(i||t)}),u,u.exports,t,e,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,i){
2
+ /*
3
+ object-assign
4
+ (c) Sindre Sorhus
5
+ @license MIT
6
+ */
7
+ "use strict";var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;function r(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,a,l=r(t),h=1;h<arguments.length;h++){for(var u in i=Object(arguments[h]))o.call(i,u)&&(l[u]=i[u]);if(n){a=n(i);for(var c=0;c<a.length;c++)s.call(i,a[c])&&(l[a[c]]=i[a[c]])}}return l}},{}],2:[function(t,e,i){(function(t){(function(){var i,n,o,s,r,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(i()-r)/1e6},n=t.hrtime,s=(i=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*t.uptime(),r=s-a):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,t("_process"))},{_process:3}],3:[function(t,e,i){var n,o,s=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===r||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:r}catch(t){n=r}try{o="function"==typeof clearTimeout?clearTimeout:a}catch(t){o=a}}();var h,u=[],c=!1,d=-1;function m(){c&&h&&(c=!1,h.length?u=h.concat(u):d=-1,u.length&&p())}function p(){if(!c){var t=l(m);c=!0;for(var e=u.length;e;){for(h=u,u=[];++d<e;)h&&h[d].run();d=-1,e=u.length}h=null,c=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===a||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function v(){}s.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];u.push(new f(t,e)),1!==u.length||c||l(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=v,s.addListener=v,s.once=v,s.off=v,s.removeListener=v,s.removeAllListeners=v,s.emit=v,s.prependListener=v,s.prependOnceListener=v,s.listeners=function(t){return[]},s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],4:[function(t,e,i){(function(i){for(var n=t("performance-now"),o="undefined"==typeof window?i:window,s=["moz","webkit"],r="AnimationFrame",a=o["request"+r],l=o["cancel"+r]||o["cancelRequest"+r],h=0;!a&&h<s.length;h++)a=o[s[h]+"Request"+r],l=o[s[h]+"Cancel"+r]||o[s[h]+"CancelRequest"+r];if(!a||!l){var u=0,c=0,d=[];a=function(t){if(0===d.length){var e=n(),i=Math.max(0,1e3/60-(e-u));u=i+e,setTimeout((function(){var t=d.slice(0);d.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(i))}return d.push({handle:++c,callback:t,cancelled:!1}),c},l=function(t){for(var e=0;e<d.length;e++)d[e].handle===t&&(d[e].cancelled=!0)}}e.exports=function(t){return a.call(o,t)},e.exports.cancel=function(){l.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=a,o.cancelAnimationFrame=l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":2}],5:[function(t,e,i){"use strict";var n=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}();var o=t("raf"),s=t("object-assign"),r={propertyCache:{},vendors:[null,["-webkit-","webkit"],["-moz-","Moz"],["-o-","O"],["-ms-","ms"]],clamp:function(t,e,i){return e<i?t<e?e:t>i?i:t:t<i?i:t>e?e:t},data:function(t,e){return r.deserialize(t.getAttribute("data-"+e))},deserialize:function(t){return"true"===t||"false"!==t&&("null"===t?null:!isNaN(parseFloat(t))&&isFinite(t)?parseFloat(t):t)},camelCase:function(t){return t.replace(/-+(.)?/g,(function(t,e){return e?e.toUpperCase():""}))},accelerate:function(t){r.css(t,"transform","translate3d(0,0,0) rotate(0.0001deg)"),r.css(t,"transform-style","preserve-3d"),r.css(t,"backface-visibility","hidden")},transformSupport:function(t){for(var e=document.createElement("div"),i=!1,n=null,o=!1,s=null,a=null,l=0,h=r.vendors.length;l<h;l++)if(null!==r.vendors[l]?(s=r.vendors[l][0]+"transform",a=r.vendors[l][1]+"Transform"):(s="transform",a="transform"),void 0!==e.style[a]){i=!0;break}switch(t){case"2D":o=i;break;case"3D":if(i){var u=document.body||document.createElement("body"),c=document.documentElement,d=c.style.overflow,m=!1;document.body||(m=!0,c.style.overflow="hidden",c.appendChild(u),u.style.overflow="hidden",u.style.background=""),u.appendChild(e),e.style[a]="translate3d(1px,1px,1px)",o=void 0!==(n=window.getComputedStyle(e).getPropertyValue(s))&&n.length>0&&"none"!==n,c.style.overflow=d,u.removeChild(e),m&&(u.removeAttribute("style"),u.parentNode.removeChild(u))}}return o},css:function(t,e,i){var n=r.propertyCache[e];if(!n)for(var o=0,s=r.vendors.length;o<s;o++)if(n=null!==r.vendors[o]?r.camelCase(r.vendors[o][1]+"-"+e):e,void 0!==t.style[n]){r.propertyCache[e]=n;break}t.style[n]=i}},a={relativeInput:!1,clipRelativeInput:!1,inputElement:null,hoverOnly:!1,calibrationThreshold:100,calibrationDelay:500,supportDelay:500,calibrateX:!1,calibrateY:!0,invertX:!0,invertY:!0,limitX:!1,limitY:!1,scalarX:10,scalarY:10,frictionX:.1,frictionY:.1,originX:.5,originY:.5,pointerEvents:!1,precision:1,onReady:null,selector:null},l=function(){function t(e,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.element=e;var n={calibrateX:r.data(this.element,"calibrate-x"),calibrateY:r.data(this.element,"calibrate-y"),invertX:r.data(this.element,"invert-x"),invertY:r.data(this.element,"invert-y"),limitX:r.data(this.element,"limit-x"),limitY:r.data(this.element,"limit-y"),scalarX:r.data(this.element,"scalar-x"),scalarY:r.data(this.element,"scalar-y"),frictionX:r.data(this.element,"friction-x"),frictionY:r.data(this.element,"friction-y"),originX:r.data(this.element,"origin-x"),originY:r.data(this.element,"origin-y"),pointerEvents:r.data(this.element,"pointer-events"),precision:r.data(this.element,"precision"),relativeInput:r.data(this.element,"relative-input"),clipRelativeInput:r.data(this.element,"clip-relative-input"),hoverOnly:r.data(this.element,"hover-only"),inputElement:document.querySelector(r.data(this.element,"input-element")),selector:r.data(this.element,"selector")};for(var o in n)null===n[o]&&delete n[o];s(this,a,n,i),this.inputElement||(this.inputElement=this.element),this.calibrationTimer=null,this.calibrationFlag=!0,this.enabled=!1,this.depthsX=[],this.depthsY=[],this.raf=null,this.bounds=null,this.elementPositionX=0,this.elementPositionY=0,this.elementWidth=0,this.elementHeight=0,this.elementCenterX=0,this.elementCenterY=0,this.elementRangeX=0,this.elementRangeY=0,this.calibrationX=0,this.calibrationY=0,this.inputX=0,this.inputY=0,this.motionX=0,this.motionY=0,this.velocityX=0,this.velocityY=0,this.onMouseMove=this.onMouseMove.bind(this),this.onDeviceOrientation=this.onDeviceOrientation.bind(this),this.onDeviceMotion=this.onDeviceMotion.bind(this),this.onOrientationTimer=this.onOrientationTimer.bind(this),this.onMotionTimer=this.onMotionTimer.bind(this),this.onCalibrationTimer=this.onCalibrationTimer.bind(this),this.onAnimationFrame=this.onAnimationFrame.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.windowWidth=null,this.windowHeight=null,this.windowCenterX=null,this.windowCenterY=null,this.windowRadiusX=null,this.windowRadiusY=null,this.portrait=!1,this.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),this.motionSupport=!!window.DeviceMotionEvent&&!this.desktop,this.orientationSupport=!!window.DeviceOrientationEvent&&!this.desktop,this.orientationStatus=0,this.motionStatus=0,this.initialise()}return n(t,[{key:"initialise",value:function(){void 0===this.transform2DSupport&&(this.transform2DSupport=r.transformSupport("2D"),this.transform3DSupport=r.transformSupport("3D")),this.transform3DSupport&&r.accelerate(this.element),"static"===window.getComputedStyle(this.element).getPropertyValue("position")&&(this.element.style.position="relative"),this.pointerEvents||(this.element.style.pointerEvents="none"),this.updateLayers(),this.updateDimensions(),this.enable(),this.queueCalibration(this.calibrationDelay)}},{key:"doReadyCallback",value:function(){this.onReady&&this.onReady()}},{key:"updateLayers",value:function(){this.selector?this.layers=this.element.querySelectorAll(this.selector):this.layers=this.element.children,this.layers.length||console.warn("ParallaxJS: Your scene does not have any layers."),this.depthsX=[],this.depthsY=[];for(var t=0;t<this.layers.length;t++){var e=this.layers[t];this.transform3DSupport&&r.accelerate(e),e.style.position=t?"absolute":"relative",e.style.display="block",e.style.left=0,e.style.top=0;var i=r.data(e,"depth")||0;this.depthsX.push(r.data(e,"depth-x")||i),this.depthsY.push(r.data(e,"depth-y")||i)}}},{key:"updateDimensions",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.windowCenterX=this.windowWidth*this.originX,this.windowCenterY=this.windowHeight*this.originY,this.windowRadiusX=Math.max(this.windowCenterX,this.windowWidth-this.windowCenterX),this.windowRadiusY=Math.max(this.windowCenterY,this.windowHeight-this.windowCenterY)}},{key:"updateBounds",value:function(){this.bounds=this.inputElement.getBoundingClientRect(),this.elementPositionX=this.bounds.left,this.elementPositionY=this.bounds.top,this.elementWidth=this.bounds.width,this.elementHeight=this.bounds.height,this.elementCenterX=this.elementWidth*this.originX,this.elementCenterY=this.elementHeight*this.originY,this.elementRangeX=Math.max(this.elementCenterX,this.elementWidth-this.elementCenterX),this.elementRangeY=Math.max(this.elementCenterY,this.elementHeight-this.elementCenterY)}},{key:"queueCalibration",value:function(t){clearTimeout(this.calibrationTimer),this.calibrationTimer=setTimeout(this.onCalibrationTimer,t)}},{key:"enable",value:function(){this.enabled||(this.enabled=!0,this.orientationSupport?(this.portrait=!1,window.addEventListener("deviceorientation",this.onDeviceOrientation),this.detectionTimer=setTimeout(this.onOrientationTimer,this.supportDelay)):this.motionSupport?(this.portrait=!1,window.addEventListener("devicemotion",this.onDeviceMotion),this.detectionTimer=setTimeout(this.onMotionTimer,this.supportDelay)):(this.calibrationX=0,this.calibrationY=0,this.portrait=!1,window.addEventListener("mousemove",this.onMouseMove),this.doReadyCallback()),window.addEventListener("resize",this.onWindowResize),this.raf=o(this.onAnimationFrame))}},{key:"disable",value:function(){this.enabled&&(this.enabled=!1,this.orientationSupport?window.removeEventListener("deviceorientation",this.onDeviceOrientation):this.motionSupport?window.removeEventListener("devicemotion",this.onDeviceMotion):window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("resize",this.onWindowResize),o.cancel(this.raf))}},{key:"calibrate",value:function(t,e){this.calibrateX=void 0===t?this.calibrateX:t,this.calibrateY=void 0===e?this.calibrateY:e}},{key:"invert",value:function(t,e){this.invertX=void 0===t?this.invertX:t,this.invertY=void 0===e?this.invertY:e}},{key:"friction",value:function(t,e){this.frictionX=void 0===t?this.frictionX:t,this.frictionY=void 0===e?this.frictionY:e}},{key:"scalar",value:function(t,e){this.scalarX=void 0===t?this.scalarX:t,this.scalarY=void 0===e?this.scalarY:e}},{key:"limit",value:function(t,e){this.limitX=void 0===t?this.limitX:t,this.limitY=void 0===e?this.limitY:e}},{key:"origin",value:function(t,e){this.originX=void 0===t?this.originX:t,this.originY=void 0===e?this.originY:e}},{key:"setInputElement",value:function(t){this.inputElement=t,this.updateDimensions()}},{key:"setPosition",value:function(t,e,i){e=e.toFixed(this.precision)+"px",i=i.toFixed(this.precision)+"px",this.transform3DSupport?r.css(t,"transform","translate3d("+e+","+i+",0)"):this.transform2DSupport?r.css(t,"transform","translate("+e+","+i+")"):(t.style.left=e,t.style.top=i)}},{key:"onOrientationTimer",value:function(){this.orientationSupport&&0===this.orientationStatus?(this.disable(),this.orientationSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onMotionTimer",value:function(){this.motionSupport&&0===this.motionStatus?(this.disable(),this.motionSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onCalibrationTimer",value:function(){this.calibrationFlag=!0}},{key:"onWindowResize",value:function(){this.updateDimensions()}},{key:"onAnimationFrame",value:function(){this.updateBounds();var t=this.inputX-this.calibrationX,e=this.inputY-this.calibrationY;(Math.abs(t)>this.calibrationThreshold||Math.abs(e)>this.calibrationThreshold)&&this.queueCalibration(0),this.portrait?(this.motionX=this.calibrateX?e:this.inputY,this.motionY=this.calibrateY?t:this.inputX):(this.motionX=this.calibrateX?t:this.inputX,this.motionY=this.calibrateY?e:this.inputY),this.motionX*=this.elementWidth*(this.scalarX/100),this.motionY*=this.elementHeight*(this.scalarY/100),isNaN(parseFloat(this.limitX))||(this.motionX=r.clamp(this.motionX,-this.limitX,this.limitX)),isNaN(parseFloat(this.limitY))||(this.motionY=r.clamp(this.motionY,-this.limitY,this.limitY)),this.velocityX+=(this.motionX-this.velocityX)*this.frictionX,this.velocityY+=(this.motionY-this.velocityY)*this.frictionY;for(var i=0;i<this.layers.length;i++){var n=this.layers[i],s=this.depthsX[i],a=this.depthsY[i],l=this.velocityX*(s*(this.invertX?-1:1)),h=this.velocityY*(a*(this.invertY?-1:1));this.setPosition(n,l,h)}this.raf=o(this.onAnimationFrame)}},{key:"rotate",value:function(t,e){var i=(t||0)/30,n=(e||0)/30,o=this.windowHeight>this.windowWidth;this.portrait!==o&&(this.portrait=o,this.calibrationFlag=!0),this.calibrationFlag&&(this.calibrationFlag=!1,this.calibrationX=i,this.calibrationY=n),this.inputX=i,this.inputY=n}},{key:"onDeviceOrientation",value:function(t){var e=t.beta,i=t.gamma;null!==e&&null!==i&&(this.orientationStatus=1,this.rotate(e,i))}},{key:"onDeviceMotion",value:function(t){var e=t.rotationRate.beta,i=t.rotationRate.gamma;null!==e&&null!==i&&(this.motionStatus=1,this.rotate(e,i))}},{key:"onMouseMove",value:function(t){var e=t.clientX,i=t.clientY;if(this.hoverOnly&&(e<this.elementPositionX||e>this.elementPositionX+this.elementWidth||i<this.elementPositionY||i>this.elementPositionY+this.elementHeight))return this.inputX=0,void(this.inputY=0);this.relativeInput?(this.clipRelativeInput&&(e=Math.max(e,this.elementPositionX),e=Math.min(e,this.elementPositionX+this.elementWidth),i=Math.max(i,this.elementPositionY),i=Math.min(i,this.elementPositionY+this.elementHeight)),this.elementRangeX&&this.elementRangeY&&(this.inputX=(e-this.elementPositionX-this.elementCenterX)/this.elementRangeX,this.inputY=(i-this.elementPositionY-this.elementCenterY)/this.elementRangeY)):this.windowRadiusX&&this.windowRadiusY&&(this.inputX=(e-this.windowCenterX)/this.windowRadiusX,this.inputY=(i-this.windowCenterY)/this.windowRadiusY)}},{key:"destroy",value:function(){this.disable(),clearTimeout(this.calibrationTimer),clearTimeout(this.detectionTimer),this.element.removeAttribute("style");for(var t=0;t<this.layers.length;t++)this.layers[t].removeAttribute("style");delete this.element,delete this.layers}},{key:"version",value:function(){return"3.1.0"}}]),t}();e.exports=l},{"object-assign":1,raf:4}]},{},[5])(5)})),jQuery(document).ready((function(t){setParallax()}));
bdthemes-prime-slider.php CHANGED
@@ -4,14 +4,14 @@
4
  * Plugin Name: Prime Slider
5
  * Plugin URI: https://primeslider.pro/
6
  * Description: Prime Slider is a packed of elementor widget that gives you some awesome header and slider combination for your website.
7
- * Version: 2.3.2
8
  * Author: BdThemes
9
  * Author URI: https://bdthemes.com/
10
  * Text Domain: bdthemes-prime-slider
11
  * Domain Path: /languages
12
  * License: GPL3
13
  * Elementor requires at least: 3.0.0
14
- * Elementor tested up to: 3.5.0
15
  *
16
  */
17
 
@@ -57,7 +57,7 @@ if ( function_exists( 'bdt_ps' ) ) {
57
  }
58
 
59
  // Some pre define value for easy use
60
- define( 'BDTPS_VER', '2.3.2' );
61
  define( 'BDTPS__FILE__', __FILE__ );
62
  define( 'BDTPS_PNAME', basename( dirname( BDTPS__FILE__ ) ) );
63
  define( 'BDTPS_PBNAME', plugin_basename( BDTPS__FILE__ ) );
4
  * Plugin Name: Prime Slider
5
  * Plugin URI: https://primeslider.pro/
6
  * Description: Prime Slider is a packed of elementor widget that gives you some awesome header and slider combination for your website.
7
+ * Version: 2.4.0
8
  * Author: BdThemes
9
  * Author URI: https://bdthemes.com/
10
  * Text Domain: bdthemes-prime-slider
11
  * Domain Path: /languages
12
  * License: GPL3
13
  * Elementor requires at least: 3.0.0
14
+ * Elementor tested up to: 3.5.1
15
  *
16
  */
17
 
57
  }
58
 
59
  // Some pre define value for easy use
60
+ define( 'BDTPS_VER', '2.4.0' );
61
  define( 'BDTPS__FILE__', __FILE__ );
62
  define( 'BDTPS_PNAME', basename( dirname( BDTPS__FILE__ ) ) );
63
  define( 'BDTPS_PBNAME', plugin_basename( BDTPS__FILE__ ) );
changelog.txt CHANGED
@@ -1,3 +1,9 @@
 
 
 
 
 
 
1
  ## 2.3.2 [19th December 2021]
2
 
3
  ### Added
1
+ ## 2.4.0 [23th December 2021]
2
+
3
+ ### Added
4
+
5
+ - Pacific Widget Added
6
+
7
  ## 2.3.2 [19th December 2021]
8
 
9
  ### Added
includes/admin-settings.php CHANGED
@@ -298,6 +298,18 @@ class PrimeSlider_Admin_Settings
298
  'video_url' => 'https://youtu.be/uzBHDw_mdRE',
299
  ];
300
  }
 
 
 
 
 
 
 
 
 
 
 
 
301
  if ( ps_is_pagepiling_enabled() ) {
302
  $settings_fields['prime_slider_active_modules'][] = [
303
  'name' => 'pagepiling',
298
  'video_url' => 'https://youtu.be/uzBHDw_mdRE',
299
  ];
300
  }
301
+ if ( ps_is_pacific_enabled() ) {
302
+ $settings_fields['prime_slider_active_modules'][] = [
303
+ 'name' => 'pacific',
304
+ 'label' => esc_html__( 'Pacific', 'bdthemes-prime-slider' ),
305
+ 'type' => 'checkbox',
306
+ 'default' => "off",
307
+ 'widget_type' => 'free',
308
+ 'content_type' => 'post new',
309
+ 'demo_url' => 'https://primeslider.pro/demo/pacific/',
310
+ 'video_url' => '',
311
+ ];
312
+ }
313
  if ( ps_is_pagepiling_enabled() ) {
314
  $settings_fields['prime_slider_active_modules'][] = [
315
  'name' => 'pagepiling',
includes/modules-manager.php CHANGED
@@ -90,6 +90,9 @@ final class Manager
90
  if ( ps_is_multiscroll_enabled() ) {
91
  $modules[] = 'multiscroll';
92
  }
 
 
 
93
  if ( ps_is_pagepiling_enabled() ) {
94
  $modules[] = 'pagepiling';
95
  }
90
  if ( ps_is_multiscroll_enabled() ) {
91
  $modules[] = 'multiscroll';
92
  }
93
+ if ( ps_is_pacific_enabled() ) {
94
+ $modules[] = 'pacific';
95
+ }
96
  if ( ps_is_pagepiling_enabled() ) {
97
  $modules[] = 'pagepiling';
98
  }
includes/prime-slider-filters.php CHANGED
@@ -105,6 +105,12 @@
105
  return apply_filters( 'primeslider/widgets/multiscroll', true );
106
  }
107
  }
 
 
 
 
 
 
108
 
109
  if ( !function_exists( 'ps_is_pagepiling_enabled' ) ) {
110
  function ps_is_pagepiling_enabled() {
105
  return apply_filters( 'primeslider/widgets/multiscroll', true );
106
  }
107
  }
108
+
109
+ if ( !function_exists( 'ps_is_pacific_enabled' ) ) {
110
+ function ps_is_pacific_enabled() {
111
+ return apply_filters( 'primeslider/widgets/pacific', true );
112
+ }
113
+ }
114
 
115
  if ( !function_exists( 'ps_is_pagepiling_enabled' ) ) {
116
  function ps_is_pagepiling_enabled() {
loader.php CHANGED
@@ -180,6 +180,9 @@ class Prime_Slider_Loader {
180
 
181
  wp_register_script('gsap', BDTPS_ASSETS_URL . 'vendor/js/gsap' . $suffix . '.js', [], '3.3.0', true);
182
  wp_register_script('split-text', BDTPS_ASSETS_URL . 'vendor/js/SplitText' . $suffix . '.js', ['gsap'], '3.3.0', true);
 
 
 
183
  }
184
 
185
  public function register_site_styles() {
180
 
181
  wp_register_script('gsap', BDTPS_ASSETS_URL . 'vendor/js/gsap' . $suffix . '.js', [], '3.3.0', true);
182
  wp_register_script('split-text', BDTPS_ASSETS_URL . 'vendor/js/SplitText' . $suffix . '.js', ['gsap'], '3.3.0', true);
183
+
184
+ wp_register_script('bdt-parallax', BDTPS_ASSETS_URL . 'vendor/js/parallax' . $suffix . '.js', ['jquery'], null, true);
185
+
186
  }
187
 
188
  public function register_site_styles() {
modules/pacific/module.info.php ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
3
+
4
+ return [
5
+ 'title' => esc_html__( 'Pacific', 'bdthemes-prime-slider' ),
6
+ 'required' => true,
7
+ 'default_activation' => true,
8
+ 'has_style' => true,
9
+ 'has_script' => true,
10
+ ];
modules/pacific/module.php ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ namespace PrimeSlider\Modules\Pacific;
3
+
4
+ use PrimeSlider\Base\Prime_Slider_Module_Base;
5
+
6
+ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
7
+
8
+ class Module extends Prime_Slider_Module_Base {
9
+
10
+ public function get_name() {
11
+ return 'pacific';
12
+ }
13
+
14
+ public function get_widgets() {
15
+ $widgets = [
16
+ 'Pacific',
17
+ ];
18
+
19
+ return $widgets;
20
+ }
21
+ }
modules/pacific/widgets/pacific.php ADDED
@@ -0,0 +1,1631 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ namespace PrimeSlider\Modules\Pacific\Widgets;
4
+
5
+ use Elementor\Controls_Manager;
6
+ use Elementor\Group_Control_Background;
7
+ use Elementor\Group_Control_Border;
8
+ use Elementor\Group_Control_Box_Shadow;
9
+ use Elementor\Group_Control_Image_Size;
10
+ use Elementor\Group_Control_Typography;
11
+ use Elementor\Group_Control_Text_Shadow;
12
+ use Elementor\Group_Control_Css_Filter;
13
+ use Elementor\Widget_Base;
14
+
15
+ use PrimeSlider\Traits\Global_Widget_Controls;
16
+ use PrimeSlider\Traits\QueryControls\GroupQuery\Group_Control_Query;
17
+ use PrimeSlider\Utils;
18
+ use WP_Query;
19
+
20
+ if (!defined('ABSPATH')) {
21
+ exit;
22
+ }
23
+
24
+ // Exit if accessed directly
25
+
26
+ class Pacific extends Widget_Base
27
+ {
28
+
29
+ use Group_Control_Query;
30
+ use Global_Widget_Controls;
31
+
32
+ public function get_name()
33
+ {
34
+ return 'prime-slider-pacific';
35
+ }
36
+
37
+ public function get_title()
38
+ {
39
+ return BDTPS . esc_html__('Pacific', 'bdthemes-prime-slider');
40
+ }
41
+
42
+ public function get_icon()
43
+ {
44
+ return 'bdt-widget-icon ps-wi-pacific bdt-new';
45
+ }
46
+
47
+ public function get_categories()
48
+ {
49
+ return ['prime-slider'];
50
+ }
51
+
52
+ public function get_keywords()
53
+ {
54
+ return ['prime slider', 'slider', 'pacific', 'prime', 'blog', 'post', 'news'];
55
+ }
56
+
57
+ public function get_style_depends()
58
+ {
59
+ return ['prime-slider-font', 'ps-pacific'];
60
+ }
61
+
62
+ public function get_script_depends()
63
+ {
64
+ return ['ps-pacific'];
65
+ }
66
+
67
+ // public function get_custom_help_url() {
68
+ // return 'https://youtu.be/G32YlydUcHg';
69
+ // }
70
+
71
+ protected function _register_controls()
72
+ {
73
+ $this->register_query_section_controls();
74
+ }
75
+
76
+ private function register_query_section_controls()
77
+ {
78
+
79
+ $this->start_controls_section(
80
+ 'section_content_layout',
81
+ [
82
+ 'label' => esc_html__('Layout', 'bdthemes-prime-slider'),
83
+ ]
84
+ );
85
+
86
+ $this->add_control(
87
+ 'layout_style',
88
+ [
89
+ 'label' => __('Style', 'bdthemes-prime-slider'),
90
+ 'type' => Controls_Manager::SELECT,
91
+ 'default' => 1,
92
+ 'options' => [
93
+ 1 => 'Style 1',
94
+ 2 => 'Style 2',
95
+ ],
96
+ ]
97
+ );
98
+
99
+ $this->add_responsive_control(
100
+ 'columns',
101
+ [
102
+ 'label' => __('Columns', 'bdthemes-prime-slider'),
103
+ 'type' => Controls_Manager::SELECT,
104
+ 'default' => 3,
105
+ 'tablet_default' => 2,
106
+ 'mobile_default' => 1,
107
+ 'options' => [
108
+ 1 => '1',
109
+ 2 => '2',
110
+ 3 => '3',
111
+ 4 => '4',
112
+ 5 => '5',
113
+ 6 => '6',
114
+ ],
115
+ ]
116
+ );
117
+
118
+ $this->add_responsive_control(
119
+ 'item_gap',
120
+ [
121
+ 'label' => __('Item Gap', 'bdthemes-prime-slider'),
122
+ 'type' => Controls_Manager::SLIDER,
123
+ 'default' => [
124
+ 'size' => 5,
125
+ ],
126
+ 'tablet_default' => [
127
+ 'size' => 5,
128
+ ],
129
+ 'mobile_default' => [
130
+ 'size' => 0,
131
+ ],
132
+ 'range' => [
133
+ 'px' => [
134
+ 'min' => 0,
135
+ 'max' => 100,
136
+ ],
137
+ ],
138
+ ]
139
+ );
140
+
141
+ $this->add_responsive_control(
142
+ 'item_height',
143
+ [
144
+ 'label' => esc_html__('Item Height', 'bdthemes-prime-slider'),
145
+ 'type' => Controls_Manager::SLIDER,
146
+ 'range' => [
147
+ 'px' => [
148
+ 'min' => 200,
149
+ 'max' => 1080,
150
+ ],
151
+ ],
152
+ 'selectors' => [
153
+ '{{WRAPPER}} .bdt-pacific-slider' => 'height: {{SIZE}}{{UNIT}};',
154
+ ],
155
+ ]
156
+ );
157
+
158
+ $this->add_responsive_control(
159
+ 'content_alignment',
160
+ [
161
+ 'label' => esc_html__('Alignment', 'bdthemes-prime-slider'),
162
+ 'type' => Controls_Manager::CHOOSE,
163
+ 'options' => [
164
+ 'left' => [
165
+ 'title' => esc_html__('Left', 'bdthemes-prime-slider'),
166
+ 'icon' => 'eicon-text-align-left',
167
+ ],
168
+ 'center' => [
169
+ 'title' => esc_html__('Center', 'bdthemes-prime-slider'),
170
+ 'icon' => 'eicon-text-align-center',
171
+ ],
172
+ 'right' => [
173
+ 'title' => esc_html__('Right', 'bdthemes-prime-slider'),
174
+ 'icon' => 'eicon-text-align-right',
175
+ ],
176
+ ],
177
+ 'selectors' => [
178
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-item' => 'text-align: {{VALUE}};',
179
+ ],
180
+ ]
181
+ );
182
+
183
+ $this->add_group_control(
184
+ Group_Control_Image_Size::get_type(),
185
+ [
186
+ 'name' => 'primary_thumbnail',
187
+ 'exclude' => ['custom'],
188
+ 'default' => 'full',
189
+ ]
190
+ );
191
+
192
+ $this->end_controls_section();
193
+
194
+ //New Query Builder Settings
195
+ $this->start_controls_section(
196
+ 'section_post_query_builder',
197
+ [
198
+ 'label' => __('Query', 'bdthemes-prime-slider'),
199
+ 'tab' => Controls_Manager::TAB_CONTENT,
200
+ ]
201
+ );
202
+
203
+ $this->register_query_builder_controls();
204
+
205
+ $this->update_control(
206
+ 'is_replaced_deprecated_query',
207
+ [
208
+ 'type' => Controls_Manager::HIDDEN,
209
+ 'default' => 'yes',
210
+ ]
211
+ );
212
+
213
+ $this->end_controls_section();
214
+
215
+ $this->start_controls_section(
216
+ 'section_additional_settings',
217
+ [
218
+ 'label' => esc_html__('Additional Settings', 'bdthemes-prime-slider'),
219
+ ]
220
+ );
221
+
222
+ $this->add_control(
223
+ 'show_title',
224
+ [
225
+ 'label' => esc_html__('Show Title', 'bdthemes-prime-slider'),
226
+ 'type' => Controls_Manager::SWITCHER,
227
+ 'default' => 'yes',
228
+ 'separator' => 'before'
229
+ ]
230
+ );
231
+
232
+ $this->add_control(
233
+ 'title_tags',
234
+ [
235
+ 'label' => __('Title HTML Tag', 'bdthemes-prime-slider'),
236
+ 'type' => Controls_Manager::SELECT,
237
+ 'options' => prime_slider_title_tags(),
238
+ 'default' => 'h3',
239
+ 'condition' => [
240
+ 'show_title' => 'yes',
241
+ ],
242
+ ]
243
+ );
244
+
245
+ $this->add_control(
246
+ 'show_excerpt',
247
+ [
248
+ 'label' => __('Show Text', 'bdthemes-prime-slider'),
249
+ 'type' => Controls_Manager::SWITCHER,
250
+ 'default' => 'yes',
251
+ 'separator' => 'before'
252
+ ]
253
+ );
254
+
255
+ $this->add_control(
256
+ 'excerpt_length',
257
+ [
258
+ 'label' => __('Text Limit', 'bdthemes-prime-slider'),
259
+ 'description' => esc_html__('It\'s just work for main content, but not working with excerpt. If you set 0 so you will get full main content.', 'bdthemes-prime-slider'),
260
+ 'type' => Controls_Manager::NUMBER,
261
+ 'default' => 30,
262
+ 'condition' => [
263
+ 'show_excerpt' => 'yes',
264
+ ],
265
+ ]
266
+ );
267
+
268
+ $this->add_control(
269
+ 'show_category',
270
+ [
271
+ 'label' => esc_html__('Show Category', 'bdthemes-prime-slider'),
272
+ 'type' => Controls_Manager::SWITCHER,
273
+ 'default' => 'yes',
274
+ 'separator' => 'before'
275
+ ]
276
+ );
277
+
278
+ $this->add_control(
279
+ 'show_author',
280
+ [
281
+ 'label' => esc_html__('Show Author', 'bdthemes-prime-slider'),
282
+ 'type' => Controls_Manager::SWITCHER,
283
+ 'default' => 'yes',
284
+ 'separator' => 'before'
285
+ ]
286
+ );
287
+
288
+ $this->add_control(
289
+ 'meta_separator',
290
+ [
291
+ 'label' => __('Separator', 'bdthemes-prime-slider'),
292
+ 'type' => Controls_Manager::TEXT,
293
+ 'default' => '//',
294
+ 'label_block' => false,
295
+ ]
296
+ );
297
+
298
+ $this->add_control(
299
+ 'show_date',
300
+ [
301
+ 'label' => esc_html__('Date', 'bdthemes-prime-slider'),
302
+ 'type' => Controls_Manager::SWITCHER,
303
+ 'default' => 'yes',
304
+ ]
305
+ );
306
+
307
+ $this->add_control(
308
+ 'human_diff_time',
309
+ [
310
+ 'label' => esc_html__('Human Different Time', 'bdthemes-prime-slider'),
311
+ 'type' => Controls_Manager::SWITCHER,
312
+ 'condition' => [
313
+ 'show_date' => 'yes'
314
+ ]
315
+ ]
316
+ );
317
+
318
+ $this->add_control(
319
+ 'human_diff_time_short',
320
+ [
321
+ 'label' => esc_html__('Time Short Format', 'bdthemes-prime-slider'),
322
+ 'description' => esc_html__('This will work for Hours, Minute and Seconds', 'bdthemes-prime-slider'),
323
+ 'type' => Controls_Manager::SWITCHER,
324
+ 'condition' => [
325
+ 'human_diff_time' => 'yes',
326
+ 'show_date' => 'yes'
327
+ ]
328
+ ]
329
+ );
330
+
331
+ $this->add_control(
332
+ 'show_time',
333
+ [
334
+ 'label' => esc_html__('Show Time', 'bdthemes-prime-slider'),
335
+ 'type' => Controls_Manager::SWITCHER,
336
+ 'condition' => [
337
+ 'human_diff_time' => '',
338
+ 'show_date' => 'yes'
339
+ ]
340
+ ]
341
+ );
342
+
343
+ $this->add_control(
344
+ 'show_read_more',
345
+ [
346
+ 'label' => __('Show Read More', 'bdthemes-prime-slider'),
347
+ 'type' => Controls_Manager::SWITCHER,
348
+ 'default' => 'yes',
349
+ 'separator' => 'before'
350
+ ]
351
+ );
352
+
353
+ $this->add_control(
354
+ 'read_more_text',
355
+ [
356
+ 'label' => esc_html__('Readmore Text', 'bdthemes-prime-slider'),
357
+ 'type' => Controls_Manager::TEXT,
358
+ 'default' => esc_html__('Read More', 'bdthemes-prime-slider'),
359
+ 'label_block' => false,
360
+ 'dynamic' => ['active' => true],
361
+ 'condition' => [
362
+ 'show_read_more' => 'yes'
363
+ ]
364
+ ]
365
+ );
366
+
367
+ $this->add_control(
368
+ 'show_pagination',
369
+ [
370
+ 'label' => __('Show Pagination', 'bdthemes-prime-slider'),
371
+ 'type' => Controls_Manager::SWITCHER,
372
+ 'default' => 'yes',
373
+ ]
374
+ );
375
+
376
+ $this->end_controls_section();
377
+
378
+
379
+ $this->start_controls_section(
380
+ 'section_carousel_settings',
381
+ [
382
+ 'label' => __('Carousel Settings', 'bdthemes-prime-slider'),
383
+ ]
384
+ );
385
+
386
+ $this->add_control(
387
+ 'autoplay',
388
+ [
389
+ 'label' => __('Autoplay', 'bdthemes-prime-slider'),
390
+ 'type' => Controls_Manager::SWITCHER,
391
+ 'default' => 'yes',
392
+
393
+ ]
394
+ );
395
+
396
+ $this->add_control(
397
+ 'autoplay_speed',
398
+ [
399
+ 'label' => esc_html__('Autoplay Speed', 'bdthemes-prime-slider'),
400
+ 'type' => Controls_Manager::NUMBER,
401
+ 'default' => 5000,
402
+ 'condition' => [
403
+ 'autoplay' => 'yes',
404
+ ],
405
+ ]
406
+ );
407
+
408
+ $this->add_control(
409
+ 'pause_on_hover',
410
+ [
411
+ 'label' => esc_html__('Pause on Hover', 'bdthemes-prime-slider'),
412
+ 'type' => Controls_Manager::SWITCHER,
413
+ 'condition' => [
414
+ 'autoplay' => 'yes',
415
+ ],
416
+ ]
417
+ );
418
+
419
+ $this->add_responsive_control(
420
+ 'slides_to_scroll',
421
+ [
422
+ 'type' => Controls_Manager::SELECT,
423
+ 'label' => esc_html__('Slides to Scroll', 'bdthemes-prime-slider'),
424
+ 'default' => 1,
425
+ 'tablet_default' => 1,
426
+ 'mobile_default' => 1,
427
+ 'options' => [
428
+ 1 => '1',
429
+ 2 => '2',
430
+ 3 => '3',
431
+ 4 => '4',
432
+ 5 => '5',
433
+ 6 => '6',
434
+ ],
435
+ ]
436
+ );
437
+
438
+ $this->add_control(
439
+ 'centered_slides',
440
+ [
441
+ 'label' => __('Center Slide', 'bdthemes-prime-slider'),
442
+ 'description' => __('Use even items from Layout > Columns settings for better preview.', 'bdthemes-prime-slider'),
443
+ 'type' => Controls_Manager::SWITCHER,
444
+ 'default' => 'yes'
445
+ ]
446
+ );
447
+
448
+ $this->add_control(
449
+ 'grab_cursor',
450
+ [
451
+ 'label' => __('Grab Cursor', 'bdthemes-prime-slider'),
452
+ 'type' => Controls_Manager::SWITCHER,
453
+ ]
454
+ );
455
+
456
+ $this->add_control(
457
+ 'loop',
458
+ [
459
+ 'label' => __('Loop', 'bdthemes-prime-slider'),
460
+ 'type' => Controls_Manager::SWITCHER,
461
+ 'default' => 'yes',
462
+
463
+ ]
464
+ );
465
+
466
+
467
+ $this->add_control(
468
+ 'speed',
469
+ [
470
+ 'label' => __('Animation Speed (ms)', 'bdthemes-prime-slider'),
471
+ 'type' => Controls_Manager::SLIDER,
472
+ 'default' => [
473
+ 'size' => 500,
474
+ ],
475
+ 'range' => [
476
+ 'px' => [
477
+ 'min' => 100,
478
+ 'max' => 5000,
479
+ 'step' => 50,
480
+ ],
481
+ ],
482
+ ]
483
+ );
484
+
485
+ $this->add_control(
486
+ 'observer',
487
+ [
488
+ 'label' => __('Observer', 'bdthemes-prime-slider'),
489
+ 'description' => __('When you use carousel in any hidden place (in tabs, accordion etc) keep it yes.', 'bdthemes-prime-slider'),
490
+ 'type' => Controls_Manager::SWITCHER,
491
+ ]
492
+ );
493
+
494
+ $this->end_controls_section();
495
+
496
+ //style
497
+ $this->start_controls_section(
498
+ 'section_style_layout',
499
+ [
500
+ 'label' => __('Items', 'bdthemes-prime-slider'),
501
+ 'tab' => Controls_Manager::TAB_STYLE,
502
+ ]
503
+ );
504
+
505
+ $this->add_control(
506
+ 'item_overlay',
507
+ [
508
+ 'label' => esc_html__('Overlay', 'bdthemes-prime-slider'),
509
+ 'type' => Controls_Manager::COLOR,
510
+ 'selectors' => [
511
+ '{{WRAPPER}} .bdt-item .bdt-image-wrap:before' => 'background: {{VALUE}};',
512
+ ],
513
+ ]
514
+ );
515
+
516
+ $this->add_control(
517
+ 'item_overlay_active',
518
+ [
519
+ 'label' => esc_html__('Overlay Active', 'bdthemes-prime-slider'),
520
+ 'type' => Controls_Manager::COLOR,
521
+ 'selectors' => [
522
+ '{{WRAPPER}} .bdt-item.swiper-slide-active .bdt-image-wrap:before' => 'background: {{VALUE}};',
523
+ ],
524
+ ]
525
+ );
526
+
527
+ $this->add_responsive_control(
528
+ 'item_border_radius',
529
+ [
530
+ 'label' => esc_html__('Border Radius', 'bdthemes-prime-slider'),
531
+ 'type' => Controls_Manager::DIMENSIONS,
532
+ 'size_units' => ['px', '%'],
533
+ 'selectors' => [
534
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
535
+ ],
536
+ ]
537
+ );
538
+
539
+ $this->add_responsive_control(
540
+ 'content_padding',
541
+ [
542
+ 'label' => __('Content Padding', 'bdthemes-prime-slider'),
543
+ 'type' => Controls_Manager::DIMENSIONS,
544
+ 'size_units' => ['px', 'em', '%'],
545
+ 'selectors' => [
546
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-content-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
547
+ ],
548
+ ]
549
+ );
550
+
551
+ $this->end_controls_section();
552
+
553
+ $this->start_controls_section(
554
+ 'section_style_title',
555
+ [
556
+ 'label' => esc_html__('Title', 'bdthemes-prime-slider'),
557
+ 'tab' => Controls_Manager::TAB_STYLE,
558
+ 'condition' => [
559
+ 'show_title' => 'yes',
560
+ ],
561
+ ]
562
+ );
563
+
564
+ $this->add_control(
565
+ 'title_color',
566
+ [
567
+ 'label' => esc_html__('Color', 'bdthemes-prime-slider'),
568
+ 'type' => Controls_Manager::COLOR,
569
+ 'selectors' => [
570
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-title a' => 'color: {{VALUE}};',
571
+ ],
572
+ ]
573
+ );
574
+
575
+ $this->add_control(
576
+ 'title_hover_color',
577
+ [
578
+ 'label' => esc_html__('Hover Color', 'bdthemes-prime-slider'),
579
+ 'type' => Controls_Manager::COLOR,
580
+ 'selectors' => [
581
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-title a:hover' => 'color: {{VALUE}};',
582
+ ],
583
+ ]
584
+ );
585
+
586
+ $this->add_group_control(
587
+ Group_Control_Typography::get_type(),
588
+ [
589
+ 'name' => 'title_typography',
590
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
591
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-title',
592
+ ]
593
+ );
594
+
595
+ $this->add_responsive_control(
596
+ 'title_bottom_spacing',
597
+ [
598
+ 'label' => esc_html__('Spacing', 'bdthemes-prime-slider'),
599
+ 'type' => Controls_Manager::SLIDER,
600
+ 'selectors' => [
601
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
602
+ ],
603
+ ]
604
+ );
605
+
606
+ $this->add_group_control(
607
+ Group_Control_Text_Shadow::get_type(),
608
+ [
609
+ 'name' => 'title_text_shadow',
610
+ 'label' => __('Text Shadow', 'bdthemes-prime-slider'),
611
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-title a',
612
+ ]
613
+ );
614
+
615
+ $this->end_controls_section();
616
+
617
+ $this->start_controls_section(
618
+ 'section_style_meta',
619
+ [
620
+ 'label' => esc_html__('Meta', 'bdthemes-prime-slider'),
621
+ 'tab' => Controls_Manager::TAB_STYLE,
622
+ 'conditions' => [
623
+ 'relation' => 'or',
624
+ 'terms' => [
625
+ [
626
+ 'name' => 'show_author',
627
+ 'value' => 'yes'
628
+ ],
629
+ [
630
+ 'name' => 'show_date',
631
+ 'value' => 'yes'
632
+ ]
633
+ ]
634
+ ],
635
+ ]
636
+ );
637
+
638
+ $this->add_control(
639
+ 'meta_color',
640
+ [
641
+ 'label' => esc_html__('Color', 'bdthemes-prime-slider'),
642
+ 'type' => Controls_Manager::COLOR,
643
+ 'selectors' => [
644
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-meta-box, {{WRAPPER}} .bdt-pacific-slider .bdt-meta-box .bdt-author-wrap a' => 'color: {{VALUE}};',
645
+ ],
646
+ ]
647
+ );
648
+
649
+ $this->add_control(
650
+ 'meta_hover_color',
651
+ [
652
+ 'label' => esc_html__('Hover Color', 'bdthemes-prime-slider'),
653
+ 'type' => Controls_Manager::COLOR,
654
+ 'selectors' => [
655
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-meta-box .bdt-author-wrap a:hover' => 'color: {{VALUE}};',
656
+ ],
657
+ ]
658
+ );
659
+
660
+ $this->add_responsive_control(
661
+ 'meta_space_between',
662
+ [
663
+ 'label' => esc_html__('Space Between', 'bdthemes-prime-slider'),
664
+ 'type' => Controls_Manager::SLIDER,
665
+ 'range' => [
666
+ 'px' => [
667
+ 'min' => 0,
668
+ 'max' => 50,
669
+ ],
670
+ ],
671
+ 'selectors' => [
672
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-meta-box .bdt-meta-separator' => 'margin: 0 {{SIZE}}{{UNIT}};',
673
+ ],
674
+ ]
675
+ );
676
+
677
+ $this->add_responsive_control(
678
+ 'meta_bottom_spacing',
679
+ [
680
+ 'label' => esc_html__('Spacing', 'bdthemes-prime-slider'),
681
+ 'type' => Controls_Manager::SLIDER,
682
+ 'selectors' => [
683
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-meta-box' => 'margin-bottom: {{SIZE}}{{UNIT}};',
684
+ ],
685
+ ]
686
+ );
687
+
688
+ $this->add_group_control(
689
+ Group_Control_Typography::get_type(),
690
+ [
691
+ 'name' => 'meta_typography',
692
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
693
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-meta-box',
694
+ ]
695
+ );
696
+
697
+ $this->end_controls_section();
698
+
699
+ $this->start_controls_section(
700
+ 'section_style_category',
701
+ [
702
+ 'label' => esc_html__('Category', 'bdthemes-prime-slider'),
703
+ 'tab' => Controls_Manager::TAB_STYLE,
704
+ 'condition' => [
705
+ 'show_category' => 'yes'
706
+ ],
707
+ ]
708
+ );
709
+
710
+ $this->add_responsive_control(
711
+ 'category_spacing',
712
+ [
713
+ 'label' => esc_html__('spacing', 'bdthemes-prime-slider'),
714
+ 'type' => Controls_Manager::SLIDER,
715
+ 'selectors' => [
716
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-category' => 'margin-bottom: {{SIZE}}{{UNIT}};',
717
+ ],
718
+ ]
719
+ );
720
+
721
+ $this->start_controls_tabs('tabs_category_style');
722
+
723
+ $this->start_controls_tab(
724
+ 'tab_category_normal',
725
+ [
726
+ 'label' => esc_html__('Normal', 'bdthemes-prime-slider'),
727
+ ]
728
+ );
729
+
730
+ $this->add_control(
731
+ 'category_color',
732
+ [
733
+ 'label' => esc_html__('Color', 'bdthemes-prime-slider'),
734
+ 'type' => Controls_Manager::COLOR,
735
+ 'selectors' => [
736
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-category a' => 'color: {{VALUE}};',
737
+ ],
738
+ ]
739
+ );
740
+
741
+ $this->add_group_control(
742
+ Group_Control_Background::get_type(),
743
+ [
744
+ 'name' => 'category_background',
745
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-category a',
746
+ ]
747
+ );
748
+
749
+ $this->add_group_control(
750
+ Group_Control_Border::get_type(),
751
+ [
752
+ 'name' => 'category_border',
753
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-category a',
754
+ ]
755
+ );
756
+
757
+ $this->add_responsive_control(
758
+ 'category_border_radius',
759
+ [
760
+ 'label' => esc_html__('Border Radius', 'bdthemes-prime-slider'),
761
+ 'type' => Controls_Manager::DIMENSIONS,
762
+ 'size_units' => ['px', '%'],
763
+ 'selectors' => [
764
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-category a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
765
+ ],
766
+ ]
767
+ );
768
+
769
+ $this->add_responsive_control(
770
+ 'category_padding',
771
+ [
772
+ 'label' => esc_html__('Padding', 'bdthemes-prime-slider'),
773
+ 'type' => Controls_Manager::DIMENSIONS,
774
+ 'size_units' => ['px', 'em', '%'],
775
+ 'selectors' => [
776
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-category a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
777
+ ],
778
+ ]
779
+ );
780
+
781
+ $this->add_responsive_control(
782
+ 'category_space_between',
783
+ [
784
+ 'label' => esc_html__('Space Between', 'bdthemes-prime-slider'),
785
+ 'type' => Controls_Manager::SLIDER,
786
+ 'range' => [
787
+ 'px' => [
788
+ 'min' => 0,
789
+ 'max' => 50,
790
+ ],
791
+ ],
792
+ 'selectors' => [
793
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-category a+a' => 'margin-left: {{SIZE}}{{UNIT}};',
794
+ ],
795
+ ]
796
+ );
797
+
798
+ $this->add_group_control(
799
+ Group_Control_Box_Shadow::get_type(),
800
+ [
801
+ 'name' => 'category_shadow',
802
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-category a',
803
+ ]
804
+ );
805
+
806
+ $this->add_group_control(
807
+ Group_Control_Typography::get_type(),
808
+ [
809
+ 'name' => 'category_typography',
810
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
811
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-category a',
812
+ ]
813
+ );
814
+
815
+ $this->end_controls_tab();
816
+
817
+ $this->start_controls_tab(
818
+ 'tab_category_hover',
819
+ [
820
+ 'label' => esc_html__('Hover', 'bdthemes-prime-slider'),
821
+ ]
822
+ );
823
+
824
+ $this->add_control(
825
+ 'category_hover_color',
826
+ [
827
+ 'label' => esc_html__('Color', 'bdthemes-prime-slider'),
828
+ 'type' => Controls_Manager::COLOR,
829
+ 'selectors' => [
830
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-category a:hover' => 'color: {{VALUE}};',
831
+ ],
832
+ ]
833
+ );
834
+
835
+ $this->add_group_control(
836
+ Group_Control_Background::get_type(),
837
+ [
838
+ 'name' => 'category_hover_background',
839
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-category a:hover',
840
+ ]
841
+ );
842
+
843
+ $this->add_control(
844
+ 'category_hover_border_color',
845
+ [
846
+ 'label' => esc_html__('Border Color', 'bdthemes-prime-slider'),
847
+ 'type' => Controls_Manager::COLOR,
848
+ 'condition' => [
849
+ 'category_border_border!' => '',
850
+ ],
851
+ 'selectors' => [
852
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-category a:hover' => 'border-color: {{VALUE}};',
853
+ ],
854
+ ]
855
+ );
856
+
857
+ $this->end_controls_tab();
858
+
859
+ $this->end_controls_tabs();
860
+
861
+ $this->end_controls_section();
862
+
863
+ //Read More Css
864
+ $this->start_controls_section(
865
+ 'section_style_read_more',
866
+ [
867
+ 'label' => __('Read More', 'bdthemes-prime-slider'),
868
+ 'tab' => Controls_Manager::TAB_STYLE,
869
+ ]
870
+ );
871
+
872
+ $this->start_controls_tabs('tabs_read_more_style');
873
+
874
+ $this->start_controls_tab(
875
+ 'tabs_nav_read_more_normal',
876
+ [
877
+ 'label' => __('Normal', 'bdthemes-prime-slider'),
878
+ ]
879
+ );
880
+
881
+ $this->add_control(
882
+ 'read_more_color',
883
+ [
884
+ 'label' => __('Text Color', 'bdthemes-prime-slider'),
885
+ 'type' => Controls_Manager::COLOR,
886
+ 'selectors' => [
887
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-item .bdt-button' => 'color: {{VALUE}}',
888
+ ],
889
+ ]
890
+ );
891
+
892
+ $this->add_group_control(
893
+ Group_Control_Typography::get_type(),
894
+ [
895
+ 'name' => 'read_more_typography',
896
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
897
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-item .bdt-button',
898
+ ]
899
+ );
900
+
901
+ $this->end_controls_tab();
902
+
903
+ $this->start_controls_tab(
904
+ 'tabs_read_more_hover',
905
+ [
906
+ 'label' => __('Hover', 'bdthemes-prime-slider'),
907
+ ]
908
+ );
909
+
910
+ $this->add_control(
911
+ 'read_more_hover_color',
912
+ [
913
+ 'label' => __('Text Color', 'bdthemes-prime-slider'),
914
+ 'type' => Controls_Manager::COLOR,
915
+ 'selectors' => [
916
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-item .bdt-button:hover' => 'color: {{VALUE}}',
917
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-item .bdt-btn-text::before' => 'border-bottom-color: {{VALUE}}',
918
+ ],
919
+ ]
920
+ );
921
+
922
+ $this->end_controls_tab();
923
+
924
+ $this->end_controls_tabs();
925
+
926
+ $this->end_controls_section();
927
+
928
+ //Navigation More Css
929
+ $this->start_controls_section(
930
+ 'section_style_navigation',
931
+ [
932
+ 'label' => __('Navigation', 'bdthemes-prime-slider'),
933
+ 'tab' => Controls_Manager::TAB_STYLE,
934
+ ]
935
+ );
936
+
937
+ $this->add_control(
938
+ 'navigation_color',
939
+ [
940
+ 'label' => __('Text Color', 'bdthemes-prime-slider'),
941
+ 'type' => Controls_Manager::COLOR,
942
+ 'selectors' => [
943
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-navigation-wrap' => 'color: {{VALUE}}',
944
+ ],
945
+ ]
946
+ );
947
+
948
+ $this->add_control(
949
+ 'navigation_hover_color',
950
+ [
951
+ 'label' => __('Hover Color', 'bdthemes-prime-slider'),
952
+ 'type' => Controls_Manager::COLOR,
953
+ 'selectors' => [
954
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-navigation-wrap:hover' => 'color: {{VALUE}}',
955
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-n-p-text::before' => 'border-bottom-color: {{VALUE}}',
956
+ ],
957
+ ]
958
+ );
959
+
960
+ $this->add_responsive_control(
961
+ 'navigation_margin',
962
+ [
963
+ 'label' => __('Margin', 'bdthemes-prime-slider'),
964
+ 'type' => Controls_Manager::DIMENSIONS,
965
+ 'size_units' => ['px', 'em', '%'],
966
+ 'selectors' => [
967
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-navigation-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
968
+ ],
969
+ ]
970
+ );
971
+
972
+ $this->add_group_control(
973
+ Group_Control_Typography::get_type(),
974
+ [
975
+ 'name' => 'navigation_typography',
976
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
977
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .bdt-navigation-wrap',
978
+ ]
979
+ );
980
+
981
+ $this->end_controls_section();
982
+
983
+ //Pagination Css
984
+ $this->start_controls_section(
985
+ 'section_style_pagination',
986
+ [
987
+ 'label' => __('Pagination', 'bdthemes-prime-slider'),
988
+ 'tab' => Controls_Manager::TAB_STYLE,
989
+ ]
990
+ );
991
+
992
+ $this->add_control(
993
+ 'pagination_color',
994
+ [
995
+ 'label' => __('Color', 'bdthemes-prime-slider'),
996
+ 'type' => Controls_Manager::COLOR,
997
+ 'selectors' => [
998
+ '{{WRAPPER}} .bdt-pacific-slider .swiper-pagination-bullet' => 'color: {{VALUE}}',
999
+ '{{WRAPPER}} .bdt-pacific-slider .swiper-pagination-bullet:before' => 'border-top-color: {{VALUE}}',
1000
+ ],
1001
+ ]
1002
+ );
1003
+
1004
+ $this->add_control(
1005
+ 'pagination_hover_color',
1006
+ [
1007
+ 'label' => __('Hover Color', 'bdthemes-prime-slider'),
1008
+ 'type' => Controls_Manager::COLOR,
1009
+ 'selectors' => [
1010
+ '{{WRAPPER}} .bdt-pacific-slider .swiper-pagination-bullet:hover' => 'color: {{VALUE}}',
1011
+ '{{WRAPPER}} .bdt-pacific-slider .swiper-pagination-bullet:hover:before' => 'border-top-color: {{VALUE}}',
1012
+ ],
1013
+ ]
1014
+ );
1015
+
1016
+ $this->add_control(
1017
+ 'pagination_active_color',
1018
+ [
1019
+ 'label' => __('Active Color', 'bdthemes-prime-slider'),
1020
+ 'type' => Controls_Manager::COLOR,
1021
+ 'selectors' => [
1022
+ '{{WRAPPER}} .bdt-pacific-slider .swiper-pagination-bullet-active' => 'color: {{VALUE}}',
1023
+ '{{WRAPPER}} .bdt-pacific-slider .swiper-pagination-bullet-active.swiper-pagination-bullet:before' => 'border-top-color: {{VALUE}}',
1024
+ ],
1025
+ ]
1026
+ );
1027
+
1028
+ $this->add_responsive_control(
1029
+ 'pagination_margin',
1030
+ [
1031
+ 'label' => __('Margin', 'bdthemes-prime-slider'),
1032
+ 'type' => Controls_Manager::DIMENSIONS,
1033
+ 'size_units' => ['px', 'em', '%'],
1034
+ 'selectors' => [
1035
+ '{{WRAPPER}} .bdt-pacific-slider .bdt-pagi-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1036
+ ],
1037
+ ]
1038
+ );
1039
+
1040
+ $this->add_group_control(
1041
+ Group_Control_Typography::get_type(),
1042
+ [
1043
+ 'name' => 'pafination_typography',
1044
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
1045
+ 'selector' => '{{WRAPPER}} .bdt-pacific-slider .swiper-pagination-bullet',
1046
+ ]
1047
+ );
1048
+
1049
+
1050
+ $this->end_controls_section();
1051
+
1052
+
1053
+ $this->start_controls_section(
1054
+ 'section_style_modal',
1055
+ [
1056
+ 'label' => esc_html__('Modal', 'bdthemes-prime-slider'),
1057
+ 'tab' => Controls_Manager::TAB_STYLE,
1058
+ ]
1059
+ );
1060
+
1061
+ $this->add_control(
1062
+ 'modal_heading',
1063
+ [
1064
+ 'label' => __('M O D A L', 'bdthemes-prime-slider'),
1065
+ 'type' => Controls_Manager::HEADING,
1066
+ ]
1067
+ );
1068
+
1069
+ $this->add_control(
1070
+ 'modal_cross_color',
1071
+ [
1072
+ 'label' => esc_html__('Cross Color', 'bdthemes-prime-slider'),
1073
+ 'type' => Controls_Manager::COLOR,
1074
+ 'selectors' => [
1075
+ '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-modal-close-full' => 'color: {{VALUE}};',
1076
+ ],
1077
+ ]
1078
+ );
1079
+
1080
+ $this->add_control(
1081
+ 'modal_cross_color_hover',
1082
+ [
1083
+ 'label' => esc_html__('Cross Color Hover', 'bdthemes-prime-slider'),
1084
+ 'type' => Controls_Manager::COLOR,
1085
+ 'selectors' => [
1086
+ '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-modal-close-full:hover' => 'color: {{VALUE}};',
1087
+ ],
1088
+ ]
1089
+ );
1090
+
1091
+ $this->add_group_control(
1092
+ Group_Control_Background::get_type(),
1093
+ [
1094
+ 'name' => 'item_background',
1095
+ 'label' => esc_html__('Modal Background', 'bdthemes-prime-slider'),
1096
+ 'selector' => '.bdt-pacific-{{ID}}.bdt-modal-dialog',
1097
+ ]
1098
+ );
1099
+
1100
+ $this->add_control(
1101
+ 'modal_title_heading',
1102
+ [
1103
+ 'label' => __('T I T L E', 'bdthemes-prime-slider'),
1104
+ 'type' => Controls_Manager::HEADING,
1105
+ ]
1106
+ );
1107
+
1108
+ $this->add_control(
1109
+ 'modal_title_color',
1110
+ [
1111
+ 'label' => esc_html__('Color', 'bdthemes-prime-slider'),
1112
+ 'type' => Controls_Manager::COLOR,
1113
+ 'selectors' => [
1114
+ '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-title a' => 'color: {{VALUE}};',
1115
+ ],
1116
+ ]
1117
+ );
1118
+
1119
+ $this->add_control(
1120
+ 'modal_title_hover_color',
1121
+ [
1122
+ 'label' => esc_html__('Hover Color', 'bdthemes-prime-slider'),
1123
+ 'type' => Controls_Manager::COLOR,
1124
+ 'selectors' => [
1125
+ '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-title a:hover' => 'color: {{VALUE}};',
1126
+ ],
1127
+ ]
1128
+ );
1129
+
1130
+ $this->add_group_control(
1131
+ Group_Control_Typography::get_type(),
1132
+ [
1133
+ 'name' => 'modal_title_typography',
1134
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
1135
+ 'selector' => '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-title',
1136
+ ]
1137
+ );
1138
+
1139
+ $this->add_responsive_control(
1140
+ 'modal_title_bottom_spacing',
1141
+ [
1142
+ 'label' => esc_html__('Spacing', 'bdthemes-prime-slider'),
1143
+ 'type' => Controls_Manager::SLIDER,
1144
+ 'selectors' => [
1145
+ '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1146
+ ],
1147
+ ]
1148
+ );
1149
+
1150
+ $this->add_group_control(
1151
+ Group_Control_Text_Shadow::get_type(),
1152
+ [
1153
+ 'name' => 'modal_title_text_shadow',
1154
+ 'label' => __('Text Shadow', 'bdthemes-prime-slider'),
1155
+ 'selector' => '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-title a',
1156
+ ]
1157
+ );
1158
+
1159
+ $this->add_control(
1160
+ 'text_heading',
1161
+ [
1162
+ 'label' => __('T E X T', 'bdthemes-prime-slider'),
1163
+ 'type' => Controls_Manager::HEADING,
1164
+ 'separator' => 'before',
1165
+ ]
1166
+ );
1167
+
1168
+ $this->add_control(
1169
+ 'text_color',
1170
+ [
1171
+ 'label' => esc_html__('Color', 'bdthemes-prime-slider'),
1172
+ 'type' => Controls_Manager::COLOR,
1173
+ 'selectors' => [
1174
+ '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-text' => 'color: {{VALUE}};',
1175
+ ],
1176
+ ]
1177
+ );
1178
+
1179
+ $this->add_group_control(
1180
+ Group_Control_Typography::get_type(),
1181
+ [
1182
+ 'name' => 'text_typography',
1183
+ 'label' => esc_html__('Typography', 'bdthemes-prime-slider'),
1184
+ 'selector' => '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-text',
1185
+ ]
1186
+ );
1187
+
1188
+ $this->add_control(
1189
+ 'modal_image_heading',
1190
+ [
1191
+ 'label' => __('I M A G E', 'bdthemes-prime-slider'),
1192
+ 'type' => Controls_Manager::HEADING,
1193
+ 'separator' => 'before',
1194
+ ]
1195
+ );
1196
+
1197
+ $this->add_group_control(
1198
+ Group_Control_Border::get_type(),
1199
+ [
1200
+ 'name' => 'modal_image_border',
1201
+ 'label' => __('Border', 'bdthemes-prime-slider'),
1202
+ 'selector' => '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-background-cover',
1203
+ ]
1204
+ );
1205
+
1206
+ $this->add_control(
1207
+ 'modal_image_border_radius',
1208
+ [
1209
+ 'label' => __('Border Radius', 'bdthemes-prime-slider'),
1210
+ 'type' => Controls_Manager::DIMENSIONS,
1211
+ 'size_units' => ['px', '%', 'em'],
1212
+ 'selectors' => [
1213
+ '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-background-cover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1214
+ ],
1215
+ ]
1216
+ );
1217
+
1218
+ $this->add_group_control(
1219
+ Group_Control_Css_Filter::get_type(),
1220
+ [
1221
+ 'name' => 'modal_image_filters',
1222
+ 'selector' => '.bdt-pacific-{{ID}}.bdt-modal-dialog .bdt-background-cover',
1223
+ ]
1224
+ );
1225
+
1226
+ $this->end_controls_section();
1227
+
1228
+ //Navigation Css
1229
+
1230
+ }
1231
+
1232
+ public function query_posts()
1233
+ {
1234
+ $settings = $this->get_settings();
1235
+
1236
+ $args = [];
1237
+
1238
+ if ($settings['posts_limit']) {
1239
+ $args['posts_per_page'] = $settings['posts_limit'];
1240
+ $args['paged'] = max(1, get_query_var('paged'), get_query_var('page'));
1241
+ }
1242
+
1243
+ $default = $this->getGroupControlQueryArgs();
1244
+ $args = array_merge($default, $args);
1245
+
1246
+ $query = new WP_Query($args);
1247
+
1248
+ return $query;
1249
+ }
1250
+
1251
+ public function render_image($image_id, $size)
1252
+ {
1253
+ $placeholder_image_src = Utils::get_placeholder_image_src();
1254
+
1255
+ $image_src = wp_get_attachment_image_src($image_id, $size);
1256
+
1257
+ if (!$image_src) {
1258
+ $image_src = $placeholder_image_src;
1259
+ } else {
1260
+ $image_src = $image_src[0];
1261
+ }
1262
+
1263
+ ?>
1264
+ <img class="bdt-img swiper-lazy" src="<?php echo esc_url($image_src); ?>" alt="<?php echo esc_attr(get_the_title()); ?>">
1265
+ <?php
1266
+ }
1267
+
1268
+ public function render_image_thumb($image_id, $size)
1269
+ {
1270
+ $placeholder_image_src = Utils::get_placeholder_image_src();
1271
+
1272
+ $image_src = wp_get_attachment_image_src($image_id, $size);
1273
+
1274
+ if (!$image_src) {
1275
+ $image_src = $placeholder_image_src;
1276
+ } else {
1277
+ $image_src = $image_src[0];
1278
+ }
1279
+
1280
+ ?>
1281
+ <div class="bdt-background-cover" style="background-image: url('<?php echo esc_url($image_src); ?>');" bdt-height-viewport>
1282
+ </div>
1283
+ <?php
1284
+ }
1285
+
1286
+ public function render_title()
1287
+ {
1288
+ $settings = $this->get_settings_for_display();
1289
+
1290
+ if (!$this->get_settings('show_title')) {
1291
+ return;
1292
+ }
1293
+
1294
+ $this->add_render_attribute('slider-title', 'class', 'bdt-title', true);
1295
+ $this->add_render_attribute('slider-title', 'data-swiper-parallax', '-200', true);
1296
+ $this->add_render_attribute('slider-title', 'data-swiper-parallax-duration', '800', true);
1297
+ $titleClass = $this->get_render_attribute_string('slider-title');
1298
+ echo
1299
+ '<' . esc_html($settings['title_tags']) . ' ' . $titleClass . ' >
1300
+ <a href="' . esc_url(get_permalink()) . '" title="' . esc_attr(get_the_title()) . '">
1301
+ ' . esc_html(get_the_title()) . '
1302
+ </a>
1303
+ </' . esc_html($settings['title_tags']) . '>';
1304
+ }
1305
+
1306
+ public function render_excerpt($excerpt_length)
1307
+ {
1308
+
1309
+ if (!$this->get_settings('show_excerpt')) {
1310
+ return;
1311
+ }
1312
+ $strip_shortcode = $this->get_settings_for_display('strip_shortcode');
1313
+ ?>
1314
+ <div class="bdt-text">
1315
+ <?php
1316
+ if (has_excerpt()) {
1317
+ the_excerpt();
1318
+ } else {
1319
+ echo prime_slider_custom_excerpt($excerpt_length, $strip_shortcode);
1320
+ }
1321
+ ?>
1322
+ </div>
1323
+ <?php
1324
+ }
1325
+
1326
+ public function render_category()
1327
+ {
1328
+ if (!$this->get_settings('show_category')) {
1329
+ return;
1330
+ }
1331
+
1332
+ ?>
1333
+ <div class="bdt-category" data-swiper-parallax="-300" data-swiper-parallax-duration="600">
1334
+ <?php echo get_the_category_list(' '); ?>
1335
+ </div>
1336
+ <?php
1337
+ }
1338
+
1339
+
1340
+ public function render_date()
1341
+ {
1342
+ $settings = $this->get_settings_for_display();
1343
+
1344
+
1345
+ if (!$this->get_settings('show_date')) {
1346
+ return;
1347
+ }
1348
+
1349
+ ?>
1350
+ <div class="bdt-date">
1351
+ <i class="eicon-calendar" aria-hidden="true"></i>
1352
+ <span>
1353
+ <?php if ($settings['human_diff_time'] == 'yes') {
1354
+ echo prime_slider_post_time_diff(($settings['human_diff_time_short'] == 'yes') ? 'short' : '');
1355
+ } else {
1356
+ echo get_the_date();
1357
+ } ?>
1358
+ </span>
1359
+ </div>
1360
+ <?php if ($settings['show_time']) : ?>
1361
+ <div class="bdt-post-time">
1362
+ <i class="eicon-clock-o" aria-hidden="true"></i>
1363
+ <?php echo get_the_time(); ?>
1364
+ </div>
1365
+ <?php endif; ?>
1366
+
1367
+ <?php
1368
+ }
1369
+
1370
+ public function render_author()
1371
+ {
1372
+
1373
+ if (!$this->get_settings('show_author')) {
1374
+ return;
1375
+ }
1376
+ ?>
1377
+ <div class="bdt-author-wrap">
1378
+ <i class="eicon-user-circle-o" aria-hidden="true"></i>
1379
+ <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')) ?>">
1380
+ <?php echo get_the_author() ?>
1381
+ </a>
1382
+ </div>
1383
+ <?php
1384
+ }
1385
+
1386
+ protected function render_header()
1387
+ {
1388
+ $settings = $this->get_settings_for_display();
1389
+ $id = 'bdt-pacific-slider-' . $this->get_id();
1390
+
1391
+ $elementor_vp_lg = get_option('elementor_viewport_lg');
1392
+ $elementor_vp_md = get_option('elementor_viewport_md');
1393
+ $viewport_lg = !empty($elementor_vp_lg) ? $elementor_vp_lg - 1 : 1023;
1394
+ $viewport_md = !empty($elementor_vp_md) ? $elementor_vp_md - 1 : 767;
1395
+
1396
+ $this->add_render_attribute('carousel', 'id', $id);
1397
+ $this->add_render_attribute('carousel', 'class', ['bdt-pacific-slider']);
1398
+
1399
+ $this->add_render_attribute(
1400
+ [
1401
+ 'carousel' => [
1402
+ 'data-slider-settings' => [
1403
+ wp_json_encode(array_filter([
1404
+ "id" => '#' . $id,
1405
+ "showPagination" => $settings['show_pagination'] == 'yes' ? true : false,
1406
+ ]))
1407
+ ],
1408
+ 'data-settings' => [
1409
+ wp_json_encode(array_filter([
1410
+ "autoplay" => ("yes" == $settings["autoplay"]) ? ["delay" => $settings["autoplay_speed"]] : false,
1411
+ "loop" => ($settings["loop"] == "yes") ? true : false,
1412
+ "speed" => $settings["speed"]["size"],
1413
+ "pauseOnHover" => ("yes" == $settings["pause_on_hover"]) ? true : false,
1414
+ "slidesPerView" => isset($settings["columns_mobile"]) ? (int)$settings["columns_mobile"] : 1,
1415
+ "slidesPerGroup" => isset($settings["slides_to_scroll_mobile"]) ? (int)$settings["slides_to_scroll_mobile"] : 1,
1416
+ "spaceBetween" => !empty($settings["item_gap_mobile"]["size"]) ? $settings["item_gap_mobile"]["size"] : 5,
1417
+ "centeredSlides" => ($settings["layout_style"] == 2) ? true : false,
1418
+ "grabCursor" => ($settings["grab_cursor"] === "yes") ? true : false,
1419
+ "observer" => ($settings["observer"]) ? true : false,
1420
+ "observeParents" => ($settings["observer"]) ? true : false,
1421
+ "watchSlidesVisibility" => true,
1422
+ "watchSlidesProgress" => true,
1423
+ "parallax" => ($settings["layout_style"] == 2) ? true : false,
1424
+ "breakpoints" => [
1425
+ (int) $viewport_md => [
1426
+ "slidesPerView" => isset($settings["columns_tablet"]) ? (int)$settings["columns_tablet"] : 2,
1427
+ "spaceBetween" => !empty($settings["item_gap_tablet"]["size"]) ? $settings["item_gap_tablet"]["size"] : 5,
1428
+ "slidesPerGroup" => isset($settings["slides_to_scroll_tablet"]) ? (int)$settings["slides_to_scroll_tablet"] : 1,
1429
+ ],
1430
+ (int) $viewport_lg => [
1431
+ "slidesPerView" => isset($settings["columns"]) ? (int)$settings["columns"] : 3,
1432
+ "spaceBetween" => !empty($settings["item_gap"]["size"]) ? $settings["item_gap"]["size"] : 5,
1433
+ "slidesPerGroup" => isset($settings["slides_to_scroll"]) ? (int)$settings["slides_to_scroll"] : 1,
1434
+ ]
1435
+ ],
1436
+ "navigation" => [
1437
+ "nextEl" => "#" . $id . " .bdt-navigation-next",
1438
+ "prevEl" => "#" . $id . " .bdt-navigation-prev",
1439
+ ],
1440
+ "pagination" => [
1441
+ "el" => "#" . $id . " .swiper-pagination",
1442
+ "clickable" => "true",
1443
+ // "renderBullet" => "true",
1444
+ ],
1445
+ ]))
1446
+ ]
1447
+ ]
1448
+ ]
1449
+ );
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+ $layout_style = 'bdt-slider-style-' . $settings['layout_style'];
1456
+ ?>
1457
+ <div <?php $this->print_render_attribute_string('carousel'); ?>>
1458
+ <div class="swiper-container <?php echo $layout_style; ?>">
1459
+ <div class="swiper-wrapper">
1460
+ <?php
1461
+ }
1462
+
1463
+ function render_navigation()
1464
+ {
1465
+ $settings = $this->get_settings_for_display();
1466
+ ?>
1467
+ <div class="bdt-navigation-wrap bdt-position-bottom-left">
1468
+ <div class="bdt-navigation-prev">
1469
+ <span class="bdt-n-p-icon bdt-prev-icon eicon-arrow-left"></span>
1470
+ <span class="bdt-n-p-text bdt-prev"><?php esc_html_e('prev', 'bdthemes-prime-slider'); ?></span>
1471
+ </div>
1472
+ <div class="bdt-navigation-next">
1473
+ <span class="bdt-n-p-text bdt-next"><?php esc_html_e('next', 'bdthemes-prime-slider'); ?></span>
1474
+ <span class="bdt-n-p-icon bdt-next-icon eicon-arrow-right"></span>
1475
+ </div>
1476
+ </div>
1477
+ <?php
1478
+ }
1479
+
1480
+ function render_pagination()
1481
+ {
1482
+ $settings = $this->get_settings_for_display();
1483
+ if($settings['show_pagination'] !='yes'){
1484
+ return;
1485
+ }
1486
+
1487
+ ?>
1488
+ <div class="bdt-pagi-wrap bdt-position-bottom-right">
1489
+ <div class="swiper-pagination"></div>
1490
+ </div>
1491
+ <?php
1492
+ }
1493
+
1494
+
1495
+ function render_arrows_fraction()
1496
+ {
1497
+ $settings = $this->get_settings_for_display();
1498
+ $hide_arrow_on_mobile = $settings['hide_arrow_on_mobile'] ? 'bdt-visible@m' : '';
1499
+
1500
+ ?>
1501
+ <div class="bdt-position-z-index bdt-position-<?php echo esc_html($settings['arrows_fraction_position']); ?>">
1502
+ <div class="bdt-arrows-fraction-container bdt-slidenav-container ">
1503
+
1504
+ <div class="bdt-flex bdt-flex-middle">
1505
+ <div class="<?php echo esc_html($hide_arrow_on_mobile); ?>">
1506
+ <a href="" class="bdt-navigation-prev">
1507
+ <i class="ps-wi-arrow-left-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1508
+ </a>
1509
+ </div>
1510
+
1511
+ <?php if ('center' !== $settings['arrows_fraction_position']) : ?>
1512
+ <div class="swiper-pagination"></div>
1513
+ <?php endif; ?>
1514
+
1515
+ <div class="<?php echo esc_html($hide_arrow_on_mobile); ?>">
1516
+ <a href="" class="bdt-navigation-next">
1517
+ <i class="ps-wi-arrow-right-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1518
+ </a>
1519
+ </div>
1520
+
1521
+ </div>
1522
+ </div>
1523
+ </div>
1524
+ <?php
1525
+ }
1526
+
1527
+ function render_footer()
1528
+ {
1529
+ $settings = $this->get_settings_for_display();
1530
+
1531
+
1532
+ ?>
1533
+ </div>
1534
+ <?php
1535
+ $this->render_pagination();
1536
+ $this->render_navigation();
1537
+ ?>
1538
+ </div>
1539
+
1540
+ </div>
1541
+ <?php
1542
+ }
1543
+
1544
+ public function render_slider_item($post_id, $image_size, $excerpt_length)
1545
+ {
1546
+
1547
+ $settings = $this->get_settings_for_display();
1548
+
1549
+ // if ('yes' == $settings['global_link']) {
1550
+
1551
+ // $this->add_render_attribute('slider-item', 'onclick', "window.open('" . esc_url(get_permalink()) . "', '_self')", true);
1552
+ // }
1553
+
1554
+ $this->add_render_attribute('slider-item', 'class', 'bdt-item swiper-slide', true);
1555
+ $modal_id = 'bdt-pacific-slider-' . $post_id;
1556
+
1557
+ ?>
1558
+ <div <?php echo $this->get_render_attribute_string('slider-item'); ?>>
1559
+ <div class="bdt-image-wrap">
1560
+ <?php $this->render_image(get_post_thumbnail_id($post_id), $image_size); ?>
1561
+ </div>
1562
+ <div class="bdt-content-wrap bdt-position-center-left ">
1563
+ <?php $this->render_category(); ?>
1564
+ <?php $this->render_title(); ?>
1565
+
1566
+ <?php if ($settings['show_author'] or $settings['show_date']) : ?>
1567
+ <div class="bdt-meta-box" data-swiper-parallax="-300" data-swiper-parallax-duration="800">
1568
+ <?php $this->render_author(); ?>
1569
+ <div class="bdt-meta-separator">
1570
+ <span><?php echo $settings['meta_separator']; ?></span>
1571
+ </div>
1572
+ <?php $this->render_date(); ?>
1573
+ </div>
1574
+ <?php endif; ?>
1575
+
1576
+ <div class="bdt-button-wrap" data-swiper-parallax="-100" data-swiper-parallax-duration="1000">
1577
+ <?php if ($settings['show_read_more']) : ?>
1578
+ <a class="bdt-button bdt-padding-remove" href="#<?php echo $modal_id; ?>" bdt-toggle>
1579
+ <span class="bdt-btn-text"><?php echo esc_html__($settings['read_more_text']) ?></span>
1580
+ <span class="bdt-icon eicon-plus"></span>
1581
+ </a>
1582
+ <?php endif; ?>
1583
+ <div id="<?php echo $modal_id; ?>" class="bdt-modal-full" bdt-modal>
1584
+ <div class="bdt-modal-dialog bdt-pacific-slider-modal <?php echo 'bdt-pacific-' . $this->get_id(); ?>">
1585
+ <a class="bdt-modal-close-full bdt-close-large" bdt-close></a>
1586
+ <div class="bdt-grid-collapse bdt-child-width-1-2@s bdt-flex-middle" bdt-grid>
1587
+ <?php $this->render_image_thumb(get_post_thumbnail_id($post_id), $image_size); ?>
1588
+ <div class="bdt-padding-large">
1589
+ <?php $this->render_title(); ?>
1590
+ <?php $this->render_excerpt($excerpt_length); ?>
1591
+ </div>
1592
+ </div>
1593
+ </div>
1594
+ </div>
1595
+ </div>
1596
+ </div>
1597
+ </div>
1598
+
1599
+ <?php
1600
+ }
1601
+
1602
+ public function render()
1603
+ {
1604
+ $settings = $this->get_settings_for_display();
1605
+
1606
+ $wp_query = $this->query_posts();
1607
+ if (!$wp_query->found_posts) {
1608
+ return;
1609
+ }
1610
+
1611
+ ?>
1612
+ <div class="bdt-prime-slider">
1613
+ <?php
1614
+
1615
+ $this->render_header();
1616
+
1617
+ while ($wp_query->have_posts()) {
1618
+ $wp_query->the_post();
1619
+ $thumbnail_size = $settings['primary_thumbnail_size'];
1620
+ $this->render_slider_item(get_the_ID(), $thumbnail_size, $settings['excerpt_length']);
1621
+ }
1622
+
1623
+ $this->render_footer();
1624
+
1625
+ ?>
1626
+
1627
+ </div>
1628
+ <?php
1629
+ wp_reset_postdata();
1630
+ }
1631
+ }
modules/vertex/widgets/vertex.php CHANGED
@@ -849,8 +849,8 @@
849
  "loop" => ($settings["loop"] == "yes") ? true : false,
850
  "speed" => $settings["speed"]["size"],
851
  "pauseOnHover" => ("yes" == $settings["pauseonhover"]) ? true : false,
852
- "slidesPerView" => (int) $settings["columns_mobile"],
853
- "slidesPerGroup" => (int) $settings["slides_to_scroll_mobile"],
854
  "spaceBetween" => 0,
855
  "centeredSlides" => ($settings["centered_slides"] === "yes") ? true : false,
856
  "grabCursor" => ($settings["grab_cursor"] === "yes") ? true : false,
@@ -861,12 +861,12 @@
861
  "observeParents" => ($settings["observer"]) ? true : false,
862
  "breakpoints" => [
863
  (int) $viewport_md => [
864
- "slidesPerView" => (int) $settings["columns_tablet"],
865
- "slidesPerGroup" => (int) $settings["slides_to_scroll_tablet"]
866
  ],
867
  (int) $viewport_lg => [
868
- "slidesPerView" => (int) $settings["columns"],
869
- "slidesPerGroup" => (int) $settings["slides_to_scroll"]
870
  ]
871
  ],
872
  "navigation" => [
849
  "loop" => ($settings["loop"] == "yes") ? true : false,
850
  "speed" => $settings["speed"]["size"],
851
  "pauseOnHover" => ("yes" == $settings["pauseonhover"]) ? true : false,
852
+ "slidesPerView" => isset($settings["columns_mobile"]) ? (int)$settings["columns_mobile"] : 1,
853
+ "slidesPerGroup" => isset($settings["slides_to_scroll_mobile"]) ? (int)$settings["slides_to_scroll_mobile"] : 1,
854
  "spaceBetween" => 0,
855
  "centeredSlides" => ($settings["centered_slides"] === "yes") ? true : false,
856
  "grabCursor" => ($settings["grab_cursor"] === "yes") ? true : false,
861
  "observeParents" => ($settings["observer"]) ? true : false,
862
  "breakpoints" => [
863
  (int) $viewport_md => [
864
+ "slidesPerView" => isset($settings["columns_tablet"]) ? (int)$settings["columns_tablet"] : 3,
865
+ "slidesPerGroup" => isset($settings["slides_to_scroll_tablet"]) ? (int)$settings["slides_to_scroll_tablet"] : 1,
866
  ],
867
  (int) $viewport_lg => [
868
+ "slidesPerView" => isset($settings["columns"]) ? (int)$settings["columns"] : 3,
869
+ "slidesPerGroup" => isset($settings["slides_to_scroll"]) ? (int)$settings["slides_to_scroll"] : 1,
870
  ]
871
  ],
872
  "navigation" => [
readme.txt CHANGED
@@ -5,11 +5,11 @@ Tags: elementor, prime slider, modern slider, slider addons, elementor addons, d
5
  Requires at least: 5.0.0
6
  Tested up to: 5.8.2
7
  Requires PHP: 5.6.42
8
- Stable tag: 2.3.2
9
  License: GPL3
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Elementor requires at least: 3.0.0
12
- Elementor tested up to: 3.5.0
13
 
14
  Best Addon for Elementor WordPress Plugin with 35+ Awesome slider design that you can use your modern website with elementor page builder.
15
 
@@ -54,6 +54,7 @@ social share buttons, slider number and navigation with heading and sub heading
54
  22. [Fiestar](https://primeslider.pro/demo/fiestar/) - Flestar is a totally unique carousel type slider widget developed by the Prime Slider plugin. The slider displays post image in a thumb pin style with minimum detail (title & category by default). See the demo
55
  23. [Vertex](https://primeslider.pro/demo/vertex/) - Vertex base slider is a unique and tricky slider widget that presents your posts resembling a horizontal timeline. The whole slider can be customized to perfectly fit as a featured section on your site. See the demo
56
  24. [Rubix](https://primeslider.pro/demo/rubix/) - Rubix makes it a fun experience for your blog visitors by adding a box-puzzle type blog layout on your web page. This is a first-ever widget that is completely responsive and looks unique or modern. See the demo
 
57
 
58
  = Pro Version =
59
 
@@ -80,6 +81,10 @@ e.g.
80
 
81
  == Changelog ==
82
 
 
 
 
 
83
  = 2.3.2 =
84
 
85
  * Added: Sub Title HTML Tag option added in Dragon Slider Widget
5
  Requires at least: 5.0.0
6
  Tested up to: 5.8.2
7
  Requires PHP: 5.6.42
8
+ Stable tag: 2.4.0
9
  License: GPL3
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
  Elementor requires at least: 3.0.0
12
+ Elementor tested up to: 3.5.1
13
 
14
  Best Addon for Elementor WordPress Plugin with 35+ Awesome slider design that you can use your modern website with elementor page builder.
15
 
54
  22. [Fiestar](https://primeslider.pro/demo/fiestar/) - Flestar is a totally unique carousel type slider widget developed by the Prime Slider plugin. The slider displays post image in a thumb pin style with minimum detail (title & category by default). See the demo
55
  23. [Vertex](https://primeslider.pro/demo/vertex/) - Vertex base slider is a unique and tricky slider widget that presents your posts resembling a horizontal timeline. The whole slider can be customized to perfectly fit as a featured section on your site. See the demo
56
  24. [Rubix](https://primeslider.pro/demo/rubix/) - Rubix makes it a fun experience for your blog visitors by adding a box-puzzle type blog layout on your web page. This is a first-ever widget that is completely responsive and looks unique or modern. See the demo
57
+ 25. [Pacific](https://primeslider.pro/demo/pacific/) - Pacific Slider lets you add a responsive slider widget to your blog. It has several cool features. Not only does this make the slider look unique but it also makes it more eye-catching and dynamic than other sliders on the market. See the demo
58
 
59
  = Pro Version =
60
 
81
 
82
  == Changelog ==
83
 
84
+ = 2.4.0 =
85
+
86
+ * Added: Pacific Widget Added
87
+
88
  = 2.3.2 =
89
 
90
  * Added: Sub Title HTML Tag option added in Dragon Slider Widget