Version Description
(2019.07.19) =
- Remove echo from enqueue_scripts hooks
- Update url on forms dashboard
- Add nonce checks on connect/disconnect APIs
- Sanitize portal id on connect APIs
- Remove queries to DB
- Update plugin permissions
- Update leadin_route
query parameter
- Remove HTML from translations
- Remove notice for outdated plugin
- Remove unused options
- Escape variables
- Avoid phpcs errors on file_get_contents
- Fix mispelled WordPress
Download this release
Release Info
Developer | leadin |
Plugin | HubSpot – Free Marketing Plugin for WordPress |
Version | 7.6.0 |
Comparing to | |
See all releases |
Code changes from version 7.5.5 to 7.6.0
- admin/class-leadinadmin.php +37 -53
- changelog.txt +15 -0
- inc/class-leadin.php +29 -33
- inc/leadin-disconnect.php +3 -12
- inc/leadin-functions.php +43 -36
- inc/leadin-mark-outdated.php +0 -16
- inc/leadin-registration.php +7 -18
- js/api/hubspotPluginApi.js +0 -1
- js/api/wordpressApi.js +2 -3
- js/constants/leadinConfig.js +2 -0
- js/handlers.js +0 -6
- js/navigation.js +2 -2
- languages/leadin-de_AT.mo +0 -0
- languages/leadin-de_CH.mo +0 -0
- languages/leadin-de_CH_informal.mo +0 -0
- languages/leadin-de_DE.mo +0 -0
- languages/leadin-de_DE_formal.mo +0 -0
- languages/leadin-en.mo +0 -0
- languages/leadin-en_AU.mo +0 -0
- languages/leadin-en_CA.mo +0 -0
- languages/leadin-en_GB.mo +0 -0
- languages/leadin-en_NZ.mo +0 -0
- languages/leadin-en_US.mo +0 -0
- languages/leadin-en_ZA.mo +0 -0
- languages/leadin-es_AR.mo +0 -0
- languages/leadin-es_CL.mo +0 -0
- languages/leadin-es_CO.mo +0 -0
- languages/leadin-es_CR.mo +0 -0
- languages/leadin-es_ES.mo +0 -0
- languages/leadin-es_GT.mo +0 -0
- languages/leadin-es_MX.mo +0 -0
- languages/leadin-es_PE.mo +0 -0
- languages/leadin-es_PR.mo +0 -0
- languages/leadin-es_VE.mo +0 -0
- languages/leadin-fr_BE.mo +0 -0
- languages/leadin-fr_CA.mo +0 -0
- languages/leadin-fr_FR.mo +0 -0
- languages/leadin-ja.mo +0 -0
- languages/leadin-pt_AO.mo +0 -0
- languages/leadin-pt_BR.mo +0 -0
- languages/leadin-pt_PT.mo +0 -0
- languages/leadin-pt_PT_ao90.mo +0 -0
- leadin.php +3 -144
- readme.txt +18 -21
- scripts/leadin.js +1 -1
- scripts/leadin.js.map +1 -1
- tests/inc/test-leadin-functions.php +25 -23
- tests/inc/test-leadin-mark-outdated.php +0 -32
admin/class-leadinadmin.php
CHANGED
@@ -16,23 +16,6 @@ if ( ! defined( 'LEADIN_ADMIN_PATH' ) ) {
|
|
16 |
// =============================================
|
17 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
18 |
|
19 |
-
/**
|
20 |
-
* Print notice at the top of every page of the admin panel
|
21 |
-
*
|
22 |
-
* @param string $text translated text to show inside the notice.
|
23 |
-
*/
|
24 |
-
function leadin_print_notice( $text ) {
|
25 |
-
?>
|
26 |
-
<div class="notice notice-warning is-dismissible">
|
27 |
-
<p>
|
28 |
-
<img src="<?php echo esc_attr( LEADIN_PATH . '/images/sprocket.svg' ); ?>" height="16" style="margin-bottom: -3px" />
|
29 |
-
|
30 |
-
<?php echo $text; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
31 |
-
</p>
|
32 |
-
</div>
|
33 |
-
<?php
|
34 |
-
}
|
35 |
-
|
36 |
/**
|
37 |
* Find what notice (if any) needs to be rendered
|
38 |
*/
|
@@ -40,12 +23,28 @@ function leadin_action_required_notice() {
|
|
40 |
$current_screen = get_current_screen();
|
41 |
if ( 'leadin' !== $current_screen->parent_base ) {
|
42 |
$leadin_icon = LEADIN_PATH . '/images/sprocket.svg';
|
43 |
-
if ( get_option( '
|
44 |
-
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
}
|
50 |
|
51 |
/**
|
@@ -74,7 +73,7 @@ class LeadinAdmin {
|
|
74 |
|
75 |
$affiliate = $this->get_affiliate_code();
|
76 |
if ( $affiliate ) {
|
77 |
-
|
78 |
}
|
79 |
$this->hydrate_acquisition_attribution();
|
80 |
}
|
@@ -84,8 +83,8 @@ class LeadinAdmin {
|
|
84 |
*/
|
85 |
private function get_affiliate_code() {
|
86 |
$affiliate = get_option( 'hubspot_affiliate_code' );
|
87 |
-
if ( ! $affiliate
|
88 |
-
$affiliate = trim( preg_replace( '/\s\s+/', ' ',
|
89 |
}
|
90 |
if ( $affiliate ) {
|
91 |
return $affiliate;
|
@@ -109,7 +108,7 @@ class LeadinAdmin {
|
|
109 |
}
|
110 |
|
111 |
if ( file_exists( LEADIN_PLUGIN_DIR . '/hs_attribution.txt' ) ) {
|
112 |
-
$acquisition_attribution = trim(
|
113 |
add_option( 'hubspot_acquisition_attribution', $acquisition_attribution );
|
114 |
}
|
115 |
}
|
@@ -128,43 +127,22 @@ class LeadinAdmin {
|
|
128 |
* Adds Leadin menu to /wp-admin sidebar
|
129 |
*/
|
130 |
public function leadin_add_menu_items() {
|
131 |
-
$options = get_option( 'leadin_options' );
|
132 |
-
|
133 |
global $submenu;
|
134 |
global $wp_version;
|
135 |
|
136 |
-
// Block non-sanctioned users from accessing Leadin.
|
137 |
-
$capability = 'activate_plugins';
|
138 |
-
if ( ! current_user_can( 'activate_plugins' ) ) {
|
139 |
-
if ( ! array_key_exists( 'li_grant_access_to_' . leadin_get_user_role(), $options ) ) {
|
140 |
-
return false;
|
141 |
-
} else {
|
142 |
-
if ( current_user_can( 'manage_network' ) ) { // super admin.
|
143 |
-
$capability = 'manage_network';
|
144 |
-
} elseif ( current_user_can( 'edit_pages' ) ) { // editor.
|
145 |
-
$capability = 'edit_pages';
|
146 |
-
} elseif ( current_user_can( 'publish_posts' ) ) { // author.
|
147 |
-
$capability = 'publish_posts';
|
148 |
-
} elseif ( current_user_can( 'edit_posts' ) ) { // contributor.
|
149 |
-
$capability = 'edit_posts';
|
150 |
-
} elseif ( current_user_can( 'read' ) ) { // subscriber.
|
151 |
-
$capability = 'read';
|
152 |
-
}
|
153 |
-
}
|
154 |
-
}
|
155 |
-
|
156 |
$notification_icon = '';
|
157 |
if ( ! get_option( 'leadin_portalId' ) ) {
|
158 |
$notification_icon = ' <span class="update-plugins count-1"><span class="plugin-count">!</span></span>';
|
159 |
}
|
160 |
|
161 |
-
add_menu_page( __( 'HubSpot', 'leadin' ), __( 'HubSpot', 'leadin' ) . $notification_icon, $capability, 'leadin', array( $this, 'leadin_build_app' ), 'dashicons-sprocket', '25.100713' );
|
162 |
-
|
163 |
$portal_id = get_option( 'leadin_portalId' );
|
164 |
if ( ! empty( $portal_id ) ) {
|
165 |
-
|
166 |
-
add_submenu_page( 'leadin', __( '
|
|
|
167 |
remove_submenu_page( 'leadin', 'leadin' );
|
|
|
|
|
168 |
}
|
169 |
}
|
170 |
|
@@ -215,8 +193,13 @@ class LeadinAdmin {
|
|
215 |
}
|
216 |
|
217 |
if ( $error_message ) {
|
218 |
-
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
220 |
} else {
|
221 |
$iframe_url = leadin_get_iframe_src();
|
222 |
?>
|
@@ -254,6 +237,7 @@ class LeadinAdmin {
|
|
254 |
'hubspotBaseUrl' => constant( 'LEADIN_BASE_URL' ),
|
255 |
'leadinPluginVersion' => constant( 'LEADIN_PLUGIN_VERSION' ),
|
256 |
'locale' => get_locale(),
|
|
|
257 |
'phpVersion' => leadin_parse_version( phpversion() ),
|
258 |
'plugins' => get_plugins(),
|
259 |
'portalId' => get_option( 'leadin_portalId' ),
|
16 |
// =============================================
|
17 |
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
/**
|
20 |
* Find what notice (if any) needs to be rendered
|
21 |
*/
|
23 |
$current_screen = get_current_screen();
|
24 |
if ( 'leadin' !== $current_screen->parent_base ) {
|
25 |
$leadin_icon = LEADIN_PATH . '/images/sprocket.svg';
|
26 |
+
if ( ! get_option( 'leadin_portalId' ) && leadin_is_admin() ) {
|
27 |
+
$message = sprintf(
|
28 |
+
esc_html(
|
29 |
+
__( 'The HubSpot plugin isn’t connected right now. To use HubSpot tools on your WordPress site, %1$sconnect the plugin now%2$s.', 'leadin' )
|
30 |
+
),
|
31 |
+
'<a href="admin.php?page=leadin">',
|
32 |
+
'</a>'
|
33 |
+
);
|
34 |
}
|
35 |
}
|
36 |
+
|
37 |
+
if ( isset( $message ) ) {
|
38 |
+
?>
|
39 |
+
<div class="notice notice-warning is-dismissible">
|
40 |
+
<p>
|
41 |
+
<img src="<?php echo esc_attr( LEADIN_PATH . '/images/sprocket.svg' ); ?>" height="16" style="margin-bottom: -3px" />
|
42 |
+
|
43 |
+
<?php echo $message; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
44 |
+
</p>
|
45 |
+
</div>
|
46 |
+
<?php
|
47 |
+
}
|
48 |
}
|
49 |
|
50 |
/**
|
73 |
|
74 |
$affiliate = $this->get_affiliate_code();
|
75 |
if ( $affiliate ) {
|
76 |
+
add_option( 'hubspot_affiliate_code', $affiliate );
|
77 |
}
|
78 |
$this->hydrate_acquisition_attribution();
|
79 |
}
|
83 |
*/
|
84 |
private function get_affiliate_code() {
|
85 |
$affiliate = get_option( 'hubspot_affiliate_code' );
|
86 |
+
if ( ! $affiliate ) {
|
87 |
+
$affiliate = trim( preg_replace( '/\s\s+/', ' ', leadin_file_get_contents( 'hs_affiliate.txt' ) ) );
|
88 |
}
|
89 |
if ( $affiliate ) {
|
90 |
return $affiliate;
|
108 |
}
|
109 |
|
110 |
if ( file_exists( LEADIN_PLUGIN_DIR . '/hs_attribution.txt' ) ) {
|
111 |
+
$acquisition_attribution = trim( leadin_file_get_contents( 'hs_attribution.txt' ) );
|
112 |
add_option( 'hubspot_acquisition_attribution', $acquisition_attribution );
|
113 |
}
|
114 |
}
|
127 |
* Adds Leadin menu to /wp-admin sidebar
|
128 |
*/
|
129 |
public function leadin_add_menu_items() {
|
|
|
|
|
130 |
global $submenu;
|
131 |
global $wp_version;
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
$notification_icon = '';
|
134 |
if ( ! get_option( 'leadin_portalId' ) ) {
|
135 |
$notification_icon = ' <span class="update-plugins count-1"><span class="plugin-count">!</span></span>';
|
136 |
}
|
137 |
|
|
|
|
|
138 |
$portal_id = get_option( 'leadin_portalId' );
|
139 |
if ( ! empty( $portal_id ) ) {
|
140 |
+
add_menu_page( __( 'HubSpot', 'leadin' ), __( 'HubSpot', 'leadin' ) . $notification_icon, 'read', 'leadin', array( $this, 'leadin_build_app' ), 'dashicons-sprocket', '25.100713' );
|
141 |
+
add_submenu_page( 'leadin', __( 'Forms', 'leadin' ), __( 'Forms', 'leadin' ), 'read', 'leadin_forms', array( $this, 'leadin_build_app' ) );
|
142 |
+
add_submenu_page( 'leadin', __( 'Settings', 'leadin' ), __( 'Settings', 'leadin' ), 'read', 'leadin_settings', array( $this, 'leadin_build_app' ) );
|
143 |
remove_submenu_page( 'leadin', 'leadin' );
|
144 |
+
} else {
|
145 |
+
add_menu_page( __( 'HubSpot', 'leadin' ), __( 'HubSpot', 'leadin' ) . $notification_icon, 'activate_plugins', 'leadin', array( $this, 'leadin_build_app' ), 'dashicons-sprocket', '25.100713' );
|
146 |
}
|
147 |
}
|
148 |
|
193 |
}
|
194 |
|
195 |
if ( $error_message ) {
|
196 |
+
?>
|
197 |
+
<div class='notice notice-warning'>
|
198 |
+
<p>
|
199 |
+
<?php echo esc_html( $error_message ); ?>
|
200 |
+
</p>
|
201 |
+
</div>
|
202 |
+
<?php
|
203 |
} else {
|
204 |
$iframe_url = leadin_get_iframe_src();
|
205 |
?>
|
237 |
'hubspotBaseUrl' => constant( 'LEADIN_BASE_URL' ),
|
238 |
'leadinPluginVersion' => constant( 'LEADIN_PLUGIN_VERSION' ),
|
239 |
'locale' => get_locale(),
|
240 |
+
'nonce' => wp_create_nonce( 'hubspot-ajax' ),
|
241 |
'phpVersion' => leadin_parse_version( phpversion() ),
|
242 |
'plugins' => get_plugins(),
|
243 |
'portalId' => get_option( 'leadin_portalId' ),
|
changelog.txt
CHANGED
@@ -1,3 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
= 7.5.5 (2019.07.16) =
|
2 |
- Fix comment escaping
|
3 |
- Remove unused cookie (fix error message on activation)
|
1 |
+
= 7.6.0 (2019.07.19) =
|
2 |
+
- Remove echo from enqueue_scripts hooks
|
3 |
+
- Update url on forms dashboard
|
4 |
+
- Add nonce checks on connect/disconnect APIs
|
5 |
+
- Sanitize portal id on connect APIs
|
6 |
+
- Remove queries to DB
|
7 |
+
- Update plugin permissions
|
8 |
+
- Update `leadin_route` query parameter
|
9 |
+
- Remove HTML from translations
|
10 |
+
- Remove notice for outdated plugin
|
11 |
+
- Remove unused options
|
12 |
+
- Escape variables
|
13 |
+
- Avoid phpcs errors on file_get_contents
|
14 |
+
- Fix mispelled WordPress
|
15 |
+
|
16 |
= 7.5.5 (2019.07.16) =
|
17 |
- Fix comment escaping
|
18 |
- Remove unused cookie (fix error message on activation)
|
inc/class-leadin.php
CHANGED
@@ -11,20 +11,16 @@ class Leadin {
|
|
11 |
public function __construct() {
|
12 |
global $pagenow;
|
13 |
|
14 |
-
add_action( '
|
|
|
15 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_common_frontend_scripts' ) );
|
|
|
|
|
16 |
|
17 |
if ( is_admin() ) {
|
18 |
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
|
19 |
$li_wp_admin = new LeadinAdmin();
|
20 |
}
|
21 |
-
} else {
|
22 |
-
// Adds the leadin-tracking script to wp-login.php page which doesnt hook into the enqueue logic.
|
23 |
-
if ( $this->leadin_is_login_or_register_page() ) {
|
24 |
-
add_action( 'login_enqueue_scripts', array( $this, 'add_leadin_frontend_scripts' ) );
|
25 |
-
} else {
|
26 |
-
add_action( 'wp_enqueue_scripts', array( $this, 'add_leadin_frontend_scripts' ) );
|
27 |
-
}
|
28 |
}
|
29 |
}
|
30 |
|
@@ -41,12 +37,10 @@ class Leadin {
|
|
41 |
$portal_id = get_option( 'leadin_portalId' );
|
42 |
|
43 |
if ( empty( $portal_id ) ) {
|
44 |
-
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
45 |
-
echo '<!-- HubSpot WordPress Plugin v' . LEADIN_PLUGIN_VERSION . ': embed JS disabled as a portalId has not yet been configured -->';
|
46 |
return;
|
47 |
}
|
48 |
|
49 |
-
$embed_url = "//$embed_domain/$portal_id.js?integration=
|
50 |
$embed_id = 'leadin-scriptloader-js';
|
51 |
|
52 |
if ( is_single() ) {
|
@@ -72,40 +66,42 @@ class Leadin {
|
|
72 |
wp_register_script( $embed_id, $embed_url, array( 'jquery' ), LEADIN_PLUGIN_VERSION, true );
|
73 |
wp_localize_script( $embed_id, 'leadin_wordpress', $leadin_wordpress_info );
|
74 |
wp_enqueue_script( $embed_id );
|
75 |
-
$this->add_page_analytics();
|
76 |
}
|
77 |
|
78 |
/**
|
79 |
* Add leadin.css
|
80 |
*/
|
81 |
public function add_common_frontend_scripts() {
|
82 |
-
|
83 |
-
|
84 |
-
wp_enqueue_style( 'leadin-css' );
|
85 |
-
}
|
86 |
}
|
87 |
|
88 |
/**
|
89 |
* Add tracking code
|
90 |
*/
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
<?php
|
97 |
-
// Pass along the correct content-type.
|
98 |
-
if ( is_single() ) {
|
99 |
-
echo '_hsq.push(["setContentType", "blog-post"]);' . "\n";
|
100 |
-
} elseif ( is_archive() || is_search() ) {
|
101 |
-
echo '_hsq.push(["setContentType", "listing-page"]);' . "\n";
|
102 |
-
} else {
|
103 |
-
echo '_hsq.push(["setContentType", "standard-page"]);' . "\n";
|
104 |
-
}
|
105 |
?>
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
|
111 |
/**
|
11 |
public function __construct() {
|
12 |
global $pagenow;
|
13 |
|
14 |
+
add_action( 'login_head', array( $this, 'add_page_analytics' ) );
|
15 |
+
add_action( 'wp_head', array( $this, 'add_page_analytics' ) );
|
16 |
add_action( 'admin_enqueue_scripts', array( $this, 'add_common_frontend_scripts' ) );
|
17 |
+
add_action( 'login_enqueue_scripts', array( $this, 'add_leadin_frontend_scripts' ) );
|
18 |
+
add_action( 'wp_enqueue_scripts', array( $this, 'add_leadin_frontend_scripts' ) );
|
19 |
|
20 |
if ( is_admin() ) {
|
21 |
if ( ! defined( 'DOING_AJAX' ) || ! DOING_AJAX ) {
|
22 |
$li_wp_admin = new LeadinAdmin();
|
23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
}
|
25 |
}
|
26 |
|
37 |
$portal_id = get_option( 'leadin_portalId' );
|
38 |
|
39 |
if ( empty( $portal_id ) ) {
|
|
|
|
|
40 |
return;
|
41 |
}
|
42 |
|
43 |
+
$embed_url = "//$embed_domain/$portal_id.js?integration=WordPress";
|
44 |
$embed_id = 'leadin-scriptloader-js';
|
45 |
|
46 |
if ( is_single() ) {
|
66 |
wp_register_script( $embed_id, $embed_url, array( 'jquery' ), LEADIN_PLUGIN_VERSION, true );
|
67 |
wp_localize_script( $embed_id, 'leadin_wordpress', $leadin_wordpress_info );
|
68 |
wp_enqueue_script( $embed_id );
|
|
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
* Add leadin.css
|
73 |
*/
|
74 |
public function add_common_frontend_scripts() {
|
75 |
+
wp_register_style( 'leadin-css', LEADIN_PATH . '/style/leadin.css', array(), LEADIN_PLUGIN_VERSION );
|
76 |
+
wp_enqueue_style( 'leadin-css' );
|
|
|
|
|
77 |
}
|
78 |
|
79 |
/**
|
80 |
* Add tracking code
|
81 |
*/
|
82 |
+
public function add_page_analytics() {
|
83 |
+
$portal_id = get_option( 'leadin_portalId' );
|
84 |
+
if ( empty( $portal_id ) ) {
|
85 |
+
echo '<!-- HubSpot WordPress Plugin v' . esc_html( LEADIN_PLUGIN_VERSION ) . ': embed JS disabled as a portalId has not yet been configured -->';
|
86 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
?>
|
88 |
+
<!-- DO NOT COPY THIS SNIPPET! Start of Page Analytics Tracking for HubSpot WordPress plugin v<?php echo esc_html( LEADIN_PLUGIN_VERSION ); ?>-->
|
89 |
+
<script type="text/javascript">
|
90 |
+
var _hsq = _hsq || [];
|
91 |
+
<?php
|
92 |
+
// Pass along the correct content-type.
|
93 |
+
if ( is_single() ) {
|
94 |
+
echo '_hsq.push(["setContentType", "blog-post"]);' . "\n";
|
95 |
+
} elseif ( is_archive() || is_search() ) {
|
96 |
+
echo '_hsq.push(["setContentType", "listing-page"]);' . "\n";
|
97 |
+
} else {
|
98 |
+
echo '_hsq.push(["setContentType", "standard-page"]);' . "\n";
|
99 |
+
}
|
100 |
+
?>
|
101 |
+
</script>
|
102 |
+
<!-- DO NOT COPY THIS SNIPPET! End of Page Analytics Tracking for HubSpot WordPress plugin -->
|
103 |
+
<?php
|
104 |
+
}
|
105 |
}
|
106 |
|
107 |
/**
|
inc/leadin-disconnect.php
CHANGED
@@ -3,25 +3,16 @@ if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
|
3 |
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
-
|
7 |
-
add_action( 'wp_ajax_leadin_disconnect_ajax', 'leadin_disconnect_ajax' );
|
8 |
-
}
|
9 |
|
10 |
/**
|
11 |
* AJAX handler to disconnect portal id
|
12 |
*/
|
13 |
function leadin_disconnect_ajax() {
|
|
|
|
|
14 |
if ( get_option( 'leadin_portalId' ) ) {
|
15 |
delete_option( 'leadin_portalId' );
|
16 |
-
delete_option( 'leadin_slumber_mode' );
|
17 |
-
delete_option( 'leadin_hapikey' );
|
18 |
-
|
19 |
-
delete_option( 'leadin_accessToken' );
|
20 |
-
delete_option( 'leadin_refreshToken' );
|
21 |
-
delete_option( 'leadin_oauth_mode' );
|
22 |
-
delete_option( 'leadin_userId' );
|
23 |
-
delete_option( 'leadin_connectionTimeInMs' );
|
24 |
-
|
25 |
wp_die( '{"message": "Success!"}' );
|
26 |
} else {
|
27 |
wp_die( '{"error": "No leadin_portalId found, cannot disconnect."}', '', 400 );
|
3 |
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
+
add_action( 'wp_ajax_leadin_disconnect_ajax', 'leadin_disconnect_ajax' );
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
* AJAX handler to disconnect portal id
|
10 |
*/
|
11 |
function leadin_disconnect_ajax() {
|
12 |
+
check_ajax_referer( 'hubspot-ajax' );
|
13 |
+
leadin_activate_plugins_or_403();
|
14 |
if ( get_option( 'leadin_portalId' ) ) {
|
15 |
delete_option( 'leadin_portalId' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
wp_die( '{"message": "Success!"}' );
|
17 |
} else {
|
18 |
wp_die( '{"error": "No leadin_portalId found, cannot disconnect."}', '', 400 );
|
inc/leadin-functions.php
CHANGED
@@ -76,6 +76,7 @@ function leadin_get_query_params() {
|
|
76 |
'v' => LEADIN_PLUGIN_VERSION,
|
77 |
'wp' => leadin_parse_version( $wp_version ),
|
78 |
'theme' => get_option( 'stylesheet' ),
|
|
|
79 |
);
|
80 |
|
81 |
if ( LEADIN_STATIC_BUNDLE_VERSION !== 'latest-version' ) {
|
@@ -149,56 +150,35 @@ function leadin_get_ajax_url() {
|
|
149 |
}
|
150 |
|
151 |
/**
|
152 |
-
*
|
153 |
-
*
|
154 |
-
* @param string $query_param the key of a query parameter.
|
155 |
-
*/
|
156 |
-
function leadin_filter_routes( $query_param ) {
|
157 |
-
return strpos( $query_param, 'leadin_route' ) !== false;
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Reducer function callback to concatenate all routes into a single string
|
162 |
-
*
|
163 |
-
* @param string $routes The accumulated routes so far.
|
164 |
-
* @param string $route The next route to concatenate onto previous routes.
|
165 |
-
*/
|
166 |
-
function leadin_reduce_routes( $routes, $route ) {
|
167 |
-
return "$routes/$route";
|
168 |
-
}
|
169 |
-
|
170 |
-
/**
|
171 |
-
* Parse from query parameters the route for our plugin.
|
172 |
-
*
|
173 |
-
* @param array $query_parameters the array of query parameters from the URL.
|
174 |
*/
|
175 |
-
function
|
176 |
-
|
177 |
-
|
|
|
178 |
}
|
179 |
|
180 |
/**
|
181 |
* Returns the right iframe src
|
182 |
-
* The src will be `/hubspot-plugin/{portalId}/{path}`,
|
183 |
* where path is the content after `leadin_` in ?page=leadin_path
|
184 |
-
*
|
|
|
|
|
185 |
*/
|
186 |
function leadin_get_iframe_src() {
|
187 |
-
$sub_routes =
|
188 |
$portal_id = get_option( 'leadin_portalId' );
|
189 |
-
$regex = '/^
|
190 |
-
$page =
|
191 |
-
|
192 |
-
if ( isset( $_GET['page'] ) ) {
|
193 |
-
$page = sanitize_text_field( wp_unslash( $_GET['page'] ) );
|
194 |
-
}
|
195 |
|
196 |
if ( empty( $portal_id ) ) {
|
197 |
return leadin_get_signup_url();
|
198 |
}
|
199 |
|
200 |
-
$pathname
|
201 |
-
$pathname
|
|
|
202 |
return LEADIN_BASE_URL . "/hubspot-plugin/$portal_id$pathname$sub_routes?" . leadin_get_query_params();
|
203 |
}
|
204 |
|
@@ -225,3 +205,30 @@ function leadin_get_form_shortcode( $form_id ) {
|
|
225 |
$portal_id = get_option( 'leadin_portalId' );
|
226 |
return "[hubspot type=form portal=$portal_id id=$form_id]";
|
227 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
'v' => LEADIN_PLUGIN_VERSION,
|
77 |
'wp' => leadin_parse_version( $wp_version ),
|
78 |
'theme' => get_option( 'stylesheet' ),
|
79 |
+
'admin' => leadin_is_admin(),
|
80 |
);
|
81 |
|
82 |
if ( LEADIN_STATIC_BUNDLE_VERSION !== 'latest-version' ) {
|
150 |
}
|
151 |
|
152 |
/**
|
153 |
+
* Get the parsed `leadin_route` from the query string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
*/
|
155 |
+
function leadin_get_leadin_route() {
|
156 |
+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
157 |
+
$leadin_route = isset( $_GET['leadin_route'] ) ? wp_unslash( $_GET['leadin_route'] ) : array();
|
158 |
+
return is_array( $leadin_route ) ? $leadin_route : array();
|
159 |
}
|
160 |
|
161 |
/**
|
162 |
* Returns the right iframe src
|
163 |
+
* The src will be `/hubspot-plugin/{portalId}/{path}/{routes}`,
|
164 |
* where path is the content after `leadin_` in ?page=leadin_path
|
165 |
+
* and routes is the content of the `leadin_route` query parameter
|
166 |
+
* eg: ?page=leadin_forms&leadin_route[0]=foo&leadin_route[1]=bar
|
167 |
+
* will point to /hubspot-plugin/{portalId}/forms/foo/bar
|
168 |
*/
|
169 |
function leadin_get_iframe_src() {
|
170 |
+
$sub_routes = join( '/', leadin_get_leadin_route() );
|
171 |
$portal_id = get_option( 'leadin_portalId' );
|
172 |
+
$regex = '/^hubspot_page_leadin(_|$)/';
|
173 |
+
$page = get_current_screen()->id;
|
|
|
|
|
|
|
|
|
174 |
|
175 |
if ( empty( $portal_id ) ) {
|
176 |
return leadin_get_signup_url();
|
177 |
}
|
178 |
|
179 |
+
$pathname = preg_replace( $regex, '', $page );
|
180 |
+
$pathname = empty( $pathname ) ? $pathname : "/$pathname";
|
181 |
+
$sub_routes = empty( $sub_routes ) ? $sub_routes : "/$sub_routes";
|
182 |
return LEADIN_BASE_URL . "/hubspot-plugin/$portal_id$pathname$sub_routes?" . leadin_get_query_params();
|
183 |
}
|
184 |
|
205 |
$portal_id = get_option( 'leadin_portalId' );
|
206 |
return "[hubspot type=form portal=$portal_id id=$form_id]";
|
207 |
}
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Return true if the current user has the `activate_plugins` capability
|
211 |
+
*/
|
212 |
+
function leadin_is_admin() {
|
213 |
+
return current_user_can( 'activate_plugins' );
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Return 403 if the current user does not have the `activate_plugins` capability
|
218 |
+
*/
|
219 |
+
function leadin_activate_plugins_or_403() {
|
220 |
+
if ( ! leadin_is_admin() ) {
|
221 |
+
wp_die( '{ "error": "Forbidden" }', '', 403 );
|
222 |
+
}
|
223 |
+
}
|
224 |
+
|
225 |
+
/** Get content of local file
|
226 |
+
*
|
227 |
+
* @param string $file_path Relative path starting from the leadin folder.
|
228 |
+
*/
|
229 |
+
function leadin_file_get_contents( $file_path ) {
|
230 |
+
if ( file_exists( plugin_dir_path( LEADIN_BASE_PATH ) . $file_path ) ) {
|
231 |
+
return file_get_contents( plugin_dir_path( LEADIN_BASE_PATH ) . $file_path );
|
232 |
+
}
|
233 |
+
return '';
|
234 |
+
}
|
inc/leadin-mark-outdated.php
DELETED
@@ -1,16 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
3 |
-
wp_die( '', '', 403 );
|
4 |
-
}
|
5 |
-
|
6 |
-
if ( is_admin() ) {
|
7 |
-
add_action( 'wp_ajax_leadin_mark_outdated', 'leadin_mark_outdated_ajax' );
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* AJAX handler to set the current version as outdated
|
12 |
-
*/
|
13 |
-
function leadin_mark_outdated_ajax() {
|
14 |
-
update_option( 'leadin_outdated_version', true );
|
15 |
-
wp_die( '{"message": "Success!"}' );
|
16 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inc/leadin-registration.php
CHANGED
@@ -3,25 +3,23 @@ if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
|
3 |
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
-
|
7 |
-
add_action( 'wp_ajax_leadin_registration_ajax', 'leadin_registration_ajax' );
|
8 |
-
}
|
9 |
|
10 |
/**
|
11 |
-
* AJAX handler to connect portal to
|
12 |
*/
|
13 |
function leadin_registration_ajax() {
|
14 |
-
|
|
|
15 |
$existing_portal_id = get_option( 'leadin_portalId' );
|
16 |
|
17 |
if ( ! empty( $existing_portal_id ) ) {
|
18 |
wp_die( '{"error": "Registration is already complete for this portal"}', '', 400 );
|
19 |
}
|
20 |
|
21 |
-
$request_body
|
22 |
-
$data
|
23 |
-
|
24 |
-
$new_portal_id = $data['portalId'];
|
25 |
|
26 |
if ( empty( $new_portal_id ) ) {
|
27 |
$error_body = array(
|
@@ -32,16 +30,7 @@ function leadin_registration_ajax() {
|
|
32 |
wp_die( json_encode( $error_body ), '', 400 );
|
33 |
}
|
34 |
|
35 |
-
$user_id = $data['userId'];
|
36 |
-
$access_token = $data['accessToken'];
|
37 |
-
$refresh_token = $data['refreshToken'];
|
38 |
-
$connection_time_in_ms = $data['connectionTimeInMs'];
|
39 |
-
|
40 |
add_option( 'leadin_portalId', $new_portal_id );
|
41 |
-
add_option( 'leadin_userId', $user_id );
|
42 |
-
add_option( 'leadin_accessToken', $access_token );
|
43 |
-
add_option( 'leadin_refreshToken', $refresh_token );
|
44 |
-
add_option( 'leadin_connectionTimeInMs', $connection_time_in_ms );
|
45 |
|
46 |
wp_die( '{"message": "Success!"}' );
|
47 |
}
|
3 |
wp_die( '', '', 403 );
|
4 |
}
|
5 |
|
6 |
+
add_action( 'wp_ajax_leadin_registration_ajax', 'leadin_registration_ajax' );
|
|
|
|
|
7 |
|
8 |
/**
|
9 |
+
* AJAX handler to connect portal to WordPress
|
10 |
*/
|
11 |
function leadin_registration_ajax() {
|
12 |
+
check_ajax_referer( 'hubspot-ajax' );
|
13 |
+
leadin_activate_plugins_or_403();
|
14 |
$existing_portal_id = get_option( 'leadin_portalId' );
|
15 |
|
16 |
if ( ! empty( $existing_portal_id ) ) {
|
17 |
wp_die( '{"error": "Registration is already complete for this portal"}', '', 400 );
|
18 |
}
|
19 |
|
20 |
+
$request_body = file_get_contents( 'php://input' );
|
21 |
+
$data = json_decode( $request_body, true );
|
22 |
+
$new_portal_id = intval( $data['portalId'] );
|
|
|
23 |
|
24 |
if ( empty( $new_portal_id ) ) {
|
25 |
$error_body = array(
|
30 |
wp_die( json_encode( $error_body ), '', 400 );
|
31 |
}
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
add_option( 'leadin_portalId', $new_portal_id );
|
|
|
|
|
|
|
|
|
34 |
|
35 |
wp_die( '{"message": "Success!"}' );
|
36 |
}
|
js/api/hubspotPluginApi.js
CHANGED
@@ -14,7 +14,6 @@ export const onGetAssetsPayload = createHandler('leadin_get_assets_payload');
|
|
14 |
export const onGetDomain = createHandler('leadin_get_wp_domain');
|
15 |
export const onInitNavigation = createHandler('leadin_init_navigation');
|
16 |
export const onInterframeReady = createHandler('leadin_interframe_ready');
|
17 |
-
export const onMarkAsOutdated = createHandler('leadin_mark_outdated');
|
18 |
export const onPageReload = createHandler('leadin_page_reload');
|
19 |
export const onUpgrade = createHandler('leadin_upgrade');
|
20 |
export const onSyncRoute = createHandler('leadin_sync_route');
|
14 |
export const onGetDomain = createHandler('leadin_get_wp_domain');
|
15 |
export const onInitNavigation = createHandler('leadin_init_navigation');
|
16 |
export const onInterframeReady = createHandler('leadin_interframe_ready');
|
|
|
17 |
export const onPageReload = createHandler('leadin_page_reload');
|
18 |
export const onUpgrade = createHandler('leadin_upgrade');
|
19 |
export const onSyncRoute = createHandler('leadin_sync_route');
|
js/api/wordpressApi.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
import Raven from '../lib/Raven';
|
2 |
-
import { ajaxUrl } from '../constants/leadinConfig';
|
3 |
|
4 |
function makeRequest(action, method, payload, success, error) {
|
5 |
-
const url = `${ajaxUrl}?action=${action}`;
|
6 |
const ajaxPayload = {
|
7 |
url,
|
8 |
method,
|
@@ -70,4 +70,3 @@ export const connect = (portalId, success, error) =>
|
|
70 |
|
71 |
export const disconnect = post.bind(null, 'leadin_disconnect_ajax', {});
|
72 |
export const getDomain = get.bind(null, 'leadin_get_domain');
|
73 |
-
export const markAsOutdated = get.bind(null, 'leadin_mark_outdated');
|
1 |
import Raven from '../lib/Raven';
|
2 |
+
import { ajaxUrl, nonce } from '../constants/leadinConfig';
|
3 |
|
4 |
function makeRequest(action, method, payload, success, error) {
|
5 |
+
const url = `${ajaxUrl}?action=${action}&_ajax_nonce=${nonce}`;
|
6 |
const ajaxPayload = {
|
7 |
url,
|
8 |
method,
|
70 |
|
71 |
export const disconnect = post.bind(null, 'leadin_disconnect_ajax', {});
|
72 |
export const getDomain = get.bind(null, 'leadin_get_domain');
|
|
js/constants/leadinConfig.js
CHANGED
@@ -4,6 +4,7 @@ const {
|
|
4 |
env,
|
5 |
hubspotBaseUrl,
|
6 |
leadinPluginVersion,
|
|
|
7 |
plugins,
|
8 |
phpVersion,
|
9 |
portalId,
|
@@ -20,6 +21,7 @@ export {
|
|
20 |
hubspotBaseUrl,
|
21 |
i18n,
|
22 |
leadinPluginVersion,
|
|
|
23 |
plugins,
|
24 |
phpVersion,
|
25 |
portalId,
|
4 |
env,
|
5 |
hubspotBaseUrl,
|
6 |
leadinPluginVersion,
|
7 |
+
nonce,
|
8 |
plugins,
|
9 |
phpVersion,
|
10 |
portalId,
|
21 |
hubspotBaseUrl,
|
22 |
i18n,
|
23 |
leadinPluginVersion,
|
24 |
+
nonce,
|
25 |
plugins,
|
26 |
phpVersion,
|
27 |
portalId,
|
js/handlers.js
CHANGED
@@ -2,7 +2,6 @@ import {
|
|
2 |
onInterframeReady,
|
3 |
onConnect,
|
4 |
onDisconnect,
|
5 |
-
onMarkAsOutdated,
|
6 |
onUpgrade,
|
7 |
onPageReload,
|
8 |
onInitNavigation,
|
@@ -17,7 +16,6 @@ import {
|
|
17 |
import {
|
18 |
connect,
|
19 |
disconnect,
|
20 |
-
markAsOutdated,
|
21 |
getDomain,
|
22 |
clearPortalIdPolling,
|
23 |
} from './api/wordpressApi';
|
@@ -48,10 +46,6 @@ onDisconnect((message, reply) => {
|
|
48 |
);
|
49 |
});
|
50 |
|
51 |
-
onMarkAsOutdated((message, reply) => {
|
52 |
-
markAsOutdated(reply);
|
53 |
-
});
|
54 |
-
|
55 |
onUpgrade((message, reply) => {
|
56 |
reply();
|
57 |
location.href = `${adminUrl}plugins.php`;
|
2 |
onInterframeReady,
|
3 |
onConnect,
|
4 |
onDisconnect,
|
|
|
5 |
onUpgrade,
|
6 |
onPageReload,
|
7 |
onInitNavigation,
|
16 |
import {
|
17 |
connect,
|
18 |
disconnect,
|
|
|
19 |
getDomain,
|
20 |
clearPortalIdPolling,
|
21 |
} from './api/wordpressApi';
|
46 |
);
|
47 |
});
|
48 |
|
|
|
|
|
|
|
|
|
49 |
onUpgrade((message, reply) => {
|
50 |
reply();
|
51 |
location.href = `${adminUrl}plugins.php`;
|
js/navigation.js
CHANGED
@@ -40,7 +40,7 @@ export function initNavigation() {
|
|
40 |
jQuery(domElements.spaNavigationButtons).click(Raven.wrap(handleClick));
|
41 |
}
|
42 |
|
43 |
-
// Given a route like "/settings/forms", parse it into "?page=leadin_settings&
|
44 |
export function syncRoute(path = '') {
|
45 |
const routes = path.split('/');
|
46 |
|
@@ -56,7 +56,7 @@ export function syncRoute(path = '') {
|
|
56 |
}
|
57 |
|
58 |
const queryParamsRoutes = routes.reduce((acc, route, index) => {
|
59 |
-
return `${acc}
|
60 |
}, '');
|
61 |
|
62 |
window.history.replaceState(
|
40 |
jQuery(domElements.spaNavigationButtons).click(Raven.wrap(handleClick));
|
41 |
}
|
42 |
|
43 |
+
// Given a route like "/settings/forms", parse it into "?page=leadin_settings&leadin_route[0]=forms"
|
44 |
export function syncRoute(path = '') {
|
45 |
const routes = path.split('/');
|
46 |
|
56 |
}
|
57 |
|
58 |
const queryParamsRoutes = routes.reduce((acc, route, index) => {
|
59 |
+
return `${acc}&${encodeURIComponent(`leadin_route[${index}]`)}=${route}`;
|
60 |
}, '');
|
61 |
|
62 |
window.history.replaceState(
|
languages/leadin-de_AT.mo
CHANGED
Binary file
|
languages/leadin-de_CH.mo
CHANGED
Binary file
|
languages/leadin-de_CH_informal.mo
CHANGED
Binary file
|
languages/leadin-de_DE.mo
CHANGED
Binary file
|
languages/leadin-de_DE_formal.mo
CHANGED
Binary file
|
languages/leadin-en.mo
CHANGED
Binary file
|
languages/leadin-en_AU.mo
CHANGED
Binary file
|
languages/leadin-en_CA.mo
CHANGED
Binary file
|
languages/leadin-en_GB.mo
CHANGED
Binary file
|
languages/leadin-en_NZ.mo
CHANGED
Binary file
|
languages/leadin-en_US.mo
CHANGED
Binary file
|
languages/leadin-en_ZA.mo
CHANGED
Binary file
|
languages/leadin-es_AR.mo
CHANGED
Binary file
|
languages/leadin-es_CL.mo
CHANGED
Binary file
|
languages/leadin-es_CO.mo
CHANGED
Binary file
|
languages/leadin-es_CR.mo
CHANGED
Binary file
|
languages/leadin-es_ES.mo
CHANGED
Binary file
|
languages/leadin-es_GT.mo
CHANGED
Binary file
|
languages/leadin-es_MX.mo
CHANGED
Binary file
|
languages/leadin-es_PE.mo
CHANGED
Binary file
|
languages/leadin-es_PR.mo
CHANGED
Binary file
|
languages/leadin-es_VE.mo
CHANGED
Binary file
|
languages/leadin-fr_BE.mo
CHANGED
Binary file
|
languages/leadin-fr_CA.mo
CHANGED
Binary file
|
languages/leadin-fr_FR.mo
CHANGED
Binary file
|
languages/leadin-ja.mo
CHANGED
Binary file
|
languages/leadin-pt_AO.mo
CHANGED
Binary file
|
languages/leadin-pt_BR.mo
CHANGED
Binary file
|
languages/leadin-pt_PT.mo
CHANGED
Binary file
|
languages/leadin-pt_PT_ao90.mo
CHANGED
Binary file
|
leadin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: HubSpot All-In-One Marketing - Forms, Popups, Live Chat
|
4 |
* Plugin URI: http://www.hubspot.com/integrations/wordpress
|
5 |
* Description: HubSpot’s official WordPress plugin allows you to add forms, popups, and live chat to your website and integrate with the best WordPress CRM.
|
6 |
-
* Version: 7.
|
7 |
* Author: HubSpot
|
8 |
* Author URI: http://www.hubspot.com
|
9 |
* License: GPL v3
|
@@ -60,7 +60,7 @@ if ( ! defined( 'LEADIN_DB_VERSION' ) ) {
|
|
60 |
}
|
61 |
|
62 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
63 |
-
define( 'LEADIN_PLUGIN_VERSION', '7.
|
64 |
}
|
65 |
|
66 |
if ( ! defined( 'LEADIN_SOURCE' ) ) {
|
@@ -94,7 +94,7 @@ if ( ! defined( 'LEADIN_SIGNUP_BASE_URL' ) ) {
|
|
94 |
if ( ! defined( 'LEADIN_STATIC_BUNDLE_VERSION' ) ) {
|
95 |
// This should always be set to: latest-version
|
96 |
// The deploy script will replace it with an actual bundle version for releases.
|
97 |
-
define( 'LEADIN_STATIC_BUNDLE_VERSION', 'static-1.
|
98 |
}
|
99 |
|
100 |
// =============================================
|
@@ -108,7 +108,6 @@ require_once LEADIN_PLUGIN_DIR . '/inc/leadin-functions.php';
|
|
108 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-registration.php';
|
109 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-disconnect.php';
|
110 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-wp-get.php';
|
111 |
-
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-mark-outdated.php';
|
112 |
require_once LEADIN_PLUGIN_DIR . '/admin/class-leadinadmin.php';
|
113 |
|
114 |
require_once LEADIN_PLUGIN_DIR . '/inc/class-leadin.php';
|
@@ -117,133 +116,6 @@ require_once LEADIN_PLUGIN_DIR . '/inc/class-leadin.php';
|
|
117 |
// =============================================
|
118 |
// Hooks & Filters
|
119 |
// =============================================
|
120 |
-
/**
|
121 |
-
* Activate the plugin
|
122 |
-
*
|
123 |
-
* @param bool $network_wide network_wide.
|
124 |
-
*/
|
125 |
-
function leadin_activate( $network_wide ) {
|
126 |
-
// Check activation on entire network or one blog.
|
127 |
-
if ( is_multisite() && $network_wide ) {
|
128 |
-
global $wpdb;
|
129 |
-
|
130 |
-
// Get this so we can switch back to it later.
|
131 |
-
$current_blog = $wpdb->blogid;
|
132 |
-
// For storing the list of activated blogs.
|
133 |
-
$activated = array();
|
134 |
-
|
135 |
-
// Get all blogs in the network and activate plugin on each one.
|
136 |
-
$blog_ids = $wpdb->get_col(
|
137 |
-
"SELECT blog_id FROM $wpdb->blogs"
|
138 |
-
);
|
139 |
-
foreach ( $blog_ids as $blog_id ) {
|
140 |
-
switch_to_blog( $blog_id );
|
141 |
-
leadin_add_defaults();
|
142 |
-
$activated[] = $blog_id;
|
143 |
-
}
|
144 |
-
|
145 |
-
// Switch back to the current blog.
|
146 |
-
switch_to_blog( $current_blog );
|
147 |
-
|
148 |
-
// Store the array for a later function.
|
149 |
-
update_site_option( 'leadin_activated', $activated );
|
150 |
-
} else {
|
151 |
-
leadin_add_defaults();
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
/**
|
156 |
-
* Check Leadin installation and set options
|
157 |
-
*/
|
158 |
-
function leadin_add_defaults() {
|
159 |
-
global $wpdb;
|
160 |
-
$options = get_option( 'leadin_options' );
|
161 |
-
|
162 |
-
if ( ( 1 !== $options['li_installed'] ) || ( ! is_array( $options ) ) ) {
|
163 |
-
$opt = array(
|
164 |
-
'li_installed' => 1,
|
165 |
-
'leadin_version' => LEADIN_PLUGIN_VERSION,
|
166 |
-
'li_email' => get_bloginfo( 'admin_email' ),
|
167 |
-
'li_updates_subscription' => 1,
|
168 |
-
'onboarding_step' => 1,
|
169 |
-
'onboarding_complete' => 0,
|
170 |
-
'ignore_settings_popup' => 0,
|
171 |
-
'data_recovered' => 1,
|
172 |
-
'delete_flags_fixed' => 1,
|
173 |
-
'beta_tester' => 0,
|
174 |
-
'converted_to_tags' => 1,
|
175 |
-
'names_added_to_contacts' => 1,
|
176 |
-
'affiliate_code' => '',
|
177 |
-
);
|
178 |
-
|
179 |
-
// Add the Pro flag if this is a pro installation.
|
180 |
-
if ( ( defined( 'LEADIN_UTM_SOURCE' ) && 'leadin%20repo%20plugin' !== LEADIN_UTM_SOURCE ) || ! defined( 'LEADIN_UTM_SOURCE' ) ) {
|
181 |
-
$opt['pro'] = 1;
|
182 |
-
}
|
183 |
-
|
184 |
-
// this is a hack because multisite doesn't recognize local options using either update_option or update_site_option...
|
185 |
-
if ( is_multisite() ) {
|
186 |
-
$multisite_prefix = ( is_multisite() ? $wpdb->prefix : '' );
|
187 |
-
$wpdb->query(
|
188 |
-
$wpdb->prepare(
|
189 |
-
"INSERT INTO %soptions ( option_name, option_value ) VALUES ('leadin_options', %s)",
|
190 |
-
$multisite_prefix,
|
191 |
-
serialize( $opt )
|
192 |
-
)
|
193 |
-
);
|
194 |
-
// TODO: Glob settings for multisite.
|
195 |
-
} else {
|
196 |
-
update_option( 'leadin_options', $opt );
|
197 |
-
}
|
198 |
-
}
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* Deactivate Leadin plugin hook
|
203 |
-
*
|
204 |
-
* @param bool $network_wide network_wide.
|
205 |
-
*/
|
206 |
-
function leadin_deactivate( $network_wide ) {
|
207 |
-
if ( is_multisite() && $network_wide ) {
|
208 |
-
global $wpdb;
|
209 |
-
|
210 |
-
// Get this so we can switch back to it later.
|
211 |
-
$current_blog = $wpdb->blogid;
|
212 |
-
|
213 |
-
// Get all blogs in the network and activate plugin on each one.
|
214 |
-
$blog_ids = $wpdb->get_col(
|
215 |
-
"SELECT blog_id FROM $wpdb->blogs"
|
216 |
-
);
|
217 |
-
foreach ( $blog_ids as $blog_id ) {
|
218 |
-
switch_to_blog( $blog_id );
|
219 |
-
}
|
220 |
-
|
221 |
-
// Switch back to the current blog.
|
222 |
-
switch_to_blog( $current_blog );
|
223 |
-
}
|
224 |
-
}
|
225 |
-
|
226 |
-
/**
|
227 |
-
* Handler for wpmu_new_blog
|
228 |
-
*
|
229 |
-
* @param any $blog_id read wpmu_new_blog doc.
|
230 |
-
* @param any $user_id read wpmu_new_blog doc.
|
231 |
-
* @param any $domain read wpmu_new_blog doc.
|
232 |
-
* @param any $path read wpmu_new_blog doc.
|
233 |
-
* @param any $site_id read wpmu_new_blog doc.
|
234 |
-
* @param any $meta read wpmu_new_blog doc.
|
235 |
-
*/
|
236 |
-
function leadin_activate_on_new_blog( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
|
237 |
-
global $wpdb;
|
238 |
-
|
239 |
-
if ( is_plugin_active_for_network( 'leadin/leadin.php' ) ) {
|
240 |
-
$current_blog = $wpdb->blogid;
|
241 |
-
switch_to_blog( $blog_id );
|
242 |
-
leadin_add_defaults();
|
243 |
-
switch_to_blog( $current_blog );
|
244 |
-
}
|
245 |
-
}
|
246 |
-
|
247 |
/**
|
248 |
* Parse shortcode
|
249 |
*
|
@@ -315,16 +187,3 @@ function leadin_init() {
|
|
315 |
}
|
316 |
|
317 |
add_action( 'plugins_loaded', 'leadin_init', 14 );
|
318 |
-
|
319 |
-
if ( is_admin() ) {
|
320 |
-
// Activate + install Leadin.
|
321 |
-
register_activation_hook( __FILE__, 'leadin_activate' );
|
322 |
-
|
323 |
-
// Deactivate Leadin.
|
324 |
-
register_deactivation_hook( __FILE__, 'leadin_deactivate' );
|
325 |
-
|
326 |
-
// Activate on newly created wpmu blog.
|
327 |
-
add_action( 'wpmu_new_blog', 'leadin_activate_on_new_blog', 10, 6 );
|
328 |
-
}
|
329 |
-
|
330 |
-
|
3 |
* Plugin Name: HubSpot All-In-One Marketing - Forms, Popups, Live Chat
|
4 |
* Plugin URI: http://www.hubspot.com/integrations/wordpress
|
5 |
* Description: HubSpot’s official WordPress plugin allows you to add forms, popups, and live chat to your website and integrate with the best WordPress CRM.
|
6 |
+
* Version: 7.6.0
|
7 |
* Author: HubSpot
|
8 |
* Author URI: http://www.hubspot.com
|
9 |
* License: GPL v3
|
60 |
}
|
61 |
|
62 |
if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
|
63 |
+
define( 'LEADIN_PLUGIN_VERSION', '7.6.0' );
|
64 |
}
|
65 |
|
66 |
if ( ! defined( 'LEADIN_SOURCE' ) ) {
|
94 |
if ( ! defined( 'LEADIN_STATIC_BUNDLE_VERSION' ) ) {
|
95 |
// This should always be set to: latest-version
|
96 |
// The deploy script will replace it with an actual bundle version for releases.
|
97 |
+
define( 'LEADIN_STATIC_BUNDLE_VERSION', 'static-1.575' );
|
98 |
}
|
99 |
|
100 |
// =============================================
|
108 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-registration.php';
|
109 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-disconnect.php';
|
110 |
require_once LEADIN_PLUGIN_DIR . '/inc/leadin-wp-get.php';
|
|
|
111 |
require_once LEADIN_PLUGIN_DIR . '/admin/class-leadinadmin.php';
|
112 |
|
113 |
require_once LEADIN_PLUGIN_DIR . '/inc/class-leadin.php';
|
116 |
// =============================================
|
117 |
// Hooks & Filters
|
118 |
// =============================================
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
/**
|
120 |
* Parse shortcode
|
121 |
*
|
187 |
}
|
188 |
|
189 |
add_action( 'plugins_loaded', 'leadin_init', 14 );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: hubspot, crm, forms, popup, live chat, email, contact form, newsletter, ma
|
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
Requires PHP: 5.6
|
9 |
-
Stable tag: 7.
|
10 |
|
11 |
HubSpot All-In-One Marketing, is a free all-in-one marketing plugin that allows you to easily use HubSpot forms, popups, and live chat on your WordPress site and create and send email campaigns. If you’re already a HubSpot user, the plugin lets you connect your HubSpot account to your website without any code.
|
12 |
|
@@ -173,26 +173,23 @@ Please <a href="https://community.hubspot.com?utm_source=wordpress-plugin-listin
|
|
173 |
|
174 |
== Changelog ==
|
175 |
|
176 |
-
- Current version: 7.
|
177 |
-
- Current version release: 2019-07-
|
178 |
-
|
179 |
-
= 7.
|
180 |
-
-
|
181 |
-
-
|
182 |
-
-
|
183 |
-
-
|
184 |
-
-
|
185 |
-
-
|
186 |
-
-
|
187 |
-
|
188 |
-
|
189 |
-
-
|
190 |
-
-
|
191 |
-
|
192 |
-
-
|
193 |
-
- Reduce loading time for non authenticated users
|
194 |
-
- Improve performances when navigating between pages
|
195 |
-
- Add tests
|
196 |
|
197 |
= 7.0.0 (2018.10.03) =
|
198 |
- Add deeper integration with HubSpot. Starts a new release of a new forms integration within WordPress. Released progressively for some users.
|
6 |
Requires at least: 4.0
|
7 |
Tested up to: 5.2
|
8 |
Requires PHP: 5.6
|
9 |
+
Stable tag: 7.6.0
|
10 |
|
11 |
HubSpot All-In-One Marketing, is a free all-in-one marketing plugin that allows you to easily use HubSpot forms, popups, and live chat on your WordPress site and create and send email campaigns. If you’re already a HubSpot user, the plugin lets you connect your HubSpot account to your website without any code.
|
12 |
|
173 |
|
174 |
== Changelog ==
|
175 |
|
176 |
+
- Current version: 7.6.0
|
177 |
+
- Current version release: 2019-07-19
|
178 |
+
|
179 |
+
= 7.6.0 (2019.07.19) =
|
180 |
+
- Remove echo from enqueue_scripts hooks
|
181 |
+
- Update url on forms dashboard
|
182 |
+
- Add nonce checks on connect/disconnect APIs
|
183 |
+
- Sanitize portal id on connect APIs
|
184 |
+
- Remove queries to DB
|
185 |
+
- Update plugin permissions
|
186 |
+
- Update `leadin_route` query parameter
|
187 |
+
- Remove HTML from translations
|
188 |
+
- Remove notice for outdated plugin
|
189 |
+
- Remove unused options
|
190 |
+
- Escape variables
|
191 |
+
- Avoid phpcs errors on file_get_contents
|
192 |
+
- Fix mispelled WordPress
|
|
|
|
|
|
|
193 |
|
194 |
= 7.0.0 (2018.10.03) =
|
195 |
- Add deeper integration with HubSpot. Starts a new release of a new forms integration within WordPress. Released progressively for some users.
|
scripts/leadin.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1 |
-
!function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=8)}([function(e,t,o){(function(t){var r=o(3),n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},a=n.Raven,l=new r;l.noConflict=function(){return n.Raven=a,l},l.afterLoad(),e.exports=l}).call(this,o(1))},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){(function(t){var o="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function r(e){return void 0===e}function n(e){return"[object String]"===Object.prototype.toString.call(e)}function a(){try{return new ErrorEvent(""),!0}catch(e){return!1}}function l(e,t){var o,n;if(r(e.length))for(o in e)i(e,o)&&t.call(null,o,e[o]);else if(n=e.length)for(o=0;o<n;o++)t.call(null,o,e[o])}function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){var t,o,r,a,l,i=[];if(!e||!e.tagName)return"";if(i.push(e.tagName.toLowerCase()),e.id&&i.push("#"+e.id),(t=e.className)&&n(t))for(o=t.split(/\s+/),l=0;l<o.length;l++)i.push("."+o[l]);var s=["type","name","title","alt"];for(l=0;l<s.length;l++)r=s[l],(a=e.getAttribute(r))&&i.push("["+r+'="'+a+'"]');return i.join("")}function c(e,t){return!!(!!e^!!t)}function u(e,t){if(c(e,t))return!1;var o,r,n=e.frames,a=t.frames;if(n.length!==a.length)return!1;for(var l=0;l<n.length;l++)if(o=n[l],r=a[l],o.filename!==r.filename||o.lineno!==r.lineno||o.colno!==r.colno||o.function!==r.function)return!1;return!0}e.exports={isObject:function(e){return"object"==typeof e&&null!==e},isError:function(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},isErrorEvent:function(e){return a()&&"[object ErrorEvent]"==={}.toString.call(e)},isUndefined:r,isFunction:function(e){return"function"==typeof e},isString:n,isEmptyObject:function(e){for(var t in e)return!1;return!0},supportsErrorEvent:a,wrappedCallback:function(e){return function(t,o){var r=e(t)||t;return o&&o(r)||r}},each:l,objectMerge:function(e,t){return t?(l(t,function(t,o){e[t]=o}),e):e},truncate:function(e,t){return!t||e.length<=t?e:e.substr(0,t)+"…"},objectFrozen:function(e){return!!Object.isFrozen&&Object.isFrozen(e)},hasKey:i,joinRegExp:function(e){for(var t,o=[],r=0,a=e.length;r<a;r++)n(t=e[r])?o.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&o.push(t.source);return new RegExp(o.join("|"),"i")},urlencode:function(e){var t=[];return l(e,function(e,o){t.push(encodeURIComponent(e)+"="+encodeURIComponent(o))}),t.join("&")},uuid4:function(){var e=o.crypto||o.msCrypto;if(!r(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var n=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},htmlTreeAsString:function(e){for(var t,o=[],r=0,n=0,a=" > ".length;e&&r++<5&&!("html"===(t=s(e))||r>1&&n+o.length*a+t.length>=80);)o.push(t),n+=t.length,e=e.parentNode;return o.reverse().join(" > ")},htmlElementAsString:s,isSameException:function(e,t){return!c(e,t)&&(e=e.values[0],t=t.values[0],e.type===t.type&&e.value===t.value&&u(e.stacktrace,t.stacktrace))},isSameStacktrace:u,parseUrl:function(e){var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var o=t[6]||"",r=t[8]||"";return{protocol:t[2],host:t[4],path:t[5],relative:t[5]+o+r}},fill:function(e,t,o,r){var n=e[t];e[t]=o(n),r&&r.push([e,t,n])}}}).call(this,o(1))},function(e,t,o){(function(t){var r=o(4),n=o(5),a=o(6),l=o(2),i=l.isError,s=l.isObject,c=(s=l.isObject,l.isErrorEvent),u=l.isUndefined,f=l.isFunction,p=l.isString,d=l.isEmptyObject,h=l.each,b=l.objectMerge,m=l.truncate,y=l.objectFrozen,g=l.hasKey,v=l.joinRegExp,_=l.urlencode,S=l.uuid4,x=l.htmlTreeAsString,C=l.isSameException,w=l.isSameStacktrace,E=l.parseUrl,F=l.fill,T=o(7).wrapMethod,k="source protocol user pass host port path".split(" "),L=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function O(){return+new Date}var j="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},R=j.document,I=j.navigator;function N(e,t){return f(t)?function(o){return t(o,e)}:t}function B(){for(var e in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!u(R),this._hasNavigator=!u(I),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],collectWindowErrors:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=j.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=O(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=j.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}B.prototype={VERSION:"3.19.1",debug:!1,TraceKit:r,config:function(e,t){var o=this;if(o._globalServer)return this._logDebug("error","Error: Raven has already been configured"),o;if(!e)return o;var n=o._globalOptions;t&&h(t,function(e,t){"tags"===e||"extra"===e||"user"===e?o._globalContext[e]=t:n[e]=t}),o.setDSN(e),n.ignoreErrors.push(/^Script error\.?$/),n.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),n.ignoreErrors=v(n.ignoreErrors),n.ignoreUrls=!!n.ignoreUrls.length&&v(n.ignoreUrls),n.whitelistUrls=!!n.whitelistUrls.length&&v(n.whitelistUrls),n.includePaths=v(n.includePaths),n.maxBreadcrumbs=Math.max(0,Math.min(n.maxBreadcrumbs||100,100));var a={xhr:!0,console:!0,dom:!0,location:!0},l=n.autoBreadcrumbs;"[object Object]"==={}.toString.call(l)?l=b(a,l):!1!==l&&(l=a),n.autoBreadcrumbs=l;var i={tryCatch:!0},s=n.instrument;return"[object Object]"==={}.toString.call(s)?s=b(i,s):!1!==s&&(s=i),n.instrument=s,r.collectWindowErrors=!!n.collectWindowErrors,o},install:function(){var e=this;return e.isSetup()&&!e._isRavenInstalled&&(r.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),e._globalOptions.instrument&&e._globalOptions.instrument.tryCatch&&e._instrumentTryCatch(),e._globalOptions.autoBreadcrumbs&&e._instrumentBreadcrumbs(),e._drainPlugins(),e._isRavenInstalled=!0),Error.stackTraceLimit=e._globalOptions.stackTraceLimit,this},setDSN:function(e){var t=this._parseDSN(e),o=t.path.lastIndexOf("/"),r=t.path.substr(1,o);this._dsn=e,this._globalKey=t.user,this._globalSecret=t.pass&&t.pass.substr(1),this._globalProject=t.path.substr(o+1),this._globalServer=this._getGlobalServer(t),this._globalEndpoint=this._globalServer+"/"+r+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(e,t,o){return f(e)&&(o=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,o)},wrap:function(e,t,o){var r=this;if(u(t)&&!f(e))return e;if(f(e)&&(t=e,e=void 0),!f(t))return t;try{if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__}catch(e){return t}function n(){var n=[],a=arguments.length,l=!e||e&&!1!==e.deep;for(o&&f(o)&&o.apply(this,arguments);a--;)n[a]=l?r.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,n)}catch(t){throw r._ignoreNextOnError(),r.captureException(t,e),t}}for(var a in t)g(t,a)&&(n[a]=t[a]);return n.prototype=t.prototype,t.__raven_wrapper__=n,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return r.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(e,t){var o=!i(e),n=!c(e),a=c(e)&&!e.error;if(o&&n||a)return this.captureMessage(e,b({trimHeadFrames:1,stacktrace:!0},t));c(e)&&(e=e.error),this._lastCapturedException=e;try{var l=r.computeStackTrace(e);this._handleStackInfo(l,t)}catch(t){if(e!==t)throw t}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)){var o,n=b({message:e+""},t=t||{});try{throw new Error(e)}catch(e){o=e}o.name=null;var a=r.computeStackTrace(o),l=a.stack[1],i=l&&l.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(i))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(i))){if(this._globalOptions.stacktrace||t&&t.stacktrace){t=b({fingerprint:e,trimHeadFrames:(t.trimHeadFrames||0)+1},t);var s=this._prepareFrames(a,t);n.stacktrace={frames:s.reverse()}}return this._send(n),this}}},captureBreadcrumb:function(e){var t=b({timestamp:O()/1e3},e);if(f(this._globalOptions.breadcrumbCallback)){var o=this._globalOptions.breadcrumbCallback(t);if(s(o)&&!d(o))t=o;else if(!1===o)return this}return this._breadcrumbs.push(t),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(e){var t=[].slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(n(this._globalContext))},setEnvironment:function(e){return this._globalOptions.environment=e,this},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){var t=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=N(t,e),this},setBreadcrumbCallback:function(e){var t=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=N(t,e),this},setShouldSendCallback:function(e){var t=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=N(t,e),this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=j.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(R){var t=(e=e||{}).eventId||this.lastEventId();if(!t)throw new a("Missing eventId");var o=e.dsn||this._dsn;if(!o)throw new a("Missing DSN");var r=encodeURIComponent,n="";n+="?eventId="+r(t),n+="&dsn="+r(o);var l=e.user||this._globalContext.user;l&&(l.name&&(n+="&name="+r(l.name)),l.email&&(n+="&email="+r(l.email)));var i=this._getGlobalServer(this._parseDSN(o)),s=R.createElement("script");s.async=!0,s.src=i+"/api/embed/error-page/"+n,(R.head||R.body).appendChild(s)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var o,r;if(this._hasDocument){for(r in t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),R.createEvent?(o=R.createEvent("HTMLEvents")).initEvent(e,!0,!0):(o=R.createEventObject()).eventType=e,t)g(t,r)&&(o[r]=t[r]);if(R.createEvent)R.dispatchEvent(o);else try{R.fireEvent("on"+o.eventType.toLowerCase(),o)}catch(e){}}},_breadcrumbEventHandler:function(e){var t=this;return function(o){if(t._keypressTimeout=null,t._lastCapturedEvent!==o){var r;t._lastCapturedEvent=o;try{r=x(o.target)}catch(e){r="<unknown>"}t.captureBreadcrumb({category:"ui."+e,message:r})}}},_keypressEventHandler:function(){var e=this;return function(t){var o;try{o=t.target}catch(e){return}var r=o&&o.tagName;if(r&&("INPUT"===r||"TEXTAREA"===r||o.isContentEditable)){var n=e._keypressTimeout;n||e._breadcrumbEventHandler("input")(t),clearTimeout(n),e._keypressTimeout=setTimeout(function(){e._keypressTimeout=null},1e3)}}},_captureUrlChange:function(e,t){var o=E(this._location.href),r=E(t),n=E(e);this._lastHref=t,o.protocol===r.protocol&&o.host===r.host&&(t=r.relative),o.protocol===n.protocol&&o.host===n.host&&(e=n.relative),this.captureBreadcrumb({category:"navigation",data:{to:t,from:e}})},_instrumentTryCatch:function(){var e=this,t=e._wrappedBuiltIns;function o(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l=n[0];return f(l)&&(n[0]=e.wrap(l)),t.apply?t.apply(this,n):t(n[0],n[1])}}var r=this._globalOptions.autoBreadcrumbs;function n(o){var n=j[o]&&j[o].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(F(n,"addEventListener",function(t){return function(n,a,l,i){try{a&&a.handleEvent&&(a.handleEvent=e.wrap(a.handleEvent))}catch(e){}var s,c,u;return r&&r.dom&&("EventTarget"===o||"Node"===o)&&(c=e._breadcrumbEventHandler("click"),u=e._keypressEventHandler(),s=function(e){if(e){var t;try{t=e.type}catch(e){return}return"click"===t?c(e):"keypress"===t?u(e):void 0}}),t.call(this,n,e.wrap(a,void 0,s),l,i)}},t),F(n,"removeEventListener",function(e){return function(t,o,r,n){try{o=o&&(o.__raven_wrapper__?o.__raven_wrapper__:o)}catch(e){}return e.call(this,t,o,r,n)}},t))}F(j,"setTimeout",o,t),F(j,"setInterval",o,t),j.requestAnimationFrame&&F(j,"requestAnimationFrame",function(t){return function(o){return t(e.wrap(o))}},t);for(var a=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],l=0;l<a.length;l++)n(a[l])},_instrumentBreadcrumbs:function(){var e=this,t=this._globalOptions.autoBreadcrumbs,o=e._wrappedBuiltIns;function r(t,o){t in o&&f(o[t])&&F(o,t,function(t){return e.wrap(t)})}if(t.xhr&&"XMLHttpRequest"in j){var n=XMLHttpRequest.prototype;F(n,"open",function(t){return function(o,r){return p(r)&&-1===r.indexOf(e._globalKey)&&(this.__raven_xhr={method:o,url:r,status_code:null}),t.apply(this,arguments)}},o),F(n,"send",function(t){return function(o){var n=this;function a(){if(n.__raven_xhr&&4===n.readyState){try{n.__raven_xhr.status_code=n.status}catch(e){}e.captureBreadcrumb({type:"http",category:"xhr",data:n.__raven_xhr})}}for(var l=["onload","onerror","onprogress"],i=0;i<l.length;i++)r(l[i],n);return"onreadystatechange"in n&&f(n.onreadystatechange)?F(n,"onreadystatechange",function(t){return e.wrap(t,void 0,a)}):n.onreadystatechange=a,t.apply(this,arguments)}},o)}t.xhr&&"fetch"in j&&F(j,"fetch",function(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l,i=n[0],s="GET";"string"==typeof i?l=i:"Request"in j&&i instanceof j.Request?(l=i.url,i.method&&(s=i.method)):l=""+i,n[1]&&n[1].method&&(s=n[1].method);var c={method:s,url:l,status_code:null};return e.captureBreadcrumb({type:"http",category:"fetch",data:c}),t.apply(this,n).then(function(e){return c.status_code=e.status,e})}},o),t.dom&&this._hasDocument&&(R.addEventListener?(R.addEventListener("click",e._breadcrumbEventHandler("click"),!1),R.addEventListener("keypress",e._keypressEventHandler(),!1)):(R.attachEvent("onclick",e._breadcrumbEventHandler("click")),R.attachEvent("onkeypress",e._keypressEventHandler())));var a=j.chrome,l=!(a&&a.app&&a.app.runtime)&&j.history&&history.pushState&&history.replaceState;if(t.location&&l){var i=j.onpopstate;j.onpopstate=function(){var t=e._location.href;if(e._captureUrlChange(e._lastHref,t),i)return i.apply(this,arguments)};var s=function(t){return function(){var o=arguments.length>2?arguments[2]:void 0;return o&&e._captureUrlChange(e._lastHref,o+""),t.apply(this,arguments)}};F(history,"pushState",s,o),F(history,"replaceState",s,o)}if(t.console&&"console"in j&&console.log){var c=function(t,o){e.captureBreadcrumb({message:t,level:o.level,category:"console"})};h(["debug","info","warn","error","log"],function(e,t){T(console,t,c)})}},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){var t=(e=this._wrappedBuiltIns.shift())[0],o=e[1],r=e[2];t[o]=r}},_drainPlugins:function(){var e=this;h(this._plugins,function(t,o){var r=o[0],n=o[1];r.apply(e,[e].concat(n))})},_parseDSN:function(e){var t=L.exec(e),o={},r=7;try{for(;r--;)o[k[r]]=t[r]||""}catch(t){throw new a("Invalid DSN: "+e)}if(o.pass&&!this._globalOptions.allowSecretKey)throw new a("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return o},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var o=this._prepareFrames(e,t);this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,o,t)},_prepareFrames:function(e,t){var o=this,r=[];if(e.stack&&e.stack.length&&(h(e.stack,function(t,n){var a=o._normalizeFrame(n,e.url);a&&r.push(a)}),t&&t.trimHeadFrames))for(var n=0;n<t.trimHeadFrames&&n<r.length;n++)r[n].in_app=!1;return r=r.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(e,t){var o={filename:e.url,lineno:e.line,colno:e.column,function:e.func||"?"};return e.url||(o.filename=t),o.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(o.filename)||/(Raven|TraceKit)\./.test(o.function)||/raven\.(min\.)?js$/.test(o.filename)),o},_processException:function(e,t,o,r,n,a){var l,i=(e?e+": ":"")+(t||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)&&!this._globalOptions.ignoreErrors.test(i))&&(n&&n.length?(o=n[0].filename||o,n.reverse(),l={frames:n}):o&&(l={frames:[{filename:o,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(o))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(o)))){var s=b({exception:{values:[{type:e,value:t,stacktrace:l}]},culprit:o},a);this._send(s)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message&&(e.message=m(e.message,t)),e.exception){var o=e.exception.values[0];o.value=m(o.value,t)}var r=e.request;return r&&(r.url&&(r.url=m(r.url,this._globalOptions.maxUrlLength)),r.Referer&&(r.Referer=m(r.Referer,this._globalOptions.maxUrlLength))),e.breadcrumbs&&e.breadcrumbs.values&&this._trimBreadcrumbs(e.breadcrumbs),e},_trimBreadcrumbs:function(e){for(var t,o,r,n=["to","from","url"],a=0;a<e.values.length;++a)if((o=e.values[a]).hasOwnProperty("data")&&s(o.data)&&!y(o.data)){r=b({},o.data);for(var l=0;l<n.length;++l)t=n[l],r.hasOwnProperty(t)&&r[t]&&(r[t]=m(r[t],this._globalOptions.maxUrlLength));e.values[a].data=r}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var e={};return this._hasNavigator&&I.userAgent&&(e.headers={"User-Agent":navigator.userAgent}),this._hasDocument&&(R.location&&R.location.href&&(e.url=R.location.href),R.referrer&&(e.headers||(e.headers={}),e.headers.Referer=R.referrer)),e}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&O()-this._backoffStart<this._backoffDuration},_isRepeatData:function(e){var t=this._lastData;return!(!t||e.message!==t.message||e.culprit!==t.culprit)&&(e.stacktrace||t.stacktrace?w(e.stacktrace,t.stacktrace):!e.exception&&!t.exception||C(e.exception,t.exception))},_setBackoffState:function(e){if(!this._shouldBackoff()){var t=e.status;if(400===t||401===t||429===t){var o;try{o=e.getResponseHeader("Retry-After"),o=1e3*parseInt(o,10)}catch(e){}this._backoffDuration=o||(2*this._backoffDuration||1e3),this._backoffStart=O()}}},_send:function(e){var t=this._globalOptions,o={project:this._globalProject,logger:t.logger,platform:"javascript"},r=this._getHttpData();r&&(o.request=r),e.trimHeadFrames&&delete e.trimHeadFrames,(e=b(o,e)).tags=b(b({},this._globalContext.tags),e.tags),e.extra=b(b({},this._globalContext.extra),e.extra),e.extra["session:duration"]=O()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(e.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),d(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),t.environment&&(e.environment=t.environment),t.release&&(e.release=t.release),t.serverName&&(e.server_name=t.serverName),f(t.dataCallback)&&(e=t.dataCallback(e)||e),e&&!d(e)&&(f(t.shouldSendCallback)&&!t.shouldSendCallback(e)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",e):"number"==typeof t.sampleRate?Math.random()<t.sampleRate&&this._sendProcessedPayload(e):this._sendProcessedPayload(e)))},_getUuid:function(){return S()},_sendProcessedPayload:function(e,t){var o=this,r=this._globalOptions;if(this.isSetup())if(e=this._trimPacket(e),this._globalOptions.allowDuplicates||!this._isRepeatData(e)){this._lastEventId=e.event_id||(e.event_id=this._getUuid()),this._lastData=e,this._logDebug("debug","Raven about to send:",e);var n={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(n.sentry_secret=this._globalSecret);var a=e.exception&&e.exception.values[0];this.captureBreadcrumb({category:"sentry",message:a?(a.type?a.type+": ":"")+a.value:e.message,event_id:e.event_id,level:e.level||"error"});var l=this._globalEndpoint;(r.transport||this._makeRequest).call(this,{url:l,auth:n,data:e,options:r,onSuccess:function(){o._resetBackoff(),o._triggerEvent("success",{data:e,src:l}),t&&t()},onError:function(r){o._logDebug("error","Raven transport failed to send: ",r),r.request&&o._setBackoffState(r.request),o._triggerEvent("failure",{data:e,src:l}),r=r||new Error("Raven send failed (no additional details provided)"),t&&t(r)}})}else this._logDebug("warn","Raven dropped repeat event: ",e)},_makeRequest:function(e){var t=j.XMLHttpRequest&&new j.XMLHttpRequest;if(t&&("withCredentials"in t||"undefined"!=typeof XDomainRequest)){var o=e.url;"withCredentials"in t?t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status)e.onSuccess&&e.onSuccess();else if(e.onError){var o=new Error("Sentry error code: "+t.status);o.request=t,e.onError(o)}}:(t=new XDomainRequest,o=o.replace(/^https?:/,""),e.onSuccess&&(t.onload=e.onSuccess),e.onError&&(t.onerror=function(){var o=new Error("Sentry error code: XDomainRequest");o.request=t,e.onError(o)})),t.open("POST",o+"?"+_(e.auth)),t.send(n(e.data))}},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[e],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=b(this._globalContext[e]||{},t)}},B.prototype.setUser=B.prototype.setUserContext,B.prototype.setReleaseContext=B.prototype.setRelease,e.exports=B}).call(this,o(1))},function(e,t,o){(function(t){var r=o(2),n={collectWindowErrors:!0,debug:!1},a="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},l=[].slice,i="?",s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function c(){return"undefined"==typeof document||null==document.location?"":document.location.href}n.report=function(){var e,t,o=[],u=null,f=null,p=null;function d(e,t){var r=null;if(!t||n.collectWindowErrors){for(var a in o)if(o.hasOwnProperty(a))try{o[a].apply(null,[e].concat(l.call(arguments,2)))}catch(e){r=e}if(r)throw r}}function h(t,o,a,l,u){if(p)n.computeStackTrace.augmentStackTraceWithInitialElement(p,o,a,t),b();else if(u&&r.isError(u))d(n.computeStackTrace(u),!0);else{var f,h={url:o,line:a,column:l},m=void 0,y=t;if("[object String]"==={}.toString.call(t))(f=t.match(s))&&(m=f[1],y=f[2]);h.func=i,d({name:m,message:y,url:c(),stack:[h]},!0)}return!!e&&e.apply(this,arguments)}function b(){var e=p,t=u;u=null,p=null,f=null,d.apply(null,[e,!1].concat(t))}function m(e,t){var o=l.call(arguments,1);if(p){if(f===e)return;b()}var r=n.computeStackTrace(e);if(p=r,f=e,u=o,setTimeout(function(){f===e&&b()},r.incomplete?2e3:0),!1!==t)throw e}return m.subscribe=function(r){t||(e=a.onerror,a.onerror=h,t=!0),o.push(r)},m.unsubscribe=function(e){for(var t=o.length-1;t>=0;--t)o[t]===e&&o.splice(t,1)},m.uninstall=function(){t&&(a.onerror=e,t=!1,e=void 0),o=[]},m}(),n.computeStackTrace=function(){function e(e){if(void 0!==e.stack&&e.stack){for(var t,o,r,n=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),p=[],d=(/^(.*) is undefined$/.exec(e.message),0),h=f.length;d<h;++d){if(o=n.exec(f[d])){var b=o[2]&&0===o[2].indexOf("native");o[2]&&0===o[2].indexOf("eval")&&(t=u.exec(o[2]))&&(o[2]=t[1],o[3]=t[2],o[4]=t[3]),r={url:b?null:o[2],func:o[1]||i,args:b?[o[2]]:[],line:o[3]?+o[3]:null,column:o[4]?+o[4]:null}}else if(o=l.exec(f[d]))r={url:o[2],func:o[1]||i,args:[],line:+o[3],column:o[4]?+o[4]:null};else{if(!(o=a.exec(f[d])))continue;o[3]&&o[3].indexOf(" > eval")>-1&&(t=s.exec(o[3]))?(o[3]=t[1],o[4]=t[2],o[5]=null):0!==d||o[5]||void 0===e.columnNumber||(p[0].column=e.columnNumber+1),r={url:o[3],func:o[1]||i,args:o[2]?o[2].split(","):[],line:o[4]?+o[4]:null,column:o[5]?+o[5]:null}}!r.func&&r.line&&(r.func=i),p.push(r)}return p.length?{name:e.name,message:e.message,url:c(),stack:p}:null}}function t(e,t,o,r){var n={url:t,line:o};if(n.url&&n.line){if(e.incomplete=!1,n.func||(n.func=i),e.stack.length>0&&e.stack[0].url===n.url){if(e.stack[0].line===n.line)return!1;if(!e.stack[0].line&&e.stack[0].func===n.func)return e.stack[0].line=n.line,!1}return e.stack.unshift(n),e.partial=!0,!0}return e.incomplete=!0,!1}function o(e,a){for(var l,s,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,f=[],p={},d=!1,h=o.caller;h&&!d;h=h.caller)if(h!==r&&h!==n.report){if(s={url:null,func:i,line:null,column:null},h.name?s.func=h.name:(l=u.exec(h.toString()))&&(s.func=l[1]),void 0===s.func)try{s.func=l.input.substring(0,l.input.indexOf("{"))}catch(e){}p[""+h]?d=!0:p[""+h]=!0,f.push(s)}a&&f.splice(0,a);var b={name:e.name,message:e.message,url:c(),stack:f};return t(b,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),b}function r(t,r){var a=null;r=null==r?0:+r;try{if(a=e(t))return a}catch(e){if(n.debug)throw e}try{if(a=o(t,r+1))return a}catch(e){if(n.debug)throw e}return{name:t.name,message:t.message,url:c()}}return r.augmentStackTraceWithInitialElement=t,r.computeStackTraceFromStackProp=e,r}(),e.exports=n}).call(this,o(1))},function(e,t){function o(e,t){for(var o=0;o<e.length;++o)if(e[o]===t)return o;return-1}function r(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,o(r,t)).join(".")+"]"}),function(a,l){if(r.length>0){var i=o(r,this);~i?r.splice(i+1):r.push(this),~i?n.splice(i,1/0,a):n.push(a),~o(r,l)&&(l=t.call(this,a,l))}else r.push(l);return null==e?l instanceof Error?function(e){var t={stack:e.stack,message:e.message,name:e.name};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}(l):l:e.call(this,a,l)}}(e.exports=function(e,t,o,n){return JSON.stringify(e,r(t,n),o)}).getSerialize=r},function(e,t){function o(e){this.name="RavenConfigError",this.message=e}o.prototype=new Error,o.prototype.constructor=o,e.exports=o},function(e,t){e.exports={wrapMethod:function(e,t,o){var r=e[t],n=e;if(t in e){var a="warn"===t?"warning":t;e[t]=function(){var e=[].slice.call(arguments),l=""+e.join(" "),i={level:a,logger:"console",extra:{arguments:e}};"assert"===t?!1===e[0]&&(l="Assertion failed: "+(e.slice(1).join(" ")||"console.assert"),i.extra.arguments=e.slice(1),o&&o(l,i)):o&&o(l,i),r&&Function.prototype.apply.call(r,n,e)}}}}},function(e,t,o){"use strict";o.r(t);var r=o(0),n=o.n(r),a=window.leadinConfig,l=a.adminUrl,i=a.ajaxUrl,s=a.env,c=a.hubspotBaseUrl,u=a.leadinPluginVersion,f=a.plugins,p=a.phpVersion,d=a.portalId,h=a.theme,b=a.wpVersion,m=window.leadinI18n;var y=n.a;function g(e,t){jQuery("#toplevel_page_leadin").find("li").last().before('<li><a href="'.concat(t,'" target="_blank">').concat(e,"</a></li>"))}function v(){var e="".concat(c,"/chatflows/").concat(d),t="".concat(c,"/email/").concat(d);g(m.chatflows,e),g(m.email,t)}function _(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(){try{if(window.localStorage.LEADIN_DEBUG){for(var e,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];o.unshift("[Leadin]"),(e=console).log.apply(e,o)}}catch(e){}}var x={iframe:"#leadin-iframe",spaNavigationButtons:'.toplevel_page_leadin > a, a[href="admin.php?page=leadin_forms"], a[href="admin.php?page=leadin_settings"]',subMenuButtons:".toplevel_page_leadin > ul > li"},C=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bus=jQuery({})}var t,o,r;return t=e,(o=[{key:"trigger",value:function(){var e;(e=this.bus).trigger.apply(e,arguments)}},{key:"on",value:function(e,t){this.bus.on(e,y.wrap(t))}}])&&_(t.prototype,o),r&&_(t,r),e}()),w=[];function E(e){S("Posting message"),S(JSON.stringify(e)),jQuery(x.iframe)[0].contentWindow.postMessage(JSON.stringify(e),c)}function F(e,t){t||(t="Message Received");var o=Object.assign({},e);o.response=t,E(o)}function T(e){S("Received message"),S(JSON.stringify(e)),e.response&&e._callbackId?function(e){w[e._callbackId-1](e.response)}(e):Object.keys(e).forEach(function(t){C.trigger(t,[e[t],F.bind(null,e)])})}function k(e){if(e.origin===c)try{T(JSON.parse(e.data))}catch(e){}}function L(e,t,o,r,n){var a={url:"".concat(i,"?action=").concat(e),method:t,contentType:"application/json",success:"function"==typeof r?y.wrap(function(e){return r(JSON.parse(e))}):void 0,error:y.wrap(function(e){var t;try{t=JSON.parse(e.responseText).error}catch(o){t=e.responseText}y.captureMessage("AJAX request failed with code ".concat(e.status,": ").concat(t)),"function"==typeof n&&n()})};o&&(a.data=JSON.stringify(o)),jQuery.ajax(a)}function O(e,t,o,r){return L(e,"POST",t,o,r)}function j(e,t,o){return L(e,"GET",null,t,o)}var R,I=function(){return j("leadin_get_portal")},N=!1;function B(){R=setTimeout(function(){I(function(e){e.portalId?location.reload(!0):N||B()},B)},5e3)}var z=O.bind(null,"leadin_disconnect_ajax",{}),D=j.bind(null,"leadin_get_domain"),U=j.bind(null,"leadin_mark_outdated");function M(e){return function(e,t){C.on(e,function(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];t.apply(null,o.slice(1))})}.bind(null,e)}var P=M("leadin_clear_query_param"),H=M("leadin_connect_portal"),A=M("leadin_disable_navigation"),q=M("leadin_disconnect_portal"),J=M("leadin_enter_fullscreen"),W=M("leadin_exit_fullscreen"),K=M("leadin_get_assets_payload"),$=M("leadin_get_wp_domain"),Q=M("leadin_init_navigation"),X=M("leadin_interframe_ready"),G=M("leadin_mark_outdated"),V=M("leadin_page_reload"),Z=M("leadin_upgrade"),Y=M("leadin_sync_route");function ee(e){!function(e,t,o,r,n){n||(n=500);var a=setTimeout(y.wrap(function(){var t="LeadinWordpressPlugin postMessage response timeout on message key: ".concat(e);S(t),y.captureMessage(t),r()}),n),l={};l[e]=t,l._callbackId=w.push(function(){clearTimeout(a),o.apply(void 0,arguments)}),E(l)}("leadin_change_route",e,null,function(){return location.reload(!0)})}var te=["forms","settings"];function oe(){function e(){var e=window.location.search.match(/page=leadin_?(\w*)/)[1];e&&(e="/".concat(e)),ee(e),function(){jQuery(x.subMenuButtons).removeClass("current");var e=window.location.search.match(/\?page=leadin_?\w*/)[0];jQuery('a[href="admin.php'.concat(e,'"]')).parent().addClass("current")}()}window.addEventListener("popstate",e),jQuery(x.spaNavigationButtons).click(y.wrap(function(){event.metaKey||event.altKey||event.shiftKey||(window.history.pushState(null,null,jQuery(this).attr("href")),e(),event.preventDefault())}))}var re={"genesis-sample":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0073e5"},chatStyle:{accentColor:"#0073e5"},onScrollLeadFlowStyle:{color:"#0073e5"},onExitLeadFlowStyle:{color:"#0073e5"}},"academy-pro":{formsStyle:{fontFamily:"PT Sans",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e22c2f"},chatStyle:{accentColor:"#e22c2f"},onScrollLeadFlowStyle:{color:"#e22c2f"},onExitLeadFlowStyle:{color:"#e22c2f"}},"agency-pro":{formsStyle:{fontFamily:"EB Garamond",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#d7c603"},chatStyle:{accentColor:"#d7c603"},onScrollLeadFlowStyle:{color:"#d7c603"},onExitLeadFlowStyle:{color:"#d7c603"}},"agentpress-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#1a212b",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#d23836"},chatStyle:{accentColor:"#d23836"},onScrollLeadFlowStyle:{color:"#d23836"},onExitLeadFlowStyle:{color:"#d23836"}},"altitude-pro":{formsStyle:{fontFamily:"Ek Mukta",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#079bc4"},chatStyle:{accentColor:"#079bc4"},onScrollLeadFlowStyle:{color:"#079bc4"},onExitLeadFlowStyle:{color:"#079bc4"}},"ambiance-pro":{formsStyle:{fontFamily:"Merriweather",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e12727"},chatStyle:{accentColor:"#e12727"},onScrollLeadFlowStyle:{color:"#e12727"},onExitLeadFlowStyle:{color:"#e12727"}},"atmosphere-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"author-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"authority-pro":{formsStyle:{fontFamily:"Libre Baskerville",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000cff"},chatStyle:{accentColor:"#000cff"},onScrollLeadFlowStyle:{color:"#000cff"},onExitLeadFlowStyle:{color:"#000cff"}},"beautiful-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#666666",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e5554e"},chatStyle:{accentColor:"#e5554e"},onScrollLeadFlowStyle:{color:"#e5554e"},onExitLeadFlowStyle:{color:"#e5554e"}},"breakthrough-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#4e4756",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#4a4f9b"},chatStyle:{accentColor:"#4a4f9b"},onScrollLeadFlowStyle:{color:"#4a4f9b"},onExitLeadFlowStyle:{color:"#4a4f9b"}},"cafe-pro":{formsStyle:{fontFamily:"Crimson Text",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"daily-dish-pro":{formsStyle:{fontFamily:"Cormorant",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#d9037f"},chatStyle:{accentColor:"#d9037f"},onScrollLeadFlowStyle:{color:"#d9037f"},onExitLeadFlowStyle:{color:"#d9037f"}},"digital-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#5b5e5e",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#e85555"},chatStyle:{accentColor:"#e85555"},onScrollLeadFlowStyle:{color:"#e85555"},onExitLeadFlowStyle:{color:"#e85555"}},"education-pro":{formsStyle:{fontFamily:"Roboto Condensed",labelTextColor:"#444444",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#78a7c8"},chatStyle:{accentColor:"#78a7c8"},onScrollLeadFlowStyle:{color:"#78a7c8"},onExitLeadFlowStyle:{color:"#78a7c8"}},"eleven40-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ed702b"},chatStyle:{accentColor:"#ed702b"},onScrollLeadFlowStyle:{color:"#ed702b"},onExitLeadFlowStyle:{color:"#ed702b"}},"enterprise-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#777777",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#31b2ed"},chatStyle:{accentColor:"#31b2ed"},onScrollLeadFlowStyle:{color:"#31b2ed"},onExitLeadFlowStyle:{color:"#31b2ed"}},"essence-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#be8100"},chatStyle:{accentColor:"#be8100"},onScrollLeadFlowStyle:{color:"#be8100"},onExitLeadFlowStyle:{color:"#be8100"}},"executive-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#64c9ea"},chatStyle:{accentColor:"#64c9ea"},onScrollLeadFlowStyle:{color:"#64c9ea"},onExitLeadFlowStyle:{color:"#64c9ea"}},"generate-pro":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#eb232f"},chatStyle:{accentColor:"#eb232f"},onScrollLeadFlowStyle:{color:"#eb232f"},onExitLeadFlowStyle:{color:"#eb232f"}},"infinity-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#d43c67"},chatStyle:{accentColor:"#d43c67"},onScrollLeadFlowStyle:{color:"#d43c67"},onExitLeadFlowStyle:{color:"#d43c67"}},"interior-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#777777",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#009092"},chatStyle:{accentColor:"#009092"},onScrollLeadFlowStyle:{color:"#009092"},onExitLeadFlowStyle:{color:"#009092"}},"lifestyle-pro":{formsStyle:{fontFamily:"Droid Sans",labelTextColor:"#767673",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#27968b"},chatStyle:{accentColor:"#27968b"},onScrollLeadFlowStyle:{color:"#27968b"},onExitLeadFlowStyle:{color:"#27968b"}},"magazine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#008285"},chatStyle:{accentColor:"#008285"},onScrollLeadFlowStyle:{color:"#008285"},onExitLeadFlowStyle:{color:"#008285"}},"metro-pro":{formsStyle:{fontFamily:"Helvetica Neue",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#f96e5b"},chatStyle:{accentColor:"#f96e5b"},onScrollLeadFlowStyle:{color:"#f96e5b"},onExitLeadFlowStyle:{color:"#f96e5b"}},"minimum-pro":{formsStyle:{fontFamily:"Roboto Slab",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#0ebfe9"},chatStyle:{accentColor:"#0ebfe9"},onScrollLeadFlowStyle:{color:"#0ebfe9"},onExitLeadFlowStyle:{color:"#0ebfe9"}},"modern-studio-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"monochrome-pro":{formsStyle:{fontFamily:"Muli",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"news-pro":{formsStyle:{fontFamily:"Raleway",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#ff0000"},chatStyle:{accentColor:"#ff0000"},onScrollLeadFlowStyle:{color:"#ff0000"},onExitLeadFlowStyle:{color:"#ff0000"}},"no-sidebar-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"outfitter-pro":{formsStyle:{fontFamily:"Noto Sans",labelTextColor:"#546e7a",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"outreach-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#6ab446"},chatStyle:{accentColor:"#6ab446"},onScrollLeadFlowStyle:{color:"#6ab446"},onExitLeadFlowStyle:{color:"#6ab446"}},"parallax-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#00a0af"},chatStyle:{accentColor:"#00a0af"},onScrollLeadFlowStyle:{color:"#00a0af"},onExitLeadFlowStyle:{color:"#00a0af"}},"revolution-pro":{formsStyle:{fontFamily:"Noto Serif SC",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#008080"},chatStyle:{accentColor:"#008080"},onScrollLeadFlowStyle:{color:"#008080"},onExitLeadFlowStyle:{color:"#008080"}},"sixteen-nine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#1dbec0"},chatStyle:{accentColor:"#1dbec0"},onScrollLeadFlowStyle:{color:"#1dbec0"},onExitLeadFlowStyle:{color:"#1dbec0"}},"smart-passive-income-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0e763c"},chatStyle:{accentColor:"#0e763c"},onScrollLeadFlowStyle:{color:"#0e763c"},onExitLeadFlowStyle:{color:"#0e763c"}},"wellness-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#5da44f"},chatStyle:{accentColor:"#5da44f"},onScrollLeadFlowStyle:{color:"#5da44f"},onExitLeadFlowStyle:{color:"#5da44f"}},"workstation-pro":{formsStyle:{fontFamily:"Baskerville",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ff4800"},chatStyle:{accentColor:"#ff4800"},onScrollLeadFlowStyle:{color:"#ff4800"},onExitLeadFlowStyle:{color:"#ff4800"}}};X(function(e,t){t("Interframe Ready")}),H(function(e,t){!function(e,t,o){O("leadin_registration_ajax",{portalId:e},t,o)}(e,function(){clearTimeout(R),N=!0,t({success:!0})},t.bind(null,{success:!1}))}),q(function(e,t){z(t.bind(null,{success:!0}),t.bind(null,{success:!1}))}),G(function(e,t){U(t)}),Z(function(e,t){t(),location.href="".concat(l,"plugins.php")}),V(function(e,t){t(),window.location.reload(!0)}),Q(function(e,t){t(),oe()}),A(function(e,t){t(),jQuery(x.allMenuButtons).off("click")}),P(function(e,t){t();var o=window.location.toString();o.indexOf("?")>0&&(o=o.substring(0,o.indexOf("?")));var r="".concat(o,"?page=leadin");window.history.pushState({},"",r)}),$(function(e,t){D(function(e){e.domain&&t(e.domain)})}),K(function(e,t){t({payload:re[h]})}),J(function(e,t){jQuery(x.iframe).addClass("leadin-iframe-fullscreen"),t()}),W(function(e,t){jQuery(x.iframe).removeClass("leadin-iframe-fullscreen"),t()}),Y(function(e,t){!function(){for(var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/");""===e[0];)e.shift();var t="";te.includes(e[0])&&(t="_".concat(e[0]),e.shift());var o=e.reduce(function(e,t,o){return"".concat(e,"&leadin_route").concat(o,"=").concat(t)},"");window.history.replaceState(null,null,"?page=leadin".concat(t).concat(o))}(e),t()}),"prod"===s&&(n.a.config("https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1",{instrument:{tryCatch:!1}}).install(),n.a.setTagsContext({leadin:u,php:p,wordpress:b}),n.a.setUserContext({hub:d,plugins:Object.keys(f).map(function(e){return"".concat(e,"#").concat(f[e].Version)}).join(",")})),y.context(function(){window.addEventListener("message",k),-1!==window.location.search.indexOf("page=leadin")&&(d||B()),jQuery(document).ready(v)})}]);
|
2 |
//# sourceMappingURL=leadin.js.map
|
1 |
+
!function(e){var t={};function o(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=e,o.c=t,o.d=function(e,t,r){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)o.d(r,n,function(t){return e[t]}.bind(null,n));return r},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=8)}([function(e,t,o){(function(t){var r=o(3),n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},a=n.Raven,l=new r;l.noConflict=function(){return n.Raven=a,l},l.afterLoad(),e.exports=l}).call(this,o(1))},function(e,t){var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,o){(function(t){var o="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function r(e){return void 0===e}function n(e){return"[object String]"===Object.prototype.toString.call(e)}function a(){try{return new ErrorEvent(""),!0}catch(e){return!1}}function l(e,t){var o,n;if(r(e.length))for(o in e)i(e,o)&&t.call(null,o,e[o]);else if(n=e.length)for(o=0;o<n;o++)t.call(null,o,e[o])}function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(e){var t,o,r,a,l,i=[];if(!e||!e.tagName)return"";if(i.push(e.tagName.toLowerCase()),e.id&&i.push("#"+e.id),(t=e.className)&&n(t))for(o=t.split(/\s+/),l=0;l<o.length;l++)i.push("."+o[l]);var s=["type","name","title","alt"];for(l=0;l<s.length;l++)r=s[l],(a=e.getAttribute(r))&&i.push("["+r+'="'+a+'"]');return i.join("")}function c(e,t){return!!(!!e^!!t)}function u(e,t){if(c(e,t))return!1;var o,r,n=e.frames,a=t.frames;if(n.length!==a.length)return!1;for(var l=0;l<n.length;l++)if(o=n[l],r=a[l],o.filename!==r.filename||o.lineno!==r.lineno||o.colno!==r.colno||o.function!==r.function)return!1;return!0}e.exports={isObject:function(e){return"object"==typeof e&&null!==e},isError:function(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},isErrorEvent:function(e){return a()&&"[object ErrorEvent]"==={}.toString.call(e)},isUndefined:r,isFunction:function(e){return"function"==typeof e},isString:n,isEmptyObject:function(e){for(var t in e)return!1;return!0},supportsErrorEvent:a,wrappedCallback:function(e){return function(t,o){var r=e(t)||t;return o&&o(r)||r}},each:l,objectMerge:function(e,t){return t?(l(t,function(t,o){e[t]=o}),e):e},truncate:function(e,t){return!t||e.length<=t?e:e.substr(0,t)+"…"},objectFrozen:function(e){return!!Object.isFrozen&&Object.isFrozen(e)},hasKey:i,joinRegExp:function(e){for(var t,o=[],r=0,a=e.length;r<a;r++)n(t=e[r])?o.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&o.push(t.source);return new RegExp(o.join("|"),"i")},urlencode:function(e){var t=[];return l(e,function(e,o){t.push(encodeURIComponent(e)+"="+encodeURIComponent(o))}),t.join("&")},uuid4:function(){var e=o.crypto||o.msCrypto;if(!r(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var n=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},htmlTreeAsString:function(e){for(var t,o=[],r=0,n=0,a=" > ".length;e&&r++<5&&!("html"===(t=s(e))||r>1&&n+o.length*a+t.length>=80);)o.push(t),n+=t.length,e=e.parentNode;return o.reverse().join(" > ")},htmlElementAsString:s,isSameException:function(e,t){return!c(e,t)&&(e=e.values[0],t=t.values[0],e.type===t.type&&e.value===t.value&&u(e.stacktrace,t.stacktrace))},isSameStacktrace:u,parseUrl:function(e){var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var o=t[6]||"",r=t[8]||"";return{protocol:t[2],host:t[4],path:t[5],relative:t[5]+o+r}},fill:function(e,t,o,r){var n=e[t];e[t]=o(n),r&&r.push([e,t,n])}}}).call(this,o(1))},function(e,t,o){(function(t){var r=o(4),n=o(5),a=o(6),l=o(2),i=l.isError,s=l.isObject,c=(s=l.isObject,l.isErrorEvent),u=l.isUndefined,f=l.isFunction,p=l.isString,d=l.isEmptyObject,h=l.each,b=l.objectMerge,m=l.truncate,y=l.objectFrozen,g=l.hasKey,v=l.joinRegExp,_=l.urlencode,S=l.uuid4,x=l.htmlTreeAsString,C=l.isSameException,w=l.isSameStacktrace,E=l.parseUrl,F=l.fill,T=o(7).wrapMethod,k="source protocol user pass host port path".split(" "),L=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function O(){return+new Date}var j="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},R=j.document,I=j.navigator;function N(e,t){return f(t)?function(o){return t(o,e)}:t}function B(){for(var e in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!u(R),this._hasNavigator=!u(I),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],collectWindowErrors:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=j.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=O(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=j.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}B.prototype={VERSION:"3.19.1",debug:!1,TraceKit:r,config:function(e,t){var o=this;if(o._globalServer)return this._logDebug("error","Error: Raven has already been configured"),o;if(!e)return o;var n=o._globalOptions;t&&h(t,function(e,t){"tags"===e||"extra"===e||"user"===e?o._globalContext[e]=t:n[e]=t}),o.setDSN(e),n.ignoreErrors.push(/^Script error\.?$/),n.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),n.ignoreErrors=v(n.ignoreErrors),n.ignoreUrls=!!n.ignoreUrls.length&&v(n.ignoreUrls),n.whitelistUrls=!!n.whitelistUrls.length&&v(n.whitelistUrls),n.includePaths=v(n.includePaths),n.maxBreadcrumbs=Math.max(0,Math.min(n.maxBreadcrumbs||100,100));var a={xhr:!0,console:!0,dom:!0,location:!0},l=n.autoBreadcrumbs;"[object Object]"==={}.toString.call(l)?l=b(a,l):!1!==l&&(l=a),n.autoBreadcrumbs=l;var i={tryCatch:!0},s=n.instrument;return"[object Object]"==={}.toString.call(s)?s=b(i,s):!1!==s&&(s=i),n.instrument=s,r.collectWindowErrors=!!n.collectWindowErrors,o},install:function(){var e=this;return e.isSetup()&&!e._isRavenInstalled&&(r.report.subscribe(function(){e._handleOnErrorStackInfo.apply(e,arguments)}),e._globalOptions.instrument&&e._globalOptions.instrument.tryCatch&&e._instrumentTryCatch(),e._globalOptions.autoBreadcrumbs&&e._instrumentBreadcrumbs(),e._drainPlugins(),e._isRavenInstalled=!0),Error.stackTraceLimit=e._globalOptions.stackTraceLimit,this},setDSN:function(e){var t=this._parseDSN(e),o=t.path.lastIndexOf("/"),r=t.path.substr(1,o);this._dsn=e,this._globalKey=t.user,this._globalSecret=t.pass&&t.pass.substr(1),this._globalProject=t.path.substr(o+1),this._globalServer=this._getGlobalServer(t),this._globalEndpoint=this._globalServer+"/"+r+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(e,t,o){return f(e)&&(o=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,o)},wrap:function(e,t,o){var r=this;if(u(t)&&!f(e))return e;if(f(e)&&(t=e,e=void 0),!f(t))return t;try{if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__}catch(e){return t}function n(){var n=[],a=arguments.length,l=!e||e&&!1!==e.deep;for(o&&f(o)&&o.apply(this,arguments);a--;)n[a]=l?r.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,n)}catch(t){throw r._ignoreNextOnError(),r.captureException(t,e),t}}for(var a in t)g(t,a)&&(n[a]=t[a]);return n.prototype=t.prototype,t.__raven_wrapper__=n,n.__raven__=!0,n.__inner__=t,n},uninstall:function(){return r.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(e,t){var o=!i(e),n=!c(e),a=c(e)&&!e.error;if(o&&n||a)return this.captureMessage(e,b({trimHeadFrames:1,stacktrace:!0},t));c(e)&&(e=e.error),this._lastCapturedException=e;try{var l=r.computeStackTrace(e);this._handleStackInfo(l,t)}catch(t){if(e!==t)throw t}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)){var o,n=b({message:e+""},t=t||{});try{throw new Error(e)}catch(e){o=e}o.name=null;var a=r.computeStackTrace(o),l=a.stack[1],i=l&&l.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(i))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(i))){if(this._globalOptions.stacktrace||t&&t.stacktrace){t=b({fingerprint:e,trimHeadFrames:(t.trimHeadFrames||0)+1},t);var s=this._prepareFrames(a,t);n.stacktrace={frames:s.reverse()}}return this._send(n),this}}},captureBreadcrumb:function(e){var t=b({timestamp:O()/1e3},e);if(f(this._globalOptions.breadcrumbCallback)){var o=this._globalOptions.breadcrumbCallback(t);if(s(o)&&!d(o))t=o;else if(!1===o)return this}return this._breadcrumbs.push(t),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(e){var t=[].slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(n(this._globalContext))},setEnvironment:function(e){return this._globalOptions.environment=e,this},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){var t=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=N(t,e),this},setBreadcrumbCallback:function(e){var t=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=N(t,e),this},setShouldSendCallback:function(e){var t=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=N(t,e),this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=j.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(R){var t=(e=e||{}).eventId||this.lastEventId();if(!t)throw new a("Missing eventId");var o=e.dsn||this._dsn;if(!o)throw new a("Missing DSN");var r=encodeURIComponent,n="";n+="?eventId="+r(t),n+="&dsn="+r(o);var l=e.user||this._globalContext.user;l&&(l.name&&(n+="&name="+r(l.name)),l.email&&(n+="&email="+r(l.email)));var i=this._getGlobalServer(this._parseDSN(o)),s=R.createElement("script");s.async=!0,s.src=i+"/api/embed/error-page/"+n,(R.head||R.body).appendChild(s)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout(function(){e._ignoreOnError-=1})},_triggerEvent:function(e,t){var o,r;if(this._hasDocument){for(r in t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),R.createEvent?(o=R.createEvent("HTMLEvents")).initEvent(e,!0,!0):(o=R.createEventObject()).eventType=e,t)g(t,r)&&(o[r]=t[r]);if(R.createEvent)R.dispatchEvent(o);else try{R.fireEvent("on"+o.eventType.toLowerCase(),o)}catch(e){}}},_breadcrumbEventHandler:function(e){var t=this;return function(o){if(t._keypressTimeout=null,t._lastCapturedEvent!==o){var r;t._lastCapturedEvent=o;try{r=x(o.target)}catch(e){r="<unknown>"}t.captureBreadcrumb({category:"ui."+e,message:r})}}},_keypressEventHandler:function(){var e=this;return function(t){var o;try{o=t.target}catch(e){return}var r=o&&o.tagName;if(r&&("INPUT"===r||"TEXTAREA"===r||o.isContentEditable)){var n=e._keypressTimeout;n||e._breadcrumbEventHandler("input")(t),clearTimeout(n),e._keypressTimeout=setTimeout(function(){e._keypressTimeout=null},1e3)}}},_captureUrlChange:function(e,t){var o=E(this._location.href),r=E(t),n=E(e);this._lastHref=t,o.protocol===r.protocol&&o.host===r.host&&(t=r.relative),o.protocol===n.protocol&&o.host===n.host&&(e=n.relative),this.captureBreadcrumb({category:"navigation",data:{to:t,from:e}})},_instrumentTryCatch:function(){var e=this,t=e._wrappedBuiltIns;function o(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l=n[0];return f(l)&&(n[0]=e.wrap(l)),t.apply?t.apply(this,n):t(n[0],n[1])}}var r=this._globalOptions.autoBreadcrumbs;function n(o){var n=j[o]&&j[o].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(F(n,"addEventListener",function(t){return function(n,a,l,i){try{a&&a.handleEvent&&(a.handleEvent=e.wrap(a.handleEvent))}catch(e){}var s,c,u;return r&&r.dom&&("EventTarget"===o||"Node"===o)&&(c=e._breadcrumbEventHandler("click"),u=e._keypressEventHandler(),s=function(e){if(e){var t;try{t=e.type}catch(e){return}return"click"===t?c(e):"keypress"===t?u(e):void 0}}),t.call(this,n,e.wrap(a,void 0,s),l,i)}},t),F(n,"removeEventListener",function(e){return function(t,o,r,n){try{o=o&&(o.__raven_wrapper__?o.__raven_wrapper__:o)}catch(e){}return e.call(this,t,o,r,n)}},t))}F(j,"setTimeout",o,t),F(j,"setInterval",o,t),j.requestAnimationFrame&&F(j,"requestAnimationFrame",function(t){return function(o){return t(e.wrap(o))}},t);for(var a=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],l=0;l<a.length;l++)n(a[l])},_instrumentBreadcrumbs:function(){var e=this,t=this._globalOptions.autoBreadcrumbs,o=e._wrappedBuiltIns;function r(t,o){t in o&&f(o[t])&&F(o,t,function(t){return e.wrap(t)})}if(t.xhr&&"XMLHttpRequest"in j){var n=XMLHttpRequest.prototype;F(n,"open",function(t){return function(o,r){return p(r)&&-1===r.indexOf(e._globalKey)&&(this.__raven_xhr={method:o,url:r,status_code:null}),t.apply(this,arguments)}},o),F(n,"send",function(t){return function(o){var n=this;function a(){if(n.__raven_xhr&&4===n.readyState){try{n.__raven_xhr.status_code=n.status}catch(e){}e.captureBreadcrumb({type:"http",category:"xhr",data:n.__raven_xhr})}}for(var l=["onload","onerror","onprogress"],i=0;i<l.length;i++)r(l[i],n);return"onreadystatechange"in n&&f(n.onreadystatechange)?F(n,"onreadystatechange",function(t){return e.wrap(t,void 0,a)}):n.onreadystatechange=a,t.apply(this,arguments)}},o)}t.xhr&&"fetch"in j&&F(j,"fetch",function(t){return function(o,r){for(var n=new Array(arguments.length),a=0;a<n.length;++a)n[a]=arguments[a];var l,i=n[0],s="GET";"string"==typeof i?l=i:"Request"in j&&i instanceof j.Request?(l=i.url,i.method&&(s=i.method)):l=""+i,n[1]&&n[1].method&&(s=n[1].method);var c={method:s,url:l,status_code:null};return e.captureBreadcrumb({type:"http",category:"fetch",data:c}),t.apply(this,n).then(function(e){return c.status_code=e.status,e})}},o),t.dom&&this._hasDocument&&(R.addEventListener?(R.addEventListener("click",e._breadcrumbEventHandler("click"),!1),R.addEventListener("keypress",e._keypressEventHandler(),!1)):(R.attachEvent("onclick",e._breadcrumbEventHandler("click")),R.attachEvent("onkeypress",e._keypressEventHandler())));var a=j.chrome,l=!(a&&a.app&&a.app.runtime)&&j.history&&history.pushState&&history.replaceState;if(t.location&&l){var i=j.onpopstate;j.onpopstate=function(){var t=e._location.href;if(e._captureUrlChange(e._lastHref,t),i)return i.apply(this,arguments)};var s=function(t){return function(){var o=arguments.length>2?arguments[2]:void 0;return o&&e._captureUrlChange(e._lastHref,o+""),t.apply(this,arguments)}};F(history,"pushState",s,o),F(history,"replaceState",s,o)}if(t.console&&"console"in j&&console.log){var c=function(t,o){e.captureBreadcrumb({message:t,level:o.level,category:"console"})};h(["debug","info","warn","error","log"],function(e,t){T(console,t,c)})}},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){var t=(e=this._wrappedBuiltIns.shift())[0],o=e[1],r=e[2];t[o]=r}},_drainPlugins:function(){var e=this;h(this._plugins,function(t,o){var r=o[0],n=o[1];r.apply(e,[e].concat(n))})},_parseDSN:function(e){var t=L.exec(e),o={},r=7;try{for(;r--;)o[k[r]]=t[r]||""}catch(t){throw new a("Invalid DSN: "+e)}if(o.pass&&!this._globalOptions.allowSecretKey)throw new a("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return o},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var o=this._prepareFrames(e,t);this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,o,t)},_prepareFrames:function(e,t){var o=this,r=[];if(e.stack&&e.stack.length&&(h(e.stack,function(t,n){var a=o._normalizeFrame(n,e.url);a&&r.push(a)}),t&&t.trimHeadFrames))for(var n=0;n<t.trimHeadFrames&&n<r.length;n++)r[n].in_app=!1;return r=r.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(e,t){var o={filename:e.url,lineno:e.line,colno:e.column,function:e.func||"?"};return e.url||(o.filename=t),o.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(o.filename)||/(Raven|TraceKit)\./.test(o.function)||/raven\.(min\.)?js$/.test(o.filename)),o},_processException:function(e,t,o,r,n,a){var l,i=(e?e+": ":"")+(t||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)&&!this._globalOptions.ignoreErrors.test(i))&&(n&&n.length?(o=n[0].filename||o,n.reverse(),l={frames:n}):o&&(l={frames:[{filename:o,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(o))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(o)))){var s=b({exception:{values:[{type:e,value:t,stacktrace:l}]},culprit:o},a);this._send(s)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message&&(e.message=m(e.message,t)),e.exception){var o=e.exception.values[0];o.value=m(o.value,t)}var r=e.request;return r&&(r.url&&(r.url=m(r.url,this._globalOptions.maxUrlLength)),r.Referer&&(r.Referer=m(r.Referer,this._globalOptions.maxUrlLength))),e.breadcrumbs&&e.breadcrumbs.values&&this._trimBreadcrumbs(e.breadcrumbs),e},_trimBreadcrumbs:function(e){for(var t,o,r,n=["to","from","url"],a=0;a<e.values.length;++a)if((o=e.values[a]).hasOwnProperty("data")&&s(o.data)&&!y(o.data)){r=b({},o.data);for(var l=0;l<n.length;++l)t=n[l],r.hasOwnProperty(t)&&r[t]&&(r[t]=m(r[t],this._globalOptions.maxUrlLength));e.values[a].data=r}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var e={};return this._hasNavigator&&I.userAgent&&(e.headers={"User-Agent":navigator.userAgent}),this._hasDocument&&(R.location&&R.location.href&&(e.url=R.location.href),R.referrer&&(e.headers||(e.headers={}),e.headers.Referer=R.referrer)),e}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&O()-this._backoffStart<this._backoffDuration},_isRepeatData:function(e){var t=this._lastData;return!(!t||e.message!==t.message||e.culprit!==t.culprit)&&(e.stacktrace||t.stacktrace?w(e.stacktrace,t.stacktrace):!e.exception&&!t.exception||C(e.exception,t.exception))},_setBackoffState:function(e){if(!this._shouldBackoff()){var t=e.status;if(400===t||401===t||429===t){var o;try{o=e.getResponseHeader("Retry-After"),o=1e3*parseInt(o,10)}catch(e){}this._backoffDuration=o||(2*this._backoffDuration||1e3),this._backoffStart=O()}}},_send:function(e){var t=this._globalOptions,o={project:this._globalProject,logger:t.logger,platform:"javascript"},r=this._getHttpData();r&&(o.request=r),e.trimHeadFrames&&delete e.trimHeadFrames,(e=b(o,e)).tags=b(b({},this._globalContext.tags),e.tags),e.extra=b(b({},this._globalContext.extra),e.extra),e.extra["session:duration"]=O()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(e.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),d(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),t.environment&&(e.environment=t.environment),t.release&&(e.release=t.release),t.serverName&&(e.server_name=t.serverName),f(t.dataCallback)&&(e=t.dataCallback(e)||e),e&&!d(e)&&(f(t.shouldSendCallback)&&!t.shouldSendCallback(e)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",e):"number"==typeof t.sampleRate?Math.random()<t.sampleRate&&this._sendProcessedPayload(e):this._sendProcessedPayload(e)))},_getUuid:function(){return S()},_sendProcessedPayload:function(e,t){var o=this,r=this._globalOptions;if(this.isSetup())if(e=this._trimPacket(e),this._globalOptions.allowDuplicates||!this._isRepeatData(e)){this._lastEventId=e.event_id||(e.event_id=this._getUuid()),this._lastData=e,this._logDebug("debug","Raven about to send:",e);var n={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(n.sentry_secret=this._globalSecret);var a=e.exception&&e.exception.values[0];this.captureBreadcrumb({category:"sentry",message:a?(a.type?a.type+": ":"")+a.value:e.message,event_id:e.event_id,level:e.level||"error"});var l=this._globalEndpoint;(r.transport||this._makeRequest).call(this,{url:l,auth:n,data:e,options:r,onSuccess:function(){o._resetBackoff(),o._triggerEvent("success",{data:e,src:l}),t&&t()},onError:function(r){o._logDebug("error","Raven transport failed to send: ",r),r.request&&o._setBackoffState(r.request),o._triggerEvent("failure",{data:e,src:l}),r=r||new Error("Raven send failed (no additional details provided)"),t&&t(r)}})}else this._logDebug("warn","Raven dropped repeat event: ",e)},_makeRequest:function(e){var t=j.XMLHttpRequest&&new j.XMLHttpRequest;if(t&&("withCredentials"in t||"undefined"!=typeof XDomainRequest)){var o=e.url;"withCredentials"in t?t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status)e.onSuccess&&e.onSuccess();else if(e.onError){var o=new Error("Sentry error code: "+t.status);o.request=t,e.onError(o)}}:(t=new XDomainRequest,o=o.replace(/^https?:/,""),e.onSuccess&&(t.onload=e.onSuccess),e.onError&&(t.onerror=function(){var o=new Error("Sentry error code: XDomainRequest");o.request=t,e.onError(o)})),t.open("POST",o+"?"+_(e.auth)),t.send(n(e.data))}},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[e],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=b(this._globalContext[e]||{},t)}},B.prototype.setUser=B.prototype.setUserContext,B.prototype.setReleaseContext=B.prototype.setRelease,e.exports=B}).call(this,o(1))},function(e,t,o){(function(t){var r=o(2),n={collectWindowErrors:!0,debug:!1},a="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},l=[].slice,i="?",s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function c(){return"undefined"==typeof document||null==document.location?"":document.location.href}n.report=function(){var e,t,o=[],u=null,f=null,p=null;function d(e,t){var r=null;if(!t||n.collectWindowErrors){for(var a in o)if(o.hasOwnProperty(a))try{o[a].apply(null,[e].concat(l.call(arguments,2)))}catch(e){r=e}if(r)throw r}}function h(t,o,a,l,u){if(p)n.computeStackTrace.augmentStackTraceWithInitialElement(p,o,a,t),b();else if(u&&r.isError(u))d(n.computeStackTrace(u),!0);else{var f,h={url:o,line:a,column:l},m=void 0,y=t;if("[object String]"==={}.toString.call(t))(f=t.match(s))&&(m=f[1],y=f[2]);h.func=i,d({name:m,message:y,url:c(),stack:[h]},!0)}return!!e&&e.apply(this,arguments)}function b(){var e=p,t=u;u=null,p=null,f=null,d.apply(null,[e,!1].concat(t))}function m(e,t){var o=l.call(arguments,1);if(p){if(f===e)return;b()}var r=n.computeStackTrace(e);if(p=r,f=e,u=o,setTimeout(function(){f===e&&b()},r.incomplete?2e3:0),!1!==t)throw e}return m.subscribe=function(r){t||(e=a.onerror,a.onerror=h,t=!0),o.push(r)},m.unsubscribe=function(e){for(var t=o.length-1;t>=0;--t)o[t]===e&&o.splice(t,1)},m.uninstall=function(){t&&(a.onerror=e,t=!1,e=void 0),o=[]},m}(),n.computeStackTrace=function(){function e(e){if(void 0!==e.stack&&e.stack){for(var t,o,r,n=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),p=[],d=(/^(.*) is undefined$/.exec(e.message),0),h=f.length;d<h;++d){if(o=n.exec(f[d])){var b=o[2]&&0===o[2].indexOf("native");o[2]&&0===o[2].indexOf("eval")&&(t=u.exec(o[2]))&&(o[2]=t[1],o[3]=t[2],o[4]=t[3]),r={url:b?null:o[2],func:o[1]||i,args:b?[o[2]]:[],line:o[3]?+o[3]:null,column:o[4]?+o[4]:null}}else if(o=l.exec(f[d]))r={url:o[2],func:o[1]||i,args:[],line:+o[3],column:o[4]?+o[4]:null};else{if(!(o=a.exec(f[d])))continue;o[3]&&o[3].indexOf(" > eval")>-1&&(t=s.exec(o[3]))?(o[3]=t[1],o[4]=t[2],o[5]=null):0!==d||o[5]||void 0===e.columnNumber||(p[0].column=e.columnNumber+1),r={url:o[3],func:o[1]||i,args:o[2]?o[2].split(","):[],line:o[4]?+o[4]:null,column:o[5]?+o[5]:null}}!r.func&&r.line&&(r.func=i),p.push(r)}return p.length?{name:e.name,message:e.message,url:c(),stack:p}:null}}function t(e,t,o,r){var n={url:t,line:o};if(n.url&&n.line){if(e.incomplete=!1,n.func||(n.func=i),e.stack.length>0&&e.stack[0].url===n.url){if(e.stack[0].line===n.line)return!1;if(!e.stack[0].line&&e.stack[0].func===n.func)return e.stack[0].line=n.line,!1}return e.stack.unshift(n),e.partial=!0,!0}return e.incomplete=!0,!1}function o(e,a){for(var l,s,u=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,f=[],p={},d=!1,h=o.caller;h&&!d;h=h.caller)if(h!==r&&h!==n.report){if(s={url:null,func:i,line:null,column:null},h.name?s.func=h.name:(l=u.exec(h.toString()))&&(s.func=l[1]),void 0===s.func)try{s.func=l.input.substring(0,l.input.indexOf("{"))}catch(e){}p[""+h]?d=!0:p[""+h]=!0,f.push(s)}a&&f.splice(0,a);var b={name:e.name,message:e.message,url:c(),stack:f};return t(b,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),b}function r(t,r){var a=null;r=null==r?0:+r;try{if(a=e(t))return a}catch(e){if(n.debug)throw e}try{if(a=o(t,r+1))return a}catch(e){if(n.debug)throw e}return{name:t.name,message:t.message,url:c()}}return r.augmentStackTraceWithInitialElement=t,r.computeStackTraceFromStackProp=e,r}(),e.exports=n}).call(this,o(1))},function(e,t){function o(e,t){for(var o=0;o<e.length;++o)if(e[o]===t)return o;return-1}function r(e,t){var r=[],n=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,o(r,t)).join(".")+"]"}),function(a,l){if(r.length>0){var i=o(r,this);~i?r.splice(i+1):r.push(this),~i?n.splice(i,1/0,a):n.push(a),~o(r,l)&&(l=t.call(this,a,l))}else r.push(l);return null==e?l instanceof Error?function(e){var t={stack:e.stack,message:e.message,name:e.name};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}(l):l:e.call(this,a,l)}}(e.exports=function(e,t,o,n){return JSON.stringify(e,r(t,n),o)}).getSerialize=r},function(e,t){function o(e){this.name="RavenConfigError",this.message=e}o.prototype=new Error,o.prototype.constructor=o,e.exports=o},function(e,t){e.exports={wrapMethod:function(e,t,o){var r=e[t],n=e;if(t in e){var a="warn"===t?"warning":t;e[t]=function(){var e=[].slice.call(arguments),l=""+e.join(" "),i={level:a,logger:"console",extra:{arguments:e}};"assert"===t?!1===e[0]&&(l="Assertion failed: "+(e.slice(1).join(" ")||"console.assert"),i.extra.arguments=e.slice(1),o&&o(l,i)):o&&o(l,i),r&&Function.prototype.apply.call(r,n,e)}}}}},function(e,t,o){"use strict";o.r(t);var r=o(0),n=o.n(r),a=window.leadinConfig,l=a.adminUrl,i=a.ajaxUrl,s=a.env,c=a.hubspotBaseUrl,u=a.leadinPluginVersion,f=a.nonce,p=a.plugins,d=a.phpVersion,h=a.portalId,b=a.theme,m=a.wpVersion,y=window.leadinI18n;var g=n.a;function v(e,t){jQuery("#toplevel_page_leadin").find("li").last().before('<li><a href="'.concat(t,'" target="_blank">').concat(e,"</a></li>"))}function _(){var e="".concat(c,"/chatflows/").concat(h),t="".concat(c,"/email/").concat(h);v(y.chatflows,e),v(y.email,t)}function S(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(){try{if(window.localStorage.LEADIN_DEBUG){for(var e,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];o.unshift("[Leadin]"),(e=console).log.apply(e,o)}}catch(e){}}var C={iframe:"#leadin-iframe",spaNavigationButtons:'.toplevel_page_leadin > a, a[href="admin.php?page=leadin_forms"], a[href="admin.php?page=leadin_settings"]',subMenuButtons:".toplevel_page_leadin > ul > li"},w=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bus=jQuery({})}var t,o,r;return t=e,(o=[{key:"trigger",value:function(){var e;(e=this.bus).trigger.apply(e,arguments)}},{key:"on",value:function(e,t){this.bus.on(e,g.wrap(t))}}])&&S(t.prototype,o),r&&S(t,r),e}()),E=[];function F(e){x("Posting message"),x(JSON.stringify(e)),jQuery(C.iframe)[0].contentWindow.postMessage(JSON.stringify(e),c)}function T(e,t){t||(t="Message Received");var o=Object.assign({},e);o.response=t,F(o)}function k(e){x("Received message"),x(JSON.stringify(e)),e.response&&e._callbackId?function(e){E[e._callbackId-1](e.response)}(e):Object.keys(e).forEach(function(t){w.trigger(t,[e[t],T.bind(null,e)])})}function L(e){if(e.origin===c)try{k(JSON.parse(e.data))}catch(e){}}function O(e,t,o,r,n){var a={url:"".concat(i,"?action=").concat(e,"&_ajax_nonce=").concat(f),method:t,contentType:"application/json",success:"function"==typeof r?g.wrap(function(e){return r(JSON.parse(e))}):void 0,error:g.wrap(function(e){var t;try{t=JSON.parse(e.responseText).error}catch(o){t=e.responseText}g.captureMessage("AJAX request failed with code ".concat(e.status,": ").concat(t)),"function"==typeof n&&n()})};o&&(a.data=JSON.stringify(o)),jQuery.ajax(a)}function j(e,t,o,r){return O(e,"POST",t,o,r)}function R(e,t,o){return O(e,"GET",null,t,o)}var I,N=function(){return R("leadin_get_portal")},B=!1;function U(){I=setTimeout(function(){N(function(e){e.portalId?location.reload(!0):B||U()},U)},5e3)}var z=j.bind(null,"leadin_disconnect_ajax",{}),D=R.bind(null,"leadin_get_domain");function M(e){return function(e,t){w.on(e,function(){for(var e=arguments.length,o=new Array(e),r=0;r<e;r++)o[r]=arguments[r];t.apply(null,o.slice(1))})}.bind(null,e)}var P=M("leadin_clear_query_param"),H=M("leadin_connect_portal"),A=M("leadin_disable_navigation"),q=M("leadin_disconnect_portal"),J=M("leadin_enter_fullscreen"),W=M("leadin_exit_fullscreen"),K=M("leadin_get_assets_payload"),$=M("leadin_get_wp_domain"),Q=M("leadin_init_navigation"),X=M("leadin_interframe_ready"),G=M("leadin_page_reload"),V=M("leadin_upgrade"),Z=M("leadin_sync_route");function Y(e){!function(e,t,o,r,n){n||(n=500);var a=setTimeout(g.wrap(function(){var t="LeadinWordpressPlugin postMessage response timeout on message key: ".concat(e);x(t),g.captureMessage(t),r()}),n),l={};l[e]=t,l._callbackId=E.push(function(){clearTimeout(a),o.apply(void 0,arguments)}),F(l)}("leadin_change_route",e,null,function(){return location.reload(!0)})}var ee=["forms","settings"];function te(){function e(){var e=window.location.search.match(/page=leadin_?(\w*)/)[1];e&&(e="/".concat(e)),Y(e),function(){jQuery(C.subMenuButtons).removeClass("current");var e=window.location.search.match(/\?page=leadin_?\w*/)[0];jQuery('a[href="admin.php'.concat(e,'"]')).parent().addClass("current")}()}window.addEventListener("popstate",e),jQuery(C.spaNavigationButtons).click(g.wrap(function(){event.metaKey||event.altKey||event.shiftKey||(window.history.pushState(null,null,jQuery(this).attr("href")),e(),event.preventDefault())}))}var oe={"genesis-sample":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0073e5"},chatStyle:{accentColor:"#0073e5"},onScrollLeadFlowStyle:{color:"#0073e5"},onExitLeadFlowStyle:{color:"#0073e5"}},"academy-pro":{formsStyle:{fontFamily:"PT Sans",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e22c2f"},chatStyle:{accentColor:"#e22c2f"},onScrollLeadFlowStyle:{color:"#e22c2f"},onExitLeadFlowStyle:{color:"#e22c2f"}},"agency-pro":{formsStyle:{fontFamily:"EB Garamond",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#d7c603"},chatStyle:{accentColor:"#d7c603"},onScrollLeadFlowStyle:{color:"#d7c603"},onExitLeadFlowStyle:{color:"#d7c603"}},"agentpress-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#1a212b",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#d23836"},chatStyle:{accentColor:"#d23836"},onScrollLeadFlowStyle:{color:"#d23836"},onExitLeadFlowStyle:{color:"#d23836"}},"altitude-pro":{formsStyle:{fontFamily:"Ek Mukta",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#079bc4"},chatStyle:{accentColor:"#079bc4"},onScrollLeadFlowStyle:{color:"#079bc4"},onExitLeadFlowStyle:{color:"#079bc4"}},"ambiance-pro":{formsStyle:{fontFamily:"Merriweather",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e12727"},chatStyle:{accentColor:"#e12727"},onScrollLeadFlowStyle:{color:"#e12727"},onExitLeadFlowStyle:{color:"#e12727"}},"atmosphere-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"author-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"authority-pro":{formsStyle:{fontFamily:"Libre Baskerville",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000cff"},chatStyle:{accentColor:"#000cff"},onScrollLeadFlowStyle:{color:"#000cff"},onExitLeadFlowStyle:{color:"#000cff"}},"beautiful-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#666666",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#e5554e"},chatStyle:{accentColor:"#e5554e"},onScrollLeadFlowStyle:{color:"#e5554e"},onExitLeadFlowStyle:{color:"#e5554e"}},"breakthrough-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#4e4756",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#4a4f9b"},chatStyle:{accentColor:"#4a4f9b"},onScrollLeadFlowStyle:{color:"#4a4f9b"},onExitLeadFlowStyle:{color:"#4a4f9b"}},"cafe-pro":{formsStyle:{fontFamily:"Crimson Text",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"daily-dish-pro":{formsStyle:{fontFamily:"Cormorant",labelTextColor:"#000000",labelTextSize:"20px",submitFontColor:"#ffffff",submitColor:"#d9037f"},chatStyle:{accentColor:"#d9037f"},onScrollLeadFlowStyle:{color:"#d9037f"},onExitLeadFlowStyle:{color:"#d9037f"}},"digital-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#5b5e5e",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#e85555"},chatStyle:{accentColor:"#e85555"},onScrollLeadFlowStyle:{color:"#e85555"},onExitLeadFlowStyle:{color:"#e85555"}},"education-pro":{formsStyle:{fontFamily:"Roboto Condensed",labelTextColor:"#444444",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#78a7c8"},chatStyle:{accentColor:"#78a7c8"},onScrollLeadFlowStyle:{color:"#78a7c8"},onExitLeadFlowStyle:{color:"#78a7c8"}},"eleven40-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ed702b"},chatStyle:{accentColor:"#ed702b"},onScrollLeadFlowStyle:{color:"#ed702b"},onExitLeadFlowStyle:{color:"#ed702b"}},"enterprise-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#777777",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#31b2ed"},chatStyle:{accentColor:"#31b2ed"},onScrollLeadFlowStyle:{color:"#31b2ed"},onExitLeadFlowStyle:{color:"#31b2ed"}},"essence-pro":{formsStyle:{fontFamily:"Alegreya Sans",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#be8100"},chatStyle:{accentColor:"#be8100"},onScrollLeadFlowStyle:{color:"#be8100"},onExitLeadFlowStyle:{color:"#be8100"}},"executive-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#64c9ea"},chatStyle:{accentColor:"#64c9ea"},onScrollLeadFlowStyle:{color:"#64c9ea"},onExitLeadFlowStyle:{color:"#64c9ea"}},"generate-pro":{formsStyle:{fontFamily:"Source Sans Pro",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#eb232f"},chatStyle:{accentColor:"#eb232f"},onScrollLeadFlowStyle:{color:"#eb232f"},onExitLeadFlowStyle:{color:"#eb232f"}},"infinity-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#d43c67"},chatStyle:{accentColor:"#d43c67"},onScrollLeadFlowStyle:{color:"#d43c67"},onExitLeadFlowStyle:{color:"#d43c67"}},"interior-pro":{formsStyle:{fontFamily:"Lora",labelTextColor:"#777777",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#009092"},chatStyle:{accentColor:"#009092"},onScrollLeadFlowStyle:{color:"#009092"},onExitLeadFlowStyle:{color:"#009092"}},"lifestyle-pro":{formsStyle:{fontFamily:"Droid Sans",labelTextColor:"#767673",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#27968b"},chatStyle:{accentColor:"#27968b"},onScrollLeadFlowStyle:{color:"#27968b"},onExitLeadFlowStyle:{color:"#27968b"}},"magazine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#008285"},chatStyle:{accentColor:"#008285"},onScrollLeadFlowStyle:{color:"#008285"},onExitLeadFlowStyle:{color:"#008285"}},"metro-pro":{formsStyle:{fontFamily:"Helvetica Neue",labelTextColor:"#222222",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#f96e5b"},chatStyle:{accentColor:"#f96e5b"},onScrollLeadFlowStyle:{color:"#f96e5b"},onExitLeadFlowStyle:{color:"#f96e5b"}},"minimum-pro":{formsStyle:{fontFamily:"Roboto Slab",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#0ebfe9"},chatStyle:{accentColor:"#0ebfe9"},onScrollLeadFlowStyle:{color:"#0ebfe9"},onExitLeadFlowStyle:{color:"#0ebfe9"}},"modern-studio-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"monochrome-pro":{formsStyle:{fontFamily:"Muli",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"news-pro":{formsStyle:{fontFamily:"Raleway",labelTextColor:"#666666",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#ff0000"},chatStyle:{accentColor:"#ff0000"},onScrollLeadFlowStyle:{color:"#ff0000"},onExitLeadFlowStyle:{color:"#ff0000"}},"no-sidebar-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#333333"},chatStyle:{accentColor:"#333333"},onScrollLeadFlowStyle:{color:"#333333"},onExitLeadFlowStyle:{color:"#333333"}},"outfitter-pro":{formsStyle:{fontFamily:"Noto Sans",labelTextColor:"#546e7a",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#000000"},chatStyle:{accentColor:"#000000"},onScrollLeadFlowStyle:{color:"#000000"},onExitLeadFlowStyle:{color:"#000000"}},"outreach-pro":{formsStyle:{fontFamily:"Lato",labelTextColor:"#333333",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#6ab446"},chatStyle:{accentColor:"#6ab446"},onScrollLeadFlowStyle:{color:"#6ab446"},onExitLeadFlowStyle:{color:"#6ab446"}},"parallax-pro":{formsStyle:{fontFamily:"Cormorant Garamond",labelTextColor:"#000000",labelTextSize:"22px",submitFontColor:"#ffffff",submitColor:"#00a0af"},chatStyle:{accentColor:"#00a0af"},onScrollLeadFlowStyle:{color:"#00a0af"},onExitLeadFlowStyle:{color:"#00a0af"}},"revolution-pro":{formsStyle:{fontFamily:"Noto Serif SC",labelTextColor:"#000000",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#008080"},chatStyle:{accentColor:"#008080"},onScrollLeadFlowStyle:{color:"#008080"},onExitLeadFlowStyle:{color:"#008080"}},"sixteen-nine-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#1dbec0"},chatStyle:{accentColor:"#1dbec0"},onScrollLeadFlowStyle:{color:"#1dbec0"},onExitLeadFlowStyle:{color:"#1dbec0"}},"smart-passive-income-pro":{formsStyle:{fontFamily:"Roboto",labelTextColor:"#333333",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#0e763c"},chatStyle:{accentColor:"#0e763c"},onScrollLeadFlowStyle:{color:"#0e763c"},onExitLeadFlowStyle:{color:"#0e763c"}},"wellness-pro":{formsStyle:{fontFamily:"Open Sans",labelTextColor:"#000000",labelTextSize:"16px",submitFontColor:"#ffffff",submitColor:"#5da44f"},chatStyle:{accentColor:"#5da44f"},onScrollLeadFlowStyle:{color:"#5da44f"},onExitLeadFlowStyle:{color:"#5da44f"}},"workstation-pro":{formsStyle:{fontFamily:"Baskerville",labelTextColor:"#222222",labelTextSize:"18px",submitFontColor:"#ffffff",submitColor:"#ff4800"},chatStyle:{accentColor:"#ff4800"},onScrollLeadFlowStyle:{color:"#ff4800"},onExitLeadFlowStyle:{color:"#ff4800"}}};X(function(e,t){t("Interframe Ready")}),H(function(e,t){!function(e,t,o){j("leadin_registration_ajax",{portalId:e},t,o)}(e,function(){clearTimeout(I),B=!0,t({success:!0})},t.bind(null,{success:!1}))}),q(function(e,t){z(t.bind(null,{success:!0}),t.bind(null,{success:!1}))}),V(function(e,t){t(),location.href="".concat(l,"plugins.php")}),G(function(e,t){t(),window.location.reload(!0)}),Q(function(e,t){t(),te()}),A(function(e,t){t(),jQuery(C.allMenuButtons).off("click")}),P(function(e,t){t();var o=window.location.toString();o.indexOf("?")>0&&(o=o.substring(0,o.indexOf("?")));var r="".concat(o,"?page=leadin");window.history.pushState({},"",r)}),$(function(e,t){D(function(e){e.domain&&t(e.domain)})}),K(function(e,t){t({payload:oe[b]})}),J(function(e,t){jQuery(C.iframe).addClass("leadin-iframe-fullscreen"),t()}),W(function(e,t){jQuery(C.iframe).removeClass("leadin-iframe-fullscreen"),t()}),Z(function(e,t){!function(){for(var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/");""===e[0];)e.shift();var t="";ee.includes(e[0])&&(t="_".concat(e[0]),e.shift());var o=e.reduce(function(e,t,o){return"".concat(e,"&").concat(encodeURIComponent("leadin_route[".concat(o,"]")),"=").concat(t)},"");window.history.replaceState(null,null,"?page=leadin".concat(t).concat(o))}(e),t()}),"prod"===s&&(n.a.config("https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1",{instrument:{tryCatch:!1}}).install(),n.a.setTagsContext({leadin:u,php:d,wordpress:m}),n.a.setUserContext({hub:h,plugins:Object.keys(p).map(function(e){return"".concat(e,"#").concat(p[e].Version)}).join(",")})),g.context(function(){window.addEventListener("message",L),-1!==window.location.search.indexOf("page=leadin")&&(h||U()),jQuery(document).ready(_)})}]);
|
2 |
//# sourceMappingURL=leadin.js.map
|
scripts/leadin.js.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/raven-js/src/singleton.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/raven-js/src/utils.js","webpack:///./node_modules/raven-js/src/raven.js","webpack:///./node_modules/raven-js/vendor/TraceKit/tracekit.js","webpack:///./node_modules/raven-js/vendor/json-stringify-safe/stringify.js","webpack:///./node_modules/raven-js/src/configError.js","webpack:///./node_modules/raven-js/src/console.js","webpack:///./js/constants/leadinConfig.js","webpack:///./js/lib/Raven.js","webpack:///./js/menu.js","webpack:///./js/utils.js","webpack:///./js/constants/selectors.js","webpack:///./js/lib/Interframe.js","webpack:///./js/lib/EventBus.js","webpack:///./js/api/wordpressApi.js","webpack:///./js/api/hubspotPluginApi.js","webpack:///./js/constants/routes.js","webpack:///./js/navigation.js","webpack:///./js/constants/themes.js","webpack:///./js/handlers.js","webpack:///./js/fullscreen.js","webpack:///./js/app.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","RavenConstructor","_window","window","self","_Raven","Raven","noConflict","afterLoad","g","this","Function","e","isUndefined","what","isString","toString","supportsErrorEvent","ErrorEvent","each","obj","callback","j","length","hasKey","htmlElementAsString","elem","className","classes","attr","out","tagName","push","toLowerCase","id","split","attrWhitelist","getAttribute","join","isOnlyOneTruthy","a","b","isSameStacktrace","stack1","stack2","frames1","frames","frames2","filename","lineno","colno","isObject","isError","Error","isErrorEvent","isFunction","isEmptyObject","_","wrappedCallback","data","original","normalizedData","objectMerge","obj1","obj2","truncate","str","max","substr","objectFrozen","isFrozen","joinRegExp","patterns","pattern","sources","len","replace","source","RegExp","urlencode","pairs","encodeURIComponent","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","Math","random","htmlTreeAsString","nextStr","height","sepLength","parentNode","reverse","isSameException","ex1","ex2","values","type","stacktrace","parseUrl","url","match","query","fragment","protocol","host","path","relative","fill","replacement","track","orig","TraceKit","stringify","RavenConfigError","utils","wrapConsoleMethod","wrapMethod","dsnKeys","dsnPattern","now","Date","_document","document","_navigator","navigator","keepOriginalCallback","method","_hasJSON","JSON","_hasDocument","_hasNavigator","_lastCapturedException","_lastData","_lastEventId","_globalServer","_globalKey","_globalProject","_globalContext","_globalOptions","logger","ignoreErrors","ignoreUrls","whitelistUrls","includePaths","collectWindowErrors","maxMessageLength","maxUrlLength","stackTraceLimit","autoBreadcrumbs","instrument","sampleRate","_ignoreOnError","_isRavenInstalled","_originalErrorStackTraceLimit","_originalConsole","console","_originalConsoleMethods","_plugins","_startTime","_wrappedBuiltIns","_breadcrumbs","_lastCapturedEvent","_keypressTimeout","_location","location","_lastHref","href","_resetBackoff","VERSION","debug","config","dsn","options","_logDebug","globalOptions","setDSN","maxBreadcrumbs","min","autoBreadcrumbDefaults","xhr","dom","instrumentDefaults","tryCatch","install","isSetup","report","subscribe","_handleOnErrorStackInfo","apply","arguments","_instrumentTryCatch","_instrumentBreadcrumbs","_drainPlugins","uri","_parseDSN","lastSlash","lastIndexOf","_dsn","user","_globalSecret","pass","_getGlobalServer","_globalEndpoint","context","func","args","undefined","wrap","_before","__raven__","__raven_wrapper__","wrapped","deep","_ignoreNextOnError","captureException","__inner__","uninstall","_restoreBuiltIns","ex","isNotError","isNotErrorEvent","isErrorEventWithoutError","error","captureMessage","trimHeadFrames","stack","computeStackTrace","_handleStackInfo","msg","test","message","initialCall","fileurl","fingerprint","_prepareFrames","_send","captureBreadcrumb","crumb","timestamp","breadcrumbCallback","result","shift","addPlugin","plugin","pluginArgs","slice","setUserContext","setExtraContext","extra","_mergeContext","setTagsContext","tags","clearContext","getContext","parse","setEnvironment","environment","setRelease","release","setDataCallback","dataCallback","setBreadcrumbCallback","setShouldSendCallback","shouldSendCallback","setTransport","transport","lastException","lastEventId","ravenNotConfiguredError","RavenConfig","showReportDialog","eventId","encode","qs","email","globalServer","script","createElement","async","src","head","body","appendChild","setTimeout","_triggerEvent","eventType","evt","toUpperCase","createEvent","initEvent","createEventObject","dispatchEvent","fireEvent","_breadcrumbEventHandler","evtName","target","category","_keypressEventHandler","isContentEditable","timeout","clearTimeout","_captureUrlChange","from","to","parsedLoc","parsedTo","parsedFrom","wrappedBuiltIns","wrapTimeFn","fn","Array","originalCallback","wrapEventTarget","proto","capture","secure","handleEvent","err","before","clickHandler","keypressHandler","requestAnimationFrame","cb","eventTargets","wrapProp","prop","xhrproto","XMLHttpRequest","origOpen","indexOf","__raven_xhr","status_code","origSend","onreadystatechangeHandler","readyState","status","props","onreadystatechange","origFetch","fetchInput","Request","fetchData","then","response","addEventListener","attachEvent","chrome","hasPushAndReplaceState","app","runtime","history","pushState","replaceState","oldOnPopState","onpopstate","currentHref","historyReplacementFunction","origHistFunction","log","consoleMethodCallback","level","builtin","installer","concat","exec","allowSecretKey","port","stackInfo","_processException","frame","_normalizeFrame","in_app","stackInfoUrl","normalized","line","column","function","prefixedMessage","exception","culprit","_trimPacket","request","Referer","breadcrumbs","_trimBreadcrumbs","urlProp","urlProps","_getHttpData","httpData","userAgent","headers","User-Agent","referrer","_backoffDuration","_backoffStart","_shouldBackoff","_isRepeatData","current","last","_setBackoffState","retry","getResponseHeader","parseInt","baseData","project","platform","serverName","server_name","_sendProcessedPayload","_getUuid","allowDuplicates","event_id","auth","sentry_version","sentry_client","sentry_key","sentry_secret","_makeRequest","onSuccess","onError","opts","XDomainRequest","onload","onerror","open","send","setUser","setReleaseContext","_slice","UNKNOWN_FUNCTION","ERROR_TYPES_RE","getLocationHref","_oldOnerrorHandler","_onErrorHandlerInstalled","handlers","lastArgs","lastExceptionStack","notifyHandlers","isWindowError","inner","traceKitWindowOnError","lineNo","colNo","augmentStackTraceWithInitialElement","processLastException","groups","_lastExceptionStack","_lastArgs","rethrow","incomplete","handler","unsubscribe","splice","computeStackTraceFromStackProp","submatch","parts","element","gecko","winjs","geckoEval","chromeEval","lines","isNative","columnNumber","initial","unshift","partial","computeStackTraceByWalkingCallerChain","depth","item","functionName","funcs","recursion","curr","caller","input","substring","sourceURL","fileName","lineNumber","description","haystack","needle","serializer","replacer","cycleReplacer","keys","thisPos","Infinity","stringifyError","spaces","getSerialize","constructor","originalConsoleLevel","originalConsole","sentryLevel","leadinConfig","adminUrl","ajaxUrl","env","hubspotBaseUrl","leadinPluginVersion","plugins","phpVersion","portalId","theme","wpVersion","i18n","leadinI18n","addMenuItem","text","jQuery","find","addExternalLinks","chatflowsUrl","emailUrl","chatflows","localStorage","LEADIN_DEBUG","_console","_len","_key","domElements","iframe","spaNavigationButtons","subMenuButtons","eventBus","EventBus","_classCallCheck","bus","_this$bus","trigger","event","on","callbacks","postMessageObject","contentWindow","postMessage","reply","newMessage","assign","handleMessage","_callbackId","handleResponse","forEach","handleMessageEvent","origin","makeRequest","action","payload","success","ajaxPayload","contentType","jqXHR","responseText","ajax","post","portalPollingTimeout","getPortal","stopPortalPolling","startPortalIdPolling","reload","disconnect","getDomain","markAsOutdated","createHandler","onClearQueryParam","onConnect","onDisableNavigation","onDisconnect","onEnterFullScreen","onExitFullScreen","onGetAssetsPayload","onGetDomain","onInitNavigation","onInterframeReady","onMarkAsOutdated","onPageReload","onUpgrade","onSyncRoute","changeRoute","route","onResponse","onTimeout","timeoutId","errorMessage","validAppRoutes","initNavigation","handleNavigation","appRoute","search","removeClass","pageParam","parent","addClass","setSelectedMenuItem","click","metaKey","altKey","shiftKey","preventDefault","themes","genesis-sample","formsStyle","fontFamily","labelTextColor","labelTextSize","submitFontColor","submitColor","chatStyle","accentColor","onScrollLeadFlowStyle","color","onExitLeadFlowStyle","academy-pro","agency-pro","agentpress-pro","altitude-pro","ambiance-pro","atmosphere-pro","author-pro","authority-pro","beautiful-pro","breakthrough-pro","cafe-pro","daily-dish-pro","digital-pro","education-pro","eleven40-pro","enterprise-pro","essence-pro","executive-pro","generate-pro","infinity-pro","interior-pro","lifestyle-pro","magazine-pro","metro-pro","minimum-pro","modern-studio-pro","monochrome-pro","news-pro","no-sidebar-pro","outfitter-pro","outreach-pro","parallax-pro","revolution-pro","sixteen-nine-pro","smart-passive-income-pro","wellness-pro","workstation-pro","connect","allMenuButtons","off","currentWindowLocation","newWindowLocation","domain","routes","includes","queryParamsRoutes","reduce","acc","index","syncRoute","leadin","php","wordpress","hub","map","Version","ready"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OA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sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","/**\n * Enforces a single instance of the Raven client, and the\n * main entry point for Raven. If you are a consumer of the\n * Raven library, you SHOULD load this file (vs raven.js).\n **/\n\nvar RavenConstructor = require('./raven');\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _Raven = _window.Raven;\n\nvar Raven = new RavenConstructor();\n\n/*\n * Allow multiple versions of Raven to be installed.\n * Strip Raven from the global context and returns the instance.\n *\n * @return {Raven}\n */\nRaven.noConflict = function() {\n _window.Raven = _Raven;\n return Raven;\n};\n\nRaven.afterLoad();\n\nmodule.exports = Raven;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction isObject(what) {\n return typeof what === 'object' && what !== null;\n}\n\n// Yanked from https://git.io/vS8DV re-used under CC0\n// with some tiny modifications\nfunction isError(value) {\n switch ({}.toString.call(value)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return value instanceof Error;\n }\n}\n\nfunction isErrorEvent(value) {\n return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';\n}\n\nfunction isUndefined(what) {\n return what === void 0;\n}\n\nfunction isFunction(what) {\n return typeof what === 'function';\n}\n\nfunction isString(what) {\n return Object.prototype.toString.call(what) === '[object String]';\n}\n\nfunction isEmptyObject(what) {\n for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars\n return true;\n}\n\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent(''); // eslint-disable-line no-new\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction wrappedCallback(callback) {\n function dataCallback(data, original) {\n var normalizedData = callback(data) || data;\n if (original) {\n return original(normalizedData) || normalizedData;\n }\n return normalizedData;\n }\n\n return dataCallback;\n}\n\nfunction each(obj, callback) {\n var i, j;\n\n if (isUndefined(obj.length)) {\n for (i in obj) {\n if (hasKey(obj, i)) {\n callback.call(null, i, obj[i]);\n }\n }\n } else {\n j = obj.length;\n if (j) {\n for (i = 0; i < j; i++) {\n callback.call(null, i, obj[i]);\n }\n }\n }\n}\n\nfunction objectMerge(obj1, obj2) {\n if (!obj2) {\n return obj1;\n }\n each(obj2, function(key, value) {\n obj1[key] = value;\n });\n return obj1;\n}\n\n/**\n * This function is only used for react-native.\n * react-native freezes object that have already been sent over the\n * js bridge. We need this function in order to check if the object is frozen.\n * So it's ok that objectFrozen returns false if Object.isFrozen is not\n * supported because it's not relevant for other \"platforms\". See related issue:\n * https://github.com/getsentry/react-native-sentry/issues/57\n */\nfunction objectFrozen(obj) {\n if (!Object.isFrozen) {\n return false;\n }\n return Object.isFrozen(obj);\n}\n\nfunction truncate(str, max) {\n return !max || str.length <= max ? str : str.substr(0, max) + '\\u2026';\n}\n\n/**\n * hasKey, a better form of hasOwnProperty\n * Example: hasKey(MainHostObject, property) === true/false\n *\n * @param {Object} host object to check property\n * @param {string} key to check\n */\nfunction hasKey(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nfunction joinRegExp(patterns) {\n // Combine an array of regular expressions and strings into one large regexp\n // Be mad.\n var sources = [],\n i = 0,\n len = patterns.length,\n pattern;\n\n for (; i < len; i++) {\n pattern = patterns[i];\n if (isString(pattern)) {\n // If it's a string, we need to escape it\n // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n sources.push(pattern.replace(/([.*+?^=!:${}()|\\[\\]\\/\\\\])/g, '\\\\$1'));\n } else if (pattern && pattern.source) {\n // If it's a regexp already, we want to extract the source\n sources.push(pattern.source);\n }\n // Intentionally skip other cases\n }\n return new RegExp(sources.join('|'), 'i');\n}\n\nfunction urlencode(o) {\n var pairs = [];\n each(o, function(key, value) {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n });\n return pairs.join('&');\n}\n\n// borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n// intentionally using regex and not <a/> href parsing trick because React Native and other\n// environments where DOM might not be available\nfunction parseUrl(url) {\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) return {};\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n protocol: match[2],\n host: match[4],\n path: match[5],\n relative: match[5] + query + fragment // everything minus origin\n };\n}\nfunction uuid4() {\n var crypto = _window.crypto || _window.msCrypto;\n\n if (!isUndefined(crypto) && crypto.getRandomValues) {\n // Use window.crypto API if available\n // eslint-disable-next-line no-undef\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n var pad = function(num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = '0' + v;\n }\n return v;\n };\n\n return (\n pad(arr[0]) +\n pad(arr[1]) +\n pad(arr[2]) +\n pad(arr[3]) +\n pad(arr[4]) +\n pad(arr[5]) +\n pad(arr[6]) +\n pad(arr[7])\n );\n } else {\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (Math.random() * 16) | 0,\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @param elem\n * @returns {string}\n */\nfunction htmlTreeAsString(elem) {\n /* eslint no-extra-parens:0*/\n var MAX_TRAVERSE_HEIGHT = 5,\n MAX_OUTPUT_LEN = 80,\n out = [],\n height = 0,\n len = 0,\n separator = ' > ',\n sepLength = separator.length,\n nextStr;\n\n while (elem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = htmlElementAsString(elem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (\n nextStr === 'html' ||\n (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)\n ) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n elem = elem.parentNode;\n }\n\n return out.reverse().join(separator);\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @param HTMLElement\n * @returns {string}\n */\nfunction htmlElementAsString(elem) {\n var out = [],\n className,\n classes,\n key,\n attr,\n i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push('#' + elem.id);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push('.' + classes[i]);\n }\n }\n var attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push('[' + key + '=\"' + attr + '\"]');\n }\n }\n return out.join('');\n}\n\n/**\n * Returns true if either a OR b is truthy, but not both\n */\nfunction isOnlyOneTruthy(a, b) {\n return !!(!!a ^ !!b);\n}\n\n/**\n * Returns true if the two input exception interfaces have the same content\n */\nfunction isSameException(ex1, ex2) {\n if (isOnlyOneTruthy(ex1, ex2)) return false;\n\n ex1 = ex1.values[0];\n ex2 = ex2.values[0];\n\n if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;\n\n return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);\n}\n\n/**\n * Returns true if the two input stack trace interfaces have the same content\n */\nfunction isSameStacktrace(stack1, stack2) {\n if (isOnlyOneTruthy(stack1, stack2)) return false;\n\n var frames1 = stack1.frames;\n var frames2 = stack2.frames;\n\n // Exit early if frame count differs\n if (frames1.length !== frames2.length) return false;\n\n // Iterate through every frame; bail out if anything differs\n var a, b;\n for (var i = 0; i < frames1.length; i++) {\n a = frames1[i];\n b = frames2[i];\n if (\n a.filename !== b.filename ||\n a.lineno !== b.lineno ||\n a.colno !== b.colno ||\n a['function'] !== b['function']\n )\n return false;\n }\n return true;\n}\n\n/**\n * Polyfill a method\n * @param obj object e.g. `document`\n * @param name method name present on object e.g. `addEventListener`\n * @param replacement replacement function\n * @param track {optional} record instrumentation to an array\n */\nfunction fill(obj, name, replacement, track) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (track) {\n track.push([obj, name, orig]);\n }\n}\n\nmodule.exports = {\n isObject: isObject,\n isError: isError,\n isErrorEvent: isErrorEvent,\n isUndefined: isUndefined,\n isFunction: isFunction,\n isString: isString,\n isEmptyObject: isEmptyObject,\n supportsErrorEvent: supportsErrorEvent,\n wrappedCallback: wrappedCallback,\n each: each,\n objectMerge: objectMerge,\n truncate: truncate,\n objectFrozen: objectFrozen,\n hasKey: hasKey,\n joinRegExp: joinRegExp,\n urlencode: urlencode,\n uuid4: uuid4,\n htmlTreeAsString: htmlTreeAsString,\n htmlElementAsString: htmlElementAsString,\n isSameException: isSameException,\n isSameStacktrace: isSameStacktrace,\n parseUrl: parseUrl,\n fill: fill\n};\n","/*global XDomainRequest:false */\n\nvar TraceKit = require('../vendor/TraceKit/tracekit');\nvar stringify = require('../vendor/json-stringify-safe/stringify');\nvar RavenConfigError = require('./configError');\n\nvar utils = require('./utils');\nvar isError = utils.isError;\nvar isObject = utils.isObject;\nvar isObject = utils.isObject;\nvar isErrorEvent = utils.isErrorEvent;\nvar isUndefined = utils.isUndefined;\nvar isFunction = utils.isFunction;\nvar isString = utils.isString;\nvar isEmptyObject = utils.isEmptyObject;\nvar each = utils.each;\nvar objectMerge = utils.objectMerge;\nvar truncate = utils.truncate;\nvar objectFrozen = utils.objectFrozen;\nvar hasKey = utils.hasKey;\nvar joinRegExp = utils.joinRegExp;\nvar urlencode = utils.urlencode;\nvar uuid4 = utils.uuid4;\nvar htmlTreeAsString = utils.htmlTreeAsString;\nvar isSameException = utils.isSameException;\nvar isSameStacktrace = utils.isSameStacktrace;\nvar parseUrl = utils.parseUrl;\nvar fill = utils.fill;\n\nvar wrapConsoleMethod = require('./console').wrapMethod;\n\nvar dsnKeys = 'source protocol user pass host port path'.split(' '),\n dsnPattern = /^(?:(\\w+):)?\\/\\/(?:(\\w+)(:\\w+)?@)?([\\w\\.-]+)(?::(\\d+))?(\\/.*)/;\n\nfunction now() {\n return +new Date();\n}\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _document = _window.document;\nvar _navigator = _window.navigator;\n\nfunction keepOriginalCallback(original, callback) {\n return isFunction(callback)\n ? function(data) {\n return callback(data, original);\n }\n : callback;\n}\n\n// First, check for JSON support\n// If there is no JSON, we no-op the core features of Raven\n// since JSON is required to encode the payload\nfunction Raven() {\n this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);\n // Raven can run in contexts where there's no document (react-native)\n this._hasDocument = !isUndefined(_document);\n this._hasNavigator = !isUndefined(_navigator);\n this._lastCapturedException = null;\n this._lastData = null;\n this._lastEventId = null;\n this._globalServer = null;\n this._globalKey = null;\n this._globalProject = null;\n this._globalContext = {};\n this._globalOptions = {\n logger: 'javascript',\n ignoreErrors: [],\n ignoreUrls: [],\n whitelistUrls: [],\n includePaths: [],\n collectWindowErrors: true,\n maxMessageLength: 0,\n\n // By default, truncates URL values to 250 chars\n maxUrlLength: 250,\n stackTraceLimit: 50,\n autoBreadcrumbs: true,\n instrument: true,\n sampleRate: 1\n };\n this._ignoreOnError = 0;\n this._isRavenInstalled = false;\n this._originalErrorStackTraceLimit = Error.stackTraceLimit;\n // capture references to window.console *and* all its methods first\n // before the console plugin has a chance to monkey patch\n this._originalConsole = _window.console || {};\n this._originalConsoleMethods = {};\n this._plugins = [];\n this._startTime = now();\n this._wrappedBuiltIns = [];\n this._breadcrumbs = [];\n this._lastCapturedEvent = null;\n this._keypressTimeout;\n this._location = _window.location;\n this._lastHref = this._location && this._location.href;\n this._resetBackoff();\n\n // eslint-disable-next-line guard-for-in\n for (var method in this._originalConsole) {\n this._originalConsoleMethods[method] = this._originalConsole[method];\n }\n}\n\n/*\n * The core Raven singleton\n *\n * @this {Raven}\n */\n\nRaven.prototype = {\n // Hardcode version string so that raven source can be loaded directly via\n // webpack (using a build step causes webpack #1617). Grunt verifies that\n // this value matches package.json during build.\n // See: https://github.com/getsentry/raven-js/issues/465\n VERSION: '3.19.1',\n\n debug: false,\n\n TraceKit: TraceKit, // alias to TraceKit\n\n /*\n * Configure Raven with a DSN and extra options\n *\n * @param {string} dsn The public Sentry DSN\n * @param {object} options Set of global options [optional]\n * @return {Raven}\n */\n config: function(dsn, options) {\n var self = this;\n\n if (self._globalServer) {\n this._logDebug('error', 'Error: Raven has already been configured');\n return self;\n }\n if (!dsn) return self;\n\n var globalOptions = self._globalOptions;\n\n // merge in options\n if (options) {\n each(options, function(key, value) {\n // tags and extra are special and need to be put into context\n if (key === 'tags' || key === 'extra' || key === 'user') {\n self._globalContext[key] = value;\n } else {\n globalOptions[key] = value;\n }\n });\n }\n\n self.setDSN(dsn);\n\n // \"Script error.\" is hard coded into browsers for errors that it can't read.\n // this is the result of a script being pulled in from an external domain and CORS.\n globalOptions.ignoreErrors.push(/^Script error\\.?$/);\n globalOptions.ignoreErrors.push(/^Javascript error: Script error\\.? on line 0$/);\n\n // join regexp rules into one big rule\n globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);\n globalOptions.ignoreUrls = globalOptions.ignoreUrls.length\n ? joinRegExp(globalOptions.ignoreUrls)\n : false;\n globalOptions.whitelistUrls = globalOptions.whitelistUrls.length\n ? joinRegExp(globalOptions.whitelistUrls)\n : false;\n globalOptions.includePaths = joinRegExp(globalOptions.includePaths);\n globalOptions.maxBreadcrumbs = Math.max(\n 0,\n Math.min(globalOptions.maxBreadcrumbs || 100, 100)\n ); // default and hard limit is 100\n\n var autoBreadcrumbDefaults = {\n xhr: true,\n console: true,\n dom: true,\n location: true\n };\n\n var autoBreadcrumbs = globalOptions.autoBreadcrumbs;\n if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {\n autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);\n } else if (autoBreadcrumbs !== false) {\n autoBreadcrumbs = autoBreadcrumbDefaults;\n }\n globalOptions.autoBreadcrumbs = autoBreadcrumbs;\n\n var instrumentDefaults = {\n tryCatch: true\n };\n\n var instrument = globalOptions.instrument;\n if ({}.toString.call(instrument) === '[object Object]') {\n instrument = objectMerge(instrumentDefaults, instrument);\n } else if (instrument !== false) {\n instrument = instrumentDefaults;\n }\n globalOptions.instrument = instrument;\n\n TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;\n\n // return for chaining\n return self;\n },\n\n /*\n * Installs a global window.onerror error handler\n * to capture and report uncaught exceptions.\n * At this point, install() is required to be called due\n * to the way TraceKit is set up.\n *\n * @return {Raven}\n */\n install: function() {\n var self = this;\n if (self.isSetup() && !self._isRavenInstalled) {\n TraceKit.report.subscribe(function() {\n self._handleOnErrorStackInfo.apply(self, arguments);\n });\n if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {\n self._instrumentTryCatch();\n }\n\n if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();\n\n // Install all of the plugins\n self._drainPlugins();\n\n self._isRavenInstalled = true;\n }\n\n Error.stackTraceLimit = self._globalOptions.stackTraceLimit;\n return this;\n },\n\n /*\n * Set the DSN (can be called multiple time unlike config)\n *\n * @param {string} dsn The public Sentry DSN\n */\n setDSN: function(dsn) {\n var self = this,\n uri = self._parseDSN(dsn),\n lastSlash = uri.path.lastIndexOf('/'),\n path = uri.path.substr(1, lastSlash);\n\n self._dsn = dsn;\n self._globalKey = uri.user;\n self._globalSecret = uri.pass && uri.pass.substr(1);\n self._globalProject = uri.path.substr(lastSlash + 1);\n\n self._globalServer = self._getGlobalServer(uri);\n\n self._globalEndpoint =\n self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';\n\n // Reset backoff state since we may be pointing at a\n // new project/server\n this._resetBackoff();\n },\n\n /*\n * Wrap code within a context so Raven can capture errors\n * reliably across domains that is executed immediately.\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The callback to be immediately executed within the context\n * @param {array} args An array of arguments to be called with the callback [optional]\n */\n context: function(options, func, args) {\n if (isFunction(options)) {\n args = func || [];\n func = options;\n options = undefined;\n }\n\n return this.wrap(options, func).apply(this, args);\n },\n\n /*\n * Wrap code within a context and returns back a new function to be executed\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The function to be wrapped in a new context\n * @param {function} func A function to call before the try/catch wrapper [optional, private]\n * @return {function} The newly wrapped functions with a context\n */\n wrap: function(options, func, _before) {\n var self = this;\n // 1 argument has been passed, and it's not a function\n // so just return it\n if (isUndefined(func) && !isFunction(options)) {\n return options;\n }\n\n // options is optional\n if (isFunction(options)) {\n func = options;\n options = undefined;\n }\n\n // At this point, we've passed along 2 arguments, and the second one\n // is not a function either, so we'll just return the second argument.\n if (!isFunction(func)) {\n return func;\n }\n\n // We don't wanna wrap it twice!\n try {\n if (func.__raven__) {\n return func;\n }\n\n // If this has already been wrapped in the past, return that\n if (func.__raven_wrapper__) {\n return func.__raven_wrapper__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return func;\n }\n\n function wrapped() {\n var args = [],\n i = arguments.length,\n deep = !options || (options && options.deep !== false);\n\n if (_before && isFunction(_before)) {\n _before.apply(this, arguments);\n }\n\n // Recursively wrap all of a function's arguments that are\n // functions themselves.\n while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];\n\n try {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means Raven caught an error invoking your application code. This is\n // expected behavior and NOT indicative of a bug with Raven.js.\n return func.apply(this, args);\n } catch (e) {\n self._ignoreNextOnError();\n self.captureException(e, options);\n throw e;\n }\n }\n\n // copy over properties of the old function\n for (var property in func) {\n if (hasKey(func, property)) {\n wrapped[property] = func[property];\n }\n }\n wrapped.prototype = func.prototype;\n\n func.__raven_wrapper__ = wrapped;\n // Signal that this function has been wrapped already\n // for both debugging and to prevent it to being wrapped twice\n wrapped.__raven__ = true;\n wrapped.__inner__ = func;\n\n return wrapped;\n },\n\n /*\n * Uninstalls the global error handler.\n *\n * @return {Raven}\n */\n uninstall: function() {\n TraceKit.report.uninstall();\n\n this._restoreBuiltIns();\n\n Error.stackTraceLimit = this._originalErrorStackTraceLimit;\n this._isRavenInstalled = false;\n\n return this;\n },\n\n /*\n * Manually capture an exception and send it over to Sentry\n *\n * @param {error} ex An exception to be logged\n * @param {object} options A specific set of options for this error [optional]\n * @return {Raven}\n */\n captureException: function(ex, options) {\n // Cases for sending ex as a message, rather than an exception\n var isNotError = !isError(ex);\n var isNotErrorEvent = !isErrorEvent(ex);\n var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;\n\n if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {\n return this.captureMessage(\n ex,\n objectMerge(\n {\n trimHeadFrames: 1,\n stacktrace: true // if we fall back to captureMessage, default to attempting a new trace\n },\n options\n )\n );\n }\n\n // Get actual Error from ErrorEvent\n if (isErrorEvent(ex)) ex = ex.error;\n\n // Store the raw exception object for potential debugging and introspection\n this._lastCapturedException = ex;\n\n // TraceKit.report will re-raise any exception passed to it,\n // which means you have to wrap it in try/catch. Instead, we\n // can wrap it here and only re-raise if TraceKit.report\n // raises an exception different from the one we asked to\n // report on.\n try {\n var stack = TraceKit.computeStackTrace(ex);\n this._handleStackInfo(stack, options);\n } catch (ex1) {\n if (ex !== ex1) {\n throw ex1;\n }\n }\n\n return this;\n },\n\n /*\n * Manually send a message to Sentry\n *\n * @param {string} msg A plain message to be captured in Sentry\n * @param {object} options A specific set of options for this message [optional]\n * @return {Raven}\n */\n captureMessage: function(msg, options) {\n // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an\n // early call; we'll error on the side of logging anything called before configuration since it's\n // probably something you should see:\n if (\n !!this._globalOptions.ignoreErrors.test &&\n this._globalOptions.ignoreErrors.test(msg)\n ) {\n return;\n }\n\n options = options || {};\n\n var data = objectMerge(\n {\n message: msg + '' // Make sure it's actually a string\n },\n options\n );\n\n var ex;\n // Generate a \"synthetic\" stack trace from this point.\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative\n // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,\n // or if it catches a thrown object without a \"stack\" property.\n try {\n throw new Error(msg);\n } catch (ex1) {\n ex = ex1;\n }\n\n // null exception name so `Error` isn't prefixed to msg\n ex.name = null;\n var stack = TraceKit.computeStackTrace(ex);\n\n // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]\n var initialCall = stack.stack[1];\n\n var fileurl = (initialCall && initialCall.url) || '';\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n if (this._globalOptions.stacktrace || (options && options.stacktrace)) {\n options = objectMerge(\n {\n // fingerprint on msg, not stack trace (legacy behavior, could be\n // revisited)\n fingerprint: msg,\n // since we know this is a synthetic trace, the top N-most frames\n // MUST be from Raven.js, so mark them as in_app later by setting\n // trimHeadFrames\n trimHeadFrames: (options.trimHeadFrames || 0) + 1\n },\n options\n );\n\n var frames = this._prepareFrames(stack, options);\n data.stacktrace = {\n // Sentry expects frames oldest to newest\n frames: frames.reverse()\n };\n }\n\n // Fire away!\n this._send(data);\n\n return this;\n },\n\n captureBreadcrumb: function(obj) {\n var crumb = objectMerge(\n {\n timestamp: now() / 1000\n },\n obj\n );\n\n if (isFunction(this._globalOptions.breadcrumbCallback)) {\n var result = this._globalOptions.breadcrumbCallback(crumb);\n\n if (isObject(result) && !isEmptyObject(result)) {\n crumb = result;\n } else if (result === false) {\n return this;\n }\n }\n\n this._breadcrumbs.push(crumb);\n if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {\n this._breadcrumbs.shift();\n }\n return this;\n },\n\n addPlugin: function(plugin /*arg1, arg2, ... argN*/) {\n var pluginArgs = [].slice.call(arguments, 1);\n\n this._plugins.push([plugin, pluginArgs]);\n if (this._isRavenInstalled) {\n this._drainPlugins();\n }\n\n return this;\n },\n\n /*\n * Set/clear a user to be sent along with the payload.\n *\n * @param {object} user An object representing user data [optional]\n * @return {Raven}\n */\n setUserContext: function(user) {\n // Intentionally do not merge here since that's an unexpected behavior.\n this._globalContext.user = user;\n\n return this;\n },\n\n /*\n * Merge extra attributes to be sent along with the payload.\n *\n * @param {object} extra An object representing extra data [optional]\n * @return {Raven}\n */\n setExtraContext: function(extra) {\n this._mergeContext('extra', extra);\n\n return this;\n },\n\n /*\n * Merge tags to be sent along with the payload.\n *\n * @param {object} tags An object representing tags [optional]\n * @return {Raven}\n */\n setTagsContext: function(tags) {\n this._mergeContext('tags', tags);\n\n return this;\n },\n\n /*\n * Clear all of the context.\n *\n * @return {Raven}\n */\n clearContext: function() {\n this._globalContext = {};\n\n return this;\n },\n\n /*\n * Get a copy of the current context. This cannot be mutated.\n *\n * @return {object} copy of context\n */\n getContext: function() {\n // lol javascript\n return JSON.parse(stringify(this._globalContext));\n },\n\n /*\n * Set environment of application\n *\n * @param {string} environment Typically something like 'production'.\n * @return {Raven}\n */\n setEnvironment: function(environment) {\n this._globalOptions.environment = environment;\n\n return this;\n },\n\n /*\n * Set release version of application\n *\n * @param {string} release Typically something like a git SHA to identify version\n * @return {Raven}\n */\n setRelease: function(release) {\n this._globalOptions.release = release;\n\n return this;\n },\n\n /*\n * Set the dataCallback option\n *\n * @param {function} callback The callback to run which allows the\n * data blob to be mutated before sending\n * @return {Raven}\n */\n setDataCallback: function(callback) {\n var original = this._globalOptions.dataCallback;\n this._globalOptions.dataCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the breadcrumbCallback option\n *\n * @param {function} callback The callback to run which allows filtering\n * or mutating breadcrumbs\n * @return {Raven}\n */\n setBreadcrumbCallback: function(callback) {\n var original = this._globalOptions.breadcrumbCallback;\n this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the shouldSendCallback option\n *\n * @param {function} callback The callback to run which allows\n * introspecting the blob before sending\n * @return {Raven}\n */\n setShouldSendCallback: function(callback) {\n var original = this._globalOptions.shouldSendCallback;\n this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /**\n * Override the default HTTP transport mechanism that transmits data\n * to the Sentry server.\n *\n * @param {function} transport Function invoked instead of the default\n * `makeRequest` handler.\n *\n * @return {Raven}\n */\n setTransport: function(transport) {\n this._globalOptions.transport = transport;\n\n return this;\n },\n\n /*\n * Get the latest raw exception that was captured by Raven.\n *\n * @return {error}\n */\n lastException: function() {\n return this._lastCapturedException;\n },\n\n /*\n * Get the last event id\n *\n * @return {string}\n */\n lastEventId: function() {\n return this._lastEventId;\n },\n\n /*\n * Determine if Raven is setup and ready to go.\n *\n * @return {boolean}\n */\n isSetup: function() {\n if (!this._hasJSON) return false; // needs JSON support\n if (!this._globalServer) {\n if (!this.ravenNotConfiguredError) {\n this.ravenNotConfiguredError = true;\n this._logDebug('error', 'Error: Raven has not been configured.');\n }\n return false;\n }\n return true;\n },\n\n afterLoad: function() {\n // TODO: remove window dependence?\n\n // Attempt to initialize Raven on load\n var RavenConfig = _window.RavenConfig;\n if (RavenConfig) {\n this.config(RavenConfig.dsn, RavenConfig.config).install();\n }\n },\n\n showReportDialog: function(options) {\n if (\n !_document // doesn't work without a document (React native)\n )\n return;\n\n options = options || {};\n\n var lastEventId = options.eventId || this.lastEventId();\n if (!lastEventId) {\n throw new RavenConfigError('Missing eventId');\n }\n\n var dsn = options.dsn || this._dsn;\n if (!dsn) {\n throw new RavenConfigError('Missing DSN');\n }\n\n var encode = encodeURIComponent;\n var qs = '';\n qs += '?eventId=' + encode(lastEventId);\n qs += '&dsn=' + encode(dsn);\n\n var user = options.user || this._globalContext.user;\n if (user) {\n if (user.name) qs += '&name=' + encode(user.name);\n if (user.email) qs += '&email=' + encode(user.email);\n }\n\n var globalServer = this._getGlobalServer(this._parseDSN(dsn));\n\n var script = _document.createElement('script');\n script.async = true;\n script.src = globalServer + '/api/embed/error-page/' + qs;\n (_document.head || _document.body).appendChild(script);\n },\n\n /**** Private functions ****/\n _ignoreNextOnError: function() {\n var self = this;\n this._ignoreOnError += 1;\n setTimeout(function() {\n // onerror should trigger before setTimeout\n self._ignoreOnError -= 1;\n });\n },\n\n _triggerEvent: function(eventType, options) {\n // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it\n var evt, key;\n\n if (!this._hasDocument) return;\n\n options = options || {};\n\n eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);\n\n if (_document.createEvent) {\n evt = _document.createEvent('HTMLEvents');\n evt.initEvent(eventType, true, true);\n } else {\n evt = _document.createEventObject();\n evt.eventType = eventType;\n }\n\n for (key in options)\n if (hasKey(options, key)) {\n evt[key] = options[key];\n }\n\n if (_document.createEvent) {\n // IE9 if standards\n _document.dispatchEvent(evt);\n } else {\n // IE8 regardless of Quirks or Standards\n // IE9 if quirks\n try {\n _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);\n } catch (e) {\n // Do nothing\n }\n }\n },\n\n /**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param evtName the event name (e.g. \"click\")\n * @returns {Function}\n * @private\n */\n _breadcrumbEventHandler: function(evtName) {\n var self = this;\n return function(evt) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n self._keypressTimeout = null;\n\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (self._lastCapturedEvent === evt) return;\n\n self._lastCapturedEvent = evt;\n\n // try/catch both:\n // - accessing evt.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // can throw an exception in some circumstances.\n var target;\n try {\n target = htmlTreeAsString(evt.target);\n } catch (e) {\n target = '<unknown>';\n }\n\n self.captureBreadcrumb({\n category: 'ui.' + evtName, // e.g. ui.click, ui.input\n message: target\n });\n };\n },\n\n /**\n * Wraps addEventListener to capture keypress UI events\n * @returns {Function}\n * @private\n */\n _keypressEventHandler: function() {\n var self = this,\n debounceDuration = 1000; // milliseconds\n\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function(evt) {\n var target;\n try {\n target = evt.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n var tagName = target && target.tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (\n !tagName ||\n (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)\n )\n return;\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n var timeout = self._keypressTimeout;\n if (!timeout) {\n self._breadcrumbEventHandler('input')(evt);\n }\n clearTimeout(timeout);\n self._keypressTimeout = setTimeout(function() {\n self._keypressTimeout = null;\n }, debounceDuration);\n };\n },\n\n /**\n * Captures a breadcrumb of type \"navigation\", normalizing input URLs\n * @param to the originating URL\n * @param from the target URL\n * @private\n */\n _captureUrlChange: function(from, to) {\n var parsedLoc = parseUrl(this._location.href);\n var parsedTo = parseUrl(to);\n var parsedFrom = parseUrl(from);\n\n // because onpopstate only tells you the \"new\" (to) value of location.href, and\n // not the previous (from) value, we need to track the value of the current URL\n // state ourselves\n this._lastHref = to;\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)\n to = parsedTo.relative;\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)\n from = parsedFrom.relative;\n\n this.captureBreadcrumb({\n category: 'navigation',\n data: {\n to: to,\n from: from\n }\n });\n },\n\n /**\n * Wrap timer functions and event targets to catch errors and provide\n * better metadata.\n */\n _instrumentTryCatch: function() {\n var self = this;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapTimeFn(orig) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n var originalCallback = args[0];\n if (isFunction(originalCallback)) {\n args[0] = self.wrap(originalCallback);\n }\n\n // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it\n // also supports only two arguments and doesn't care what this is, so we\n // can just call the original function directly.\n if (orig.apply) {\n return orig.apply(this, args);\n } else {\n return orig(args[0], args[1]);\n }\n };\n }\n\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n function wrapEventTarget(global) {\n var proto = _window[global] && _window[global].prototype;\n if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {\n fill(\n proto,\n 'addEventListener',\n function(orig) {\n return function(evtName, fn, capture, secure) {\n // preserve arity\n try {\n if (fn && fn.handleEvent) {\n fn.handleEvent = self.wrap(fn.handleEvent);\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`\n // so that we don't have more than one wrapper function\n var before, clickHandler, keypressHandler;\n\n if (\n autoBreadcrumbs &&\n autoBreadcrumbs.dom &&\n (global === 'EventTarget' || global === 'Node')\n ) {\n // NOTE: generating multiple handlers per addEventListener invocation, should\n // revisit and verify we can just use one (almost certainly)\n clickHandler = self._breadcrumbEventHandler('click');\n keypressHandler = self._keypressEventHandler();\n before = function(evt) {\n // need to intercept every DOM event in `before` argument, in case that\n // same wrapped method is re-used for different events (e.g. mousemove THEN click)\n // see #724\n if (!evt) return;\n\n var eventType;\n try {\n eventType = evt.type;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n if (eventType === 'click') return clickHandler(evt);\n else if (eventType === 'keypress') return keypressHandler(evt);\n };\n }\n return orig.call(\n this,\n evtName,\n self.wrap(fn, undefined, before),\n capture,\n secure\n );\n };\n },\n wrappedBuiltIns\n );\n fill(\n proto,\n 'removeEventListener',\n function(orig) {\n return function(evt, fn, capture, secure) {\n try {\n fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);\n } catch (e) {\n // ignore, accessing __raven_wrapper__ will throw in some Selenium environments\n }\n return orig.call(this, evt, fn, capture, secure);\n };\n },\n wrappedBuiltIns\n );\n }\n }\n\n fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);\n fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);\n if (_window.requestAnimationFrame) {\n fill(\n _window,\n 'requestAnimationFrame',\n function(orig) {\n return function(cb) {\n return orig(self.wrap(cb));\n };\n },\n wrappedBuiltIns\n );\n }\n\n // event targets borrowed from bugsnag-js:\n // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666\n var eventTargets = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload'\n ];\n for (var i = 0; i < eventTargets.length; i++) {\n wrapEventTarget(eventTargets[i]);\n }\n },\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - XMLHttpRequests\n * - DOM interactions (click/typing)\n * - window.location changes\n * - console\n *\n * Can be disabled or individually configured via the `autoBreadcrumbs` config option\n */\n _instrumentBreadcrumbs: function() {\n var self = this;\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && isFunction(xhr[prop])) {\n fill(xhr, prop, function(orig) {\n return self.wrap(orig);\n }); // intentionally don't track filled methods on XHR instances\n }\n }\n\n if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {\n var xhrproto = XMLHttpRequest.prototype;\n fill(\n xhrproto,\n 'open',\n function(origOpen) {\n return function(method, url) {\n // preserve arity\n\n // if Sentry key appears in URL, don't capture\n if (isString(url) && url.indexOf(self._globalKey) === -1) {\n this.__raven_xhr = {\n method: method,\n url: url,\n status_code: null\n };\n }\n\n return origOpen.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n\n fill(\n xhrproto,\n 'send',\n function(origSend) {\n return function(data) {\n // preserve arity\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__raven_xhr && xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhr.__raven_xhr.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'xhr',\n data: xhr.__raven_xhr\n });\n }\n }\n\n var props = ['onload', 'onerror', 'onprogress'];\n for (var j = 0; j < props.length; j++) {\n wrapProp(props[j], xhr);\n }\n\n if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {\n fill(\n xhr,\n 'onreadystatechange',\n function(orig) {\n return self.wrap(orig, undefined, onreadystatechangeHandler);\n } /* intentionally don't track this instrumentation */\n );\n } else {\n // if onreadystatechange wasn't actually set by the page on this xhr, we\n // are free to set our own and capture the breadcrumb\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n\n return origSend.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n }\n\n if (autoBreadcrumbs.xhr && 'fetch' in _window) {\n fill(\n _window,\n 'fetch',\n function(origFetch) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n\n var fetchInput = args[0];\n var method = 'GET';\n var url;\n\n if (typeof fetchInput === 'string') {\n url = fetchInput;\n } else if ('Request' in _window && fetchInput instanceof _window.Request) {\n url = fetchInput.url;\n if (fetchInput.method) {\n method = fetchInput.method;\n }\n } else {\n url = '' + fetchInput;\n }\n\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n\n var fetchData = {\n method: method,\n url: url,\n status_code: null\n };\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'fetch',\n data: fetchData\n });\n\n return origFetch.apply(this, args).then(function(response) {\n fetchData.status_code = response.status;\n\n return response;\n });\n };\n },\n wrappedBuiltIns\n );\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n if (autoBreadcrumbs.dom && this._hasDocument) {\n if (_document.addEventListener) {\n _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);\n _document.addEventListener('keypress', self._keypressEventHandler(), false);\n } else {\n // IE8 Compatibility\n _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));\n _document.attachEvent('onkeypress', self._keypressEventHandler());\n }\n }\n\n // record navigation (URL) changes\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var chrome = _window.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n var hasPushAndReplaceState =\n !isChromePackagedApp &&\n _window.history &&\n history.pushState &&\n history.replaceState;\n if (autoBreadcrumbs.location && hasPushAndReplaceState) {\n // TODO: remove onpopstate handler on uninstall()\n var oldOnPopState = _window.onpopstate;\n _window.onpopstate = function() {\n var currentHref = self._location.href;\n self._captureUrlChange(self._lastHref, currentHref);\n\n if (oldOnPopState) {\n return oldOnPopState.apply(this, arguments);\n }\n };\n\n var historyReplacementFunction = function(origHistFunction) {\n // note history.pushState.length is 0; intentionally not declaring\n // params to preserve 0 arity\n return function(/* state, title, url */) {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n\n // url argument is optional\n if (url) {\n // coerce to string (this is what pushState does)\n self._captureUrlChange(self._lastHref, url + '');\n }\n\n return origHistFunction.apply(this, arguments);\n };\n };\n\n fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);\n fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);\n }\n\n if (autoBreadcrumbs.console && 'console' in _window && console.log) {\n // console\n var consoleMethodCallback = function(msg, data) {\n self.captureBreadcrumb({\n message: msg,\n level: data.level,\n category: 'console'\n });\n };\n\n each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {\n wrapConsoleMethod(console, level, consoleMethodCallback);\n });\n }\n },\n\n _restoreBuiltIns: function() {\n // restore any wrapped builtins\n var builtin;\n while (this._wrappedBuiltIns.length) {\n builtin = this._wrappedBuiltIns.shift();\n\n var obj = builtin[0],\n name = builtin[1],\n orig = builtin[2];\n\n obj[name] = orig;\n }\n },\n\n _drainPlugins: function() {\n var self = this;\n\n // FIX ME TODO\n each(this._plugins, function(_, plugin) {\n var installer = plugin[0];\n var args = plugin[1];\n installer.apply(self, [self].concat(args));\n });\n },\n\n _parseDSN: function(str) {\n var m = dsnPattern.exec(str),\n dsn = {},\n i = 7;\n\n try {\n while (i--) dsn[dsnKeys[i]] = m[i] || '';\n } catch (e) {\n throw new RavenConfigError('Invalid DSN: ' + str);\n }\n\n if (dsn.pass && !this._globalOptions.allowSecretKey) {\n throw new RavenConfigError(\n 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'\n );\n }\n\n return dsn;\n },\n\n _getGlobalServer: function(uri) {\n // assemble the endpoint from the uri pieces\n var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');\n\n if (uri.protocol) {\n globalServer = uri.protocol + ':' + globalServer;\n }\n return globalServer;\n },\n\n _handleOnErrorStackInfo: function() {\n // if we are intentionally ignoring errors via onerror, bail out\n if (!this._ignoreOnError) {\n this._handleStackInfo.apply(this, arguments);\n }\n },\n\n _handleStackInfo: function(stackInfo, options) {\n var frames = this._prepareFrames(stackInfo, options);\n\n this._triggerEvent('handle', {\n stackInfo: stackInfo,\n options: options\n });\n\n this._processException(\n stackInfo.name,\n stackInfo.message,\n stackInfo.url,\n stackInfo.lineno,\n frames,\n options\n );\n },\n\n _prepareFrames: function(stackInfo, options) {\n var self = this;\n var frames = [];\n if (stackInfo.stack && stackInfo.stack.length) {\n each(stackInfo.stack, function(i, stack) {\n var frame = self._normalizeFrame(stack, stackInfo.url);\n if (frame) {\n frames.push(frame);\n }\n });\n\n // e.g. frames captured via captureMessage throw\n if (options && options.trimHeadFrames) {\n for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {\n frames[j].in_app = false;\n }\n }\n }\n frames = frames.slice(0, this._globalOptions.stackTraceLimit);\n return frames;\n },\n\n _normalizeFrame: function(frame, stackInfoUrl) {\n // normalize the frames data\n var normalized = {\n filename: frame.url,\n lineno: frame.line,\n colno: frame.column,\n function: frame.func || '?'\n };\n\n // Case when we don't have any information about the error\n // E.g. throwing a string or raw object, instead of an `Error` in Firefox\n // Generating synthetic error doesn't add any value here\n //\n // We should probably somehow let a user know that they should fix their code\n if (!frame.url) {\n normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler\n }\n\n normalized.in_app = !// determine if an exception came from outside of our app\n // first we check the global includePaths list.\n (\n (!!this._globalOptions.includePaths.test &&\n !this._globalOptions.includePaths.test(normalized.filename)) ||\n // Now we check for fun, if the function name is Raven or TraceKit\n /(Raven|TraceKit)\\./.test(normalized['function']) ||\n // finally, we do a last ditch effort and check for raven.min.js\n /raven\\.(min\\.)?js$/.test(normalized.filename)\n );\n\n return normalized;\n },\n\n _processException: function(type, message, fileurl, lineno, frames, options) {\n var prefixedMessage = (type ? type + ': ' : '') + (message || '');\n if (\n !!this._globalOptions.ignoreErrors.test &&\n (this._globalOptions.ignoreErrors.test(message) ||\n this._globalOptions.ignoreErrors.test(prefixedMessage))\n ) {\n return;\n }\n\n var stacktrace;\n\n if (frames && frames.length) {\n fileurl = frames[0].filename || fileurl;\n // Sentry expects frames oldest to newest\n // and JS sends them as newest to oldest\n frames.reverse();\n stacktrace = {frames: frames};\n } else if (fileurl) {\n stacktrace = {\n frames: [\n {\n filename: fileurl,\n lineno: lineno,\n in_app: true\n }\n ]\n };\n }\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n var data = objectMerge(\n {\n // sentry.interfaces.Exception\n exception: {\n values: [\n {\n type: type,\n value: message,\n stacktrace: stacktrace\n }\n ]\n },\n culprit: fileurl\n },\n options\n );\n\n // Fire away!\n this._send(data);\n },\n\n _trimPacket: function(data) {\n // For now, we only want to truncate the two different messages\n // but this could/should be expanded to just trim everything\n var max = this._globalOptions.maxMessageLength;\n if (data.message) {\n data.message = truncate(data.message, max);\n }\n if (data.exception) {\n var exception = data.exception.values[0];\n exception.value = truncate(exception.value, max);\n }\n\n var request = data.request;\n if (request) {\n if (request.url) {\n request.url = truncate(request.url, this._globalOptions.maxUrlLength);\n }\n if (request.Referer) {\n request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);\n }\n }\n\n if (data.breadcrumbs && data.breadcrumbs.values)\n this._trimBreadcrumbs(data.breadcrumbs);\n\n return data;\n },\n\n /**\n * Truncate breadcrumb values (right now just URLs)\n */\n _trimBreadcrumbs: function(breadcrumbs) {\n // known breadcrumb properties with urls\n // TODO: also consider arbitrary prop values that start with (https?)?://\n var urlProps = ['to', 'from', 'url'],\n urlProp,\n crumb,\n data;\n\n for (var i = 0; i < breadcrumbs.values.length; ++i) {\n crumb = breadcrumbs.values[i];\n if (\n !crumb.hasOwnProperty('data') ||\n !isObject(crumb.data) ||\n objectFrozen(crumb.data)\n )\n continue;\n\n data = objectMerge({}, crumb.data);\n for (var j = 0; j < urlProps.length; ++j) {\n urlProp = urlProps[j];\n if (data.hasOwnProperty(urlProp) && data[urlProp]) {\n data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);\n }\n }\n breadcrumbs.values[i].data = data;\n }\n },\n\n _getHttpData: function() {\n if (!this._hasNavigator && !this._hasDocument) return;\n var httpData = {};\n\n if (this._hasNavigator && _navigator.userAgent) {\n httpData.headers = {\n 'User-Agent': navigator.userAgent\n };\n }\n\n if (this._hasDocument) {\n if (_document.location && _document.location.href) {\n httpData.url = _document.location.href;\n }\n if (_document.referrer) {\n if (!httpData.headers) httpData.headers = {};\n httpData.headers.Referer = _document.referrer;\n }\n }\n\n return httpData;\n },\n\n _resetBackoff: function() {\n this._backoffDuration = 0;\n this._backoffStart = null;\n },\n\n _shouldBackoff: function() {\n return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;\n },\n\n /**\n * Returns true if the in-process data payload matches the signature\n * of the previously-sent data\n *\n * NOTE: This has to be done at this level because TraceKit can generate\n * data from window.onerror WITHOUT an exception object (IE8, IE9,\n * other old browsers). This can take the form of an \"exception\"\n * data object with a single frame (derived from the onerror args).\n */\n _isRepeatData: function(current) {\n var last = this._lastData;\n\n if (\n !last ||\n current.message !== last.message || // defined for captureMessage\n current.culprit !== last.culprit // defined for captureException/onerror\n )\n return false;\n\n // Stacktrace interface (i.e. from captureMessage)\n if (current.stacktrace || last.stacktrace) {\n return isSameStacktrace(current.stacktrace, last.stacktrace);\n } else if (current.exception || last.exception) {\n // Exception interface (i.e. from captureException/onerror)\n return isSameException(current.exception, last.exception);\n }\n\n return true;\n },\n\n _setBackoffState: function(request) {\n // If we are already in a backoff state, don't change anything\n if (this._shouldBackoff()) {\n return;\n }\n\n var status = request.status;\n\n // 400 - project_id doesn't exist or some other fatal\n // 401 - invalid/revoked dsn\n // 429 - too many requests\n if (!(status === 400 || status === 401 || status === 429)) return;\n\n var retry;\n try {\n // If Retry-After is not in Access-Control-Expose-Headers, most\n // browsers will throw an exception trying to access it\n retry = request.getResponseHeader('Retry-After');\n retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds\n } catch (e) {\n /* eslint no-empty:0 */\n }\n\n this._backoffDuration = retry\n ? // If Sentry server returned a Retry-After value, use it\n retry\n : // Otherwise, double the last backoff duration (starts at 1 sec)\n this._backoffDuration * 2 || 1000;\n\n this._backoffStart = now();\n },\n\n _send: function(data) {\n var globalOptions = this._globalOptions;\n\n var baseData = {\n project: this._globalProject,\n logger: globalOptions.logger,\n platform: 'javascript'\n },\n httpData = this._getHttpData();\n\n if (httpData) {\n baseData.request = httpData;\n }\n\n // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload\n if (data.trimHeadFrames) delete data.trimHeadFrames;\n\n data = objectMerge(baseData, data);\n\n // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge\n data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);\n data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);\n\n // Send along our own collected metadata with extra\n data.extra['session:duration'] = now() - this._startTime;\n\n if (this._breadcrumbs && this._breadcrumbs.length > 0) {\n // intentionally make shallow copy so that additions\n // to breadcrumbs aren't accidentally sent in this request\n data.breadcrumbs = {\n values: [].slice.call(this._breadcrumbs, 0)\n };\n }\n\n // If there are no tags/extra, strip the key from the payload alltogther.\n if (isEmptyObject(data.tags)) delete data.tags;\n\n if (this._globalContext.user) {\n // sentry.interfaces.User\n data.user = this._globalContext.user;\n }\n\n // Include the environment if it's defined in globalOptions\n if (globalOptions.environment) data.environment = globalOptions.environment;\n\n // Include the release if it's defined in globalOptions\n if (globalOptions.release) data.release = globalOptions.release;\n\n // Include server_name if it's defined in globalOptions\n if (globalOptions.serverName) data.server_name = globalOptions.serverName;\n\n if (isFunction(globalOptions.dataCallback)) {\n data = globalOptions.dataCallback(data) || data;\n }\n\n // Why??????????\n if (!data || isEmptyObject(data)) {\n return;\n }\n\n // Check if the request should be filtered or not\n if (\n isFunction(globalOptions.shouldSendCallback) &&\n !globalOptions.shouldSendCallback(data)\n ) {\n return;\n }\n\n // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),\n // so drop requests until \"cool-off\" period has elapsed.\n if (this._shouldBackoff()) {\n this._logDebug('warn', 'Raven dropped error due to backoff: ', data);\n return;\n }\n\n if (typeof globalOptions.sampleRate === 'number') {\n if (Math.random() < globalOptions.sampleRate) {\n this._sendProcessedPayload(data);\n }\n } else {\n this._sendProcessedPayload(data);\n }\n },\n\n _getUuid: function() {\n return uuid4();\n },\n\n _sendProcessedPayload: function(data, callback) {\n var self = this;\n var globalOptions = this._globalOptions;\n\n if (!this.isSetup()) return;\n\n // Try and clean up the packet before sending by truncating long values\n data = this._trimPacket(data);\n\n // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,\n // but this would require copying an un-truncated copy of the data packet, which can be\n // arbitrarily deep (extra_data) -- could be worthwhile? will revisit\n if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {\n this._logDebug('warn', 'Raven dropped repeat event: ', data);\n return;\n }\n\n // Send along an event_id if not explicitly passed.\n // This event_id can be used to reference the error within Sentry itself.\n // Set lastEventId after we know the error should actually be sent\n this._lastEventId = data.event_id || (data.event_id = this._getUuid());\n\n // Store outbound payload after trim\n this._lastData = data;\n\n this._logDebug('debug', 'Raven about to send:', data);\n\n var auth = {\n sentry_version: '7',\n sentry_client: 'raven-js/' + this.VERSION,\n sentry_key: this._globalKey\n };\n\n if (this._globalSecret) {\n auth.sentry_secret = this._globalSecret;\n }\n\n var exception = data.exception && data.exception.values[0];\n this.captureBreadcrumb({\n category: 'sentry',\n message: exception\n ? (exception.type ? exception.type + ': ' : '') + exception.value\n : data.message,\n event_id: data.event_id,\n level: data.level || 'error' // presume error unless specified\n });\n\n var url = this._globalEndpoint;\n (globalOptions.transport || this._makeRequest).call(this, {\n url: url,\n auth: auth,\n data: data,\n options: globalOptions,\n onSuccess: function success() {\n self._resetBackoff();\n\n self._triggerEvent('success', {\n data: data,\n src: url\n });\n callback && callback();\n },\n onError: function failure(error) {\n self._logDebug('error', 'Raven transport failed to send: ', error);\n\n if (error.request) {\n self._setBackoffState(error.request);\n }\n\n self._triggerEvent('failure', {\n data: data,\n src: url\n });\n error = error || new Error('Raven send failed (no additional details provided)');\n callback && callback(error);\n }\n });\n },\n\n _makeRequest: function(opts) {\n var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();\n if (!request) return;\n\n // if browser doesn't support CORS (e.g. IE7), we are out of luck\n var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';\n\n if (!hasCORS) return;\n\n var url = opts.url;\n\n if ('withCredentials' in request) {\n request.onreadystatechange = function() {\n if (request.readyState !== 4) {\n return;\n } else if (request.status === 200) {\n opts.onSuccess && opts.onSuccess();\n } else if (opts.onError) {\n var err = new Error('Sentry error code: ' + request.status);\n err.request = request;\n opts.onError(err);\n }\n };\n } else {\n request = new XDomainRequest();\n // xdomainrequest cannot go http -> https (or vice versa),\n // so always use protocol relative\n url = url.replace(/^https?:/, '');\n\n // onreadystatechange not supported by XDomainRequest\n if (opts.onSuccess) {\n request.onload = opts.onSuccess;\n }\n if (opts.onError) {\n request.onerror = function() {\n var err = new Error('Sentry error code: XDomainRequest');\n err.request = request;\n opts.onError(err);\n };\n }\n }\n\n // NOTE: auth is intentionally sent as part of query string (NOT as custom\n // HTTP header) so as to avoid preflight CORS requests\n request.open('POST', url + '?' + urlencode(opts.auth));\n request.send(stringify(opts.data));\n },\n\n _logDebug: function(level) {\n if (this._originalConsoleMethods[level] && this.debug) {\n // In IE<10 console methods do not have their own 'apply' method\n Function.prototype.apply.call(\n this._originalConsoleMethods[level],\n this._originalConsole,\n [].slice.call(arguments, 1)\n );\n }\n },\n\n _mergeContext: function(key, context) {\n if (isUndefined(context)) {\n delete this._globalContext[key];\n } else {\n this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);\n }\n }\n};\n\n// Deprecations\nRaven.prototype.setUser = Raven.prototype.setUserContext;\nRaven.prototype.setReleaseContext = Raven.prototype.setRelease;\n\nmodule.exports = Raven;\n","var utils = require('../../src/utils');\n\n/*\n TraceKit - Cross brower stack traces\n\n This was originally forked from github.com/occ/TraceKit, but has since been\n largely re-written and is now maintained as part of raven-js. Tests for\n this are in test/vendor.\n\n MIT license\n*/\n\nvar TraceKit = {\n collectWindowErrors: true,\n debug: false\n};\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n// global reference to slice\nvar _slice = [].slice;\nvar UNKNOWN_FUNCTION = '?';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;\n\nfunction getLocationHref() {\n if (typeof document === 'undefined' || document.location == null) return '';\n\n return document.location.href;\n}\n\n/**\n * TraceKit.report: cross-browser processing of unhandled exceptions\n *\n * Syntax:\n * TraceKit.report.subscribe(function(stackInfo) { ... })\n * TraceKit.report.unsubscribe(function(stackInfo) { ... })\n * TraceKit.report(exception)\n * try { ...code... } catch(ex) { TraceKit.report(ex); }\n *\n * Supports:\n * - Firefox: full stack trace with line numbers, plus column number\n * on top frame; column number is not guaranteed\n * - Opera: full stack trace with line and column numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n * - IE: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n *\n * In theory, TraceKit should work on all of the following versions:\n * - IE5.5+ (only 8.0 tested)\n * - Firefox 0.9+ (only 3.5+ tested)\n * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require\n * Exceptions Have Stacktrace to be enabled in opera:config)\n * - Safari 3+ (only 4+ tested)\n * - Chrome 1+ (only 5+ tested)\n * - Konqueror 3.5+ (untested)\n *\n * Requires TraceKit.computeStackTrace.\n *\n * Tries to catch all unhandled exceptions and report them to the\n * subscribed handlers. Please note that TraceKit.report will rethrow the\n * exception. This is REQUIRED in order to get a useful stack trace in IE.\n * If the exception does not reach the top of the browser, you will only\n * get a stack trace from the point where TraceKit.report was called.\n *\n * Handlers receive a stackInfo object as described in the\n * TraceKit.computeStackTrace docs.\n */\nTraceKit.report = (function reportModuleWrapper() {\n var handlers = [],\n lastArgs = null,\n lastException = null,\n lastExceptionStack = null;\n\n /**\n * Add a crash handler.\n * @param {Function} handler\n */\n function subscribe(handler) {\n installGlobalHandler();\n handlers.push(handler);\n }\n\n /**\n * Remove a crash handler.\n * @param {Function} handler\n */\n function unsubscribe(handler) {\n for (var i = handlers.length - 1; i >= 0; --i) {\n if (handlers[i] === handler) {\n handlers.splice(i, 1);\n }\n }\n }\n\n /**\n * Remove all crash handlers.\n */\n function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }\n\n /**\n * Dispatch stack information to all handlers.\n * @param {Object.<string, *>} stack\n */\n function notifyHandlers(stack, isWindowError) {\n var exception = null;\n if (isWindowError && !TraceKit.collectWindowErrors) {\n return;\n }\n for (var i in handlers) {\n if (handlers.hasOwnProperty(i)) {\n try {\n handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));\n } catch (inner) {\n exception = inner;\n }\n }\n }\n\n if (exception) {\n throw exception;\n }\n }\n\n var _oldOnerrorHandler, _onErrorHandlerInstalled;\n\n /**\n * Ensures all global unhandled exceptions are recorded.\n * Supported by Gecko and IE.\n * @param {string} message Error message.\n * @param {string} url URL of script that generated the exception.\n * @param {(number|string)} lineNo The line number at which the error\n * occurred.\n * @param {?(number|string)} colNo The column number at which the error\n * occurred.\n * @param {?Error} ex The actual Error object.\n */\n function traceKitWindowOnError(message, url, lineNo, colNo, ex) {\n var stack = null;\n\n if (lastExceptionStack) {\n TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(\n lastExceptionStack,\n url,\n lineNo,\n message\n );\n processLastException();\n } else if (ex && utils.isError(ex)) {\n // non-string `ex` arg; attempt to extract stack trace\n\n // New chrome and blink send along a real error object\n // Let's just report that like a normal error.\n // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror\n stack = TraceKit.computeStackTrace(ex);\n notifyHandlers(stack, true);\n } else {\n var location = {\n url: url,\n line: lineNo,\n column: colNo\n };\n\n var name = undefined;\n var msg = message; // must be new var or will modify original `arguments`\n var groups;\n if ({}.toString.call(message) === '[object String]') {\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n msg = groups[2];\n }\n }\n\n location.func = UNKNOWN_FUNCTION;\n\n stack = {\n name: name,\n message: msg,\n url: getLocationHref(),\n stack: [location]\n };\n notifyHandlers(stack, true);\n }\n\n if (_oldOnerrorHandler) {\n return _oldOnerrorHandler.apply(this, arguments);\n }\n\n return false;\n }\n\n function installGlobalHandler() {\n if (_onErrorHandlerInstalled) {\n return;\n }\n _oldOnerrorHandler = _window.onerror;\n _window.onerror = traceKitWindowOnError;\n _onErrorHandlerInstalled = true;\n }\n\n function uninstallGlobalHandler() {\n if (!_onErrorHandlerInstalled) {\n return;\n }\n _window.onerror = _oldOnerrorHandler;\n _onErrorHandlerInstalled = false;\n _oldOnerrorHandler = undefined;\n }\n\n function processLastException() {\n var _lastExceptionStack = lastExceptionStack,\n _lastArgs = lastArgs;\n lastArgs = null;\n lastExceptionStack = null;\n lastException = null;\n notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));\n }\n\n /**\n * Reports an unhandled Error to TraceKit.\n * @param {Error} ex\n * @param {?boolean} rethrow If false, do not re-throw the exception.\n * Only used for window.onerror to not cause an infinite loop of\n * rethrowing.\n */\n function report(ex, rethrow) {\n var args = _slice.call(arguments, 1);\n if (lastExceptionStack) {\n if (lastException === ex) {\n return; // already caught by an inner catch block, ignore\n } else {\n processLastException();\n }\n }\n\n var stack = TraceKit.computeStackTrace(ex);\n lastExceptionStack = stack;\n lastException = ex;\n lastArgs = args;\n\n // If the stack trace is incomplete, wait for 2 seconds for\n // slow slow IE to see if onerror occurs or not before reporting\n // this exception; otherwise, we will end up with an incomplete\n // stack trace\n setTimeout(function() {\n if (lastException === ex) {\n processLastException();\n }\n }, stack.incomplete ? 2000 : 0);\n\n if (rethrow !== false) {\n throw ex; // re-throw to propagate to the top level (and cause window.onerror)\n }\n }\n\n report.subscribe = subscribe;\n report.unsubscribe = unsubscribe;\n report.uninstall = unsubscribeAll;\n return report;\n})();\n\n/**\n * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript\n *\n * Syntax:\n * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)\n * Returns:\n * s.name - exception name\n * s.message - exception message\n * s.stack[i].url - JavaScript or HTML file URL\n * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)\n * s.stack[i].args - arguments passed to the function, if known\n * s.stack[i].line - line number, if known\n * s.stack[i].column - column number, if known\n *\n * Supports:\n * - Firefox: full stack trace with line numbers and unreliable column\n * number on top frame\n * - Opera 10: full stack trace with line and column numbers\n * - Opera 9-: full stack trace with line numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the topmost stacktrace element\n * only\n * - IE: no line numbers whatsoever\n *\n * Tries to guess names of anonymous functions by looking for assignments\n * in the source code. In IE and Safari, we have to guess source file names\n * by searching for function bodies inside all page scripts. This will not\n * work for scripts that are loaded cross-domain.\n * Here be dragons: some function names may be guessed incorrectly, and\n * duplicate functions may be mismatched.\n *\n * TraceKit.computeStackTrace should only be used for tracing purposes.\n * Logging of unhandled exceptions should be done with TraceKit.report,\n * which builds on top of TraceKit.computeStackTrace and provides better\n * IE support by utilizing the window.onerror event to retrieve information\n * about the top of the stack.\n *\n * Note: In IE and Safari, no stack trace is recorded on the Error object,\n * so computeStackTrace instead walks its *own* chain of callers.\n * This means that:\n * * in Safari, some methods may be missing from the stack trace;\n * * in IE, the topmost function in the stack trace will always be the\n * caller of computeStackTrace.\n *\n * This is okay for tracing (because you are likely to be calling\n * computeStackTrace from the function you want to be the topmost element\n * of the stack trace anyway), but not okay for logging unhandled\n * exceptions (because your catch block will likely be far away from the\n * inner function that actually caused the exception).\n *\n */\nTraceKit.computeStackTrace = (function computeStackTraceWrapper() {\n // Contents of Exception in various browsers.\n //\n // SAFARI:\n // ex.message = Can't find variable: qq\n // ex.line = 59\n // ex.sourceId = 580238192\n // ex.sourceURL = http://...\n // ex.expressionBeginOffset = 96\n // ex.expressionCaretOffset = 98\n // ex.expressionEndOffset = 98\n // ex.name = ReferenceError\n //\n // FIREFOX:\n // ex.message = qq is not defined\n // ex.fileName = http://...\n // ex.lineNumber = 59\n // ex.columnNumber = 69\n // ex.stack = ...stack trace... (see the example below)\n // ex.name = ReferenceError\n //\n // CHROME:\n // ex.message = qq is not defined\n // ex.name = ReferenceError\n // ex.type = not_defined\n // ex.arguments = ['aa']\n // ex.stack = ...stack trace...\n //\n // INTERNET EXPLORER:\n // ex.message = ...\n // ex.name = ReferenceError\n //\n // OPERA:\n // ex.message = ...message... (see the example below)\n // ex.name = ReferenceError\n // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)\n // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'\n\n /**\n * Computes stack trace information from the stack property.\n * Chrome and Gecko use this property.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceFromStackProp(ex) {\n if (typeof ex.stack === 'undefined' || !ex.stack) return;\n\n var chrome = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,\n gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i,\n winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i,\n // Used to additionally parse URL/line/column from eval frames\n geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i,\n chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/,\n lines = ex.stack.split('\\n'),\n stack = [],\n submatch,\n parts,\n element,\n reference = /^(.*) is undefined$/.exec(ex.message);\n\n for (var i = 0, j = lines.length; i < j; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n url: !isNative ? parts[2] : null,\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = null; // no column when eval\n } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n }\n\n /**\n * Adds information about the first frame to incomplete stack traces.\n * Safari and IE require this to get complete data on the first frame.\n * @param {Object.<string, *>} stackInfo Stack trace information from\n * one of the compute* methods.\n * @param {string} url The URL of the script that caused an error.\n * @param {(number|string)} lineNo The line number of the script that\n * caused an error.\n * @param {string=} message The error generated by the browser, which\n * hopefully contains the name of the object that caused the error.\n * @return {boolean} Whether or not the stack information was\n * augmented.\n */\n function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {\n var initial = {\n url: url,\n line: lineNo\n };\n\n if (initial.url && initial.line) {\n stackInfo.incomplete = false;\n\n if (!initial.func) {\n initial.func = UNKNOWN_FUNCTION;\n }\n\n if (stackInfo.stack.length > 0) {\n if (stackInfo.stack[0].url === initial.url) {\n if (stackInfo.stack[0].line === initial.line) {\n return false; // already in stack trace\n } else if (\n !stackInfo.stack[0].line &&\n stackInfo.stack[0].func === initial.func\n ) {\n stackInfo.stack[0].line = initial.line;\n return false;\n }\n }\n }\n\n stackInfo.stack.unshift(initial);\n stackInfo.partial = true;\n return true;\n } else {\n stackInfo.incomplete = true;\n }\n\n return false;\n }\n\n /**\n * Computes stack trace information by walking the arguments.caller\n * chain at the time the exception occurred. This will cause earlier\n * frames to be missed but is the only way to get any stack trace in\n * Safari and IE. The top frame is restored by\n * {@link augmentStackTraceWithInitialElement}.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceByWalkingCallerChain(ex, depth) {\n var functionName = /function\\s+([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*)?\\s*\\(/i,\n stack = [],\n funcs = {},\n recursion = false,\n parts,\n item,\n source;\n\n for (\n var curr = computeStackTraceByWalkingCallerChain.caller;\n curr && !recursion;\n curr = curr.caller\n ) {\n if (curr === computeStackTrace || curr === TraceKit.report) {\n // console.log('skipping internal function');\n continue;\n }\n\n item = {\n url: null,\n func: UNKNOWN_FUNCTION,\n line: null,\n column: null\n };\n\n if (curr.name) {\n item.func = curr.name;\n } else if ((parts = functionName.exec(curr.toString()))) {\n item.func = parts[1];\n }\n\n if (typeof item.func === 'undefined') {\n try {\n item.func = parts.input.substring(0, parts.input.indexOf('{'));\n } catch (e) {}\n }\n\n if (funcs['' + curr]) {\n recursion = true;\n } else {\n funcs['' + curr] = true;\n }\n\n stack.push(item);\n }\n\n if (depth) {\n // console.log('depth is ' + depth);\n // console.log('stack is ' + stack.length);\n stack.splice(0, depth);\n }\n\n var result = {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n augmentStackTraceWithInitialElement(\n result,\n ex.sourceURL || ex.fileName,\n ex.line || ex.lineNumber,\n ex.message || ex.description\n );\n return result;\n }\n\n /**\n * Computes a stack trace for an exception.\n * @param {Error} ex\n * @param {(string|number)=} depth\n */\n function computeStackTrace(ex, depth) {\n var stack = null;\n depth = depth == null ? 0 : +depth;\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n\n try {\n stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref()\n };\n }\n\n computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;\n computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;\n\n return computeStackTrace;\n})();\n\nmodule.exports = TraceKit;\n","/*\n json-stringify-safe\n Like JSON.stringify, but doesn't throw on circular references.\n\n Originally forked from https://github.com/isaacs/json-stringify-safe\n version 5.0.1 on 3/8/2017 and modified to handle Errors serialization\n and IE8 compatibility. Tests for this are in test/vendor.\n\n ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE\n*/\n\nexports = module.exports = stringify;\nexports.getSerialize = serializer;\n\nfunction indexOf(haystack, needle) {\n for (var i = 0; i < haystack.length; ++i) {\n if (haystack[i] === needle) return i;\n }\n return -1;\n}\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);\n}\n\n// https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106\nfunction stringifyError(value) {\n var err = {\n // These properties are implemented as magical getters and don't show up in for in\n stack: value.stack,\n message: value.message,\n name: value.name\n };\n\n for (var i in value) {\n if (Object.prototype.hasOwnProperty.call(value, i)) {\n err[i] = value[i];\n }\n }\n\n return err;\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [];\n var keys = [];\n\n if (cycleReplacer == null) {\n cycleReplacer = function(key, value) {\n if (stack[0] === value) {\n return '[Circular ~]';\n }\n return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';\n };\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = indexOf(stack, this);\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\n\n if (~indexOf(stack, value)) {\n value = cycleReplacer.call(this, key, value);\n }\n } else {\n stack.push(value);\n }\n\n return replacer == null\n ? value instanceof Error ? stringifyError(value) : value\n : replacer.call(this, key, value);\n };\n}\n","function RavenConfigError(message) {\n this.name = 'RavenConfigError';\n this.message = message;\n}\nRavenConfigError.prototype = new Error();\nRavenConfigError.prototype.constructor = RavenConfigError;\n\nmodule.exports = RavenConfigError;\n","var wrapMethod = function(console, level, callback) {\n var originalConsoleLevel = console[level];\n var originalConsole = console;\n\n if (!(level in console)) {\n return;\n }\n\n var sentryLevel = level === 'warn' ? 'warning' : level;\n\n console[level] = function() {\n var args = [].slice.call(arguments);\n\n var msg = '' + args.join(' ');\n var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};\n\n if (level === 'assert') {\n if (args[0] === false) {\n // Default browsers message\n msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');\n data.extra.arguments = args.slice(1);\n callback && callback(msg, data);\n }\n } else {\n callback && callback(msg, data);\n }\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n // IE9 doesn't allow calling apply on console functions directly\n // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193\n Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);\n }\n };\n};\n\nmodule.exports = {\n wrapMethod: wrapMethod\n};\n","const {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n leadinPluginVersion,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n} = window.leadinConfig;\n\nconst i18n = window.leadinI18n;\n\nexport {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n i18n,\n leadinPluginVersion,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n};\n","import Raven from 'raven-js';\nimport {\n env,\n phpVersion,\n wpVersion,\n leadinPluginVersion,\n portalId,\n plugins,\n} from '../constants/leadinConfig';\n\nexport function configureRaven() {\n if (env !== 'prod') {\n return;\n }\n\n Raven.config(\n 'https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1',\n {\n instrument: {\n tryCatch: false,\n },\n }\n ).install();\n\n Raven.setTagsContext({\n leadin: leadinPluginVersion,\n php: phpVersion,\n wordpress: wpVersion,\n });\n\n Raven.setUserContext({\n hub: portalId,\n plugins: Object.keys(plugins)\n .map(name => `${name}#${plugins[name].Version}`)\n .join(','),\n });\n}\n\nexport default Raven;\n","import { hubspotBaseUrl, portalId, i18n } from './constants/leadinConfig';\n\nfunction addMenuItem(text, href) {\n jQuery('#toplevel_page_leadin')\n .find('li')\n .last()\n .before(`<li><a href=\"${href}\" target=\"_blank\">${text}</a></li>`);\n}\n\nexport function addExternalLinks() {\n const chatflowsUrl = `${hubspotBaseUrl}/chatflows/${portalId}`;\n const emailUrl = `${hubspotBaseUrl}/email/${portalId}`;\n addMenuItem(i18n.chatflows, chatflowsUrl);\n addMenuItem(i18n.email, emailUrl);\n}\n","export function log(...args) {\n try {\n if (window.localStorage.LEADIN_DEBUG) {\n args.unshift('[Leadin]');\n console.log(...args);\n }\n } catch (e) {\n //\n }\n}\n","export const domElements = {\n iframe: '#leadin-iframe',\n spaNavigationButtons:\n '.toplevel_page_leadin > a, a[href=\"admin.php?page=leadin_forms\"], a[href=\"admin.php?page=leadin_settings\"]',\n subMenuButtons: '.toplevel_page_leadin > ul > li',\n};\n","import EventBus from './EventBus';\nimport { log } from '../utils';\nimport { domElements } from '../constants/selectors';\nimport { hubspotBaseUrl } from '../constants/leadinConfig';\nimport Raven from './Raven';\n\nconst eventBus = new EventBus();\nconst callbacks = [];\n\nfunction postMessageObject(message) {\n log('Posting message');\n log(JSON.stringify(message));\n jQuery(domElements.iframe)[0].contentWindow.postMessage(\n JSON.stringify(message),\n hubspotBaseUrl\n );\n}\n\nfunction reply(message, response) {\n if (!response) {\n response = 'Message Received';\n }\n const newMessage = Object.assign({}, message);\n newMessage.response = response;\n postMessageObject(newMessage);\n}\n\nfunction handleResponse(message) {\n callbacks[message._callbackId - 1](message.response);\n}\n\nfunction handleMessage(message) {\n log('Received message');\n log(JSON.stringify(message));\n\n if (message.response && message._callbackId) {\n handleResponse(message);\n } else {\n Object.keys(message).forEach(key => {\n eventBus.trigger(key, [message[key], reply.bind(null, message)]);\n });\n }\n}\n\nfunction handleMessageEvent(event) {\n if (event.origin === hubspotBaseUrl) {\n try {\n const data = JSON.parse(event.data);\n handleMessage(data);\n } catch (e) {\n // Error in parsing message\n }\n }\n}\n\nexport function postMessage(key, payload, onResponse, onTimeout, timeout) {\n if (!timeout) {\n timeout = 500;\n }\n\n const timeoutCallback = function() {\n const errorMessage = `LeadinWordpressPlugin postMessage response timeout on message key: ${key}`;\n log(errorMessage);\n Raven.captureMessage(errorMessage);\n onTimeout();\n };\n\n const timeoutId = setTimeout(Raven.wrap(timeoutCallback), timeout);\n\n const message = {};\n message[key] = payload;\n message._callbackId = callbacks.push((...args) => {\n clearTimeout(timeoutId);\n onResponse(...args);\n });\n postMessageObject(message);\n}\n\nexport function onMessage(key, callback) {\n eventBus.on(key, (...args) => {\n callback.apply(null, args.slice(1));\n });\n}\n\nexport function initInterframe() {\n window.addEventListener('message', handleMessageEvent);\n}\n","import Raven from './Raven';\n\nexport default class EventBus {\n constructor() {\n this.bus = jQuery({});\n }\n\n trigger(...args) {\n this.bus.trigger(...args);\n }\n\n on(event, callback) {\n this.bus.on(event, Raven.wrap(callback));\n }\n}\n","import Raven from '../lib/Raven';\nimport { ajaxUrl } from '../constants/leadinConfig';\n\nfunction makeRequest(action, method, payload, success, error) {\n const url = `${ajaxUrl}?action=${action}`;\n const ajaxPayload = {\n url,\n method,\n contentType: 'application/json',\n success:\n typeof success === 'function'\n ? Raven.wrap(data => success(JSON.parse(data)))\n : undefined,\n error: Raven.wrap(jqXHR => {\n let message;\n try {\n message = JSON.parse(jqXHR.responseText).error;\n } catch (e) {\n message = jqXHR.responseText;\n }\n\n Raven.captureMessage(\n `AJAX request failed with code ${jqXHR.status}: ${message}`\n );\n\n if (typeof error === 'function') {\n error();\n }\n }),\n };\n\n if (payload) {\n ajaxPayload.data = JSON.stringify(payload);\n }\n\n jQuery.ajax(ajaxPayload);\n}\n\nfunction post(action, payload, success, error) {\n return makeRequest(action, 'POST', payload, success, error);\n}\n\nfunction get(action, success, error) {\n return makeRequest(action, 'GET', null, success, error);\n}\n\nconst getPortal = () => get('leadin_get_portal');\nlet portalPollingTimeout;\nlet stopPortalPolling = false;\n\nexport function startPortalIdPolling() {\n portalPollingTimeout = setTimeout(() => {\n getPortal(data => {\n if (data.portalId) {\n location.reload(true);\n } else if (!stopPortalPolling) {\n startPortalIdPolling();\n }\n }, startPortalIdPolling);\n }, 5000);\n}\n\nexport function clearPortalIdPolling() {\n clearTimeout(portalPollingTimeout);\n stopPortalPolling = true;\n}\n\nexport const connect = (portalId, success, error) =>\n post('leadin_registration_ajax', { portalId }, success, error);\n\nexport const disconnect = post.bind(null, 'leadin_disconnect_ajax', {});\nexport const getDomain = get.bind(null, 'leadin_get_domain');\nexport const markAsOutdated = get.bind(null, 'leadin_mark_outdated');\n","import { onMessage, postMessage } from '../lib/Interframe';\n\nfunction createHandler(key) {\n return onMessage.bind(null, key);\n}\n\nexport const onClearQueryParam = createHandler('leadin_clear_query_param');\nexport const onConnect = createHandler('leadin_connect_portal');\nexport const onDisableNavigation = createHandler('leadin_disable_navigation');\nexport const onDisconnect = createHandler('leadin_disconnect_portal');\nexport const onEnterFullScreen = createHandler('leadin_enter_fullscreen');\nexport const onExitFullScreen = createHandler('leadin_exit_fullscreen');\nexport const onGetAssetsPayload = createHandler('leadin_get_assets_payload');\nexport const onGetDomain = createHandler('leadin_get_wp_domain');\nexport const onInitNavigation = createHandler('leadin_init_navigation');\nexport const onInterframeReady = createHandler('leadin_interframe_ready');\nexport const onMarkAsOutdated = createHandler('leadin_mark_outdated');\nexport const onPageReload = createHandler('leadin_page_reload');\nexport const onUpgrade = createHandler('leadin_upgrade');\nexport const onSyncRoute = createHandler('leadin_sync_route');\n\nexport function changeRoute(route) {\n postMessage('leadin_change_route', route, null, () => location.reload(true));\n}\n","export const validAppRoutes = ['forms', 'settings'];\n","import Raven from './lib/Raven';\nimport { domElements } from './constants/selectors';\nimport { changeRoute } from './api/hubspotPluginApi';\nimport { validAppRoutes } from './constants/routes';\n\nexport function initNavigation() {\n function setSelectedMenuItem() {\n jQuery(domElements.subMenuButtons).removeClass('current');\n const pageParam = window.location.search.match(/\\?page=leadin_?\\w*/)[0]; // filter page query param\n const selectedElement = jQuery(`a[href=\"admin.php${pageParam}\"]`);\n selectedElement.parent().addClass('current');\n }\n\n function handleNavigation() {\n let appRoute = window.location.search.match(/page=leadin_?(\\w*)/)[1];\n\n // prefix route with /\n if (appRoute) {\n appRoute = `/${appRoute}`;\n }\n\n changeRoute(appRoute);\n setSelectedMenuItem();\n }\n\n function handleClick() {\n // Don't interrupt modifier keys\n if (event.metaKey || event.altKey || event.shiftKey) {\n return;\n }\n window.history.pushState(null, null, jQuery(this).attr('href'));\n handleNavigation();\n event.preventDefault();\n }\n\n // Browser back and forward events navigation\n window.addEventListener('popstate', handleNavigation);\n\n // Menu Navigation\n jQuery(domElements.spaNavigationButtons).click(Raven.wrap(handleClick));\n}\n\n// Given a route like \"/settings/forms\", parse it into \"?page=leadin_settings&leadin_route0=forms\"\nexport function syncRoute(path = '') {\n const routes = path.split('/');\n\n while (routes[0] === '') {\n routes.shift();\n }\n\n let appRoute = '';\n\n if (validAppRoutes.includes(routes[0])) {\n appRoute = `_${routes[0]}`;\n routes.shift();\n }\n\n const queryParamsRoutes = routes.reduce((acc, route, index) => {\n return `${acc}&leadin_route${index}=${route}`;\n }, '');\n\n window.history.replaceState(\n null,\n null,\n `?page=leadin${appRoute}${queryParamsRoutes}`\n );\n}\n\nexport function disableNavigation() {\n jQuery(domElements.allMenuButtons).off('click');\n}\n","export default {\n 'genesis-sample': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0073e5',\n },\n chatStyle: {\n accentColor: '#0073e5',\n },\n onScrollLeadFlowStyle: {\n color: '#0073e5',\n },\n onExitLeadFlowStyle: {\n color: '#0073e5',\n },\n },\n 'academy-pro': {\n formsStyle: {\n fontFamily: 'PT Sans',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e22c2f',\n },\n chatStyle: {\n accentColor: '#e22c2f',\n },\n onScrollLeadFlowStyle: {\n color: '#e22c2f',\n },\n onExitLeadFlowStyle: {\n color: '#e22c2f',\n },\n },\n 'agency-pro': {\n formsStyle: {\n fontFamily: 'EB Garamond',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#d7c603',\n },\n chatStyle: {\n accentColor: '#d7c603',\n },\n onScrollLeadFlowStyle: {\n color: '#d7c603',\n },\n onExitLeadFlowStyle: {\n color: '#d7c603',\n },\n },\n 'agentpress-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#1a212b',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#d23836',\n },\n chatStyle: {\n accentColor: '#d23836',\n },\n onScrollLeadFlowStyle: {\n color: '#d23836',\n },\n onExitLeadFlowStyle: {\n color: '#d23836',\n },\n },\n 'altitude-pro': {\n formsStyle: {\n fontFamily: 'Ek Mukta',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#079bc4',\n },\n chatStyle: {\n accentColor: '#079bc4',\n },\n onScrollLeadFlowStyle: {\n color: '#079bc4',\n },\n onExitLeadFlowStyle: {\n color: '#079bc4',\n },\n },\n 'ambiance-pro': {\n formsStyle: {\n fontFamily: 'Merriweather',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e12727',\n },\n chatStyle: {\n accentColor: '#e12727',\n },\n onScrollLeadFlowStyle: {\n color: '#e12727',\n },\n onExitLeadFlowStyle: {\n color: '#e12727',\n },\n },\n 'atmosphere-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'author-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'authority-pro': {\n formsStyle: {\n fontFamily: 'Libre Baskerville',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000cff',\n },\n chatStyle: {\n accentColor: '#000cff',\n },\n onScrollLeadFlowStyle: {\n color: '#000cff',\n },\n onExitLeadFlowStyle: {\n color: '#000cff',\n },\n },\n 'beautiful-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#666666',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e5554e',\n },\n chatStyle: {\n accentColor: '#e5554e',\n },\n onScrollLeadFlowStyle: {\n color: '#e5554e',\n },\n onExitLeadFlowStyle: {\n color: '#e5554e',\n },\n },\n 'breakthrough-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#4e4756',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#4a4f9b',\n },\n chatStyle: {\n accentColor: '#4a4f9b',\n },\n onScrollLeadFlowStyle: {\n color: '#4a4f9b',\n },\n onExitLeadFlowStyle: {\n color: '#4a4f9b',\n },\n },\n 'cafe-pro': {\n formsStyle: {\n fontFamily: 'Crimson Text',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'daily-dish-pro': {\n formsStyle: {\n fontFamily: 'Cormorant',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#d9037f',\n },\n chatStyle: {\n accentColor: '#d9037f',\n },\n onScrollLeadFlowStyle: {\n color: '#d9037f',\n },\n onExitLeadFlowStyle: {\n color: '#d9037f',\n },\n },\n 'digital-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#5b5e5e',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#e85555',\n },\n chatStyle: {\n accentColor: '#e85555',\n },\n onScrollLeadFlowStyle: {\n color: '#e85555',\n },\n onExitLeadFlowStyle: {\n color: '#e85555',\n },\n },\n 'education-pro': {\n formsStyle: {\n fontFamily: 'Roboto Condensed',\n labelTextColor: '#444444',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#78a7c8',\n },\n chatStyle: {\n accentColor: '#78a7c8',\n },\n onScrollLeadFlowStyle: {\n color: '#78a7c8',\n },\n onExitLeadFlowStyle: {\n color: '#78a7c8',\n },\n },\n 'eleven40-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ed702b',\n },\n chatStyle: {\n accentColor: '#ed702b',\n },\n onScrollLeadFlowStyle: {\n color: '#ed702b',\n },\n onExitLeadFlowStyle: {\n color: '#ed702b',\n },\n },\n 'enterprise-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#777777',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#31b2ed',\n },\n chatStyle: {\n accentColor: '#31b2ed',\n },\n onScrollLeadFlowStyle: {\n color: '#31b2ed',\n },\n onExitLeadFlowStyle: {\n color: '#31b2ed',\n },\n },\n 'essence-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#be8100',\n },\n chatStyle: {\n accentColor: '#be8100',\n },\n onScrollLeadFlowStyle: {\n color: '#be8100',\n },\n onExitLeadFlowStyle: {\n color: '#be8100',\n },\n },\n 'executive-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#64c9ea',\n },\n chatStyle: {\n accentColor: '#64c9ea',\n },\n onScrollLeadFlowStyle: {\n color: '#64c9ea',\n },\n onExitLeadFlowStyle: {\n color: '#64c9ea',\n },\n },\n 'generate-pro': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#eb232f',\n },\n chatStyle: {\n accentColor: '#eb232f',\n },\n onScrollLeadFlowStyle: {\n color: '#eb232f',\n },\n onExitLeadFlowStyle: {\n color: '#eb232f',\n },\n },\n 'infinity-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#d43c67',\n },\n chatStyle: {\n accentColor: '#d43c67',\n },\n onScrollLeadFlowStyle: {\n color: '#d43c67',\n },\n onExitLeadFlowStyle: {\n color: '#d43c67',\n },\n },\n 'interior-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#777777',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#009092',\n },\n chatStyle: {\n accentColor: '#009092',\n },\n onScrollLeadFlowStyle: {\n color: '#009092',\n },\n onExitLeadFlowStyle: {\n color: '#009092',\n },\n },\n 'lifestyle-pro': {\n formsStyle: {\n fontFamily: 'Droid Sans',\n labelTextColor: '#767673',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#27968b',\n },\n chatStyle: {\n accentColor: '#27968b',\n },\n onScrollLeadFlowStyle: {\n color: '#27968b',\n },\n onExitLeadFlowStyle: {\n color: '#27968b',\n },\n },\n 'magazine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#008285',\n },\n chatStyle: {\n accentColor: '#008285',\n },\n onScrollLeadFlowStyle: {\n color: '#008285',\n },\n onExitLeadFlowStyle: {\n color: '#008285',\n },\n },\n 'metro-pro': {\n formsStyle: {\n fontFamily: 'Helvetica Neue',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#f96e5b',\n },\n chatStyle: {\n accentColor: '#f96e5b',\n },\n onScrollLeadFlowStyle: {\n color: '#f96e5b',\n },\n onExitLeadFlowStyle: {\n color: '#f96e5b',\n },\n },\n 'minimum-pro': {\n formsStyle: {\n fontFamily: 'Roboto Slab',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#0ebfe9',\n },\n chatStyle: {\n accentColor: '#0ebfe9',\n },\n onScrollLeadFlowStyle: {\n color: '#0ebfe9',\n },\n onExitLeadFlowStyle: {\n color: '#0ebfe9',\n },\n },\n 'modern-studio-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'monochrome-pro': {\n formsStyle: {\n fontFamily: 'Muli',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'news-pro': {\n formsStyle: {\n fontFamily: 'Raleway',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#ff0000',\n },\n chatStyle: {\n accentColor: '#ff0000',\n },\n onScrollLeadFlowStyle: {\n color: '#ff0000',\n },\n onExitLeadFlowStyle: {\n color: '#ff0000',\n },\n },\n 'no-sidebar-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'outfitter-pro': {\n formsStyle: {\n fontFamily: 'Noto Sans',\n labelTextColor: '#546e7a',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'outreach-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#6ab446',\n },\n chatStyle: {\n accentColor: '#6ab446',\n },\n onScrollLeadFlowStyle: {\n color: '#6ab446',\n },\n onExitLeadFlowStyle: {\n color: '#6ab446',\n },\n },\n 'parallax-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#00a0af',\n },\n chatStyle: {\n accentColor: '#00a0af',\n },\n onScrollLeadFlowStyle: {\n color: '#00a0af',\n },\n onExitLeadFlowStyle: {\n color: '#00a0af',\n },\n },\n 'revolution-pro': {\n formsStyle: {\n fontFamily: 'Noto Serif SC',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#008080',\n },\n chatStyle: {\n accentColor: '#008080',\n },\n onScrollLeadFlowStyle: {\n color: '#008080',\n },\n onExitLeadFlowStyle: {\n color: '#008080',\n },\n },\n 'sixteen-nine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#1dbec0',\n },\n chatStyle: {\n accentColor: '#1dbec0',\n },\n onScrollLeadFlowStyle: {\n color: '#1dbec0',\n },\n onExitLeadFlowStyle: {\n color: '#1dbec0',\n },\n },\n 'smart-passive-income-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0e763c',\n },\n chatStyle: {\n accentColor: '#0e763c',\n },\n onScrollLeadFlowStyle: {\n color: '#0e763c',\n },\n onExitLeadFlowStyle: {\n color: '#0e763c',\n },\n },\n 'wellness-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#5da44f',\n },\n chatStyle: {\n accentColor: '#5da44f',\n },\n onScrollLeadFlowStyle: {\n color: '#5da44f',\n },\n onExitLeadFlowStyle: {\n color: '#5da44f',\n },\n },\n 'workstation-pro': {\n formsStyle: {\n fontFamily: 'Baskerville',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ff4800',\n },\n chatStyle: {\n accentColor: '#ff4800',\n },\n onScrollLeadFlowStyle: {\n color: '#ff4800',\n },\n onExitLeadFlowStyle: {\n color: '#ff4800',\n },\n },\n};\n","import {\n onInterframeReady,\n onConnect,\n onDisconnect,\n onMarkAsOutdated,\n onUpgrade,\n onPageReload,\n onInitNavigation,\n onDisableNavigation,\n onClearQueryParam,\n onGetDomain,\n onGetAssetsPayload,\n onEnterFullScreen,\n onExitFullScreen,\n onSyncRoute,\n} from './api/hubspotPluginApi';\nimport {\n connect,\n disconnect,\n markAsOutdated,\n getDomain,\n clearPortalIdPolling,\n} from './api/wordpressApi';\nimport { adminUrl, theme } from './constants/leadinConfig';\nimport { initNavigation, disableNavigation, syncRoute } from './navigation';\nimport enterFullScreen, { exitFullScreen } from './fullscreen';\nimport themes from './constants/themes';\n\nonInterframeReady((message, reply) => {\n reply('Interframe Ready');\n});\n\nonConnect((portalId, reply) => {\n connect(\n portalId,\n () => {\n clearPortalIdPolling();\n reply({ success: true });\n },\n reply.bind(null, { success: false })\n );\n});\n\nonDisconnect((message, reply) => {\n disconnect(\n reply.bind(null, { success: true }),\n reply.bind(null, { success: false })\n );\n});\n\nonMarkAsOutdated((message, reply) => {\n markAsOutdated(reply);\n});\n\nonUpgrade((message, reply) => {\n reply();\n location.href = `${adminUrl}plugins.php`;\n});\n\nonPageReload((message, reply) => {\n reply();\n window.location.reload(true);\n});\n\nonInitNavigation((message, reply) => {\n reply();\n initNavigation();\n});\n\nonDisableNavigation((message, reply) => {\n reply();\n disableNavigation();\n});\n\nonClearQueryParam((message, reply) => {\n reply();\n let currentWindowLocation = window.location.toString();\n if (currentWindowLocation.indexOf('?') > 0) {\n currentWindowLocation = currentWindowLocation.substring(\n 0,\n currentWindowLocation.indexOf('?')\n );\n }\n const newWindowLocation = `${currentWindowLocation}?page=leadin`;\n window.history.pushState({}, '', newWindowLocation);\n});\n\nonGetDomain((message, reply) => {\n getDomain(data => {\n if (data.domain) {\n reply(data.domain);\n }\n });\n});\n\nonGetAssetsPayload((message, reply) => {\n reply({ payload: themes[theme] });\n});\n\nonEnterFullScreen((message, reply) => {\n enterFullScreen();\n reply();\n});\n\nonExitFullScreen((message, reply) => {\n exitFullScreen();\n reply();\n});\n\nonSyncRoute((message, reply) => {\n syncRoute(message);\n reply();\n});\n","import { domElements } from './constants/selectors';\n\nexport default function enterFullScreen() {\n jQuery(domElements.iframe).addClass('leadin-iframe-fullscreen');\n}\n\nexport function exitFullScreen() {\n jQuery(domElements.iframe).removeClass('leadin-iframe-fullscreen');\n}\n","import Raven, { configureRaven } from './lib/Raven';\nimport { addExternalLinks } from './menu';\nimport { portalId } from './constants/leadinConfig';\nimport { initInterframe } from './lib/Interframe';\nimport { startPortalIdPolling } from './api/wordpressApi';\nimport './handlers';\n\nfunction main() {\n initInterframe();\n\n // Enable App Navigation only when viewing the plugin\n if (window.location.search.indexOf('page=leadin') !== -1) {\n if (!portalId) {\n startPortalIdPolling();\n }\n }\n\n jQuery(document).ready(addExternalLinks);\n}\n\nconfigureRaven();\nRaven.context(main);\n"],"sourceRoot":""}
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/raven-js/src/singleton.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/raven-js/src/utils.js","webpack:///./node_modules/raven-js/src/raven.js","webpack:///./node_modules/raven-js/vendor/TraceKit/tracekit.js","webpack:///./node_modules/raven-js/vendor/json-stringify-safe/stringify.js","webpack:///./node_modules/raven-js/src/configError.js","webpack:///./node_modules/raven-js/src/console.js","webpack:///./js/constants/leadinConfig.js","webpack:///./js/lib/Raven.js","webpack:///./js/menu.js","webpack:///./js/utils.js","webpack:///./js/constants/selectors.js","webpack:///./js/lib/Interframe.js","webpack:///./js/lib/EventBus.js","webpack:///./js/api/wordpressApi.js","webpack:///./js/api/hubspotPluginApi.js","webpack:///./js/constants/routes.js","webpack:///./js/navigation.js","webpack:///./js/constants/themes.js","webpack:///./js/handlers.js","webpack:///./js/fullscreen.js","webpack:///./js/app.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","RavenConstructor","_window","window","self","_Raven","Raven","noConflict","afterLoad","g","this","Function","e","isUndefined","what","isString","toString","supportsErrorEvent","ErrorEvent","each","obj","callback","j","length","hasKey","htmlElementAsString","elem","className","classes","attr","out","tagName","push","toLowerCase","id","split","attrWhitelist","getAttribute","join","isOnlyOneTruthy","a","b","isSameStacktrace","stack1","stack2","frames1","frames","frames2","filename","lineno","colno","isObject","isError","Error","isErrorEvent","isFunction","isEmptyObject","_","wrappedCallback","data","original","normalizedData","objectMerge","obj1","obj2","truncate","str","max","substr","objectFrozen","isFrozen","joinRegExp","patterns","pattern","sources","len","replace","source","RegExp","urlencode","pairs","encodeURIComponent","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","Math","random","htmlTreeAsString","nextStr","height","sepLength","parentNode","reverse","isSameException","ex1","ex2","values","type","stacktrace","parseUrl","url","match","query","fragment","protocol","host","path","relative","fill","replacement","track","orig","TraceKit","stringify","RavenConfigError","utils","wrapConsoleMethod","wrapMethod","dsnKeys","dsnPattern","now","Date","_document","document","_navigator","navigator","keepOriginalCallback","method","_hasJSON","JSON","_hasDocument","_hasNavigator","_lastCapturedException","_lastData","_lastEventId","_globalServer","_globalKey","_globalProject","_globalContext","_globalOptions","logger","ignoreErrors","ignoreUrls","whitelistUrls","includePaths","collectWindowErrors","maxMessageLength","maxUrlLength","stackTraceLimit","autoBreadcrumbs","instrument","sampleRate","_ignoreOnError","_isRavenInstalled","_originalErrorStackTraceLimit","_originalConsole","console","_originalConsoleMethods","_plugins","_startTime","_wrappedBuiltIns","_breadcrumbs","_lastCapturedEvent","_keypressTimeout","_location","location","_lastHref","href","_resetBackoff","VERSION","debug","config","dsn","options","_logDebug","globalOptions","setDSN","maxBreadcrumbs","min","autoBreadcrumbDefaults","xhr","dom","instrumentDefaults","tryCatch","install","isSetup","report","subscribe","_handleOnErrorStackInfo","apply","arguments","_instrumentTryCatch","_instrumentBreadcrumbs","_drainPlugins","uri","_parseDSN","lastSlash","lastIndexOf","_dsn","user","_globalSecret","pass","_getGlobalServer","_globalEndpoint","context","func","args","undefined","wrap","_before","__raven__","__raven_wrapper__","wrapped","deep","_ignoreNextOnError","captureException","__inner__","uninstall","_restoreBuiltIns","ex","isNotError","isNotErrorEvent","isErrorEventWithoutError","error","captureMessage","trimHeadFrames","stack","computeStackTrace","_handleStackInfo","msg","test","message","initialCall","fileurl","fingerprint","_prepareFrames","_send","captureBreadcrumb","crumb","timestamp","breadcrumbCallback","result","shift","addPlugin","plugin","pluginArgs","slice","setUserContext","setExtraContext","extra","_mergeContext","setTagsContext","tags","clearContext","getContext","parse","setEnvironment","environment","setRelease","release","setDataCallback","dataCallback","setBreadcrumbCallback","setShouldSendCallback","shouldSendCallback","setTransport","transport","lastException","lastEventId","ravenNotConfiguredError","RavenConfig","showReportDialog","eventId","encode","qs","email","globalServer","script","createElement","async","src","head","body","appendChild","setTimeout","_triggerEvent","eventType","evt","toUpperCase","createEvent","initEvent","createEventObject","dispatchEvent","fireEvent","_breadcrumbEventHandler","evtName","target","category","_keypressEventHandler","isContentEditable","timeout","clearTimeout","_captureUrlChange","from","to","parsedLoc","parsedTo","parsedFrom","wrappedBuiltIns","wrapTimeFn","fn","Array","originalCallback","wrapEventTarget","proto","capture","secure","handleEvent","err","before","clickHandler","keypressHandler","requestAnimationFrame","cb","eventTargets","wrapProp","prop","xhrproto","XMLHttpRequest","origOpen","indexOf","__raven_xhr","status_code","origSend","onreadystatechangeHandler","readyState","status","props","onreadystatechange","origFetch","fetchInput","Request","fetchData","then","response","addEventListener","attachEvent","chrome","hasPushAndReplaceState","app","runtime","history","pushState","replaceState","oldOnPopState","onpopstate","currentHref","historyReplacementFunction","origHistFunction","log","consoleMethodCallback","level","builtin","installer","concat","exec","allowSecretKey","port","stackInfo","_processException","frame","_normalizeFrame","in_app","stackInfoUrl","normalized","line","column","function","prefixedMessage","exception","culprit","_trimPacket","request","Referer","breadcrumbs","_trimBreadcrumbs","urlProp","urlProps","_getHttpData","httpData","userAgent","headers","User-Agent","referrer","_backoffDuration","_backoffStart","_shouldBackoff","_isRepeatData","current","last","_setBackoffState","retry","getResponseHeader","parseInt","baseData","project","platform","serverName","server_name","_sendProcessedPayload","_getUuid","allowDuplicates","event_id","auth","sentry_version","sentry_client","sentry_key","sentry_secret","_makeRequest","onSuccess","onError","opts","XDomainRequest","onload","onerror","open","send","setUser","setReleaseContext","_slice","UNKNOWN_FUNCTION","ERROR_TYPES_RE","getLocationHref","_oldOnerrorHandler","_onErrorHandlerInstalled","handlers","lastArgs","lastExceptionStack","notifyHandlers","isWindowError","inner","traceKitWindowOnError","lineNo","colNo","augmentStackTraceWithInitialElement","processLastException","groups","_lastExceptionStack","_lastArgs","rethrow","incomplete","handler","unsubscribe","splice","computeStackTraceFromStackProp","submatch","parts","element","gecko","winjs","geckoEval","chromeEval","lines","isNative","columnNumber","initial","unshift","partial","computeStackTraceByWalkingCallerChain","depth","item","functionName","funcs","recursion","curr","caller","input","substring","sourceURL","fileName","lineNumber","description","haystack","needle","serializer","replacer","cycleReplacer","keys","thisPos","Infinity","stringifyError","spaces","getSerialize","constructor","originalConsoleLevel","originalConsole","sentryLevel","leadinConfig","adminUrl","ajaxUrl","env","hubspotBaseUrl","leadinPluginVersion","nonce","plugins","phpVersion","portalId","theme","wpVersion","i18n","leadinI18n","addMenuItem","text","jQuery","find","addExternalLinks","chatflowsUrl","emailUrl","chatflows","localStorage","LEADIN_DEBUG","_console","_len","_key","domElements","iframe","spaNavigationButtons","subMenuButtons","eventBus","EventBus","_classCallCheck","bus","_this$bus","trigger","event","on","callbacks","postMessageObject","contentWindow","postMessage","reply","newMessage","assign","handleMessage","_callbackId","handleResponse","forEach","handleMessageEvent","origin","makeRequest","action","payload","success","ajaxPayload","contentType","jqXHR","responseText","ajax","post","portalPollingTimeout","getPortal","stopPortalPolling","startPortalIdPolling","reload","disconnect","getDomain","createHandler","onClearQueryParam","onConnect","onDisableNavigation","onDisconnect","onEnterFullScreen","onExitFullScreen","onGetAssetsPayload","onGetDomain","onInitNavigation","onInterframeReady","onPageReload","onUpgrade","onSyncRoute","changeRoute","route","onResponse","onTimeout","timeoutId","errorMessage","validAppRoutes","initNavigation","handleNavigation","appRoute","search","removeClass","pageParam","parent","addClass","setSelectedMenuItem","click","metaKey","altKey","shiftKey","preventDefault","themes","genesis-sample","formsStyle","fontFamily","labelTextColor","labelTextSize","submitFontColor","submitColor","chatStyle","accentColor","onScrollLeadFlowStyle","color","onExitLeadFlowStyle","academy-pro","agency-pro","agentpress-pro","altitude-pro","ambiance-pro","atmosphere-pro","author-pro","authority-pro","beautiful-pro","breakthrough-pro","cafe-pro","daily-dish-pro","digital-pro","education-pro","eleven40-pro","enterprise-pro","essence-pro","executive-pro","generate-pro","infinity-pro","interior-pro","lifestyle-pro","magazine-pro","metro-pro","minimum-pro","modern-studio-pro","monochrome-pro","news-pro","no-sidebar-pro","outfitter-pro","outreach-pro","parallax-pro","revolution-pro","sixteen-nine-pro","smart-passive-income-pro","wellness-pro","workstation-pro","connect","allMenuButtons","off","currentWindowLocation","newWindowLocation","domain","routes","includes","queryParamsRoutes","reduce","acc","index","syncRoute","leadin","php","wordpress","hub","map","Version","ready"],"mappings":"aACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QAKAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC,GACAZ,EAAAa,EAAAX,EAAAS,IACAG,OAAAC,eAAAb,EAAAS,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KAK1CZ,EAAAkB,EAAA,SAAAhB,GACA,oBAAAiB,eAAAC,aACAN,OAAAC,eAAAb,EAAAiB,OAAAC,YAAA,CAAwDC,MAAA,WAExDP,OAAAC,eAAAb,EAAA,cAAiDmB,OAAA,KAQjDrB,EAAAsB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAArB,EAAAqB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,iBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAX,OAAAY,OAAA,MAGA,GAFA1B,EAAAkB,EAAAO,GACAX,OAAAC,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAArB,EAAAU,EAAAe,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAzB,EAAA6B,EAAA,SAA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EAAW,GAEXH,GAAewE,SAASD,EAAO,MACjCpE,EAAQ,IAAAjO,OAAOqS,EAAO,IACtBA,EAAO/Z,SAGT,IAAMia,EAAoBF,EAAOG,OAAO,SAACC,EAAKhF,EAAOiF,GACnD,SAAA1S,OAAUyS,EAAV,KAAAzS,OAAiBjS,mBAAkB,gBAAAiS,OAAiB0S,EAAjB,MAAnC,KAAA1S,OAAiEyN,IAChE,IAEHxkB,OAAOkW,QAAQE,aACb,KACA,KAFF,eAAAW,OAGiBiO,GAHjBjO,OAG4BuS,IEwC5BI,CAAUhb,GACVqT,MX9FY,SAARxC,IAIJpf,IAAM2K,OACJ,oEACA,CACErB,WAAY,CACViC,UAAU,KAGdC,UAEFxL,IAAM2P,eAAe,CACnB6Z,OAAQlK,EACRmK,IAAKhK,EACLiK,UAAW9J,IAGb5f,IAAMuP,eAAe,CACnBoa,IAAKjK,EACLF,QAASphB,OAAOmgB,KAAKiB,GAClBoK,IAAI,SAAA3rB,GAAI,SAAA2Y,OAAO3Y,EAAP,KAAA2Y,OAAe4I,EAAQvhB,GAAM4rB,WACrC7nB,KAAK,QabZhC,EAAM4M,QAdN,WT8EE/M,OAAO4V,iBAAiB,UAAW0M,IS1EoB,IAAnDtiB,OAAOwK,SAASya,OAAOpQ,QAAQ,iBAC5BgL,GACHwD,KAIJjD,OAAOtY,UAAUmiB,MAAM3J","file":"leadin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 8);\n","/**\n * Enforces a single instance of the Raven client, and the\n * main entry point for Raven. If you are a consumer of the\n * Raven library, you SHOULD load this file (vs raven.js).\n **/\n\nvar RavenConstructor = require('./raven');\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _Raven = _window.Raven;\n\nvar Raven = new RavenConstructor();\n\n/*\n * Allow multiple versions of Raven to be installed.\n * Strip Raven from the global context and returns the instance.\n *\n * @return {Raven}\n */\nRaven.noConflict = function() {\n _window.Raven = _Raven;\n return Raven;\n};\n\nRaven.afterLoad();\n\nmodule.exports = Raven;\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","var _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\nfunction isObject(what) {\n return typeof what === 'object' && what !== null;\n}\n\n// Yanked from https://git.io/vS8DV re-used under CC0\n// with some tiny modifications\nfunction isError(value) {\n switch ({}.toString.call(value)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return value instanceof Error;\n }\n}\n\nfunction isErrorEvent(value) {\n return supportsErrorEvent() && {}.toString.call(value) === '[object ErrorEvent]';\n}\n\nfunction isUndefined(what) {\n return what === void 0;\n}\n\nfunction isFunction(what) {\n return typeof what === 'function';\n}\n\nfunction isString(what) {\n return Object.prototype.toString.call(what) === '[object String]';\n}\n\nfunction isEmptyObject(what) {\n for (var _ in what) return false; // eslint-disable-line guard-for-in, no-unused-vars\n return true;\n}\n\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent(''); // eslint-disable-line no-new\n return true;\n } catch (e) {\n return false;\n }\n}\n\nfunction wrappedCallback(callback) {\n function dataCallback(data, original) {\n var normalizedData = callback(data) || data;\n if (original) {\n return original(normalizedData) || normalizedData;\n }\n return normalizedData;\n }\n\n return dataCallback;\n}\n\nfunction each(obj, callback) {\n var i, j;\n\n if (isUndefined(obj.length)) {\n for (i in obj) {\n if (hasKey(obj, i)) {\n callback.call(null, i, obj[i]);\n }\n }\n } else {\n j = obj.length;\n if (j) {\n for (i = 0; i < j; i++) {\n callback.call(null, i, obj[i]);\n }\n }\n }\n}\n\nfunction objectMerge(obj1, obj2) {\n if (!obj2) {\n return obj1;\n }\n each(obj2, function(key, value) {\n obj1[key] = value;\n });\n return obj1;\n}\n\n/**\n * This function is only used for react-native.\n * react-native freezes object that have already been sent over the\n * js bridge. We need this function in order to check if the object is frozen.\n * So it's ok that objectFrozen returns false if Object.isFrozen is not\n * supported because it's not relevant for other \"platforms\". See related issue:\n * https://github.com/getsentry/react-native-sentry/issues/57\n */\nfunction objectFrozen(obj) {\n if (!Object.isFrozen) {\n return false;\n }\n return Object.isFrozen(obj);\n}\n\nfunction truncate(str, max) {\n return !max || str.length <= max ? str : str.substr(0, max) + '\\u2026';\n}\n\n/**\n * hasKey, a better form of hasOwnProperty\n * Example: hasKey(MainHostObject, property) === true/false\n *\n * @param {Object} host object to check property\n * @param {string} key to check\n */\nfunction hasKey(object, key) {\n return Object.prototype.hasOwnProperty.call(object, key);\n}\n\nfunction joinRegExp(patterns) {\n // Combine an array of regular expressions and strings into one large regexp\n // Be mad.\n var sources = [],\n i = 0,\n len = patterns.length,\n pattern;\n\n for (; i < len; i++) {\n pattern = patterns[i];\n if (isString(pattern)) {\n // If it's a string, we need to escape it\n // Taken from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\n sources.push(pattern.replace(/([.*+?^=!:${}()|\\[\\]\\/\\\\])/g, '\\\\$1'));\n } else if (pattern && pattern.source) {\n // If it's a regexp already, we want to extract the source\n sources.push(pattern.source);\n }\n // Intentionally skip other cases\n }\n return new RegExp(sources.join('|'), 'i');\n}\n\nfunction urlencode(o) {\n var pairs = [];\n each(o, function(key, value) {\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\n });\n return pairs.join('&');\n}\n\n// borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n// intentionally using regex and not <a/> href parsing trick because React Native and other\n// environments where DOM might not be available\nfunction parseUrl(url) {\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) return {};\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n protocol: match[2],\n host: match[4],\n path: match[5],\n relative: match[5] + query + fragment // everything minus origin\n };\n}\nfunction uuid4() {\n var crypto = _window.crypto || _window.msCrypto;\n\n if (!isUndefined(crypto) && crypto.getRandomValues) {\n // Use window.crypto API if available\n // eslint-disable-next-line no-undef\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n\n // set 4 in byte 7\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n\n var pad = function(num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = '0' + v;\n }\n return v;\n };\n\n return (\n pad(arr[0]) +\n pad(arr[1]) +\n pad(arr[2]) +\n pad(arr[3]) +\n pad(arr[4]) +\n pad(arr[5]) +\n pad(arr[6]) +\n pad(arr[7])\n );\n } else {\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = (Math.random() * 16) | 0,\n v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n }\n}\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @param elem\n * @returns {string}\n */\nfunction htmlTreeAsString(elem) {\n /* eslint no-extra-parens:0*/\n var MAX_TRAVERSE_HEIGHT = 5,\n MAX_OUTPUT_LEN = 80,\n out = [],\n height = 0,\n len = 0,\n separator = ' > ',\n sepLength = separator.length,\n nextStr;\n\n while (elem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = htmlElementAsString(elem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (\n nextStr === 'html' ||\n (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)\n ) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n elem = elem.parentNode;\n }\n\n return out.reverse().join(separator);\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @param HTMLElement\n * @returns {string}\n */\nfunction htmlElementAsString(elem) {\n var out = [],\n className,\n classes,\n key,\n attr,\n i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push('#' + elem.id);\n }\n\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push('.' + classes[i]);\n }\n }\n var attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push('[' + key + '=\"' + attr + '\"]');\n }\n }\n return out.join('');\n}\n\n/**\n * Returns true if either a OR b is truthy, but not both\n */\nfunction isOnlyOneTruthy(a, b) {\n return !!(!!a ^ !!b);\n}\n\n/**\n * Returns true if the two input exception interfaces have the same content\n */\nfunction isSameException(ex1, ex2) {\n if (isOnlyOneTruthy(ex1, ex2)) return false;\n\n ex1 = ex1.values[0];\n ex2 = ex2.values[0];\n\n if (ex1.type !== ex2.type || ex1.value !== ex2.value) return false;\n\n return isSameStacktrace(ex1.stacktrace, ex2.stacktrace);\n}\n\n/**\n * Returns true if the two input stack trace interfaces have the same content\n */\nfunction isSameStacktrace(stack1, stack2) {\n if (isOnlyOneTruthy(stack1, stack2)) return false;\n\n var frames1 = stack1.frames;\n var frames2 = stack2.frames;\n\n // Exit early if frame count differs\n if (frames1.length !== frames2.length) return false;\n\n // Iterate through every frame; bail out if anything differs\n var a, b;\n for (var i = 0; i < frames1.length; i++) {\n a = frames1[i];\n b = frames2[i];\n if (\n a.filename !== b.filename ||\n a.lineno !== b.lineno ||\n a.colno !== b.colno ||\n a['function'] !== b['function']\n )\n return false;\n }\n return true;\n}\n\n/**\n * Polyfill a method\n * @param obj object e.g. `document`\n * @param name method name present on object e.g. `addEventListener`\n * @param replacement replacement function\n * @param track {optional} record instrumentation to an array\n */\nfunction fill(obj, name, replacement, track) {\n var orig = obj[name];\n obj[name] = replacement(orig);\n if (track) {\n track.push([obj, name, orig]);\n }\n}\n\nmodule.exports = {\n isObject: isObject,\n isError: isError,\n isErrorEvent: isErrorEvent,\n isUndefined: isUndefined,\n isFunction: isFunction,\n isString: isString,\n isEmptyObject: isEmptyObject,\n supportsErrorEvent: supportsErrorEvent,\n wrappedCallback: wrappedCallback,\n each: each,\n objectMerge: objectMerge,\n truncate: truncate,\n objectFrozen: objectFrozen,\n hasKey: hasKey,\n joinRegExp: joinRegExp,\n urlencode: urlencode,\n uuid4: uuid4,\n htmlTreeAsString: htmlTreeAsString,\n htmlElementAsString: htmlElementAsString,\n isSameException: isSameException,\n isSameStacktrace: isSameStacktrace,\n parseUrl: parseUrl,\n fill: fill\n};\n","/*global XDomainRequest:false */\n\nvar TraceKit = require('../vendor/TraceKit/tracekit');\nvar stringify = require('../vendor/json-stringify-safe/stringify');\nvar RavenConfigError = require('./configError');\n\nvar utils = require('./utils');\nvar isError = utils.isError;\nvar isObject = utils.isObject;\nvar isObject = utils.isObject;\nvar isErrorEvent = utils.isErrorEvent;\nvar isUndefined = utils.isUndefined;\nvar isFunction = utils.isFunction;\nvar isString = utils.isString;\nvar isEmptyObject = utils.isEmptyObject;\nvar each = utils.each;\nvar objectMerge = utils.objectMerge;\nvar truncate = utils.truncate;\nvar objectFrozen = utils.objectFrozen;\nvar hasKey = utils.hasKey;\nvar joinRegExp = utils.joinRegExp;\nvar urlencode = utils.urlencode;\nvar uuid4 = utils.uuid4;\nvar htmlTreeAsString = utils.htmlTreeAsString;\nvar isSameException = utils.isSameException;\nvar isSameStacktrace = utils.isSameStacktrace;\nvar parseUrl = utils.parseUrl;\nvar fill = utils.fill;\n\nvar wrapConsoleMethod = require('./console').wrapMethod;\n\nvar dsnKeys = 'source protocol user pass host port path'.split(' '),\n dsnPattern = /^(?:(\\w+):)?\\/\\/(?:(\\w+)(:\\w+)?@)?([\\w\\.-]+)(?::(\\d+))?(\\/.*)/;\n\nfunction now() {\n return +new Date();\n}\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\nvar _document = _window.document;\nvar _navigator = _window.navigator;\n\nfunction keepOriginalCallback(original, callback) {\n return isFunction(callback)\n ? function(data) {\n return callback(data, original);\n }\n : callback;\n}\n\n// First, check for JSON support\n// If there is no JSON, we no-op the core features of Raven\n// since JSON is required to encode the payload\nfunction Raven() {\n this._hasJSON = !!(typeof JSON === 'object' && JSON.stringify);\n // Raven can run in contexts where there's no document (react-native)\n this._hasDocument = !isUndefined(_document);\n this._hasNavigator = !isUndefined(_navigator);\n this._lastCapturedException = null;\n this._lastData = null;\n this._lastEventId = null;\n this._globalServer = null;\n this._globalKey = null;\n this._globalProject = null;\n this._globalContext = {};\n this._globalOptions = {\n logger: 'javascript',\n ignoreErrors: [],\n ignoreUrls: [],\n whitelistUrls: [],\n includePaths: [],\n collectWindowErrors: true,\n maxMessageLength: 0,\n\n // By default, truncates URL values to 250 chars\n maxUrlLength: 250,\n stackTraceLimit: 50,\n autoBreadcrumbs: true,\n instrument: true,\n sampleRate: 1\n };\n this._ignoreOnError = 0;\n this._isRavenInstalled = false;\n this._originalErrorStackTraceLimit = Error.stackTraceLimit;\n // capture references to window.console *and* all its methods first\n // before the console plugin has a chance to monkey patch\n this._originalConsole = _window.console || {};\n this._originalConsoleMethods = {};\n this._plugins = [];\n this._startTime = now();\n this._wrappedBuiltIns = [];\n this._breadcrumbs = [];\n this._lastCapturedEvent = null;\n this._keypressTimeout;\n this._location = _window.location;\n this._lastHref = this._location && this._location.href;\n this._resetBackoff();\n\n // eslint-disable-next-line guard-for-in\n for (var method in this._originalConsole) {\n this._originalConsoleMethods[method] = this._originalConsole[method];\n }\n}\n\n/*\n * The core Raven singleton\n *\n * @this {Raven}\n */\n\nRaven.prototype = {\n // Hardcode version string so that raven source can be loaded directly via\n // webpack (using a build step causes webpack #1617). Grunt verifies that\n // this value matches package.json during build.\n // See: https://github.com/getsentry/raven-js/issues/465\n VERSION: '3.19.1',\n\n debug: false,\n\n TraceKit: TraceKit, // alias to TraceKit\n\n /*\n * Configure Raven with a DSN and extra options\n *\n * @param {string} dsn The public Sentry DSN\n * @param {object} options Set of global options [optional]\n * @return {Raven}\n */\n config: function(dsn, options) {\n var self = this;\n\n if (self._globalServer) {\n this._logDebug('error', 'Error: Raven has already been configured');\n return self;\n }\n if (!dsn) return self;\n\n var globalOptions = self._globalOptions;\n\n // merge in options\n if (options) {\n each(options, function(key, value) {\n // tags and extra are special and need to be put into context\n if (key === 'tags' || key === 'extra' || key === 'user') {\n self._globalContext[key] = value;\n } else {\n globalOptions[key] = value;\n }\n });\n }\n\n self.setDSN(dsn);\n\n // \"Script error.\" is hard coded into browsers for errors that it can't read.\n // this is the result of a script being pulled in from an external domain and CORS.\n globalOptions.ignoreErrors.push(/^Script error\\.?$/);\n globalOptions.ignoreErrors.push(/^Javascript error: Script error\\.? on line 0$/);\n\n // join regexp rules into one big rule\n globalOptions.ignoreErrors = joinRegExp(globalOptions.ignoreErrors);\n globalOptions.ignoreUrls = globalOptions.ignoreUrls.length\n ? joinRegExp(globalOptions.ignoreUrls)\n : false;\n globalOptions.whitelistUrls = globalOptions.whitelistUrls.length\n ? joinRegExp(globalOptions.whitelistUrls)\n : false;\n globalOptions.includePaths = joinRegExp(globalOptions.includePaths);\n globalOptions.maxBreadcrumbs = Math.max(\n 0,\n Math.min(globalOptions.maxBreadcrumbs || 100, 100)\n ); // default and hard limit is 100\n\n var autoBreadcrumbDefaults = {\n xhr: true,\n console: true,\n dom: true,\n location: true\n };\n\n var autoBreadcrumbs = globalOptions.autoBreadcrumbs;\n if ({}.toString.call(autoBreadcrumbs) === '[object Object]') {\n autoBreadcrumbs = objectMerge(autoBreadcrumbDefaults, autoBreadcrumbs);\n } else if (autoBreadcrumbs !== false) {\n autoBreadcrumbs = autoBreadcrumbDefaults;\n }\n globalOptions.autoBreadcrumbs = autoBreadcrumbs;\n\n var instrumentDefaults = {\n tryCatch: true\n };\n\n var instrument = globalOptions.instrument;\n if ({}.toString.call(instrument) === '[object Object]') {\n instrument = objectMerge(instrumentDefaults, instrument);\n } else if (instrument !== false) {\n instrument = instrumentDefaults;\n }\n globalOptions.instrument = instrument;\n\n TraceKit.collectWindowErrors = !!globalOptions.collectWindowErrors;\n\n // return for chaining\n return self;\n },\n\n /*\n * Installs a global window.onerror error handler\n * to capture and report uncaught exceptions.\n * At this point, install() is required to be called due\n * to the way TraceKit is set up.\n *\n * @return {Raven}\n */\n install: function() {\n var self = this;\n if (self.isSetup() && !self._isRavenInstalled) {\n TraceKit.report.subscribe(function() {\n self._handleOnErrorStackInfo.apply(self, arguments);\n });\n if (self._globalOptions.instrument && self._globalOptions.instrument.tryCatch) {\n self._instrumentTryCatch();\n }\n\n if (self._globalOptions.autoBreadcrumbs) self._instrumentBreadcrumbs();\n\n // Install all of the plugins\n self._drainPlugins();\n\n self._isRavenInstalled = true;\n }\n\n Error.stackTraceLimit = self._globalOptions.stackTraceLimit;\n return this;\n },\n\n /*\n * Set the DSN (can be called multiple time unlike config)\n *\n * @param {string} dsn The public Sentry DSN\n */\n setDSN: function(dsn) {\n var self = this,\n uri = self._parseDSN(dsn),\n lastSlash = uri.path.lastIndexOf('/'),\n path = uri.path.substr(1, lastSlash);\n\n self._dsn = dsn;\n self._globalKey = uri.user;\n self._globalSecret = uri.pass && uri.pass.substr(1);\n self._globalProject = uri.path.substr(lastSlash + 1);\n\n self._globalServer = self._getGlobalServer(uri);\n\n self._globalEndpoint =\n self._globalServer + '/' + path + 'api/' + self._globalProject + '/store/';\n\n // Reset backoff state since we may be pointing at a\n // new project/server\n this._resetBackoff();\n },\n\n /*\n * Wrap code within a context so Raven can capture errors\n * reliably across domains that is executed immediately.\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The callback to be immediately executed within the context\n * @param {array} args An array of arguments to be called with the callback [optional]\n */\n context: function(options, func, args) {\n if (isFunction(options)) {\n args = func || [];\n func = options;\n options = undefined;\n }\n\n return this.wrap(options, func).apply(this, args);\n },\n\n /*\n * Wrap code within a context and returns back a new function to be executed\n *\n * @param {object} options A specific set of options for this context [optional]\n * @param {function} func The function to be wrapped in a new context\n * @param {function} func A function to call before the try/catch wrapper [optional, private]\n * @return {function} The newly wrapped functions with a context\n */\n wrap: function(options, func, _before) {\n var self = this;\n // 1 argument has been passed, and it's not a function\n // so just return it\n if (isUndefined(func) && !isFunction(options)) {\n return options;\n }\n\n // options is optional\n if (isFunction(options)) {\n func = options;\n options = undefined;\n }\n\n // At this point, we've passed along 2 arguments, and the second one\n // is not a function either, so we'll just return the second argument.\n if (!isFunction(func)) {\n return func;\n }\n\n // We don't wanna wrap it twice!\n try {\n if (func.__raven__) {\n return func;\n }\n\n // If this has already been wrapped in the past, return that\n if (func.__raven_wrapper__) {\n return func.__raven_wrapper__;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return func;\n }\n\n function wrapped() {\n var args = [],\n i = arguments.length,\n deep = !options || (options && options.deep !== false);\n\n if (_before && isFunction(_before)) {\n _before.apply(this, arguments);\n }\n\n // Recursively wrap all of a function's arguments that are\n // functions themselves.\n while (i--) args[i] = deep ? self.wrap(options, arguments[i]) : arguments[i];\n\n try {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means Raven caught an error invoking your application code. This is\n // expected behavior and NOT indicative of a bug with Raven.js.\n return func.apply(this, args);\n } catch (e) {\n self._ignoreNextOnError();\n self.captureException(e, options);\n throw e;\n }\n }\n\n // copy over properties of the old function\n for (var property in func) {\n if (hasKey(func, property)) {\n wrapped[property] = func[property];\n }\n }\n wrapped.prototype = func.prototype;\n\n func.__raven_wrapper__ = wrapped;\n // Signal that this function has been wrapped already\n // for both debugging and to prevent it to being wrapped twice\n wrapped.__raven__ = true;\n wrapped.__inner__ = func;\n\n return wrapped;\n },\n\n /*\n * Uninstalls the global error handler.\n *\n * @return {Raven}\n */\n uninstall: function() {\n TraceKit.report.uninstall();\n\n this._restoreBuiltIns();\n\n Error.stackTraceLimit = this._originalErrorStackTraceLimit;\n this._isRavenInstalled = false;\n\n return this;\n },\n\n /*\n * Manually capture an exception and send it over to Sentry\n *\n * @param {error} ex An exception to be logged\n * @param {object} options A specific set of options for this error [optional]\n * @return {Raven}\n */\n captureException: function(ex, options) {\n // Cases for sending ex as a message, rather than an exception\n var isNotError = !isError(ex);\n var isNotErrorEvent = !isErrorEvent(ex);\n var isErrorEventWithoutError = isErrorEvent(ex) && !ex.error;\n\n if ((isNotError && isNotErrorEvent) || isErrorEventWithoutError) {\n return this.captureMessage(\n ex,\n objectMerge(\n {\n trimHeadFrames: 1,\n stacktrace: true // if we fall back to captureMessage, default to attempting a new trace\n },\n options\n )\n );\n }\n\n // Get actual Error from ErrorEvent\n if (isErrorEvent(ex)) ex = ex.error;\n\n // Store the raw exception object for potential debugging and introspection\n this._lastCapturedException = ex;\n\n // TraceKit.report will re-raise any exception passed to it,\n // which means you have to wrap it in try/catch. Instead, we\n // can wrap it here and only re-raise if TraceKit.report\n // raises an exception different from the one we asked to\n // report on.\n try {\n var stack = TraceKit.computeStackTrace(ex);\n this._handleStackInfo(stack, options);\n } catch (ex1) {\n if (ex !== ex1) {\n throw ex1;\n }\n }\n\n return this;\n },\n\n /*\n * Manually send a message to Sentry\n *\n * @param {string} msg A plain message to be captured in Sentry\n * @param {object} options A specific set of options for this message [optional]\n * @return {Raven}\n */\n captureMessage: function(msg, options) {\n // config() automagically converts ignoreErrors from a list to a RegExp so we need to test for an\n // early call; we'll error on the side of logging anything called before configuration since it's\n // probably something you should see:\n if (\n !!this._globalOptions.ignoreErrors.test &&\n this._globalOptions.ignoreErrors.test(msg)\n ) {\n return;\n }\n\n options = options || {};\n\n var data = objectMerge(\n {\n message: msg + '' // Make sure it's actually a string\n },\n options\n );\n\n var ex;\n // Generate a \"synthetic\" stack trace from this point.\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it is NOT indicative\n // of a bug with Raven.js. Sentry generates synthetic traces either by configuration,\n // or if it catches a thrown object without a \"stack\" property.\n try {\n throw new Error(msg);\n } catch (ex1) {\n ex = ex1;\n }\n\n // null exception name so `Error` isn't prefixed to msg\n ex.name = null;\n var stack = TraceKit.computeStackTrace(ex);\n\n // stack[0] is `throw new Error(msg)` call itself, we are interested in the frame that was just before that, stack[1]\n var initialCall = stack.stack[1];\n\n var fileurl = (initialCall && initialCall.url) || '';\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n if (this._globalOptions.stacktrace || (options && options.stacktrace)) {\n options = objectMerge(\n {\n // fingerprint on msg, not stack trace (legacy behavior, could be\n // revisited)\n fingerprint: msg,\n // since we know this is a synthetic trace, the top N-most frames\n // MUST be from Raven.js, so mark them as in_app later by setting\n // trimHeadFrames\n trimHeadFrames: (options.trimHeadFrames || 0) + 1\n },\n options\n );\n\n var frames = this._prepareFrames(stack, options);\n data.stacktrace = {\n // Sentry expects frames oldest to newest\n frames: frames.reverse()\n };\n }\n\n // Fire away!\n this._send(data);\n\n return this;\n },\n\n captureBreadcrumb: function(obj) {\n var crumb = objectMerge(\n {\n timestamp: now() / 1000\n },\n obj\n );\n\n if (isFunction(this._globalOptions.breadcrumbCallback)) {\n var result = this._globalOptions.breadcrumbCallback(crumb);\n\n if (isObject(result) && !isEmptyObject(result)) {\n crumb = result;\n } else if (result === false) {\n return this;\n }\n }\n\n this._breadcrumbs.push(crumb);\n if (this._breadcrumbs.length > this._globalOptions.maxBreadcrumbs) {\n this._breadcrumbs.shift();\n }\n return this;\n },\n\n addPlugin: function(plugin /*arg1, arg2, ... argN*/) {\n var pluginArgs = [].slice.call(arguments, 1);\n\n this._plugins.push([plugin, pluginArgs]);\n if (this._isRavenInstalled) {\n this._drainPlugins();\n }\n\n return this;\n },\n\n /*\n * Set/clear a user to be sent along with the payload.\n *\n * @param {object} user An object representing user data [optional]\n * @return {Raven}\n */\n setUserContext: function(user) {\n // Intentionally do not merge here since that's an unexpected behavior.\n this._globalContext.user = user;\n\n return this;\n },\n\n /*\n * Merge extra attributes to be sent along with the payload.\n *\n * @param {object} extra An object representing extra data [optional]\n * @return {Raven}\n */\n setExtraContext: function(extra) {\n this._mergeContext('extra', extra);\n\n return this;\n },\n\n /*\n * Merge tags to be sent along with the payload.\n *\n * @param {object} tags An object representing tags [optional]\n * @return {Raven}\n */\n setTagsContext: function(tags) {\n this._mergeContext('tags', tags);\n\n return this;\n },\n\n /*\n * Clear all of the context.\n *\n * @return {Raven}\n */\n clearContext: function() {\n this._globalContext = {};\n\n return this;\n },\n\n /*\n * Get a copy of the current context. This cannot be mutated.\n *\n * @return {object} copy of context\n */\n getContext: function() {\n // lol javascript\n return JSON.parse(stringify(this._globalContext));\n },\n\n /*\n * Set environment of application\n *\n * @param {string} environment Typically something like 'production'.\n * @return {Raven}\n */\n setEnvironment: function(environment) {\n this._globalOptions.environment = environment;\n\n return this;\n },\n\n /*\n * Set release version of application\n *\n * @param {string} release Typically something like a git SHA to identify version\n * @return {Raven}\n */\n setRelease: function(release) {\n this._globalOptions.release = release;\n\n return this;\n },\n\n /*\n * Set the dataCallback option\n *\n * @param {function} callback The callback to run which allows the\n * data blob to be mutated before sending\n * @return {Raven}\n */\n setDataCallback: function(callback) {\n var original = this._globalOptions.dataCallback;\n this._globalOptions.dataCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the breadcrumbCallback option\n *\n * @param {function} callback The callback to run which allows filtering\n * or mutating breadcrumbs\n * @return {Raven}\n */\n setBreadcrumbCallback: function(callback) {\n var original = this._globalOptions.breadcrumbCallback;\n this._globalOptions.breadcrumbCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /*\n * Set the shouldSendCallback option\n *\n * @param {function} callback The callback to run which allows\n * introspecting the blob before sending\n * @return {Raven}\n */\n setShouldSendCallback: function(callback) {\n var original = this._globalOptions.shouldSendCallback;\n this._globalOptions.shouldSendCallback = keepOriginalCallback(original, callback);\n return this;\n },\n\n /**\n * Override the default HTTP transport mechanism that transmits data\n * to the Sentry server.\n *\n * @param {function} transport Function invoked instead of the default\n * `makeRequest` handler.\n *\n * @return {Raven}\n */\n setTransport: function(transport) {\n this._globalOptions.transport = transport;\n\n return this;\n },\n\n /*\n * Get the latest raw exception that was captured by Raven.\n *\n * @return {error}\n */\n lastException: function() {\n return this._lastCapturedException;\n },\n\n /*\n * Get the last event id\n *\n * @return {string}\n */\n lastEventId: function() {\n return this._lastEventId;\n },\n\n /*\n * Determine if Raven is setup and ready to go.\n *\n * @return {boolean}\n */\n isSetup: function() {\n if (!this._hasJSON) return false; // needs JSON support\n if (!this._globalServer) {\n if (!this.ravenNotConfiguredError) {\n this.ravenNotConfiguredError = true;\n this._logDebug('error', 'Error: Raven has not been configured.');\n }\n return false;\n }\n return true;\n },\n\n afterLoad: function() {\n // TODO: remove window dependence?\n\n // Attempt to initialize Raven on load\n var RavenConfig = _window.RavenConfig;\n if (RavenConfig) {\n this.config(RavenConfig.dsn, RavenConfig.config).install();\n }\n },\n\n showReportDialog: function(options) {\n if (\n !_document // doesn't work without a document (React native)\n )\n return;\n\n options = options || {};\n\n var lastEventId = options.eventId || this.lastEventId();\n if (!lastEventId) {\n throw new RavenConfigError('Missing eventId');\n }\n\n var dsn = options.dsn || this._dsn;\n if (!dsn) {\n throw new RavenConfigError('Missing DSN');\n }\n\n var encode = encodeURIComponent;\n var qs = '';\n qs += '?eventId=' + encode(lastEventId);\n qs += '&dsn=' + encode(dsn);\n\n var user = options.user || this._globalContext.user;\n if (user) {\n if (user.name) qs += '&name=' + encode(user.name);\n if (user.email) qs += '&email=' + encode(user.email);\n }\n\n var globalServer = this._getGlobalServer(this._parseDSN(dsn));\n\n var script = _document.createElement('script');\n script.async = true;\n script.src = globalServer + '/api/embed/error-page/' + qs;\n (_document.head || _document.body).appendChild(script);\n },\n\n /**** Private functions ****/\n _ignoreNextOnError: function() {\n var self = this;\n this._ignoreOnError += 1;\n setTimeout(function() {\n // onerror should trigger before setTimeout\n self._ignoreOnError -= 1;\n });\n },\n\n _triggerEvent: function(eventType, options) {\n // NOTE: `event` is a native browser thing, so let's avoid conflicting wiht it\n var evt, key;\n\n if (!this._hasDocument) return;\n\n options = options || {};\n\n eventType = 'raven' + eventType.substr(0, 1).toUpperCase() + eventType.substr(1);\n\n if (_document.createEvent) {\n evt = _document.createEvent('HTMLEvents');\n evt.initEvent(eventType, true, true);\n } else {\n evt = _document.createEventObject();\n evt.eventType = eventType;\n }\n\n for (key in options)\n if (hasKey(options, key)) {\n evt[key] = options[key];\n }\n\n if (_document.createEvent) {\n // IE9 if standards\n _document.dispatchEvent(evt);\n } else {\n // IE8 regardless of Quirks or Standards\n // IE9 if quirks\n try {\n _document.fireEvent('on' + evt.eventType.toLowerCase(), evt);\n } catch (e) {\n // Do nothing\n }\n }\n },\n\n /**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param evtName the event name (e.g. \"click\")\n * @returns {Function}\n * @private\n */\n _breadcrumbEventHandler: function(evtName) {\n var self = this;\n return function(evt) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n self._keypressTimeout = null;\n\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (self._lastCapturedEvent === evt) return;\n\n self._lastCapturedEvent = evt;\n\n // try/catch both:\n // - accessing evt.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // can throw an exception in some circumstances.\n var target;\n try {\n target = htmlTreeAsString(evt.target);\n } catch (e) {\n target = '<unknown>';\n }\n\n self.captureBreadcrumb({\n category: 'ui.' + evtName, // e.g. ui.click, ui.input\n message: target\n });\n };\n },\n\n /**\n * Wraps addEventListener to capture keypress UI events\n * @returns {Function}\n * @private\n */\n _keypressEventHandler: function() {\n var self = this,\n debounceDuration = 1000; // milliseconds\n\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function(evt) {\n var target;\n try {\n target = evt.target;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n var tagName = target && target.tagName;\n\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (\n !tagName ||\n (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)\n )\n return;\n\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n var timeout = self._keypressTimeout;\n if (!timeout) {\n self._breadcrumbEventHandler('input')(evt);\n }\n clearTimeout(timeout);\n self._keypressTimeout = setTimeout(function() {\n self._keypressTimeout = null;\n }, debounceDuration);\n };\n },\n\n /**\n * Captures a breadcrumb of type \"navigation\", normalizing input URLs\n * @param to the originating URL\n * @param from the target URL\n * @private\n */\n _captureUrlChange: function(from, to) {\n var parsedLoc = parseUrl(this._location.href);\n var parsedTo = parseUrl(to);\n var parsedFrom = parseUrl(from);\n\n // because onpopstate only tells you the \"new\" (to) value of location.href, and\n // not the previous (from) value, we need to track the value of the current URL\n // state ourselves\n this._lastHref = to;\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host)\n to = parsedTo.relative;\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host)\n from = parsedFrom.relative;\n\n this.captureBreadcrumb({\n category: 'navigation',\n data: {\n to: to,\n from: from\n }\n });\n },\n\n /**\n * Wrap timer functions and event targets to catch errors and provide\n * better metadata.\n */\n _instrumentTryCatch: function() {\n var self = this;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapTimeFn(orig) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n var originalCallback = args[0];\n if (isFunction(originalCallback)) {\n args[0] = self.wrap(originalCallback);\n }\n\n // IE < 9 doesn't support .call/.apply on setInterval/setTimeout, but it\n // also supports only two arguments and doesn't care what this is, so we\n // can just call the original function directly.\n if (orig.apply) {\n return orig.apply(this, args);\n } else {\n return orig(args[0], args[1]);\n }\n };\n }\n\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n function wrapEventTarget(global) {\n var proto = _window[global] && _window[global].prototype;\n if (proto && proto.hasOwnProperty && proto.hasOwnProperty('addEventListener')) {\n fill(\n proto,\n 'addEventListener',\n function(orig) {\n return function(evtName, fn, capture, secure) {\n // preserve arity\n try {\n if (fn && fn.handleEvent) {\n fn.handleEvent = self.wrap(fn.handleEvent);\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n // More breadcrumb DOM capture ... done here and not in `_instrumentBreadcrumbs`\n // so that we don't have more than one wrapper function\n var before, clickHandler, keypressHandler;\n\n if (\n autoBreadcrumbs &&\n autoBreadcrumbs.dom &&\n (global === 'EventTarget' || global === 'Node')\n ) {\n // NOTE: generating multiple handlers per addEventListener invocation, should\n // revisit and verify we can just use one (almost certainly)\n clickHandler = self._breadcrumbEventHandler('click');\n keypressHandler = self._keypressEventHandler();\n before = function(evt) {\n // need to intercept every DOM event in `before` argument, in case that\n // same wrapped method is re-used for different events (e.g. mousemove THEN click)\n // see #724\n if (!evt) return;\n\n var eventType;\n try {\n eventType = evt.type;\n } catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n if (eventType === 'click') return clickHandler(evt);\n else if (eventType === 'keypress') return keypressHandler(evt);\n };\n }\n return orig.call(\n this,\n evtName,\n self.wrap(fn, undefined, before),\n capture,\n secure\n );\n };\n },\n wrappedBuiltIns\n );\n fill(\n proto,\n 'removeEventListener',\n function(orig) {\n return function(evt, fn, capture, secure) {\n try {\n fn = fn && (fn.__raven_wrapper__ ? fn.__raven_wrapper__ : fn);\n } catch (e) {\n // ignore, accessing __raven_wrapper__ will throw in some Selenium environments\n }\n return orig.call(this, evt, fn, capture, secure);\n };\n },\n wrappedBuiltIns\n );\n }\n }\n\n fill(_window, 'setTimeout', wrapTimeFn, wrappedBuiltIns);\n fill(_window, 'setInterval', wrapTimeFn, wrappedBuiltIns);\n if (_window.requestAnimationFrame) {\n fill(\n _window,\n 'requestAnimationFrame',\n function(orig) {\n return function(cb) {\n return orig(self.wrap(cb));\n };\n },\n wrappedBuiltIns\n );\n }\n\n // event targets borrowed from bugsnag-js:\n // https://github.com/bugsnag/bugsnag-js/blob/master/src/bugsnag.js#L666\n var eventTargets = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload'\n ];\n for (var i = 0; i < eventTargets.length; i++) {\n wrapEventTarget(eventTargets[i]);\n }\n },\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - XMLHttpRequests\n * - DOM interactions (click/typing)\n * - window.location changes\n * - console\n *\n * Can be disabled or individually configured via the `autoBreadcrumbs` config option\n */\n _instrumentBreadcrumbs: function() {\n var self = this;\n var autoBreadcrumbs = this._globalOptions.autoBreadcrumbs;\n\n var wrappedBuiltIns = self._wrappedBuiltIns;\n\n function wrapProp(prop, xhr) {\n if (prop in xhr && isFunction(xhr[prop])) {\n fill(xhr, prop, function(orig) {\n return self.wrap(orig);\n }); // intentionally don't track filled methods on XHR instances\n }\n }\n\n if (autoBreadcrumbs.xhr && 'XMLHttpRequest' in _window) {\n var xhrproto = XMLHttpRequest.prototype;\n fill(\n xhrproto,\n 'open',\n function(origOpen) {\n return function(method, url) {\n // preserve arity\n\n // if Sentry key appears in URL, don't capture\n if (isString(url) && url.indexOf(self._globalKey) === -1) {\n this.__raven_xhr = {\n method: method,\n url: url,\n status_code: null\n };\n }\n\n return origOpen.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n\n fill(\n xhrproto,\n 'send',\n function(origSend) {\n return function(data) {\n // preserve arity\n var xhr = this;\n\n function onreadystatechangeHandler() {\n if (xhr.__raven_xhr && xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhr.__raven_xhr.status_code = xhr.status;\n } catch (e) {\n /* do nothing */\n }\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'xhr',\n data: xhr.__raven_xhr\n });\n }\n }\n\n var props = ['onload', 'onerror', 'onprogress'];\n for (var j = 0; j < props.length; j++) {\n wrapProp(props[j], xhr);\n }\n\n if ('onreadystatechange' in xhr && isFunction(xhr.onreadystatechange)) {\n fill(\n xhr,\n 'onreadystatechange',\n function(orig) {\n return self.wrap(orig, undefined, onreadystatechangeHandler);\n } /* intentionally don't track this instrumentation */\n );\n } else {\n // if onreadystatechange wasn't actually set by the page on this xhr, we\n // are free to set our own and capture the breadcrumb\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n\n return origSend.apply(this, arguments);\n };\n },\n wrappedBuiltIns\n );\n }\n\n if (autoBreadcrumbs.xhr && 'fetch' in _window) {\n fill(\n _window,\n 'fetch',\n function(origFetch) {\n return function(fn, t) {\n // preserve arity\n // Make a copy of the arguments to prevent deoptimization\n // https://github.com/petkaantonov/bluebird/wiki/Optimization-killers#32-leaking-arguments\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; ++i) {\n args[i] = arguments[i];\n }\n\n var fetchInput = args[0];\n var method = 'GET';\n var url;\n\n if (typeof fetchInput === 'string') {\n url = fetchInput;\n } else if ('Request' in _window && fetchInput instanceof _window.Request) {\n url = fetchInput.url;\n if (fetchInput.method) {\n method = fetchInput.method;\n }\n } else {\n url = '' + fetchInput;\n }\n\n if (args[1] && args[1].method) {\n method = args[1].method;\n }\n\n var fetchData = {\n method: method,\n url: url,\n status_code: null\n };\n\n self.captureBreadcrumb({\n type: 'http',\n category: 'fetch',\n data: fetchData\n });\n\n return origFetch.apply(this, args).then(function(response) {\n fetchData.status_code = response.status;\n\n return response;\n });\n };\n },\n wrappedBuiltIns\n );\n }\n\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n if (autoBreadcrumbs.dom && this._hasDocument) {\n if (_document.addEventListener) {\n _document.addEventListener('click', self._breadcrumbEventHandler('click'), false);\n _document.addEventListener('keypress', self._keypressEventHandler(), false);\n } else {\n // IE8 Compatibility\n _document.attachEvent('onclick', self._breadcrumbEventHandler('click'));\n _document.attachEvent('onkeypress', self._keypressEventHandler());\n }\n }\n\n // record navigation (URL) changes\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var chrome = _window.chrome;\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n var hasPushAndReplaceState =\n !isChromePackagedApp &&\n _window.history &&\n history.pushState &&\n history.replaceState;\n if (autoBreadcrumbs.location && hasPushAndReplaceState) {\n // TODO: remove onpopstate handler on uninstall()\n var oldOnPopState = _window.onpopstate;\n _window.onpopstate = function() {\n var currentHref = self._location.href;\n self._captureUrlChange(self._lastHref, currentHref);\n\n if (oldOnPopState) {\n return oldOnPopState.apply(this, arguments);\n }\n };\n\n var historyReplacementFunction = function(origHistFunction) {\n // note history.pushState.length is 0; intentionally not declaring\n // params to preserve 0 arity\n return function(/* state, title, url */) {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n\n // url argument is optional\n if (url) {\n // coerce to string (this is what pushState does)\n self._captureUrlChange(self._lastHref, url + '');\n }\n\n return origHistFunction.apply(this, arguments);\n };\n };\n\n fill(history, 'pushState', historyReplacementFunction, wrappedBuiltIns);\n fill(history, 'replaceState', historyReplacementFunction, wrappedBuiltIns);\n }\n\n if (autoBreadcrumbs.console && 'console' in _window && console.log) {\n // console\n var consoleMethodCallback = function(msg, data) {\n self.captureBreadcrumb({\n message: msg,\n level: data.level,\n category: 'console'\n });\n };\n\n each(['debug', 'info', 'warn', 'error', 'log'], function(_, level) {\n wrapConsoleMethod(console, level, consoleMethodCallback);\n });\n }\n },\n\n _restoreBuiltIns: function() {\n // restore any wrapped builtins\n var builtin;\n while (this._wrappedBuiltIns.length) {\n builtin = this._wrappedBuiltIns.shift();\n\n var obj = builtin[0],\n name = builtin[1],\n orig = builtin[2];\n\n obj[name] = orig;\n }\n },\n\n _drainPlugins: function() {\n var self = this;\n\n // FIX ME TODO\n each(this._plugins, function(_, plugin) {\n var installer = plugin[0];\n var args = plugin[1];\n installer.apply(self, [self].concat(args));\n });\n },\n\n _parseDSN: function(str) {\n var m = dsnPattern.exec(str),\n dsn = {},\n i = 7;\n\n try {\n while (i--) dsn[dsnKeys[i]] = m[i] || '';\n } catch (e) {\n throw new RavenConfigError('Invalid DSN: ' + str);\n }\n\n if (dsn.pass && !this._globalOptions.allowSecretKey) {\n throw new RavenConfigError(\n 'Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key'\n );\n }\n\n return dsn;\n },\n\n _getGlobalServer: function(uri) {\n // assemble the endpoint from the uri pieces\n var globalServer = '//' + uri.host + (uri.port ? ':' + uri.port : '');\n\n if (uri.protocol) {\n globalServer = uri.protocol + ':' + globalServer;\n }\n return globalServer;\n },\n\n _handleOnErrorStackInfo: function() {\n // if we are intentionally ignoring errors via onerror, bail out\n if (!this._ignoreOnError) {\n this._handleStackInfo.apply(this, arguments);\n }\n },\n\n _handleStackInfo: function(stackInfo, options) {\n var frames = this._prepareFrames(stackInfo, options);\n\n this._triggerEvent('handle', {\n stackInfo: stackInfo,\n options: options\n });\n\n this._processException(\n stackInfo.name,\n stackInfo.message,\n stackInfo.url,\n stackInfo.lineno,\n frames,\n options\n );\n },\n\n _prepareFrames: function(stackInfo, options) {\n var self = this;\n var frames = [];\n if (stackInfo.stack && stackInfo.stack.length) {\n each(stackInfo.stack, function(i, stack) {\n var frame = self._normalizeFrame(stack, stackInfo.url);\n if (frame) {\n frames.push(frame);\n }\n });\n\n // e.g. frames captured via captureMessage throw\n if (options && options.trimHeadFrames) {\n for (var j = 0; j < options.trimHeadFrames && j < frames.length; j++) {\n frames[j].in_app = false;\n }\n }\n }\n frames = frames.slice(0, this._globalOptions.stackTraceLimit);\n return frames;\n },\n\n _normalizeFrame: function(frame, stackInfoUrl) {\n // normalize the frames data\n var normalized = {\n filename: frame.url,\n lineno: frame.line,\n colno: frame.column,\n function: frame.func || '?'\n };\n\n // Case when we don't have any information about the error\n // E.g. throwing a string or raw object, instead of an `Error` in Firefox\n // Generating synthetic error doesn't add any value here\n //\n // We should probably somehow let a user know that they should fix their code\n if (!frame.url) {\n normalized.filename = stackInfoUrl; // fallback to whole stacks url from onerror handler\n }\n\n normalized.in_app = !// determine if an exception came from outside of our app\n // first we check the global includePaths list.\n (\n (!!this._globalOptions.includePaths.test &&\n !this._globalOptions.includePaths.test(normalized.filename)) ||\n // Now we check for fun, if the function name is Raven or TraceKit\n /(Raven|TraceKit)\\./.test(normalized['function']) ||\n // finally, we do a last ditch effort and check for raven.min.js\n /raven\\.(min\\.)?js$/.test(normalized.filename)\n );\n\n return normalized;\n },\n\n _processException: function(type, message, fileurl, lineno, frames, options) {\n var prefixedMessage = (type ? type + ': ' : '') + (message || '');\n if (\n !!this._globalOptions.ignoreErrors.test &&\n (this._globalOptions.ignoreErrors.test(message) ||\n this._globalOptions.ignoreErrors.test(prefixedMessage))\n ) {\n return;\n }\n\n var stacktrace;\n\n if (frames && frames.length) {\n fileurl = frames[0].filename || fileurl;\n // Sentry expects frames oldest to newest\n // and JS sends them as newest to oldest\n frames.reverse();\n stacktrace = {frames: frames};\n } else if (fileurl) {\n stacktrace = {\n frames: [\n {\n filename: fileurl,\n lineno: lineno,\n in_app: true\n }\n ]\n };\n }\n\n if (\n !!this._globalOptions.ignoreUrls.test &&\n this._globalOptions.ignoreUrls.test(fileurl)\n ) {\n return;\n }\n\n if (\n !!this._globalOptions.whitelistUrls.test &&\n !this._globalOptions.whitelistUrls.test(fileurl)\n ) {\n return;\n }\n\n var data = objectMerge(\n {\n // sentry.interfaces.Exception\n exception: {\n values: [\n {\n type: type,\n value: message,\n stacktrace: stacktrace\n }\n ]\n },\n culprit: fileurl\n },\n options\n );\n\n // Fire away!\n this._send(data);\n },\n\n _trimPacket: function(data) {\n // For now, we only want to truncate the two different messages\n // but this could/should be expanded to just trim everything\n var max = this._globalOptions.maxMessageLength;\n if (data.message) {\n data.message = truncate(data.message, max);\n }\n if (data.exception) {\n var exception = data.exception.values[0];\n exception.value = truncate(exception.value, max);\n }\n\n var request = data.request;\n if (request) {\n if (request.url) {\n request.url = truncate(request.url, this._globalOptions.maxUrlLength);\n }\n if (request.Referer) {\n request.Referer = truncate(request.Referer, this._globalOptions.maxUrlLength);\n }\n }\n\n if (data.breadcrumbs && data.breadcrumbs.values)\n this._trimBreadcrumbs(data.breadcrumbs);\n\n return data;\n },\n\n /**\n * Truncate breadcrumb values (right now just URLs)\n */\n _trimBreadcrumbs: function(breadcrumbs) {\n // known breadcrumb properties with urls\n // TODO: also consider arbitrary prop values that start with (https?)?://\n var urlProps = ['to', 'from', 'url'],\n urlProp,\n crumb,\n data;\n\n for (var i = 0; i < breadcrumbs.values.length; ++i) {\n crumb = breadcrumbs.values[i];\n if (\n !crumb.hasOwnProperty('data') ||\n !isObject(crumb.data) ||\n objectFrozen(crumb.data)\n )\n continue;\n\n data = objectMerge({}, crumb.data);\n for (var j = 0; j < urlProps.length; ++j) {\n urlProp = urlProps[j];\n if (data.hasOwnProperty(urlProp) && data[urlProp]) {\n data[urlProp] = truncate(data[urlProp], this._globalOptions.maxUrlLength);\n }\n }\n breadcrumbs.values[i].data = data;\n }\n },\n\n _getHttpData: function() {\n if (!this._hasNavigator && !this._hasDocument) return;\n var httpData = {};\n\n if (this._hasNavigator && _navigator.userAgent) {\n httpData.headers = {\n 'User-Agent': navigator.userAgent\n };\n }\n\n if (this._hasDocument) {\n if (_document.location && _document.location.href) {\n httpData.url = _document.location.href;\n }\n if (_document.referrer) {\n if (!httpData.headers) httpData.headers = {};\n httpData.headers.Referer = _document.referrer;\n }\n }\n\n return httpData;\n },\n\n _resetBackoff: function() {\n this._backoffDuration = 0;\n this._backoffStart = null;\n },\n\n _shouldBackoff: function() {\n return this._backoffDuration && now() - this._backoffStart < this._backoffDuration;\n },\n\n /**\n * Returns true if the in-process data payload matches the signature\n * of the previously-sent data\n *\n * NOTE: This has to be done at this level because TraceKit can generate\n * data from window.onerror WITHOUT an exception object (IE8, IE9,\n * other old browsers). This can take the form of an \"exception\"\n * data object with a single frame (derived from the onerror args).\n */\n _isRepeatData: function(current) {\n var last = this._lastData;\n\n if (\n !last ||\n current.message !== last.message || // defined for captureMessage\n current.culprit !== last.culprit // defined for captureException/onerror\n )\n return false;\n\n // Stacktrace interface (i.e. from captureMessage)\n if (current.stacktrace || last.stacktrace) {\n return isSameStacktrace(current.stacktrace, last.stacktrace);\n } else if (current.exception || last.exception) {\n // Exception interface (i.e. from captureException/onerror)\n return isSameException(current.exception, last.exception);\n }\n\n return true;\n },\n\n _setBackoffState: function(request) {\n // If we are already in a backoff state, don't change anything\n if (this._shouldBackoff()) {\n return;\n }\n\n var status = request.status;\n\n // 400 - project_id doesn't exist or some other fatal\n // 401 - invalid/revoked dsn\n // 429 - too many requests\n if (!(status === 400 || status === 401 || status === 429)) return;\n\n var retry;\n try {\n // If Retry-After is not in Access-Control-Expose-Headers, most\n // browsers will throw an exception trying to access it\n retry = request.getResponseHeader('Retry-After');\n retry = parseInt(retry, 10) * 1000; // Retry-After is returned in seconds\n } catch (e) {\n /* eslint no-empty:0 */\n }\n\n this._backoffDuration = retry\n ? // If Sentry server returned a Retry-After value, use it\n retry\n : // Otherwise, double the last backoff duration (starts at 1 sec)\n this._backoffDuration * 2 || 1000;\n\n this._backoffStart = now();\n },\n\n _send: function(data) {\n var globalOptions = this._globalOptions;\n\n var baseData = {\n project: this._globalProject,\n logger: globalOptions.logger,\n platform: 'javascript'\n },\n httpData = this._getHttpData();\n\n if (httpData) {\n baseData.request = httpData;\n }\n\n // HACK: delete `trimHeadFrames` to prevent from appearing in outbound payload\n if (data.trimHeadFrames) delete data.trimHeadFrames;\n\n data = objectMerge(baseData, data);\n\n // Merge in the tags and extra separately since objectMerge doesn't handle a deep merge\n data.tags = objectMerge(objectMerge({}, this._globalContext.tags), data.tags);\n data.extra = objectMerge(objectMerge({}, this._globalContext.extra), data.extra);\n\n // Send along our own collected metadata with extra\n data.extra['session:duration'] = now() - this._startTime;\n\n if (this._breadcrumbs && this._breadcrumbs.length > 0) {\n // intentionally make shallow copy so that additions\n // to breadcrumbs aren't accidentally sent in this request\n data.breadcrumbs = {\n values: [].slice.call(this._breadcrumbs, 0)\n };\n }\n\n // If there are no tags/extra, strip the key from the payload alltogther.\n if (isEmptyObject(data.tags)) delete data.tags;\n\n if (this._globalContext.user) {\n // sentry.interfaces.User\n data.user = this._globalContext.user;\n }\n\n // Include the environment if it's defined in globalOptions\n if (globalOptions.environment) data.environment = globalOptions.environment;\n\n // Include the release if it's defined in globalOptions\n if (globalOptions.release) data.release = globalOptions.release;\n\n // Include server_name if it's defined in globalOptions\n if (globalOptions.serverName) data.server_name = globalOptions.serverName;\n\n if (isFunction(globalOptions.dataCallback)) {\n data = globalOptions.dataCallback(data) || data;\n }\n\n // Why??????????\n if (!data || isEmptyObject(data)) {\n return;\n }\n\n // Check if the request should be filtered or not\n if (\n isFunction(globalOptions.shouldSendCallback) &&\n !globalOptions.shouldSendCallback(data)\n ) {\n return;\n }\n\n // Backoff state: Sentry server previously responded w/ an error (e.g. 429 - too many requests),\n // so drop requests until \"cool-off\" period has elapsed.\n if (this._shouldBackoff()) {\n this._logDebug('warn', 'Raven dropped error due to backoff: ', data);\n return;\n }\n\n if (typeof globalOptions.sampleRate === 'number') {\n if (Math.random() < globalOptions.sampleRate) {\n this._sendProcessedPayload(data);\n }\n } else {\n this._sendProcessedPayload(data);\n }\n },\n\n _getUuid: function() {\n return uuid4();\n },\n\n _sendProcessedPayload: function(data, callback) {\n var self = this;\n var globalOptions = this._globalOptions;\n\n if (!this.isSetup()) return;\n\n // Try and clean up the packet before sending by truncating long values\n data = this._trimPacket(data);\n\n // ideally duplicate error testing should occur *before* dataCallback/shouldSendCallback,\n // but this would require copying an un-truncated copy of the data packet, which can be\n // arbitrarily deep (extra_data) -- could be worthwhile? will revisit\n if (!this._globalOptions.allowDuplicates && this._isRepeatData(data)) {\n this._logDebug('warn', 'Raven dropped repeat event: ', data);\n return;\n }\n\n // Send along an event_id if not explicitly passed.\n // This event_id can be used to reference the error within Sentry itself.\n // Set lastEventId after we know the error should actually be sent\n this._lastEventId = data.event_id || (data.event_id = this._getUuid());\n\n // Store outbound payload after trim\n this._lastData = data;\n\n this._logDebug('debug', 'Raven about to send:', data);\n\n var auth = {\n sentry_version: '7',\n sentry_client: 'raven-js/' + this.VERSION,\n sentry_key: this._globalKey\n };\n\n if (this._globalSecret) {\n auth.sentry_secret = this._globalSecret;\n }\n\n var exception = data.exception && data.exception.values[0];\n this.captureBreadcrumb({\n category: 'sentry',\n message: exception\n ? (exception.type ? exception.type + ': ' : '') + exception.value\n : data.message,\n event_id: data.event_id,\n level: data.level || 'error' // presume error unless specified\n });\n\n var url = this._globalEndpoint;\n (globalOptions.transport || this._makeRequest).call(this, {\n url: url,\n auth: auth,\n data: data,\n options: globalOptions,\n onSuccess: function success() {\n self._resetBackoff();\n\n self._triggerEvent('success', {\n data: data,\n src: url\n });\n callback && callback();\n },\n onError: function failure(error) {\n self._logDebug('error', 'Raven transport failed to send: ', error);\n\n if (error.request) {\n self._setBackoffState(error.request);\n }\n\n self._triggerEvent('failure', {\n data: data,\n src: url\n });\n error = error || new Error('Raven send failed (no additional details provided)');\n callback && callback(error);\n }\n });\n },\n\n _makeRequest: function(opts) {\n var request = _window.XMLHttpRequest && new _window.XMLHttpRequest();\n if (!request) return;\n\n // if browser doesn't support CORS (e.g. IE7), we are out of luck\n var hasCORS = 'withCredentials' in request || typeof XDomainRequest !== 'undefined';\n\n if (!hasCORS) return;\n\n var url = opts.url;\n\n if ('withCredentials' in request) {\n request.onreadystatechange = function() {\n if (request.readyState !== 4) {\n return;\n } else if (request.status === 200) {\n opts.onSuccess && opts.onSuccess();\n } else if (opts.onError) {\n var err = new Error('Sentry error code: ' + request.status);\n err.request = request;\n opts.onError(err);\n }\n };\n } else {\n request = new XDomainRequest();\n // xdomainrequest cannot go http -> https (or vice versa),\n // so always use protocol relative\n url = url.replace(/^https?:/, '');\n\n // onreadystatechange not supported by XDomainRequest\n if (opts.onSuccess) {\n request.onload = opts.onSuccess;\n }\n if (opts.onError) {\n request.onerror = function() {\n var err = new Error('Sentry error code: XDomainRequest');\n err.request = request;\n opts.onError(err);\n };\n }\n }\n\n // NOTE: auth is intentionally sent as part of query string (NOT as custom\n // HTTP header) so as to avoid preflight CORS requests\n request.open('POST', url + '?' + urlencode(opts.auth));\n request.send(stringify(opts.data));\n },\n\n _logDebug: function(level) {\n if (this._originalConsoleMethods[level] && this.debug) {\n // In IE<10 console methods do not have their own 'apply' method\n Function.prototype.apply.call(\n this._originalConsoleMethods[level],\n this._originalConsole,\n [].slice.call(arguments, 1)\n );\n }\n },\n\n _mergeContext: function(key, context) {\n if (isUndefined(context)) {\n delete this._globalContext[key];\n } else {\n this._globalContext[key] = objectMerge(this._globalContext[key] || {}, context);\n }\n }\n};\n\n// Deprecations\nRaven.prototype.setUser = Raven.prototype.setUserContext;\nRaven.prototype.setReleaseContext = Raven.prototype.setRelease;\n\nmodule.exports = Raven;\n","var utils = require('../../src/utils');\n\n/*\n TraceKit - Cross brower stack traces\n\n This was originally forked from github.com/occ/TraceKit, but has since been\n largely re-written and is now maintained as part of raven-js. Tests for\n this are in test/vendor.\n\n MIT license\n*/\n\nvar TraceKit = {\n collectWindowErrors: true,\n debug: false\n};\n\n// This is to be defensive in environments where window does not exist (see https://github.com/getsentry/raven-js/pull/785)\nvar _window =\n typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n// global reference to slice\nvar _slice = [].slice;\nvar UNKNOWN_FUNCTION = '?';\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;\n\nfunction getLocationHref() {\n if (typeof document === 'undefined' || document.location == null) return '';\n\n return document.location.href;\n}\n\n/**\n * TraceKit.report: cross-browser processing of unhandled exceptions\n *\n * Syntax:\n * TraceKit.report.subscribe(function(stackInfo) { ... })\n * TraceKit.report.unsubscribe(function(stackInfo) { ... })\n * TraceKit.report(exception)\n * try { ...code... } catch(ex) { TraceKit.report(ex); }\n *\n * Supports:\n * - Firefox: full stack trace with line numbers, plus column number\n * on top frame; column number is not guaranteed\n * - Opera: full stack trace with line and column numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n * - IE: line and column number for the top frame only; some frames\n * may be missing, and column number is not guaranteed\n *\n * In theory, TraceKit should work on all of the following versions:\n * - IE5.5+ (only 8.0 tested)\n * - Firefox 0.9+ (only 3.5+ tested)\n * - Opera 7+ (only 10.50 tested; versions 9 and earlier may require\n * Exceptions Have Stacktrace to be enabled in opera:config)\n * - Safari 3+ (only 4+ tested)\n * - Chrome 1+ (only 5+ tested)\n * - Konqueror 3.5+ (untested)\n *\n * Requires TraceKit.computeStackTrace.\n *\n * Tries to catch all unhandled exceptions and report them to the\n * subscribed handlers. Please note that TraceKit.report will rethrow the\n * exception. This is REQUIRED in order to get a useful stack trace in IE.\n * If the exception does not reach the top of the browser, you will only\n * get a stack trace from the point where TraceKit.report was called.\n *\n * Handlers receive a stackInfo object as described in the\n * TraceKit.computeStackTrace docs.\n */\nTraceKit.report = (function reportModuleWrapper() {\n var handlers = [],\n lastArgs = null,\n lastException = null,\n lastExceptionStack = null;\n\n /**\n * Add a crash handler.\n * @param {Function} handler\n */\n function subscribe(handler) {\n installGlobalHandler();\n handlers.push(handler);\n }\n\n /**\n * Remove a crash handler.\n * @param {Function} handler\n */\n function unsubscribe(handler) {\n for (var i = handlers.length - 1; i >= 0; --i) {\n if (handlers[i] === handler) {\n handlers.splice(i, 1);\n }\n }\n }\n\n /**\n * Remove all crash handlers.\n */\n function unsubscribeAll() {\n uninstallGlobalHandler();\n handlers = [];\n }\n\n /**\n * Dispatch stack information to all handlers.\n * @param {Object.<string, *>} stack\n */\n function notifyHandlers(stack, isWindowError) {\n var exception = null;\n if (isWindowError && !TraceKit.collectWindowErrors) {\n return;\n }\n for (var i in handlers) {\n if (handlers.hasOwnProperty(i)) {\n try {\n handlers[i].apply(null, [stack].concat(_slice.call(arguments, 2)));\n } catch (inner) {\n exception = inner;\n }\n }\n }\n\n if (exception) {\n throw exception;\n }\n }\n\n var _oldOnerrorHandler, _onErrorHandlerInstalled;\n\n /**\n * Ensures all global unhandled exceptions are recorded.\n * Supported by Gecko and IE.\n * @param {string} message Error message.\n * @param {string} url URL of script that generated the exception.\n * @param {(number|string)} lineNo The line number at which the error\n * occurred.\n * @param {?(number|string)} colNo The column number at which the error\n * occurred.\n * @param {?Error} ex The actual Error object.\n */\n function traceKitWindowOnError(message, url, lineNo, colNo, ex) {\n var stack = null;\n\n if (lastExceptionStack) {\n TraceKit.computeStackTrace.augmentStackTraceWithInitialElement(\n lastExceptionStack,\n url,\n lineNo,\n message\n );\n processLastException();\n } else if (ex && utils.isError(ex)) {\n // non-string `ex` arg; attempt to extract stack trace\n\n // New chrome and blink send along a real error object\n // Let's just report that like a normal error.\n // See: https://mikewest.org/2013/08/debugging-runtime-errors-with-window-onerror\n stack = TraceKit.computeStackTrace(ex);\n notifyHandlers(stack, true);\n } else {\n var location = {\n url: url,\n line: lineNo,\n column: colNo\n };\n\n var name = undefined;\n var msg = message; // must be new var or will modify original `arguments`\n var groups;\n if ({}.toString.call(message) === '[object String]') {\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n msg = groups[2];\n }\n }\n\n location.func = UNKNOWN_FUNCTION;\n\n stack = {\n name: name,\n message: msg,\n url: getLocationHref(),\n stack: [location]\n };\n notifyHandlers(stack, true);\n }\n\n if (_oldOnerrorHandler) {\n return _oldOnerrorHandler.apply(this, arguments);\n }\n\n return false;\n }\n\n function installGlobalHandler() {\n if (_onErrorHandlerInstalled) {\n return;\n }\n _oldOnerrorHandler = _window.onerror;\n _window.onerror = traceKitWindowOnError;\n _onErrorHandlerInstalled = true;\n }\n\n function uninstallGlobalHandler() {\n if (!_onErrorHandlerInstalled) {\n return;\n }\n _window.onerror = _oldOnerrorHandler;\n _onErrorHandlerInstalled = false;\n _oldOnerrorHandler = undefined;\n }\n\n function processLastException() {\n var _lastExceptionStack = lastExceptionStack,\n _lastArgs = lastArgs;\n lastArgs = null;\n lastExceptionStack = null;\n lastException = null;\n notifyHandlers.apply(null, [_lastExceptionStack, false].concat(_lastArgs));\n }\n\n /**\n * Reports an unhandled Error to TraceKit.\n * @param {Error} ex\n * @param {?boolean} rethrow If false, do not re-throw the exception.\n * Only used for window.onerror to not cause an infinite loop of\n * rethrowing.\n */\n function report(ex, rethrow) {\n var args = _slice.call(arguments, 1);\n if (lastExceptionStack) {\n if (lastException === ex) {\n return; // already caught by an inner catch block, ignore\n } else {\n processLastException();\n }\n }\n\n var stack = TraceKit.computeStackTrace(ex);\n lastExceptionStack = stack;\n lastException = ex;\n lastArgs = args;\n\n // If the stack trace is incomplete, wait for 2 seconds for\n // slow slow IE to see if onerror occurs or not before reporting\n // this exception; otherwise, we will end up with an incomplete\n // stack trace\n setTimeout(function() {\n if (lastException === ex) {\n processLastException();\n }\n }, stack.incomplete ? 2000 : 0);\n\n if (rethrow !== false) {\n throw ex; // re-throw to propagate to the top level (and cause window.onerror)\n }\n }\n\n report.subscribe = subscribe;\n report.unsubscribe = unsubscribe;\n report.uninstall = unsubscribeAll;\n return report;\n})();\n\n/**\n * TraceKit.computeStackTrace: cross-browser stack traces in JavaScript\n *\n * Syntax:\n * s = TraceKit.computeStackTrace(exception) // consider using TraceKit.report instead (see below)\n * Returns:\n * s.name - exception name\n * s.message - exception message\n * s.stack[i].url - JavaScript or HTML file URL\n * s.stack[i].func - function name, or empty for anonymous functions (if guessing did not work)\n * s.stack[i].args - arguments passed to the function, if known\n * s.stack[i].line - line number, if known\n * s.stack[i].column - column number, if known\n *\n * Supports:\n * - Firefox: full stack trace with line numbers and unreliable column\n * number on top frame\n * - Opera 10: full stack trace with line and column numbers\n * - Opera 9-: full stack trace with line numbers\n * - Chrome: full stack trace with line and column numbers\n * - Safari: line and column number for the topmost stacktrace element\n * only\n * - IE: no line numbers whatsoever\n *\n * Tries to guess names of anonymous functions by looking for assignments\n * in the source code. In IE and Safari, we have to guess source file names\n * by searching for function bodies inside all page scripts. This will not\n * work for scripts that are loaded cross-domain.\n * Here be dragons: some function names may be guessed incorrectly, and\n * duplicate functions may be mismatched.\n *\n * TraceKit.computeStackTrace should only be used for tracing purposes.\n * Logging of unhandled exceptions should be done with TraceKit.report,\n * which builds on top of TraceKit.computeStackTrace and provides better\n * IE support by utilizing the window.onerror event to retrieve information\n * about the top of the stack.\n *\n * Note: In IE and Safari, no stack trace is recorded on the Error object,\n * so computeStackTrace instead walks its *own* chain of callers.\n * This means that:\n * * in Safari, some methods may be missing from the stack trace;\n * * in IE, the topmost function in the stack trace will always be the\n * caller of computeStackTrace.\n *\n * This is okay for tracing (because you are likely to be calling\n * computeStackTrace from the function you want to be the topmost element\n * of the stack trace anyway), but not okay for logging unhandled\n * exceptions (because your catch block will likely be far away from the\n * inner function that actually caused the exception).\n *\n */\nTraceKit.computeStackTrace = (function computeStackTraceWrapper() {\n // Contents of Exception in various browsers.\n //\n // SAFARI:\n // ex.message = Can't find variable: qq\n // ex.line = 59\n // ex.sourceId = 580238192\n // ex.sourceURL = http://...\n // ex.expressionBeginOffset = 96\n // ex.expressionCaretOffset = 98\n // ex.expressionEndOffset = 98\n // ex.name = ReferenceError\n //\n // FIREFOX:\n // ex.message = qq is not defined\n // ex.fileName = http://...\n // ex.lineNumber = 59\n // ex.columnNumber = 69\n // ex.stack = ...stack trace... (see the example below)\n // ex.name = ReferenceError\n //\n // CHROME:\n // ex.message = qq is not defined\n // ex.name = ReferenceError\n // ex.type = not_defined\n // ex.arguments = ['aa']\n // ex.stack = ...stack trace...\n //\n // INTERNET EXPLORER:\n // ex.message = ...\n // ex.name = ReferenceError\n //\n // OPERA:\n // ex.message = ...message... (see the example below)\n // ex.name = ReferenceError\n // ex.opera#sourceloc = 11 (pretty much useless, duplicates the info in ex.message)\n // ex.stacktrace = n/a; see 'opera:config#UserPrefs|Exceptions Have Stacktrace'\n\n /**\n * Computes stack trace information from the stack property.\n * Chrome and Gecko use this property.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceFromStackProp(ex) {\n if (typeof ex.stack === 'undefined' || !ex.stack) return;\n\n var chrome = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i,\n gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i,\n winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i,\n // Used to additionally parse URL/line/column from eval frames\n geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i,\n chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/,\n lines = ex.stack.split('\\n'),\n stack = [],\n submatch,\n parts,\n element,\n reference = /^(.*) is undefined$/.exec(ex.message);\n\n for (var i = 0, j = lines.length; i < j; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n url: !isNative ? parts[2] : null,\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n } else if ((parts = gecko.exec(lines[i]))) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = null; // no column when eval\n } else if (i === 0 && !parts[5] && typeof ex.columnNumber !== 'undefined') {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null\n };\n } else {\n continue;\n }\n\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n\n stack.push(element);\n }\n\n if (!stack.length) {\n return null;\n }\n\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n }\n\n /**\n * Adds information about the first frame to incomplete stack traces.\n * Safari and IE require this to get complete data on the first frame.\n * @param {Object.<string, *>} stackInfo Stack trace information from\n * one of the compute* methods.\n * @param {string} url The URL of the script that caused an error.\n * @param {(number|string)} lineNo The line number of the script that\n * caused an error.\n * @param {string=} message The error generated by the browser, which\n * hopefully contains the name of the object that caused the error.\n * @return {boolean} Whether or not the stack information was\n * augmented.\n */\n function augmentStackTraceWithInitialElement(stackInfo, url, lineNo, message) {\n var initial = {\n url: url,\n line: lineNo\n };\n\n if (initial.url && initial.line) {\n stackInfo.incomplete = false;\n\n if (!initial.func) {\n initial.func = UNKNOWN_FUNCTION;\n }\n\n if (stackInfo.stack.length > 0) {\n if (stackInfo.stack[0].url === initial.url) {\n if (stackInfo.stack[0].line === initial.line) {\n return false; // already in stack trace\n } else if (\n !stackInfo.stack[0].line &&\n stackInfo.stack[0].func === initial.func\n ) {\n stackInfo.stack[0].line = initial.line;\n return false;\n }\n }\n }\n\n stackInfo.stack.unshift(initial);\n stackInfo.partial = true;\n return true;\n } else {\n stackInfo.incomplete = true;\n }\n\n return false;\n }\n\n /**\n * Computes stack trace information by walking the arguments.caller\n * chain at the time the exception occurred. This will cause earlier\n * frames to be missed but is the only way to get any stack trace in\n * Safari and IE. The top frame is restored by\n * {@link augmentStackTraceWithInitialElement}.\n * @param {Error} ex\n * @return {?Object.<string, *>} Stack trace information.\n */\n function computeStackTraceByWalkingCallerChain(ex, depth) {\n var functionName = /function\\s+([_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*)?\\s*\\(/i,\n stack = [],\n funcs = {},\n recursion = false,\n parts,\n item,\n source;\n\n for (\n var curr = computeStackTraceByWalkingCallerChain.caller;\n curr && !recursion;\n curr = curr.caller\n ) {\n if (curr === computeStackTrace || curr === TraceKit.report) {\n // console.log('skipping internal function');\n continue;\n }\n\n item = {\n url: null,\n func: UNKNOWN_FUNCTION,\n line: null,\n column: null\n };\n\n if (curr.name) {\n item.func = curr.name;\n } else if ((parts = functionName.exec(curr.toString()))) {\n item.func = parts[1];\n }\n\n if (typeof item.func === 'undefined') {\n try {\n item.func = parts.input.substring(0, parts.input.indexOf('{'));\n } catch (e) {}\n }\n\n if (funcs['' + curr]) {\n recursion = true;\n } else {\n funcs['' + curr] = true;\n }\n\n stack.push(item);\n }\n\n if (depth) {\n // console.log('depth is ' + depth);\n // console.log('stack is ' + stack.length);\n stack.splice(0, depth);\n }\n\n var result = {\n name: ex.name,\n message: ex.message,\n url: getLocationHref(),\n stack: stack\n };\n augmentStackTraceWithInitialElement(\n result,\n ex.sourceURL || ex.fileName,\n ex.line || ex.lineNumber,\n ex.message || ex.description\n );\n return result;\n }\n\n /**\n * Computes a stack trace for an exception.\n * @param {Error} ex\n * @param {(string|number)=} depth\n */\n function computeStackTrace(ex, depth) {\n var stack = null;\n depth = depth == null ? 0 : +depth;\n\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n\n try {\n stack = computeStackTraceByWalkingCallerChain(ex, depth + 1);\n if (stack) {\n return stack;\n }\n } catch (e) {\n if (TraceKit.debug) {\n throw e;\n }\n }\n return {\n name: ex.name,\n message: ex.message,\n url: getLocationHref()\n };\n }\n\n computeStackTrace.augmentStackTraceWithInitialElement = augmentStackTraceWithInitialElement;\n computeStackTrace.computeStackTraceFromStackProp = computeStackTraceFromStackProp;\n\n return computeStackTrace;\n})();\n\nmodule.exports = TraceKit;\n","/*\n json-stringify-safe\n Like JSON.stringify, but doesn't throw on circular references.\n\n Originally forked from https://github.com/isaacs/json-stringify-safe\n version 5.0.1 on 3/8/2017 and modified to handle Errors serialization\n and IE8 compatibility. Tests for this are in test/vendor.\n\n ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE\n*/\n\nexports = module.exports = stringify;\nexports.getSerialize = serializer;\n\nfunction indexOf(haystack, needle) {\n for (var i = 0; i < haystack.length; ++i) {\n if (haystack[i] === needle) return i;\n }\n return -1;\n}\n\nfunction stringify(obj, replacer, spaces, cycleReplacer) {\n return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces);\n}\n\n// https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106\nfunction stringifyError(value) {\n var err = {\n // These properties are implemented as magical getters and don't show up in for in\n stack: value.stack,\n message: value.message,\n name: value.name\n };\n\n for (var i in value) {\n if (Object.prototype.hasOwnProperty.call(value, i)) {\n err[i] = value[i];\n }\n }\n\n return err;\n}\n\nfunction serializer(replacer, cycleReplacer) {\n var stack = [];\n var keys = [];\n\n if (cycleReplacer == null) {\n cycleReplacer = function(key, value) {\n if (stack[0] === value) {\n return '[Circular ~]';\n }\n return '[Circular ~.' + keys.slice(0, indexOf(stack, value)).join('.') + ']';\n };\n }\n\n return function(key, value) {\n if (stack.length > 0) {\n var thisPos = indexOf(stack, this);\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\n\n if (~indexOf(stack, value)) {\n value = cycleReplacer.call(this, key, value);\n }\n } else {\n stack.push(value);\n }\n\n return replacer == null\n ? value instanceof Error ? stringifyError(value) : value\n : replacer.call(this, key, value);\n };\n}\n","function RavenConfigError(message) {\n this.name = 'RavenConfigError';\n this.message = message;\n}\nRavenConfigError.prototype = new Error();\nRavenConfigError.prototype.constructor = RavenConfigError;\n\nmodule.exports = RavenConfigError;\n","var wrapMethod = function(console, level, callback) {\n var originalConsoleLevel = console[level];\n var originalConsole = console;\n\n if (!(level in console)) {\n return;\n }\n\n var sentryLevel = level === 'warn' ? 'warning' : level;\n\n console[level] = function() {\n var args = [].slice.call(arguments);\n\n var msg = '' + args.join(' ');\n var data = {level: sentryLevel, logger: 'console', extra: {arguments: args}};\n\n if (level === 'assert') {\n if (args[0] === false) {\n // Default browsers message\n msg = 'Assertion failed: ' + (args.slice(1).join(' ') || 'console.assert');\n data.extra.arguments = args.slice(1);\n callback && callback(msg, data);\n }\n } else {\n callback && callback(msg, data);\n }\n\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n // IE9 doesn't allow calling apply on console functions directly\n // See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193\n Function.prototype.apply.call(originalConsoleLevel, originalConsole, args);\n }\n };\n};\n\nmodule.exports = {\n wrapMethod: wrapMethod\n};\n","const {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n leadinPluginVersion,\n nonce,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n} = window.leadinConfig;\n\nconst i18n = window.leadinI18n;\n\nexport {\n adminUrl,\n ajaxUrl,\n env,\n hubspotBaseUrl,\n i18n,\n leadinPluginVersion,\n nonce,\n plugins,\n phpVersion,\n portalId,\n theme,\n wpVersion,\n};\n","import Raven from 'raven-js';\nimport {\n env,\n phpVersion,\n wpVersion,\n leadinPluginVersion,\n portalId,\n plugins,\n} from '../constants/leadinConfig';\n\nexport function configureRaven() {\n if (env !== 'prod') {\n return;\n }\n\n Raven.config(\n 'https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1',\n {\n instrument: {\n tryCatch: false,\n },\n }\n ).install();\n\n Raven.setTagsContext({\n leadin: leadinPluginVersion,\n php: phpVersion,\n wordpress: wpVersion,\n });\n\n Raven.setUserContext({\n hub: portalId,\n plugins: Object.keys(plugins)\n .map(name => `${name}#${plugins[name].Version}`)\n .join(','),\n });\n}\n\nexport default Raven;\n","import { hubspotBaseUrl, portalId, i18n } from './constants/leadinConfig';\n\nfunction addMenuItem(text, href) {\n jQuery('#toplevel_page_leadin')\n .find('li')\n .last()\n .before(`<li><a href=\"${href}\" target=\"_blank\">${text}</a></li>`);\n}\n\nexport function addExternalLinks() {\n const chatflowsUrl = `${hubspotBaseUrl}/chatflows/${portalId}`;\n const emailUrl = `${hubspotBaseUrl}/email/${portalId}`;\n addMenuItem(i18n.chatflows, chatflowsUrl);\n addMenuItem(i18n.email, emailUrl);\n}\n","export function log(...args) {\n try {\n if (window.localStorage.LEADIN_DEBUG) {\n args.unshift('[Leadin]');\n console.log(...args);\n }\n } catch (e) {\n //\n }\n}\n","export const domElements = {\n iframe: '#leadin-iframe',\n spaNavigationButtons:\n '.toplevel_page_leadin > a, a[href=\"admin.php?page=leadin_forms\"], a[href=\"admin.php?page=leadin_settings\"]',\n subMenuButtons: '.toplevel_page_leadin > ul > li',\n};\n","import EventBus from './EventBus';\nimport { log } from '../utils';\nimport { domElements } from '../constants/selectors';\nimport { hubspotBaseUrl } from '../constants/leadinConfig';\nimport Raven from './Raven';\n\nconst eventBus = new EventBus();\nconst callbacks = [];\n\nfunction postMessageObject(message) {\n log('Posting message');\n log(JSON.stringify(message));\n jQuery(domElements.iframe)[0].contentWindow.postMessage(\n JSON.stringify(message),\n hubspotBaseUrl\n );\n}\n\nfunction reply(message, response) {\n if (!response) {\n response = 'Message Received';\n }\n const newMessage = Object.assign({}, message);\n newMessage.response = response;\n postMessageObject(newMessage);\n}\n\nfunction handleResponse(message) {\n callbacks[message._callbackId - 1](message.response);\n}\n\nfunction handleMessage(message) {\n log('Received message');\n log(JSON.stringify(message));\n\n if (message.response && message._callbackId) {\n handleResponse(message);\n } else {\n Object.keys(message).forEach(key => {\n eventBus.trigger(key, [message[key], reply.bind(null, message)]);\n });\n }\n}\n\nfunction handleMessageEvent(event) {\n if (event.origin === hubspotBaseUrl) {\n try {\n const data = JSON.parse(event.data);\n handleMessage(data);\n } catch (e) {\n // Error in parsing message\n }\n }\n}\n\nexport function postMessage(key, payload, onResponse, onTimeout, timeout) {\n if (!timeout) {\n timeout = 500;\n }\n\n const timeoutCallback = function() {\n const errorMessage = `LeadinWordpressPlugin postMessage response timeout on message key: ${key}`;\n log(errorMessage);\n Raven.captureMessage(errorMessage);\n onTimeout();\n };\n\n const timeoutId = setTimeout(Raven.wrap(timeoutCallback), timeout);\n\n const message = {};\n message[key] = payload;\n message._callbackId = callbacks.push((...args) => {\n clearTimeout(timeoutId);\n onResponse(...args);\n });\n postMessageObject(message);\n}\n\nexport function onMessage(key, callback) {\n eventBus.on(key, (...args) => {\n callback.apply(null, args.slice(1));\n });\n}\n\nexport function initInterframe() {\n window.addEventListener('message', handleMessageEvent);\n}\n","import Raven from './Raven';\n\nexport default class EventBus {\n constructor() {\n this.bus = jQuery({});\n }\n\n trigger(...args) {\n this.bus.trigger(...args);\n }\n\n on(event, callback) {\n this.bus.on(event, Raven.wrap(callback));\n }\n}\n","import Raven from '../lib/Raven';\nimport { ajaxUrl, nonce } from '../constants/leadinConfig';\n\nfunction makeRequest(action, method, payload, success, error) {\n const url = `${ajaxUrl}?action=${action}&_ajax_nonce=${nonce}`;\n const ajaxPayload = {\n url,\n method,\n contentType: 'application/json',\n success:\n typeof success === 'function'\n ? Raven.wrap(data => success(JSON.parse(data)))\n : undefined,\n error: Raven.wrap(jqXHR => {\n let message;\n try {\n message = JSON.parse(jqXHR.responseText).error;\n } catch (e) {\n message = jqXHR.responseText;\n }\n\n Raven.captureMessage(\n `AJAX request failed with code ${jqXHR.status}: ${message}`\n );\n\n if (typeof error === 'function') {\n error();\n }\n }),\n };\n\n if (payload) {\n ajaxPayload.data = JSON.stringify(payload);\n }\n\n jQuery.ajax(ajaxPayload);\n}\n\nfunction post(action, payload, success, error) {\n return makeRequest(action, 'POST', payload, success, error);\n}\n\nfunction get(action, success, error) {\n return makeRequest(action, 'GET', null, success, error);\n}\n\nconst getPortal = () => get('leadin_get_portal');\nlet portalPollingTimeout;\nlet stopPortalPolling = false;\n\nexport function startPortalIdPolling() {\n portalPollingTimeout = setTimeout(() => {\n getPortal(data => {\n if (data.portalId) {\n location.reload(true);\n } else if (!stopPortalPolling) {\n startPortalIdPolling();\n }\n }, startPortalIdPolling);\n }, 5000);\n}\n\nexport function clearPortalIdPolling() {\n clearTimeout(portalPollingTimeout);\n stopPortalPolling = true;\n}\n\nexport const connect = (portalId, success, error) =>\n post('leadin_registration_ajax', { portalId }, success, error);\n\nexport const disconnect = post.bind(null, 'leadin_disconnect_ajax', {});\nexport const getDomain = get.bind(null, 'leadin_get_domain');\n","import { onMessage, postMessage } from '../lib/Interframe';\n\nfunction createHandler(key) {\n return onMessage.bind(null, key);\n}\n\nexport const onClearQueryParam = createHandler('leadin_clear_query_param');\nexport const onConnect = createHandler('leadin_connect_portal');\nexport const onDisableNavigation = createHandler('leadin_disable_navigation');\nexport const onDisconnect = createHandler('leadin_disconnect_portal');\nexport const onEnterFullScreen = createHandler('leadin_enter_fullscreen');\nexport const onExitFullScreen = createHandler('leadin_exit_fullscreen');\nexport const onGetAssetsPayload = createHandler('leadin_get_assets_payload');\nexport const onGetDomain = createHandler('leadin_get_wp_domain');\nexport const onInitNavigation = createHandler('leadin_init_navigation');\nexport const onInterframeReady = createHandler('leadin_interframe_ready');\nexport const onPageReload = createHandler('leadin_page_reload');\nexport const onUpgrade = createHandler('leadin_upgrade');\nexport const onSyncRoute = createHandler('leadin_sync_route');\n\nexport function changeRoute(route) {\n postMessage('leadin_change_route', route, null, () => location.reload(true));\n}\n","export const validAppRoutes = ['forms', 'settings'];\n","import Raven from './lib/Raven';\nimport { domElements } from './constants/selectors';\nimport { changeRoute } from './api/hubspotPluginApi';\nimport { validAppRoutes } from './constants/routes';\n\nexport function initNavigation() {\n function setSelectedMenuItem() {\n jQuery(domElements.subMenuButtons).removeClass('current');\n const pageParam = window.location.search.match(/\\?page=leadin_?\\w*/)[0]; // filter page query param\n const selectedElement = jQuery(`a[href=\"admin.php${pageParam}\"]`);\n selectedElement.parent().addClass('current');\n }\n\n function handleNavigation() {\n let appRoute = window.location.search.match(/page=leadin_?(\\w*)/)[1];\n\n // prefix route with /\n if (appRoute) {\n appRoute = `/${appRoute}`;\n }\n\n changeRoute(appRoute);\n setSelectedMenuItem();\n }\n\n function handleClick() {\n // Don't interrupt modifier keys\n if (event.metaKey || event.altKey || event.shiftKey) {\n return;\n }\n window.history.pushState(null, null, jQuery(this).attr('href'));\n handleNavigation();\n event.preventDefault();\n }\n\n // Browser back and forward events navigation\n window.addEventListener('popstate', handleNavigation);\n\n // Menu Navigation\n jQuery(domElements.spaNavigationButtons).click(Raven.wrap(handleClick));\n}\n\n// Given a route like \"/settings/forms\", parse it into \"?page=leadin_settings&leadin_route[0]=forms\"\nexport function syncRoute(path = '') {\n const routes = path.split('/');\n\n while (routes[0] === '') {\n routes.shift();\n }\n\n let appRoute = '';\n\n if (validAppRoutes.includes(routes[0])) {\n appRoute = `_${routes[0]}`;\n routes.shift();\n }\n\n const queryParamsRoutes = routes.reduce((acc, route, index) => {\n return `${acc}&${encodeURIComponent(`leadin_route[${index}]`)}=${route}`;\n }, '');\n\n window.history.replaceState(\n null,\n null,\n `?page=leadin${appRoute}${queryParamsRoutes}`\n );\n}\n\nexport function disableNavigation() {\n jQuery(domElements.allMenuButtons).off('click');\n}\n","export default {\n 'genesis-sample': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0073e5',\n },\n chatStyle: {\n accentColor: '#0073e5',\n },\n onScrollLeadFlowStyle: {\n color: '#0073e5',\n },\n onExitLeadFlowStyle: {\n color: '#0073e5',\n },\n },\n 'academy-pro': {\n formsStyle: {\n fontFamily: 'PT Sans',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e22c2f',\n },\n chatStyle: {\n accentColor: '#e22c2f',\n },\n onScrollLeadFlowStyle: {\n color: '#e22c2f',\n },\n onExitLeadFlowStyle: {\n color: '#e22c2f',\n },\n },\n 'agency-pro': {\n formsStyle: {\n fontFamily: 'EB Garamond',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#d7c603',\n },\n chatStyle: {\n accentColor: '#d7c603',\n },\n onScrollLeadFlowStyle: {\n color: '#d7c603',\n },\n onExitLeadFlowStyle: {\n color: '#d7c603',\n },\n },\n 'agentpress-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#1a212b',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#d23836',\n },\n chatStyle: {\n accentColor: '#d23836',\n },\n onScrollLeadFlowStyle: {\n color: '#d23836',\n },\n onExitLeadFlowStyle: {\n color: '#d23836',\n },\n },\n 'altitude-pro': {\n formsStyle: {\n fontFamily: 'Ek Mukta',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#079bc4',\n },\n chatStyle: {\n accentColor: '#079bc4',\n },\n onScrollLeadFlowStyle: {\n color: '#079bc4',\n },\n onExitLeadFlowStyle: {\n color: '#079bc4',\n },\n },\n 'ambiance-pro': {\n formsStyle: {\n fontFamily: 'Merriweather',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e12727',\n },\n chatStyle: {\n accentColor: '#e12727',\n },\n onScrollLeadFlowStyle: {\n color: '#e12727',\n },\n onExitLeadFlowStyle: {\n color: '#e12727',\n },\n },\n 'atmosphere-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'author-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'authority-pro': {\n formsStyle: {\n fontFamily: 'Libre Baskerville',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000cff',\n },\n chatStyle: {\n accentColor: '#000cff',\n },\n onScrollLeadFlowStyle: {\n color: '#000cff',\n },\n onExitLeadFlowStyle: {\n color: '#000cff',\n },\n },\n 'beautiful-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#666666',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#e5554e',\n },\n chatStyle: {\n accentColor: '#e5554e',\n },\n onScrollLeadFlowStyle: {\n color: '#e5554e',\n },\n onExitLeadFlowStyle: {\n color: '#e5554e',\n },\n },\n 'breakthrough-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#4e4756',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#4a4f9b',\n },\n chatStyle: {\n accentColor: '#4a4f9b',\n },\n onScrollLeadFlowStyle: {\n color: '#4a4f9b',\n },\n onExitLeadFlowStyle: {\n color: '#4a4f9b',\n },\n },\n 'cafe-pro': {\n formsStyle: {\n fontFamily: 'Crimson Text',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'daily-dish-pro': {\n formsStyle: {\n fontFamily: 'Cormorant',\n labelTextColor: '#000000',\n labelTextSize: '20px',\n submitFontColor: '#ffffff',\n submitColor: '#d9037f',\n },\n chatStyle: {\n accentColor: '#d9037f',\n },\n onScrollLeadFlowStyle: {\n color: '#d9037f',\n },\n onExitLeadFlowStyle: {\n color: '#d9037f',\n },\n },\n 'digital-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#5b5e5e',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#e85555',\n },\n chatStyle: {\n accentColor: '#e85555',\n },\n onScrollLeadFlowStyle: {\n color: '#e85555',\n },\n onExitLeadFlowStyle: {\n color: '#e85555',\n },\n },\n 'education-pro': {\n formsStyle: {\n fontFamily: 'Roboto Condensed',\n labelTextColor: '#444444',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#78a7c8',\n },\n chatStyle: {\n accentColor: '#78a7c8',\n },\n onScrollLeadFlowStyle: {\n color: '#78a7c8',\n },\n onExitLeadFlowStyle: {\n color: '#78a7c8',\n },\n },\n 'eleven40-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ed702b',\n },\n chatStyle: {\n accentColor: '#ed702b',\n },\n onScrollLeadFlowStyle: {\n color: '#ed702b',\n },\n onExitLeadFlowStyle: {\n color: '#ed702b',\n },\n },\n 'enterprise-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#777777',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#31b2ed',\n },\n chatStyle: {\n accentColor: '#31b2ed',\n },\n onScrollLeadFlowStyle: {\n color: '#31b2ed',\n },\n onExitLeadFlowStyle: {\n color: '#31b2ed',\n },\n },\n 'essence-pro': {\n formsStyle: {\n fontFamily: 'Alegreya Sans',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#be8100',\n },\n chatStyle: {\n accentColor: '#be8100',\n },\n onScrollLeadFlowStyle: {\n color: '#be8100',\n },\n onExitLeadFlowStyle: {\n color: '#be8100',\n },\n },\n 'executive-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#64c9ea',\n },\n chatStyle: {\n accentColor: '#64c9ea',\n },\n onScrollLeadFlowStyle: {\n color: '#64c9ea',\n },\n onExitLeadFlowStyle: {\n color: '#64c9ea',\n },\n },\n 'generate-pro': {\n formsStyle: {\n fontFamily: 'Source Sans Pro',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#eb232f',\n },\n chatStyle: {\n accentColor: '#eb232f',\n },\n onScrollLeadFlowStyle: {\n color: '#eb232f',\n },\n onExitLeadFlowStyle: {\n color: '#eb232f',\n },\n },\n 'infinity-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#d43c67',\n },\n chatStyle: {\n accentColor: '#d43c67',\n },\n onScrollLeadFlowStyle: {\n color: '#d43c67',\n },\n onExitLeadFlowStyle: {\n color: '#d43c67',\n },\n },\n 'interior-pro': {\n formsStyle: {\n fontFamily: 'Lora',\n labelTextColor: '#777777',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#009092',\n },\n chatStyle: {\n accentColor: '#009092',\n },\n onScrollLeadFlowStyle: {\n color: '#009092',\n },\n onExitLeadFlowStyle: {\n color: '#009092',\n },\n },\n 'lifestyle-pro': {\n formsStyle: {\n fontFamily: 'Droid Sans',\n labelTextColor: '#767673',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#27968b',\n },\n chatStyle: {\n accentColor: '#27968b',\n },\n onScrollLeadFlowStyle: {\n color: '#27968b',\n },\n onExitLeadFlowStyle: {\n color: '#27968b',\n },\n },\n 'magazine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#008285',\n },\n chatStyle: {\n accentColor: '#008285',\n },\n onScrollLeadFlowStyle: {\n color: '#008285',\n },\n onExitLeadFlowStyle: {\n color: '#008285',\n },\n },\n 'metro-pro': {\n formsStyle: {\n fontFamily: 'Helvetica Neue',\n labelTextColor: '#222222',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#f96e5b',\n },\n chatStyle: {\n accentColor: '#f96e5b',\n },\n onScrollLeadFlowStyle: {\n color: '#f96e5b',\n },\n onExitLeadFlowStyle: {\n color: '#f96e5b',\n },\n },\n 'minimum-pro': {\n formsStyle: {\n fontFamily: 'Roboto Slab',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#0ebfe9',\n },\n chatStyle: {\n accentColor: '#0ebfe9',\n },\n onScrollLeadFlowStyle: {\n color: '#0ebfe9',\n },\n onExitLeadFlowStyle: {\n color: '#0ebfe9',\n },\n },\n 'modern-studio-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'monochrome-pro': {\n formsStyle: {\n fontFamily: 'Muli',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'news-pro': {\n formsStyle: {\n fontFamily: 'Raleway',\n labelTextColor: '#666666',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#ff0000',\n },\n chatStyle: {\n accentColor: '#ff0000',\n },\n onScrollLeadFlowStyle: {\n color: '#ff0000',\n },\n onExitLeadFlowStyle: {\n color: '#ff0000',\n },\n },\n 'no-sidebar-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#333333',\n },\n chatStyle: {\n accentColor: '#333333',\n },\n onScrollLeadFlowStyle: {\n color: '#333333',\n },\n onExitLeadFlowStyle: {\n color: '#333333',\n },\n },\n 'outfitter-pro': {\n formsStyle: {\n fontFamily: 'Noto Sans',\n labelTextColor: '#546e7a',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#000000',\n },\n chatStyle: {\n accentColor: '#000000',\n },\n onScrollLeadFlowStyle: {\n color: '#000000',\n },\n onExitLeadFlowStyle: {\n color: '#000000',\n },\n },\n 'outreach-pro': {\n formsStyle: {\n fontFamily: 'Lato',\n labelTextColor: '#333333',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#6ab446',\n },\n chatStyle: {\n accentColor: '#6ab446',\n },\n onScrollLeadFlowStyle: {\n color: '#6ab446',\n },\n onExitLeadFlowStyle: {\n color: '#6ab446',\n },\n },\n 'parallax-pro': {\n formsStyle: {\n fontFamily: 'Cormorant Garamond',\n labelTextColor: '#000000',\n labelTextSize: '22px',\n submitFontColor: '#ffffff',\n submitColor: '#00a0af',\n },\n chatStyle: {\n accentColor: '#00a0af',\n },\n onScrollLeadFlowStyle: {\n color: '#00a0af',\n },\n onExitLeadFlowStyle: {\n color: '#00a0af',\n },\n },\n 'revolution-pro': {\n formsStyle: {\n fontFamily: 'Noto Serif SC',\n labelTextColor: '#000000',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#008080',\n },\n chatStyle: {\n accentColor: '#008080',\n },\n onScrollLeadFlowStyle: {\n color: '#008080',\n },\n onExitLeadFlowStyle: {\n color: '#008080',\n },\n },\n 'sixteen-nine-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#1dbec0',\n },\n chatStyle: {\n accentColor: '#1dbec0',\n },\n onScrollLeadFlowStyle: {\n color: '#1dbec0',\n },\n onExitLeadFlowStyle: {\n color: '#1dbec0',\n },\n },\n 'smart-passive-income-pro': {\n formsStyle: {\n fontFamily: 'Roboto',\n labelTextColor: '#333333',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#0e763c',\n },\n chatStyle: {\n accentColor: '#0e763c',\n },\n onScrollLeadFlowStyle: {\n color: '#0e763c',\n },\n onExitLeadFlowStyle: {\n color: '#0e763c',\n },\n },\n 'wellness-pro': {\n formsStyle: {\n fontFamily: 'Open Sans',\n labelTextColor: '#000000',\n labelTextSize: '16px',\n submitFontColor: '#ffffff',\n submitColor: '#5da44f',\n },\n chatStyle: {\n accentColor: '#5da44f',\n },\n onScrollLeadFlowStyle: {\n color: '#5da44f',\n },\n onExitLeadFlowStyle: {\n color: '#5da44f',\n },\n },\n 'workstation-pro': {\n formsStyle: {\n fontFamily: 'Baskerville',\n labelTextColor: '#222222',\n labelTextSize: '18px',\n submitFontColor: '#ffffff',\n submitColor: '#ff4800',\n },\n chatStyle: {\n accentColor: '#ff4800',\n },\n onScrollLeadFlowStyle: {\n color: '#ff4800',\n },\n onExitLeadFlowStyle: {\n color: '#ff4800',\n },\n },\n};\n","import {\n onInterframeReady,\n onConnect,\n onDisconnect,\n onUpgrade,\n onPageReload,\n onInitNavigation,\n onDisableNavigation,\n onClearQueryParam,\n onGetDomain,\n onGetAssetsPayload,\n onEnterFullScreen,\n onExitFullScreen,\n onSyncRoute,\n} from './api/hubspotPluginApi';\nimport {\n connect,\n disconnect,\n getDomain,\n clearPortalIdPolling,\n} from './api/wordpressApi';\nimport { adminUrl, theme } from './constants/leadinConfig';\nimport { initNavigation, disableNavigation, syncRoute } from './navigation';\nimport enterFullScreen, { exitFullScreen } from './fullscreen';\nimport themes from './constants/themes';\n\nonInterframeReady((message, reply) => {\n reply('Interframe Ready');\n});\n\nonConnect((portalId, reply) => {\n connect(\n portalId,\n () => {\n clearPortalIdPolling();\n reply({ success: true });\n },\n reply.bind(null, { success: false })\n );\n});\n\nonDisconnect((message, reply) => {\n disconnect(\n reply.bind(null, { success: true }),\n reply.bind(null, { success: false })\n );\n});\n\nonUpgrade((message, reply) => {\n reply();\n location.href = `${adminUrl}plugins.php`;\n});\n\nonPageReload((message, reply) => {\n reply();\n window.location.reload(true);\n});\n\nonInitNavigation((message, reply) => {\n reply();\n initNavigation();\n});\n\nonDisableNavigation((message, reply) => {\n reply();\n disableNavigation();\n});\n\nonClearQueryParam((message, reply) => {\n reply();\n let currentWindowLocation = window.location.toString();\n if (currentWindowLocation.indexOf('?') > 0) {\n currentWindowLocation = currentWindowLocation.substring(\n 0,\n currentWindowLocation.indexOf('?')\n );\n }\n const newWindowLocation = `${currentWindowLocation}?page=leadin`;\n window.history.pushState({}, '', newWindowLocation);\n});\n\nonGetDomain((message, reply) => {\n getDomain(data => {\n if (data.domain) {\n reply(data.domain);\n }\n });\n});\n\nonGetAssetsPayload((message, reply) => {\n reply({ payload: themes[theme] });\n});\n\nonEnterFullScreen((message, reply) => {\n enterFullScreen();\n reply();\n});\n\nonExitFullScreen((message, reply) => {\n exitFullScreen();\n reply();\n});\n\nonSyncRoute((message, reply) => {\n syncRoute(message);\n reply();\n});\n","import { domElements } from './constants/selectors';\n\nexport default function enterFullScreen() {\n jQuery(domElements.iframe).addClass('leadin-iframe-fullscreen');\n}\n\nexport function exitFullScreen() {\n jQuery(domElements.iframe).removeClass('leadin-iframe-fullscreen');\n}\n","import Raven, { configureRaven } from './lib/Raven';\nimport { addExternalLinks } from './menu';\nimport { portalId } from './constants/leadinConfig';\nimport { initInterframe } from './lib/Interframe';\nimport { startPortalIdPolling } from './api/wordpressApi';\nimport './handlers';\n\nfunction main() {\n initInterframe();\n\n // Enable App Navigation only when viewing the plugin\n if (window.location.search.indexOf('page=leadin') !== -1) {\n if (!portalId) {\n startPortalIdPolling();\n }\n }\n\n jQuery(document).ready(addExternalLinks);\n}\n\nconfigureRaven();\nRaven.context(main);\n"],"sourceRoot":""}
|
tests/inc/test-leadin-functions.php
CHANGED
@@ -30,33 +30,35 @@ class LeadinFunctionsTest extends WP_UnitTestCase {
|
|
30 |
/**
|
31 |
* Test function leadin_get_subroutes
|
32 |
*/
|
33 |
-
public function
|
34 |
-
|
35 |
-
'page' => 'leadin',
|
36 |
-
'leadin_route0' => 'test',
|
37 |
-
);
|
38 |
-
$this->assertEquals( leadin_get_subroutes( $test_query_array ), '/test' );
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
'leadin_route0' => 'test',
|
43 |
-
'leadin_route1' => 'route',
|
44 |
-
);
|
45 |
-
$this->assertEquals( leadin_get_subroutes( $test_query_array ), '/test/route' );
|
46 |
|
47 |
-
|
48 |
-
|
49 |
-
);
|
50 |
-
|
|
|
51 |
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
);
|
57 |
-
$this->
|
|
|
|
|
|
|
|
|
58 |
|
59 |
-
|
60 |
-
$this->assertEquals( leadin_get_subroutes( $test_query_array ), '' );
|
61 |
}
|
62 |
}
|
30 |
/**
|
31 |
* Test function leadin_get_subroutes
|
32 |
*/
|
33 |
+
public function test_get_iframe_src() {
|
34 |
+
WP_Screen::get( 'hubspot_page_leadin' )->set_current_screen();
|
|
|
|
|
|
|
|
|
35 |
|
36 |
+
// Signup.
|
37 |
+
$this->assertRegExp( '/\/signup\/wordpress?/', leadin_get_iframe_src() );
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
// Portal Id.
|
40 |
+
add_option( 'leadin_portalId', 1 );
|
41 |
+
$this->assertRegExp( '/\/1\/?/', leadin_get_iframe_src() );
|
42 |
+
update_option( 'leadin_portalId', 2 );
|
43 |
+
$this->assertRegExp( '/\/2\/?/', leadin_get_iframe_src() );
|
44 |
|
45 |
+
// Screen.
|
46 |
+
WP_Screen::get( 'hubspot_page_leadin_forms' )->set_current_screen();
|
47 |
+
$this->assertRegExp( '/\/2\/forms?/', leadin_get_iframe_src() );
|
48 |
+
|
49 |
+
// Sub-screen.
|
50 |
+
$_GET = array(
|
51 |
+
'leadin_route' => array(
|
52 |
+
0 => 'foo',
|
53 |
+
1 => 'bar',
|
54 |
+
),
|
55 |
);
|
56 |
+
$this->assertRegExp( '/\/2\/forms\/foo\/bar?/', leadin_get_iframe_src() );
|
57 |
+
|
58 |
+
// Root screen with sub-screen.
|
59 |
+
WP_Screen::get( 'hubspot_page_leadin' )->set_current_screen();
|
60 |
+
$this->assertRegExp( '/\/2\/foo\/bar?/', leadin_get_iframe_src() );
|
61 |
|
62 |
+
delete_option( 'leadin_portalId' );
|
|
|
63 |
}
|
64 |
}
|
tests/inc/test-leadin-mark-outdated.php
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Class LeadinFunctionsTest
|
4 |
-
*
|
5 |
-
* @package Leadin
|
6 |
-
*/
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Test leadin-functions.php
|
10 |
-
*/
|
11 |
-
class LeadinMarkOutdatedTest extends WP_UnitTestCase {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Test function leadin_get_affiliate_code
|
15 |
-
*/
|
16 |
-
public function test_mark_outdated_ajax() {
|
17 |
-
$this->assertFalse( get_option( 'leadin_outdated_version', false ) );
|
18 |
-
$response;
|
19 |
-
|
20 |
-
try {
|
21 |
-
leadin_mark_outdated_ajax();
|
22 |
-
} catch ( WPDieException $e ) {
|
23 |
-
$response = $e;
|
24 |
-
}
|
25 |
-
|
26 |
-
$this->assertTrue( isset( $response ) );
|
27 |
-
$array = json_decode( $response->getMessage() );
|
28 |
-
$this->assertTrue( isset( $array ) );
|
29 |
-
$this->assertTrue( get_option( 'leadin_outdated_version', false ) );
|
30 |
-
delete_option( 'leadin_outdated_version' );
|
31 |
-
}
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|