Version Description
Download this release
Release Info
Developer | gn_themes |
Plugin | Shortcodes Ultimate |
Version | 5.10.1 |
Comparing to | |
See all releases |
Code changes from version 5.10.0 to 5.10.1
- admin/class-shortcodes-ultimate-widget.php +87 -0
- admin/partials/widget/form.php +22 -0
- changelog.txt +8 -0
- inc/core/generator.php +49 -16
- inc/core/widget.php +0 -58
- includes/class-shortcodes-ultimate.php +12 -0
- includes/functions-helpers.php +12 -0
- includes/js/block-editor/index.js +1 -1
- includes/js/block-editor/index.js.map +1 -1
- includes/js/generator/index.js +1 -1
- includes/js/generator/index.js.map +1 -1
- includes/shortcodes/posts.php +1 -1
- includes/shortcodes/qrcode.php +35 -9
- includes/shortcodes/tooltip.php +17 -18
- languages/shortcodes-ultimate.pot +61 -60
- readme.txt +12 -4
- shortcodes-ultimate.php +2 -3
- vendor/popper/popper.min.js.map +1 -0
admin/class-shortcodes-ultimate-widget.php
ADDED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Shortcodes_Ultimate_Widget extends WP_Widget {
|
4 |
+
|
5 |
+
public static $widget_prefix;
|
6 |
+
|
7 |
+
public function __construct( $plugin_prefix = null ) {
|
8 |
+
|
9 |
+
if ( ! empty( $plugin_prefix ) ) {
|
10 |
+
self::$widget_prefix = rtrim( $plugin_prefix, '-_' );
|
11 |
+
}
|
12 |
+
|
13 |
+
$widget_ops = array(
|
14 |
+
'classname' => self::$widget_prefix,
|
15 |
+
'description' => __( 'Shortcodes Ultimate widget', 'shortcodes-ultimate' ),
|
16 |
+
);
|
17 |
+
|
18 |
+
$control_ops = array(
|
19 |
+
'width' => 300,
|
20 |
+
'height' => 350,
|
21 |
+
'id_base' => self::$widget_prefix,
|
22 |
+
);
|
23 |
+
|
24 |
+
parent::__construct(
|
25 |
+
self::$widget_prefix,
|
26 |
+
__( 'Shortcodes Ultimate', 'shortcodes-ultimate' ),
|
27 |
+
$widget_ops,
|
28 |
+
$control_ops
|
29 |
+
);
|
30 |
+
|
31 |
+
}
|
32 |
+
|
33 |
+
public function register() {
|
34 |
+
register_widget( get_class() );
|
35 |
+
}
|
36 |
+
|
37 |
+
public function widget( $args, $instance ) {
|
38 |
+
|
39 |
+
if ( empty( $instance['title'] ) && empty( $instance['content'] ) ) {
|
40 |
+
return;
|
41 |
+
}
|
42 |
+
|
43 |
+
$instance['title'] = apply_filters( 'widget_title', $instance['title'] );
|
44 |
+
|
45 |
+
if ( ! empty( $instance['title'] ) ) {
|
46 |
+
$instance['title'] = "{$args['before_title']}{$instance['title']}{$args['after_title']}";
|
47 |
+
}
|
48 |
+
|
49 |
+
if ( ! empty( $instance['content'] ) ) {
|
50 |
+
|
51 |
+
$instance['content'] = sprintf(
|
52 |
+
'<div class="textwidget">%s</div>',
|
53 |
+
do_shortcode( $instance['content'] )
|
54 |
+
);
|
55 |
+
|
56 |
+
}
|
57 |
+
|
58 |
+
// phpcs:disable
|
59 |
+
echo $args['before_widget'] . $instance['title'] . $instance['content'] . $args['after_widget'];
|
60 |
+
// phpcs:enable
|
61 |
+
|
62 |
+
}
|
63 |
+
|
64 |
+
public function update( $new_instance, $old_instance ) {
|
65 |
+
|
66 |
+
$instance = $old_instance;
|
67 |
+
$instance['title'] = wp_strip_all_tags( $new_instance['title'] );
|
68 |
+
$instance['content'] = $new_instance['content'];
|
69 |
+
|
70 |
+
return $instance;
|
71 |
+
|
72 |
+
}
|
73 |
+
|
74 |
+
public function form( $instance ) {
|
75 |
+
|
76 |
+
$defaults = array(
|
77 |
+
'title' => __( 'Shortcodes Ultimate', 'shortcodes-ultimate' ),
|
78 |
+
'content' => '',
|
79 |
+
);
|
80 |
+
|
81 |
+
$instance = wp_parse_args( (array) $instance, $defaults );
|
82 |
+
|
83 |
+
include plugin_dir_path( __FILE__ ) . 'partials/widget/form.php';
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
}
|
admin/partials/widget/form.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<p>
|
2 |
+
<label for="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>">
|
3 |
+
<?php esc_html_e( 'Title:', 'shortcodes-ultimate' ); ?>
|
4 |
+
</label>
|
5 |
+
<input
|
6 |
+
type="text"
|
7 |
+
id="<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>"
|
8 |
+
name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>"
|
9 |
+
value="<?php echo esc_attr( $instance['title'] ); ?>"
|
10 |
+
class="widefat"
|
11 |
+
/>
|
12 |
+
</p>
|
13 |
+
<p>
|
14 |
+
<?php Su_Generator::button_html_editor( array( 'target' => $this->get_field_id( 'content' ) ) ); ?><br/>
|
15 |
+
<textarea
|
16 |
+
name="<?php echo esc_attr( $this->get_field_name( 'content' ) ); ?>"
|
17 |
+
id="<?php echo esc_attr( $this->get_field_id( 'content' ) ); ?>"
|
18 |
+
rows="7"
|
19 |
+
class="widefat"
|
20 |
+
style="margin-top:10px"
|
21 |
+
><?php echo esc_textarea( $instance['content'] ); ?></textarea>
|
22 |
+
</p>
|
changelog.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
### 5.9.8
|
2 |
|
3 |
**What's new**
|
1 |
+
### 5.10.0
|
2 |
+
|
3 |
+
**What's new**
|
4 |
+
|
5 |
+
- Major update to the `su_tooltip` shortcode, now it works without jQuery migrate and has more options
|
6 |
+
- Fixed logic of the `su_user` shortcode
|
7 |
+
|
8 |
+
|
9 |
### 5.9.8
|
10 |
|
11 |
**What's new**
|
inc/core/generator.php
CHANGED
@@ -7,12 +7,12 @@ class Su_Generator {
|
|
7 |
public function __construct() {
|
8 |
add_action(
|
9 |
'media_buttons',
|
10 |
-
array( __CLASS__, '
|
11 |
1000
|
12 |
);
|
13 |
add_action(
|
14 |
'enqueue_block_editor_assets',
|
15 |
-
array( __CLASS__, '
|
16 |
);
|
17 |
|
18 |
add_action( 'wp_footer', array( __CLASS__, 'popup' ) );
|
@@ -34,10 +34,13 @@ class Su_Generator {
|
|
34 |
* @deprecated 5.1.0 Replaced with Su_Generator::classic_editor_button()
|
35 |
*/
|
36 |
public static function button( $args = array() ) {
|
37 |
-
return self::
|
38 |
}
|
39 |
-
|
40 |
public static function classic_editor_button( $args = array() ) {
|
|
|
|
|
|
|
|
|
41 |
|
42 |
if ( ! self::access_check() ) {
|
43 |
return;
|
@@ -45,12 +48,11 @@ class Su_Generator {
|
|
45 |
|
46 |
self::enqueue_generator();
|
47 |
|
48 |
-
$target = is_string( $args ) ? $args : 'content';
|
49 |
-
|
50 |
$args = wp_parse_args(
|
51 |
$args,
|
52 |
array(
|
53 |
-
'target' =>
|
|
|
54 |
'text' => __( 'Insert shortcode', 'shortcodes-ultimate' ),
|
55 |
'class' => 'button',
|
56 |
'icon' => true,
|
@@ -66,29 +68,27 @@ class Su_Generator {
|
|
66 |
}
|
67 |
|
68 |
$onclick = sprintf(
|
69 |
-
"SUG.App.insert(
|
70 |
esc_attr( $args['target'] ),
|
71 |
esc_attr( $args['shortcode'] )
|
72 |
);
|
73 |
|
74 |
$button = sprintf(
|
75 |
-
'
|
76 |
type="button"
|
|
|
77 |
class="su-generator-button %1$s"
|
78 |
title="%2$s"
|
79 |
onclick="%3$s"
|
80 |
-
>
|
81 |
-
%4$s %5$s
|
82 |
-
</button>',
|
83 |
esc_attr( $args['class'] ),
|
84 |
esc_attr( $args['text'] ),
|
85 |
$onclick,
|
86 |
$args['icon'],
|
87 |
-
esc_html( $args['text'] )
|
|
|
88 |
);
|
89 |
|
90 |
-
do_action( 'su/button', $args );
|
91 |
-
|
92 |
if ( $args['echo'] ) {
|
93 |
echo $button;
|
94 |
}
|
@@ -97,7 +97,40 @@ class Su_Generator {
|
|
97 |
|
98 |
}
|
99 |
|
100 |
-
public static function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
if ( ! self::access_check() ) {
|
103 |
return;
|
7 |
public function __construct() {
|
8 |
add_action(
|
9 |
'media_buttons',
|
10 |
+
array( __CLASS__, 'button_classic_editor' ),
|
11 |
1000
|
12 |
);
|
13 |
add_action(
|
14 |
'enqueue_block_editor_assets',
|
15 |
+
array( __CLASS__, 'button_block_editor' )
|
16 |
);
|
17 |
|
18 |
add_action( 'wp_footer', array( __CLASS__, 'popup' ) );
|
34 |
* @deprecated 5.1.0 Replaced with Su_Generator::classic_editor_button()
|
35 |
*/
|
36 |
public static function button( $args = array() ) {
|
37 |
+
return self::button_html_editor( $args );
|
38 |
}
|
|
|
39 |
public static function classic_editor_button( $args = array() ) {
|
40 |
+
return self::button_html_editor( $args );
|
41 |
+
}
|
42 |
+
|
43 |
+
public static function button_html_editor( $args = array() ) {
|
44 |
|
45 |
if ( ! self::access_check() ) {
|
46 |
return;
|
48 |
|
49 |
self::enqueue_generator();
|
50 |
|
|
|
|
|
51 |
$args = wp_parse_args(
|
52 |
$args,
|
53 |
array(
|
54 |
+
'target' => '',
|
55 |
+
'tag' => 'button',
|
56 |
'text' => __( 'Insert shortcode', 'shortcodes-ultimate' ),
|
57 |
'class' => 'button',
|
58 |
'icon' => true,
|
68 |
}
|
69 |
|
70 |
$onclick = sprintf(
|
71 |
+
"SUG.App.insert('html',{editorID:'%s',shortcode:'%s'});return false;",
|
72 |
esc_attr( $args['target'] ),
|
73 |
esc_attr( $args['shortcode'] )
|
74 |
);
|
75 |
|
76 |
$button = sprintf(
|
77 |
+
'<%6$s
|
78 |
type="button"
|
79 |
+
href="javascript:;"
|
80 |
class="su-generator-button %1$s"
|
81 |
title="%2$s"
|
82 |
onclick="%3$s"
|
83 |
+
>%4$s %5$s</%6$s>',
|
|
|
|
|
84 |
esc_attr( $args['class'] ),
|
85 |
esc_attr( $args['text'] ),
|
86 |
$onclick,
|
87 |
$args['icon'],
|
88 |
+
esc_html( $args['text'] ),
|
89 |
+
sanitize_key( $args['tag'] )
|
90 |
);
|
91 |
|
|
|
|
|
92 |
if ( $args['echo'] ) {
|
93 |
echo $button;
|
94 |
}
|
97 |
|
98 |
}
|
99 |
|
100 |
+
public static function button_classic_editor( $target ) {
|
101 |
+
|
102 |
+
if ( ! self::access_check() ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
self::enqueue_generator();
|
107 |
+
|
108 |
+
$onclick = sprintf(
|
109 |
+
"SUG.App.insert('classic',{editorID:'%s',shortcode:''});",
|
110 |
+
esc_attr( $target )
|
111 |
+
);
|
112 |
+
|
113 |
+
$icon = '<svg style="vertical-align:middle;position:relative;top:-1px;opacity:.8;width:18px;height:18px" viewBox="0 0 20 20" width="18" height="18" aria-hidden="true"><path fill="currentcolor" d="M8.48 2.75v2.5H5.25v9.5h3.23v2.5H2.75V2.75h5.73zm9.27 14.5h-5.73v-2.5h3.23v-9.5h-3.23v-2.5h5.73v14.5z"/></svg>';
|
114 |
+
|
115 |
+
$button = sprintf(
|
116 |
+
'<button
|
117 |
+
type="button"
|
118 |
+
class="su-generator-button button"
|
119 |
+
title="%1$s"
|
120 |
+
onclick="%2$s"
|
121 |
+
>
|
122 |
+
%3$s %1$s
|
123 |
+
</button>',
|
124 |
+
__( 'Insert shortcode', 'shortcodes-ultimate' ),
|
125 |
+
$onclick,
|
126 |
+
$icon
|
127 |
+
);
|
128 |
+
|
129 |
+
echo $button;
|
130 |
+
|
131 |
+
}
|
132 |
+
|
133 |
+
public static function button_block_editor() {
|
134 |
|
135 |
if ( ! self::access_check() ) {
|
136 |
return;
|
inc/core/widget.php
DELETED
@@ -1,58 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
class Su_Widget extends WP_Widget {
|
3 |
-
|
4 |
-
function __construct() {
|
5 |
-
$widget_ops = array(
|
6 |
-
'classname' => 'shortcodes-ultimate',
|
7 |
-
'description' => __( 'Shortcodes Ultimate widget', 'shortcodes-ultimate' )
|
8 |
-
);
|
9 |
-
$control_ops = array(
|
10 |
-
'width' => 300,
|
11 |
-
'height' => 350,
|
12 |
-
'id_base' => 'shortcodes-ultimate'
|
13 |
-
);
|
14 |
-
parent::__construct( 'shortcodes-ultimate', __( 'Shortcodes Ultimate', 'shortcodes-ultimate' ), $widget_ops, $control_ops );
|
15 |
-
}
|
16 |
-
|
17 |
-
public static function register() {
|
18 |
-
register_widget( 'Su_Widget' );
|
19 |
-
}
|
20 |
-
|
21 |
-
function widget( $args, $instance ) {
|
22 |
-
extract( $args );
|
23 |
-
$title = apply_filters( 'widget_title', $instance['title'] );
|
24 |
-
$content = $instance['content'];
|
25 |
-
echo $before_widget;
|
26 |
-
if ( $title ) echo $before_title . $title . $after_title;
|
27 |
-
echo '<div class="textwidget">' . do_shortcode( $content ) . '</div>';
|
28 |
-
echo $after_widget;
|
29 |
-
}
|
30 |
-
|
31 |
-
function update( $new_instance, $old_instance ) {
|
32 |
-
$instance = $old_instance;
|
33 |
-
$instance['title'] = strip_tags( $new_instance['title'] );
|
34 |
-
$instance['content'] = $new_instance['content'];
|
35 |
-
return $instance;
|
36 |
-
}
|
37 |
-
|
38 |
-
function form( $instance ) {
|
39 |
-
$defaults = array(
|
40 |
-
'title' => __( 'Shortcodes Ultimate', 'shortcodes-ultimate' ),
|
41 |
-
'content' => ''
|
42 |
-
);
|
43 |
-
$instance = wp_parse_args( ( array ) $instance, $defaults );
|
44 |
-
?>
|
45 |
-
<p>
|
46 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php _e( 'Title:', 'shortcodes-ultimate' ); ?></label>
|
47 |
-
<input type="text" id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo $this->get_field_name( 'title' ); ?>" value="<?php echo $instance['title']; ?>" class="widefat" />
|
48 |
-
</p>
|
49 |
-
<p>
|
50 |
-
<?php Su_Generator::button( array( 'target' => $this->get_field_id( 'content' ) ) ); ?><br/>
|
51 |
-
<textarea name="<?php echo $this->get_field_name( 'content' ); ?>" id="<?php echo $this->get_field_id( 'content' ); ?>" rows="7" class="widefat" style="margin-top:10px"><?php echo $instance['content']; ?></textarea>
|
52 |
-
</p>
|
53 |
-
<?php
|
54 |
-
}
|
55 |
-
|
56 |
-
}
|
57 |
-
|
58 |
-
add_action( 'widgets_init', array( 'Su_Widget', 'register' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/class-shortcodes-ultimate.php
CHANGED
@@ -154,6 +154,11 @@ class Shortcodes_Ultimate {
|
|
154 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice.php';
|
155 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice-rate.php';
|
156 |
|
|
|
|
|
|
|
|
|
|
|
157 |
/**
|
158 |
* Add Extra Shortcodes
|
159 |
*/
|
@@ -294,6 +299,13 @@ class Shortcodes_Ultimate {
|
|
294 |
add_filter( 'attachment_fields_to_edit', 'su_slide_link_input', 10, 2 );
|
295 |
add_filter( 'attachment_fields_to_save', 'su_slide_link_save', 10, 2 );
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
/**
|
298 |
* Add Extra Shortcodes
|
299 |
*/
|
154 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice.php';
|
155 |
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-notice-rate.php';
|
156 |
|
157 |
+
/**
|
158 |
+
* Register custom widget
|
159 |
+
*/
|
160 |
+
require_once $this->plugin_path . 'admin/class-shortcodes-ultimate-widget.php';
|
161 |
+
|
162 |
/**
|
163 |
* Add Extra Shortcodes
|
164 |
*/
|
299 |
add_filter( 'attachment_fields_to_edit', 'su_slide_link_input', 10, 2 );
|
300 |
add_filter( 'attachment_fields_to_save', 'su_slide_link_save', 10, 2 );
|
301 |
|
302 |
+
/**
|
303 |
+
* Register custom widget
|
304 |
+
*/
|
305 |
+
$this->widget = new Shortcodes_Ultimate_Widget( $this->plugin_prefix );
|
306 |
+
|
307 |
+
add_action( 'widgets_init', array( $this->widget, 'register' ) );
|
308 |
+
|
309 |
/**
|
310 |
* Add Extra Shortcodes
|
311 |
*/
|
includes/functions-helpers.php
CHANGED
@@ -341,3 +341,15 @@ function su_maybe_add_css_units( $value = '', $units = '' ) {
|
|
341 |
return $value;
|
342 |
|
343 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
return $value;
|
342 |
|
343 |
}
|
344 |
+
|
345 |
+
/**
|
346 |
+
* Helper to get the current page URL
|
347 |
+
* @return string Current page URL
|
348 |
+
*/
|
349 |
+
function su_get_current_url() {
|
350 |
+
|
351 |
+
$protocol = is_ssl() ? 'https' : 'http';
|
352 |
+
|
353 |
+
return esc_url( "{$protocol}://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}" );
|
354 |
+
|
355 |
+
}
|
includes/js/block-editor/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function c(i,l,u){function a(t,e){if(!l[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=l[t]={exports:{}};i[t][0].call(o.exports,function(e){return a(i[t][1][e]||e)},o,o.exports,c,i,l,u)}return l[t].exports}for(var s="function"==typeof require&&require,e=0;e<u.length;e++)a(u[e]);return a}({1:[function(e,t,r){"use strict";var n=wp.element.Fragment,o=wp.
|
2 |
//# sourceMappingURL=index.js.map
|
1 |
+
!function c(i,l,u){function a(t,e){if(!l[t]){if(!i[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(s)return s(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var o=l[t]={exports:{}};i[t][0].call(o.exports,function(e){return a(i[t][1][e]||e)},o,o.exports,c,i,l,u)}return l[t].exports}for(var s="function"==typeof require&&require,e=0;e<u.length;e++)a(u[e]);return a}({1:[function(e,t,r){"use strict";var n=wp.element.Fragment,o=wp.blockEditor.BlockControls,c=wp.components,i=c.SVG,l=c.Path;wp.hooks.addFilter("editor.BlockEdit","shortcodes-ultimate/with-insert-shortcode-button",function(t){return function(e){return-1===SUBlockEditorSettings.supportedBlocks.indexOf(e.name)?React.createElement(t,e):React.createElement(n,null,React.createElement(t,e),React.createElement(o,{controls:[{icon:React.createElement(i,{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},React.createElement(l,{d:"m3 3h5.833v2.333h-3.5v9.334h3.5v2.333h-5.833zm8.167 0h5.833v14h-5.833v-2.333h3.5v-9.334h-3.5z"})),title:SUBlockEditorL10n.insertShortcode,onClick:function(){window.SUG.App.insert("block",{props:e})}}]}))}})},{}]},{},[1]);
|
2 |
//# sourceMappingURL=index.js.map
|
includes/js/block-editor/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["includes/js/block-editor/node_modules/browser-pack/_prelude.js","includes/js/block-editor/includes/js/block-editor/src/index.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","Fragment","wp","element","BlockControls","
|
1 |
+
{"version":3,"sources":["includes/js/block-editor/node_modules/browser-pack/_prelude.js","includes/js/block-editor/includes/js/block-editor/src/index.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","Fragment","wp","element","BlockControls","blockEditor","components","SVG","Path","hooks","addFilter","BlockEdit","props","SUBlockEditorSettings","supportedBlocks","indexOf","name","React","createElement","controls","icon","viewBox","xmlns","d","title","SUBlockEditorL10n","insertShortcode","onClick","window","SUG","App","insert"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,IAAAK,EAAA,IAAAC,MAAA,uBAAAN,EAAA,KAAA,MAAAK,EAAAE,KAAA,mBAAAF,EAAA,IAAAG,EAAAX,EAAAG,GAAA,CAAAS,QAAA,IAAAb,EAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,OAAAI,EAAAH,EAAAI,GAAA,GAAAL,IAAAA,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,OAAAD,EAAAG,GAAAS,QAAA,IAAA,IAAAL,EAAA,mBAAAD,SAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,IAAA,OAAAD,EAAA,CAAA,CAAAa,EAAA,CAAA,SAAAT,EAAAU,EAAAJ,oBCEQK,EAAaC,GAAGC,QAAhBF,SACAG,EAAkBF,GAAGG,YAArBD,gBACcF,GAAGI,WAAjBC,IAAAA,IAAKC,IAAAA,KA4BbN,GAAGO,MAAMC,UACP,mBACA,mDA5BgC,SAAAC,GAChC,OAAO,SAACC,GACN,OAAmE,IAA/DC,sBAAsBC,gBAAgBC,QAAQH,EAAMI,MAC/CC,MAAAC,cAACP,EAAcC,GAItBK,MAAAC,cAACjB,EAAD,KACEgB,MAAAC,cAACP,EAAcC,GACfK,MAAAC,cAACd,EAAD,CAAee,SAAU,CACvB,CAEEC,KAAMH,MAAAC,cAACX,EAAD,CAAKc,QAAQ,YAAYC,MAAM,8BAA6BL,MAAAC,cAACV,EAAD,CAAMe,EAAE,mGAE1EC,MAAOC,kBAAkBC,gBACzBC,QAAS,WACPC,OAAOC,IAAIC,IAAIC,OAAO,QAAS,CAAEnB,MAAOA","file":"index.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()","/* global wp, SUBlockEditorSettings, SUBlockEditorL10n */\n\nconst { Fragment } = wp.element\nconst { BlockControls } = wp.blockEditor\nconst { SVG, Path } = wp.components\n\nconst withInsertShortcodeButton = BlockEdit => {\n return (props) => {\n if (SUBlockEditorSettings.supportedBlocks.indexOf(props.name) === -1) {\n return <BlockEdit {...props} />\n }\n\n return (\n <Fragment>\n <BlockEdit {...props} />\n <BlockControls controls={[\n {\n /* eslint-disable react/jsx-pascal-case */\n icon: <SVG viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'><Path d='m3 3h5.833v2.333h-3.5v9.334h3.5v2.333h-5.833zm8.167 0h5.833v14h-5.833v-2.333h3.5v-9.334h-3.5z' /></SVG>,\n /* eslint-disable react/jsx-pascal-case */\n title: SUBlockEditorL10n.insertShortcode,\n onClick: () => {\n window.SUG.App.insert('block', { props: props })\n }\n }\n ]}\n />\n </Fragment>\n )\n }\n}\n\nwp.hooks.addFilter(\n 'editor.BlockEdit',\n 'shortcodes-ultimate/with-insert-shortcode-button',\n withInsertShortcodeButton\n)\n"]}
|
includes/js/generator/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function s(o,i,u){function c(t,e){if(!i[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=i[t]={exports:{}};o[t][0].call(a.exports,function(e){return c(o[t][1][e]||e)},a,a.exports,s,o,i,u)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,r){"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var p,o,i,u,n,c,l,g,d,a,f,h;window.SUG={},window.SUG.App=(p=jQuery,o=p("#su-generator"),i=p("#su-generator-search"),u=p("#su-generator-filter"),n=u.children("a"),c=p("#su-generator-choices"),l=c.find("span"),g=p("#su-generator-settings"),d=p("#su-compatibility-mode-prefix"),a=p("#su-generator-result"),f=p("#su-generator-selected"),(h={state:{mceSelection:"",target:"",wpActiveEditor:null,context:"",insertArgs:"",preview:{timer:null,request:null}}}).el={body:p("body")},h.init=function(){var a;n.click(function(e){var t=p(this).data("filter");if("all"===t)l.css({opacity:1}).removeClass("su-generator-choice-first");else{var r=new RegExp(t,"gi");l.css({opacity:.2}),l.each(function(){null!==p(this).data("group").match(r)&&p(this).css({opacity:1}).removeClass("su-generator-choice-first")})}e.preventDefault()}),p("#su-generator").on("click",".su-generator-home",function(e){i.val(""),g.html("").hide(),o.removeClass("su-generator-narrow"),u.show(),c.show(),l.show(),h.state.mceSelection="",i.focus(),e.preventDefault()}),p("#su-generator").on("click",".su-generator-close",function(e){p.magnificPopup.close(),e.preventDefault()}),i.on({focus:function(){p(this).val(""),g.html("").hide(),o.removeClass("su-generator-narrow"),c.show(),l.css({opacity:1}).removeClass("su-generator-choice-first"),u.show()},blur:function(){},keyup:function(e){var t=p(".su-generator-choice-first:first"),n=p(this).val(),a=new RegExp(n,"gi"),s=0;13===e.keyCode&&0<t.length&&(e.preventDefault(),p(this).val("").blur(),t.trigger("click")),l.css({opacity:.2}).removeClass("su-generator-choice-first"),l.each(function(){var e=p(this).data(),t=e.shortcode,r=[t,e.name,e.desc,e.group].join(" ").match(a);null!==r&&(p(this).css({opacity:1}),n===t?(l.removeClass("su-generator-choice-first"),p(this).addClass("su-generator-choice-first"),s=999):r.length>s&&(l.removeClass("su-generator-choice-first"),p(this).addClass("su-generator-choice-first"),s=r.length))}),""===n&&l.removeClass("su-generator-choice-first")}}),l.on("click",function(e){var r=p(this).data("shortcode");p.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_settings",shortcode:r},beforeSend:function(){p("#su-generator-preview").hide(),c.hide(),g.addClass("su-generator-loading").show(),o.addClass("su-generator-narrow"),u.hide()},success:function(e){g.removeClass("su-generator-loading"),g.html(e);var t=p("#su-generator-content");void 0!==h.state.mceSelection&&""!==h.state.mceSelection&&"hidden"!==t.attr("type")&&t.val(h.state.mceSelection),p(".su-generator-range-picker").each(function(e){var t=p(this).find("input"),r=t.attr("min"),n=t.attr("max"),a=t.attr("step");t.simpleSlider({snap:!0,step:a,range:[r,n]}),t.show(),t.on("keyup blur",function(e){t.simpleSlider("setValue",t.val())})}),p(".su-generator-select-color").each(function(e){p(this).find(".su-generator-select-color-wheel").filter(":first").farbtastic(".su-generator-select-color-value:eq("+e+")"),p(this).find(".su-generator-select-color-value").focus(function(){p(".su-generator-select-color-wheel:eq("+e+")").show()}),p(this).find(".su-generator-select-color-value").blur(function(){p(".su-generator-select-color-wheel:eq("+e+")").hide()})}),p(".su-generator-isp").each(function(){function n(){var e="none",t="",r=i.val();if("media"===r){var n=[];u.find("span").each(function(e){n[e]=p(this).data("id")}),0<n.length&&(t=n.join(","))}else if("category"===r){var a=c.val()||[];0<a.length&&(t=a.join(","))}else if("taxonomy"===r){var s=l.val()||"",o=g.val()||[];"0"!==s&&0<o.length&&(e="taxonomy: "+s+"/"+o.join(","))}else e="0"===r?"none":r;""!==t&&(e=r+": "+t),d.val(e).trigger("change")}var t,r=p(this),i=r.find(".su-generator-isp-sources"),a=r.find(".su-generator-isp-source"),e=r.find(".su-generator-isp-add-media"),u=r.find(".su-generator-isp-images"),c=r.find(".su-generator-isp-categories"),l=r.find(".su-generator-isp-taxonomies"),g=p(".su-generator-isp-terms"),d=r.find(".su-generator-attr");i.on("change",function(e){var t=p(this).val();e.preventDefault(),a.removeClass("su-generator-isp-source-open"),-1===t.indexOf(":")&&r.find(".su-generator-isp-source-"+t).addClass("su-generator-isp-source-open"),n()}),u.on("click","span i",function(){p(this).parent("span").css("border-color","#f03").fadeOut(300,function(){p(this).remove(),n()})}),e.click(function(e){e.preventDefault(),void 0!==t&&t.close(),(t=wp.media.frames.su_media_frame_1=wp.media({title:SUGL10n.isp_media_title,library:{type:"image"},button:{text:SUGL10n.isp_media_insert},multiple:!0})).on("open",function(){p(".mfp-wrap").addClass("hidden")}),t.on("close",function(){p(".mfp-wrap").removeClass("hidden")}),t.on("select",function(){var e=t.state().get("selection").toJSON();u.find("em").remove(),p.each(e,function(e){u.append('<span data-id="'+this.id+'" title="'+this.title+'"><img src="'+this.url+'" alt="" /><i class="sui sui-times"></i></span>')}),n()}).open()}),u.sortable({revert:200,containment:r,tolerance:"pointer",stop:function(){n()}}),c.on("change",n),g.on("change",n),l.on("change",function(){var t=p(this).parents(".su-generator-isp-source"),e=p(this).val();if(g.hide().find("option").remove(),n(),"0"!==e)var r=p.ajax({url:ajaxurl,type:"post",dataType:"html",data:{action:"su_generator_get_terms",tax:e,class:"su-generator-isp-terms",multiple:!0,size:10},beforeSend:function(){"object"===s(r)&&r.abort(),g.html("").attr("disabled",!0).hide(),t.addClass("su-generator-loading")},success:function(e){g.html(e).attr("disabled",!1).show(),t.removeClass("su-generator-loading")}})})}),p(".su-generator-upload-button").each(function(){var t,e=p(this),r=p(this).parents(".su-generator-attr-container").find("input:text");e.on("click",function(e){e.preventDefault(),e.stopPropagation(),void 0!==t&&t.close(),(t=wp.media.frames.su_media_frame_2=wp.media({title:SUGL10n.upload_title,button:{text:SUGL10n.upload_insert},multiple:!1})).on("select",function(){var e=t.state().get("selection").first().toJSON();r.val(e.url).trigger("change")}),t.on("open",function(){p(".mfp-wrap").addClass("hidden")}),t.on("close",function(){p(".mfp-wrap").removeClass("hidden")}),t.open()})}),p(".su-generator-icon-picker-button").each(function(){var e=p(this),t=p(this).parents(".su-generator-attr-container"),n=t.find(".su-generator-attr"),a=t.find(".su-generator-icon-picker"),s=a.find("input:text");e.click(function(e){a.toggleClass("su-generator-icon-picker-visible"),s.val("").trigger("keyup"),a.hasClass("su-generator-icon-picker-loaded")||(p.ajax({type:"post",url:ajaxurl,data:{action:"su_generator_get_icons"},dataType:"html",beforeSend:function(){a.addClass("su-generator-loading"),a.addClass("su-generator-icon-picker-loaded")},success:function(e){a.append(e);var r=a.children("i");r.click(function(e){n.val("icon: "+p(this).attr("title")),a.removeClass("su-generator-icon-picker-visible"),n.trigger("change"),e.preventDefault()}),s.on({keyup:function(){var e=p(this).val(),t=new RegExp(e,"gi");r.hide(),r.each(function(){null!==p(this).attr("title").match(t)&&p(this).show()})},focus:function(){p(this).val(""),r.show()}}),a.removeClass("su-generator-loading")}}),e.preventDefault())})}),p(".su-generator-switch").click(function(e){var t=p(this).parent().children("input");"yes"===t.val()?t.val("no").trigger("change"):t.val("yes").trigger("change"),e.preventDefault()}),p(".su-generator-switch-value").on("change",function(){var e=p(this),t=e.parent().children(".su-generator-switch"),r=e.val();"yes"===r?t.removeClass("su-generator-switch-no").addClass("su-generator-switch-yes"):"no"===r&&t.removeClass("su-generator-switch-yes").addClass("su-generator-switch-no")}),p("select#su-generator-attr-taxonomy").on("change",function(){var e=p(this).val(),t=p("select#su-generator-attr-tax_term");window.su_generator_get_terms=p.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_get_terms",tax:e,noselect:!0},dataType:"html",beforeSend:function(){"object"===s(window.su_generator_get_terms)&&window.su_generator_get_terms.abort(),t.parent().addClass("su-generator-loading")},success:function(e){t.find("option").remove(),t.append(e),t.parent().removeClass("su-generator-loading")}})}),p(".su-generator-shadow-picker").each(function(e){var t=p(this),r=t.find(".su-generator-shadow-picker-field input"),n=t.find(".su-generator-sp-hoff"),a=t.find(".su-generator-sp-voff"),s=t.find(".su-generator-sp-blur"),o={cnt:t.find(".su-generator-shadow-picker-color"),value:t.find(".su-generator-shadow-picker-color-value"),wheel:t.find(".su-generator-shadow-picker-color-wheel")},i=t.find(".su-generator-attr");o.wheel.farbtastic(o.value),o.value.focus(function(){o.wheel.show()}),o.value.blur(function(){o.wheel.hide()}),r.on("change blur keyup",function(){i.val(n.val()+"px "+a.val()+"px "+s.val()+"px "+o.value.val()).trigger("change")}),i.on("keyup",function(){var e=p(this).val().split(" ");4===e.length&&(n.val(e[0].replace("px","")),a.val(e[1].replace("px","")),s.val(e[2].replace("px","")),o.value.val(e[3]),r.trigger("keyup"))})}),p(".su-generator-border-picker").each(function(e){var t=p(this),r=t.find(".su-generator-border-picker-field input, .su-generator-border-picker-field select"),n=t.find(".su-generator-bp-width"),a=t.find(".su-generator-bp-style"),s={cnt:t.find(".su-generator-border-picker-color"),value:t.find(".su-generator-border-picker-color-value"),wheel:t.find(".su-generator-border-picker-color-wheel")},o=t.find(".su-generator-attr");s.wheel.farbtastic(s.value),s.value.focus(function(){s.wheel.show()}),s.value.blur(function(){s.wheel.hide()}),r.on("change blur keyup",function(){o.val(n.val()+"px "+a.val()+" "+s.value.val()).trigger("change")}),o.on("keyup",function(){var e=p(this).val().split(" ");3===e.length&&(n.val(e[0].replace("px","")),a.val(e[1]),s.value.val(e[2]),r.trigger("keyup"))})}),g.find(".su-generator-attr").on("change keyup blur",function(){var e=p(this).parents(".su-generator-attr-container"),t=e.data("default");p(this).val()!=t?e.removeClass("su-generator-skip"):e.addClass("su-generator-skip")}),p(".su-generator-set-value").click(function(e){p(this).parents(".su-generator-attr-container").find("input").val(p(this).text()).trigger("change")}),f.val(r),p.ajax({type:"GET",url:ajaxurl,data:{action:"su_generator_get_preset",id:"last_used",shortcode:r},beforeSend:function(){},success:function(e){h.setSettings(e);var t=p("#su-generator-content");void 0!==h.state.mceSelection&&""!==h.state.mceSelection&&"hidden"!==t.attr("type")&&t.val(h.state.mceSelection)},dataType:"json"})},dataType:"html"})}),p("#su-generator").on("click",".su-generator-insert",h.insertShortcode),p("#su-generator").on("click",".su-generator-toggle-preview",function(e){var t=p("#su-generator-preview");p(this).hide(),t.addClass("su-generator-loading").show(),g.find("input, textarea, select").on("change keyup blur",function(){h.updatePreview()}),h.updatePreview(!0),e.preventDefault()}),p("#su-generator").on("mouseenter click",".su-generator-presets",function(){clearTimeout(a),p(".su-gp-popup").show()}),p("#su-generator").on("mouseleave",".su-generator-presets",function(){a=window.setTimeout(function(){p(".su-gp-popup").fadeOut(200)},600)}),p("#su-generator").on("click",".su-gp-new",function(e){p(this).parents(".su-generator-presets");var t=p(".su-gp-list"),r=(new Date).getTime(),n=prompt(SUGL10n.presets_prompt_msg,SUGL10n.presets_prompt_value);""!==n&&null!==n&&(t.find("b").hide(),t.append('<span data-id="'+r+'"><em>'+n+'</em><i class="sui sui-times"></i></span>'),h.addPreset(r,n))}),p("#su-generator").on("click",".su-gp-list span",function(e){var t=p(".su-generator-presets").data("shortcode"),r=p(this).data("id"),n=p(".su-generator-insert");p(".su-gp-popup").hide(),clearTimeout(a),p.ajax({type:"GET",url:ajaxurl,data:{action:"su_generator_get_preset",id:r,shortcode:t},beforeSend:function(){n.addClass("button-primary-disabled").attr("disabled",!0)},success:function(e){n.removeClass("button-primary-disabled").attr("disabled",!1),h.setSettings(e)},dataType:"json"}),e.preventDefault(),e.stopPropagation()}),p("#su-generator").on("click",".su-gp-list i",function(e){var t=p(this).parents(".su-gp-list"),r=p(this).parent("span"),n=r.data("id");r.remove(),t.find("span").length<1&&t.find("b").show(),h.removePreset(n),e.stopPropagation(),e.preventDefault()})},h.addPreset=function(e,t){var r=p(".su-generator-presets").data("shortcode"),n=h.getSettings();p.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_add_preset",id:e,name:t,shortcode:r,settings:n}})},h.removePreset=function(e){var t=p(".su-generator-presets").data("shortcode");p.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_remove_preset",id:e,shortcode:t}})},h.parseSettings=function(){var e="on"===p("#su-generator-option-skip").val()?"#su-generator-settings .su-generator-attr-container:not(.su-generator-skip) .su-generator-attr":"#su-generator-settings .su-generator-attr-container .su-generator-attr",t=f.val(),r=d.val(),n=p(e),a=p("textarea#su-generator-content"),s=a.length?a.val():"false",o=new String("");return o+="["+r+t,n.each(function(){var e=p(this),t="";null==(t=e.is("select")?e.find("option:selected").val():e.val())?t="":"array"==typeof t&&(t=t.join(",")),""!==t&&(o+=" "+p(this).attr("name")+'="'+p(this).val().toString().replace(/"/gi,"'")+'"')}),o+="]","false"!=s&&(o+=s+"[/"+r+t+"]"),o},h.getSettings=function(){f.val();var e=p("#su-generator-settings .su-generator-attr"),t=p("textarea#su-generator-content"),r=t.length?t.val():"false",a={};return e.each(function(e){var t=p(this),r="",n=t.attr("name");null==(r=t.is("select")?t.find("option:selected").val():t.val())&&(r=""),a[n]=r}),a.content=r.toString(),a},h.setSettings=function(r){var e=p("#su-generator-settings .su-generator-attr"),t=p("#su-generator-content");e.each(function(){var e=p(this),t=e.attr("name");r.hasOwnProperty(t)&&(e.val(r[t]),e.trigger("keyup").trigger("change").trigger("blur"))}),r.hasOwnProperty("content")&&t.val(r.content).trigger("keyup").trigger("change").trigger("blur"),h.updatePreview()},h.updatePreview=function(e){var t=p("#su-generator-preview"),r=h.parseSettings(),n=a.text();e=e||!1,t.is(":visible")&&(r===n&&!e||(window.clearTimeout(h.state.preview.timer),h.state.preview.timer=window.setTimeout(function(){h.state.preview.request=p.ajax({type:"POST",url:ajaxurl,cache:!1,data:{action:"su_generator_preview",shortcode:r},beforeSend:function(){h.state.preview.request&&h.state.preview.request.abort(),t.addClass("su-generator-loading").html("")},success:function(e){t.html(e).removeClass("su-generator-loading")},dataType:"html"})},300),a.text(r)))},h.insert=function(e,t){if("string"==typeof e&&"object"===s(t)){h.state.context=e;var r=(h.state.insertArgs=t).shortcode||"",n={type:"inline",alignTop:!0,closeOnBgClick:!1,mainClass:"su-generator-mfp",items:{src:"#su-generator"},callbacks:{}};n.callbacks.open=function(){r?l.filter('[data-shortcode="'.concat(r,'"]')).trigger("click"):window.setTimeout(function(){return i.focus()},200),"undefined"!=typeof tinyMCE&&null!=tinyMCE.activeEditor&&tinyMCE.activeEditor.hasOwnProperty("selection")&&(h.state.mceSelection=tinyMCE.activeEditor.selection.getContent({format:"text"}))},n.callbacks.close=function(){i.val(""),g.html("").hide(),o.removeClass("su-generator-narrow"),u.show(),c.show(),l.show(),h.state.mceSelection=""},p.magnificPopup.open(n)}},h.insertShortcode=function(){var e=h.parseSettings();if(h.addPreset("last_used",SUGL10n.last_used),p.magnificPopup.close(),a.text(e),"classic"===h.state.context)h.state.wpActiveEditor=window.wpActiveEditor,window.wpActiveEditor=h.state.insertArgs.editorID,window.wp.media.editor.insert(e),window.wpActiveEditor=h.state.wpActiveEditor;else if("block"===h.state.context){var t=h.state.insertArgs.props;if(t.attributes.hasOwnProperty("content"))t.setAttributes({content:t.attributes.content+e});else if("core/shortcode"===t.name){var r=t.attributes.hasOwnProperty("text")?t.attributes.text:"";t.setAttributes({text:r+e})}}},h.insertAtCaret=function(e,t){var r=e.selectionStart;e.selectionEnd,e.value=e.value.substring(0,r)+t+e.value.substring(r),e.focus(),e.selectionStart=r+t.length},{init:h.init,insert:h.insert}),jQuery(document).ready(window.SUG.App.init)},{}]},{},[1]);
|
2 |
//# sourceMappingURL=index.js.map
|
1 |
+
!function s(o,i,u){function c(t,e){if(!i[t]){if(!o[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(l)return l(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=i[t]={exports:{}};o[t][0].call(a.exports,function(e){return c(o[t][1][e]||e)},a,a.exports,s,o,i,u)}return i[t].exports}for(var l="function"==typeof require&&require,e=0;e<u.length;e++)c(u[e]);return c}({1:[function(e,t,r){"use strict";function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var d,o,i,u,n,c,l,g,p,a,f,h;window.SUG={},window.SUG.App=(d=jQuery,o=d("#su-generator"),i=d("#su-generator-search"),u=d("#su-generator-filter"),n=u.children("a"),c=d("#su-generator-choices"),l=c.find("span"),g=d("#su-generator-settings"),p=d("#su-compatibility-mode-prefix"),a=d("#su-generator-result"),f=d("#su-generator-selected"),(h={state:{mceSelection:"",target:"",wpActiveEditor:null,context:"",insertArgs:"",preview:{timer:null,request:null}}}).el={body:d("body")},h.init=function(){var a;n.click(function(e){var t=d(this).data("filter");if("all"===t)l.css({opacity:1}).removeClass("su-generator-choice-first");else{var r=new RegExp(t,"gi");l.css({opacity:.2}),l.each(function(){null!==d(this).data("group").match(r)&&d(this).css({opacity:1}).removeClass("su-generator-choice-first")})}e.preventDefault()}),d("#su-generator").on("click",".su-generator-home",function(e){i.val(""),g.html("").hide(),o.removeClass("su-generator-narrow"),u.show(),c.show(),l.show(),h.state.mceSelection="",i.focus(),e.preventDefault()}),d("#su-generator").on("click",".su-generator-close",function(e){d.magnificPopup.close(),e.preventDefault()}),i.on({focus:function(){d(this).val(""),g.html("").hide(),o.removeClass("su-generator-narrow"),c.show(),l.css({opacity:1}).removeClass("su-generator-choice-first"),u.show()},blur:function(){},keyup:function(e){var t=d(".su-generator-choice-first:first"),n=d(this).val(),a=new RegExp(n,"gi"),s=0;13===e.keyCode&&0<t.length&&(e.preventDefault(),d(this).val("").blur(),t.trigger("click")),l.css({opacity:.2}).removeClass("su-generator-choice-first"),l.each(function(){var e=d(this).data(),t=e.shortcode,r=[t,e.name,e.desc,e.group].join(" ").match(a);null!==r&&(d(this).css({opacity:1}),n===t?(l.removeClass("su-generator-choice-first"),d(this).addClass("su-generator-choice-first"),s=999):r.length>s&&(l.removeClass("su-generator-choice-first"),d(this).addClass("su-generator-choice-first"),s=r.length))}),""===n&&l.removeClass("su-generator-choice-first")}}),l.on("click",function(e){var r=d(this).data("shortcode");d.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_settings",shortcode:r},beforeSend:function(){d("#su-generator-preview").hide(),c.hide(),g.addClass("su-generator-loading").show(),o.addClass("su-generator-narrow"),u.hide()},success:function(e){g.removeClass("su-generator-loading"),g.html(e);var t=d("#su-generator-content");void 0!==h.state.mceSelection&&""!==h.state.mceSelection&&"hidden"!==t.attr("type")&&t.val(h.state.mceSelection),d(".su-generator-range-picker").each(function(e){var t=d(this).find("input"),r=t.attr("min"),n=t.attr("max"),a=t.attr("step");t.simpleSlider({snap:!0,step:a,range:[r,n]}),t.show(),t.on("keyup blur",function(e){t.simpleSlider("setValue",t.val())})}),d(".su-generator-select-color").each(function(e){d(this).find(".su-generator-select-color-wheel").filter(":first").farbtastic(".su-generator-select-color-value:eq("+e+")"),d(this).find(".su-generator-select-color-value").focus(function(){d(".su-generator-select-color-wheel:eq("+e+")").show()}),d(this).find(".su-generator-select-color-value").blur(function(){d(".su-generator-select-color-wheel:eq("+e+")").hide()})}),d(".su-generator-isp").each(function(){function n(){var e="none",t="",r=i.val();if("media"===r){var n=[];u.find("span").each(function(e){n[e]=d(this).data("id")}),0<n.length&&(t=n.join(","))}else if("category"===r){var a=c.val()||[];0<a.length&&(t=a.join(","))}else if("taxonomy"===r){var s=l.val()||"",o=g.val()||[];"0"!==s&&0<o.length&&(e="taxonomy: "+s+"/"+o.join(","))}else e="0"===r?"none":r;""!==t&&(e=r+": "+t),p.val(e).trigger("change")}var t,r=d(this),i=r.find(".su-generator-isp-sources"),a=r.find(".su-generator-isp-source"),e=r.find(".su-generator-isp-add-media"),u=r.find(".su-generator-isp-images"),c=r.find(".su-generator-isp-categories"),l=r.find(".su-generator-isp-taxonomies"),g=d(".su-generator-isp-terms"),p=r.find(".su-generator-attr");i.on("change",function(e){var t=d(this).val();e.preventDefault(),a.removeClass("su-generator-isp-source-open"),-1===t.indexOf(":")&&r.find(".su-generator-isp-source-"+t).addClass("su-generator-isp-source-open"),n()}),u.on("click","span i",function(){d(this).parent("span").css("border-color","#f03").fadeOut(300,function(){d(this).remove(),n()})}),e.click(function(e){e.preventDefault(),void 0!==t&&t.close(),(t=wp.media.frames.su_media_frame_1=wp.media({title:SUGL10n.isp_media_title,library:{type:"image"},button:{text:SUGL10n.isp_media_insert},multiple:!0})).on("open",function(){d(".mfp-wrap").addClass("hidden")}),t.on("close",function(){d(".mfp-wrap").removeClass("hidden")}),t.on("select",function(){var e=t.state().get("selection").toJSON();u.find("em").remove(),d.each(e,function(e){u.append('<span data-id="'+this.id+'" title="'+this.title+'"><img src="'+this.url+'" alt="" /><i class="sui sui-times"></i></span>')}),n()}).open()}),u.sortable({revert:200,containment:r,tolerance:"pointer",stop:function(){n()}}),c.on("change",n),g.on("change",n),l.on("change",function(){var t=d(this).parents(".su-generator-isp-source"),e=d(this).val();if(g.hide().find("option").remove(),n(),"0"!==e)var r=d.ajax({url:ajaxurl,type:"post",dataType:"html",data:{action:"su_generator_get_terms",tax:e,class:"su-generator-isp-terms",multiple:!0,size:10},beforeSend:function(){"object"===s(r)&&r.abort(),g.html("").attr("disabled",!0).hide(),t.addClass("su-generator-loading")},success:function(e){g.html(e).attr("disabled",!1).show(),t.removeClass("su-generator-loading")}})})}),d(".su-generator-upload-button").each(function(){var t,e=d(this),r=d(this).parents(".su-generator-attr-container").find("input:text");e.on("click",function(e){e.preventDefault(),e.stopPropagation(),void 0!==t&&t.close(),(t=wp.media.frames.su_media_frame_2=wp.media({title:SUGL10n.upload_title,button:{text:SUGL10n.upload_insert},multiple:!1})).on("select",function(){var e=t.state().get("selection").first().toJSON();r.val(e.url).trigger("change")}),t.on("open",function(){d(".mfp-wrap").addClass("hidden")}),t.on("close",function(){d(".mfp-wrap").removeClass("hidden")}),t.open()})}),d(".su-generator-icon-picker-button").each(function(){var e=d(this),t=d(this).parents(".su-generator-attr-container"),n=t.find(".su-generator-attr"),a=t.find(".su-generator-icon-picker"),s=a.find("input:text");e.click(function(e){a.toggleClass("su-generator-icon-picker-visible"),s.val("").trigger("keyup"),a.hasClass("su-generator-icon-picker-loaded")||(d.ajax({type:"post",url:ajaxurl,data:{action:"su_generator_get_icons"},dataType:"html",beforeSend:function(){a.addClass("su-generator-loading"),a.addClass("su-generator-icon-picker-loaded")},success:function(e){a.append(e);var r=a.children("i");r.click(function(e){n.val("icon: "+d(this).attr("title")),a.removeClass("su-generator-icon-picker-visible"),n.trigger("change"),e.preventDefault()}),s.on({keyup:function(){var e=d(this).val(),t=new RegExp(e,"gi");r.hide(),r.each(function(){null!==d(this).attr("title").match(t)&&d(this).show()})},focus:function(){d(this).val(""),r.show()}}),a.removeClass("su-generator-loading")}}),e.preventDefault())})}),d(".su-generator-switch").click(function(e){var t=d(this).parent().children("input");"yes"===t.val()?t.val("no").trigger("change"):t.val("yes").trigger("change"),e.preventDefault()}),d(".su-generator-switch-value").on("change",function(){var e=d(this),t=e.parent().children(".su-generator-switch"),r=e.val();"yes"===r?t.removeClass("su-generator-switch-no").addClass("su-generator-switch-yes"):"no"===r&&t.removeClass("su-generator-switch-yes").addClass("su-generator-switch-no")}),d("select#su-generator-attr-taxonomy").on("change",function(){var e=d(this).val(),t=d("select#su-generator-attr-tax_term");window.su_generator_get_terms=d.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_get_terms",tax:e,noselect:!0},dataType:"html",beforeSend:function(){"object"===s(window.su_generator_get_terms)&&window.su_generator_get_terms.abort(),t.parent().addClass("su-generator-loading")},success:function(e){t.find("option").remove(),t.append(e),t.parent().removeClass("su-generator-loading")}})}),d(".su-generator-shadow-picker").each(function(e){var t=d(this),r=t.find(".su-generator-shadow-picker-field input"),n=t.find(".su-generator-sp-hoff"),a=t.find(".su-generator-sp-voff"),s=t.find(".su-generator-sp-blur"),o={cnt:t.find(".su-generator-shadow-picker-color"),value:t.find(".su-generator-shadow-picker-color-value"),wheel:t.find(".su-generator-shadow-picker-color-wheel")},i=t.find(".su-generator-attr");o.wheel.farbtastic(o.value),o.value.focus(function(){o.wheel.show()}),o.value.blur(function(){o.wheel.hide()}),r.on("change blur keyup",function(){i.val(n.val()+"px "+a.val()+"px "+s.val()+"px "+o.value.val()).trigger("change")}),i.on("keyup",function(){var e=d(this).val().split(" ");4===e.length&&(n.val(e[0].replace("px","")),a.val(e[1].replace("px","")),s.val(e[2].replace("px","")),o.value.val(e[3]),r.trigger("keyup"))})}),d(".su-generator-border-picker").each(function(e){var t=d(this),r=t.find(".su-generator-border-picker-field input, .su-generator-border-picker-field select"),n=t.find(".su-generator-bp-width"),a=t.find(".su-generator-bp-style"),s={cnt:t.find(".su-generator-border-picker-color"),value:t.find(".su-generator-border-picker-color-value"),wheel:t.find(".su-generator-border-picker-color-wheel")},o=t.find(".su-generator-attr");s.wheel.farbtastic(s.value),s.value.focus(function(){s.wheel.show()}),s.value.blur(function(){s.wheel.hide()}),r.on("change blur keyup",function(){o.val(n.val()+"px "+a.val()+" "+s.value.val()).trigger("change")}),o.on("keyup",function(){var e=d(this).val().split(" ");3===e.length&&(n.val(e[0].replace("px","")),a.val(e[1]),s.value.val(e[2]),r.trigger("keyup"))})}),g.find(".su-generator-attr").on("change keyup blur",function(){var e=d(this).parents(".su-generator-attr-container"),t=e.data("default");d(this).val()!=t?e.removeClass("su-generator-skip"):e.addClass("su-generator-skip")}),d(".su-generator-set-value").click(function(e){d(this).parents(".su-generator-attr-container").find("input").val(d(this).text()).trigger("change")}),f.val(r),d.ajax({type:"GET",url:ajaxurl,data:{action:"su_generator_get_preset",id:"last_used",shortcode:r},beforeSend:function(){},success:function(e){h.setSettings(e);var t=d("#su-generator-content");void 0!==h.state.mceSelection&&""!==h.state.mceSelection&&"hidden"!==t.attr("type")&&t.val(h.state.mceSelection)},dataType:"json"})},dataType:"html"})}),d("#su-generator").on("click",".su-generator-insert",h.insertShortcode),d("#su-generator").on("click",".su-generator-toggle-preview",function(e){var t=d("#su-generator-preview");d(this).hide(),t.addClass("su-generator-loading").show(),g.find("input, textarea, select").on("change keyup blur",function(){h.updatePreview()}),h.updatePreview(!0),e.preventDefault()}),d("#su-generator").on("mouseenter click",".su-generator-presets",function(){clearTimeout(a),d(".su-gp-popup").show()}),d("#su-generator").on("mouseleave",".su-generator-presets",function(){a=window.setTimeout(function(){d(".su-gp-popup").fadeOut(200)},600)}),d("#su-generator").on("click",".su-gp-new",function(e){d(this).parents(".su-generator-presets");var t=d(".su-gp-list"),r=(new Date).getTime(),n=prompt(SUGL10n.presets_prompt_msg,SUGL10n.presets_prompt_value);""!==n&&null!==n&&(t.find("b").hide(),t.append('<span data-id="'+r+'"><em>'+n+'</em><i class="sui sui-times"></i></span>'),h.addPreset(r,n))}),d("#su-generator").on("click",".su-gp-list span",function(e){var t=d(".su-generator-presets").data("shortcode"),r=d(this).data("id"),n=d(".su-generator-insert");d(".su-gp-popup").hide(),clearTimeout(a),d.ajax({type:"GET",url:ajaxurl,data:{action:"su_generator_get_preset",id:r,shortcode:t},beforeSend:function(){n.addClass("button-primary-disabled").attr("disabled",!0)},success:function(e){n.removeClass("button-primary-disabled").attr("disabled",!1),h.setSettings(e)},dataType:"json"}),e.preventDefault(),e.stopPropagation()}),d("#su-generator").on("click",".su-gp-list i",function(e){var t=d(this).parents(".su-gp-list"),r=d(this).parent("span"),n=r.data("id");r.remove(),t.find("span").length<1&&t.find("b").show(),h.removePreset(n),e.stopPropagation(),e.preventDefault()})},h.addPreset=function(e,t){var r=d(".su-generator-presets").data("shortcode"),n=h.getSettings();d.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_add_preset",id:e,name:t,shortcode:r,settings:n}})},h.removePreset=function(e){var t=d(".su-generator-presets").data("shortcode");d.ajax({type:"POST",url:ajaxurl,data:{action:"su_generator_remove_preset",id:e,shortcode:t}})},h.parseSettings=function(){var e="on"===d("#su-generator-option-skip").val()?"#su-generator-settings .su-generator-attr-container:not(.su-generator-skip) .su-generator-attr":"#su-generator-settings .su-generator-attr-container .su-generator-attr",t=f.val(),r=p.val(),n=d(e),a=d("textarea#su-generator-content"),s=a.length?a.val():"false",o=new String("");return o+="["+r+t,n.each(function(){var e=d(this),t="";null==(t=e.is("select")?e.find("option:selected").val():e.val())?t="":"array"==typeof t&&(t=t.join(",")),""!==t&&(o+=" "+d(this).attr("name")+'="'+d(this).val().toString().replace(/"/gi,"'")+'"')}),o+="]","false"!=s&&(o+=s+"[/"+r+t+"]"),o},h.getSettings=function(){f.val();var e=d("#su-generator-settings .su-generator-attr"),t=d("textarea#su-generator-content"),r=t.length?t.val():"false",a={};return e.each(function(e){var t=d(this),r="",n=t.attr("name");null==(r=t.is("select")?t.find("option:selected").val():t.val())&&(r=""),a[n]=r}),a.content=r.toString(),a},h.setSettings=function(r){var e=d("#su-generator-settings .su-generator-attr"),t=d("#su-generator-content");e.each(function(){var e=d(this),t=e.attr("name");r.hasOwnProperty(t)&&(e.val(r[t]),e.trigger("keyup").trigger("change").trigger("blur"))}),r.hasOwnProperty("content")&&t.val(r.content).trigger("keyup").trigger("change").trigger("blur"),h.updatePreview()},h.updatePreview=function(e){var t=d("#su-generator-preview"),r=h.parseSettings(),n=a.text();e=e||!1,t.is(":visible")&&(r===n&&!e||(window.clearTimeout(h.state.preview.timer),h.state.preview.timer=window.setTimeout(function(){h.state.preview.request=d.ajax({type:"POST",url:ajaxurl,cache:!1,data:{action:"su_generator_preview",shortcode:r},beforeSend:function(){h.state.preview.request&&h.state.preview.request.abort(),t.addClass("su-generator-loading").html("")},success:function(e){t.html(e).removeClass("su-generator-loading")},dataType:"html"})},300),a.text(r)))},h.insert=function(e,t){if("string"==typeof e&&"object"===s(t)){h.state.context=e;var r=(h.state.insertArgs=t).shortcode||"",n={type:"inline",alignTop:!0,closeOnBgClick:!1,mainClass:"su-generator-mfp",items:{src:"#su-generator"},callbacks:{}};n.callbacks.open=function(){r?l.filter('[data-shortcode="'.concat(r,'"]')).trigger("click"):window.setTimeout(function(){return i.focus()},200),"undefined"!=typeof tinyMCE&&null!=tinyMCE.activeEditor&&tinyMCE.activeEditor.hasOwnProperty("selection")&&(h.state.mceSelection=tinyMCE.activeEditor.selection.getContent({format:"text"}))},n.callbacks.close=function(){i.val(""),g.html("").hide(),o.removeClass("su-generator-narrow"),u.show(),c.show(),l.show(),h.state.mceSelection=""},d.magnificPopup.open(n)}},h.insertShortcode=function(){var e=h.parseSettings();if(h.addPreset("last_used",SUGL10n.last_used),d.magnificPopup.close(),a.text(e),"html"===h.state.context){var t=document.getElementById(h.state.insertArgs.editorID);h.insertAtCaret(t,e)}if("classic"===h.state.context&&window.wp.media.editor.insert(e),"block"===h.state.context){var r=h.state.insertArgs.props;if(r.attributes.hasOwnProperty("content"))r.setAttributes({content:r.attributes.content+e});else if("core/shortcode"===r.name){var n=r.attributes.hasOwnProperty("text")?r.attributes.text:"";r.setAttributes({text:n+e})}}},h.insertAtCaret=function(e,t){var r=e.selectionStart;e.value=e.value.substring(0,r)+t+e.value.substring(r),e.focus(),e.selectionStart=r+t.length},{init:h.init,insert:h.insert}),jQuery(document).ready(window.SUG.App.init)},{}]},{},[1]);
|
2 |
//# sourceMappingURL=index.js.map
|
includes/js/generator/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["includes/js/generator/node_modules/browser-pack/_prelude.js","includes/js/generator/includes/js/generator/src/index.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","$","$generator","$search","$filter","$filters","$choices","$choice","$settings","$prefix","$result","$selected","self","window","SUG","App","jQuery","children","find","state","mceSelection","target","wpActiveEditor","context","insertArgs","preview","timer","request","el","body","init","gp_hover_timer","click","filter","this","data","css","opacity","removeClass","regex","RegExp","each","match","preventDefault","on","val","html","hide","show","focus","magnificPopup","close","blur","keyup","$first","best","keyCode","trigger","id","shortcode","matches","name","desc","group","join","addClass","ajax","type","url","ajaxurl","action","beforeSend","success","$content","attr","index","$val","min","max","step","simpleSlider","snap","range","farbtastic","update","ids","source","$sources","images","$images","categories","$cats","tax","$taxes","terms","$terms","frame","$picker","$source","$addMedia","indexOf","parent","fadeOut","remove","wp","media","frames","su_media_frame_1","title","SUGL10n","isp_media_title","library","button","text","isp_media_insert","multiple","files","get","toJSON","append","open","sortable","revert","containment","tolerance","stop","$cont","parents","ajaxTermSelect","dataType","class","size","_typeof","abort","file","$button","stopPropagation","su_media_frame_2","upload_title","upload_insert","attachment","first","$field","toggleClass","hasClass","$icons","$value","$switch","value","su_generator_get_terms","noselect","$fields","$hoff","$voff","$blur","$color","cnt","wheel","split","replace","$width","$style","$cnt","_default","setSettings","insertShortcode","$preview","updatePreview","clearTimeout","setTimeout","$list","Date","getTime","prompt","presets_prompt_msg","presets_prompt_value","addPreset","$insert","$preset","removePreset","settings","getSettings","parseSettings","settingsSelector","query","prefix","content","result","String","$this","is","toString","hasOwnProperty","forced","previous","cache","insert","args","preSelectedShortcode","mfpOptions","alignTop","closeOnBgClick","mainClass","items","src","callbacks","concat","tinyMCE","activeEditor","selection","getContent","format","last_used","editorID","editor","props","attributes","setAttributes","originalText","insertAtCaret","field","start","selectionStart","selectionEnd","substring","document","ready"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA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AOS,eAAiBV,EAAKO,MAAMG,oBAC9B,GAA2B,UAAvBV,EAAKO,MAAMI,QAAqB,CACzC,IAAIgM,EAAQ3M,EAAKO,MAAMK,WAAW+L,MAElC,GAAIA,EAAMC,WAAWxB,eAAe,WAClCuB,EAAME,cAAc,CAAE/B,QAAS6B,EAAMC,WAAW9B,QAAU/H,SACrD,GAAmB,mBAAf4J,EAAM1J,KAA2B,CAC1C,IAAI6J,EAAeH,EAAMC,WAAWxB,eAAe,QAC/CuB,EAAMC,WAAWvG,KACjB,GAEJsG,EAAME,cAAc,CAAExG,KAAMyG,EAAe/J,OAQjD/C,EAAK+M,cAAgB,SAACC,EAAO3G,GAC3B,IAAI4G,EAAQD,EAAME,eACRF,EAAMG,aAEhBH,EAAMxE,MAAQwE,EAAMxE,MAAM4E,UAAU,EAAGH,GAAS5G,EAAO2G,EAAMxE,MAAM4E,UAAUH,GAE7ED,EAAM3K,QAEN2K,EAAME,eAAiBD,EAAQ5G,EAAKnH,QAG/B,CACLgC,KAAMlB,EAAKkB,KACXsK,OAAQxL,EAAKwL,SAIjBpL,OAAOiN,UAAUC,MAAMrN,OAAOC,IAAIC,IAAIe","file":"index.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()","/* global jQuery, wp, ajaxurl, SUGL10n */\n\nwindow.SUG = {}\n\nwindow.SUG.App = (($) => {\n var $generator = $('#su-generator')\n var $search = $('#su-generator-search')\n var $filter = $('#su-generator-filter')\n var $filters = $filter.children('a')\n var $choices = $('#su-generator-choices')\n var $choice = $choices.find('span')\n var $settings = $('#su-generator-settings')\n var $prefix = $('#su-compatibility-mode-prefix')\n var $result = $('#su-generator-result')\n var $selected = $('#su-generator-selected')\n\n var self = {}\n\n self.state = {\n mceSelection: '',\n target: '',\n wpActiveEditor: null,\n context: '',\n insertArgs: '',\n preview: {\n timer: null,\n request: null\n }\n }\n\n self.el = {\n body: $('body')\n }\n\n self.init = () => {\n $filters.click(\n function (e) {\n // Prepare data\n var filter = $(this).data('filter')\n // If filter All, show all choices\n if (filter === 'all') {\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n } else { // Else run search\n var regex = new RegExp(filter, 'gi')\n // Hide all choices\n $choice.css({ opacity: 0.2 })\n // Find searched choices and show\n $choice.each(\n function () {\n // Get shortcode name\n var group = $(this).data('group')\n // Show choice if matched\n if (group.match(regex) !== null) {\n $(this)\n .css({ opacity: 1 })\n .removeClass('su-generator-choice-first')\n }\n }\n )\n }\n e.preventDefault()\n }\n )\n // Go to home link\n $('#su-generator').on(\n 'click',\n '.su-generator-home',\n function (e) {\n // Clear search field\n $search.val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show filters\n $filter.show()\n // Show choices panel\n $choices.show()\n $choice.show()\n // Clear selection\n self.state.mceSelection = ''\n // Focus search field\n $search.focus()\n e.preventDefault()\n }\n )\n // Generator close button\n $('#su-generator').on(\n 'click',\n '.su-generator-close',\n function (e) {\n // Close popup\n $.magnificPopup.close()\n // Prevent default action\n e.preventDefault()\n }\n )\n // Search field\n $search.on(\n {\n focus: function () {\n // Clear field\n $(this).val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show choices panel\n $choices.show()\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n // Show filters\n $filter.show()\n },\n blur: function () {},\n keyup: function (e) {\n // Prepare vars\n var $first = $('.su-generator-choice-first:first')\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n var best = 0\n // Hotkey action\n if (e.keyCode === 13 && $first.length > 0) {\n e.preventDefault()\n $(this).val('').blur()\n $first.trigger('click')\n }\n // Hide all choices\n $choice.css(\n {\n opacity: 0.2\n }\n ).removeClass('su-generator-choice-first')\n // Loop and highlight choices\n $choice.each(\n function () {\n // Get choice data\n var data = $(this).data()\n var id = data.shortcode\n var name = data.name\n var desc = data.desc\n var group = data.group\n var matches = ([id, name, desc, group].join(' ')).match(regex)\n // Highlight choice if matched\n if (matches !== null) {\n // Highlight current choice\n $(this).css(\n {\n opacity: 1\n }\n )\n // Check for exact match\n if (val === id) {\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Prevent selecting by matches number\n best = 999\n } else if (matches.length > best) { // Check matches length\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Save the score\n best = matches.length\n }\n }\n }\n )\n // Remove primary class if search field is empty\n if (val === '') {\n $choice.removeClass('su-generator-choice-first')\n }\n }\n }\n )\n // Click on shortcode choice\n $choice.on(\n 'click',\n function (e) {\n // Prepare data\n var shortcode = $(this).data('shortcode')\n // Load shortcode options\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_settings',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Hide preview box\n $('#su-generator-preview').hide()\n // Hide choices panel\n $choices.hide()\n // Show loading animation\n $settings.addClass('su-generator-loading').show()\n // Add narrow class\n $generator.addClass('su-generator-narrow')\n // Hide filters\n $filter.hide()\n },\n success: function (data) {\n // Hide loading animation\n $settings.removeClass('su-generator-loading')\n // Insert new HTML\n $settings.html(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n // Init range pickers\n $('.su-generator-range-picker').each(\n function (index) {\n var $picker = $(this)\n var $val = $picker.find('input')\n var min = $val.attr('min')\n var max = $val.attr('max')\n var step = $val.attr('step')\n // Apply noUIslider\n $val.simpleSlider(\n {\n snap: true,\n step: step,\n range: [min, max]\n }\n )\n $val.show()\n $val.on(\n 'keyup blur',\n function (e) {\n $val.simpleSlider('setValue', $val.val())\n }\n )\n }\n )\n // Init color pickers\n $('.su-generator-select-color').each(\n function (index) {\n $(this).find('.su-generator-select-color-wheel').filter(':first').farbtastic('.su-generator-select-color-value:eq(' + index + ')')\n $(this).find('.su-generator-select-color-value').focus(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').show()\n }\n )\n $(this).find('.su-generator-select-color-value').blur(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').hide()\n }\n )\n }\n )\n // Init image sourse pickers\n $('.su-generator-isp').each(\n function () {\n var $picker = $(this)\n var $sources = $picker.find('.su-generator-isp-sources')\n var $source = $picker.find('.su-generator-isp-source')\n var $addMedia = $picker.find('.su-generator-isp-add-media')\n var $images = $picker.find('.su-generator-isp-images')\n var $cats = $picker.find('.su-generator-isp-categories')\n var $taxes = $picker.find('.su-generator-isp-taxonomies')\n var $terms = $('.su-generator-isp-terms')\n var $val = $picker.find('.su-generator-attr')\n var frame\n // Update hidden value\n var update = function () {\n var val = 'none'\n var ids = ''\n var source = $sources.val()\n // Media library\n if (source === 'media') {\n var images = []\n $images.find('span').each(\n function (i) {\n images[i] = $(this).data('id')\n }\n )\n if (images.length > 0) {\n ids = images.join(',')\n }\n }\n // Category\n else if (source === 'category') {\n var categories = $cats.val() || []\n if (categories.length > 0) {\n ids = categories.join(',')\n }\n }\n // Taxonomy\n else if (source === 'taxonomy') {\n var tax = $taxes.val() || ''\n var terms = $terms.val() || []\n if (tax !== '0' && terms.length > 0) {\n val = 'taxonomy: ' + tax + '/' + terms.join(',')\n }\n }\n // Deselect\n else if (source === '0') {\n val = 'none'\n }\n // Other options\n else {\n val = source\n }\n if (ids !== '') {\n val = source + ': ' + ids\n }\n $val.val(val).trigger('change')\n }\n // Switch source\n $sources.on(\n 'change',\n function (e) {\n var source = $(this).val()\n e.preventDefault()\n $source.removeClass('su-generator-isp-source-open')\n if (source.indexOf(':') === -1) {\n $picker.find('.su-generator-isp-source-' + source).addClass('su-generator-isp-source-open')\n }\n update()\n }\n )\n // Remove image\n $images.on(\n 'click',\n 'span i',\n function () {\n $(this).parent('span').css('border-color', '#f03').fadeOut(\n 300,\n function () {\n $(this).remove()\n update()\n }\n )\n }\n )\n // Add image\n $addMedia.click(\n function (e) {\n e.preventDefault()\n if (typeof (frame) !== 'undefined') {\n frame.close()\n }\n frame = wp.media.frames.su_media_frame_1 = wp.media(\n {\n title: SUGL10n.isp_media_title,\n library: {\n type: 'image'\n },\n button: {\n text: SUGL10n.isp_media_insert\n },\n multiple: true\n }\n )\n frame.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n frame.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n frame.on(\n 'select',\n function () {\n var files = frame.state().get('selection').toJSON()\n $images.find('em').remove()\n $.each(\n files,\n function (i) {\n $images.append('<span data-id=\"' + this.id + '\" title=\"' + this.title + '\"><img src=\"' + this.url + '\" alt=\"\" /><i class=\"sui sui-times\"></i></span>')\n }\n )\n update()\n }\n ).open()\n }\n )\n // Sort images\n $images.sortable(\n {\n revert: 200,\n containment: $picker,\n tolerance: 'pointer',\n stop: function () {\n update()\n }\n }\n )\n // Select categories and terms\n $cats.on('change', update)\n $terms.on('change', update)\n // Select taxonomy\n $taxes.on(\n 'change',\n function () {\n var $cont = $(this).parents('.su-generator-isp-source')\n var tax = $(this).val()\n // Remove terms\n $terms.hide().find('option').remove()\n update()\n // Taxonomy is not selected\n if (tax === '0') {\n\n } else { // Taxonomy selected\n var ajaxTermSelect = $.ajax(\n {\n url: ajaxurl,\n type: 'post',\n dataType: 'html',\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n class: 'su-generator-isp-terms',\n multiple: true,\n size: 10\n },\n beforeSend: function () {\n if (typeof ajaxTermSelect === 'object') {\n ajaxTermSelect.abort()\n }\n $terms.html('').attr('disabled', true).hide()\n $cont.addClass('su-generator-loading')\n },\n success: function (data) {\n $terms.html(data).attr('disabled', false).show()\n $cont.removeClass('su-generator-loading')\n }\n }\n )\n }\n }\n )\n }\n )\n // Init media buttons\n $('.su-generator-upload-button').each(\n function () {\n var $button = $(this)\n var $val = $(this).parents('.su-generator-attr-container').find('input:text')\n var file\n $button.on(\n 'click',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // If the frame already exists, reopen it\n if (typeof (file) !== 'undefined') {\n file.close()\n }\n // Create WP media frame.\n file = wp.media.frames.su_media_frame_2 = wp.media(\n {\n // Title of media manager frame\n title: SUGL10n.upload_title,\n button: {\n // Button text\n text: SUGL10n.upload_insert\n },\n // Do not allow multiple files, if you want multiple, set true\n multiple: false\n }\n )\n // callback for selected image\n file.on(\n 'select',\n function () {\n var attachment = file.state().get('selection').first().toJSON()\n $val.val(attachment.url).trigger('change')\n }\n )\n file.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n file.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n // Open modal\n file.open()\n }\n )\n }\n )\n // Init icon pickers\n $('.su-generator-icon-picker-button').each(\n function () {\n var $button = $(this)\n var $field = $(this).parents('.su-generator-attr-container')\n var $val = $field.find('.su-generator-attr')\n var $picker = $field.find('.su-generator-icon-picker')\n var $filter = $picker.find('input:text')\n $button.click(\n function (e) {\n $picker.toggleClass('su-generator-icon-picker-visible')\n $filter.val('').trigger('keyup')\n if ($picker.hasClass('su-generator-icon-picker-loaded')) {\n return\n }\n // Load icons\n $.ajax(\n {\n type: 'post',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_icons'\n },\n dataType: 'html',\n beforeSend: function () {\n // Show loading animation\n $picker.addClass('su-generator-loading')\n // Add loaded class\n $picker.addClass('su-generator-icon-picker-loaded')\n },\n success: function (data) {\n $picker.append(data)\n var $icons = $picker.children('i')\n $icons.click(\n function (e) {\n $val.val('icon: ' + $(this).attr('title'))\n $picker.removeClass('su-generator-icon-picker-visible')\n $val.trigger('change')\n e.preventDefault()\n }\n )\n $filter.on(\n {\n keyup: function () {\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n // Hide all choices\n $icons.hide()\n // Find searched choices and show\n $icons.each(\n function () {\n // Get shortcode name\n var name = $(this).attr('title')\n // Show choice if matched\n if (name.match(regex) !== null) {\n $(this).show()\n }\n }\n )\n },\n focus: function () {\n $(this).val('')\n $icons.show()\n }\n }\n )\n $picker.removeClass('su-generator-loading')\n }\n }\n )\n e.preventDefault()\n }\n )\n }\n )\n // Init switches\n $('.su-generator-switch').click(\n function (e) {\n // Prepare data\n var $switch = $(this)\n var $value = $switch.parent().children('input')\n var isOn = $value.val() === 'yes'\n // Disable\n if (isOn) {\n // Change value\n $value.val('no').trigger('change')\n } else { // Enable\n // Change value\n $value.val('yes').trigger('change')\n }\n e.preventDefault()\n }\n )\n $('.su-generator-switch-value').on(\n 'change',\n function () {\n // Prepare data\n var $value = $(this)\n var $switch = $value.parent().children('.su-generator-switch')\n var value = $value.val()\n // Disable\n if (value === 'yes') {\n $switch.removeClass('su-generator-switch-no').addClass('su-generator-switch-yes')\n } else if (value === 'no') { // Enable\n $switch.removeClass('su-generator-switch-yes').addClass('su-generator-switch-no')\n }\n }\n )\n // Init tax_term selects\n $('select#su-generator-attr-taxonomy').on(\n 'change',\n function () {\n var $taxonomy = $(this)\n var tax = $taxonomy.val()\n var $terms = $('select#su-generator-attr-tax_term')\n // Load new options\n window.su_generator_get_terms = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n noselect: true\n },\n dataType: 'html',\n beforeSend: function () {\n // Check previous requests\n if (typeof window.su_generator_get_terms === 'object') {\n window.su_generator_get_terms.abort()\n }\n // Show loading animation\n $terms.parent().addClass('su-generator-loading')\n },\n success: function (data) {\n // Remove previous options\n $terms.find('option').remove()\n // Append new options\n $terms.append(data)\n // Hide loading animation\n $terms.parent().removeClass('su-generator-loading')\n }\n }\n )\n }\n )\n // Init shadow pickers\n $('.su-generator-shadow-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-shadow-picker-field input')\n var $hoff = $picker.find('.su-generator-sp-hoff')\n var $voff = $picker.find('.su-generator-sp-voff')\n var $blur = $picker.find('.su-generator-sp-blur')\n var $color = {\n cnt: $picker.find('.su-generator-shadow-picker-color'),\n value: $picker.find('.su-generator-shadow-picker-color-value'),\n wheel: $picker.find('.su-generator-shadow-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($hoff.val() + 'px ' + $voff.val() + 'px ' + $blur.val() + 'px ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 4) {\n $hoff.val(value[0].replace('px', ''))\n $voff.val(value[1].replace('px', ''))\n $blur.val(value[2].replace('px', ''))\n $color.value.val(value[3])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Init border pickers\n $('.su-generator-border-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-border-picker-field input, .su-generator-border-picker-field select')\n var $width = $picker.find('.su-generator-bp-width')\n var $style = $picker.find('.su-generator-bp-style')\n var $color = {\n cnt: $picker.find('.su-generator-border-picker-color'),\n value: $picker.find('.su-generator-border-picker-color-value'),\n wheel: $picker.find('.su-generator-border-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($width.val() + 'px ' + $style.val() + ' ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 3) {\n $width.val(value[0].replace('px', ''))\n $style.val(value[1])\n $color.value.val(value[2])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Remove skip class when setting is changed\n $settings.find('.su-generator-attr').on(\n 'change keyup blur',\n function () {\n var $cnt = $(this).parents('.su-generator-attr-container')\n var _default = $cnt.data('default')\n var val = $(this).val()\n // Value is changed\n if (val != _default) {\n $cnt.removeClass('su-generator-skip')\n } else {\n $cnt.addClass('su-generator-skip')\n }\n }\n )\n // Init value setters\n $('.su-generator-set-value').click(\n function (e) {\n $(this).parents('.su-generator-attr-container').find('input').val($(this).text()).trigger('change')\n }\n )\n // Save selected value\n $selected.val(shortcode)\n // Load last used preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: 'last_used',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Show loading animation\n // $settings.addClass('su-generator-loading');\n },\n success: function (data) {\n // Remove loading animation\n // $settings.removeClass('su-generator-loading');\n // Set new settings\n self.setSettings(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n },\n dataType: 'json'\n }\n )\n },\n dataType: 'html'\n }\n )\n }\n )\n // Insert shortcode\n $('#su-generator').on('click', '.su-generator-insert', self.insertShortcode)\n // Preview shortcode\n $('#su-generator').on(\n 'click',\n '.su-generator-toggle-preview',\n function (e) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var $button = $(this)\n // Hide button\n $button.hide()\n // Show preview box\n $preview.addClass('su-generator-loading').show()\n // Bind updating on settings changes\n $settings.find('input, textarea, select').on(\n 'change keyup blur',\n function () {\n self.updatePreview()\n }\n )\n // Update preview box\n self.updatePreview(true)\n // Prevent default action\n e.preventDefault()\n }\n )\n var gp_hover_timer\n // Presets manager - mouseenter\n $('#su-generator').on(\n 'mouseenter click',\n '.su-generator-presets',\n function () {\n clearTimeout(gp_hover_timer)\n $('.su-gp-popup').show()\n }\n )\n // Presets manager - mouseleave\n $('#su-generator').on(\n 'mouseleave',\n '.su-generator-presets',\n function () {\n gp_hover_timer = window.setTimeout(\n function () {\n $('.su-gp-popup').fadeOut(200)\n },\n 600\n )\n }\n )\n // Presets manager - add new preset\n $('#su-generator').on(\n 'click',\n '.su-gp-new',\n function (e) {\n // Prepare data\n var $container = $(this).parents('.su-generator-presets')\n var $list = $('.su-gp-list')\n var id = new Date().getTime()\n // Ask for preset name\n var name = prompt(SUGL10n.presets_prompt_msg, SUGL10n.presets_prompt_value)\n // Name is entered\n if (name !== '' && name !== null) {\n // Hide default text\n $list.find('b').hide()\n // Add new option\n $list.append('<span data-id=\"' + id + '\"><em>' + name + '</em><i class=\"sui sui-times\"></i></span>')\n // Perform AJAX request\n self.addPreset(id, name)\n }\n }\n )\n // Presets manager - load preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list span',\n function (e) {\n // Prepare data\n var shortcode = $('.su-generator-presets').data('shortcode')\n var id = $(this).data('id')\n var $insert = $('.su-generator-insert')\n // Hide popup\n $('.su-gp-popup').hide()\n // Disable hover timer\n clearTimeout(gp_hover_timer)\n // Get the preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: id,\n shortcode: shortcode\n },\n beforeSend: function () {\n // Disable insert button\n $insert.addClass('button-primary-disabled').attr('disabled', true)\n },\n success: function (data) {\n // Enable insert button\n $insert.removeClass('button-primary-disabled').attr('disabled', false)\n // Set new settings\n self.setSettings(data)\n },\n dataType: 'json'\n }\n )\n // Prevent default action\n e.preventDefault()\n e.stopPropagation()\n }\n )\n // Presets manager - remove preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list i',\n function (e) {\n // Prepare data\n var $list = $(this).parents('.su-gp-list')\n var $preset = $(this).parent('span')\n var id = $preset.data('id')\n // Remove DOM element\n $preset.remove()\n // Show default text if last preset was removed\n if ($list.find('span').length < 1) {\n $list.find('b').show()\n }\n // Perform ajax request\n self.removePreset(id)\n // Prevent <span> action\n e.stopPropagation()\n // Prevent default action\n e.preventDefault()\n }\n )\n }\n\n /**\n\t * Create new preset with specified name from current settings\n\t */\n self.addPreset = function (id, name) {\n // Prepare shortcode name and current settings\n var shortcode = $('.su-generator-presets').data('shortcode')\n var settings = self.getSettings()\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_add_preset',\n id: id,\n name: name,\n shortcode: shortcode,\n settings: settings\n }\n }\n )\n }\n /**\n\t * Remove preset by ID\n\t */\n self.removePreset = function (id) {\n // Get current shortcode name\n var shortcode = $('.su-generator-presets').data('shortcode')\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_remove_preset',\n id: id,\n shortcode: shortcode\n }\n }\n )\n }\n\n self.parseSettings = function () {\n var settingsSelector = $('#su-generator-option-skip').val() === 'on'\n ? '#su-generator-settings .su-generator-attr-container:not(.su-generator-skip) .su-generator-attr'\n : '#su-generator-settings .su-generator-attr-container .su-generator-attr'\n // Prepare data\n var query = $selected.val()\n var prefix = $prefix.val()\n var $settings = $(settingsSelector)\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var result = new String('')\n // Open shortcode\n result += '[' + prefix + query\n // Add shortcode attributes\n $settings.each(\n function () {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n } else if (typeof value === 'array') {\n value = value.join(',')\n }\n // Add attribute\n if (value !== '') {\n result += ' ' + $(this).attr('name') + '=\"' + $(this).val().toString().replace(/\"/gi, \"'\") + '\"'\n }\n }\n )\n // End of opening tag\n result += ']'\n // Wrap shortcode if content presented\n if (content != 'false') {\n result += content + '[/' + prefix + query + ']'\n }\n // Return result\n return result\n }\n\n self.getSettings = function () {\n // Prepare data\n var query = $selected.val()\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var data = {}\n // Add shortcode attributes\n $settings.each(\n function (i) {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n var name = $this.attr('name')\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n }\n // Save value\n data[name] = value\n }\n )\n // Add content\n data.content = content.toString()\n // Return data\n return data\n }\n\n self.setSettings = function (data) {\n // Prepare data\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('#su-generator-content')\n // Loop through settings\n $settings.each(\n function () {\n var $this = $(this)\n var name = $this.attr('name')\n // Data contains value for this field\n if (data.hasOwnProperty(name)) {\n // Set new value\n $this.val(data[name])\n $this.trigger('keyup').trigger('change').trigger('blur')\n }\n }\n )\n // Set content\n if (data.hasOwnProperty('content')) {\n $content.val(data.content).trigger('keyup').trigger('change').trigger('blur')\n }\n // Update preview\n self.updatePreview()\n }\n\n self.updatePreview = function (forced) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var shortcode = self.parseSettings()\n var previous = $result.text()\n // Check forced mode\n forced = forced || false\n // Break if preview box is hidden (preview isn't enabled)\n if (!$preview.is(':visible')) {\n return\n }\n // Check shortcode is changed is this is not a forced mode\n if (shortcode === previous && !forced) {\n return\n }\n // Run timer to filter often calls\n window.clearTimeout(self.state.preview.timer)\n self.state.preview.timer = window.setTimeout(\n function () {\n self.state.preview.request = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n cache: false,\n data: {\n action: 'su_generator_preview',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Abort previous requests\n if (self.state.preview.request) {\n self.state.preview.request.abort()\n }\n // Show loading animation\n $preview.addClass('su-generator-loading').html('')\n },\n success: function (data) {\n // Hide loading animation and set new HTML\n $preview.html(data).removeClass('su-generator-loading')\n },\n dataType: 'html'\n }\n )\n },\n 300\n )\n // Save shortcode to div\n $result.text(shortcode)\n }\n\n self.insert = function (context, args) {\n if (typeof context !== 'string' || typeof args !== 'object') {\n return\n }\n\n self.state.context = context\n self.state.insertArgs = args\n\n var preSelectedShortcode = args.shortcode || ''\n\n var mfpOptions = {\n type: 'inline',\n alignTop: true,\n closeOnBgClick: false,\n mainClass: 'su-generator-mfp',\n items: {\n src: '#su-generator'\n },\n callbacks: {}\n }\n\n mfpOptions.callbacks.open = () => {\n if (preSelectedShortcode) {\n $choice.filter(`[data-shortcode=\"${preSelectedShortcode}\"]`).trigger('click')\n } else {\n window.setTimeout(() => $search.focus(), 200)\n }\n\n // self.el.body.addClass( 'su-mfp-shown' );\n\n if (\n typeof tinyMCE !== 'undefined' &&\n\t\t\t\ttinyMCE.activeEditor != null &&\n\t\t\t\ttinyMCE.activeEditor.hasOwnProperty('selection')\n ) {\n self.state.mceSelection = tinyMCE.activeEditor.selection.getContent({ format: 'text' })\n }\n }\n\n mfpOptions.callbacks.close = () => {\n $search.val('')\n $settings.html('').hide()\n $generator.removeClass('su-generator-narrow')\n $filter.show()\n $choices.show()\n $choice.show()\n\n self.state.mceSelection = ''\n\n // self.el.body.removeClass( 'su-mfp-shown' );\n }\n\n $.magnificPopup.open(mfpOptions)\n }\n\n self.insertShortcode = function () {\n var shortcode = self.parseSettings()\n\n self.addPreset('last_used', SUGL10n.last_used)\n\n $.magnificPopup.close()\n\n $result.text(shortcode)\n\n if (self.state.context === 'classic') {\n self.state.wpActiveEditor = window.wpActiveEditor\n window.wpActiveEditor = self.state.insertArgs.editorID\n window.wp.media.editor.insert(shortcode)\n window.wpActiveEditor = self.state.wpActiveEditor\n } else if (self.state.context === 'block') {\n var props = self.state.insertArgs.props\n\n if (props.attributes.hasOwnProperty('content')) {\n props.setAttributes({ content: props.attributes.content + shortcode })\n } else if (props.name === 'core/shortcode') {\n var originalText = props.attributes.hasOwnProperty('text')\n ? props.attributes.text\n : ''\n\n props.setAttributes({ text: originalText + shortcode })\n\n // var textarea = document.querySelector( `#block-${props.clientId} textarea` );\n // self.insertAtCaret( textarea, shortcode );\n }\n }\n }\n\n self.insertAtCaret = (field, text) => {\n var start = field.selectionStart\n var end = field.selectionEnd\n\n field.value = field.value.substring(0, start) + text + field.value.substring(start)\n\n field.focus()\n\n field.selectionStart = start + text.length\n }\n\n return {\n init: self.init,\n insert: self.insert\n }\n})(jQuery)\n\njQuery(document).ready(window.SUG.App.init)\n"]}
|
1 |
+
{"version":3,"sources":["includes/js/generator/node_modules/browser-pack/_prelude.js","includes/js/generator/includes/js/generator/src/index.js"],"names":["r","e","n","t","o","i","f","c","require","u","a","Error","code","p","exports","call","length","1","module","$","$generator","$search","$filter","$filters","$choices","$choice","$settings","$prefix","$result","$selected","self","window","SUG","App","jQuery","children","find","state","mceSelection","target","wpActiveEditor","context","insertArgs","preview","timer","request","el","body","init","gp_hover_timer","click","filter","this","data","css","opacity","removeClass","regex","RegExp","each","match","preventDefault","on","val","html","hide","show","focus","magnificPopup","close","blur","keyup","$first","best","keyCode","trigger","id","shortcode","matches","name","desc","group","join","addClass","ajax","type","url","ajaxurl","action","beforeSend","success","$content","attr","index","$val","min","max","step","simpleSlider","snap","range","farbtastic","update","ids","source","$sources","images","$images","categories","$cats","tax","$taxes","terms","$terms","frame","$picker","$source","$addMedia","indexOf","parent","fadeOut","remove","wp","media","frames","su_media_frame_1","title","SUGL10n","isp_media_title","library","button","text","isp_media_insert","multiple","files","get","toJSON","append","open","sortable","revert","containment","tolerance","stop","$cont","parents","ajaxTermSelect","dataType","class","size","_typeof","abort","file","$button","stopPropagation","su_media_frame_2","upload_title","upload_insert","attachment","first","$field","toggleClass","hasClass","$icons","$value","$switch","value","su_generator_get_terms","noselect","$fields","$hoff","$voff","$blur","$color","cnt","wheel","split","replace","$width","$style","$cnt","_default","setSettings","insertShortcode","$preview","updatePreview","clearTimeout","setTimeout","$list","Date","getTime","prompt","presets_prompt_msg","presets_prompt_value","addPreset","$insert","$preset","removePreset","settings","getSettings","parseSettings","settingsSelector","query","prefix","content","result","String","$this","is","toString","hasOwnProperty","forced","previous","cache","insert","args","preSelectedShortcode","mfpOptions","alignTop","closeOnBgClick","mainClass","items","src","callbacks","concat","tinyMCE","activeEditor","selection","getContent","format","last_used","HTMLEditor","document","getElementById","editorID","insertAtCaret","editor","props","attributes","setAttributes","originalText","field","start","selectionStart","substring","ready"],"mappings":"CAAA,SAAAA,EAAAC,EAAAC,EAAAC,GAAA,SAAAC,EAAAC,EAAAC,GAAA,IAAAJ,EAAAG,GAAA,CAAA,IAAAJ,EAAAI,GAAA,CAAA,IAAAE,EAAA,mBAAAC,SAAAA,QAAA,IAAAF,GAAAC,EAAA,OAAAA,EAAAF,GAAA,GAAA,GAAAI,EAAA,OAAAA,EAAAJ,GAAA,GAAA,IAAAK,EAAA,IAAAC,MAAA,uBAAAN,EAAA,KAAA,MAAAK,EAAAE,KAAA,mBAAAF,EAAA,IAAAG,EAAAX,EAAAG,GAAA,CAAAS,QAAA,IAAAb,EAAAI,GAAA,GAAAU,KAAAF,EAAAC,QAAA,SAAAd,GAAA,OAAAI,EAAAH,EAAAI,GAAA,GAAAL,IAAAA,IAAAa,EAAAA,EAAAC,QAAAd,EAAAC,EAAAC,EAAAC,GAAA,OAAAD,EAAAG,GAAAS,QAAA,IAAA,IAAAL,EAAA,mBAAAD,SAAAA,QAAAH,EAAA,EAAAA,EAAAF,EAAAa,OAAAX,IAAAD,EAAAD,EAAAE,IAAA,OAAAD,EAAA,CAAA,CAAAa,EAAA,CAAA,SAAAT,EAAAU,EAAAJ,qPCIkB,IAACK,EACbC,EACAC,EACAC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file":"index.js","sourcesContent":["(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()","/* global jQuery, wp, ajaxurl, SUGL10n */\n\nwindow.SUG = {}\n\nwindow.SUG.App = (($) => {\n var $generator = $('#su-generator')\n var $search = $('#su-generator-search')\n var $filter = $('#su-generator-filter')\n var $filters = $filter.children('a')\n var $choices = $('#su-generator-choices')\n var $choice = $choices.find('span')\n var $settings = $('#su-generator-settings')\n var $prefix = $('#su-compatibility-mode-prefix')\n var $result = $('#su-generator-result')\n var $selected = $('#su-generator-selected')\n\n var self = {}\n\n self.state = {\n mceSelection: '',\n target: '',\n wpActiveEditor: null,\n context: '',\n insertArgs: '',\n preview: {\n timer: null,\n request: null\n }\n }\n\n self.el = {\n body: $('body')\n }\n\n self.init = () => {\n $filters.click(\n function (e) {\n // Prepare data\n var filter = $(this).data('filter')\n // If filter All, show all choices\n if (filter === 'all') {\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n } else { // Else run search\n var regex = new RegExp(filter, 'gi')\n // Hide all choices\n $choice.css({ opacity: 0.2 })\n // Find searched choices and show\n $choice.each(\n function () {\n // Get shortcode name\n var group = $(this).data('group')\n // Show choice if matched\n if (group.match(regex) !== null) {\n $(this)\n .css({ opacity: 1 })\n .removeClass('su-generator-choice-first')\n }\n }\n )\n }\n e.preventDefault()\n }\n )\n // Go to home link\n $('#su-generator').on(\n 'click',\n '.su-generator-home',\n function (e) {\n // Clear search field\n $search.val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show filters\n $filter.show()\n // Show choices panel\n $choices.show()\n $choice.show()\n // Clear selection\n self.state.mceSelection = ''\n // Focus search field\n $search.focus()\n e.preventDefault()\n }\n )\n // Generator close button\n $('#su-generator').on(\n 'click',\n '.su-generator-close',\n function (e) {\n // Close popup\n $.magnificPopup.close()\n // Prevent default action\n e.preventDefault()\n }\n )\n // Search field\n $search.on(\n {\n focus: function () {\n // Clear field\n $(this).val('')\n // Hide settings\n $settings.html('').hide()\n // Remove narrow class\n $generator.removeClass('su-generator-narrow')\n // Show choices panel\n $choices.show()\n $choice.css(\n {\n opacity: 1\n }\n ).removeClass('su-generator-choice-first')\n // Show filters\n $filter.show()\n },\n blur: function () {},\n keyup: function (e) {\n // Prepare vars\n var $first = $('.su-generator-choice-first:first')\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n var best = 0\n // Hotkey action\n if (e.keyCode === 13 && $first.length > 0) {\n e.preventDefault()\n $(this).val('').blur()\n $first.trigger('click')\n }\n // Hide all choices\n $choice.css(\n {\n opacity: 0.2\n }\n ).removeClass('su-generator-choice-first')\n // Loop and highlight choices\n $choice.each(\n function () {\n // Get choice data\n var data = $(this).data()\n var id = data.shortcode\n var name = data.name\n var desc = data.desc\n var group = data.group\n var matches = ([id, name, desc, group].join(' ')).match(regex)\n // Highlight choice if matched\n if (matches !== null) {\n // Highlight current choice\n $(this).css(\n {\n opacity: 1\n }\n )\n // Check for exact match\n if (val === id) {\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Prevent selecting by matches number\n best = 999\n } else if (matches.length > best) { // Check matches length\n // Remove primary class from all choices\n $choice.removeClass('su-generator-choice-first')\n // Add primary class to the current choice\n $(this).addClass('su-generator-choice-first')\n // Save the score\n best = matches.length\n }\n }\n }\n )\n // Remove primary class if search field is empty\n if (val === '') {\n $choice.removeClass('su-generator-choice-first')\n }\n }\n }\n )\n // Click on shortcode choice\n $choice.on(\n 'click',\n function (e) {\n // Prepare data\n var shortcode = $(this).data('shortcode')\n // Load shortcode options\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_settings',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Hide preview box\n $('#su-generator-preview').hide()\n // Hide choices panel\n $choices.hide()\n // Show loading animation\n $settings.addClass('su-generator-loading').show()\n // Add narrow class\n $generator.addClass('su-generator-narrow')\n // Hide filters\n $filter.hide()\n },\n success: function (data) {\n // Hide loading animation\n $settings.removeClass('su-generator-loading')\n // Insert new HTML\n $settings.html(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n // Init range pickers\n $('.su-generator-range-picker').each(\n function (index) {\n var $picker = $(this)\n var $val = $picker.find('input')\n var min = $val.attr('min')\n var max = $val.attr('max')\n var step = $val.attr('step')\n // Apply noUIslider\n $val.simpleSlider(\n {\n snap: true,\n step: step,\n range: [min, max]\n }\n )\n $val.show()\n $val.on(\n 'keyup blur',\n function (e) {\n $val.simpleSlider('setValue', $val.val())\n }\n )\n }\n )\n // Init color pickers\n $('.su-generator-select-color').each(\n function (index) {\n $(this).find('.su-generator-select-color-wheel').filter(':first').farbtastic('.su-generator-select-color-value:eq(' + index + ')')\n $(this).find('.su-generator-select-color-value').focus(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').show()\n }\n )\n $(this).find('.su-generator-select-color-value').blur(\n function () {\n $('.su-generator-select-color-wheel:eq(' + index + ')').hide()\n }\n )\n }\n )\n // Init image sourse pickers\n $('.su-generator-isp').each(\n function () {\n var $picker = $(this)\n var $sources = $picker.find('.su-generator-isp-sources')\n var $source = $picker.find('.su-generator-isp-source')\n var $addMedia = $picker.find('.su-generator-isp-add-media')\n var $images = $picker.find('.su-generator-isp-images')\n var $cats = $picker.find('.su-generator-isp-categories')\n var $taxes = $picker.find('.su-generator-isp-taxonomies')\n var $terms = $('.su-generator-isp-terms')\n var $val = $picker.find('.su-generator-attr')\n var frame\n // Update hidden value\n var update = function () {\n var val = 'none'\n var ids = ''\n var source = $sources.val()\n // Media library\n if (source === 'media') {\n var images = []\n $images.find('span').each(\n function (i) {\n images[i] = $(this).data('id')\n }\n )\n if (images.length > 0) {\n ids = images.join(',')\n }\n }\n // Category\n else if (source === 'category') {\n var categories = $cats.val() || []\n if (categories.length > 0) {\n ids = categories.join(',')\n }\n }\n // Taxonomy\n else if (source === 'taxonomy') {\n var tax = $taxes.val() || ''\n var terms = $terms.val() || []\n if (tax !== '0' && terms.length > 0) {\n val = 'taxonomy: ' + tax + '/' + terms.join(',')\n }\n }\n // Deselect\n else if (source === '0') {\n val = 'none'\n }\n // Other options\n else {\n val = source\n }\n if (ids !== '') {\n val = source + ': ' + ids\n }\n $val.val(val).trigger('change')\n }\n // Switch source\n $sources.on(\n 'change',\n function (e) {\n var source = $(this).val()\n e.preventDefault()\n $source.removeClass('su-generator-isp-source-open')\n if (source.indexOf(':') === -1) {\n $picker.find('.su-generator-isp-source-' + source).addClass('su-generator-isp-source-open')\n }\n update()\n }\n )\n // Remove image\n $images.on(\n 'click',\n 'span i',\n function () {\n $(this).parent('span').css('border-color', '#f03').fadeOut(\n 300,\n function () {\n $(this).remove()\n update()\n }\n )\n }\n )\n // Add image\n $addMedia.click(\n function (e) {\n e.preventDefault()\n if (typeof (frame) !== 'undefined') {\n frame.close()\n }\n frame = wp.media.frames.su_media_frame_1 = wp.media(\n {\n title: SUGL10n.isp_media_title,\n library: {\n type: 'image'\n },\n button: {\n text: SUGL10n.isp_media_insert\n },\n multiple: true\n }\n )\n frame.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n frame.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n frame.on(\n 'select',\n function () {\n var files = frame.state().get('selection').toJSON()\n $images.find('em').remove()\n $.each(\n files,\n function (i) {\n $images.append('<span data-id=\"' + this.id + '\" title=\"' + this.title + '\"><img src=\"' + this.url + '\" alt=\"\" /><i class=\"sui sui-times\"></i></span>')\n }\n )\n update()\n }\n ).open()\n }\n )\n // Sort images\n $images.sortable(\n {\n revert: 200,\n containment: $picker,\n tolerance: 'pointer',\n stop: function () {\n update()\n }\n }\n )\n // Select categories and terms\n $cats.on('change', update)\n $terms.on('change', update)\n // Select taxonomy\n $taxes.on(\n 'change',\n function () {\n var $cont = $(this).parents('.su-generator-isp-source')\n var tax = $(this).val()\n // Remove terms\n $terms.hide().find('option').remove()\n update()\n // Taxonomy is not selected\n if (tax === '0') {\n\n } else { // Taxonomy selected\n var ajaxTermSelect = $.ajax(\n {\n url: ajaxurl,\n type: 'post',\n dataType: 'html',\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n class: 'su-generator-isp-terms',\n multiple: true,\n size: 10\n },\n beforeSend: function () {\n if (typeof ajaxTermSelect === 'object') {\n ajaxTermSelect.abort()\n }\n $terms.html('').attr('disabled', true).hide()\n $cont.addClass('su-generator-loading')\n },\n success: function (data) {\n $terms.html(data).attr('disabled', false).show()\n $cont.removeClass('su-generator-loading')\n }\n }\n )\n }\n }\n )\n }\n )\n // Init media buttons\n $('.su-generator-upload-button').each(\n function () {\n var $button = $(this)\n var $val = $(this).parents('.su-generator-attr-container').find('input:text')\n var file\n $button.on(\n 'click',\n function (e) {\n e.preventDefault()\n e.stopPropagation()\n // If the frame already exists, reopen it\n if (typeof (file) !== 'undefined') {\n file.close()\n }\n // Create WP media frame.\n file = wp.media.frames.su_media_frame_2 = wp.media(\n {\n // Title of media manager frame\n title: SUGL10n.upload_title,\n button: {\n // Button text\n text: SUGL10n.upload_insert\n },\n // Do not allow multiple files, if you want multiple, set true\n multiple: false\n }\n )\n // callback for selected image\n file.on(\n 'select',\n function () {\n var attachment = file.state().get('selection').first().toJSON()\n $val.val(attachment.url).trigger('change')\n }\n )\n file.on('open', function () {\n $('.mfp-wrap').addClass('hidden')\n })\n file.on('close', function () {\n $('.mfp-wrap').removeClass('hidden')\n })\n // Open modal\n file.open()\n }\n )\n }\n )\n // Init icon pickers\n $('.su-generator-icon-picker-button').each(\n function () {\n var $button = $(this)\n var $field = $(this).parents('.su-generator-attr-container')\n var $val = $field.find('.su-generator-attr')\n var $picker = $field.find('.su-generator-icon-picker')\n var $filter = $picker.find('input:text')\n $button.click(\n function (e) {\n $picker.toggleClass('su-generator-icon-picker-visible')\n $filter.val('').trigger('keyup')\n if ($picker.hasClass('su-generator-icon-picker-loaded')) {\n return\n }\n // Load icons\n $.ajax(\n {\n type: 'post',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_icons'\n },\n dataType: 'html',\n beforeSend: function () {\n // Show loading animation\n $picker.addClass('su-generator-loading')\n // Add loaded class\n $picker.addClass('su-generator-icon-picker-loaded')\n },\n success: function (data) {\n $picker.append(data)\n var $icons = $picker.children('i')\n $icons.click(\n function (e) {\n $val.val('icon: ' + $(this).attr('title'))\n $picker.removeClass('su-generator-icon-picker-visible')\n $val.trigger('change')\n e.preventDefault()\n }\n )\n $filter.on(\n {\n keyup: function () {\n var val = $(this).val()\n var regex = new RegExp(val, 'gi')\n // Hide all choices\n $icons.hide()\n // Find searched choices and show\n $icons.each(\n function () {\n // Get shortcode name\n var name = $(this).attr('title')\n // Show choice if matched\n if (name.match(regex) !== null) {\n $(this).show()\n }\n }\n )\n },\n focus: function () {\n $(this).val('')\n $icons.show()\n }\n }\n )\n $picker.removeClass('su-generator-loading')\n }\n }\n )\n e.preventDefault()\n }\n )\n }\n )\n // Init switches\n $('.su-generator-switch').click(\n function (e) {\n // Prepare data\n var $switch = $(this)\n var $value = $switch.parent().children('input')\n var isOn = $value.val() === 'yes'\n // Disable\n if (isOn) {\n // Change value\n $value.val('no').trigger('change')\n } else { // Enable\n // Change value\n $value.val('yes').trigger('change')\n }\n e.preventDefault()\n }\n )\n $('.su-generator-switch-value').on(\n 'change',\n function () {\n // Prepare data\n var $value = $(this)\n var $switch = $value.parent().children('.su-generator-switch')\n var value = $value.val()\n // Disable\n if (value === 'yes') {\n $switch.removeClass('su-generator-switch-no').addClass('su-generator-switch-yes')\n } else if (value === 'no') { // Enable\n $switch.removeClass('su-generator-switch-yes').addClass('su-generator-switch-no')\n }\n }\n )\n // Init tax_term selects\n $('select#su-generator-attr-taxonomy').on(\n 'change',\n function () {\n var $taxonomy = $(this)\n var tax = $taxonomy.val()\n var $terms = $('select#su-generator-attr-tax_term')\n // Load new options\n window.su_generator_get_terms = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_terms',\n tax: tax,\n noselect: true\n },\n dataType: 'html',\n beforeSend: function () {\n // Check previous requests\n if (typeof window.su_generator_get_terms === 'object') {\n window.su_generator_get_terms.abort()\n }\n // Show loading animation\n $terms.parent().addClass('su-generator-loading')\n },\n success: function (data) {\n // Remove previous options\n $terms.find('option').remove()\n // Append new options\n $terms.append(data)\n // Hide loading animation\n $terms.parent().removeClass('su-generator-loading')\n }\n }\n )\n }\n )\n // Init shadow pickers\n $('.su-generator-shadow-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-shadow-picker-field input')\n var $hoff = $picker.find('.su-generator-sp-hoff')\n var $voff = $picker.find('.su-generator-sp-voff')\n var $blur = $picker.find('.su-generator-sp-blur')\n var $color = {\n cnt: $picker.find('.su-generator-shadow-picker-color'),\n value: $picker.find('.su-generator-shadow-picker-color-value'),\n wheel: $picker.find('.su-generator-shadow-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($hoff.val() + 'px ' + $voff.val() + 'px ' + $blur.val() + 'px ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 4) {\n $hoff.val(value[0].replace('px', ''))\n $voff.val(value[1].replace('px', ''))\n $blur.val(value[2].replace('px', ''))\n $color.value.val(value[3])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Init border pickers\n $('.su-generator-border-picker').each(\n function (index) {\n var $picker = $(this)\n var $fields = $picker.find('.su-generator-border-picker-field input, .su-generator-border-picker-field select')\n var $width = $picker.find('.su-generator-bp-width')\n var $style = $picker.find('.su-generator-bp-style')\n var $color = {\n cnt: $picker.find('.su-generator-border-picker-color'),\n value: $picker.find('.su-generator-border-picker-color-value'),\n wheel: $picker.find('.su-generator-border-picker-color-wheel')\n }\n var $val = $picker.find('.su-generator-attr')\n // Init color picker\n $color.wheel.farbtastic($color.value)\n $color.value.focus(\n function () {\n $color.wheel.show()\n }\n )\n $color.value.blur(\n function () {\n $color.wheel.hide()\n }\n )\n // Handle text fields\n $fields.on(\n 'change blur keyup',\n function () {\n $val.val($width.val() + 'px ' + $style.val() + ' ' + $color.value.val()).trigger('change')\n }\n )\n $val.on(\n 'keyup',\n function () {\n var value = $(this).val().split(' ')\n // Value is correct\n if (value.length === 3) {\n $width.val(value[0].replace('px', ''))\n $style.val(value[1])\n $color.value.val(value[2])\n $fields.trigger('keyup')\n }\n }\n )\n }\n )\n // Remove skip class when setting is changed\n $settings.find('.su-generator-attr').on(\n 'change keyup blur',\n function () {\n var $cnt = $(this).parents('.su-generator-attr-container')\n var _default = $cnt.data('default')\n var val = $(this).val()\n // Value is changed\n if (val != _default) {\n $cnt.removeClass('su-generator-skip')\n } else {\n $cnt.addClass('su-generator-skip')\n }\n }\n )\n // Init value setters\n $('.su-generator-set-value').click(\n function (e) {\n $(this).parents('.su-generator-attr-container').find('input').val($(this).text()).trigger('change')\n }\n )\n // Save selected value\n $selected.val(shortcode)\n // Load last used preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: 'last_used',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Show loading animation\n // $settings.addClass('su-generator-loading');\n },\n success: function (data) {\n // Remove loading animation\n // $settings.removeClass('su-generator-loading');\n // Set new settings\n self.setSettings(data)\n // Apply selected text to the content field\n var $content = $('#su-generator-content')\n if (typeof self.state.mceSelection !== 'undefined' && self.state.mceSelection !== '' && $content.attr('type') !== 'hidden') {\n $content.val(self.state.mceSelection)\n }\n },\n dataType: 'json'\n }\n )\n },\n dataType: 'html'\n }\n )\n }\n )\n // Insert shortcode\n $('#su-generator').on('click', '.su-generator-insert', self.insertShortcode)\n // Preview shortcode\n $('#su-generator').on(\n 'click',\n '.su-generator-toggle-preview',\n function (e) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var $button = $(this)\n // Hide button\n $button.hide()\n // Show preview box\n $preview.addClass('su-generator-loading').show()\n // Bind updating on settings changes\n $settings.find('input, textarea, select').on(\n 'change keyup blur',\n function () {\n self.updatePreview()\n }\n )\n // Update preview box\n self.updatePreview(true)\n // Prevent default action\n e.preventDefault()\n }\n )\n var gp_hover_timer\n // Presets manager - mouseenter\n $('#su-generator').on(\n 'mouseenter click',\n '.su-generator-presets',\n function () {\n clearTimeout(gp_hover_timer)\n $('.su-gp-popup').show()\n }\n )\n // Presets manager - mouseleave\n $('#su-generator').on(\n 'mouseleave',\n '.su-generator-presets',\n function () {\n gp_hover_timer = window.setTimeout(\n function () {\n $('.su-gp-popup').fadeOut(200)\n },\n 600\n )\n }\n )\n // Presets manager - add new preset\n $('#su-generator').on(\n 'click',\n '.su-gp-new',\n function (e) {\n // Prepare data\n var $container = $(this).parents('.su-generator-presets')\n var $list = $('.su-gp-list')\n var id = new Date().getTime()\n // Ask for preset name\n var name = prompt(SUGL10n.presets_prompt_msg, SUGL10n.presets_prompt_value)\n // Name is entered\n if (name !== '' && name !== null) {\n // Hide default text\n $list.find('b').hide()\n // Add new option\n $list.append('<span data-id=\"' + id + '\"><em>' + name + '</em><i class=\"sui sui-times\"></i></span>')\n // Perform AJAX request\n self.addPreset(id, name)\n }\n }\n )\n // Presets manager - load preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list span',\n function (e) {\n // Prepare data\n var shortcode = $('.su-generator-presets').data('shortcode')\n var id = $(this).data('id')\n var $insert = $('.su-generator-insert')\n // Hide popup\n $('.su-gp-popup').hide()\n // Disable hover timer\n clearTimeout(gp_hover_timer)\n // Get the preset\n $.ajax(\n {\n type: 'GET',\n url: ajaxurl,\n data: {\n action: 'su_generator_get_preset',\n id: id,\n shortcode: shortcode\n },\n beforeSend: function () {\n // Disable insert button\n $insert.addClass('button-primary-disabled').attr('disabled', true)\n },\n success: function (data) {\n // Enable insert button\n $insert.removeClass('button-primary-disabled').attr('disabled', false)\n // Set new settings\n self.setSettings(data)\n },\n dataType: 'json'\n }\n )\n // Prevent default action\n e.preventDefault()\n e.stopPropagation()\n }\n )\n // Presets manager - remove preset\n $('#su-generator').on(\n 'click',\n '.su-gp-list i',\n function (e) {\n // Prepare data\n var $list = $(this).parents('.su-gp-list')\n var $preset = $(this).parent('span')\n var id = $preset.data('id')\n // Remove DOM element\n $preset.remove()\n // Show default text if last preset was removed\n if ($list.find('span').length < 1) {\n $list.find('b').show()\n }\n // Perform ajax request\n self.removePreset(id)\n // Prevent <span> action\n e.stopPropagation()\n // Prevent default action\n e.preventDefault()\n }\n )\n }\n\n /**\n\t * Create new preset with specified name from current settings\n\t */\n self.addPreset = function (id, name) {\n // Prepare shortcode name and current settings\n var shortcode = $('.su-generator-presets').data('shortcode')\n var settings = self.getSettings()\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_add_preset',\n id: id,\n name: name,\n shortcode: shortcode,\n settings: settings\n }\n }\n )\n }\n /**\n\t * Remove preset by ID\n\t */\n self.removePreset = function (id) {\n // Get current shortcode name\n var shortcode = $('.su-generator-presets').data('shortcode')\n // Perform AJAX request\n $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n data: {\n action: 'su_generator_remove_preset',\n id: id,\n shortcode: shortcode\n }\n }\n )\n }\n\n self.parseSettings = function () {\n var settingsSelector = $('#su-generator-option-skip').val() === 'on'\n ? '#su-generator-settings .su-generator-attr-container:not(.su-generator-skip) .su-generator-attr'\n : '#su-generator-settings .su-generator-attr-container .su-generator-attr'\n // Prepare data\n var query = $selected.val()\n var prefix = $prefix.val()\n var $settings = $(settingsSelector)\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var result = new String('')\n // Open shortcode\n result += '[' + prefix + query\n // Add shortcode attributes\n $settings.each(\n function () {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n } else if (typeof value === 'array') {\n value = value.join(',')\n }\n // Add attribute\n if (value !== '') {\n result += ' ' + $(this).attr('name') + '=\"' + $(this).val().toString().replace(/\"/gi, \"'\") + '\"'\n }\n }\n )\n // End of opening tag\n result += ']'\n // Wrap shortcode if content presented\n if (content != 'false') {\n result += content + '[/' + prefix + query + ']'\n }\n // Return result\n return result\n }\n\n self.getSettings = function () {\n // Prepare data\n var query = $selected.val()\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('textarea#su-generator-content')\n var content = $content.length ? $content.val() : 'false'\n var data = {}\n // Add shortcode attributes\n $settings.each(\n function (i) {\n // Prepare field and value\n var $this = $(this)\n var value = ''\n var name = $this.attr('name')\n // Selects\n if ($this.is('select')) {\n value = $this.find('option:selected').val()\n }\n // Other fields\n else {\n value = $this.val()\n }\n // Check that value is not empty\n if (value == null) {\n value = ''\n }\n // Save value\n data[name] = value\n }\n )\n // Add content\n data.content = content.toString()\n // Return data\n return data\n }\n\n self.setSettings = function (data) {\n // Prepare data\n var $settings = $('#su-generator-settings .su-generator-attr')\n var $content = $('#su-generator-content')\n // Loop through settings\n $settings.each(\n function () {\n var $this = $(this)\n var name = $this.attr('name')\n // Data contains value for this field\n if (data.hasOwnProperty(name)) {\n // Set new value\n $this.val(data[name])\n $this.trigger('keyup').trigger('change').trigger('blur')\n }\n }\n )\n // Set content\n if (data.hasOwnProperty('content')) {\n $content.val(data.content).trigger('keyup').trigger('change').trigger('blur')\n }\n // Update preview\n self.updatePreview()\n }\n\n self.updatePreview = function (forced) {\n // Prepare data\n var $preview = $('#su-generator-preview')\n var shortcode = self.parseSettings()\n var previous = $result.text()\n // Check forced mode\n forced = forced || false\n // Break if preview box is hidden (preview isn't enabled)\n if (!$preview.is(':visible')) {\n return\n }\n // Check shortcode is changed is this is not a forced mode\n if (shortcode === previous && !forced) {\n return\n }\n // Run timer to filter often calls\n window.clearTimeout(self.state.preview.timer)\n self.state.preview.timer = window.setTimeout(\n function () {\n self.state.preview.request = $.ajax(\n {\n type: 'POST',\n url: ajaxurl,\n cache: false,\n data: {\n action: 'su_generator_preview',\n shortcode: shortcode\n },\n beforeSend: function () {\n // Abort previous requests\n if (self.state.preview.request) {\n self.state.preview.request.abort()\n }\n // Show loading animation\n $preview.addClass('su-generator-loading').html('')\n },\n success: function (data) {\n // Hide loading animation and set new HTML\n $preview.html(data).removeClass('su-generator-loading')\n },\n dataType: 'html'\n }\n )\n },\n 300\n )\n // Save shortcode to div\n $result.text(shortcode)\n }\n\n self.insert = function (context, args) {\n if (typeof context !== 'string' || typeof args !== 'object') {\n return\n }\n\n self.state.context = context\n self.state.insertArgs = args\n\n var preSelectedShortcode = args.shortcode || ''\n\n var mfpOptions = {\n type: 'inline',\n alignTop: true,\n closeOnBgClick: false,\n mainClass: 'su-generator-mfp',\n items: {\n src: '#su-generator'\n },\n callbacks: {}\n }\n\n mfpOptions.callbacks.open = () => {\n if (preSelectedShortcode) {\n $choice.filter(`[data-shortcode=\"${preSelectedShortcode}\"]`).trigger('click')\n } else {\n window.setTimeout(() => $search.focus(), 200)\n }\n\n // self.el.body.addClass( 'su-mfp-shown' );\n\n if (\n typeof tinyMCE !== 'undefined' &&\n\t\t\t\ttinyMCE.activeEditor != null &&\n\t\t\t\ttinyMCE.activeEditor.hasOwnProperty('selection')\n ) {\n self.state.mceSelection = tinyMCE.activeEditor.selection.getContent({ format: 'text' })\n }\n }\n\n mfpOptions.callbacks.close = () => {\n $search.val('')\n $settings.html('').hide()\n $generator.removeClass('su-generator-narrow')\n $filter.show()\n $choices.show()\n $choice.show()\n\n self.state.mceSelection = ''\n\n // self.el.body.removeClass( 'su-mfp-shown' );\n }\n\n $.magnificPopup.open(mfpOptions)\n }\n\n self.insertShortcode = function () {\n var shortcode = self.parseSettings()\n\n self.addPreset('last_used', SUGL10n.last_used)\n\n $.magnificPopup.close()\n\n $result.text(shortcode)\n\n if (self.state.context === 'html') {\n var HTMLEditor = document.getElementById(self.state.insertArgs.editorID)\n self.insertAtCaret(HTMLEditor, shortcode)\n }\n\n if (self.state.context === 'classic') {\n window.wp.media.editor.insert(shortcode)\n }\n\n if (self.state.context === 'block') {\n var props = self.state.insertArgs.props\n\n if (props.attributes.hasOwnProperty('content')) {\n props.setAttributes({ content: props.attributes.content + shortcode })\n } else if (props.name === 'core/shortcode') {\n var originalText = props.attributes.hasOwnProperty('text')\n ? props.attributes.text\n : ''\n\n props.setAttributes({ text: originalText + shortcode })\n }\n }\n }\n\n self.insertAtCaret = (field, text) => {\n var start = field.selectionStart\n field.value = field.value.substring(0, start) + text + field.value.substring(start)\n field.focus()\n field.selectionStart = start + text.length\n }\n\n return {\n init: self.init,\n insert: self.insert\n }\n})(jQuery)\n\njQuery(document).ready(window.SUG.App.init)\n"]}
|
includes/shortcodes/posts.php
CHANGED
@@ -359,7 +359,7 @@ function su_shortcode_posts( $atts = null, $content = null ) {
|
|
359 |
$tax_relation = $original_atts['tax_relation'];
|
360 |
}
|
361 |
|
362 |
-
$
|
363 |
}
|
364 |
|
365 |
$args = array_merge( $args, $tax_args );
|
359 |
$tax_relation = $original_atts['tax_relation'];
|
360 |
}
|
361 |
|
362 |
+
$tax_args['tax_query']['relation'] = $tax_relation;
|
363 |
}
|
364 |
|
365 |
$args = array_merge( $args, $tax_args );
|
includes/shortcodes/qrcode.php
CHANGED
@@ -12,7 +12,12 @@ su_add_shortcode(
|
|
12 |
'data' => array(
|
13 |
'default' => '',
|
14 |
'name' => __( 'Data', 'shortcodes-ultimate' ),
|
15 |
-
'desc' =>
|
|
|
|
|
|
|
|
|
|
|
16 |
),
|
17 |
'title' => array(
|
18 |
'default' => '',
|
@@ -89,6 +94,7 @@ su_add_shortcode(
|
|
89 |
);
|
90 |
|
91 |
function su_shortcode_qrcode( $atts = null, $content = null ) {
|
|
|
92 |
$atts = shortcode_atts(
|
93 |
array(
|
94 |
'data' => '',
|
@@ -105,21 +111,33 @@ function su_shortcode_qrcode( $atts = null, $content = null ) {
|
|
105 |
$atts,
|
106 |
'qrcode'
|
107 |
);
|
108 |
-
|
109 |
if ( ! $atts['data'] ) {
|
110 |
return su_error_message( 'QR code', __( 'please specify the data', 'shortcodes-ultimate' ) );
|
111 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
$atts['data'] = su_do_attribute( $atts['data'] );
|
113 |
$atts['data'] = sanitize_text_field( $atts['data'] );
|
114 |
-
|
115 |
-
$href = ( $atts['link'] ) ? ' href="' . $atts['link'] . '"' : '';
|
116 |
-
// Prepare clickable class
|
117 |
if ( $atts['link'] ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
$atts['class'] .= ' su-qrcode-clickable';
|
|
|
119 |
}
|
120 |
-
|
121 |
$atts['title'] = esc_attr( $atts['title'] );
|
122 |
-
|
123 |
su_query_asset( 'css', 'su-shortcodes' );
|
124 |
|
125 |
$url = add_query_arg(
|
@@ -134,6 +152,14 @@ function su_shortcode_qrcode( $atts = null, $content = null ) {
|
|
134 |
'https://api.qrserver.com/v1/create-qr-code/'
|
135 |
);
|
136 |
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
12 |
'data' => array(
|
13 |
'default' => '',
|
14 |
'name' => __( 'Data', 'shortcodes-ultimate' ),
|
15 |
+
'desc' => sprintf(
|
16 |
+
// translators: %1$s and %2$s will be replaced with %CURRENT_URL% and %PERMALINK% tokens respectively
|
17 |
+
__( 'The content to store in the QR code. You can use here any text or even URL.<br>Use %1$s to display the URL of the current page or %2$s to display the permalink of the current post.', 'shortcodes-ultimate' ),
|
18 |
+
'<b%value>%CURRENT_URL%</b>',
|
19 |
+
'<b%value>%PERMALINK%</b>'
|
20 |
+
),
|
21 |
),
|
22 |
'title' => array(
|
23 |
'default' => '',
|
94 |
);
|
95 |
|
96 |
function su_shortcode_qrcode( $atts = null, $content = null ) {
|
97 |
+
|
98 |
$atts = shortcode_atts(
|
99 |
array(
|
100 |
'data' => '',
|
111 |
$atts,
|
112 |
'qrcode'
|
113 |
);
|
114 |
+
|
115 |
if ( ! $atts['data'] ) {
|
116 |
return su_error_message( 'QR code', __( 'please specify the data', 'shortcodes-ultimate' ) );
|
117 |
}
|
118 |
+
|
119 |
+
$atts['data'] = str_replace(
|
120 |
+
array( '%CURRENT_URL%', '%PERMALINK%' ),
|
121 |
+
array( su_get_current_url(), get_permalink() ),
|
122 |
+
$atts['data']
|
123 |
+
);
|
124 |
+
|
125 |
$atts['data'] = su_do_attribute( $atts['data'] );
|
126 |
$atts['data'] = sanitize_text_field( $atts['data'] );
|
127 |
+
|
|
|
|
|
128 |
if ( $atts['link'] ) {
|
129 |
+
|
130 |
+
$atts['link'] = sprintf(
|
131 |
+
' href="%s"',
|
132 |
+
esc_url( su_do_attribute( $atts['link'] ) )
|
133 |
+
);
|
134 |
+
|
135 |
$atts['class'] .= ' su-qrcode-clickable';
|
136 |
+
|
137 |
}
|
138 |
+
|
139 |
$atts['title'] = esc_attr( $atts['title'] );
|
140 |
+
|
141 |
su_query_asset( 'css', 'su-shortcodes' );
|
142 |
|
143 |
$url = add_query_arg(
|
152 |
'https://api.qrserver.com/v1/create-qr-code/'
|
153 |
);
|
154 |
|
155 |
+
return sprintf(
|
156 |
+
'<span class="su-qrcode su-qrcode-align-%1$s%2$s"><a%3$s target="_%4$s" title="%5$s"><img src="%6$s" alt="%5$s" /></a></span>',
|
157 |
+
/* %1$s */ $atts['align'],
|
158 |
+
/* %2$s */ su_get_css_class( $atts ),
|
159 |
+
/* %3$s */ $atts['link'],
|
160 |
+
/* %4$s */ $atts['target'],
|
161 |
+
/* %5$s */ $atts['title'],
|
162 |
+
/* %6$s */ esc_url( $url )
|
163 |
+
);
|
164 |
+
|
165 |
}
|
includes/shortcodes/tooltip.php
CHANGED
@@ -14,7 +14,7 @@ su_add_shortcode(
|
|
14 |
'name' => __( 'Tooltip title', 'shortcodes-ultimate' ),
|
15 |
'desc' => __( 'Title of the tooltip. Use empty value to hide the title', 'shortcodes-ultimate' ),
|
16 |
),
|
17 |
-
'
|
18 |
'default' => __( 'Tooltip content', 'shortcodes-ultimate' ),
|
19 |
'name' => __( 'Tooltip content', 'shortcodes-ultimate' ),
|
20 |
'desc' => __( 'Content of the tooltip', 'shortcodes-ultimate' ),
|
@@ -125,6 +125,8 @@ function su_shortcode_tooltip( $atts = null, $content = null ) {
|
|
125 |
'reference_tag' => 'span',
|
126 |
'line_height' => '1.25',
|
127 |
'hide_delay' => '0',
|
|
|
|
|
128 |
)
|
129 |
);
|
130 |
|
@@ -172,6 +174,10 @@ function su_shortcode_tooltip( $atts = null, $content = null ) {
|
|
172 |
|
173 |
}
|
174 |
|
|
|
|
|
|
|
|
|
175 |
if ( 'no' === $atts['rounded'] ) {
|
176 |
$atts['radius'] = 0;
|
177 |
}
|
@@ -183,14 +189,6 @@ function su_shortcode_tooltip( $atts = null, $content = null ) {
|
|
183 |
$atts['position']
|
184 |
);
|
185 |
|
186 |
-
foreach ( array( 'max_width', 'font_size', 'radius' ) as $attr ) {
|
187 |
-
$atts[ $attr ] = su_maybe_add_css_units( $atts[ $attr ], 'px' );
|
188 |
-
}
|
189 |
-
|
190 |
-
foreach ( array( 'text_align', 'shadow', 'outline', 'reference_tag' ) as $attr ) {
|
191 |
-
$atts[ $attr ] = sanitize_key( $atts[ $attr ] );
|
192 |
-
}
|
193 |
-
|
194 |
$atts['tabindex'] = 'yes' === $atts['tabindex'] ? ' tabindex="0"' : '';
|
195 |
|
196 |
$js_settings = array(
|
@@ -203,7 +201,7 @@ function su_shortcode_tooltip( $atts = null, $content = null ) {
|
|
203 |
su_query_asset( 'js', 'popper' );
|
204 |
su_query_asset( 'js', 'su-shortcodes' );
|
205 |
|
206 |
-
$template = '<{{REFERENCE_TAG}} id="{{ID}}_button" class="su-tooltip-button su-tooltip-button-outline-{{OUTLINE}}{{CSS_CLASS}}" aria-describedby="{{ID}}" data-settings=\'{{JSON}}\'{{TABINDEX}}>{{BUTTON}}</{{REFERENCE_TAG}}><span style="display:none" id="{{ID}}" class="su-tooltip{{CSS_CLASS}}" role="tooltip"><span class="su-tooltip-inner su-tooltip-shadow-{{SHADOW}}" style="background:{{BACKGROUND}};color:{{COLOR}};font-size:{{FONT_SIZE}};border-radius:{{RADIUS}};text-align:{{ALIGN}};max-width:{{MAX_WIDTH}};line-height:{{LINE_HEIGHT}}"><span class="su-tooltip-title">{{TITLE}}</span><span class="su-tooltip-content su-u-trim">{{
|
207 |
|
208 |
$template_data = array(
|
209 |
'{{ID}}' => uniqid( 'su_tooltip_' ),
|
@@ -211,18 +209,19 @@ function su_shortcode_tooltip( $atts = null, $content = null ) {
|
|
211 |
'{{JSON}}' => wp_json_encode( $js_settings ),
|
212 |
'{{BUTTON}}' => do_shortcode( $content ),
|
213 |
'{{TITLE}}' => su_do_attribute( $atts['title'] ),
|
214 |
-
'{{
|
215 |
-
'{{SHADOW}}' => $atts['shadow'],
|
216 |
-
'{{RADIUS}}' => $atts['radius'],
|
217 |
'{{BACKGROUND}}' => $atts['background'],
|
218 |
'{{COLOR}}' => $atts['color'],
|
219 |
-
'{{FONT_SIZE}}' => $atts['font_size'],
|
220 |
-
'{{MAX_WIDTH}}' => $atts['max_width'],
|
221 |
-
'{{ALIGN}}' => $atts['text_align'],
|
222 |
-
'{{OUTLINE}}' => $atts['outline'],
|
223 |
-
'{{REFERENCE_TAG}}' => $atts['reference_tag'],
|
224 |
'{{TABINDEX}}' => $atts['tabindex'],
|
225 |
'{{LINE_HEIGHT}}' => $atts['line_height'],
|
|
|
226 |
);
|
227 |
|
228 |
return str_replace(
|
14 |
'name' => __( 'Tooltip title', 'shortcodes-ultimate' ),
|
15 |
'desc' => __( 'Title of the tooltip. Use empty value to hide the title', 'shortcodes-ultimate' ),
|
16 |
),
|
17 |
+
'text' => array(
|
18 |
'default' => __( 'Tooltip content', 'shortcodes-ultimate' ),
|
19 |
'name' => __( 'Tooltip content', 'shortcodes-ultimate' ),
|
20 |
'desc' => __( 'Content of the tooltip', 'shortcodes-ultimate' ),
|
125 |
'reference_tag' => 'span',
|
126 |
'line_height' => '1.25',
|
127 |
'hide_delay' => '0',
|
128 |
+
'content' => '',
|
129 |
+
'z_index' => '100',
|
130 |
)
|
131 |
);
|
132 |
|
174 |
|
175 |
}
|
176 |
|
177 |
+
if ( ! empty( $atts['content'] ) ) {
|
178 |
+
$atts['text'] = $atts['content'];
|
179 |
+
}
|
180 |
+
|
181 |
if ( 'no' === $atts['rounded'] ) {
|
182 |
$atts['radius'] = 0;
|
183 |
}
|
189 |
$atts['position']
|
190 |
);
|
191 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
$atts['tabindex'] = 'yes' === $atts['tabindex'] ? ' tabindex="0"' : '';
|
193 |
|
194 |
$js_settings = array(
|
201 |
su_query_asset( 'js', 'popper' );
|
202 |
su_query_asset( 'js', 'su-shortcodes' );
|
203 |
|
204 |
+
$template = '<{{REFERENCE_TAG}} id="{{ID}}_button" class="su-tooltip-button su-tooltip-button-outline-{{OUTLINE}}{{CSS_CLASS}}" aria-describedby="{{ID}}" data-settings=\'{{JSON}}\'{{TABINDEX}}>{{BUTTON}}</{{REFERENCE_TAG}}><span style="display:none" id="{{ID}}" class="su-tooltip{{CSS_CLASS}}" role="tooltip"><span class="su-tooltip-inner su-tooltip-shadow-{{SHADOW}}" style="z-index:{{Z_INDEX}};background:{{BACKGROUND}};color:{{COLOR}};font-size:{{FONT_SIZE}};border-radius:{{RADIUS}};text-align:{{ALIGN}};max-width:{{MAX_WIDTH}};line-height:{{LINE_HEIGHT}}"><span class="su-tooltip-title">{{TITLE}}</span><span class="su-tooltip-content su-u-trim">{{TEXT}}</span></span><span id="{{ID}}_arrow" class="su-tooltip-arrow" style="z-index:{{Z_INDEX}};background:{{BACKGROUND}}" data-popper-arrow></span></span>';
|
205 |
|
206 |
$template_data = array(
|
207 |
'{{ID}}' => uniqid( 'su_tooltip_' ),
|
209 |
'{{JSON}}' => wp_json_encode( $js_settings ),
|
210 |
'{{BUTTON}}' => do_shortcode( $content ),
|
211 |
'{{TITLE}}' => su_do_attribute( $atts['title'] ),
|
212 |
+
'{{TEXT}}' => su_do_attribute( $atts['text'] ),
|
213 |
+
'{{SHADOW}}' => sanitize_key( $atts['shadow'] ),
|
214 |
+
'{{RADIUS}}' => su_maybe_add_css_units( $atts['radius'], 'px' ),
|
215 |
'{{BACKGROUND}}' => $atts['background'],
|
216 |
'{{COLOR}}' => $atts['color'],
|
217 |
+
'{{FONT_SIZE}}' => su_maybe_add_css_units( $atts['font_size'], 'px' ),
|
218 |
+
'{{MAX_WIDTH}}' => su_maybe_add_css_units( $atts['max_width'], 'px' ),
|
219 |
+
'{{ALIGN}}' => sanitize_key( $atts['text_align'] ),
|
220 |
+
'{{OUTLINE}}' => sanitize_key( $atts['outline'] ),
|
221 |
+
'{{REFERENCE_TAG}}' => sanitize_key( $atts['reference_tag'] ),
|
222 |
'{{TABINDEX}}' => $atts['tabindex'],
|
223 |
'{{LINE_HEIGHT}}' => $atts['line_height'],
|
224 |
+
'{{Z_INDEX}}' => intval( $atts['z_index'] ),
|
225 |
);
|
226 |
|
227 |
return str_replace(
|
languages/shortcodes-ultimate.pot
CHANGED
@@ -13,7 +13,7 @@ msgstr ""
|
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
-
#: admin/class-shortcodes-ultimate-admin-addons.php:26, admin/class-shortcodes-ultimate-admin-addons.php:29, admin/class-shortcodes-ultimate-admin-addons.php:54, inc/core/generator.php:
|
17 |
msgid "Add-ons"
|
18 |
msgstr ""
|
19 |
|
@@ -82,7 +82,7 @@ msgstr ""
|
|
82 |
msgid "Shadow"
|
83 |
msgstr ""
|
84 |
|
85 |
-
#: admin/class-shortcodes-ultimate-admin-settings.php:70, admin/class-shortcodes-ultimate-admin-settings.php:71, admin/class-shortcodes-ultimate-admin-settings.php:186, inc/core/generator.php:
|
86 |
msgid "Settings"
|
87 |
msgstr ""
|
88 |
|
@@ -174,11 +174,11 @@ msgstr ""
|
|
174 |
msgid "Available shortcodes"
|
175 |
msgstr ""
|
176 |
|
177 |
-
#: admin/class-shortcodes-ultimate-admin-shortcodes.php:88, admin/class-shortcodes-ultimate-admin-top-level.php:39, admin/class-shortcodes-ultimate-admin.php:267,
|
178 |
msgid "Shortcodes Ultimate"
|
179 |
msgstr ""
|
180 |
|
181 |
-
#: admin/class-shortcodes-ultimate-admin-shortcodes.php:305, inc/core/generator.php:
|
182 |
msgid "All shortcodes"
|
183 |
msgstr ""
|
184 |
|
@@ -262,6 +262,10 @@ msgstr ""
|
|
262 |
msgid "Shortcodes"
|
263 |
msgstr ""
|
264 |
|
|
|
|
|
|
|
|
|
265 |
#. translators: %1$s - required version number, %2$s - current version number
|
266 |
#: includes/class-shortcodes-ultimate-activator.php:49
|
267 |
msgid "Shortcodes Ultimate is not activated, because it requires PHP version %1$s (or higher). You have version %2$s."
|
@@ -422,94 +426,86 @@ msgstr ""
|
|
422 |
msgid "Select taxonomy and it's terms.<br>You can select multiple terms with Ctrl (Cmd) key"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: inc/core/generator.php:
|
426 |
msgid "Insert shortcode"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: inc/core/generator.php:
|
430 |
msgid "Plugin settings"
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: inc/core/generator.php:
|
434 |
msgid "Plugin homepage"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: inc/core/generator.php:
|
438 |
msgid "Premium Add-ons"
|
439 |
msgstr ""
|
440 |
|
441 |
-
#: inc/core/generator.php:
|
442 |
msgid "Search for shortcodes"
|
443 |
msgstr ""
|
444 |
|
445 |
-
#: inc/core/generator.php:
|
446 |
msgid "Pro Tip"
|
447 |
msgstr ""
|
448 |
|
449 |
-
#: inc/core/generator.php:
|
450 |
msgid "Filter by type"
|
451 |
msgstr ""
|
452 |
|
453 |
-
#: inc/core/generator.php:
|
454 |
msgid "Shortcode not specified"
|
455 |
msgstr ""
|
456 |
|
457 |
-
#: inc/core/generator.php:
|
458 |
msgid "Live preview"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: inc/core/generator.php:
|
462 |
msgid "Click to return to the shortcodes list"
|
463 |
msgstr ""
|
464 |
|
465 |
-
#: inc/core/generator.php:
|
466 |
msgid "Click to set this value"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: inc/core/generator.php:
|
470 |
msgid "Content"
|
471 |
msgstr ""
|
472 |
|
473 |
-
#: inc/core/generator.php:
|
474 |
msgid "Preview"
|
475 |
msgstr ""
|
476 |
|
477 |
-
#: inc/core/generator.php:
|
478 |
msgid "Access denied"
|
479 |
msgstr ""
|
480 |
|
481 |
-
#: inc/core/generator.php:
|
482 |
msgid "Presets"
|
483 |
msgstr ""
|
484 |
|
485 |
-
#: inc/core/generator.php:
|
486 |
msgid "Save current settings as preset"
|
487 |
msgstr ""
|
488 |
|
489 |
-
#: inc/core/generator.php:
|
490 |
msgid "Presets not found"
|
491 |
msgstr ""
|
492 |
|
493 |
-
#: inc/core/generator.php:
|
494 |
msgid "Get more styles"
|
495 |
msgstr ""
|
496 |
|
497 |
-
#: inc/core/generator.php:
|
498 |
msgid "Additional skins successfully installed"
|
499 |
msgstr ""
|
500 |
|
501 |
-
#: inc/core/generator.php:
|
502 |
msgid "Open dropdown to choose one of new styles"
|
503 |
msgstr ""
|
504 |
|
505 |
-
#: inc/core/widget.php:7
|
506 |
-
msgid "Shortcodes Ultimate widget"
|
507 |
-
msgstr ""
|
508 |
-
|
509 |
-
#: inc/core/widget.php:46
|
510 |
-
msgid "Title:"
|
511 |
-
msgstr ""
|
512 |
-
|
513 |
#: includes/config/addons.php:9
|
514 |
msgid "Add-ons Bundle"
|
515 |
msgstr ""
|
@@ -542,7 +538,7 @@ msgstr ""
|
|
542 |
msgid "Add more style to your shortcodes"
|
543 |
msgstr ""
|
544 |
|
545 |
-
#: includes/config/borders.php:6, includes/shortcodes/carousel.php:36, includes/shortcodes/custom-gallery.php:30, includes/shortcodes/display-posts.php:114, includes/shortcodes/image-carousel.php:87, includes/shortcodes/image-carousel.php:130, includes/shortcodes/posts.php:139, includes/shortcodes/qrcode.php:
|
546 |
msgid "None"
|
547 |
msgstr ""
|
548 |
|
@@ -622,11 +618,11 @@ msgstr ""
|
|
622 |
msgid "Accordion"
|
623 |
msgstr ""
|
624 |
|
625 |
-
#: includes/shortcodes/accordion.php:14, includes/shortcodes/animate.php:44, includes/shortcodes/audio.php:37, includes/shortcodes/box.php:56, includes/shortcodes/button.php:144, includes/shortcodes/carousel.php:143, includes/shortcodes/column.php:40, includes/shortcodes/csv-table.php:52, includes/shortcodes/custom-gallery.php:82, includes/shortcodes/dailymotion.php:103, includes/shortcodes/display-posts.php:223, includes/shortcodes/divider.php:74, includes/shortcodes/document.php:50, includes/shortcodes/dropcap.php:33, includes/shortcodes/dummy-image.php:53, includes/shortcodes/dummy-text.php:46, includes/shortcodes/expand.php:88, includes/shortcodes/feed.php:39, includes/shortcodes/frame.php:25, includes/shortcodes/gmap.php:58, includes/shortcodes/guests.php:13, includes/shortcodes/heading.php:56, includes/shortcodes/highlight.php:26, includes/shortcodes/image-carousel.php:193, includes/shortcodes/label.php:27, includes/shortcodes/lightbox-content.php:109, includes/shortcodes/lightbox.php:38, includes/shortcodes/list.php:35, includes/shortcodes/members.php:35, includes/shortcodes/menu.php:18, includes/shortcodes/note.php:37, includes/shortcodes/permalink.php:38, includes/shortcodes/private.php:13, includes/shortcodes/pullquote.php:22, includes/shortcodes/qrcode.php:
|
626 |
msgid "Extra CSS class"
|
627 |
msgstr ""
|
628 |
|
629 |
-
#: includes/shortcodes/accordion.php:15, includes/shortcodes/animate.php:45, includes/shortcodes/audio.php:38, includes/shortcodes/box.php:57, includes/shortcodes/button.php:145, includes/shortcodes/carousel.php:144, includes/shortcodes/column.php:41, includes/shortcodes/csv-table.php:53, includes/shortcodes/custom-gallery.php:83, includes/shortcodes/dailymotion.php:104, includes/shortcodes/display-posts.php:224, includes/shortcodes/divider.php:75, includes/shortcodes/document.php:51, includes/shortcodes/dropcap.php:34, includes/shortcodes/dummy-image.php:54, includes/shortcodes/dummy-text.php:47, includes/shortcodes/expand.php:89, includes/shortcodes/feed.php:40, includes/shortcodes/gmap.php:59, includes/shortcodes/guests.php:14, includes/shortcodes/heading.php:57, includes/shortcodes/highlight.php:27, includes/shortcodes/image-carousel.php:194, includes/shortcodes/label.php:28, includes/shortcodes/lightbox-content.php:110, includes/shortcodes/lightbox.php:39, includes/shortcodes/list.php:36, includes/shortcodes/members.php:36, includes/shortcodes/menu.php:19, includes/shortcodes/note.php:38, includes/shortcodes/permalink.php:39, includes/shortcodes/private.php:14, includes/shortcodes/pullquote.php:23, includes/shortcodes/qrcode.php:
|
630 |
msgid "Additional CSS class name(s) separated by space(s)"
|
631 |
msgstr ""
|
632 |
|
@@ -726,7 +722,7 @@ msgstr ""
|
|
726 |
msgid "Box title"
|
727 |
msgstr ""
|
728 |
|
729 |
-
#: includes/shortcodes/box.php:15, includes/shortcodes/dailymotion.php:97, includes/shortcodes/document.php:44, includes/shortcodes/gmap.php:52, includes/shortcodes/permalink.php:28, includes/shortcodes/qrcode.php:
|
730 |
msgid "Title"
|
731 |
msgstr ""
|
732 |
|
@@ -806,7 +802,7 @@ msgstr ""
|
|
806 |
msgid "Button"
|
807 |
msgstr ""
|
808 |
|
809 |
-
#: includes/shortcodes/button.php:15, includes/shortcodes/qrcode.php:
|
810 |
msgid "Link"
|
811 |
msgstr ""
|
812 |
|
@@ -814,11 +810,11 @@ msgstr ""
|
|
814 |
msgid "Button link"
|
815 |
msgstr ""
|
816 |
|
817 |
-
#: includes/shortcodes/button.php:21, includes/shortcodes/carousel.php:50, includes/shortcodes/custom-gallery.php:44, includes/shortcodes/feed.php:30, includes/shortcodes/image-carousel.php:144, includes/shortcodes/permalink.php:19, includes/shortcodes/qrcode.php:
|
818 |
msgid "Open in same tab"
|
819 |
msgstr ""
|
820 |
|
821 |
-
#: includes/shortcodes/button.php:22, includes/shortcodes/carousel.php:51, includes/shortcodes/custom-gallery.php:45, includes/shortcodes/feed.php:31, includes/shortcodes/image-carousel.php:145, includes/shortcodes/permalink.php:20, includes/shortcodes/qrcode.php:
|
822 |
msgid "Open in new tab"
|
823 |
msgstr ""
|
824 |
|
@@ -866,7 +862,7 @@ msgstr ""
|
|
866 |
msgid "Button text color"
|
867 |
msgstr ""
|
868 |
|
869 |
-
#: includes/shortcodes/button.php:65, includes/shortcodes/column.php:29, includes/shortcodes/divider.php:60, includes/shortcodes/dropcap.php:28, includes/shortcodes/heading.php:26, includes/shortcodes/qrcode.php:
|
870 |
msgid "Size"
|
871 |
msgstr ""
|
872 |
|
@@ -1087,7 +1083,7 @@ msgstr ""
|
|
1087 |
msgid "Display titles for each item"
|
1088 |
msgstr ""
|
1089 |
|
1090 |
-
#: includes/shortcodes/carousel.php:106, includes/shortcodes/expand.php:67, includes/shortcodes/frame.php:15, includes/shortcodes/heading.php:33, includes/shortcodes/image-carousel.php:90, includes/shortcodes/lightbox-content.php:76, includes/shortcodes/qrcode.php:
|
1091 |
msgid "Center"
|
1092 |
msgstr ""
|
1093 |
|
@@ -1327,7 +1323,7 @@ msgstr ""
|
|
1327 |
msgid "Start the playback of the video automatically after the player load. May not work on some mobile OS versions"
|
1328 |
msgstr ""
|
1329 |
|
1330 |
-
#: includes/shortcodes/dailymotion.php:50, includes/shortcodes/lightbox-content.php:86, includes/shortcodes/qrcode.php:
|
1331 |
msgid "Background color"
|
1332 |
msgstr ""
|
1333 |
|
@@ -1769,7 +1765,7 @@ msgstr ""
|
|
1769 |
msgid "Height of the divider (in pixels)"
|
1770 |
msgstr ""
|
1771 |
|
1772 |
-
#: includes/shortcodes/divider.php:69, includes/shortcodes/heading.php:46, includes/shortcodes/lightbox-content.php:60, includes/shortcodes/qrcode.php:
|
1773 |
msgid "Margin"
|
1774 |
msgstr ""
|
1775 |
|
@@ -2017,11 +2013,11 @@ msgstr ""
|
|
2017 |
msgid "Select the style for more/less link"
|
2018 |
msgstr ""
|
2019 |
|
2020 |
-
#: includes/shortcodes/expand.php:66, includes/shortcodes/frame.php:14, includes/shortcodes/heading.php:32, includes/shortcodes/image-carousel.php:88, includes/shortcodes/lightbox-content.php:75, includes/shortcodes/pullquote.php:14, includes/shortcodes/qrcode.php:
|
2021 |
msgid "Left"
|
2022 |
msgstr ""
|
2023 |
|
2024 |
-
#: includes/shortcodes/expand.php:68, includes/shortcodes/frame.php:16, includes/shortcodes/heading.php:34, includes/shortcodes/image-carousel.php:89, includes/shortcodes/lightbox-content.php:77, includes/shortcodes/pullquote.php:15, includes/shortcodes/qrcode.php:
|
2025 |
msgid "Right"
|
2026 |
msgstr ""
|
2027 |
|
@@ -2093,7 +2089,7 @@ msgstr ""
|
|
2093 |
msgid "Frame"
|
2094 |
msgstr ""
|
2095 |
|
2096 |
-
#: includes/shortcodes/frame.php:19, includes/shortcodes/heading.php:37, includes/shortcodes/pullquote.php:18, includes/shortcodes/qrcode.php:
|
2097 |
msgid "Align"
|
2098 |
msgstr ""
|
2099 |
|
@@ -2505,7 +2501,7 @@ msgstr ""
|
|
2505 |
msgid "Select the text alignment"
|
2506 |
msgstr ""
|
2507 |
|
2508 |
-
#: includes/shortcodes/lightbox-content.php:87, includes/shortcodes/qrcode.php:
|
2509 |
msgid "Pick a background color"
|
2510 |
msgstr ""
|
2511 |
|
@@ -2762,7 +2758,7 @@ msgstr ""
|
|
2762 |
msgid "Post or page ID"
|
2763 |
msgstr ""
|
2764 |
|
2765 |
-
#: includes/shortcodes/permalink.php:24, includes/shortcodes/qrcode.php:
|
2766 |
msgid "Link target"
|
2767 |
msgstr ""
|
2768 |
|
@@ -2958,47 +2954,48 @@ msgstr ""
|
|
2958 |
msgid "QR code"
|
2959 |
msgstr ""
|
2960 |
|
2961 |
-
|
2962 |
-
|
|
|
2963 |
msgstr ""
|
2964 |
|
2965 |
-
#: includes/shortcodes/qrcode.php:
|
2966 |
msgid "Enter here short description. This text will be used in alt attribute of QR code"
|
2967 |
msgstr ""
|
2968 |
|
2969 |
-
#: includes/shortcodes/qrcode.php:
|
2970 |
msgid "Image width and height (in pixels)"
|
2971 |
msgstr ""
|
2972 |
|
2973 |
-
#: includes/shortcodes/qrcode.php:
|
2974 |
msgid "Thickness of a margin (in pixels)"
|
2975 |
msgstr ""
|
2976 |
|
2977 |
-
#: includes/shortcodes/qrcode.php:
|
2978 |
msgid "Choose image alignment"
|
2979 |
msgstr ""
|
2980 |
|
2981 |
-
#: includes/shortcodes/qrcode.php:
|
2982 |
msgid "You can make this QR code clickable. Enter here the URL"
|
2983 |
msgstr ""
|
2984 |
|
2985 |
-
#: includes/shortcodes/qrcode.php:
|
2986 |
msgid "Select link target"
|
2987 |
msgstr ""
|
2988 |
|
2989 |
-
#: includes/shortcodes/qrcode.php:
|
2990 |
msgid "Primary color"
|
2991 |
msgstr ""
|
2992 |
|
2993 |
-
#: includes/shortcodes/qrcode.php:
|
2994 |
msgid "Pick a primary color"
|
2995 |
msgstr ""
|
2996 |
|
2997 |
-
#: includes/shortcodes/qrcode.php:
|
2998 |
msgid "Advanced QR code generator"
|
2999 |
msgstr ""
|
3000 |
|
3001 |
-
#: includes/shortcodes/qrcode.php:
|
3002 |
msgid "please specify the data"
|
3003 |
msgstr ""
|
3004 |
|
@@ -3967,6 +3964,10 @@ msgstr ""
|
|
3967 |
msgid "Back to shortcodes list"
|
3968 |
msgstr ""
|
3969 |
|
|
|
|
|
|
|
|
|
3970 |
#: admin/partials/settings/fields/checkbox.php:3
|
3971 |
msgid "Enabled"
|
3972 |
msgstr ""
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
+
#: admin/class-shortcodes-ultimate-admin-addons.php:26, admin/class-shortcodes-ultimate-admin-addons.php:29, admin/class-shortcodes-ultimate-admin-addons.php:54, inc/core/generator.php:215, admin/partials/help/sidebar.php:6
|
17 |
msgid "Add-ons"
|
18 |
msgstr ""
|
19 |
|
82 |
msgid "Shadow"
|
83 |
msgstr ""
|
84 |
|
85 |
+
#: admin/class-shortcodes-ultimate-admin-settings.php:70, admin/class-shortcodes-ultimate-admin-settings.php:71, admin/class-shortcodes-ultimate-admin-settings.php:186, inc/core/generator.php:209
|
86 |
msgid "Settings"
|
87 |
msgstr ""
|
88 |
|
174 |
msgid "Available shortcodes"
|
175 |
msgstr ""
|
176 |
|
177 |
+
#: admin/class-shortcodes-ultimate-admin-shortcodes.php:88, admin/class-shortcodes-ultimate-admin-top-level.php:39, admin/class-shortcodes-ultimate-admin.php:267, admin/class-shortcodes-ultimate-widget.php:26, admin/class-shortcodes-ultimate-widget.php:77, includes/functions-galleries.php:297, admin/partials/help/sidebar.php:3
|
178 |
msgid "Shortcodes Ultimate"
|
179 |
msgstr ""
|
180 |
|
181 |
+
#: admin/class-shortcodes-ultimate-admin-shortcodes.php:305, inc/core/generator.php:284, admin/partials/extra/generator.php:2
|
182 |
msgid "All shortcodes"
|
183 |
msgstr ""
|
184 |
|
262 |
msgid "Shortcodes"
|
263 |
msgstr ""
|
264 |
|
265 |
+
#: admin/class-shortcodes-ultimate-widget.php:15
|
266 |
+
msgid "Shortcodes Ultimate widget"
|
267 |
+
msgstr ""
|
268 |
+
|
269 |
#. translators: %1$s - required version number, %2$s - current version number
|
270 |
#: includes/class-shortcodes-ultimate-activator.php:49
|
271 |
msgid "Shortcodes Ultimate is not activated, because it requires PHP version %1$s (or higher). You have version %2$s."
|
426 |
msgid "Select taxonomy and it's terms.<br>You can select multiple terms with Ctrl (Cmd) key"
|
427 |
msgstr ""
|
428 |
|
429 |
+
#: inc/core/generator.php:56, inc/core/generator.php:124, inc/core/generator.php:152, inc/core/generator.php:279
|
430 |
msgid "Insert shortcode"
|
431 |
msgstr ""
|
432 |
|
433 |
+
#: inc/core/generator.php:209
|
434 |
msgid "Plugin settings"
|
435 |
msgstr ""
|
436 |
|
437 |
+
#: inc/core/generator.php:210, inc/core/generator.php:210
|
438 |
msgid "Plugin homepage"
|
439 |
msgstr ""
|
440 |
|
441 |
+
#: inc/core/generator.php:215, admin/partials/pages/addons.php:14
|
442 |
msgid "Premium Add-ons"
|
443 |
msgstr ""
|
444 |
|
445 |
+
#: inc/core/generator.php:222
|
446 |
msgid "Search for shortcodes"
|
447 |
msgstr ""
|
448 |
|
449 |
+
#: inc/core/generator.php:223
|
450 |
msgid "Pro Tip"
|
451 |
msgstr ""
|
452 |
|
453 |
+
#: inc/core/generator.php:225
|
454 |
msgid "Filter by type"
|
455 |
msgstr ""
|
456 |
|
457 |
+
#: inc/core/generator.php:264
|
458 |
msgid "Shortcode not specified"
|
459 |
msgstr ""
|
460 |
|
461 |
+
#: inc/core/generator.php:280
|
462 |
msgid "Live preview"
|
463 |
msgstr ""
|
464 |
|
465 |
+
#: inc/core/generator.php:284, admin/partials/extra/generator.php:2
|
466 |
msgid "Click to return to the shortcodes list"
|
467 |
msgstr ""
|
468 |
|
469 |
+
#: inc/core/generator.php:305
|
470 |
msgid "Click to set this value"
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: inc/core/generator.php:323, includes/config/groups.php:7
|
474 |
msgid "Content"
|
475 |
msgstr ""
|
476 |
|
477 |
+
#: inc/core/generator.php:340, admin/partials/pages/shortcodes-single-content.php:20
|
478 |
msgid "Preview"
|
479 |
msgstr ""
|
480 |
|
481 |
+
#: inc/core/generator.php:348
|
482 |
msgid "Access denied"
|
483 |
msgstr ""
|
484 |
|
485 |
+
#: inc/core/generator.php:393
|
486 |
msgid "Presets"
|
487 |
msgstr ""
|
488 |
|
489 |
+
#: inc/core/generator.php:396
|
490 |
msgid "Save current settings as preset"
|
491 |
msgstr ""
|
492 |
|
493 |
+
#: inc/core/generator.php:428, inc/core/generator.php:425
|
494 |
msgid "Presets not found"
|
495 |
msgstr ""
|
496 |
|
497 |
+
#: inc/core/generator.php:644
|
498 |
msgid "Get more styles"
|
499 |
msgstr ""
|
500 |
|
501 |
+
#: inc/core/generator.php:635
|
502 |
msgid "Additional skins successfully installed"
|
503 |
msgstr ""
|
504 |
|
505 |
+
#: inc/core/generator.php:636
|
506 |
msgid "Open dropdown to choose one of new styles"
|
507 |
msgstr ""
|
508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
#: includes/config/addons.php:9
|
510 |
msgid "Add-ons Bundle"
|
511 |
msgstr ""
|
538 |
msgid "Add more style to your shortcodes"
|
539 |
msgstr ""
|
540 |
|
541 |
+
#: includes/config/borders.php:6, includes/shortcodes/carousel.php:36, includes/shortcodes/custom-gallery.php:30, includes/shortcodes/display-posts.php:114, includes/shortcodes/image-carousel.php:87, includes/shortcodes/image-carousel.php:130, includes/shortcodes/posts.php:139, includes/shortcodes/qrcode.php:48, includes/shortcodes/slider.php:36
|
542 |
msgid "None"
|
543 |
msgstr ""
|
544 |
|
618 |
msgid "Accordion"
|
619 |
msgstr ""
|
620 |
|
621 |
+
#: includes/shortcodes/accordion.php:14, includes/shortcodes/animate.php:44, includes/shortcodes/audio.php:37, includes/shortcodes/box.php:56, includes/shortcodes/button.php:144, includes/shortcodes/carousel.php:143, includes/shortcodes/column.php:40, includes/shortcodes/csv-table.php:52, includes/shortcodes/custom-gallery.php:82, includes/shortcodes/dailymotion.php:103, includes/shortcodes/display-posts.php:223, includes/shortcodes/divider.php:74, includes/shortcodes/document.php:50, includes/shortcodes/dropcap.php:33, includes/shortcodes/dummy-image.php:53, includes/shortcodes/dummy-text.php:46, includes/shortcodes/expand.php:88, includes/shortcodes/feed.php:39, includes/shortcodes/frame.php:25, includes/shortcodes/gmap.php:58, includes/shortcodes/guests.php:13, includes/shortcodes/heading.php:56, includes/shortcodes/highlight.php:26, includes/shortcodes/image-carousel.php:193, includes/shortcodes/label.php:27, includes/shortcodes/lightbox-content.php:109, includes/shortcodes/lightbox.php:38, includes/shortcodes/list.php:35, includes/shortcodes/members.php:35, includes/shortcodes/menu.php:18, includes/shortcodes/note.php:37, includes/shortcodes/permalink.php:38, includes/shortcodes/private.php:13, includes/shortcodes/pullquote.php:22, includes/shortcodes/qrcode.php:86, includes/shortcodes/quote.php:34, includes/shortcodes/row.php:15, includes/shortcodes/service.php:41, includes/shortcodes/siblings.php:19, includes/shortcodes/slider.php:124, includes/shortcodes/spacer.php:22, includes/shortcodes/spoiler.php:67, includes/shortcodes/subpages.php:25, includes/shortcodes/table.php:34, includes/shortcodes/tabs.php:58, includes/shortcodes/tabs.php:117, includes/shortcodes/tooltip.php:103, includes/shortcodes/video.php:67, includes/shortcodes/vimeo.php:71, includes/shortcodes/youtube-advanced.php:134, includes/shortcodes/youtube.php:60
|
622 |
msgid "Extra CSS class"
|
623 |
msgstr ""
|
624 |
|
625 |
+
#: includes/shortcodes/accordion.php:15, includes/shortcodes/animate.php:45, includes/shortcodes/audio.php:38, includes/shortcodes/box.php:57, includes/shortcodes/button.php:145, includes/shortcodes/carousel.php:144, includes/shortcodes/column.php:41, includes/shortcodes/csv-table.php:53, includes/shortcodes/custom-gallery.php:83, includes/shortcodes/dailymotion.php:104, includes/shortcodes/display-posts.php:224, includes/shortcodes/divider.php:75, includes/shortcodes/document.php:51, includes/shortcodes/dropcap.php:34, includes/shortcodes/dummy-image.php:54, includes/shortcodes/dummy-text.php:47, includes/shortcodes/expand.php:89, includes/shortcodes/feed.php:40, includes/shortcodes/gmap.php:59, includes/shortcodes/guests.php:14, includes/shortcodes/heading.php:57, includes/shortcodes/highlight.php:27, includes/shortcodes/image-carousel.php:194, includes/shortcodes/label.php:28, includes/shortcodes/lightbox-content.php:110, includes/shortcodes/lightbox.php:39, includes/shortcodes/list.php:36, includes/shortcodes/members.php:36, includes/shortcodes/menu.php:19, includes/shortcodes/note.php:38, includes/shortcodes/permalink.php:39, includes/shortcodes/private.php:14, includes/shortcodes/pullquote.php:23, includes/shortcodes/qrcode.php:87, includes/shortcodes/quote.php:35, includes/shortcodes/row.php:16, includes/shortcodes/service.php:42, includes/shortcodes/siblings.php:20, includes/shortcodes/slider.php:125, includes/shortcodes/spacer.php:23, includes/shortcodes/spoiler.php:68, includes/shortcodes/subpages.php:26, includes/shortcodes/table.php:35, includes/shortcodes/tabs.php:59, includes/shortcodes/tabs.php:118, includes/shortcodes/tooltip.php:104, includes/shortcodes/video.php:68, includes/shortcodes/vimeo.php:72, includes/shortcodes/youtube-advanced.php:135, includes/shortcodes/youtube.php:61
|
626 |
msgid "Additional CSS class name(s) separated by space(s)"
|
627 |
msgstr ""
|
628 |
|
722 |
msgid "Box title"
|
723 |
msgstr ""
|
724 |
|
725 |
+
#: includes/shortcodes/box.php:15, includes/shortcodes/dailymotion.php:97, includes/shortcodes/document.php:44, includes/shortcodes/gmap.php:52, includes/shortcodes/permalink.php:28, includes/shortcodes/qrcode.php:24, includes/shortcodes/service.php:15, includes/shortcodes/spoiler.php:13, includes/shortcodes/tabs.php:86, includes/shortcodes/video.php:26, includes/shortcodes/vimeo.php:60, includes/shortcodes/youtube-advanced.php:128, includes/shortcodes/youtube.php:54
|
726 |
msgid "Title"
|
727 |
msgstr ""
|
728 |
|
802 |
msgid "Button"
|
803 |
msgstr ""
|
804 |
|
805 |
+
#: includes/shortcodes/button.php:15, includes/shortcodes/qrcode.php:59
|
806 |
msgid "Link"
|
807 |
msgstr ""
|
808 |
|
810 |
msgid "Button link"
|
811 |
msgstr ""
|
812 |
|
813 |
+
#: includes/shortcodes/button.php:21, includes/shortcodes/carousel.php:50, includes/shortcodes/custom-gallery.php:44, includes/shortcodes/feed.php:30, includes/shortcodes/image-carousel.php:144, includes/shortcodes/permalink.php:19, includes/shortcodes/qrcode.php:65, includes/shortcodes/slider.php:50, includes/shortcodes/tabs.php:108
|
814 |
msgid "Open in same tab"
|
815 |
msgstr ""
|
816 |
|
817 |
+
#: includes/shortcodes/button.php:22, includes/shortcodes/carousel.php:51, includes/shortcodes/custom-gallery.php:45, includes/shortcodes/feed.php:31, includes/shortcodes/image-carousel.php:145, includes/shortcodes/permalink.php:20, includes/shortcodes/qrcode.php:66, includes/shortcodes/slider.php:51, includes/shortcodes/tabs.php:109
|
818 |
msgid "Open in new tab"
|
819 |
msgstr ""
|
820 |
|
862 |
msgid "Button text color"
|
863 |
msgstr ""
|
864 |
|
865 |
+
#: includes/shortcodes/button.php:65, includes/shortcodes/column.php:29, includes/shortcodes/divider.php:60, includes/shortcodes/dropcap.php:28, includes/shortcodes/heading.php:26, includes/shortcodes/qrcode.php:33
|
866 |
msgid "Size"
|
867 |
msgstr ""
|
868 |
|
1083 |
msgid "Display titles for each item"
|
1084 |
msgstr ""
|
1085 |
|
1086 |
+
#: includes/shortcodes/carousel.php:106, includes/shortcodes/expand.php:67, includes/shortcodes/frame.php:15, includes/shortcodes/heading.php:33, includes/shortcodes/image-carousel.php:90, includes/shortcodes/lightbox-content.php:76, includes/shortcodes/qrcode.php:50, includes/shortcodes/slider.php:87, includes/shortcodes/tooltip.php:59
|
1087 |
msgid "Center"
|
1088 |
msgstr ""
|
1089 |
|
1323 |
msgid "Start the playback of the video automatically after the player load. May not work on some mobile OS versions"
|
1324 |
msgstr ""
|
1325 |
|
1326 |
+
#: includes/shortcodes/dailymotion.php:50, includes/shortcodes/lightbox-content.php:86, includes/shortcodes/qrcode.php:81, includes/shortcodes/tooltip.php:37
|
1327 |
msgid "Background color"
|
1328 |
msgstr ""
|
1329 |
|
1765 |
msgid "Height of the divider (in pixels)"
|
1766 |
msgstr ""
|
1767 |
|
1768 |
+
#: includes/shortcodes/divider.php:69, includes/shortcodes/heading.php:46, includes/shortcodes/lightbox-content.php:60, includes/shortcodes/qrcode.php:42
|
1769 |
msgid "Margin"
|
1770 |
msgstr ""
|
1771 |
|
2013 |
msgid "Select the style for more/less link"
|
2014 |
msgstr ""
|
2015 |
|
2016 |
+
#: includes/shortcodes/expand.php:66, includes/shortcodes/frame.php:14, includes/shortcodes/heading.php:32, includes/shortcodes/image-carousel.php:88, includes/shortcodes/lightbox-content.php:75, includes/shortcodes/pullquote.php:14, includes/shortcodes/qrcode.php:49, includes/shortcodes/tooltip.php:27, includes/shortcodes/tooltip.php:58
|
2017 |
msgid "Left"
|
2018 |
msgstr ""
|
2019 |
|
2020 |
+
#: includes/shortcodes/expand.php:68, includes/shortcodes/frame.php:16, includes/shortcodes/heading.php:34, includes/shortcodes/image-carousel.php:89, includes/shortcodes/lightbox-content.php:77, includes/shortcodes/pullquote.php:15, includes/shortcodes/qrcode.php:51, includes/shortcodes/tooltip.php:28, includes/shortcodes/tooltip.php:60
|
2021 |
msgid "Right"
|
2022 |
msgstr ""
|
2023 |
|
2089 |
msgid "Frame"
|
2090 |
msgstr ""
|
2091 |
|
2092 |
+
#: includes/shortcodes/frame.php:19, includes/shortcodes/heading.php:37, includes/shortcodes/pullquote.php:18, includes/shortcodes/qrcode.php:54
|
2093 |
msgid "Align"
|
2094 |
msgstr ""
|
2095 |
|
2501 |
msgid "Select the text alignment"
|
2502 |
msgstr ""
|
2503 |
|
2504 |
+
#: includes/shortcodes/lightbox-content.php:87, includes/shortcodes/qrcode.php:82
|
2505 |
msgid "Pick a background color"
|
2506 |
msgstr ""
|
2507 |
|
2758 |
msgid "Post or page ID"
|
2759 |
msgstr ""
|
2760 |
|
2761 |
+
#: includes/shortcodes/permalink.php:24, includes/shortcodes/qrcode.php:69, includes/shortcodes/tabs.php:112
|
2762 |
msgid "Link target"
|
2763 |
msgstr ""
|
2764 |
|
2954 |
msgid "QR code"
|
2955 |
msgstr ""
|
2956 |
|
2957 |
+
#. translators: %1$s and %2$s will be replaced with %CURRENT_URL% and %PERMALINK% tokens respectively
|
2958 |
+
#: includes/shortcodes/qrcode.php:17
|
2959 |
+
msgid "The content to store in the QR code. You can use here any text or even URL.<br>Use %1$s to display the URL of the current page or %2$s to display the permalink of the current post."
|
2960 |
msgstr ""
|
2961 |
|
2962 |
+
#: includes/shortcodes/qrcode.php:25
|
2963 |
msgid "Enter here short description. This text will be used in alt attribute of QR code"
|
2964 |
msgstr ""
|
2965 |
|
2966 |
+
#: includes/shortcodes/qrcode.php:34
|
2967 |
msgid "Image width and height (in pixels)"
|
2968 |
msgstr ""
|
2969 |
|
2970 |
+
#: includes/shortcodes/qrcode.php:43
|
2971 |
msgid "Thickness of a margin (in pixels)"
|
2972 |
msgstr ""
|
2973 |
|
2974 |
+
#: includes/shortcodes/qrcode.php:55
|
2975 |
msgid "Choose image alignment"
|
2976 |
msgstr ""
|
2977 |
|
2978 |
+
#: includes/shortcodes/qrcode.php:60
|
2979 |
msgid "You can make this QR code clickable. Enter here the URL"
|
2980 |
msgstr ""
|
2981 |
|
2982 |
+
#: includes/shortcodes/qrcode.php:70
|
2983 |
msgid "Select link target"
|
2984 |
msgstr ""
|
2985 |
|
2986 |
+
#: includes/shortcodes/qrcode.php:75
|
2987 |
msgid "Primary color"
|
2988 |
msgstr ""
|
2989 |
|
2990 |
+
#: includes/shortcodes/qrcode.php:76
|
2991 |
msgid "Pick a primary color"
|
2992 |
msgstr ""
|
2993 |
|
2994 |
+
#: includes/shortcodes/qrcode.php:91
|
2995 |
msgid "Advanced QR code generator"
|
2996 |
msgstr ""
|
2997 |
|
2998 |
+
#: includes/shortcodes/qrcode.php:116
|
2999 |
msgid "please specify the data"
|
3000 |
msgstr ""
|
3001 |
|
3964 |
msgid "Back to shortcodes list"
|
3965 |
msgstr ""
|
3966 |
|
3967 |
+
#: admin/partials/widget/form.php:3
|
3968 |
+
msgid "Title:"
|
3969 |
+
msgstr ""
|
3970 |
+
|
3971 |
#: admin/partials/settings/fields/checkbox.php:3
|
3972 |
msgid "Enabled"
|
3973 |
msgstr ""
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: shortcode, toggle, columns, button, slider
|
|
6 |
Requires PHP: 5.3
|
7 |
Requires at least: 4.6
|
8 |
Tested up to: 5.7
|
9 |
-
Stable tag: 5.10.
|
10 |
|
11 |
A comprehensive collection of visual components for your site
|
12 |
|
@@ -146,12 +146,20 @@ First, visit the [Help Center](https://getshortcodes.com/support/). If you get s
|
|
146 |
## Changelog
|
147 |
|
148 |
|
149 |
-
### 5.10.
|
150 |
|
151 |
**What's new**
|
152 |
|
153 |
-
-
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
---
|
157 |
[Version history →](https://plugins.trac.wordpress.org/browser/shortcodes-ultimate/trunk/changelog.txt)
|
6 |
Requires PHP: 5.3
|
7 |
Requires at least: 4.6
|
8 |
Tested up to: 5.7
|
9 |
+
Stable tag: 5.10.1
|
10 |
|
11 |
A comprehensive collection of visual components for your site
|
12 |
|
146 |
## Changelog
|
147 |
|
148 |
|
149 |
+
### 5.10.1
|
150 |
|
151 |
**What's new**
|
152 |
|
153 |
+
- `su_qrcode`'s data attribute now understands the following variables: `%CURRENT_URL%` for the current page URL, and `%PERMALINK%` for post permalink
|
154 |
+
|
155 |
+
**Fixed**
|
156 |
+
|
157 |
+
- Fixed `tax_relation` attribute of the `su_posts` shortcode. Thanks to [janeri2021](https://wordpress.org/support/topic/error-in-shortcode-posts/)
|
158 |
+
- Fixed compatibility with Page Builder by SiteOrigin. [Details](https://github.com/siteorigin/so-widgets-bundle/issues/1247)
|
159 |
+
- Fixed `BlockControls` console warning in the Block Editor
|
160 |
+
- Added missing file `popper.min.js.map`
|
161 |
+
- Fixed issue with invalid z-index value in the Tooltip shortcode
|
162 |
+
- Fixed issue with the shortcode generator presets for the Tooltip shortcode
|
163 |
|
164 |
---
|
165 |
[Version history →](https://plugins.trac.wordpress.org/browser/shortcodes-ultimate/trunk/changelog.txt)
|
shortcodes-ultimate.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Shortcodes Ultimate
|
4 |
* Plugin URI: https://getshortcodes.com/
|
5 |
-
* Version: 5.10.
|
6 |
* Author: Vladimir Anokhin
|
7 |
* Author URI: https://getshortcodes.com/
|
8 |
* Description: A comprehensive collection of visual components for WordPress
|
@@ -17,7 +17,7 @@
|
|
17 |
* Define plugin constants.
|
18 |
*/
|
19 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
20 |
-
define( 'SU_PLUGIN_VERSION', '5.10.
|
21 |
|
22 |
/**
|
23 |
* Load dependencies.
|
@@ -26,7 +26,6 @@ require_once 'inc/core/assets.php';
|
|
26 |
require_once 'inc/core/tools.php';
|
27 |
require_once 'inc/core/generator-views.php';
|
28 |
require_once 'inc/core/generator.php';
|
29 |
-
require_once 'inc/core/widget.php';
|
30 |
|
31 |
/**
|
32 |
* The code that runs during plugin activation.
|
2 |
/**
|
3 |
* Plugin Name: Shortcodes Ultimate
|
4 |
* Plugin URI: https://getshortcodes.com/
|
5 |
+
* Version: 5.10.1
|
6 |
* Author: Vladimir Anokhin
|
7 |
* Author URI: https://getshortcodes.com/
|
8 |
* Description: A comprehensive collection of visual components for WordPress
|
17 |
* Define plugin constants.
|
18 |
*/
|
19 |
define( 'SU_PLUGIN_FILE', __FILE__ );
|
20 |
+
define( 'SU_PLUGIN_VERSION', '5.10.1' );
|
21 |
|
22 |
/**
|
23 |
* Load dependencies.
|
26 |
require_once 'inc/core/tools.php';
|
27 |
require_once 'inc/core/generator-views.php';
|
28 |
require_once 'inc/core/generator.php';
|
|
|
29 |
|
30 |
/**
|
31 |
* The code that runs during plugin activation.
|
vendor/popper/popper.min.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"file":"popper.min.js","sources":["../../src/dom-utils/getBoundingClientRect.js","../../src/dom-utils/getWindow.js","../../src/dom-utils/getWindowScroll.js","../../src/dom-utils/instanceOf.js","../../src/dom-utils/getNodeName.js","../../src/dom-utils/getDocumentElement.js","../../src/dom-utils/getWindowScrollBarX.js","../../src/dom-utils/getComputedStyle.js","../../src/dom-utils/isScrollParent.js","../../src/dom-utils/getCompositeRect.js","../../src/dom-utils/getNodeScroll.js","../../src/dom-utils/getHTMLElementScroll.js","../../src/dom-utils/getLayoutRect.js","../../src/dom-utils/getParentNode.js","../../src/dom-utils/getScrollParent.js","../../src/dom-utils/listScrollParents.js","../../src/dom-utils/getOffsetParent.js","../../src/dom-utils/isTableElement.js","../../src/utils/orderModifiers.js","../../src/utils/debounce.js","../../src/utils/getBasePlacement.js","../../src/dom-utils/contains.js","../../src/utils/rectToClientRect.js","../../src/dom-utils/getClippingRect.js","../../src/enums.js","../../src/dom-utils/getViewportRect.js","../../src/dom-utils/getDocumentRect.js","../../src/utils/getMainAxisFromPlacement.js","../../src/utils/computeOffsets.js","../../src/utils/getVariation.js","../../src/utils/mergePaddingObject.js","../../src/utils/getFreshSideObject.js","../../src/utils/expandToHashMap.js","../../src/utils/detectOverflow.js","../../src/createPopper.js","../../src/utils/mergeByName.js","../../src/modifiers/computeStyles.js","../../src/utils/getOppositePlacement.js","../../src/utils/getOppositeVariationPlacement.js","../../src/modifiers/hide.js","../../src/utils/math.js","../../src/modifiers/eventListeners.js","../../src/modifiers/popperOffsets.js","../../src/modifiers/applyStyles.js","../../src/modifiers/offset.js","../../src/modifiers/flip.js","../../src/utils/computeAutoPlacement.js","../../src/modifiers/preventOverflow.js","../../src/utils/getAltAxis.js","../../src/utils/within.js","../../src/modifiers/arrow.js","../../src/popper-lite.js","../../src/popper.js"],"sourcesContent":["// @flow\nimport type { ClientRectObject, VirtualElement } from '../types';\n\nexport default function getBoundingClientRect(\n element: Element | VirtualElement\n): ClientRectObject {\n const rect = element.getBoundingClientRect();\n\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top,\n };\n}\n","// @flow\nimport type { Window } from '../types';\ndeclare function getWindow(node: Node | Window): Window;\n\nexport default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n const ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}\n","// @flow\nimport getWindow from './getWindow';\nimport type { Window } from '../types';\n\nexport default function getWindowScroll(node: Node | Window) {\n const win = getWindow(node);\n const scrollLeft = win.pageXOffset;\n const scrollTop = win.pageYOffset;\n\n return {\n scrollLeft,\n scrollTop,\n };\n}\n","// @flow\nimport getWindow from './getWindow';\n\ndeclare function isElement(node: mixed): boolean %checks(node instanceof\n Element);\nfunction isElement(node) {\n const OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\ndeclare function isHTMLElement(node: mixed): boolean %checks(node instanceof\n HTMLElement);\nfunction isHTMLElement(node) {\n const OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\ndeclare function isShadowRoot(node: mixed): boolean %checks(node instanceof\n ShadowRoot);\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n const OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };\n","// @flow\nimport type { Window } from '../types';\n\nexport default function getNodeName(element: ?Node | Window): ?string {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}\n","// @flow\nimport { isElement } from './instanceOf';\nimport type { Window } from '../types';\n\nexport default function getDocumentElement(\n element: Element | Window\n): HTMLElement {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return (\n (isElement(element)\n ? element.ownerDocument\n : // $FlowFixMe[prop-missing]\n element.document) || window.document\n ).documentElement;\n}\n","// @flow\nimport getBoundingClientRect from './getBoundingClientRect';\nimport getDocumentElement from './getDocumentElement';\nimport getWindowScroll from './getWindowScroll';\n\nexport default function getWindowScrollBarX(element: Element): number {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return (\n getBoundingClientRect(getDocumentElement(element)).left +\n getWindowScroll(element).scrollLeft\n );\n}\n","// @flow\nimport getWindow from './getWindow';\n\nexport default function getComputedStyle(\n element: Element\n): CSSStyleDeclaration {\n return getWindow(element).getComputedStyle(element);\n}\n","// @flow\nimport getComputedStyle from './getComputedStyle';\n\nexport default function isScrollParent(element: HTMLElement): boolean {\n // Firefox wants us to check `-x` and `-y` variations as well\n const { overflow, overflowX, overflowY } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}\n","// @flow\nimport type { Rect, VirtualElement, Window } from '../types';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport getNodeScroll from './getNodeScroll';\nimport getNodeName from './getNodeName';\nimport { isHTMLElement } from './instanceOf';\nimport getWindowScrollBarX from './getWindowScrollBarX';\nimport getDocumentElement from './getDocumentElement';\nimport isScrollParent from './isScrollParent';\n\n// Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\nexport default function getCompositeRect(\n elementOrVirtualElement: Element | VirtualElement,\n offsetParent: Element | Window,\n isFixed: boolean = false\n): Rect {\n const documentElement = getDocumentElement(offsetParent);\n const rect = getBoundingClientRect(elementOrVirtualElement);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n\n let scroll = { scrollLeft: 0, scrollTop: 0 };\n let offsets = { x: 0, y: 0 };\n\n if (isOffsetParentAnElement || (!isOffsetParentAnElement && !isFixed)) {\n if (\n getNodeName(offsetParent) !== 'body' ||\n // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)\n ) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height,\n };\n}\n","// @flow\nimport getWindowScroll from './getWindowScroll';\nimport getWindow from './getWindow';\nimport { isHTMLElement } from './instanceOf';\nimport getHTMLElementScroll from './getHTMLElementScroll';\nimport type { Window } from '../types';\n\nexport default function getNodeScroll(node: Node | Window) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}\n","// @flow\n\nexport default function getHTMLElementScroll(element: HTMLElement) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop,\n };\n}\n","// @flow\nimport type { Rect } from '../types';\nimport getBoundingClientRect from './getBoundingClientRect';\n\n// Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\nexport default function getLayoutRect(element: HTMLElement): Rect {\n const clientRect = getBoundingClientRect(element);\n\n // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n let width = element.offsetWidth;\n let height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width,\n height,\n };\n}\n","// @flow\nimport getNodeName from './getNodeName';\nimport getDocumentElement from './getDocumentElement';\nimport { isShadowRoot } from './instanceOf';\n\nexport default function getParentNode(element: Node | ShadowRoot): Node {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (\n // this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || // DOM Element detected\n (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n );\n}\n","// @flow\nimport getParentNode from './getParentNode';\nimport isScrollParent from './isScrollParent';\nimport getNodeName from './getNodeName';\nimport { isHTMLElement } from './instanceOf';\n\nexport default function getScrollParent(node: Node): HTMLElement {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}\n","// @flow\nimport getScrollParent from './getScrollParent';\nimport getParentNode from './getParentNode';\nimport getWindow from './getWindow';\nimport type { Window, VisualViewport } from '../types';\nimport isScrollParent from './isScrollParent';\n\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\nexport default function listScrollParents(\n element: Node,\n list: Array<Element | Window> = []\n): Array<Element | Window | VisualViewport> {\n const scrollParent = getScrollParent(element);\n const isBody = scrollParent === element.ownerDocument?.body;\n const win = getWindow(scrollParent);\n const target = isBody\n ? [win].concat(\n win.visualViewport || [],\n isScrollParent(scrollParent) ? scrollParent : []\n )\n : scrollParent;\n const updatedList = list.concat(target);\n\n return isBody\n ? updatedList\n : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}\n","// @flow\nimport getWindow from './getWindow';\nimport getNodeName from './getNodeName';\nimport getComputedStyle from './getComputedStyle';\nimport { isHTMLElement } from './instanceOf';\nimport isTableElement from './isTableElement';\nimport getParentNode from './getParentNode';\n\nfunction getTrueOffsetParent(element: Element): ?Element {\n if (\n !isHTMLElement(element) ||\n // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed'\n ) {\n return null;\n }\n\n return element.offsetParent;\n}\n\n// `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\nfunction getContainingBlock(element: Element) {\n const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n const isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n const elementCss = getComputedStyle(element);\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n let currentNode = getParentNode(element);\n\n while (\n isHTMLElement(currentNode) &&\n ['html', 'body'].indexOf(getNodeName(currentNode)) < 0\n ) {\n const css = getComputedStyle(currentNode);\n\n // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n if (\n css.transform !== 'none' ||\n css.perspective !== 'none' ||\n css.contain === 'paint' ||\n ['transform', 'perspective'].indexOf(css.willChange) !== -1 ||\n (isFirefox && css.willChange === 'filter') ||\n (isFirefox && css.filter && css.filter !== 'none')\n ) {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nexport default function getOffsetParent(element: Element) {\n const window = getWindow(element);\n\n let offsetParent = getTrueOffsetParent(element);\n\n while (\n offsetParent &&\n isTableElement(offsetParent) &&\n getComputedStyle(offsetParent).position === 'static'\n ) {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (\n offsetParent &&\n (getNodeName(offsetParent) === 'html' ||\n (getNodeName(offsetParent) === 'body' &&\n getComputedStyle(offsetParent).position === 'static'))\n ) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}\n","// @flow\nimport getNodeName from './getNodeName';\n\nexport default function isTableElement(element: Element): boolean {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}\n","// @flow\nimport type { Modifier } from '../types';\nimport { modifierPhases } from '../enums';\n\n// source: https://stackoverflow.com/questions/49875255\nfunction order(modifiers) {\n const map = new Map();\n const visited = new Set();\n const result = [];\n\n modifiers.forEach(modifier => {\n map.set(modifier.name, modifier);\n });\n\n // On visiting object, check for its dependencies and visit them recursively\n function sort(modifier: Modifier<any, any>) {\n visited.add(modifier.name);\n\n const requires = [\n ...(modifier.requires || []),\n ...(modifier.requiresIfExists || []),\n ];\n\n requires.forEach(dep => {\n if (!visited.has(dep)) {\n const depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n\n result.push(modifier);\n }\n\n modifiers.forEach(modifier => {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n\n return result;\n}\n\nexport default function orderModifiers(\n modifiers: Array<Modifier<any, any>>\n): Array<Modifier<any, any>> {\n // order based on dependencies\n const orderedModifiers = order(modifiers);\n\n // order based on phase\n return modifierPhases.reduce((acc, phase) => {\n return acc.concat(\n orderedModifiers.filter(modifier => modifier.phase === phase)\n );\n }, []);\n}\n","// @flow\n\nexport default function debounce<T>(fn: Function): () => Promise<T> {\n let pending;\n return () => {\n if (!pending) {\n pending = new Promise<T>(resolve => {\n Promise.resolve().then(() => {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}\n","// @flow\nimport { type BasePlacement, type Placement, auto } from '../enums';\n\nexport default function getBasePlacement(\n placement: Placement | typeof auto\n): BasePlacement {\n return (placement.split('-')[0]: any);\n}\n","// @flow\nimport { isShadowRoot } from './instanceOf';\n\nexport default function contains(parent: Element, child: Element) {\n const rootNode = child.getRootNode && child.getRootNode();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n }\n // $FlowFixMe[prop-missing]: need a better way to handle this...\n next = next.parentNode || next.host;\n } while (next);\n }\n\n // Give up, the result is false\n return false;\n}\n","// @flow\nimport type { Rect, ClientRectObject } from '../types';\n\nexport default function rectToClientRect(rect: Rect): ClientRectObject {\n return {\n ...rect,\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height,\n };\n}\n","// @flow\nimport type { ClientRectObject } from '../types';\nimport type { Boundary, RootBoundary } from '../enums';\nimport { viewport } from '../enums';\nimport getViewportRect from './getViewportRect';\nimport getDocumentRect from './getDocumentRect';\nimport listScrollParents from './listScrollParents';\nimport getOffsetParent from './getOffsetParent';\nimport getDocumentElement from './getDocumentElement';\nimport getComputedStyle from './getComputedStyle';\nimport { isElement, isHTMLElement } from './instanceOf';\nimport getBoundingClientRect from './getBoundingClientRect';\nimport getParentNode from './getParentNode';\nimport contains from './contains';\nimport getNodeName from './getNodeName';\nimport rectToClientRect from '../utils/rectToClientRect';\nimport { max, min } from '../utils/math';\n\nfunction getInnerBoundingClientRect(element: Element) {\n const rect = getBoundingClientRect(element);\n\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n\n return rect;\n}\n\nfunction getClientRectFromMixedType(\n element: Element,\n clippingParent: Element | RootBoundary\n): ClientRectObject {\n return clippingParent === viewport\n ? rectToClientRect(getViewportRect(element))\n : isHTMLElement(clippingParent)\n ? getInnerBoundingClientRect(clippingParent)\n : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n}\n\n// A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\nfunction getClippingParents(element: Element): Array<Element> {\n const clippingParents = listScrollParents(getParentNode(element));\n const canEscapeClipping =\n ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n const clipperElement =\n canEscapeClipping && isHTMLElement(element)\n ? getOffsetParent(element)\n : element;\n\n if (!isElement(clipperElement)) {\n return [];\n }\n\n // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n return clippingParents.filter(\n (clippingParent) =>\n isElement(clippingParent) &&\n contains(clippingParent, clipperElement) &&\n getNodeName(clippingParent) !== 'body'\n );\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping parents\nexport default function getClippingRect(\n element: Element,\n boundary: Boundary,\n rootBoundary: RootBoundary\n): ClientRectObject {\n const mainClippingParents =\n boundary === 'clippingParents'\n ? getClippingParents(element)\n : [].concat(boundary);\n const clippingParents = [...mainClippingParents, rootBoundary];\n const firstClippingParent = clippingParents[0];\n\n const clippingRect = clippingParents.reduce((accRect, clippingParent) => {\n const rect = getClientRectFromMixedType(element, clippingParent);\n\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n\n return clippingRect;\n}\n","// @flow\nexport const top: 'top' = 'top';\nexport const bottom: 'bottom' = 'bottom';\nexport const right: 'right' = 'right';\nexport const left: 'left' = 'left';\nexport const auto: 'auto' = 'auto';\nexport type BasePlacement =\n | typeof top\n | typeof bottom\n | typeof right\n | typeof left;\nexport const basePlacements: Array<BasePlacement> = [top, bottom, right, left];\n\nexport const start: 'start' = 'start';\nexport const end: 'end' = 'end';\nexport type Variation = typeof start | typeof end;\n\nexport const clippingParents: 'clippingParents' = 'clippingParents';\nexport const viewport: 'viewport' = 'viewport';\nexport type Boundary =\n | HTMLElement\n | Array<HTMLElement>\n | typeof clippingParents;\nexport type RootBoundary = typeof viewport | 'document';\n\nexport const popper: 'popper' = 'popper';\nexport const reference: 'reference' = 'reference';\nexport type Context = typeof popper | typeof reference;\n\nexport type VariationPlacement =\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end';\nexport type AutoPlacement = 'auto' | 'auto-start' | 'auto-end';\nexport type ComputedPlacement = VariationPlacement | BasePlacement;\nexport type Placement = AutoPlacement | BasePlacement | VariationPlacement;\n\nexport const variationPlacements: Array<VariationPlacement> = basePlacements.reduce(\n (acc: Array<VariationPlacement>, placement: BasePlacement) =>\n acc.concat([(`${placement}-${start}`: any), (`${placement}-${end}`: any)]),\n []\n);\nexport const placements: Array<Placement> = [...basePlacements, auto].reduce(\n (\n acc: Array<Placement>,\n placement: BasePlacement | typeof auto\n ): Array<Placement> =>\n acc.concat([\n placement,\n (`${placement}-${start}`: any),\n (`${placement}-${end}`: any),\n ]),\n []\n);\n\n// modifiers that need to read the DOM\nexport const beforeRead: 'beforeRead' = 'beforeRead';\nexport const read: 'read' = 'read';\nexport const afterRead: 'afterRead' = 'afterRead';\n// pure-logic modifiers\nexport const beforeMain: 'beforeMain' = 'beforeMain';\nexport const main: 'main' = 'main';\nexport const afterMain: 'afterMain' = 'afterMain';\n// modifier with the purpose to write to the DOM (or write into a framework state)\nexport const beforeWrite: 'beforeWrite' = 'beforeWrite';\nexport const write: 'write' = 'write';\nexport const afterWrite: 'afterWrite' = 'afterWrite';\nexport const modifierPhases: Array<ModifierPhases> = [\n beforeRead,\n read,\n afterRead,\n beforeMain,\n main,\n afterMain,\n beforeWrite,\n write,\n afterWrite,\n];\n\nexport type ModifierPhases =\n | typeof beforeRead\n | typeof read\n | typeof afterRead\n | typeof beforeMain\n | typeof main\n | typeof afterMain\n | typeof beforeWrite\n | typeof write\n | typeof afterWrite;\n","// @flow\nimport getWindow from './getWindow';\nimport getDocumentElement from './getDocumentElement';\nimport getWindowScrollBarX from './getWindowScrollBarX';\n\nexport default function getViewportRect(element: Element) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n\n // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n\n // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width,\n height,\n x: x + getWindowScrollBarX(element),\n y,\n };\n}\n","// @flow\nimport type { Rect } from '../types';\nimport getDocumentElement from './getDocumentElement';\nimport getComputedStyle from './getComputedStyle';\nimport getWindowScrollBarX from './getWindowScrollBarX';\nimport getWindowScroll from './getWindowScroll';\nimport { max } from '../utils/math';\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\nexport default function getDocumentRect(element: HTMLElement): Rect {\n const html = getDocumentElement(element);\n const winScroll = getWindowScroll(element);\n const body = element.ownerDocument?.body;\n\n const width = max(\n html.scrollWidth,\n html.clientWidth,\n body ? body.scrollWidth : 0,\n body ? body.clientWidth : 0\n );\n const height = max(\n html.scrollHeight,\n html.clientHeight,\n body ? body.scrollHeight : 0,\n body ? body.clientHeight : 0\n );\n\n let x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n const y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return { width, height, x, y };\n}\n","// @flow\nimport type { Placement } from '../enums';\n\nexport default function getMainAxisFromPlacement(\n placement: Placement\n): 'x' | 'y' {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}\n","// @flow\nimport getBasePlacement from './getBasePlacement';\nimport getVariation from './getVariation';\nimport getMainAxisFromPlacement from './getMainAxisFromPlacement';\nimport type {\n Rect,\n PositioningStrategy,\n Offsets,\n ClientRectObject,\n} from '../types';\nimport { top, right, bottom, left, start, end, type Placement } from '../enums';\n\nexport default function computeOffsets({\n reference,\n element,\n placement,\n}: {\n reference: Rect | ClientRectObject,\n element: Rect | ClientRectObject,\n strategy: PositioningStrategy,\n placement?: Placement,\n}): Offsets {\n const basePlacement = placement ? getBasePlacement(placement) : null;\n const variation = placement ? getVariation(placement) : null;\n const commonX = reference.x + reference.width / 2 - element.width / 2;\n const commonY = reference.y + reference.height / 2 - element.height / 2;\n\n let offsets;\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height,\n };\n break;\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height,\n };\n break;\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY,\n };\n break;\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY,\n };\n break;\n default:\n offsets = {\n x: reference.x,\n y: reference.y,\n };\n }\n\n const mainAxis = basePlacement\n ? getMainAxisFromPlacement(basePlacement)\n : null;\n\n if (mainAxis != null) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] =\n offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n case end:\n offsets[mainAxis] =\n offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n default:\n }\n }\n\n return offsets;\n}\n","// @flow\nimport { type Variation, type Placement } from '../enums';\n\nexport default function getVariation(placement: Placement): ?Variation {\n return (placement.split('-')[1]: any);\n}\n","// @flow\nimport type { SideObject } from '../types';\nimport getFreshSideObject from './getFreshSideObject';\n\nexport default function mergePaddingObject(\n paddingObject: $Shape<SideObject>\n): SideObject {\n return {\n ...getFreshSideObject(),\n ...paddingObject,\n };\n}\n","// @flow\nimport type { SideObject } from '../types';\n\nexport default function getFreshSideObject(): SideObject {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n };\n}\n","// @flow\n\nexport default function expandToHashMap<\n T: number | string | boolean,\n K: string\n>(value: T, keys: Array<K>): { [key: string]: T } {\n return keys.reduce((hashMap, key) => {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}\n","// @flow\nimport type { State, SideObject, Padding } from '../types';\nimport type { Placement, Boundary, RootBoundary, Context } from '../enums';\nimport getBoundingClientRect from '../dom-utils/getBoundingClientRect';\nimport getClippingRect from '../dom-utils/getClippingRect';\nimport getDocumentElement from '../dom-utils/getDocumentElement';\nimport computeOffsets from './computeOffsets';\nimport rectToClientRect from './rectToClientRect';\nimport {\n clippingParents,\n reference,\n popper,\n bottom,\n top,\n right,\n basePlacements,\n viewport,\n} from '../enums';\nimport { isElement } from '../dom-utils/instanceOf';\nimport mergePaddingObject from './mergePaddingObject';\nimport expandToHashMap from './expandToHashMap';\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n placement: Placement,\n boundary: Boundary,\n rootBoundary: RootBoundary,\n elementContext: Context,\n altBoundary: boolean,\n padding: Padding,\n};\n\nexport default function detectOverflow(\n state: State,\n options: $Shape<Options> = {}\n): SideObject {\n const {\n placement = state.placement,\n boundary = clippingParents,\n rootBoundary = viewport,\n elementContext = popper,\n altBoundary = false,\n padding = 0,\n } = options;\n\n const paddingObject = mergePaddingObject(\n typeof padding !== 'number'\n ? padding\n : expandToHashMap(padding, basePlacements)\n );\n\n const altContext = elementContext === popper ? reference : popper;\n\n const referenceElement = state.elements.reference;\n const popperRect = state.rects.popper;\n const element = state.elements[altBoundary ? altContext : elementContext];\n\n const clippingClientRect = getClippingRect(\n isElement(element)\n ? element\n : element.contextElement || getDocumentElement(state.elements.popper),\n boundary,\n rootBoundary\n );\n\n const referenceClientRect = getBoundingClientRect(referenceElement);\n\n const popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement,\n });\n\n const popperClientRect = rectToClientRect({\n ...popperRect,\n ...popperOffsets,\n });\n\n const elementClientRect =\n elementContext === popper ? popperClientRect : referenceClientRect;\n\n // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n const overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom:\n elementClientRect.bottom -\n clippingClientRect.bottom +\n paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right:\n elementClientRect.right - clippingClientRect.right + paddingObject.right,\n };\n\n const offsetData = state.modifiersData.offset;\n\n // Offsets can be applied only to the popper element\n if (elementContext === popper && offsetData) {\n const offset = offsetData[placement];\n\n Object.keys(overflowOffsets).forEach((key) => {\n const multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n const axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}\n","// @flow\nimport type {\n State,\n OptionsGeneric,\n Modifier,\n Instance,\n VirtualElement,\n} from './types';\nimport getCompositeRect from './dom-utils/getCompositeRect';\nimport getLayoutRect from './dom-utils/getLayoutRect';\nimport listScrollParents from './dom-utils/listScrollParents';\nimport getOffsetParent from './dom-utils/getOffsetParent';\nimport getComputedStyle from './dom-utils/getComputedStyle';\nimport orderModifiers from './utils/orderModifiers';\nimport debounce from './utils/debounce';\nimport validateModifiers from './utils/validateModifiers';\nimport uniqueBy from './utils/uniqueBy';\nimport getBasePlacement from './utils/getBasePlacement';\nimport mergeByName from './utils/mergeByName';\nimport detectOverflow from './utils/detectOverflow';\nimport { isElement } from './dom-utils/instanceOf';\nimport { auto } from './enums';\n\nconst INVALID_ELEMENT_ERROR =\n 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nconst INFINITE_LOOP_ERROR =\n 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\n\nconst DEFAULT_OPTIONS: OptionsGeneric<any> = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute',\n};\n\ntype PopperGeneratorArgs = {\n defaultModifiers?: Array<Modifier<any, any>>,\n defaultOptions?: $Shape<OptionsGeneric<any>>,\n};\n\nfunction areValidElements(...args: Array<any>): boolean {\n return !args.some(\n (element) =>\n !(element && typeof element.getBoundingClientRect === 'function')\n );\n}\n\nexport function popperGenerator(generatorOptions: PopperGeneratorArgs = {}) {\n const {\n defaultModifiers = [],\n defaultOptions = DEFAULT_OPTIONS,\n } = generatorOptions;\n\n return function createPopper<TModifier: $Shape<Modifier<any, any>>>(\n reference: Element | VirtualElement,\n popper: HTMLElement,\n options: $Shape<OptionsGeneric<TModifier>> = defaultOptions\n ): Instance {\n let state: $Shape<State> = {\n placement: 'bottom',\n orderedModifiers: [],\n options: { ...DEFAULT_OPTIONS, ...defaultOptions },\n modifiersData: {},\n elements: {\n reference,\n popper,\n },\n attributes: {},\n styles: {},\n };\n\n let effectCleanupFns: Array<() => void> = [];\n let isDestroyed = false;\n\n const instance = {\n state,\n setOptions(options) {\n cleanupModifierEffects();\n\n state.options = {\n // $FlowFixMe[exponential-spread]\n ...defaultOptions,\n ...state.options,\n ...options,\n };\n\n state.scrollParents = {\n reference: isElement(reference)\n ? listScrollParents(reference)\n : reference.contextElement\n ? listScrollParents(reference.contextElement)\n : [],\n popper: listScrollParents(popper),\n };\n\n // Orders the modifiers based on their dependencies and `phase`\n // properties\n const orderedModifiers = orderModifiers(\n mergeByName([...defaultModifiers, ...state.options.modifiers])\n );\n\n // Strip out disabled modifiers\n state.orderedModifiers = orderedModifiers.filter((m) => m.enabled);\n\n // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n if (__DEV__) {\n const modifiers = uniqueBy(\n [...orderedModifiers, ...state.options.modifiers],\n ({ name }) => name\n );\n\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n const flipModifier = state.orderedModifiers.find(\n ({ name }) => name === 'flip'\n );\n\n if (!flipModifier) {\n console.error(\n [\n 'Popper: \"auto\" placements require the \"flip\" modifier be',\n 'present and enabled to work.',\n ].join(' ')\n );\n }\n }\n\n const {\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n } = getComputedStyle(popper);\n\n // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n if (\n [marginTop, marginRight, marginBottom, marginLeft].some((margin) =>\n parseFloat(margin)\n )\n ) {\n console.warn(\n [\n 'Popper: CSS \"margin\" styles cannot be used to apply padding',\n 'between the popper and its reference element or boundary.',\n 'To replicate margin, use the `offset` modifier, as well as',\n 'the `padding` option in the `preventOverflow` and `flip`',\n 'modifiers.',\n ].join(' ')\n );\n }\n }\n\n runModifierEffects();\n\n return instance.update();\n },\n\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n const { reference, popper } = state.elements;\n\n // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n if (!areValidElements(reference, popper)) {\n if (__DEV__) {\n console.error(INVALID_ELEMENT_ERROR);\n }\n return;\n }\n\n // Store the reference and popper rects to be read by modifiers\n state.rects = {\n reference: getCompositeRect(\n reference,\n getOffsetParent(popper),\n state.options.strategy === 'fixed'\n ),\n popper: getLayoutRect(popper),\n };\n\n // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n state.reset = false;\n\n state.placement = state.options.placement;\n\n // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n state.orderedModifiers.forEach(\n (modifier) =>\n (state.modifiersData[modifier.name] = {\n ...modifier.data,\n })\n );\n\n let __debug_loops__ = 0;\n for (let index = 0; index < state.orderedModifiers.length; index++) {\n if (__DEV__) {\n __debug_loops__ += 1;\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n const { fn, options = {}, name } = state.orderedModifiers[index];\n\n if (typeof fn === 'function') {\n state = fn({ state, options, name, instance }) || state;\n }\n }\n },\n\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce<$Shape<State>>(\n () =>\n new Promise<$Shape<State>>((resolve) => {\n instance.forceUpdate();\n resolve(state);\n })\n ),\n\n destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n },\n };\n\n if (!areValidElements(reference, popper)) {\n if (__DEV__) {\n console.error(INVALID_ELEMENT_ERROR);\n }\n return instance;\n }\n\n instance.setOptions(options).then((state) => {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n });\n\n // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n function runModifierEffects() {\n state.orderedModifiers.forEach(({ name, options = {}, effect }) => {\n if (typeof effect === 'function') {\n const cleanupFn = effect({ state, name, instance, options });\n const noopFn = () => {};\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach((fn) => fn());\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\n\nexport const createPopper = popperGenerator();\n\n// eslint-disable-next-line import/no-unused-modules\nexport { detectOverflow };\n","// @flow\nimport type { Modifier } from '../types';\n\nexport default function mergeByName(\n modifiers: Array<$Shape<Modifier<any, any>>>\n): Array<$Shape<Modifier<any, any>>> {\n const merged = modifiers.reduce((merged, current) => {\n const existing = merged[current.name];\n merged[current.name] = existing\n ? {\n ...existing,\n ...current,\n options: { ...existing.options, ...current.options },\n data: { ...existing.data, ...current.data },\n }\n : current;\n return merged;\n }, {});\n\n // IE11 does not support Object.values\n return Object.keys(merged).map(key => merged[key]);\n}\n","// @flow\nimport type {\n PositioningStrategy,\n Offsets,\n Modifier,\n ModifierArguments,\n Rect,\n Window,\n} from '../types';\nimport { type BasePlacement, top, left, right, bottom } from '../enums';\nimport getOffsetParent from '../dom-utils/getOffsetParent';\nimport getWindow from '../dom-utils/getWindow';\nimport getDocumentElement from '../dom-utils/getDocumentElement';\nimport getComputedStyle from '../dom-utils/getComputedStyle';\nimport getBasePlacement from '../utils/getBasePlacement';\nimport { round } from '../utils/math';\n\n// eslint-disable-next-line import/no-unused-modules\nexport type RoundOffsets = (\n offsets: $Shape<{ x: number, y: number, centerOffset: number }>\n) => Offsets;\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n gpuAcceleration: boolean,\n adaptive: boolean,\n roundOffsets?: boolean | RoundOffsets,\n};\n\nconst unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n};\n\n// Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\nfunction roundOffsetsByDPR({ x, y }): Offsets {\n const win: Window = window;\n const dpr = win.devicePixelRatio || 1;\n\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0,\n };\n}\n\nexport function mapToStyles({\n popper,\n popperRect,\n placement,\n offsets,\n position,\n gpuAcceleration,\n adaptive,\n roundOffsets,\n}: {\n popper: HTMLElement,\n popperRect: Rect,\n placement: BasePlacement,\n offsets: $Shape<{ x: number, y: number, centerOffset: number }>,\n position: PositioningStrategy,\n gpuAcceleration: boolean,\n adaptive: boolean,\n roundOffsets: boolean | RoundOffsets,\n}) {\n let { x = 0, y = 0 } =\n roundOffsets === true\n ? roundOffsetsByDPR(offsets)\n : typeof roundOffsets === 'function'\n ? roundOffsets(offsets)\n : offsets;\n\n const hasX = offsets.hasOwnProperty('x');\n const hasY = offsets.hasOwnProperty('y');\n\n let sideX: string = left;\n let sideY: string = top;\n\n const win: Window = window;\n\n if (adaptive) {\n let offsetParent = getOffsetParent(popper);\n let heightProp = 'clientHeight';\n let widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n }\n\n // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n offsetParent = (offsetParent: Element);\n\n if (placement === top) {\n sideY = bottom;\n // $FlowFixMe[prop-missing]\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left) {\n sideX = right;\n // $FlowFixMe[prop-missing]\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n const commonStyles = {\n position,\n ...(adaptive && unsetSides),\n };\n\n if (gpuAcceleration) {\n return {\n ...commonStyles,\n [sideY]: hasY ? '0' : '',\n [sideX]: hasX ? '0' : '',\n // Layer acceleration can disable subpixel rendering which causes slightly\n // blurry text on low PPI displays, so we want to use 2D transforms\n // instead\n transform:\n (win.devicePixelRatio || 1) < 2\n ? `translate(${x}px, ${y}px)`\n : `translate3d(${x}px, ${y}px, 0)`,\n };\n }\n\n return {\n ...commonStyles,\n [sideY]: hasY ? `${y}px` : '',\n [sideX]: hasX ? `${x}px` : '',\n transform: '',\n };\n}\n\nfunction computeStyles({ state, options }: ModifierArguments<Options>) {\n const {\n gpuAcceleration = true,\n adaptive = true,\n // defaults to use builtin `roundOffsetsByDPR`\n roundOffsets = true,\n } = options;\n\n if (__DEV__) {\n const transitionProperty =\n getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (\n adaptive &&\n ['transform', 'top', 'right', 'bottom', 'left'].some(\n (property) => transitionProperty.indexOf(property) >= 0\n )\n ) {\n console.warn(\n [\n 'Popper: Detected CSS transitions on at least one of the following',\n 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".',\n '\\n\\n',\n 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow',\n 'for smooth transitions, or remove these properties from the CSS',\n 'transition declaration on the popper element if only transitioning',\n 'opacity or background-color for example.',\n '\\n\\n',\n 'We recommend using the popper element as a wrapper around an inner',\n 'element that can have any CSS property transitioned for animations.',\n ].join(' ')\n );\n }\n }\n\n const commonStyles = {\n placement: getBasePlacement(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration,\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = {\n ...state.styles.popper,\n ...mapToStyles({\n ...commonStyles,\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive,\n roundOffsets,\n }),\n };\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = {\n ...state.styles.arrow,\n ...mapToStyles({\n ...commonStyles,\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets,\n }),\n };\n }\n\n state.attributes.popper = {\n ...state.attributes.popper,\n 'data-popper-placement': state.placement,\n };\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type ComputeStylesModifier = Modifier<'computeStyles', Options>;\nexport default ({\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {},\n}: ComputeStylesModifier);\n","// @flow\nimport type { Placement } from '../enums';\n\nconst hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' };\n\nexport default function getOppositePlacement(placement: Placement): Placement {\n return (placement.replace(\n /left|right|bottom|top/g,\n matched => hash[matched]\n ): any);\n}\n","// @flow\nimport type { Placement } from '../enums';\n\nconst hash = { start: 'end', end: 'start' };\n\nexport default function getOppositeVariationPlacement(\n placement: Placement\n): Placement {\n return (placement.replace(/start|end/g, matched => hash[matched]): any);\n}\n","// @flow\nimport type {\n ModifierArguments,\n Modifier,\n Rect,\n SideObject,\n Offsets,\n} from '../types';\nimport { top, bottom, left, right } from '../enums';\nimport detectOverflow from '../utils/detectOverflow';\n\nfunction getSideOffsets(\n overflow: SideObject,\n rect: Rect,\n preventedOffsets: Offsets = { x: 0, y: 0 }\n): SideObject {\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x,\n };\n}\n\nfunction isAnySideFullyClipped(overflow: SideObject): boolean {\n return [top, right, bottom, left].some((side) => overflow[side] >= 0);\n}\n\nfunction hide({ state, name }: ModifierArguments<{||}>) {\n const referenceRect = state.rects.reference;\n const popperRect = state.rects.popper;\n const preventedOffsets = state.modifiersData.preventOverflow;\n\n const referenceOverflow = detectOverflow(state, {\n elementContext: 'reference',\n });\n const popperAltOverflow = detectOverflow(state, {\n altBoundary: true,\n });\n\n const referenceClippingOffsets = getSideOffsets(\n referenceOverflow,\n referenceRect\n );\n const popperEscapeOffsets = getSideOffsets(\n popperAltOverflow,\n popperRect,\n preventedOffsets\n );\n\n const isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n const hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n\n state.modifiersData[name] = {\n referenceClippingOffsets,\n popperEscapeOffsets,\n isReferenceHidden,\n hasPopperEscaped,\n };\n\n state.attributes.popper = {\n ...state.attributes.popper,\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped,\n };\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type HideModifier = Modifier<'hide', {||}>;\nexport default ({\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide,\n}: HideModifier);\n","// @flow\nexport const max = Math.max;\nexport const min = Math.min;\nexport const round = Math.round;\n","// @flow\nimport type { ModifierArguments, Modifier } from '../types';\nimport getWindow from '../dom-utils/getWindow';\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n scroll: boolean,\n resize: boolean,\n};\n\nconst passive = { passive: true };\n\nfunction effect({ state, instance, options }: ModifierArguments<Options>) {\n const { scroll = true, resize = true } = options;\n\n const window = getWindow(state.elements.popper);\n const scrollParents = [\n ...state.scrollParents.reference,\n ...state.scrollParents.popper,\n ];\n\n if (scroll) {\n scrollParents.forEach(scrollParent => {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return () => {\n if (scroll) {\n scrollParents.forEach(scrollParent => {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type EventListenersModifier = Modifier<'eventListeners', Options>;\nexport default ({\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: () => {},\n effect,\n data: {},\n}: EventListenersModifier);\n","// @flow\nimport type { ModifierArguments, Modifier } from '../types';\nimport computeOffsets from '../utils/computeOffsets';\n\nfunction popperOffsets({ state, name }: ModifierArguments<{||}>) {\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement,\n });\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type PopperOffsetsModifier = Modifier<'popperOffsets', {||}>;\nexport default ({\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {},\n}: PopperOffsetsModifier);\n","// @flow\nimport type { Modifier, ModifierArguments } from '../types';\nimport getNodeName from '../dom-utils/getNodeName';\nimport { isHTMLElement } from '../dom-utils/instanceOf';\n\n// This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles({ state }: ModifierArguments<{||}>) {\n Object.keys(state.elements).forEach((name) => {\n const style = state.styles[name] || {};\n\n const attributes = state.attributes[name] || {};\n const element = state.elements[name];\n\n // arrow is optional + virtual elements\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n Object.assign(element.style, style);\n\n Object.keys(attributes).forEach((name) => {\n const value = attributes[name];\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect({ state }: ModifierArguments<{||}>) {\n const initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0',\n },\n arrow: {\n position: 'absolute',\n },\n reference: {},\n };\n\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return () => {\n Object.keys(state.elements).forEach((name) => {\n const element = state.elements[name];\n const attributes = state.attributes[name] || {};\n\n const styleProperties = Object.keys(\n state.styles.hasOwnProperty(name)\n ? state.styles[name]\n : initialStyles[name]\n );\n\n // Set all values to an empty string to unset them\n const style = styleProperties.reduce((style, property) => {\n style[property] = '';\n return style;\n }, {});\n\n // arrow is optional + virtual elements\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n\n Object.keys(attributes).forEach((attribute) => {\n element.removeAttribute(attribute);\n });\n });\n };\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type ApplyStylesModifier = Modifier<'applyStyles', {||}>;\nexport default ({\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect,\n requires: ['computeStyles'],\n}: ApplyStylesModifier);\n","// @flow\nimport type { Placement } from '../enums';\nimport type { ModifierArguments, Modifier, Rect, Offsets } from '../types';\nimport getBasePlacement from '../utils/getBasePlacement';\nimport { top, left, right, placements } from '../enums';\n\ntype OffsetsFunction = ({\n popper: Rect,\n reference: Rect,\n placement: Placement,\n}) => [?number, ?number];\n\ntype Offset = OffsetsFunction | [?number, ?number];\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n offset: Offset,\n};\n\nexport function distanceAndSkiddingToXY(\n placement: Placement,\n rects: { popper: Rect, reference: Rect },\n offset: Offset\n): Offsets {\n const basePlacement = getBasePlacement(placement);\n const invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n let [skidding, distance] =\n typeof offset === 'function'\n ? offset({\n ...rects,\n placement,\n })\n : offset;\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n\n return [left, right].indexOf(basePlacement) >= 0\n ? { x: distance, y: skidding }\n : { x: skidding, y: distance };\n}\n\nfunction offset({ state, options, name }: ModifierArguments<Options>) {\n const { offset = [0, 0] } = options;\n\n const data = placements.reduce((acc, placement) => {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n\n const { x, y } = data[state.placement];\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type OffsetModifier = Modifier<'offset', Options>;\nexport default ({\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset,\n}: OffsetModifier);\n","// @flow\nimport type { Placement, Boundary, RootBoundary } from '../enums';\nimport type { ModifierArguments, Modifier, Padding } from '../types';\nimport getOppositePlacement from '../utils/getOppositePlacement';\nimport getBasePlacement from '../utils/getBasePlacement';\nimport getOppositeVariationPlacement from '../utils/getOppositeVariationPlacement';\nimport detectOverflow from '../utils/detectOverflow';\nimport computeAutoPlacement from '../utils/computeAutoPlacement';\nimport { bottom, top, start, right, left, auto } from '../enums';\nimport getVariation from '../utils/getVariation';\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n mainAxis: boolean,\n altAxis: boolean,\n fallbackPlacements: Array<Placement>,\n padding: Padding,\n boundary: Boundary,\n rootBoundary: RootBoundary,\n altBoundary: boolean,\n flipVariations: boolean,\n allowedAutoPlacements: Array<Placement>,\n};\n\nfunction getExpandedFallbackPlacements(placement: Placement): Array<Placement> {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n const oppositePlacement = getOppositePlacement(placement);\n\n return [\n getOppositeVariationPlacement(placement),\n oppositePlacement,\n getOppositeVariationPlacement(oppositePlacement),\n ];\n}\n\nfunction flip({ state, options, name }: ModifierArguments<Options>) {\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n const {\n mainAxis: checkMainAxis = true,\n altAxis: checkAltAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n padding,\n boundary,\n rootBoundary,\n altBoundary,\n flipVariations = true,\n allowedAutoPlacements,\n } = options;\n\n const preferredPlacement = state.options.placement;\n const basePlacement = getBasePlacement(preferredPlacement);\n const isBasePlacement = basePlacement === preferredPlacement;\n\n const fallbackPlacements =\n specifiedFallbackPlacements ||\n (isBasePlacement || !flipVariations\n ? [getOppositePlacement(preferredPlacement)]\n : getExpandedFallbackPlacements(preferredPlacement));\n\n const placements = [preferredPlacement, ...fallbackPlacements].reduce(\n (acc, placement) => {\n return acc.concat(\n getBasePlacement(placement) === auto\n ? computeAutoPlacement(state, {\n placement,\n boundary,\n rootBoundary,\n padding,\n flipVariations,\n allowedAutoPlacements,\n })\n : placement\n );\n },\n []\n );\n\n const referenceRect = state.rects.reference;\n const popperRect = state.rects.popper;\n\n const checksMap = new Map();\n let makeFallbackChecks = true;\n let firstFittingPlacement = placements[0];\n\n for (let i = 0; i < placements.length; i++) {\n const placement = placements[i];\n const basePlacement = getBasePlacement(placement);\n const isStartVariation = getVariation(placement) === start;\n const isVertical = [top, bottom].indexOf(basePlacement) >= 0;\n const len = isVertical ? 'width' : 'height';\n\n const overflow = detectOverflow(state, {\n placement,\n boundary,\n rootBoundary,\n altBoundary,\n padding,\n });\n\n let mainVariationSide: any = isVertical\n ? isStartVariation\n ? right\n : left\n : isStartVariation\n ? bottom\n : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n const altVariationSide: any = getOppositePlacement(mainVariationSide);\n\n const checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(\n overflow[mainVariationSide] <= 0,\n overflow[altVariationSide] <= 0\n );\n }\n\n if (checks.every((check) => check)) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n const numberOfChecks = flipVariations ? 3 : 1;\n\n for (let i = numberOfChecks; i > 0; i--) {\n const fittingPlacement = placements.find((placement) => {\n const checks = checksMap.get(placement);\n if (checks) {\n return checks.slice(0, i).every((check) => check);\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n break;\n }\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type FlipModifier = Modifier<'flip', Options>;\nexport default ({\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: { _skip: false },\n}: FlipModifier);\n","// @flow\nimport type { State, Padding } from '../types';\nimport type {\n Placement,\n ComputedPlacement,\n Boundary,\n RootBoundary,\n} from '../enums';\nimport getVariation from './getVariation';\nimport {\n variationPlacements,\n basePlacements,\n placements as allPlacements,\n} from '../enums';\nimport detectOverflow from './detectOverflow';\nimport getBasePlacement from './getBasePlacement';\n\ntype Options = {\n placement: Placement,\n padding: Padding,\n boundary: Boundary,\n rootBoundary: RootBoundary,\n flipVariations: boolean,\n allowedAutoPlacements?: Array<Placement>,\n};\n\ntype OverflowsMap = { [ComputedPlacement]: number };\n\nexport default function computeAutoPlacement(\n state: $Shape<State>,\n options: Options = {}\n): Array<ComputedPlacement> {\n const {\n placement,\n boundary,\n rootBoundary,\n padding,\n flipVariations,\n allowedAutoPlacements = allPlacements,\n } = options;\n\n const variation = getVariation(placement);\n\n const placements = variation\n ? flipVariations\n ? variationPlacements\n : variationPlacements.filter(\n (placement) => getVariation(placement) === variation\n )\n : basePlacements;\n\n let allowedPlacements = placements.filter(\n (placement) => allowedAutoPlacements.indexOf(placement) >= 0\n );\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (__DEV__) {\n console.error(\n [\n 'Popper: The `allowedAutoPlacements` option did not allow any',\n 'placements. Ensure the `placement` option matches the variation',\n 'of the allowed placements.',\n 'For example, \"auto\" cannot be used to allow \"bottom-start\".',\n 'Use \"auto-start\" instead.',\n ].join(' ')\n );\n }\n }\n\n // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n const overflows: OverflowsMap = allowedPlacements.reduce((acc, placement) => {\n acc[placement] = detectOverflow(state, {\n placement,\n boundary,\n rootBoundary,\n padding,\n })[getBasePlacement(placement)];\n\n return acc;\n }, {});\n\n return Object.keys(overflows).sort((a, b) => overflows[a] - overflows[b]);\n}\n","// @flow\nimport { top, left, right, bottom, start } from '../enums';\nimport type { Placement, Boundary, RootBoundary } from '../enums';\nimport type { Rect, ModifierArguments, Modifier, Padding } from '../types';\nimport getBasePlacement from '../utils/getBasePlacement';\nimport getMainAxisFromPlacement from '../utils/getMainAxisFromPlacement';\nimport getAltAxis from '../utils/getAltAxis';\nimport within from '../utils/within';\nimport getLayoutRect from '../dom-utils/getLayoutRect';\nimport getOffsetParent from '../dom-utils/getOffsetParent';\nimport detectOverflow from '../utils/detectOverflow';\nimport getVariation from '../utils/getVariation';\nimport getFreshSideObject from '../utils/getFreshSideObject';\nimport { max as mathMax, min as mathMin } from '../utils/math';\n\ntype TetherOffset =\n | (({\n popper: Rect,\n reference: Rect,\n placement: Placement,\n }) => number)\n | number;\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n /* Prevents boundaries overflow on the main axis */\n mainAxis: boolean,\n /* Prevents boundaries overflow on the alternate axis */\n altAxis: boolean,\n /* The area to check the popper is overflowing in */\n boundary: Boundary,\n /* If the popper is not overflowing the main area, fallback to this one */\n rootBoundary: RootBoundary,\n /* Use the reference's \"clippingParents\" boundary context */\n altBoundary: boolean,\n /**\n * Allows the popper to overflow from its boundaries to keep it near its\n * reference element\n */\n tether: boolean,\n /* Offsets when the `tether` option should activate */\n tetherOffset: TetherOffset,\n /* Sets a padding to the provided boundary */\n padding: Padding,\n};\n\nfunction preventOverflow({ state, options, name }: ModifierArguments<Options>) {\n const {\n mainAxis: checkMainAxis = true,\n altAxis: checkAltAxis = false,\n boundary,\n rootBoundary,\n altBoundary,\n padding,\n tether = true,\n tetherOffset = 0,\n } = options;\n\n const overflow = detectOverflow(state, {\n boundary,\n rootBoundary,\n padding,\n altBoundary,\n });\n const basePlacement = getBasePlacement(state.placement);\n const variation = getVariation(state.placement);\n const isBasePlacement = !variation;\n const mainAxis = getMainAxisFromPlacement(basePlacement);\n const altAxis = getAltAxis(mainAxis);\n const popperOffsets = state.modifiersData.popperOffsets;\n const referenceRect = state.rects.reference;\n const popperRect = state.rects.popper;\n const tetherOffsetValue =\n typeof tetherOffset === 'function'\n ? tetherOffset({\n ...state.rects,\n placement: state.placement,\n })\n : tetherOffset;\n\n const data = { x: 0, y: 0 };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n const mainSide = mainAxis === 'y' ? top : left;\n const altSide = mainAxis === 'y' ? bottom : right;\n const len = mainAxis === 'y' ? 'height' : 'width';\n const offset = popperOffsets[mainAxis];\n\n const min = popperOffsets[mainAxis] + overflow[mainSide];\n const max = popperOffsets[mainAxis] - overflow[altSide];\n\n const additive = tether ? -popperRect[len] / 2 : 0;\n\n const minLen = variation === start ? referenceRect[len] : popperRect[len];\n const maxLen = variation === start ? -popperRect[len] : -referenceRect[len];\n\n // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n const arrowElement = state.elements.arrow;\n const arrowRect =\n tether && arrowElement\n ? getLayoutRect(arrowElement)\n : { width: 0, height: 0 };\n const arrowPaddingObject = state.modifiersData['arrow#persistent']\n ? state.modifiersData['arrow#persistent'].padding\n : getFreshSideObject();\n const arrowPaddingMin = arrowPaddingObject[mainSide];\n const arrowPaddingMax = arrowPaddingObject[altSide];\n\n // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n const arrowLen = within(0, referenceRect[len], arrowRect[len]);\n\n const minOffset = isBasePlacement\n ? referenceRect[len] / 2 -\n additive -\n arrowLen -\n arrowPaddingMin -\n tetherOffsetValue\n : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n const maxOffset = isBasePlacement\n ? -referenceRect[len] / 2 +\n additive +\n arrowLen +\n arrowPaddingMax +\n tetherOffsetValue\n : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n\n const arrowOffsetParent =\n state.elements.arrow && getOffsetParent(state.elements.arrow);\n const clientOffset = arrowOffsetParent\n ? mainAxis === 'y'\n ? arrowOffsetParent.clientTop || 0\n : arrowOffsetParent.clientLeft || 0\n : 0;\n\n const offsetModifierValue = state.modifiersData.offset\n ? state.modifiersData.offset[state.placement][mainAxis]\n : 0;\n\n const tetherMin =\n popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n const tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n const preventedOffset = within(\n tether ? mathMin(min, tetherMin) : min,\n offset,\n tether ? mathMax(max, tetherMax) : max\n );\n\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n const mainSide = mainAxis === 'x' ? top : left;\n const altSide = mainAxis === 'x' ? bottom : right;\n const offset = popperOffsets[altAxis];\n\n const min = offset + overflow[mainSide];\n const max = offset - overflow[altSide];\n\n const preventedOffset = within(\n tether ? mathMin(min, tetherMin) : min,\n offset,\n tether ? mathMax(max, tetherMax) : max\n );\n\n popperOffsets[altAxis] = preventedOffset;\n data[altAxis] = preventedOffset - offset;\n }\n }\n\n state.modifiersData[name] = data;\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type PreventOverflowModifier = Modifier<'preventOverflow', Options>;\nexport default ({\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset'],\n}: PreventOverflowModifier);\n","// @flow\n\nexport default function getAltAxis(axis: 'x' | 'y'): 'x' | 'y' {\n return axis === 'x' ? 'y' : 'x';\n}\n","// @flow\nimport { max as mathMax, min as mathMin } from './math';\n\nexport default function within(\n min: number,\n value: number,\n max: number\n): number {\n return mathMax(min, mathMin(value, max));\n}\n","// @flow\nimport type { Modifier, ModifierArguments, Padding, Rect } from '../types';\nimport type { Placement } from '../enums';\nimport getBasePlacement from '../utils/getBasePlacement';\nimport getLayoutRect from '../dom-utils/getLayoutRect';\nimport contains from '../dom-utils/contains';\nimport getOffsetParent from '../dom-utils/getOffsetParent';\nimport getMainAxisFromPlacement from '../utils/getMainAxisFromPlacement';\nimport within from '../utils/within';\nimport mergePaddingObject from '../utils/mergePaddingObject';\nimport expandToHashMap from '../utils/expandToHashMap';\nimport { left, right, basePlacements, top, bottom } from '../enums';\nimport { isHTMLElement } from '../dom-utils/instanceOf';\n\n// eslint-disable-next-line import/no-unused-modules\nexport type Options = {\n element: HTMLElement | string | null,\n padding:\n | Padding\n | (({|\n popper: Rect,\n reference: Rect,\n placement: Placement,\n |}) => Padding),\n};\n\nconst toPaddingObject = (padding, state) => {\n padding =\n typeof padding === 'function'\n ? padding({ ...state.rects, placement: state.placement })\n : padding;\n\n return mergePaddingObject(\n typeof padding !== 'number'\n ? padding\n : expandToHashMap(padding, basePlacements)\n );\n};\n\nfunction arrow({ state, name, options }: ModifierArguments<Options>) {\n const arrowElement = state.elements.arrow;\n const popperOffsets = state.modifiersData.popperOffsets;\n const basePlacement = getBasePlacement(state.placement);\n const axis = getMainAxisFromPlacement(basePlacement);\n const isVertical = [left, right].indexOf(basePlacement) >= 0;\n const len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n const paddingObject = toPaddingObject(options.padding, state);\n const arrowRect = getLayoutRect(arrowElement);\n const minProp = axis === 'y' ? top : left;\n const maxProp = axis === 'y' ? bottom : right;\n\n const endDiff =\n state.rects.reference[len] +\n state.rects.reference[axis] -\n popperOffsets[axis] -\n state.rects.popper[len];\n const startDiff = popperOffsets[axis] - state.rects.reference[axis];\n\n const arrowOffsetParent = getOffsetParent(arrowElement);\n const clientSize = arrowOffsetParent\n ? axis === 'y'\n ? arrowOffsetParent.clientHeight || 0\n : arrowOffsetParent.clientWidth || 0\n : 0;\n\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n const min = paddingObject[minProp];\n const max = clientSize - arrowRect[len] - paddingObject[maxProp];\n const center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n const offset = within(min, center, max);\n\n // Prevents breaking syntax highlighting...\n const axisProp: string = axis;\n state.modifiersData[name] = {\n [axisProp]: offset,\n centerOffset: offset - center,\n };\n}\n\nfunction effect({ state, options }: ModifierArguments<Options>) {\n let { element: arrowElement = '[data-popper-arrow]' } = options;\n\n if (arrowElement == null) {\n return;\n }\n\n // CSS selector\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (__DEV__) {\n if (!isHTMLElement(arrowElement)) {\n console.error(\n [\n 'Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).',\n 'To use an SVG arrow, wrap it in an HTMLElement that will be used as',\n 'the arrow.',\n ].join(' ')\n );\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (__DEV__) {\n console.error(\n [\n 'Popper: \"arrow\" modifier\\'s `element` must be a child of the popper',\n 'element.',\n ].join(' ')\n );\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n}\n\n// eslint-disable-next-line import/no-unused-modules\nexport type ArrowModifier = Modifier<'arrow', Options>;\nexport default ({\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow'],\n}: ArrowModifier);\n","// @flow\nimport { popperGenerator, detectOverflow } from './createPopper';\n\nimport eventListeners from './modifiers/eventListeners';\nimport popperOffsets from './modifiers/popperOffsets';\nimport computeStyles from './modifiers/computeStyles';\nimport applyStyles from './modifiers/applyStyles';\n\nexport type * from './types';\n\nconst defaultModifiers = [\n eventListeners,\n popperOffsets,\n computeStyles,\n applyStyles,\n];\n\nconst createPopper = popperGenerator({ defaultModifiers });\n\n// eslint-disable-next-line import/no-unused-modules\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };\n","// @flow\nimport { popperGenerator, detectOverflow } from './createPopper';\n\nimport eventListeners from './modifiers/eventListeners';\nimport popperOffsets from './modifiers/popperOffsets';\nimport computeStyles from './modifiers/computeStyles';\nimport applyStyles from './modifiers/applyStyles';\nimport offset from './modifiers/offset';\nimport flip from './modifiers/flip';\nimport preventOverflow from './modifiers/preventOverflow';\nimport arrow from './modifiers/arrow';\nimport hide from './modifiers/hide';\n\nexport type * from './types';\n\nconst defaultModifiers = [\n eventListeners,\n popperOffsets,\n computeStyles,\n applyStyles,\n offset,\n flip,\n preventOverflow,\n arrow,\n hide,\n];\n\nconst createPopper = popperGenerator({ defaultModifiers });\n\n// eslint-disable-next-line import/no-unused-modules\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };\n// eslint-disable-next-line import/no-unused-modules\nexport { createPopper as createPopperLite } from './popper-lite';\n// eslint-disable-next-line import/no-unused-modules\nexport * from './modifiers';\n"],"names":["getBoundingClientRect","element","width","rect","height","top","right","bottom","left","x","y","getWindow","node","window","ownerDocument","getWindowScroll","scrollLeft","win","scrollTop","isElement","isHTMLElement","isShadowRoot","getNodeName","getDocumentElement","getWindowScrollBarX","getComputedStyle","isScrollParent","getCompositeRect","elementOrVirtualElement","offsetParent","isFixed","documentElement","isOffsetParentAnElement","scroll","offsets","getLayoutRect","clientRect","Math","getParentNode","getScrollParent","listScrollParents","list","scrollParent","_element$ownerDocumen","isBody","target","updatedList","getTrueOffsetParent","getOffsetParent","a","isFirefox","navigator","getContainingBlock","currentNode","css","order","modifiers","modifier","visited","dep","depModifier","map","sort","Map","Set","result","debounce","fn","pending","Promise","resolve","undefined","getBasePlacement","placement","contains","parent","child","rootNode","next","rectToClientRect","getClientRectFromMixedType","clippingParent","viewport","html","visualViewport","winScroll","body","max","getClippingRect","boundary","rootBoundary","mainClippingParents","getClippingParents","clippingParents","clipperElement","accRect","min","clippingRect","getMainAxisFromPlacement","computeOffsets","reference","basePlacement","commonX","commonY","mainAxis","len","variation","start","end","mergePaddingObject","paddingObject","expandToHashMap","value","keys","hashMap","key","detectOverflow","state","options","popper","altBoundary","padding","basePlacements","referenceElement","elementContext","popperRect","strategy","popperOffsets","popperClientRect","referenceClientRect","overflowOffsets","clippingClientRect","elementClientRect","offsetData","offset","multiply","axis","areValidElements","args","popperGenerator","generatorOptions","defaultModifiers","defaultOptions","DEFAULT_OPTIONS","effectCleanupFns","orderedModifiers","modifiersData","elements","attributes","styles","isDestroyed","instance","setOptions","cleanupModifierEffects","orderModifiers","acc","phase","mergeByName","merged","current","existing","data","m","name","cleanupFn","effect","noopFn","forceUpdate","index","update","destroy","mapToStyles","position","gpuAcceleration","adaptive","roundOffsets","roundOffsetsByDPR","dpr","round","e","hasX","sideX","sideY","heightProp","widthProp","commonStyles","unsetSides","hasY","getOppositePlacement","matched","getOppositeVariationPlacement","getSideOffsets","overflow","preventedOffsets","isAnySideFullyClipped","side","variationPlacements","placements","auto","modifierPhases","passive","enabled","effect$2","resize","scrollParents","computeStyles","applyStyles","style","Object","effect$1","initialStyles","margin","arrow","property","attribute","requires","distanceAndSkiddingToXY","invertDistance","rects","distance","skidding","hash","flip","specifiedFallbackPlacements","flipVariations","allowedAutoPlacements","preferredPlacement","getExpandedFallbackPlacements","oppositePlacement","fallbackPlacements","computeAutoPlacement","allPlacements","allowedPlacements","overflows","b","checksMap","firstFittingPlacement","i","isStartVariation","isVertical","mainVariationSide","checks","altVariationSide","check","makeFallbackChecks","fittingPlacement","requiresIfExists","_skip","preventOverflow","checkMainAxis","checkAltAxis","tetherOffset","isBasePlacement","referenceRect","tetherOffsetValue","mainSide","altSide","additive","tether","minLen","arrowElement","arrowPaddingObject","mathMax","min$1","mathMin","arrowRect","arrowLen","arrowPaddingMin","arrowPaddingMax","maxLen","minOffset","offsetModifierValue","arrowOffsetParent","maxOffset","tetherMin","tetherMax","preventedOffset","altAxis","minProp","maxProp","endDiff","startDiff","center","clientSize","hide","referenceOverflow","popperAltOverflow","referenceClippingOffsets","popperEscapeOffsets","isReferenceHidden","hasPopperEscaped","createPopper","defaultModifiers$1","eventListeners"],"mappings":";;;;8OAGeA,WACbC,SAIO,CACLC,OAHIC,EAAOF,iCAIXG,OAAQD,SACRE,IAAKF,MACLG,MAAOH,QACPI,OAAQJ,SACRK,KAAML,OACNM,EAAGN,OACHO,EAAGP,OCZQQ,WAAmBC,gBAC5BA,EACKC,OAGe,oBAApBD,cACIE,EAAgBF,kB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