Changeset 3331034
- Timestamp:
- 07/20/2025 07:21:14 PM (7 months ago)
- Location:
- image-carousel-divi/trunk
- Files:
-
- 3 added
- 1 deleted
- 5 edited
-
README.md (deleted)
-
includes/LwpImageCarousel.php (modified) (1 diff)
-
includes/class-lwp-image-carousel-rating.php (added)
-
includes/modules/DiviImageCarousel/DiviImageCarousel.php (modified) (4 diffs)
-
languages/en_US.mo (added)
-
languages/en_US.po (added)
-
lwp-image-carousel.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
scripts/builder-bundle.min.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
image-carousel-divi/trunk/includes/LwpImageCarousel.php
r2452898 r3331034 28 28 * @var string 29 29 */ 30 public $version = '1.0 ';30 public $version = '1.0.1'; 31 31 32 32 /** -
image-carousel-divi/trunk/includes/modules/DiviImageCarousel/DiviImageCarousel.php
r2452898 r3331034 176 176 ), 177 177 ), 178 'css_ease' => array( 179 'label' => esc_html__( 'CSS Animation Easing', 'lwp-image-carousel' ), 180 'description' => esc_html__( 'Choose the easing function for the slide animation.', 'lwp-image-carousel' ), 181 'type' => 'select', 182 'option_category' => 'basic_option', 183 'options' => array( 184 'ease' => esc_html__( 'Ease', 'lwp-image-carousel' ), 185 'linear' => esc_html__( 'Linear', 'lwp-image-carousel' ), 186 'ease-in' => esc_html__( 'Ease In', 'lwp-image-carousel' ), 187 'ease-out' => esc_html__( 'Ease Out', 'lwp-image-carousel' ), 188 'ease-in-out' => esc_html__( 'Ease In Out', 'lwp-image-carousel' ), 189 ), 190 'default' => 'ease', 191 'toggle_slug' => 'animation_settings', 192 'tab_slug' => 'advanced', 193 ), 178 194 'arrow_color' => array( 179 195 'label' => esc_html__( 'Arrow Color', 'lwp-image-carousel' ), … … 541 557 } 542 558 543 public function render( $attrs, $content = null, $render_slug ) {559 public function render( $attrs, $content, $render_slug ) { 544 560 545 561 $gallery_ids = $this->props['gallery_ids']; … … 570 586 $slide_animation_speed = $this->props['slide_animation_speed']; 571 587 $pause_on_hover = $this->props['pause_on_hover']; 572 588 589 $css_ease = $this->props['css_ease']; 573 590 $arrow_color = $this->props['arrow_color']; 574 591 $arrow_color_tablet = $this->props['arrow_color_tablet']; … … 717 734 718 735 if($layout=='default' || $layout=='') //Slick attribute if layout is default 719 $data_slick = sprintf('data-slick=\'{ "vertical":%17$s, "slidesToShow": %1$s, "slidesToScroll": %2$s, "dots":%3$s, "arrows":%4$s, "infinite":%5$s, "autoplay":%6$s, "autoplaySpeed":%7$s, "pauseOnHover":%16$s, "adaptiveHeight":%18$s, "speed":%19$s, " responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": %8$s, "slidesToScroll": %10$s, "arrows":%12$s,"dots":%14$s } } ,{ "breakpoint": 767, "settings": { "slidesToShow": %9$s, "slidesToScroll": %11$s, "arrows":%13$s,"dots":%15$s } } ] }\''720 ,$slides_show,$slides_scroll,$show_dots,$show_arrows,$infinite_animation,$autoplay_animation,$autoplay_animation_speed,$slides_show_tablet,$slides_show_phone,$slides_scroll_tablet,$slides_scroll_phone,$show_arrows_tablet,$show_arrows_phone,$show_dots_tablet,$show_dots_phone,$pause_on_hover,$vertical_layout,$adaptive_height,$slide_animation_speed );736 $data_slick = sprintf('data-slick=\'{ "vertical":%17$s, "slidesToShow": %1$s, "slidesToScroll": %2$s, "dots":%3$s, "arrows":%4$s, "infinite":%5$s, "autoplay":%6$s, "autoplaySpeed":%7$s, "pauseOnHover":%16$s, "adaptiveHeight":%18$s, "speed":%19$s, "cssEase":"%20$s", "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": %8$s, "slidesToScroll": %10$s, "arrows":%12$s,"dots":%14$s } } ,{ "breakpoint": 767, "settings": { "slidesToShow": %9$s, "slidesToScroll": %11$s, "arrows":%13$s,"dots":%15$s } } ] }\'' 737 ,$slides_show,$slides_scroll,$show_dots,$show_arrows,$infinite_animation,$autoplay_animation,$autoplay_animation_speed,$slides_show_tablet,$slides_show_phone,$slides_scroll_tablet,$slides_scroll_phone,$show_arrows_tablet,$show_arrows_phone,$show_dots_tablet,$show_dots_phone,$pause_on_hover,$vertical_layout,$adaptive_height,$slide_animation_speed, $css_ease); 721 738 722 739 else if($layout=='center') //Slick attribute if layout is set to center mode 723 $data_slick = sprintf('data-slick=\'{ "vertical":%17$s, "centerMode": true, "centerPadding": "%18$s", "slidesToShow": %1$s, "dots":%3$s, "arrows":%4$s, "infinite":true, "autoplay":%6$s, "autoplaySpeed":%7$s, "pauseOnHover":%16$s, "adaptiveHeight":%19$s, "speed":%20$s, " responsive": [ { "breakpoint": 980, "settings": { "centerMode": true, "slidesToShow": %8$s, "arrows":%12$s,"dots":%14$s } } ,{ "breakpoint": 767, "settings": {"centerMode": true, "slidesToShow": %9$s, "arrows":%13$s,"dots":%15$s } } ] }\''724 ,$slides_show,$slides_scroll,$show_dots,$show_arrows,$infinite_animation,$autoplay_animation,$autoplay_animation_speed,$slides_show_tablet,$slides_show_phone,$slides_scroll_tablet,$slides_scroll_phone,$show_arrows_tablet,$show_arrows_phone,$show_dots_tablet,$show_dots_phone,$pause_on_hover,$vertical_layout,$center_padding,$adaptive_height,$slide_animation_speed );740 $data_slick = sprintf('data-slick=\'{ "vertical":%17$s, "centerMode": true, "centerPadding": "%18$s", "slidesToShow": %1$s, "dots":%3$s, "arrows":%4$s, "infinite":true, "autoplay":%6$s, "autoplaySpeed":%7$s, "pauseOnHover":%16$s, "adaptiveHeight":%19$s, "speed":%20$s, "cssEase":"%21$s", "responsive": [ { "breakpoint": 980, "settings": { "centerMode": true, "slidesToShow": %8$s, "arrows":%12$s,"dots":%14$s } } ,{ "breakpoint": 767, "settings": {"centerMode": true, "slidesToShow": %9$s, "arrows":%13$s,"dots":%15$s } } ] }\'' 741 ,$slides_show,$slides_scroll,$show_dots,$show_arrows,$infinite_animation,$autoplay_animation,$autoplay_animation_speed,$slides_show_tablet,$slides_show_phone,$slides_scroll_tablet,$slides_scroll_phone,$show_arrows_tablet,$show_arrows_phone,$show_dots_tablet,$show_dots_phone,$pause_on_hover,$vertical_layout,$center_padding,$adaptive_height,$slide_animation_speed, $css_ease); 725 742 726 743 else if($layout=='sync'){ //Slick attribute and html if layout is set to synced slider 727 744 728 $data_slick = sprintf('data-slick=\'{"asNavFor": ".big-slider","slidesToShow": %1$s, "slidesToScroll": %2$s, "dots":%3$s, "arrows":%4$s, "focusOnSelect": true, "adaptiveHeight":%17$s, "speed":%18$s, " responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": %8$s, "slidesToScroll": %10$s, "arrows":%12$s,"dots":%14$s } } ,{ "breakpoint": 767, "settings": { "slidesToShow": %9$s, "slidesToScroll": %11$s, "arrows":%13$s,"dots":%15$s } } ] }\''729 ,$slides_show,$slides_scroll,$show_dots,$show_arrows,$infinite_animation,$autoplay_animation,$autoplay_animation_speed,$slides_show_tablet,$slides_show_phone,$slides_scroll_tablet,$slides_scroll_phone,$show_arrows_tablet,$show_arrows_phone,$show_dots_tablet,$show_dots_phone,$pause_on_hover,$adaptive_height,$slide_animation_speed );745 $data_slick = sprintf('data-slick=\'{"asNavFor": ".big-slider","slidesToShow": %1$s, "slidesToScroll": %2$s, "dots":%3$s, "arrows":%4$s, "focusOnSelect": true, "adaptiveHeight":%17$s, "speed":%18$s, "cssEase":"%19$s", "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": %8$s, "slidesToScroll": %10$s, "arrows":%12$s,"dots":%14$s } } ,{ "breakpoint": 767, "settings": { "slidesToShow": %9$s, "slidesToScroll": %11$s, "arrows":%13$s,"dots":%15$s } } ] }\'' 746 ,$slides_show,$slides_scroll,$show_dots,$show_arrows,$infinite_animation,$autoplay_animation,$autoplay_animation_speed,$slides_show_tablet,$slides_show_phone,$slides_scroll_tablet,$slides_scroll_phone,$show_arrows_tablet,$show_arrows_phone,$show_dots_tablet,$show_dots_phone,$pause_on_hover,$adaptive_height,$slide_animation_speed, $css_ease); 730 747 731 748 $sync_slider_html = sprintf( -
image-carousel-divi/trunk/lwp-image-carousel.php
r2452898 r3331034 4 4 Plugin URI: https://www.learnhowwp.com/divi-image-carousel-plugin 5 5 Description: This plugin adds an image carousel module to the Divi theme. 6 Version: 1.0 6 Version: 1.0.1 7 7 Author: learnhowwp.com 8 8 Author URI: http://www.learnhowwp.com … … 27 27 28 28 29 if ( ! function_exists( 'lwp_initialize_image_carousel_extension' ) ) :30 /**31 * Creates the extension's main class instance.32 *33 * @since 1.0.034 */35 function lwp_initialize_image_carousel_extension() {36 require_once plugin_dir_path( __FILE__ ) . 'includes/LwpImageCarousel.php';37 }38 add_action( 'divi_extensions_init', 'lwp_initialize_image_carousel_extension' );29 if ( ! function_exists( 'lwp_initialize_image_carousel_extension' ) ) : 30 /** 31 * Creates the extension's main class instance. 32 * 33 * @since 1.0.0 34 */ 35 function lwp_initialize_image_carousel_extension() { 36 require_once plugin_dir_path( __FILE__ ) . 'includes/LwpImageCarousel.php'; 37 } 38 add_action( 'divi_extensions_init', 'lwp_initialize_image_carousel_extension' ); 39 39 endif; 40 40 41 if ( ! function_exists( 'lwp_hook_css' ) ) :41 if ( ! function_exists( 'lwp_hook_css' ) ) : 42 42 43 function lwp_hook_css() { 44 $url_eot= esc_url( plugins_url( 'fonts/slick.eot', __FILE__ ) ); 45 $url_woff= esc_url( plugins_url( 'fonts/slick.woff', __FILE__ ) ); 46 $url_ttf= esc_url( plugins_url( 'fonts/slick.ttf', __FILE__ ) ); 47 $url_svg= esc_url( plugins_url( 'fonts/slick.svg#slick', __FILE__ ) ); 48 ?> 49 <style> 50 @font-face 51 { 52 font-family: 'slick'; 53 font-weight: normal; 54 font-style: normal; 43 /** 44 * Outputs custom @font-face CSS for the slick carousel fonts. 45 * 46 * @since 1.0.0 47 */ 48 function lwp_hook_css() { 49 $url_eot = esc_url( plugins_url( 'fonts/slick.eot', __FILE__ ) ); 50 $url_woff = esc_url( plugins_url( 'fonts/slick.woff', __FILE__ ) ); 51 $url_ttf = esc_url( plugins_url( 'fonts/slick.ttf', __FILE__ ) ); 52 $url_svg = esc_url( plugins_url( 'fonts/slick.svg#slick', __FILE__ ) ); 55 53 56 src: url(<?php echo"'".$url_eot."'"; ?>); 57 src: url(<?php echo"'".$url_eot."'"; ?>) format('embedded-opentype'), 58 url(<?php echo"'".$url_woff."'"; ?>) format('woff'), 59 url(<?php echo"'".$url_ttf."'"; ?>) format('truetype'), 60 url(<?php echo"'".$url_svg."'"; ?>) format('svg'); 61 } 62 </style> 63 <?php 64 } 54 echo '<style> 55 @font-face { 56 font-family: "slick"; 57 font-weight: normal; 58 font-style: normal; 59 src: url("' . esc_url( $url_eot ) . '"); 60 src: url("' . esc_url( $url_eot ) . '") format("embedded-opentype"), 61 url("' . esc_url( $url_woff ) . '") format("woff"), 62 url("' . esc_url( $url_ttf ) . '") format("truetype"), 63 url("' . esc_url( $url_svg ) . '") format("svg"); 64 } 65 </style>'; 66 } 65 67 66 68 endif; 67 69 68 70 69 if ( ! function_exists( 'lwp_get_carousel_images' ) ) :71 if ( ! function_exists( 'lwp_get_carousel_images' ) ) : 70 72 71 add_action( 'wp_ajax_lwp_get_carousel_images', 'lwp_get_carousel_images' );73 add_action( 'wp_ajax_lwp_get_carousel_images', 'lwp_get_carousel_images' ); 72 74 73 function lwp_get_carousel_images(){ 75 /** 76 * Handles AJAX request to fetch carousel images. 77 * 78 * @since 1.0.0 79 */ 80 function lwp_get_carousel_images() { 74 81 75 $gallery_ids = wp_parse_id_list($_POST['gallery_ids']); 82 if ( isset( $_POST['et_admin_load_nonce_'] ) && ! wp_verify_nonce( sanitize_key( $_POST['et_admin_load_nonce_'] ), 'et_admin_load_nonce' ) ) { 83 die( 'Nonce verification failed.' ); 84 } 76 85 77 $attachments = array(); 78 $attachments_args = array( 79 'numberposts' => 5, 80 'include' => $gallery_ids, 81 'post_status' => 'inherit', 82 'post_type' => 'attachment', 83 'post_mime_type' => 'image', 84 'order' => 'ASC', 85 'orderby' => 'post__in', 86 ); 87 88 $_attachments = get_posts( $attachments_args ); 86 $gallery_ids = array(); 87 if ( isset( $_POST['gallery_ids'] ) && ! empty( $_POST['gallery_ids'] ) ) { 88 $gallery_ids = wp_parse_id_list( $_POST['gallery_ids'] ); 89 } 89 90 90 foreach ( $_attachments as $key => $val ) { 91 $attachments[$key] = $_attachments[$key]; 92 $attachments[$key]->image_alt_text = get_post_meta( $val->ID, '_wp_attachment_image_alt', true); 93 $attachments[$key]->image_src_full = wp_get_attachment_image_src( $val->ID, 'full' ); 91 $attachments = array(); 92 $attachments_args = array( 93 'numberposts' => 5, 94 'include' => $gallery_ids, 95 'post_status' => 'inherit', 96 'post_type' => 'attachment', 97 'post_mime_type' => 'image', 98 'order' => 'ASC', 99 'orderby' => 'post__in', 100 ); 101 102 $_attachments = get_posts( $attachments_args ); 103 104 foreach ( $_attachments as $key => $val ) { 105 $attachments[ $key ] = $_attachments[ $key ]; 106 $attachments[ $key ]->image_alt_text = get_post_meta( $val->ID, '_wp_attachment_image_alt', true ); 107 $attachments[ $key ]->image_src_full = wp_get_attachment_image_src( $val->ID, 'full' ); 108 } 109 110 $images_output = ''; // stores html output for the images. 111 112 foreach ( $attachments as $key => $val ) { 113 114 $images_output = $images_output . '<div><img src="' . $attachments[ $key ]->image_src_full[0] . '" alt"' . $attachments[ $key ]->image_alt_text . '"></div>'; 115 116 $attachments[ $key ]; 117 $attachments[ $key ]->image_alt_text; 118 $attachments[ $key ]->image_src_full; 119 } 120 121 $result = array( 122 'html' => $images_output, 123 ); 124 echo wp_json_encode( $result ); 125 wp_die(); 94 126 } 95 96 $images_output=''; //stores html output for the images97 98 foreach ( $attachments as $key => $val ) {99 100 $images_output=$images_output.'<div><img src="'.$attachments[$key]->image_src_full[0].'" alt"'.$attachments[$key]->image_alt_text.'"></div>';101 102 $attachments[$key];103 $attachments[$key]->image_alt_text;104 $attachments[$key]->image_src_full;105 }106 107 $result = [108 'html' => $images_output109 ];110 echo json_encode( $result );111 wp_die();112 }113 127 114 128 endif; 115 129 116 if ( ! function_exists( 'lwp_image_carousel_plugin_row_meta' ) ) :130 if ( ! function_exists( 'lwp_image_carousel_plugin_row_meta' ) ) : 117 131 118 add_filter( 'plugin_row_meta', 'lwp_image_carousel_plugin_row_meta', 10, 2 );132 add_filter( 'plugin_row_meta', 'lwp_image_carousel_plugin_row_meta', 10, 2 ); 119 133 120 function lwp_image_carousel_plugin_row_meta( $links, $file ) { 134 /** 135 * Adds custom links to the plugin row meta section on the plugins page. 136 * 137 * @param array $links Existing plugin meta links. 138 * @param string $file Plugin file path. 139 * 140 * @return array Modified array of plugin meta links. 141 */ 142 function lwp_image_carousel_plugin_row_meta( $links, $file ) { 121 143 122 if ( plugin_basename( __FILE__ )== $file ) {123 $new_links = array(124 '<a href="https://wordpress.org/support/plugin/image-carousel-divi/reviews/#new-post" target="_blank">'.esc_html__( 'Rate Plugin', 'lwp-image-carousel' ).'</a>',125 '<a href="https://www.learnhowwp.com/how-to-create-image-carousel-divi-free-plugin/" target="_blank">'.esc_html__( 'Getting Started Guide', 'lwp-image-carousel' ).'</a>'144 if ( plugin_basename( __FILE__ ) === $file ) { 145 $new_links = array( 146 '<a href="https://wordpress.org/support/plugin/image-carousel-divi/reviews/#new-post" target="_blank">' . esc_html__( 'Rate Plugin', 'lwp-image-carousel' ) . '</a>', 147 '<a href="https://www.learnhowwp.com/how-to-create-image-carousel-divi-free-plugin/" target="_blank">' . esc_html__( 'Getting Started Guide', 'lwp-image-carousel' ) . '</a>', 126 148 ); 127 128 $links = array_merge( $links, $new_links ); 149 150 $links = array_merge( $links, $new_links ); 151 } 152 153 return $links; 129 154 } 130 131 return $links;132 }133 155 134 156 endif; 157 158 require_once plugin_dir_path( __FILE__ ) . 'includes/class-lwp-image-carousel-rating.php'; 159 $lwp_image_carousel_rating = new Lwp_Image_Carousel_Rating(); 160 register_activation_hook( __FILE__, array( $lwp_image_carousel_rating, 'activation_time' ) ); -
image-carousel-divi/trunk/readme.txt
r3295832 r3331034 4 4 Requires at least: 5.0 5 5 Tested up to: 6.8 6 Requires PHP: 5.67 Stable tag: trunk6 Requires PHP: 7.0 7 Stable tag: 1.0.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 15 15 Add image carousels on your website with the Divi Image Carousel plugin. This plugin adds a new Image Carousel module in the Divi Builder. Once you activate the plugin a new module will appear in your module list by the name of Image Carousel. You can then use the module to add an Image Carousel anywhere inside the Divi Builder. 16 16 17 # Features 18 * Visual Builder Supported 19 * Center Mode layout 20 * Synced Slider layout (A small carousel syncs with the full size image above) 21 * Autoplay Animation 22 * Infinite Animation 23 * Choose the number of images you want to show in the carousel. 24 * Choose the number of images to scroll when the arrow is clicked or on autoplay. 17 Transform your Divi website with the **Image Carousel Module for Divi**, the ultimate solution for creating stunning, responsive image carousels and sliders. Whether you're showcasing portfolios, products, team showcases, or galleries, this powerful Divi module gives you complete control over design, layout, and animation. 25 18 26 [Divi Image Carousel Demo](https://www.learnhowwp.com/divi-image-carousel-plugin/) 19 With seamless integration into the Divi Builder, the Image Carousel Module allows you to add visually appealing sliders anywhere on your website. Choose from multiple layouts, including Center Mode, Synced Slider, and Vertical Slider, and customize every aspect of your carousel to match your website’s style and functionality. 27 20 28 **Plugin Tutorial:** 29 [How to Create an Image Carousel in Divi](https://www.learnhowwp.com/how-to-create-image-carousel-divi-free-plugin/) 21 ### Why Choose Image Carousel Module for Divi? 22 23 - **Fully Responsive:** Adjust slides count, scroll, arrows, and dots for desktop, tablet, and mobile. 24 - **Multiple Layouts:** Choose from Default, Center Mode, Synced Slider, or Vertical Slider layouts. 25 - **Customizable Navigation:** Show or hide arrows and dots, and style them with custom colors, backgrounds, and positions. 26 - **Advanced Animation Options:** Enable autoplay, infinite looping, and set animation speeds for smooth transitions. 27 - **SEO-Friendly:** Add alt and title attributes to images for better accessibility and search engine optimization. 28 - **Design Flexibility:** Customize borders, box shadows, and padding for images, center images, and main images. 29 - **Easy to Use:** No coding required—just drag, drop, and customize in the Divi Builder. 30 31 ### Key Features: 32 33 - **Visual Builder Integration:** Add and edit carousels directly in the Divi Visual Builder. 34 - **Autoplay Animation:** Automatically scroll through images with adjustable animation speed. 35 - **Infinite Animation:** Enable seamless looping for a continuous carousel experience. 36 - **Center Mode Layout:** Highlight the center image with customizable padding and styling. 37 - **Synced Slider Layout:** Sync a thumbnail carousel with a larger image slider for better navigation. 38 - **Responsive Controls:** Adjust slides count, scroll, arrows, and dots for different devices. 39 - **Custom CSS Easing:** Choose from ease, linear, ease-in, ease-out, or ease-in-out for smooth animations. 40 - **Arrow and Dot Customization:** Style navigation elements with custom colors, hover effects, and positions. 41 - **Border and Box Shadow Styling:** Add borders and shadows to images for a polished look. 42 43 ### How It Works: 44 45 1. **Activate the Plugin:** Once activated, the "Image Carousel" module will appear in your Divi Builder module list. 46 2. **Add the Module:** Drag and drop the Image Carousel module into any section of your Divi layout. 47 3. **Customize Your Carousel:** Select images, adjust layout settings, enable animations, and style navigation elements—all from the intuitive module settings panel. 48 4. **Publish and Enjoy:** Save your changes and watch your carousel come to life on your website. 49 50 ### Demo & Tutorial: 51 52 - [Divi Image Carousel Demo](https://www.learnhowwp.com/divi-image-carousel-plugin/) 53 - [How to Create an Image Carousel in Divi](https://www.learnhowwp.com/how-to-create-image-carousel-divi-free-plugin/) 54 30 55 31 56 … … 73 98 == Changelog == 74 99 100 =1.0.1= 101 * Added support for configuring cssease (CSS easing options). 102 * Added rating notice. 103 * Fixed PHPCS errors using phpcbf and added missing doc comments for better code quality. 104 * Escaped output in lwp_hook_css function. 105 * Added nonce verification in lwp_get_carousel_images function. 106 * Removed default null value from $content parameter in render() method to fix warning. 107 * Replaced json_encode() with wp_json_encode() for safer JSON encoding in WordPress. 108 75 109 =1.0= 76 110 * Added option for speed animation. -
image-carousel-divi/trunk/scripts/builder-bundle.min.js
r2452898 r3331034 1 !function(s){var e={};function o(t){if(e[t])return e[t].exports;var r=e[t]={i:t,l:!1,exports:{}};return s[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=s,o.c=e,o.d=function(s,e,t){o.o(s,e)||Object.defineProperty(s,e,{configurable:!1,enumerable:!0,get:t})},o.n=function(s){var e=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(e,"a",e),e},o.o=function(s,e){return Object.prototype.hasOwnProperty.call(s,e)},o.p="/",o(o.s=2)}([function(s,e){s.exports=jQuery},function(s,e){},function(s,e,o){o(3),s.exports=o(4)},function(s,e,o){"use strict"},function(s,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=o(0),r=o.n(t),i=o(5);r()(window).on("et_builder_api_ready",function(s,e){e.registerModules(i.a)})},function(s,e,o){"use strict";var t=o(6);e.a=[t.a]},function(s,e,o){"use strict";var t=o(7),r=o.n(t),i=o(0),l=o.n(i),a=o(8),n=(o.n(a),o(1));o.n(n);function c(s){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"===typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(s)}function d(s,e){return!e||"object"!==c(e)&&"function"!==typeof e?function(s){if(void 0===s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}(s):e}function p(s,e){for(var o=0;o<e.length;o++){var t=e[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}function _(s,e,o){return e&&p(s.prototype,e),o&&p(s,o),s}var h=function(s){function e(s){var o;return function(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s))).state={error:null,isLoaded:!1},o}return function(s,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(s,e):s.__proto__=e)}(e,t["Component"]),_(e,null,[{key:"css",value:function(s){var e=[];return void 0!==s.show_dots&&"off"!==s.show_dots||e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: none!important;"}]),void 0!==s.show_dots_tablet&&s.show_dots_last_edited.startsWith("on")&&("off"===s.show_dots_tablet?e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: none!important;",device:"tablet"}]):e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: block!important;",device:"tablet"}])),void 0!==s.show_dots_phone&&s.show_dots_last_edited.startsWith("on")&&("off"===s.show_dots_phone?e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: none!important;",device:"phone"}]):e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: block!important;",device:"phone"}])),"off"!==s.show_arrows&&void 0!==s.show_arrows||e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: none;"}]),void 0!==s.show_arrows_tablet&&s.show_arrows_last_edited.startsWith("on")&&("off"===s.show_arrows_tablet?e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: none;",device:"tablet"}]):e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: block;",device:"tablet"}])),void 0!==s.show_arrows_phone&&s.show_arrows_last_edited.startsWith("on")&&("off"===s.show_arrows_phone?e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: none;",device:"phone"}]):e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: block;",device:"phone"}])),void 0!==s.dots_color&&e.push([{selector:"%%order_class%% .slick-dots li button",declaration:"background-color: ".concat(s.dots_color,";")}]),void 0!==s.dots_color_tablet&&s.dots_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-dots li button",declaration:"background-color: ".concat(s.dots_color_tablet,";"),device:"tablet"}]),void 0!==s.dots_color_phone&&s.dots_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-dots li button",declaration:"background-color: ".concat(s.dots_color_phone,";"),device:"phone"}]),void 0!==s.arrow_color&&e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color,";")}]),void 0!==s.arrow_color_tablet&&s.arrow_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color_tablet,";"),device:"tablet"}]),void 0!==s.arrow_color_phone&&s.arrow_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color_phone,";"),device:"phone"}]),void 0!==s.arrow_bg&&e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg,";")}]),void 0!==s.arrow_bg_tablet&&s.arrow_bg_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg_tablet,";"),device:"tablet"}]),void 0!==s.arrow_bg_phone&&s.arrow_bg_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg_phone,";"),device:"phone"}]),s.hover_enabled&&(e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg__hover,";")}]),e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color__hover,";")}])),e}}]),_(e,[{key:"componentDidMount",value:function(){var s=this,e=new FormData;e.append("action","lwp_get_carousel_images"),e.append("post_id",window.ETBuilderBackend.postId), void 0!==this.props.gallery_ids&&e.append("gallery_ids",this.props.gallery_ids),fetch(window.et_fb_options.ajaxurl,{body:e,method:"POST"}).then(function(s){return s.json()}).then(function(e){s.setState({isLoaded:!0,html:e.html})},function(e){s.setState({isLoaded:!0,error:e})})}},{key:"componentDidUpdate",value:function(s,e){var o=this,t=Object(a.findDOMNode)(this.div3),r=Object(a.findDOMNode)(this.div2);if(s.gallery_ids!==this.props.gallery_ids||s.slides_show!==this.props.slides_show||s.slides_scroll!==this.props.slides_scroll||s.infinite_animation!==this.props.infinite_animation||s.slides_show_tablet!==this.props.slides_show_tablet||s.slides_show_phone!==this.props.slides_show_phone||s.slides_scroll_tablet!==this.props.slides_scroll_tablet||s.slides_scroll_phone!==this.props.slides_scroll_phone||s.layout!==this.props.layout||s.vertical_layout!==this.props.vertical_layout||s.center_padding!==this.props.center_padding||s.adaptive_height!==this.props.adaptive_height||s.slide_animation_speed!==this.props.slide_animation_speed){this.setState({isLoaded:!1});var i=new FormData;i.append("action","lwp_get_carousel_images"),i.append("post_id",window.ETBuilderBackend.postId),void 0!==this.props.gallery_ids&&i.append("gallery_ids",this.props.gallery_ids),fetch(window.et_fb_options.ajaxurl,{body:i,method:"POST"}).then(function(s){return s.json()}).then(function(s){o.setState({isLoaded:!0,html:s.html})},function(s){o.setState({isLoaded:!0,error:s})}),l()(t).slick("slickRemove",null,null,!0),l()(t).slick("unslick"),l()(t).slick(),"sync"===this.props.layout&&null!==r&&(l()(r).hasClass("slick-initialized")&&(l()(r).slick("slickRemove",null,null,!0),l()(r).slick("unslick")),l()(r).slick())}l()(t).hasClass("slick-initialized")&&0===l()(t).find(".slick-list").length&&(l()(t).slick("unslick"),l()(t).not(".slick-initialized").slick()),"sync"===this.props.layout&&l()(r).hasClass("slick-initialized")&&0===l()(r).find(".slick-list").length&&(l()(r).slick("unslick"),l()(r).not(".slick-initialized").slick()),"sync"===this.props.layout&&l()(r).not(".slick-initialized").slick(),l()(t).not(".slick-initialized").slick()}},{key:"check_responsive",value:function(s){return void 0!==s&&"on"===s.split("|")[0]}},{key:"render",value:function(){var s,e,o,t=this,i=this.state,l=i.error,a=i.isLoaded,n=i.html,c="",d="true",p="helper-class",_=!1,h="lwp-"+this.props.layout+"-slider",u=!0;return p="sync"===this.props.layout?"side"===this.props.arrow_location_sync?"lwp-"+this.props.arrow_location_sync+"-"+this.props.arrow_alignment_side_sync:"lwp-"+this.props.arrow_location_sync+"-"+this.props.arrow_alignment_sync:"side"===this.props.arrow_location?"lwp-"+this.props.arrow_location+"-"+this.props.arrow_alignment_side:"lwp-"+this.props.arrow_location+"-"+this.props.arrow_alignment,"on"===this.props.vertical_layout&&(_=!0),"off"===this.props.adaptive_height&&(u=!1),o=this.props.slide_animation_speed.slice(0,-2),s=this.check_responsive(this.props.slides_show_last_edited),e=this.check_responsive(this.props.slides_scroll_last_edited),void 0===this.props.slides_show_last_edited||!1===s?(this.props.slides_show_tablet=this.props.slides_show,this.props.slides_show_phone="1","sync"===this.props.layout&&(this.props.slides_show_phone="3")):(void 0!==this.props.slides_show_tablet&&""!==this.props.slides_show_tablet||(this.props.slides_show_tablet=this.props.slides_show),void 0!==this.props.slides_show_phone&&""!==this.props.slides_show_phone||(this.props.slides_show_phone=this.props.slides_show_tablet)),void 0===this.props.slides_scroll_last_edited||!1===e?(this.props.slides_scroll_tablet=this.props.slides_scroll,this.props.slides_scroll_phone="1"):(void 0!==this.props.slides_scroll_tablet&&""!==this.props.slides_scroll_tablet||(this.props.slides_scroll_tablet=this.props.slides_scroll),void 0!==this.props.slides_scroll_phone&&""!==this.props.slides_scroll_phone||(this.props.slides_scroll_phone=this.props.slides_scroll_tablet)),"off"===this.props.infinite_animation&&(d="false"),c='{"vertical": '+_+',"slidesToShow": '+this.props.slides_show+', "slidesToScroll": '+this.props.slides_scroll+', "dots": true, "arrows":true, "infinite": '+d+', "autoplay":false, "autplaySpeed":2000, "adaptiveHeight":'+u+', "speed":'+o+', "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": '+this.props.slides_show_tablet+', "slidesToScroll": '+this.props.slides_scroll_tablet+'} } ,{ "breakpoint": 767, "settings": { "slidesToShow": '+this.props.slides_show_phone+', "slidesToScroll": '+this.props.slides_scroll_phone+" } } ] }","center"===this.props.layout?c='{"vertical": '+_+',"centerMode": true, "centerPadding": "'+this.props.center_padding+'", "slidesToShow": '+this.props.slides_show+', "dots": true, "arrows":true, "infinite": true, "autoplay":false, "autplaySpeed":2000, "adaptiveHeight":'+u+', "speed":'+o+', "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": '+this.props.slides_show_tablet+'} } ,{ "breakpoint": 767, "settings": { "slidesToShow": '+this.props.slides_show_phone+"} } ] }":"sync"===this.props.layout&&(c='{"asNavFor": ".big-slider", "slidesToShow": '+this.props.slides_show+', "slidesToScroll": '+this.props.slides_scroll+', "dots": true, "arrows":true, "focusOnSelect": true, "adaptiveHeight":'+u+', "speed":'+o+', "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": '+this.props.slides_show_tablet+', "slidesToScroll": '+this.props.slides_scroll_tablet+'} } ,{ "breakpoint": 767, "settings": { "slidesToShow": '+this.props.slides_show_phone+', "slidesToScroll": '+this.props.slides_scroll_phone+" } } ] }"),l?r.a.createElement("div",null,l.message):a?r.a.createElement("div",{className:p},"sync"===this.props.layout&&r.a.createElement("section",{class:"lwp-slick-slider slider big-slider","data-slick":'{"slidesToShow": 1, "slidesToScroll": 1, "arrows":false, "fade":true, "asNavFor":".small-slider", "adaptiveHeight":true}',ref:function(s){t.div2=s},dangerouslySetInnerHTML:{__html:n}}),r.a.createElement("section",{className:"lwp-slick-slider slider small-slider ".concat(h),"data-slick":c,ref:function(s){t.div3=s},dangerouslySetInnerHTML:{__html:n}})):r.a.createElement("div",{class:"et-fb-loader-wrapper"},r.a.createElement("div",{class:"et-fb-loader"}))}}]),e}();Object.defineProperty(h,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"lwp_image_carousel"}),e.a=h},function(s,e){s.exports=React},function(s,e){s.exports=ReactDOM}]);1 !function(s){var e={};function o(t){if(e[t])return e[t].exports;var r=e[t]={i:t,l:!1,exports:{}};return s[t].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=s,o.c=e,o.d=function(s,e,t){o.o(s,e)||Object.defineProperty(s,e,{configurable:!1,enumerable:!0,get:t})},o.n=function(s){var e=s&&s.__esModule?function(){return s.default}:function(){return s};return o.d(e,"a",e),e},o.o=function(s,e){return Object.prototype.hasOwnProperty.call(s,e)},o.p="/",o(o.s=2)}([function(s,e){s.exports=jQuery},function(s,e){},function(s,e,o){o(3),s.exports=o(4)},function(s,e,o){"use strict"},function(s,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=o(0),r=o.n(t),i=o(5);r()(window).on("et_builder_api_ready",function(s,e){e.registerModules(i.a)})},function(s,e,o){"use strict";var t=o(6);e.a=[t.a]},function(s,e,o){"use strict";var t=o(7),r=o.n(t),i=o(0),l=o.n(i),a=o(8),n=(o.n(a),o(1));o.n(n);function c(s){return(c="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"===typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(s)}function d(s,e){return!e||"object"!==c(e)&&"function"!==typeof e?function(s){if(void 0===s)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}(s):e}function p(s,e){for(var o=0;o<e.length;o++){var t=e[o];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(s,t.key,t)}}function _(s,e,o){return e&&p(s.prototype,e),o&&p(s,o),s}var h=function(s){function e(s){var o;return function(s,e){if(!(s instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=d(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,s))).state={error:null,isLoaded:!1},o}return function(s,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(e&&e.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(s,e):s.__proto__=e)}(e,t["Component"]),_(e,null,[{key:"css",value:function(s){var e=[];return void 0!==s.show_dots&&"off"!==s.show_dots||e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: none!important;"}]),void 0!==s.show_dots_tablet&&s.show_dots_last_edited.startsWith("on")&&("off"===s.show_dots_tablet?e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: none!important;",device:"tablet"}]):e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: block!important;",device:"tablet"}])),void 0!==s.show_dots_phone&&s.show_dots_last_edited.startsWith("on")&&("off"===s.show_dots_phone?e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: none!important;",device:"phone"}]):e.push([{selector:"%%order_class%% ul.slick-dots",declaration:"display: block!important;",device:"phone"}])),"off"!==s.show_arrows&&void 0!==s.show_arrows||e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: none;"}]),void 0!==s.show_arrows_tablet&&s.show_arrows_last_edited.startsWith("on")&&("off"===s.show_arrows_tablet?e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: none;",device:"tablet"}]):e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: block;",device:"tablet"}])),void 0!==s.show_arrows_phone&&s.show_arrows_last_edited.startsWith("on")&&("off"===s.show_arrows_phone?e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: none;",device:"phone"}]):e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"display: block;",device:"phone"}])),void 0!==s.dots_color&&e.push([{selector:"%%order_class%% .slick-dots li button",declaration:"background-color: ".concat(s.dots_color,";")}]),void 0!==s.dots_color_tablet&&s.dots_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-dots li button",declaration:"background-color: ".concat(s.dots_color_tablet,";"),device:"tablet"}]),void 0!==s.dots_color_phone&&s.dots_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-dots li button",declaration:"background-color: ".concat(s.dots_color_phone,";"),device:"phone"}]),void 0!==s.arrow_color&&e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color,";")}]),void 0!==s.arrow_color_tablet&&s.arrow_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color_tablet,";"),device:"tablet"}]),void 0!==s.arrow_color_phone&&s.arrow_color_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color_phone,";"),device:"phone"}]),void 0!==s.arrow_bg&&e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg,";")}]),void 0!==s.arrow_bg_tablet&&s.arrow_bg_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg_tablet,";"),device:"tablet"}]),void 0!==s.arrow_bg_phone&&s.arrow_bg_last_edited.startsWith("on")&&e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg_phone,";"),device:"phone"}]),s.hover_enabled&&(e.push([{selector:"%%order_class%% .slick-next,%%order_class%% .slick-prev",declaration:"background-color: ".concat(s.arrow_bg__hover,";")}]),e.push([{selector:"%%order_class%% .slick-next:before,%%order_class%% .slick-prev:before",declaration:"color: ".concat(s.arrow_color__hover,";")}])),e}}]),_(e,[{key:"componentDidMount",value:function(){var s=this,e=new FormData;e.append("action","lwp_get_carousel_images"),e.append("post_id",window.ETBuilderBackend.postId),e.append("et_admin_load_nonce",window.et_fb_options.et_admin_load_nonce),void 0!==this.props.gallery_ids&&e.append("gallery_ids",this.props.gallery_ids),fetch(window.et_fb_options.ajaxurl,{body:e,method:"POST"}).then(function(s){return s.json()}).then(function(e){s.setState({isLoaded:!0,html:e.html})},function(e){s.setState({isLoaded:!0,error:e})})}},{key:"componentDidUpdate",value:function(s,e){var o=this,t=Object(a.findDOMNode)(this.div3),r=Object(a.findDOMNode)(this.div2);if(s.gallery_ids!==this.props.gallery_ids||s.slides_show!==this.props.slides_show||s.slides_scroll!==this.props.slides_scroll||s.infinite_animation!==this.props.infinite_animation||s.slides_show_tablet!==this.props.slides_show_tablet||s.slides_show_phone!==this.props.slides_show_phone||s.slides_scroll_tablet!==this.props.slides_scroll_tablet||s.slides_scroll_phone!==this.props.slides_scroll_phone||s.layout!==this.props.layout||s.vertical_layout!==this.props.vertical_layout||s.center_padding!==this.props.center_padding||s.adaptive_height!==this.props.adaptive_height||s.slide_animation_speed!==this.props.slide_animation_speed){this.setState({isLoaded:!1});var i=new FormData;i.append("action","lwp_get_carousel_images"),i.append("post_id",window.ETBuilderBackend.postId),i.append("et_admin_load_nonce",window.et_fb_options.et_admin_load_nonce),void 0!==this.props.gallery_ids&&i.append("gallery_ids",this.props.gallery_ids),fetch(window.et_fb_options.ajaxurl,{body:i,method:"POST"}).then(function(s){return s.json()}).then(function(s){o.setState({isLoaded:!0,html:s.html})},function(s){o.setState({isLoaded:!0,error:s})}),l()(t).slick("slickRemove",null,null,!0),l()(t).slick("unslick"),l()(t).slick(),"sync"===this.props.layout&&null!==r&&(l()(r).hasClass("slick-initialized")&&(l()(r).slick("slickRemove",null,null,!0),l()(r).slick("unslick")),l()(r).slick())}l()(t).hasClass("slick-initialized")&&0===l()(t).find(".slick-list").length&&(l()(t).slick("unslick"),l()(t).not(".slick-initialized").slick()),"sync"===this.props.layout&&l()(r).hasClass("slick-initialized")&&0===l()(r).find(".slick-list").length&&(l()(r).slick("unslick"),l()(r).not(".slick-initialized").slick()),"sync"===this.props.layout&&l()(r).not(".slick-initialized").slick(),l()(t).not(".slick-initialized").slick()}},{key:"check_responsive",value:function(s){return void 0!==s&&"on"===s.split("|")[0]}},{key:"render",value:function(){var s,e,o,t=this,i=this.state,l=i.error,a=i.isLoaded,n=i.html,c="",d="true",p="helper-class",_=!1,h="lwp-"+this.props.layout+"-slider",u=!0,f="ease";return p="sync"===this.props.layout?"side"===this.props.arrow_location_sync?"lwp-"+this.props.arrow_location_sync+"-"+this.props.arrow_alignment_side_sync:"lwp-"+this.props.arrow_location_sync+"-"+this.props.arrow_alignment_sync:"side"===this.props.arrow_location?"lwp-"+this.props.arrow_location+"-"+this.props.arrow_alignment_side:"lwp-"+this.props.arrow_location+"-"+this.props.arrow_alignment,"on"===this.props.vertical_layout&&(_=!0),"off"===this.props.adaptive_height&&(u=!1),o=this.props.slide_animation_speed.slice(0,-2),s=this.check_responsive(this.props.slides_show_last_edited),e=this.check_responsive(this.props.slides_scroll_last_edited),void 0===this.props.slides_show_last_edited||!1===s?(this.props.slides_show_tablet=this.props.slides_show,this.props.slides_show_phone="1","sync"===this.props.layout&&(this.props.slides_show_phone="3")):(void 0!==this.props.slides_show_tablet&&""!==this.props.slides_show_tablet||(this.props.slides_show_tablet=this.props.slides_show),void 0!==this.props.slides_show_phone&&""!==this.props.slides_show_phone||(this.props.slides_show_phone=this.props.slides_show_tablet)),void 0===this.props.slides_scroll_last_edited||!1===e?(this.props.slides_scroll_tablet=this.props.slides_scroll,this.props.slides_scroll_phone="1"):(void 0!==this.props.slides_scroll_tablet&&""!==this.props.slides_scroll_tablet||(this.props.slides_scroll_tablet=this.props.slides_scroll),void 0!==this.props.slides_scroll_phone&&""!==this.props.slides_scroll_phone||(this.props.slides_scroll_phone=this.props.slides_scroll_tablet)),"off"===this.props.infinite_animation&&(d="false"),void 0!==this.props.css_ease&&(f=this.props.css_ease),c='{"vertical": '+_+',"slidesToShow": '+this.props.slides_show+', "slidesToScroll": '+this.props.slides_scroll+', "dots": true, "arrows":true, "infinite": '+d+', "autoplay":false, "autplaySpeed":2000, "adaptiveHeight":'+u+', "speed":'+o+', "cssEase": "'+f+'", "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": '+this.props.slides_show_tablet+', "slidesToScroll": '+this.props.slides_scroll_tablet+'} } ,{ "breakpoint": 767, "settings": { "slidesToShow": '+this.props.slides_show_phone+', "slidesToScroll": '+this.props.slides_scroll_phone+" } } ] }","center"===this.props.layout?c='{"vertical": '+_+',"centerMode": true, "centerPadding": "'+this.props.center_padding+'", "slidesToShow": '+this.props.slides_show+', "dots": true, "arrows":true, "infinite": true, "autoplay":false, "autplaySpeed":2000, "adaptiveHeight":'+u+', "speed":'+o+', "cssEase": "'+f+'", "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": '+this.props.slides_show_tablet+'} } ,{ "breakpoint": 767, "settings": { "slidesToShow": '+this.props.slides_show_phone+"} } ] }":"sync"===this.props.layout&&(c='{"asNavFor": ".big-slider", "slidesToShow": '+this.props.slides_show+', "slidesToScroll": '+this.props.slides_scroll+', "dots": true, "arrows":true, "focusOnSelect": true, "adaptiveHeight":'+u+', "speed":'+o+', "cssEase": "'+f+'", "responsive": [ { "breakpoint": 980, "settings": { "slidesToShow": '+this.props.slides_show_tablet+', "slidesToScroll": '+this.props.slides_scroll_tablet+'} } ,{ "breakpoint": 767, "settings": { "slidesToShow": '+this.props.slides_show_phone+', "slidesToScroll": '+this.props.slides_scroll_phone+" } } ] }"),l?r.a.createElement("div",null,l.message):a?r.a.createElement("div",{className:p},"sync"===this.props.layout&&r.a.createElement("section",{class:"lwp-slick-slider slider big-slider","data-slick":'{"slidesToShow": 1, "slidesToScroll": 1, "arrows":false, "fade":true, "asNavFor":".small-slider", "adaptiveHeight":true}',ref:function(s){t.div2=s},dangerouslySetInnerHTML:{__html:n}}),r.a.createElement("section",{className:"lwp-slick-slider slider small-slider ".concat(h),"data-slick":c,ref:function(s){t.div3=s},dangerouslySetInnerHTML:{__html:n}})):r.a.createElement("div",{class:"et-fb-loader-wrapper"},r.a.createElement("div",{class:"et-fb-loader"}))}}]),e}();Object.defineProperty(h,"slug",{configurable:!0,enumerable:!0,writable:!0,value:"lwp_image_carousel"}),e.a=h},function(s,e){s.exports=React},function(s,e){s.exports=ReactDOM}]);
Note: See TracChangeset
for help on using the changeset viewer.